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
Tests if tank inside right margin
@Test public void testTOutOfBoundsRightMargin2() { tank.setX(460); assertEquals(false, tank.isWithinMarginsRight()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin2() {\n\t\ttank.setX(180);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "public boolean moveRight() {\r\n\t\tif (this.x >= 1050 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x += 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean checkRight()\n\t{\n\t\tif(col+1<=9)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin1() {\n\t\ttank.setX(100);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "boolean hasHingeOnRightSide() throws RuntimeException;", "boolean isRight() {\r\n\t\tint maxlength;\r\n\t\tmaxlength = Math.max(Math.max(side1, side2), side3);\r\n\t\treturn (maxlength * maxlength == (side1 * side1) + (side2 * side2) + (side3 * side3) - (maxlength * maxlength));\r\n\t}", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "@Test\n\tpublic void testTCannotMoveRight() {\n\t\ttank.InabilityToMoveRight();\n\t\tassertEquals(false, tank.getRight());\n\t}", "private boolean hasRight ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "private boolean hasRightChild(int index) {\n return rightChild(index) <= size;\n }", "private boolean checkRightSpace(Position p, int len,\n int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int i = x; i < x + len; i += 1) {\n for (int j = y - rightWid; j < y + leftWid + 1; j += 1) {\n if (i >= worldWidth) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean canMoveRight()\n {\n // runs through row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = grid[row].length-2; column >=0 ; column-- ) {\n\n // looks at tile directly to the right of the current tile\n int compare = column + 1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true; \n }\n }\n }\n } \n return false;\n }", "private boolean rightBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) > Constants.APP_WIDTH;\n }", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }", "boolean isCellRightNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x + 1, this.y));\r\n }", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "private boolean hasRightChild(int i) {\n return rightIndex(i) <= size;\n }", "private boolean inRack(int x, int y) {\n return (y < DoTheDishes.RACK_TOP_Y &&\n x + currentDish.getWidth() > DoTheDishes.RACK_BOTTOM_LEFT_X &&\n x < DoTheDishes.RACK_TOP_RIGHT_X\n );\n }", "public void moveRight() {\n if (rec.getUpperLeft().getX() + rec.getWidth() + 5 > rightBorder) {\n rec.getUpperLeft().setX(rightBorder - rec.getWidth());\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() + 5);\n }\n }", "private boolean movingRight() {\n return this.velocity.sameDirection(Vector2D.X_UNIT);\n }", "public boolean checkBallOutLeftRight() {\n //if ball is out of left and right\n if (x <= -radius || x >= GameView.width + radius) {\n out = true;\n return true;\n }\n return false;\n }", "public void handleRightWall(){\n for(int i = 0; i < 15; i ++){\n if(i % 2 == 1 ){\n maze[18][i] = VISIBLESPACE;\n }\n }\n }", "public boolean stepRight() {\n xMaze++;\n printMyPosition();\n return true; // should return true if step was successful\n }", "protected boolean isRightChild(BTNode<E> v){\n\t\tif (isRoot(v)) return false;\n\t\treturn (v == (v.parent()).rightChild()); \n }", "private boolean rightDownCollision(InteractiveObject obj){\n\t\treturn ((obj.getX() - this.getX() < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t(obj.getY() - this.getY() < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "private boolean tryBorder(int x, int y){\n\n\t\treturn y == this.dimension - 1 || x == this.dimension - 1;\n\t}", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean moveRight() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnRight() && !mouseOnRight()) {\r\n\t\t\tif (!onRightBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX + 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveLeft();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void testTRight1() {\n\t\ttank.InabilityToMoveRight();\n\t\ttank.goRight();\n\t\tassertEquals(0, tank.getX());\n\t}", "@Test\n\tpublic void testTCanMoveRight() {\n\t\ttank.AbilityToMoveRight();\n\t\tassertEquals(true, tank.getRight());\n\t}", "public boolean moveRight() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenRight() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.RIGHT);\r\n\t\t\tif ( currentCol+1 >= size || maze [currentRow] [currentCol+1].isOpenLeft() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol++;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol < size )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Right: \" + moved );\r\n\t\treturn moved;\r\n\t}", "private boolean checkDownSpace(Position p, int len,\n int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j > y - len; j -= 1) {\n for (int i = x - rightWid; i < x + leftWid + 1; i += 1) {\n if (j < 0) {\n return false;\n }\n if (i < 0 || i >= worldWidth) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean checkTopLeftDownDiag(char playerSymbol) {\n //checking the top left-bottom right diagonal\n for (int i = 0; i < N; i++) {\n if (grid[i][i].getSymbol() != playerSymbol) {\n return false;\n }\n }\n return true;\n }", "public void checkScreenCollisionLeftRight() {\n if (x <= radius || x >= GameView.width - radius) {\n speedX *= -1;\n if (x < radius) {\n x = (int) radius;\n }\n if (x > GameView.width - radius) {\n x = (int) (GameView.width - radius);\n }\n }\n }", "private void checkRightWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() >= BORDER) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t}\n\t}", "private int right(int row, int column, char check, char[][] rightBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 18 || traversedPoints.contains(new Point(column + 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (rightBoard[column + 1][row] != ' ' && rightBoard[column + 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column + 1;\n\t}", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "public static boolean isAllowedToCollied(Marker marker, Marker m2){\n\t\tif( m2.letter.getX() < marker.letter.getX()){\n\t\t\tif(m2.rightValue != 0 && marker.leftValue !=0 && m2.rightValue + marker.leftValue == 0){\n\t\t\t\tm2.rightValue =0;\n\t\t\t\tmarker.leftValue=0;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t//if collied on right \n\t\telse if( m2.letter.getX() > marker.letter.getX()){\n\t\t\tif(m2.leftValue != 0 && marker.rightValue != 0 && m2.leftValue+ marker.rightValue == 0){\n\t\t\t\tm2.leftValue = 0;\n\t\t\t\tmarker.rightValue = 0; \n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "public abstract boolean hasRightChild(Position<E> p);", "public boolean right() {\r\n if( col >= MAXCOLS-1) return false;\r\n ++col;\r\n return true;\r\n }", "private boolean isSurroundedByDeepSpace() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDeepSpace = true;\n while (i < surrounding.size() && (isAllDeepSpace)) {\n if (!isDeepSpace(surrounding.get(i))) {\n isAllDeepSpace = false;\n } else {\n i++;\n }\n }\n return isAllDeepSpace;\n }", "public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }", "private boolean rightUpCollision(InteractiveObject obj){\n\t\treturn (((obj.getX() - this.getX()) < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "public int getRightHandMarginColumn() {\n return canShowRightHandMargin ? rightHandMarginColumn : NO_MARGIN;\n }", "private static boolean canCaptureDownRight(ItalianBoard board, int posR, int posC) {\n try {\n return ((board.getBoard()[posR + 1][posC + 1].getPlace() != board.getBoard()[posR][posC].getPlace()) &&\n (board.getBoard()[posR + 1][posC + 1].getPlace() != PlaceType.EMPTY) &&\n (board.getBoard()[posR + 2][posC + 2].getPlace() == PlaceType.EMPTY));\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "private boolean isTractorInDitch() {\n\t\treturn position[0]>field[0]||position[1]>field[1];\n\t}", "private int rightChild ( int pos )\n\t{\t\n\t\treturn -1; // replace this with working code\n\t}", "public boolean hasRight(){\r\n\t\tif(getRight()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean slideRight()\n {\n if (blankCol == 0) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol - 1];\n board[blankRow][blankCol - 1] = 0;\n blankCol -= 1;\n return true;\n }", "public boolean isRight () {\r\n\t\tif (((Math.pow(startSide1, 2) + Math.pow(startSide2, 2) == Math.pow(startSide3, 2)) || \r\n\t\t\t(Math.pow(startSide2, 2) + Math.pow(startSide3, 2) == Math.pow(startSide1, 2)) ||\r\n\t\t\t(Math.pow(startSide3, 2) + Math.pow(startSide1, 2) == Math.pow(startSide2, 2)))\r\n\t\t\t&& isTriangle () == true && isEquilateral () == false) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "protected boolean getExceed(float currentWidth, DefaultRenderer renderer, int right, int width) {\r\n boolean exceed = currentWidth > right;\r\n if (isVertical(renderer)) {\r\n exceed = currentWidth > width;\r\n }\r\n return exceed;\r\n }", "@Override\n\tpublic boolean moveRight() {\n\t\tboolean rs = super.moveRight();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "@Test\n public void testGetHorizontalRightPillar(){\n Pillar cornerPillar = largePillarMap.get(Maze.position(0,0));\n Pillar surroundedPillar = largePillarMap.get(Maze.position(3,3));\n Pillar neighbor = largeMaze.getHorizontalPillar(cornerPillar, false);\n assertEquals(null, neighbor);\n\n neighbor = largeMaze.getHorizontalPillar(surroundedPillar, false);\n assertEquals(2, neighbor.getX());\n assertEquals(3, neighbor.getY());\n }", "public boolean isBelowRail() {\r\n return this.offset < 0;\r\n }", "private void m13644b(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13645b(canvas, childAt.getLeft() - ((LayoutParams) childAt.getLayoutParams()).leftMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13645b(canvas, childAt2 == null ? (getWidth() - getPaddingRight()) - this.f9807c : childAt2.getRight());\n }\n }", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public void checkRightCollision(FloatRect x) {\r\n if((int)rect1.left+rect1.width > x.left+x.width ){\r\n centerX+=6;\r\n }\r\n }", "public boolean hasRight() {\r\n\t\treturn right != null;\r\n\t}", "private boolean checkBottomLeftUpDiag(char playerSymbol) {\n int i = 0;\n for (int j = N - 1; j >= 0; j--) {\n if (grid[j][i].getSymbol() != playerSymbol)\n return false;\n i++;\n }\n return true;\n }", "@Override\r\n\tpublic boolean hasRightChild() {\n\t\treturn right!=null;\r\n\t}", "private static boolean canMoveDownRight(ItalianBoard board, int posR, int posC) {\n try {\n return board.getBoard()[posR + 1][posC + 1].getPlace() == PlaceType.EMPTY;\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "public int getRight(){\n\t\treturn platformHitbox.x+width;\n\t}", "public Boolean isHorizontal() {\n return this == EAST || this == WEST;\n }", "public boolean isTrapped(int r, int c) {\n\t\tif (grid[r][c].getType().equals(\"rock\") || grid[r][c].getType().equals(\"tree\"))\n\t\t\treturn false;\n\t\telse {\n\t\t\tint traps = 0;\n\t\t\tfor (int a = -1; a < 2; a++) {\n\t\t\t\tfor (int b = -1; b < 2; b++) {\n\t\t\t\t\tif ((a == 0 && b == 0) || !inBounds(r + a, c + b) || grid[r + a][c + b] == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tThing t = grid[r + a][c + b];\n\t\t\t\t\tif (t.getType().equals(\"tree\"))\n\t\t\t\t\t\ttraps++;\n\t\t\t\t\telse if (t.getType().equals(\"rock\"))\n\t\t\t\t\t\tif (t.getSize() > 10.0D)\n\t\t\t\t\t\t\ttraps++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn traps >= 5;\n\t\t}\n\t}", "boolean getLeftToRight();", "public boolean reachBorder() {\n // check up\n if (direction == 12) {\n if (this.getY() < speed) {\n return true;\n }\n }\n //check down\n if (direction == 6) {\n if (this.getY() + this.getHeight() + speed > GameUtility.GameUtility.MAP_HEIGHT) {\n return true;\n }\n\n }\n //check left\n if (direction == 9) {\n if (this.getX() < speed) {\n return true;\n }\n }\n //check right\n if (direction == 3) {\n if (this.getX()\n + this.getWidth() + speed > GameUtility.GameUtility.MAP_WIDTH) {\n return true;\n }\n }\n return false;\n\n }", "private boolean isBallCollideRightWall(GOval ball) {\n return ball.getX() + 2 * BALL_RADIUS >= getWidth();\n }", "private int findTreeNodeRightBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeRightBoundary(((DiscourseRelation) node).getArg2());\n }\n\n // it's EDU\n return node.getEnd();\n }", "@Test\n\tpublic void testTRight2() {\n\t\ttank.AbilityToMoveRight();\n\t\ttank.goRight();\n\t\tassertEquals(1, tank.getX());\n\t}", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public boolean isHorizontal(){\n return head().getY() == tail().getY();\n }", "public void moveRight() {\r\n\t\r\n\t\tint rightSteps=10;\r\n\t\t\ttopX+= rightSteps;\r\n\t}", "public void moveRight() {\n if (xcoor <= Game.widthOfGameBoard - movingSpeed) {\n xcoor = xcoor + movingSpeed * 2;\n }\n }", "public boolean moveRIGHT() {\r\n\t\tint i,j,k;\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tfor(i = (rows_size-1) ; i >= 0 ; i--) {\r\n\t\t\tfor( j = (columns_size-1); j >= 0 ; j--) {\r\n\t\t\t\tif( !isEmpty(i,j) ) {\r\n\t\t\t\t\tfor(k = j; k < columns_size && isEmpty(i,k+1); k++);\r\n\t\t\t\t\t\tif(k == (columns_size-1)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k != j) {\r\n\t\t\t\t\t\t\tgame[i][k] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif(game[i][j].isEqual(game[i][k+1]) && game[i][k+1].getFlag() == false) {\r\n\t\t\t\t\t\t\t\tgame[i][k+1].setValue(game[i][k+1].getValue()*2);\r\n\t\t\t\t\t\t\t\tgame[i][k+1].setFlag(true);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tscore += game[i][k+1].getValue();\r\n\t\t\t\t\t\t\t\t--takenCells;\r\n\t\t\t\t\t\t\t\t++freeCells;\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tif(k != j) {\r\n\t\t\t\t\t\t\t\tgame[i][k] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\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\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\t}\r\n\tFalseFlag();\t\r\n\treturn flag;\r\n\t}", "private boolean wrongPositioning(int x, int y, LoadedMap map) {\n boolean ans = false;\n if(hasAbove(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))){\n ans = true;\n }else if (hasBelow(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))) {\n ans = true;\n }\n return ans;\n }", "private boolean isSurroundedByDirtAndLava() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDirt = true;\n while (i < surrounding.size() && (isAllDirt)) {\n if (!isDirt(surrounding.get(i)) && !isLava(surrounding.get(i))) {\n isAllDirt = false;\n } else {\n i++;\n }\n }\n return isAllDirt;\n }", "public boolean canMoveBackward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n //tank upper than wall\n if(wall.getY()-locY<=60 && wall.getY()-locY>=0 && degree>=270 && degree<=360)\n {\n ans=false;\n }\n //tank lower than wall\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=0 && degree<=180)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n //tank at the left side of the wall\n if(wall.getX()-locX<=60 && wall.getX()-locX>=0 &&\n (degree>=90 && degree<=270) )\n {\n ans=false;\n }\n //tank at the right side of the wall\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }", "public void goRight() {\n\t\tx += dx;\n\t\tbgBack.setDx(false);\n\t\tbgBack.move();\n\t\tif(x > Game.WIDTH - 200) {\n\t\t\tif(!bgBack.getReachEnd()) {\n\t\t\t\tx = Game.WIDTH - 200;\n\t\t\t\tbgFront.setDx(false);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x > Game.WIDTH - 50) {\n\t\t\t\tx = Game.WIDTH - 50;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean stopRight() {\n\t\tboolean rs = super.stopRight();\n\t\tif(rs == true && this.y_dir == STOP){\t\t\t\n\t\t}\n\t\treturn rs;\n\t}", "private boolean birdIsOffscreen() {\r\n return (bird.getYpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() - bird.getRadius() > width);\r\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "private static boolean canCaptureUpRight(ItalianBoard board, int posR, int posC) {\n try {\n if (((board.getBoard()[posR][posC].getPiece() == PieceType.MAN) && (board.getBoard()[posR - 1][posC + 1].getPiece() == PieceType.MAN)) || (board.getBoard()[posR][posC].getPiece() == PieceType.KING))\n return ((board.getBoard()[posR - 1][posC + 1].getPlace() != board.getBoard()[posR][posC].getPlace()) &&\n (board.getBoard()[posR - 1][posC + 1].getPlace() != PlaceType.EMPTY) &&\n (board.getBoard()[posR - 2][posC + 2].getPlace() == PlaceType.EMPTY));\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "private boolean isEdge() {\r\n\t\t// get the child view Width\r\n\t\tint childViewWidth = mChildView.getMeasuredWidth();\r\n\t\t// get the ScrollView Width\r\n\t\tint srollViewWidth = this.getWidth();\r\n\t\t// get\r\n\t\tint tempOffset = childViewWidth - srollViewWidth;\r\n\t\tint scrollX = this.getScrollX();\r\n\t\tif (scrollX == 0 || scrollX == tempOffset) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean inVerticalBlank();", "boolean nextLevel() {\r\n\t\treturn this.ship.getRow() == 0 && this.ship.getCol() == this.board.getDimCol() - 1;\r\n\t}", "public boolean isRightToLeft() {\n/* 493 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Integer checkRight()\r\n\t{\r\n\t\treturn this.X + 1;\r\n\t}", "private boolean testRightDiagonal(Board board, char symbol)\n {\n for (int i = 0; i < size; i++)\n {\n if (board.array[i][size - 1 - i] != symbol && board.array[i][size - 1 - i] != EMPTY)\n return false;\n }\n return true;\n }", "public boolean tooRight(AnimationGrass animationGrass) {\n\t\treturn true;\n\t}", "public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }", "public boolean isRightSide() {\n return rightSide;\n }" ]
[ "0.75602907", "0.73383194", "0.70826054", "0.65971345", "0.6588694", "0.6503502", "0.64785403", "0.631206", "0.62684625", "0.6144961", "0.60993326", "0.6094709", "0.60668766", "0.60600907", "0.60484976", "0.6036911", "0.59542596", "0.590374", "0.5900591", "0.5866203", "0.58659446", "0.5842889", "0.58407533", "0.5827957", "0.58006305", "0.5784227", "0.57631826", "0.57569975", "0.57543904", "0.57384217", "0.5723298", "0.5704612", "0.56984466", "0.56883764", "0.56788296", "0.5676505", "0.56713176", "0.5668424", "0.5664487", "0.56582123", "0.56518334", "0.5651833", "0.5648171", "0.56438625", "0.56379145", "0.5621501", "0.56101733", "0.560937", "0.5600243", "0.55958134", "0.55890644", "0.5577082", "0.5565649", "0.5562878", "0.55572426", "0.5543999", "0.55432534", "0.55400795", "0.5535838", "0.55188054", "0.5517125", "0.55167395", "0.54928124", "0.549161", "0.54800624", "0.5473189", "0.5471791", "0.5464379", "0.5457825", "0.54538465", "0.5452022", "0.54515547", "0.5446773", "0.5446419", "0.5434503", "0.5434419", "0.5433391", "0.5411442", "0.5408708", "0.54072326", "0.5406967", "0.5406318", "0.5406267", "0.5402771", "0.540075", "0.5399243", "0.5394602", "0.5383881", "0.5383881", "0.5375432", "0.5371782", "0.5355175", "0.5349489", "0.534747", "0.5346637", "0.5346169", "0.53448576", "0.533813", "0.53323287", "0.5331572" ]
0.7620653
0
Tests if tank inside right margin
@Test public void testTOutOfBoundsRightMargin3() { tank.setX(300); assertEquals(true, tank.isWithinMarginsRight()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin2() {\n\t\ttank.setX(180);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "public boolean moveRight() {\r\n\t\tif (this.x >= 1050 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x += 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean checkRight()\n\t{\n\t\tif(col+1<=9)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin1() {\n\t\ttank.setX(100);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "boolean hasHingeOnRightSide() throws RuntimeException;", "boolean isRight() {\r\n\t\tint maxlength;\r\n\t\tmaxlength = Math.max(Math.max(side1, side2), side3);\r\n\t\treturn (maxlength * maxlength == (side1 * side1) + (side2 * side2) + (side3 * side3) - (maxlength * maxlength));\r\n\t}", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "@Test\n\tpublic void testTCannotMoveRight() {\n\t\ttank.InabilityToMoveRight();\n\t\tassertEquals(false, tank.getRight());\n\t}", "private boolean hasRight ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "private boolean hasRightChild(int index) {\n return rightChild(index) <= size;\n }", "private boolean checkRightSpace(Position p, int len,\n int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int i = x; i < x + len; i += 1) {\n for (int j = y - rightWid; j < y + leftWid + 1; j += 1) {\n if (i >= worldWidth) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean canMoveRight()\n {\n // runs through row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = grid[row].length-2; column >=0 ; column-- ) {\n\n // looks at tile directly to the right of the current tile\n int compare = column + 1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true; \n }\n }\n }\n } \n return false;\n }", "private boolean rightBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) > Constants.APP_WIDTH;\n }", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }", "boolean isCellRightNeighbor() {\r\n return this.neighbors.contains(new Cell(this.x + 1, this.y));\r\n }", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "private boolean hasRightChild(int i) {\n return rightIndex(i) <= size;\n }", "private boolean inRack(int x, int y) {\n return (y < DoTheDishes.RACK_TOP_Y &&\n x + currentDish.getWidth() > DoTheDishes.RACK_BOTTOM_LEFT_X &&\n x < DoTheDishes.RACK_TOP_RIGHT_X\n );\n }", "public void moveRight() {\n if (rec.getUpperLeft().getX() + rec.getWidth() + 5 > rightBorder) {\n rec.getUpperLeft().setX(rightBorder - rec.getWidth());\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() + 5);\n }\n }", "private boolean movingRight() {\n return this.velocity.sameDirection(Vector2D.X_UNIT);\n }", "public boolean checkBallOutLeftRight() {\n //if ball is out of left and right\n if (x <= -radius || x >= GameView.width + radius) {\n out = true;\n return true;\n }\n return false;\n }", "public void handleRightWall(){\n for(int i = 0; i < 15; i ++){\n if(i % 2 == 1 ){\n maze[18][i] = VISIBLESPACE;\n }\n }\n }", "public boolean stepRight() {\n xMaze++;\n printMyPosition();\n return true; // should return true if step was successful\n }", "protected boolean isRightChild(BTNode<E> v){\n\t\tif (isRoot(v)) return false;\n\t\treturn (v == (v.parent()).rightChild()); \n }", "private boolean rightDownCollision(InteractiveObject obj){\n\t\treturn ((obj.getX() - this.getX() < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t(obj.getY() - this.getY() < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "private boolean tryBorder(int x, int y){\n\n\t\treturn y == this.dimension - 1 || x == this.dimension - 1;\n\t}", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean moveRight() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnRight() && !mouseOnRight()) {\r\n\t\t\tif (!onRightBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX + 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveLeft();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void testTRight1() {\n\t\ttank.InabilityToMoveRight();\n\t\ttank.goRight();\n\t\tassertEquals(0, tank.getX());\n\t}", "@Test\n\tpublic void testTCanMoveRight() {\n\t\ttank.AbilityToMoveRight();\n\t\tassertEquals(true, tank.getRight());\n\t}", "public boolean moveRight() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenRight() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.RIGHT);\r\n\t\t\tif ( currentCol+1 >= size || maze [currentRow] [currentCol+1].isOpenLeft() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol++;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol < size )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Right: \" + moved );\r\n\t\treturn moved;\r\n\t}", "private boolean checkDownSpace(Position p, int len,\n int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j > y - len; j -= 1) {\n for (int i = x - rightWid; i < x + leftWid + 1; i += 1) {\n if (j < 0) {\n return false;\n }\n if (i < 0 || i >= worldWidth) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean checkTopLeftDownDiag(char playerSymbol) {\n //checking the top left-bottom right diagonal\n for (int i = 0; i < N; i++) {\n if (grid[i][i].getSymbol() != playerSymbol) {\n return false;\n }\n }\n return true;\n }", "public void checkScreenCollisionLeftRight() {\n if (x <= radius || x >= GameView.width - radius) {\n speedX *= -1;\n if (x < radius) {\n x = (int) radius;\n }\n if (x > GameView.width - radius) {\n x = (int) (GameView.width - radius);\n }\n }\n }", "private void checkRightWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() >= BORDER) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t}\n\t}", "private int right(int row, int column, char check, char[][] rightBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 18 || traversedPoints.contains(new Point(column + 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (rightBoard[column + 1][row] != ' ' && rightBoard[column + 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column + 1;\n\t}", "public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}", "public static boolean isAllowedToCollied(Marker marker, Marker m2){\n\t\tif( m2.letter.getX() < marker.letter.getX()){\n\t\t\tif(m2.rightValue != 0 && marker.leftValue !=0 && m2.rightValue + marker.leftValue == 0){\n\t\t\t\tm2.rightValue =0;\n\t\t\t\tmarker.leftValue=0;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t//if collied on right \n\t\telse if( m2.letter.getX() > marker.letter.getX()){\n\t\t\tif(m2.leftValue != 0 && marker.rightValue != 0 && m2.leftValue+ marker.rightValue == 0){\n\t\t\t\tm2.leftValue = 0;\n\t\t\t\tmarker.rightValue = 0; \n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "public abstract boolean hasRightChild(Position<E> p);", "public boolean right() {\r\n if( col >= MAXCOLS-1) return false;\r\n ++col;\r\n return true;\r\n }", "private boolean isSurroundedByDeepSpace() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDeepSpace = true;\n while (i < surrounding.size() && (isAllDeepSpace)) {\n if (!isDeepSpace(surrounding.get(i))) {\n isAllDeepSpace = false;\n } else {\n i++;\n }\n }\n return isAllDeepSpace;\n }", "public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }", "private boolean rightUpCollision(InteractiveObject obj){\n\t\treturn (((obj.getX() - this.getX()) < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "public int getRightHandMarginColumn() {\n return canShowRightHandMargin ? rightHandMarginColumn : NO_MARGIN;\n }", "private static boolean canCaptureDownRight(ItalianBoard board, int posR, int posC) {\n try {\n return ((board.getBoard()[posR + 1][posC + 1].getPlace() != board.getBoard()[posR][posC].getPlace()) &&\n (board.getBoard()[posR + 1][posC + 1].getPlace() != PlaceType.EMPTY) &&\n (board.getBoard()[posR + 2][posC + 2].getPlace() == PlaceType.EMPTY));\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "private boolean isTractorInDitch() {\n\t\treturn position[0]>field[0]||position[1]>field[1];\n\t}", "private int rightChild ( int pos )\n\t{\t\n\t\treturn -1; // replace this with working code\n\t}", "public boolean hasRight(){\r\n\t\tif(getRight()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isRight () {\r\n\t\tif (((Math.pow(startSide1, 2) + Math.pow(startSide2, 2) == Math.pow(startSide3, 2)) || \r\n\t\t\t(Math.pow(startSide2, 2) + Math.pow(startSide3, 2) == Math.pow(startSide1, 2)) ||\r\n\t\t\t(Math.pow(startSide3, 2) + Math.pow(startSide1, 2) == Math.pow(startSide2, 2)))\r\n\t\t\t&& isTriangle () == true && isEquilateral () == false) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "private boolean slideRight()\n {\n if (blankCol == 0) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol - 1];\n board[blankRow][blankCol - 1] = 0;\n blankCol -= 1;\n return true;\n }", "protected boolean getExceed(float currentWidth, DefaultRenderer renderer, int right, int width) {\r\n boolean exceed = currentWidth > right;\r\n if (isVertical(renderer)) {\r\n exceed = currentWidth > width;\r\n }\r\n return exceed;\r\n }", "@Override\n\tpublic boolean moveRight() {\n\t\tboolean rs = super.moveRight();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "private void m13644b(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13645b(canvas, childAt.getLeft() - ((LayoutParams) childAt.getLayoutParams()).leftMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13645b(canvas, childAt2 == null ? (getWidth() - getPaddingRight()) - this.f9807c : childAt2.getRight());\n }\n }", "public boolean isBelowRail() {\r\n return this.offset < 0;\r\n }", "@Test\n public void testGetHorizontalRightPillar(){\n Pillar cornerPillar = largePillarMap.get(Maze.position(0,0));\n Pillar surroundedPillar = largePillarMap.get(Maze.position(3,3));\n Pillar neighbor = largeMaze.getHorizontalPillar(cornerPillar, false);\n assertEquals(null, neighbor);\n\n neighbor = largeMaze.getHorizontalPillar(surroundedPillar, false);\n assertEquals(2, neighbor.getX());\n assertEquals(3, neighbor.getY());\n }", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public void checkRightCollision(FloatRect x) {\r\n if((int)rect1.left+rect1.width > x.left+x.width ){\r\n centerX+=6;\r\n }\r\n }", "public boolean hasRight() {\r\n\t\treturn right != null;\r\n\t}", "@Override\r\n\tpublic boolean hasRightChild() {\n\t\treturn right!=null;\r\n\t}", "private boolean checkBottomLeftUpDiag(char playerSymbol) {\n int i = 0;\n for (int j = N - 1; j >= 0; j--) {\n if (grid[j][i].getSymbol() != playerSymbol)\n return false;\n i++;\n }\n return true;\n }", "private static boolean canMoveDownRight(ItalianBoard board, int posR, int posC) {\n try {\n return board.getBoard()[posR + 1][posC + 1].getPlace() == PlaceType.EMPTY;\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "public int getRight(){\n\t\treturn platformHitbox.x+width;\n\t}", "public Boolean isHorizontal() {\n return this == EAST || this == WEST;\n }", "boolean getLeftToRight();", "public boolean isTrapped(int r, int c) {\n\t\tif (grid[r][c].getType().equals(\"rock\") || grid[r][c].getType().equals(\"tree\"))\n\t\t\treturn false;\n\t\telse {\n\t\t\tint traps = 0;\n\t\t\tfor (int a = -1; a < 2; a++) {\n\t\t\t\tfor (int b = -1; b < 2; b++) {\n\t\t\t\t\tif ((a == 0 && b == 0) || !inBounds(r + a, c + b) || grid[r + a][c + b] == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tThing t = grid[r + a][c + b];\n\t\t\t\t\tif (t.getType().equals(\"tree\"))\n\t\t\t\t\t\ttraps++;\n\t\t\t\t\telse if (t.getType().equals(\"rock\"))\n\t\t\t\t\t\tif (t.getSize() > 10.0D)\n\t\t\t\t\t\t\ttraps++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn traps >= 5;\n\t\t}\n\t}", "private boolean isBallCollideRightWall(GOval ball) {\n return ball.getX() + 2 * BALL_RADIUS >= getWidth();\n }", "public boolean reachBorder() {\n // check up\n if (direction == 12) {\n if (this.getY() < speed) {\n return true;\n }\n }\n //check down\n if (direction == 6) {\n if (this.getY() + this.getHeight() + speed > GameUtility.GameUtility.MAP_HEIGHT) {\n return true;\n }\n\n }\n //check left\n if (direction == 9) {\n if (this.getX() < speed) {\n return true;\n }\n }\n //check right\n if (direction == 3) {\n if (this.getX()\n + this.getWidth() + speed > GameUtility.GameUtility.MAP_WIDTH) {\n return true;\n }\n }\n return false;\n\n }", "private int findTreeNodeRightBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeRightBoundary(((DiscourseRelation) node).getArg2());\n }\n\n // it's EDU\n return node.getEnd();\n }", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "@Test\n\tpublic void testTRight2() {\n\t\ttank.AbilityToMoveRight();\n\t\ttank.goRight();\n\t\tassertEquals(1, tank.getX());\n\t}", "public boolean isHorizontal(){\n return head().getY() == tail().getY();\n }", "public void moveRight() {\r\n\t\r\n\t\tint rightSteps=10;\r\n\t\t\ttopX+= rightSteps;\r\n\t}", "public void moveRight() {\n if (xcoor <= Game.widthOfGameBoard - movingSpeed) {\n xcoor = xcoor + movingSpeed * 2;\n }\n }", "public boolean moveRIGHT() {\r\n\t\tint i,j,k;\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tfor(i = (rows_size-1) ; i >= 0 ; i--) {\r\n\t\t\tfor( j = (columns_size-1); j >= 0 ; j--) {\r\n\t\t\t\tif( !isEmpty(i,j) ) {\r\n\t\t\t\t\tfor(k = j; k < columns_size && isEmpty(i,k+1); k++);\r\n\t\t\t\t\t\tif(k == (columns_size-1)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k != j) {\r\n\t\t\t\t\t\t\tgame[i][k] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif(game[i][j].isEqual(game[i][k+1]) && game[i][k+1].getFlag() == false) {\r\n\t\t\t\t\t\t\t\tgame[i][k+1].setValue(game[i][k+1].getValue()*2);\r\n\t\t\t\t\t\t\t\tgame[i][k+1].setFlag(true);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tscore += game[i][k+1].getValue();\r\n\t\t\t\t\t\t\t\t--takenCells;\r\n\t\t\t\t\t\t\t\t++freeCells;\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tif(k != j) {\r\n\t\t\t\t\t\t\t\tgame[i][k] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\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\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\t}\r\n\tFalseFlag();\t\r\n\treturn flag;\r\n\t}", "private boolean wrongPositioning(int x, int y, LoadedMap map) {\n boolean ans = false;\n if(hasAbove(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))){\n ans = true;\n }else if (hasBelow(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))) {\n ans = true;\n }\n return ans;\n }", "private boolean isSurroundedByDirtAndLava() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDirt = true;\n while (i < surrounding.size() && (isAllDirt)) {\n if (!isDirt(surrounding.get(i)) && !isLava(surrounding.get(i))) {\n isAllDirt = false;\n } else {\n i++;\n }\n }\n return isAllDirt;\n }", "public boolean canMoveBackward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n //tank upper than wall\n if(wall.getY()-locY<=60 && wall.getY()-locY>=0 && degree>=270 && degree<=360)\n {\n ans=false;\n }\n //tank lower than wall\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=0 && degree<=180)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n //tank at the left side of the wall\n if(wall.getX()-locX<=60 && wall.getX()-locX>=0 &&\n (degree>=90 && degree<=270) )\n {\n ans=false;\n }\n //tank at the right side of the wall\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }", "public void goRight() {\n\t\tx += dx;\n\t\tbgBack.setDx(false);\n\t\tbgBack.move();\n\t\tif(x > Game.WIDTH - 200) {\n\t\t\tif(!bgBack.getReachEnd()) {\n\t\t\t\tx = Game.WIDTH - 200;\n\t\t\t\tbgFront.setDx(false);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x > Game.WIDTH - 50) {\n\t\t\t\tx = Game.WIDTH - 50;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean stopRight() {\n\t\tboolean rs = super.stopRight();\n\t\tif(rs == true && this.y_dir == STOP){\t\t\t\n\t\t}\n\t\treturn rs;\n\t}", "private boolean birdIsOffscreen() {\r\n return (bird.getYpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() - bird.getRadius() > width);\r\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "private static boolean canCaptureUpRight(ItalianBoard board, int posR, int posC) {\n try {\n if (((board.getBoard()[posR][posC].getPiece() == PieceType.MAN) && (board.getBoard()[posR - 1][posC + 1].getPiece() == PieceType.MAN)) || (board.getBoard()[posR][posC].getPiece() == PieceType.KING))\n return ((board.getBoard()[posR - 1][posC + 1].getPlace() != board.getBoard()[posR][posC].getPlace()) &&\n (board.getBoard()[posR - 1][posC + 1].getPlace() != PlaceType.EMPTY) &&\n (board.getBoard()[posR - 2][posC + 2].getPlace() == PlaceType.EMPTY));\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "private boolean isEdge() {\r\n\t\t// get the child view Width\r\n\t\tint childViewWidth = mChildView.getMeasuredWidth();\r\n\t\t// get the ScrollView Width\r\n\t\tint srollViewWidth = this.getWidth();\r\n\t\t// get\r\n\t\tint tempOffset = childViewWidth - srollViewWidth;\r\n\t\tint scrollX = this.getScrollX();\r\n\t\tif (scrollX == 0 || scrollX == tempOffset) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean inVerticalBlank();", "public Integer checkRight()\r\n\t{\r\n\t\treturn this.X + 1;\r\n\t}", "public boolean isRightToLeft() {\n/* 493 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "boolean nextLevel() {\r\n\t\treturn this.ship.getRow() == 0 && this.ship.getCol() == this.board.getDimCol() - 1;\r\n\t}", "private boolean testRightDiagonal(Board board, char symbol)\n {\n for (int i = 0; i < size; i++)\n {\n if (board.array[i][size - 1 - i] != symbol && board.array[i][size - 1 - i] != EMPTY)\n return false;\n }\n return true;\n }", "public boolean tooRight(AnimationGrass animationGrass) {\n\t\treturn true;\n\t}", "public boolean isRightSide() {\n return rightSide;\n }", "public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }" ]
[ "0.76212484", "0.75607705", "0.7083071", "0.6597683", "0.6589229", "0.65037", "0.6479061", "0.6312934", "0.62694246", "0.6143764", "0.6098742", "0.6095964", "0.60679764", "0.60599816", "0.6047686", "0.6037012", "0.5955504", "0.59033257", "0.59003633", "0.58663017", "0.5865711", "0.5843758", "0.5840516", "0.5827323", "0.58016014", "0.5785386", "0.57611006", "0.5756823", "0.5755021", "0.5738705", "0.5723232", "0.5703931", "0.5698731", "0.5687291", "0.56774735", "0.5676049", "0.5670251", "0.5667901", "0.5665032", "0.56577724", "0.5653276", "0.56513935", "0.5647243", "0.56434095", "0.56392395", "0.5622242", "0.5609828", "0.5608462", "0.5601173", "0.5596796", "0.55896616", "0.5576321", "0.5565596", "0.5564326", "0.5558071", "0.5544256", "0.55429673", "0.55411726", "0.55359846", "0.55181277", "0.55179155", "0.5517204", "0.5492574", "0.549244", "0.54816854", "0.54732525", "0.5471682", "0.54633117", "0.546007", "0.54544234", "0.5453195", "0.5451124", "0.5446048", "0.5445776", "0.54358006", "0.54334766", "0.5433095", "0.54117435", "0.54078364", "0.54069513", "0.54061437", "0.54060555", "0.5406028", "0.5401622", "0.53995985", "0.5399276", "0.5396089", "0.53836066", "0.53836066", "0.5375341", "0.5371303", "0.5357102", "0.5350094", "0.5347714", "0.53476506", "0.5346436", "0.53434247", "0.5338384", "0.5332266", "0.53316766" ]
0.73384124
2
Tests if tank inside left margin
@Test public void testTOutOfBoundsLeftMargin1() { tank.setX(100); assertEquals(false, tank.isWithinMarginsLeft()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTOutOfBoundsLeftMargin2() {\n\t\ttank.setX(180);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}", "public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }", "@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public boolean isLeftFromTop(int cannonCoordinatesX) {\n if (cannonCoordinatesX <= END_X[0]) {\n return false;\n }\n return cannonCoordinatesX <= TOP_X[1];\n }", "public boolean lastHitLeft()\n\t{\n\t\treturn lastBorderHit[0];\n\t}", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "private boolean checkLeftSpace(Position p, int len,\n int leftWid, int rightWid) {\n\n int x = p.x;\n int y = p.y;\n for (int i = x; i > x - len; i -= 1) {\n for (int j = y - leftWid; j < y + rightWid + 1; j += 1) {\n if (i < 0) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "public void checkLeftCollision(FloatRect x){\r\n if((int)rect1.left < x.left ) {\r\n centerX -= 6;\r\n }\r\n }", "boolean hasPositionX();", "boolean hasPositionX();", "boolean hasPositionX();", "public void checkLeftAndRightXs() {\r\n this.leftX = (int) this.enemies.get(0).getCollisionRectangle().getBoundaries().getLeftX();\r\n this.rightX = (int) (this.enemies.get(0).getCollisionRectangle().getBoundaries().getRightX());\r\n for (Enemy e : enemies) {\r\n if (e.getCollisionRectangle().getBoundaries().getLeftX() < this.leftX) {\r\n this.leftX = (int) e.getCollisionRectangle().getBoundaries().getLeftX();\r\n }\r\n if (e.getCollisionRectangle().getBoundaries().getRightX() > this.rightX) {\r\n this.rightX = (int) e.getCollisionRectangle().getBoundaries().getRightX();\r\n }\r\n }\r\n }", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "void hasLeft();", "@Test\n\tpublic void testTCannotMoveLeft() {\n\t\ttank.InabilityToMoveLeft();\n\t\tassertEquals(false, tank.getLeft());\n\t}", "private boolean hasLeftChild(int index) {\n return leftChild(index) <= size;\n }", "private boolean leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\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 }", "private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public boolean left() {\r\n if( col <= 0 ) return false;\r\n --col;\r\n return true;\r\n }", "private boolean canMoveLeft()\n {\n // runs through board row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = 1; column < grid[row].length; column++ ) {\n\n // looks at tile directly to the left of the current tile\n int compare = column-1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true;\n }\n }\n }\n } \n return false;\n }", "public Boolean isHorizontal() {\n return this == EAST || this == WEST;\n }", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "public boolean checkLessThanMaxX() {\n return (currX + getXMargin) <= getMaxX;\n }", "@Test\n\tpublic void testTLeft1() {\n\t\ttank.InabilityToMoveLeft();\n\t\ttank.goLeft();\n\t\tassertEquals(0, tank.getX());\n\t}", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "private boolean hasLeftChild(int i) {\n return leftIndex(i) <= size;\n }", "private int leftChild(int pos)\n {\n return (2 * pos);\n }", "public int getLeftX() {\n\t\treturn 0;\r\n\t}", "private int left(int row, int column, char check, char[][] leftBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 0 || traversedPoints.contains(new Point(column - 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (leftBoard[column - 1][row] != ' ' && leftBoard[column - 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column - 1;\n\t}", "public boolean isHorizontal() {\n\t\treturn ( getSlope() == 0.0d );\n\t}", "private int leftChild ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "boolean hasScrollOffsetX();", "public boolean isHorizontal(){\n return head().getY() == tail().getY();\n }", "public boolean moveLeft() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnLeft() && !mouseOnLeft()) {\r\n\t\t\tif (!onLeftBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX - 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveRight();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public int getXLeft() {\n return xLeft;\n }", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}", "public abstract boolean hasLeftChild(Position<E> p);", "private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }", "private boolean horizontalCrash(@NotNull Wall wallToCheck) {\n ArrayList<Coordinate> wallCoordinates = wallToCheck.getPointsArray();\n return wallCoordinates.get(0).getXCoordinate() <= coordinates.get(1).getXCoordinate() && coordinates.get(0).getXCoordinate() <= wallCoordinates.get(1).getXCoordinate();\n }", "@Test\n public void testGetHorizontalLeftPillar(){\n Pillar cornerPillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,3));\n Pillar neighbor = largeMaze.getHorizontalPillar(cornerPillar, true);\n assertEquals(1, neighbor.getX());\n assertEquals(0, neighbor.getY());\n\n neighbor = largeMaze.getHorizontalPillar(edgePillar, true);\n assertEquals(null, neighbor);\n }", "public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "private static boolean IsAtIndentedParagraphOrBlockUIContainerStart(ITextPointer position)\r\n { \r\n if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position))\r\n {\r\n Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer;\r\n if (paragraphOrBlockUIContainer != null) \r\n {\r\n FlowDirection flowDirection = paragraphOrBlockUIContainer.FlowDirection; \r\n Thickness margin = paragraphOrBlockUIContainer.Margin; \r\n\r\n return \r\n flowDirection == FlowDirection.LeftToRight && margin.Left > 0 ||\r\n flowDirection == FlowDirection.RightToLeft && margin.Right > 0 ||\r\n (paragraphOrBlockUIContainer is Paragraph && ((Paragraph)paragraphOrBlockUIContainer).TextIndent > 0);\r\n } \r\n }\r\n\r\n return false; \r\n }", "public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }", "public int getSafeInsetLeft() {\n if (SDK_INT >= 28) {\n return ((DisplayCutout) mDisplayCutout).getSafeInsetLeft();\n } else {\n return 0;\n }\n }", "protected boolean isLeftChild(BTNode<E> v){\n\t\tif (isRoot(v)) return false;\n\t\treturn (v == (v.parent()).leftChild()); \n\t}", "public boolean tooLeft(AnimationGrass animationGrass) {\n\t\treturn true;\n\t}", "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "public void checkRightCollision(FloatRect x) {\r\n if((int)rect1.left+rect1.width > x.left+x.width ){\r\n centerX+=6;\r\n }\r\n }", "public void checkScreenCollisionLeftRight() {\n if (x <= radius || x >= GameView.width - radius) {\n speedX *= -1;\n if (x < radius) {\n x = (int) radius;\n }\n if (x > GameView.width - radius) {\n x = (int) (GameView.width - radius);\n }\n }\n }", "public boolean isHorizontal(CoordinateImpl coordinate) { return coordinate.rank == rank;}", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "public boolean pageLeft() {\n if (this.mCurItem <= 0) {\n return false;\n }\n setCurrentItem(this.mCurItem - 1, true);\n return true;\n }", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isHorizontal()\r\n\t{\r\n\t\treturn _position==Position.HORIZONTAL;\r\n\t}", "@Test\n\tpublic final void nextPositionLeftTest() {\n\t\tplayer.setLeft(true);\n\t\tplayer.setMovSpeed(3.0);\n\t\tplayer.setMaxSpeed(2.0);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), -2.0, 0.1);\n\t}", "private void m13644b(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13645b(canvas, childAt.getLeft() - ((LayoutParams) childAt.getLayoutParams()).leftMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13645b(canvas, childAt2 == null ? (getWidth() - getPaddingRight()) - this.f9807c : childAt2.getRight());\n }\n }", "private boolean isLeftChild(Node curr) {\n\t\tif(curr.parent.left == curr) {\n return true;\n } else {\n return false;\n }\n\t}", "private boolean seeNextFloorX(Position target) {\n if (target.x == position.x) {\n return false;\n }\n if (target.x > position.x) {\n\n return world[position.x + 1][position.y].equals(Tileset.FLOOR);\n }\n if (target.x < position.x) {\n return world[position.x - 1][position.y].equals(Tileset.FLOOR);\n }\n return false;\n }", "public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}", "public void checkXAxis ()\n {\n if (player.getX() >= 599)\n {\n player.setLocation (0, player.getY());\n }\n else if (player.getX() <= 0)\n {\n player.setLocation (598, player.getY());\n }\n }", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "private int check(int tiles_per_cam_width) {\r\n\t\tif( left_map_scroll >= left_map_width) {\r\n\t\t\ttotal_maps++;\r\n\t\t\tmap[l()].dispose();\r\n\t\t\tleft_map = r();\r\n\t\t\tint random_map = (int)Math.round(2+Math.random()*14);\r\n\t\t\tif( left_map == 1 )\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\telse //for later\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\tint left_map_width_return = left_map_width;\r\n\t left_map_scroll -= left_map_width;\r\n\t\t\tleft_map_width = map[l()].\r\n\t\t\t\t\tgetProperties().get(\"width\", Integer.class);\r\n\t\t\tscrollCam( tiles_per_cam_width );\r\n\t\t\treturn left_map_width_return;\r\n\t\t}\r\n\t\tscrollCam( tiles_per_cam_width );\r\n\t\treturn 0;\r\n\t}", "@Test\n public void testGetDeltaXLEFT()\n {\n assertEquals(Direction.LEFT.getDeltaX(), -1);\n }", "private boolean hasLeftWall(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\treturn !v.mayMove(Direction.WEST);\n\t\tcase SOUTH:\n\t\t\treturn !v.mayMove(Direction.EAST);\n\t\tcase WEST:\n\t\t\treturn !v.mayMove(Direction.SOUTH);\n\t\tcase EAST:\n\t\t\treturn !v.mayMove(Direction.NORTH);\n\t\tdefault: return false;\n\t\t}\n\t}", "public boolean moveLeft() {\n if (position.isLinked(position.getWest())) {\n position.getGameObjects().remove(this.type);\n position = position.getWest();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }", "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}", "public boolean getBorderVisible() {\n checkWidget();\n return borderLeft == 1;\n }", "boolean hasIsMidNode();", "private boolean isBricksLeft(int bricksOnStage) {\n return bricksOnStage == 0;\n }", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public boolean isPointOnTheLeft(Point2d point){\n return direction.y*(point.x-this.point.x)-direction.x*(point.y-this.point.y) < 0;\n }", "public boolean isHorizontalMode() throws PDFNetException {\n/* 627 */ return IsHorizontalMode(this.a);\n/* */ }", "@Test\n\tpublic void testTLeft2() {\n\t\ttank.AbilityToMoveLeft();\n\t\ttank.goLeft();\n\t\tassertEquals(-1, tank.getX());\n\t}", "@Test\n\tpublic void testTCanMoveLeft() {\n\t\ttank.AbilityToMoveLeft();\n\t\tassertEquals(true, tank.getLeft());\n\t}", "public boolean hasLeftChild() {\n\t\treturn leftChild != null;\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "boolean isLeftCollision(Actor actor) {\n return this.getX() - 1 == actor.getX() && this.getY() == actor.getY();\n }", "public boolean checkX1()\n {\n if((this.getX()<5)) {\n return true;\n }\n else\n return false;\n\n }", "private int findTreeNodeLeftBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeLeftBoundary(((DiscourseRelation) node).getArg1());\n }\n\n // it's EDU\n return node.getBegin();\n }", "public boolean LeftIntersects(BoundingBox other) {\r\n\t\treturn ((Math.abs(other.getRight() - left) < SMALL_NUMBER)\r\n\t\t\t\t&& (other.getTop() == top));\r\n\t}", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "private void checkScrollFocusLeft(){\n\t\tfinal View focused = getFocusedChild();\n\t\tif(getChildCount() >= 2 ){\n\t\t\tView second = getChildAt(1);\n\t\t\tView first = getChildAt(0);\n\t\t\t\n\t\t\tif(focused == second){\n\t\t\t\tscroll(-first.getWidth());\n\t\t\t}\n\t\t}\t\t\t\n\t}", "private void checkLeftWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() <= 0) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t\t\n\t\t\tInvader.setDirectionRight(true);\n\t\t}\n\t}", "public void setXLeft(int left) {\n this.xLeft = left;\n }", "public boolean isLeft(char dirFacing, Location next)\n\t{\n\t\tLocation left = getLeft(dirFacing);\n\t\treturn left.getX() == next.x && left.getY() == next.y;\n\t}", "private boolean slideLeft()\n {\n if (blankCol == SIZE - 1) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol + 1];\n board[blankRow][blankCol + 1] = 0;\n blankCol += 1;\n return true;\n }" ]
[ "0.767197", "0.7553397", "0.69743496", "0.69032145", "0.6686465", "0.6499331", "0.64798594", "0.64538324", "0.63277924", "0.62991834", "0.62448573", "0.62082", "0.61833304", "0.61604565", "0.61527526", "0.6132344", "0.60715574", "0.60715574", "0.60715574", "0.60289276", "0.60072285", "0.59663635", "0.59609306", "0.59449196", "0.588824", "0.58736277", "0.5862416", "0.58482563", "0.5843048", "0.58397937", "0.5837838", "0.58342284", "0.5824123", "0.58170944", "0.5815813", "0.5814917", "0.57699054", "0.5726381", "0.5719423", "0.57162696", "0.5707927", "0.56972736", "0.56808627", "0.5680543", "0.56676567", "0.56591046", "0.5648704", "0.5636353", "0.5624715", "0.56225455", "0.561925", "0.5615119", "0.5596499", "0.5594058", "0.5592196", "0.5580214", "0.5562768", "0.5561599", "0.55608314", "0.55580914", "0.5557223", "0.5554435", "0.5553682", "0.5546918", "0.55462855", "0.55386543", "0.5533324", "0.5525927", "0.55235225", "0.55168736", "0.5512997", "0.550519", "0.5500638", "0.54958946", "0.54926395", "0.54898417", "0.5482528", "0.5477594", "0.5474427", "0.5470733", "0.54642445", "0.54577196", "0.5457327", "0.5457219", "0.54558116", "0.54532385", "0.5439319", "0.5430599", "0.5425776", "0.5421072", "0.54146224", "0.5410154", "0.54046977", "0.5402707", "0.53947586", "0.53883785", "0.53814566", "0.5380004", "0.53762966", "0.53752416" ]
0.769896
0
Tests if tank inside left margin
@Test public void testTOutOfBoundsLeftMargin2() { tank.setX(180); assertEquals(false, tank.isWithinMarginsLeft()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTOutOfBoundsLeftMargin1() {\n\t\ttank.setX(100);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}", "public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }", "@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public boolean isLeftFromTop(int cannonCoordinatesX) {\n if (cannonCoordinatesX <= END_X[0]) {\n return false;\n }\n return cannonCoordinatesX <= TOP_X[1];\n }", "public boolean lastHitLeft()\n\t{\n\t\treturn lastBorderHit[0];\n\t}", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "private boolean checkLeftSpace(Position p, int len,\n int leftWid, int rightWid) {\n\n int x = p.x;\n int y = p.y;\n for (int i = x; i > x - len; i -= 1) {\n for (int j = y - leftWid; j < y + rightWid + 1; j += 1) {\n if (i < 0) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "public void checkLeftCollision(FloatRect x){\r\n if((int)rect1.left < x.left ) {\r\n centerX -= 6;\r\n }\r\n }", "boolean hasPositionX();", "boolean hasPositionX();", "boolean hasPositionX();", "public void checkLeftAndRightXs() {\r\n this.leftX = (int) this.enemies.get(0).getCollisionRectangle().getBoundaries().getLeftX();\r\n this.rightX = (int) (this.enemies.get(0).getCollisionRectangle().getBoundaries().getRightX());\r\n for (Enemy e : enemies) {\r\n if (e.getCollisionRectangle().getBoundaries().getLeftX() < this.leftX) {\r\n this.leftX = (int) e.getCollisionRectangle().getBoundaries().getLeftX();\r\n }\r\n if (e.getCollisionRectangle().getBoundaries().getRightX() > this.rightX) {\r\n this.rightX = (int) e.getCollisionRectangle().getBoundaries().getRightX();\r\n }\r\n }\r\n }", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "void hasLeft();", "@Test\n\tpublic void testTCannotMoveLeft() {\n\t\ttank.InabilityToMoveLeft();\n\t\tassertEquals(false, tank.getLeft());\n\t}", "private boolean hasLeftChild(int index) {\n return leftChild(index) <= size;\n }", "private boolean leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\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 }", "private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public boolean left() {\r\n if( col <= 0 ) return false;\r\n --col;\r\n return true;\r\n }", "private boolean canMoveLeft()\n {\n // runs through board row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = 1; column < grid[row].length; column++ ) {\n\n // looks at tile directly to the left of the current tile\n int compare = column-1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true;\n }\n }\n }\n } \n return false;\n }", "public Boolean isHorizontal() {\n return this == EAST || this == WEST;\n }", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "public boolean checkLessThanMaxX() {\n return (currX + getXMargin) <= getMaxX;\n }", "@Test\n\tpublic void testTLeft1() {\n\t\ttank.InabilityToMoveLeft();\n\t\ttank.goLeft();\n\t\tassertEquals(0, tank.getX());\n\t}", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "private boolean hasLeftChild(int i) {\n return leftIndex(i) <= size;\n }", "private int leftChild(int pos)\n {\n return (2 * pos);\n }", "public int getLeftX() {\n\t\treturn 0;\r\n\t}", "private int left(int row, int column, char check, char[][] leftBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 0 || traversedPoints.contains(new Point(column - 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (leftBoard[column - 1][row] != ' ' && leftBoard[column - 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column - 1;\n\t}", "public boolean isHorizontal() {\n\t\treturn ( getSlope() == 0.0d );\n\t}", "private int leftChild ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "boolean hasScrollOffsetX();", "public boolean isHorizontal(){\n return head().getY() == tail().getY();\n }", "public boolean moveLeft() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnLeft() && !mouseOnLeft()) {\r\n\t\t\tif (!onLeftBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX - 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveRight();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public int getXLeft() {\n return xLeft;\n }", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}", "public abstract boolean hasLeftChild(Position<E> p);", "private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }", "private boolean horizontalCrash(@NotNull Wall wallToCheck) {\n ArrayList<Coordinate> wallCoordinates = wallToCheck.getPointsArray();\n return wallCoordinates.get(0).getXCoordinate() <= coordinates.get(1).getXCoordinate() && coordinates.get(0).getXCoordinate() <= wallCoordinates.get(1).getXCoordinate();\n }", "@Test\n public void testGetHorizontalLeftPillar(){\n Pillar cornerPillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,3));\n Pillar neighbor = largeMaze.getHorizontalPillar(cornerPillar, true);\n assertEquals(1, neighbor.getX());\n assertEquals(0, neighbor.getY());\n\n neighbor = largeMaze.getHorizontalPillar(edgePillar, true);\n assertEquals(null, neighbor);\n }", "public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "private static boolean IsAtIndentedParagraphOrBlockUIContainerStart(ITextPointer position)\r\n { \r\n if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position))\r\n {\r\n Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer;\r\n if (paragraphOrBlockUIContainer != null) \r\n {\r\n FlowDirection flowDirection = paragraphOrBlockUIContainer.FlowDirection; \r\n Thickness margin = paragraphOrBlockUIContainer.Margin; \r\n\r\n return \r\n flowDirection == FlowDirection.LeftToRight && margin.Left > 0 ||\r\n flowDirection == FlowDirection.RightToLeft && margin.Right > 0 ||\r\n (paragraphOrBlockUIContainer is Paragraph && ((Paragraph)paragraphOrBlockUIContainer).TextIndent > 0);\r\n } \r\n }\r\n\r\n return false; \r\n }", "public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }", "public int getSafeInsetLeft() {\n if (SDK_INT >= 28) {\n return ((DisplayCutout) mDisplayCutout).getSafeInsetLeft();\n } else {\n return 0;\n }\n }", "protected boolean isLeftChild(BTNode<E> v){\n\t\tif (isRoot(v)) return false;\n\t\treturn (v == (v.parent()).leftChild()); \n\t}", "public boolean tooLeft(AnimationGrass animationGrass) {\n\t\treturn true;\n\t}", "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "public void checkRightCollision(FloatRect x) {\r\n if((int)rect1.left+rect1.width > x.left+x.width ){\r\n centerX+=6;\r\n }\r\n }", "public void checkScreenCollisionLeftRight() {\n if (x <= radius || x >= GameView.width - radius) {\n speedX *= -1;\n if (x < radius) {\n x = (int) radius;\n }\n if (x > GameView.width - radius) {\n x = (int) (GameView.width - radius);\n }\n }\n }", "public boolean isHorizontal(CoordinateImpl coordinate) { return coordinate.rank == rank;}", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "public boolean pageLeft() {\n if (this.mCurItem <= 0) {\n return false;\n }\n setCurrentItem(this.mCurItem - 1, true);\n return true;\n }", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isHorizontal()\r\n\t{\r\n\t\treturn _position==Position.HORIZONTAL;\r\n\t}", "@Test\n\tpublic final void nextPositionLeftTest() {\n\t\tplayer.setLeft(true);\n\t\tplayer.setMovSpeed(3.0);\n\t\tplayer.setMaxSpeed(2.0);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), -2.0, 0.1);\n\t}", "private void m13644b(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13645b(canvas, childAt.getLeft() - ((LayoutParams) childAt.getLayoutParams()).leftMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13645b(canvas, childAt2 == null ? (getWidth() - getPaddingRight()) - this.f9807c : childAt2.getRight());\n }\n }", "private boolean isLeftChild(Node curr) {\n\t\tif(curr.parent.left == curr) {\n return true;\n } else {\n return false;\n }\n\t}", "private boolean seeNextFloorX(Position target) {\n if (target.x == position.x) {\n return false;\n }\n if (target.x > position.x) {\n\n return world[position.x + 1][position.y].equals(Tileset.FLOOR);\n }\n if (target.x < position.x) {\n return world[position.x - 1][position.y].equals(Tileset.FLOOR);\n }\n return false;\n }", "public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}", "public void checkXAxis ()\n {\n if (player.getX() >= 599)\n {\n player.setLocation (0, player.getY());\n }\n else if (player.getX() <= 0)\n {\n player.setLocation (598, player.getY());\n }\n }", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "private int check(int tiles_per_cam_width) {\r\n\t\tif( left_map_scroll >= left_map_width) {\r\n\t\t\ttotal_maps++;\r\n\t\t\tmap[l()].dispose();\r\n\t\t\tleft_map = r();\r\n\t\t\tint random_map = (int)Math.round(2+Math.random()*14);\r\n\t\t\tif( left_map == 1 )\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\telse //for later\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\tint left_map_width_return = left_map_width;\r\n\t left_map_scroll -= left_map_width;\r\n\t\t\tleft_map_width = map[l()].\r\n\t\t\t\t\tgetProperties().get(\"width\", Integer.class);\r\n\t\t\tscrollCam( tiles_per_cam_width );\r\n\t\t\treturn left_map_width_return;\r\n\t\t}\r\n\t\tscrollCam( tiles_per_cam_width );\r\n\t\treturn 0;\r\n\t}", "@Test\n public void testGetDeltaXLEFT()\n {\n assertEquals(Direction.LEFT.getDeltaX(), -1);\n }", "private boolean hasLeftWall(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\treturn !v.mayMove(Direction.WEST);\n\t\tcase SOUTH:\n\t\t\treturn !v.mayMove(Direction.EAST);\n\t\tcase WEST:\n\t\t\treturn !v.mayMove(Direction.SOUTH);\n\t\tcase EAST:\n\t\t\treturn !v.mayMove(Direction.NORTH);\n\t\tdefault: return false;\n\t\t}\n\t}", "public boolean moveLeft() {\n if (position.isLinked(position.getWest())) {\n position.getGameObjects().remove(this.type);\n position = position.getWest();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }", "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}", "public boolean getBorderVisible() {\n checkWidget();\n return borderLeft == 1;\n }", "boolean hasIsMidNode();", "private boolean isBricksLeft(int bricksOnStage) {\n return bricksOnStage == 0;\n }", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public boolean isPointOnTheLeft(Point2d point){\n return direction.y*(point.x-this.point.x)-direction.x*(point.y-this.point.y) < 0;\n }", "public boolean isHorizontalMode() throws PDFNetException {\n/* 627 */ return IsHorizontalMode(this.a);\n/* */ }", "@Test\n\tpublic void testTLeft2() {\n\t\ttank.AbilityToMoveLeft();\n\t\ttank.goLeft();\n\t\tassertEquals(-1, tank.getX());\n\t}", "@Test\n\tpublic void testTCanMoveLeft() {\n\t\ttank.AbilityToMoveLeft();\n\t\tassertEquals(true, tank.getLeft());\n\t}", "public boolean hasLeftChild() {\n\t\treturn leftChild != null;\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "boolean isLeftCollision(Actor actor) {\n return this.getX() - 1 == actor.getX() && this.getY() == actor.getY();\n }", "public boolean checkX1()\n {\n if((this.getX()<5)) {\n return true;\n }\n else\n return false;\n\n }", "private int findTreeNodeLeftBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeLeftBoundary(((DiscourseRelation) node).getArg1());\n }\n\n // it's EDU\n return node.getBegin();\n }", "public boolean LeftIntersects(BoundingBox other) {\r\n\t\treturn ((Math.abs(other.getRight() - left) < SMALL_NUMBER)\r\n\t\t\t\t&& (other.getTop() == top));\r\n\t}", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "private void checkScrollFocusLeft(){\n\t\tfinal View focused = getFocusedChild();\n\t\tif(getChildCount() >= 2 ){\n\t\t\tView second = getChildAt(1);\n\t\t\tView first = getChildAt(0);\n\t\t\t\n\t\t\tif(focused == second){\n\t\t\t\tscroll(-first.getWidth());\n\t\t\t}\n\t\t}\t\t\t\n\t}", "private void checkLeftWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() <= 0) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t\t\n\t\t\tInvader.setDirectionRight(true);\n\t\t}\n\t}", "public void setXLeft(int left) {\n this.xLeft = left;\n }", "public boolean isLeft(char dirFacing, Location next)\n\t{\n\t\tLocation left = getLeft(dirFacing);\n\t\treturn left.getX() == next.x && left.getY() == next.y;\n\t}", "private boolean slideLeft()\n {\n if (blankCol == SIZE - 1) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol + 1];\n board[blankRow][blankCol + 1] = 0;\n blankCol += 1;\n return true;\n }" ]
[ "0.769896", "0.7553397", "0.69743496", "0.69032145", "0.6686465", "0.6499331", "0.64798594", "0.64538324", "0.63277924", "0.62991834", "0.62448573", "0.62082", "0.61833304", "0.61604565", "0.61527526", "0.6132344", "0.60715574", "0.60715574", "0.60715574", "0.60289276", "0.60072285", "0.59663635", "0.59609306", "0.59449196", "0.588824", "0.58736277", "0.5862416", "0.58482563", "0.5843048", "0.58397937", "0.5837838", "0.58342284", "0.5824123", "0.58170944", "0.5815813", "0.5814917", "0.57699054", "0.5726381", "0.5719423", "0.57162696", "0.5707927", "0.56972736", "0.56808627", "0.5680543", "0.56676567", "0.56591046", "0.5648704", "0.5636353", "0.5624715", "0.56225455", "0.561925", "0.5615119", "0.5596499", "0.5594058", "0.5592196", "0.5580214", "0.5562768", "0.5561599", "0.55608314", "0.55580914", "0.5557223", "0.5554435", "0.5553682", "0.5546918", "0.55462855", "0.55386543", "0.5533324", "0.5525927", "0.55235225", "0.55168736", "0.5512997", "0.550519", "0.5500638", "0.54958946", "0.54926395", "0.54898417", "0.5482528", "0.5477594", "0.5474427", "0.5470733", "0.54642445", "0.54577196", "0.5457327", "0.5457219", "0.54558116", "0.54532385", "0.5439319", "0.5430599", "0.5425776", "0.5421072", "0.54146224", "0.5410154", "0.54046977", "0.5402707", "0.53947586", "0.53883785", "0.53814566", "0.5380004", "0.53762966", "0.53752416" ]
0.767197
1
Tests if tank inside left margin
@Test public void testTOutOfBoundsLeftMargin3() { tank.setX(182); assertEquals(true, tank.isWithinMarginsLeft()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTOutOfBoundsLeftMargin1() {\n\t\ttank.setX(100);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsLeftMargin2() {\n\t\ttank.setX(180);\n\t\tassertEquals(false, tank.isWithinMarginsLeft());\n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin1() {\n\t\ttank.setX(550);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "@Test\n\tpublic void testTOutOfBoundsRightMargin3() {\n\t\ttank.setX(300);\n\t\tassertEquals(true, tank.isWithinMarginsRight());\n\t}", "public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }", "@Test\n\tpublic void testTOutOfBoundsRightMargin2() {\n\t\ttank.setX(460);\n\t\tassertEquals(false, tank.isWithinMarginsRight());\n\t}", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public boolean isLeftFromTop(int cannonCoordinatesX) {\n if (cannonCoordinatesX <= END_X[0]) {\n return false;\n }\n return cannonCoordinatesX <= TOP_X[1];\n }", "public boolean lastHitLeft()\n\t{\n\t\treturn lastBorderHit[0];\n\t}", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "private boolean checkLeftSpace(Position p, int len,\n int leftWid, int rightWid) {\n\n int x = p.x;\n int y = p.y;\n for (int i = x; i > x - len; i -= 1) {\n for (int j = y - leftWid; j < y + rightWid + 1; j += 1) {\n if (i < 0) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "public void checkLeftCollision(FloatRect x){\r\n if((int)rect1.left < x.left ) {\r\n centerX -= 6;\r\n }\r\n }", "boolean hasPositionX();", "boolean hasPositionX();", "boolean hasPositionX();", "public void checkLeftAndRightXs() {\r\n this.leftX = (int) this.enemies.get(0).getCollisionRectangle().getBoundaries().getLeftX();\r\n this.rightX = (int) (this.enemies.get(0).getCollisionRectangle().getBoundaries().getRightX());\r\n for (Enemy e : enemies) {\r\n if (e.getCollisionRectangle().getBoundaries().getLeftX() < this.leftX) {\r\n this.leftX = (int) e.getCollisionRectangle().getBoundaries().getLeftX();\r\n }\r\n if (e.getCollisionRectangle().getBoundaries().getRightX() > this.rightX) {\r\n this.rightX = (int) e.getCollisionRectangle().getBoundaries().getRightX();\r\n }\r\n }\r\n }", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "void hasLeft();", "@Test\n\tpublic void testTCannotMoveLeft() {\n\t\ttank.InabilityToMoveLeft();\n\t\tassertEquals(false, tank.getLeft());\n\t}", "private boolean hasLeftChild(int index) {\n return leftChild(index) <= size;\n }", "private boolean leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\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 }", "private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public boolean left() {\r\n if( col <= 0 ) return false;\r\n --col;\r\n return true;\r\n }", "private boolean canMoveLeft()\n {\n // runs through board row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = 1; column < grid[row].length; column++ ) {\n\n // looks at tile directly to the left of the current tile\n int compare = column-1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true;\n }\n }\n }\n } \n return false;\n }", "public Boolean isHorizontal() {\n return this == EAST || this == WEST;\n }", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "public boolean checkLessThanMaxX() {\n return (currX + getXMargin) <= getMaxX;\n }", "@Test\n\tpublic void testTLeft1() {\n\t\ttank.InabilityToMoveLeft();\n\t\ttank.goLeft();\n\t\tassertEquals(0, tank.getX());\n\t}", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "private boolean hasLeftChild(int i) {\n return leftIndex(i) <= size;\n }", "private int leftChild(int pos)\n {\n return (2 * pos);\n }", "public int getLeftX() {\n\t\treturn 0;\r\n\t}", "private int left(int row, int column, char check, char[][] leftBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 0 || traversedPoints.contains(new Point(column - 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (leftBoard[column - 1][row] != ' ' && leftBoard[column - 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column - 1;\n\t}", "public boolean isHorizontal() {\n\t\treturn ( getSlope() == 0.0d );\n\t}", "private int leftChild ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "boolean hasScrollOffsetX();", "public boolean isHorizontal(){\n return head().getY() == tail().getY();\n }", "public boolean moveLeft() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnLeft() && !mouseOnLeft()) {\r\n\t\t\tif (!onLeftBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX - 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveRight();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public int getXLeft() {\n return xLeft;\n }", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}", "private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }", "public abstract boolean hasLeftChild(Position<E> p);", "private boolean horizontalCrash(@NotNull Wall wallToCheck) {\n ArrayList<Coordinate> wallCoordinates = wallToCheck.getPointsArray();\n return wallCoordinates.get(0).getXCoordinate() <= coordinates.get(1).getXCoordinate() && coordinates.get(0).getXCoordinate() <= wallCoordinates.get(1).getXCoordinate();\n }", "@Test\n public void testGetHorizontalLeftPillar(){\n Pillar cornerPillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,3));\n Pillar neighbor = largeMaze.getHorizontalPillar(cornerPillar, true);\n assertEquals(1, neighbor.getX());\n assertEquals(0, neighbor.getY());\n\n neighbor = largeMaze.getHorizontalPillar(edgePillar, true);\n assertEquals(null, neighbor);\n }", "public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "private static boolean IsAtIndentedParagraphOrBlockUIContainerStart(ITextPointer position)\r\n { \r\n if ((position is TextPointer) && TextPointerBase.IsAtParagraphOrBlockUIContainerStart(position))\r\n {\r\n Block paragraphOrBlockUIContainer = ((TextPointer)position).ParagraphOrBlockUIContainer;\r\n if (paragraphOrBlockUIContainer != null) \r\n {\r\n FlowDirection flowDirection = paragraphOrBlockUIContainer.FlowDirection; \r\n Thickness margin = paragraphOrBlockUIContainer.Margin; \r\n\r\n return \r\n flowDirection == FlowDirection.LeftToRight && margin.Left > 0 ||\r\n flowDirection == FlowDirection.RightToLeft && margin.Right > 0 ||\r\n (paragraphOrBlockUIContainer is Paragraph && ((Paragraph)paragraphOrBlockUIContainer).TextIndent > 0);\r\n } \r\n }\r\n\r\n return false; \r\n }", "public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }", "protected boolean isLeftChild(BTNode<E> v){\n\t\tif (isRoot(v)) return false;\n\t\treturn (v == (v.parent()).leftChild()); \n\t}", "public int getSafeInsetLeft() {\n if (SDK_INT >= 28) {\n return ((DisplayCutout) mDisplayCutout).getSafeInsetLeft();\n } else {\n return 0;\n }\n }", "public boolean tooLeft(AnimationGrass animationGrass) {\n\t\treturn true;\n\t}", "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "public void checkRightCollision(FloatRect x) {\r\n if((int)rect1.left+rect1.width > x.left+x.width ){\r\n centerX+=6;\r\n }\r\n }", "public void checkScreenCollisionLeftRight() {\n if (x <= radius || x >= GameView.width - radius) {\n speedX *= -1;\n if (x < radius) {\n x = (int) radius;\n }\n if (x > GameView.width - radius) {\n x = (int) (GameView.width - radius);\n }\n }\n }", "public boolean isHorizontal(CoordinateImpl coordinate) { return coordinate.rank == rank;}", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "public boolean pageLeft() {\n if (this.mCurItem <= 0) {\n return false;\n }\n setCurrentItem(this.mCurItem - 1, true);\n return true;\n }", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isHorizontal()\r\n\t{\r\n\t\treturn _position==Position.HORIZONTAL;\r\n\t}", "@Test\n\tpublic final void nextPositionLeftTest() {\n\t\tplayer.setLeft(true);\n\t\tplayer.setMovSpeed(3.0);\n\t\tplayer.setMaxSpeed(2.0);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), -2.0, 0.1);\n\t}", "private void m13644b(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13645b(canvas, childAt.getLeft() - ((LayoutParams) childAt.getLayoutParams()).leftMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13645b(canvas, childAt2 == null ? (getWidth() - getPaddingRight()) - this.f9807c : childAt2.getRight());\n }\n }", "private boolean isLeftChild(Node curr) {\n\t\tif(curr.parent.left == curr) {\n return true;\n } else {\n return false;\n }\n\t}", "private boolean seeNextFloorX(Position target) {\n if (target.x == position.x) {\n return false;\n }\n if (target.x > position.x) {\n\n return world[position.x + 1][position.y].equals(Tileset.FLOOR);\n }\n if (target.x < position.x) {\n return world[position.x - 1][position.y].equals(Tileset.FLOOR);\n }\n return false;\n }", "public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}", "public void checkXAxis ()\n {\n if (player.getX() >= 599)\n {\n player.setLocation (0, player.getY());\n }\n else if (player.getX() <= 0)\n {\n player.setLocation (598, player.getY());\n }\n }", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "private int check(int tiles_per_cam_width) {\r\n\t\tif( left_map_scroll >= left_map_width) {\r\n\t\t\ttotal_maps++;\r\n\t\t\tmap[l()].dispose();\r\n\t\t\tleft_map = r();\r\n\t\t\tint random_map = (int)Math.round(2+Math.random()*14);\r\n\t\t\tif( left_map == 1 )\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\telse //for later\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\tint left_map_width_return = left_map_width;\r\n\t left_map_scroll -= left_map_width;\r\n\t\t\tleft_map_width = map[l()].\r\n\t\t\t\t\tgetProperties().get(\"width\", Integer.class);\r\n\t\t\tscrollCam( tiles_per_cam_width );\r\n\t\t\treturn left_map_width_return;\r\n\t\t}\r\n\t\tscrollCam( tiles_per_cam_width );\r\n\t\treturn 0;\r\n\t}", "@Test\n public void testGetDeltaXLEFT()\n {\n assertEquals(Direction.LEFT.getDeltaX(), -1);\n }", "private boolean hasLeftWall(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\treturn !v.mayMove(Direction.WEST);\n\t\tcase SOUTH:\n\t\t\treturn !v.mayMove(Direction.EAST);\n\t\tcase WEST:\n\t\t\treturn !v.mayMove(Direction.SOUTH);\n\t\tcase EAST:\n\t\t\treturn !v.mayMove(Direction.NORTH);\n\t\tdefault: return false;\n\t\t}\n\t}", "public boolean moveLeft() {\n if (position.isLinked(position.getWest())) {\n position.getGameObjects().remove(this.type);\n position = position.getWest();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }", "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}", "public boolean getBorderVisible() {\n checkWidget();\n return borderLeft == 1;\n }", "private boolean isBricksLeft(int bricksOnStage) {\n return bricksOnStage == 0;\n }", "boolean hasIsMidNode();", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public boolean isPointOnTheLeft(Point2d point){\n return direction.y*(point.x-this.point.x)-direction.x*(point.y-this.point.y) < 0;\n }", "public boolean isHorizontalMode() throws PDFNetException {\n/* 627 */ return IsHorizontalMode(this.a);\n/* */ }", "@Test\n\tpublic void testTLeft2() {\n\t\ttank.AbilityToMoveLeft();\n\t\ttank.goLeft();\n\t\tassertEquals(-1, tank.getX());\n\t}", "@Test\n\tpublic void testTCanMoveLeft() {\n\t\ttank.AbilityToMoveLeft();\n\t\tassertEquals(true, tank.getLeft());\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean hasLeftChild() {\n\t\treturn leftChild != null;\n\t}", "boolean isLeftCollision(Actor actor) {\n return this.getX() - 1 == actor.getX() && this.getY() == actor.getY();\n }", "public boolean checkX1()\n {\n if((this.getX()<5)) {\n return true;\n }\n else\n return false;\n\n }", "private int findTreeNodeLeftBoundary(RSTTreeNode node)\n {\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n return findTreeNodeLeftBoundary(((DiscourseRelation) node).getArg1());\n }\n\n // it's EDU\n return node.getBegin();\n }", "public boolean LeftIntersects(BoundingBox other) {\r\n\t\treturn ((Math.abs(other.getRight() - left) < SMALL_NUMBER)\r\n\t\t\t\t&& (other.getTop() == top));\r\n\t}", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "private void checkScrollFocusLeft(){\n\t\tfinal View focused = getFocusedChild();\n\t\tif(getChildCount() >= 2 ){\n\t\t\tView second = getChildAt(1);\n\t\t\tView first = getChildAt(0);\n\t\t\t\n\t\t\tif(focused == second){\n\t\t\t\tscroll(-first.getWidth());\n\t\t\t}\n\t\t}\t\t\t\n\t}", "private void checkLeftWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() <= 0) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t\t\n\t\t\tInvader.setDirectionRight(true);\n\t\t}\n\t}", "public void setXLeft(int left) {\n this.xLeft = left;\n }", "public boolean isLeft(char dirFacing, Location next)\n\t{\n\t\tLocation left = getLeft(dirFacing);\n\t\treturn left.getX() == next.x && left.getY() == next.y;\n\t}", "private boolean slideLeft()\n {\n if (blankCol == SIZE - 1) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol + 1];\n board[blankRow][blankCol + 1] = 0;\n blankCol += 1;\n return true;\n }" ]
[ "0.76981854", "0.7671392", "0.69743484", "0.69032764", "0.6686055", "0.6500115", "0.64798695", "0.645369", "0.6327983", "0.6300017", "0.62441736", "0.62090486", "0.6183458", "0.6162373", "0.61525136", "0.6131954", "0.60719055", "0.60719055", "0.60719055", "0.6029547", "0.6007664", "0.5966613", "0.59630585", "0.5944299", "0.5889144", "0.58722883", "0.5863768", "0.5847804", "0.5844548", "0.58419245", "0.58374625", "0.5835233", "0.58256495", "0.5818894", "0.5814549", "0.581389", "0.57688034", "0.5725754", "0.57212245", "0.57146907", "0.57086587", "0.5698744", "0.5680209", "0.56795573", "0.5670484", "0.5661686", "0.56473356", "0.5635397", "0.56251955", "0.56234515", "0.56213653", "0.56165165", "0.55962455", "0.55953854", "0.559048", "0.55789393", "0.5561145", "0.55609065", "0.5560849", "0.55595285", "0.55566037", "0.5554473", "0.5554427", "0.55493265", "0.5545025", "0.55373424", "0.5532219", "0.55268323", "0.55229264", "0.5516997", "0.5512274", "0.55079603", "0.5500417", "0.54976594", "0.5495515", "0.5490759", "0.54830664", "0.54783344", "0.54739183", "0.54719067", "0.5464376", "0.54587007", "0.54586494", "0.54575294", "0.5456108", "0.5454604", "0.5440958", "0.5433006", "0.5424902", "0.54244316", "0.54151565", "0.5412846", "0.5403682", "0.54027355", "0.53939384", "0.538742", "0.5382054", "0.5379173", "0.5376129", "0.5374366" ]
0.7552547
2
Tests tank's ability to increase health (extension task)
@Test public void testTHealthIncrease1() { tank.damage(proj); tank.increaseHealth(); assertEquals(3, tank.getHealth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testTankSetHealth() {\n tank.setHealth(5);\n assertTrue(tank.getHealth() == 5);\n }", "@Test\n\tpublic void testHealthIncrease2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void testHealthy() {\n checker.checkHealth();\n\n assertThat(checker.isHealthy(), is(true));\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "public abstract void incrementHealth(int hp);", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "@Test\n public void lowHealthWarningTest() {\n }", "public int getHealthGain();", "@Test\n\tpublic void testTInvader3() {\n\t\ttank.damage(proj);\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTInvader1() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(0, tank.getHealth());\n\t}", "int getHealth();", "@Test\n\tpublic void testTInvader2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(1, tank.getHealth());\n\t}", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "public int getHealth();", "public abstract void setHealth(int health);", "@Test\n public void enemySustainMassiveDamage() {\n }", "@Test\n public void ifMyPetIsDrinkingIncreaseInitialValueBy() {\n underTest.tick(1);\n int actualThirstLevel = underTest.getThirstLevel();\n assertThat(actualThirstLevel, is(5));\n\n\n }", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "@Test\n\tpublic void testHarvestWheat1() throws GameControlException {\n\t\tint result = GameControl.harvestWheat(900, 15, 1, 2, 4);\n\t\tassertEquals(3600, result);\n\t}", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "@Test\n public void sustainMassiveDamage() {\n }", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public void reduceHealth() {\n\t}", "@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}", "public void setHealth(int health) {\n this.health = health;\n }", "@Test\n\tpublic void testGetHealth() {\n\t\tassertEquals(alive.getHealth(), PeaShooter.INITIAL_HEALTH);\n\t\t\n\t\t// Test for broken code\n\t\tassertNotEquals(alive.getHealth(), -1);\n\t}", "void gainHealth(int points) {\n this.health += points;\n }", "public void testWatcherUsageStatsTests() {\n long watchCount = randomLongBetween(5, 20);\n for (int i = 0; i < watchCount; i++) {\n watcherClient().preparePutWatch(\"_id\" + i).setSource(watchBuilder()\n .trigger(schedule(cron(\"0/5 * * * * ? 2050\")))\n .input(simpleInput())\n .addAction(\"_id\", loggingAction(\"whatever \" + i)))\n .get();\n }\n\n XPackUsageRequest request = new XPackUsageRequest();\n XPackUsageResponse usageResponse = client().execute(XPackUsageAction.INSTANCE, request).actionGet();\n Optional<XPackFeatureSet.Usage> usage = usageResponse.getUsages().stream()\n .filter(u -> u instanceof WatcherFeatureSetUsage)\n .findFirst();\n assertThat(usage.isPresent(), is(true));\n WatcherFeatureSetUsage featureSetUsage = (WatcherFeatureSetUsage) usage.get();\n\n long activeWatchCount = (long) ((Map) featureSetUsage.stats().get(\"count\")).get(\"active\");\n assertThat(activeWatchCount, is(watchCount));\n }", "@Test\n public void testTankIsDead() {\n tank.hit();\n tank.hit();\n tank.hit();\n assertTrue(tank.isDead());\n\n // health of the tank is different - 1 | edge case\n Tank tank2 = new Tank(\n null, 320, 450, 22, 16, new int[]{1,0}, 1);\n tank2.hit();\n tank2.hit();\n tank2.hit();\n tank2.hit();\n\n assertTrue(tank2.isDead());\n }", "@Test\n public void testTurnHeaterOnPCT() {\n settings.setSetting(Period.MORNING, DayType.WEEKDAY, 69); \n thermo.setPeriod(Period.MORNING);\n thermo.setDay(DayType.WEEKDAY);\n thermo.setCurrentTemp(63); // clause a\n thermo.setThresholdDiff(5); // clause a\n thermo.setOverride(true); // clause b\n thermo.setOverTemp(70); // clause c\n thermo.setMinLag(10); // clause d\n thermo.setTimeSinceLastRun(12); // clause d\n assertTrue (thermo.turnHeaterOn(settings)); \n }", "@Test\n public void testTankFire() {\n assertNotNull(tank.fire());\n }", "@Test\n\tpublic void testWheatOfferings1() throws GameControlException {\n\t\tint result = GameControl.wheatOfferings(10, 2000);\n\t\tassertEquals(200, result);\n\t}", "public Integer getHealth();", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "@Test\n\tpublic void testTAlive3() {\n\t\tassertEquals(false, (tank.getHealth() == 0));\n\t}", "public void setHealth(double Health){\r\n health = Health;\r\n }", "int getHealth() {\n return health;\n }", "@Test\n public void testGetHealth() {\n \n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void setHealth(double h){\n health = h;\n }", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "@Test\n public void ifMyPetIsEatingIncreaseInitialValueBy2() {\n underTest.tick(1);\n int actualHungerLevel = underTest.getHungerLevel();\n // Assert\n assertThat(actualHungerLevel, is(7));\n }", "public int getHealth() { return this.health; }", "public int getHealthCost();", "@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "protected void onGetMeasuredAmountOfWaterRemainingInTank(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "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 }", "void doCheckHealthy();", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "float getPercentHealth();", "@Override\n public int maxHealth() {\n return 25;\n }", "private void takeDamage(int damage){ health -= damage;}", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "public int getHealth()\r\n {\r\n return health;\r\n }", "@Test\n public void isMyPetSleepy() {\n int isSleepy = underTest.getSleepLevel();\n // Assert\n assertThat(isSleepy, is(8));\n }", "@Test\n public void canUseSpecialPowerTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n workerHephaestus.build(nextWorkerCell);\n assertTrue(workerHephaestus.canUseSpecialPower());\n }", "public boolean health(){\n return health;\n }", "public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}", "@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }", "boolean getHealthy();", "private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public void addHealth(int add) {\n\t\tthis.health += add;\n\t\tif (this.health < 0)\n\t\t\tthis.health = 0;\n\t}", "@Test\n public void ifMyPetIsPlayingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(3));\n }", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "public int getHealth()\r\n {\r\n return this.health;\r\n }", "public interface CheckSystemHealthUseCase extends UseCase {\n void execute(final Callback callback, boolean showLoader);\n\n interface Callback {\n void onError(AppErrors error);\n\n\n void onSystemHealth(SystemHealth health);\n }\n}", "@Test\n public void ifMyPetIsSleepingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(10));\n }", "@Test\n public void testAttack() {\n enemy.attack(1, enemy);\n assertEquals(enemy.getHealth(), 90);\n \n hero.attack(2, hero);\n assertEquals(hero.getHealth(), 85);\n \n \n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void setHealth(int h) {\n setStat(h, health);\n }", "@Test\n\tpublic void testTAlive5() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "public int getHealth() {\n return getStat(health);\n }", "@Test\n public void RobotHitByDoubleLaserShouldTake2InDamage() {\n\n int damage = 2;\n\n //health before laser firing\n int healthRobotBeforeHit = robot4.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot4.getRobotHealthPoint();\n\n //should evaluate to true\n assertEquals(healthRobotBeforeHit, healthRobotAfterHit+damage);\n\n }", "void setHappiness(int happiness);", "@Test\n\tpublic void testPlayerHPwithTree() {\n\tEngine engine = new Engine(20);\n\t\tint shouldHit = 1;\n\t\tfor (int i = 0; i < 3; i++ ) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - player's hp is not functioning properly\", shouldHit, engine.getMoveableObject(0).getHP(), 0.0);\t\n\t}", "private void checkForInstability(boolean overshoot) { \n if (overshoot == true) {\n setUnstable();\n } else {\n setStable();\n }\n }", "public int getHealth(){\n return health;\n }", "public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}", "public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }", "public int getHealth() {\n return this.health;\n }", "@Test\n public void testSetHealth() {\n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}", "public void upgrade(){\n\n //upgrade stats\n this.setLevel(this.getLevel() + 1);\n this.setMaxHealth(this.getMaxHealth() + 500);\n this.setHealth(this.getHealth() + 500);\n this.maxCapacity += 20;\n\n }", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "@Override\r\npublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\r\n}", "public int getHealth() {\n \t\treturn health;\n \t}", "@Override\r\n\tpublic int getHealth() {\n\t\treturn health;\r\n\t}", "@Override\npublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\n}", "public int getHealth() {\r\n\t\treturn health;\r\n\t}", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}" ]
[ "0.705985", "0.7020743", "0.6996014", "0.6865186", "0.643447", "0.64295954", "0.64269155", "0.63915807", "0.6386871", "0.6298243", "0.62975734", "0.6294371", "0.6293469", "0.624073", "0.6227937", "0.62158394", "0.6202069", "0.618042", "0.6164214", "0.6148082", "0.61393535", "0.61142474", "0.608133", "0.60585", "0.60211205", "0.6013147", "0.60021555", "0.59939754", "0.5985288", "0.5981212", "0.59702", "0.59637403", "0.5919886", "0.5917629", "0.59012496", "0.58998185", "0.58935064", "0.5861787", "0.5857405", "0.58563554", "0.58490044", "0.5848916", "0.58443475", "0.58420104", "0.58349276", "0.5826213", "0.58157545", "0.5815047", "0.5797379", "0.57766324", "0.57607114", "0.5756318", "0.5755069", "0.57484794", "0.5744807", "0.5743658", "0.5740509", "0.5738315", "0.572585", "0.57226074", "0.5711468", "0.57080626", "0.57033265", "0.56835335", "0.5656696", "0.5650452", "0.5647958", "0.5633067", "0.56245667", "0.5614262", "0.56132424", "0.56068856", "0.5600981", "0.55972373", "0.55952483", "0.559214", "0.55898994", "0.55723196", "0.5572104", "0.5572018", "0.5570583", "0.55593354", "0.5556272", "0.5549135", "0.55421257", "0.5535096", "0.5534946", "0.5534691", "0.5528699", "0.5525455", "0.5519279", "0.5512083", "0.55029005", "0.55027956", "0.5496485", "0.549582", "0.54894483", "0.5480914", "0.54746455", "0.5474554" ]
0.68948925
3
Tests tank's ability to increase health (extension task)
@Test public void testHealthIncrease2() { tank.damage(proj); tank.damage(proj); tank.increaseHealth(); assertEquals(2, tank.getHealth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testTankSetHealth() {\n tank.setHealth(5);\n assertTrue(tank.getHealth() == 5);\n }", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void testHealthy() {\n checker.checkHealth();\n\n assertThat(checker.isHealthy(), is(true));\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "public abstract void incrementHealth(int hp);", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "@Test\n public void lowHealthWarningTest() {\n }", "public int getHealthGain();", "@Test\n\tpublic void testTInvader3() {\n\t\ttank.damage(proj);\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTInvader1() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(0, tank.getHealth());\n\t}", "int getHealth();", "@Test\n\tpublic void testTInvader2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(1, tank.getHealth());\n\t}", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "public int getHealth();", "public abstract void setHealth(int health);", "@Test\n public void enemySustainMassiveDamage() {\n }", "@Test\n public void ifMyPetIsDrinkingIncreaseInitialValueBy() {\n underTest.tick(1);\n int actualThirstLevel = underTest.getThirstLevel();\n assertThat(actualThirstLevel, is(5));\n\n\n }", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "@Test\n\tpublic void testHarvestWheat1() throws GameControlException {\n\t\tint result = GameControl.harvestWheat(900, 15, 1, 2, 4);\n\t\tassertEquals(3600, result);\n\t}", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "@Test\n public void sustainMassiveDamage() {\n }", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public void reduceHealth() {\n\t}", "@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}", "public void setHealth(int health) {\n this.health = health;\n }", "@Test\n\tpublic void testGetHealth() {\n\t\tassertEquals(alive.getHealth(), PeaShooter.INITIAL_HEALTH);\n\t\t\n\t\t// Test for broken code\n\t\tassertNotEquals(alive.getHealth(), -1);\n\t}", "void gainHealth(int points) {\n this.health += points;\n }", "public void testWatcherUsageStatsTests() {\n long watchCount = randomLongBetween(5, 20);\n for (int i = 0; i < watchCount; i++) {\n watcherClient().preparePutWatch(\"_id\" + i).setSource(watchBuilder()\n .trigger(schedule(cron(\"0/5 * * * * ? 2050\")))\n .input(simpleInput())\n .addAction(\"_id\", loggingAction(\"whatever \" + i)))\n .get();\n }\n\n XPackUsageRequest request = new XPackUsageRequest();\n XPackUsageResponse usageResponse = client().execute(XPackUsageAction.INSTANCE, request).actionGet();\n Optional<XPackFeatureSet.Usage> usage = usageResponse.getUsages().stream()\n .filter(u -> u instanceof WatcherFeatureSetUsage)\n .findFirst();\n assertThat(usage.isPresent(), is(true));\n WatcherFeatureSetUsage featureSetUsage = (WatcherFeatureSetUsage) usage.get();\n\n long activeWatchCount = (long) ((Map) featureSetUsage.stats().get(\"count\")).get(\"active\");\n assertThat(activeWatchCount, is(watchCount));\n }", "@Test\n public void testTankIsDead() {\n tank.hit();\n tank.hit();\n tank.hit();\n assertTrue(tank.isDead());\n\n // health of the tank is different - 1 | edge case\n Tank tank2 = new Tank(\n null, 320, 450, 22, 16, new int[]{1,0}, 1);\n tank2.hit();\n tank2.hit();\n tank2.hit();\n tank2.hit();\n\n assertTrue(tank2.isDead());\n }", "@Test\n public void testTurnHeaterOnPCT() {\n settings.setSetting(Period.MORNING, DayType.WEEKDAY, 69); \n thermo.setPeriod(Period.MORNING);\n thermo.setDay(DayType.WEEKDAY);\n thermo.setCurrentTemp(63); // clause a\n thermo.setThresholdDiff(5); // clause a\n thermo.setOverride(true); // clause b\n thermo.setOverTemp(70); // clause c\n thermo.setMinLag(10); // clause d\n thermo.setTimeSinceLastRun(12); // clause d\n assertTrue (thermo.turnHeaterOn(settings)); \n }", "@Test\n public void testTankFire() {\n assertNotNull(tank.fire());\n }", "@Test\n\tpublic void testWheatOfferings1() throws GameControlException {\n\t\tint result = GameControl.wheatOfferings(10, 2000);\n\t\tassertEquals(200, result);\n\t}", "public Integer getHealth();", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "@Test\n\tpublic void testTAlive3() {\n\t\tassertEquals(false, (tank.getHealth() == 0));\n\t}", "public void setHealth(double Health){\r\n health = Health;\r\n }", "int getHealth() {\n return health;\n }", "@Test\n public void testGetHealth() {\n \n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void setHealth(double h){\n health = h;\n }", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "@Test\n public void ifMyPetIsEatingIncreaseInitialValueBy2() {\n underTest.tick(1);\n int actualHungerLevel = underTest.getHungerLevel();\n // Assert\n assertThat(actualHungerLevel, is(7));\n }", "public int getHealth() { return this.health; }", "public int getHealthCost();", "@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "protected void onGetMeasuredAmountOfWaterRemainingInTank(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "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 }", "void doCheckHealthy();", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "float getPercentHealth();", "@Override\n public int maxHealth() {\n return 25;\n }", "private void takeDamage(int damage){ health -= damage;}", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "public int getHealth()\r\n {\r\n return health;\r\n }", "@Test\n public void isMyPetSleepy() {\n int isSleepy = underTest.getSleepLevel();\n // Assert\n assertThat(isSleepy, is(8));\n }", "@Test\n public void canUseSpecialPowerTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n workerHephaestus.build(nextWorkerCell);\n assertTrue(workerHephaestus.canUseSpecialPower());\n }", "public boolean health(){\n return health;\n }", "public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}", "@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }", "boolean getHealthy();", "private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public void addHealth(int add) {\n\t\tthis.health += add;\n\t\tif (this.health < 0)\n\t\t\tthis.health = 0;\n\t}", "@Test\n public void ifMyPetIsPlayingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(3));\n }", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "public int getHealth()\r\n {\r\n return this.health;\r\n }", "public interface CheckSystemHealthUseCase extends UseCase {\n void execute(final Callback callback, boolean showLoader);\n\n interface Callback {\n void onError(AppErrors error);\n\n\n void onSystemHealth(SystemHealth health);\n }\n}", "@Test\n public void ifMyPetIsSleepingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(10));\n }", "@Test\n public void testAttack() {\n enemy.attack(1, enemy);\n assertEquals(enemy.getHealth(), 90);\n \n hero.attack(2, hero);\n assertEquals(hero.getHealth(), 85);\n \n \n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void setHealth(int h) {\n setStat(h, health);\n }", "@Test\n\tpublic void testTAlive5() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "public int getHealth() {\n return getStat(health);\n }", "@Test\n public void RobotHitByDoubleLaserShouldTake2InDamage() {\n\n int damage = 2;\n\n //health before laser firing\n int healthRobotBeforeHit = robot4.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot4.getRobotHealthPoint();\n\n //should evaluate to true\n assertEquals(healthRobotBeforeHit, healthRobotAfterHit+damage);\n\n }", "void setHappiness(int happiness);", "@Test\n\tpublic void testPlayerHPwithTree() {\n\tEngine engine = new Engine(20);\n\t\tint shouldHit = 1;\n\t\tfor (int i = 0; i < 3; i++ ) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - player's hp is not functioning properly\", shouldHit, engine.getMoveableObject(0).getHP(), 0.0);\t\n\t}", "private void checkForInstability(boolean overshoot) { \n if (overshoot == true) {\n setUnstable();\n } else {\n setStable();\n }\n }", "public int getHealth(){\n return health;\n }", "public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}", "public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }", "public int getHealth() {\n return this.health;\n }", "@Test\n public void testSetHealth() {\n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}", "public void upgrade(){\n\n //upgrade stats\n this.setLevel(this.getLevel() + 1);\n this.setMaxHealth(this.getMaxHealth() + 500);\n this.setHealth(this.getHealth() + 500);\n this.maxCapacity += 20;\n\n }", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "@Override\r\npublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\r\n}", "public int getHealth() {\n \t\treturn health;\n \t}", "@Override\r\n\tpublic int getHealth() {\n\t\treturn health;\r\n\t}", "@Override\npublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\n}", "public int getHealth() {\r\n\t\treturn health;\r\n\t}", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}" ]
[ "0.705985", "0.6996014", "0.68948925", "0.6865186", "0.643447", "0.64295954", "0.64269155", "0.63915807", "0.6386871", "0.6298243", "0.62975734", "0.6294371", "0.6293469", "0.624073", "0.6227937", "0.62158394", "0.6202069", "0.618042", "0.6164214", "0.6148082", "0.61393535", "0.61142474", "0.608133", "0.60585", "0.60211205", "0.6013147", "0.60021555", "0.59939754", "0.5985288", "0.5981212", "0.59702", "0.59637403", "0.5919886", "0.5917629", "0.59012496", "0.58998185", "0.58935064", "0.5861787", "0.5857405", "0.58563554", "0.58490044", "0.5848916", "0.58443475", "0.58420104", "0.58349276", "0.5826213", "0.58157545", "0.5815047", "0.5797379", "0.57766324", "0.57607114", "0.5756318", "0.5755069", "0.57484794", "0.5744807", "0.5743658", "0.5740509", "0.5738315", "0.572585", "0.57226074", "0.5711468", "0.57080626", "0.57033265", "0.56835335", "0.5656696", "0.5650452", "0.5647958", "0.5633067", "0.56245667", "0.5614262", "0.56132424", "0.56068856", "0.5600981", "0.55972373", "0.55952483", "0.559214", "0.55898994", "0.55723196", "0.5572104", "0.5572018", "0.5570583", "0.55593354", "0.5556272", "0.5549135", "0.55421257", "0.5535096", "0.5534946", "0.5534691", "0.5528699", "0.5525455", "0.5519279", "0.5512083", "0.55029005", "0.55027956", "0.5496485", "0.549582", "0.54894483", "0.5480914", "0.54746455", "0.5474554" ]
0.7020743
1
Tests tank's ability to increase health (extension task)
@Test public void testHealthIncrease3() { tank.setHealth(1); tank.increaseHealth(); assertEquals(2, tank.getHealth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testTankSetHealth() {\n tank.setHealth(5);\n assertTrue(tank.getHealth() == 5);\n }", "@Test\n\tpublic void testHealthIncrease2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void testHealthy() {\n checker.checkHealth();\n\n assertThat(checker.isHealthy(), is(true));\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "public abstract void incrementHealth(int hp);", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "@Test\n public void lowHealthWarningTest() {\n }", "public int getHealthGain();", "@Test\n\tpublic void testTInvader3() {\n\t\ttank.damage(proj);\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTInvader1() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(0, tank.getHealth());\n\t}", "int getHealth();", "@Test\n\tpublic void testTInvader2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(1, tank.getHealth());\n\t}", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "public int getHealth();", "public abstract void setHealth(int health);", "@Test\n public void enemySustainMassiveDamage() {\n }", "@Test\n public void ifMyPetIsDrinkingIncreaseInitialValueBy() {\n underTest.tick(1);\n int actualThirstLevel = underTest.getThirstLevel();\n assertThat(actualThirstLevel, is(5));\n\n\n }", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "@Test\n\tpublic void testHarvestWheat1() throws GameControlException {\n\t\tint result = GameControl.harvestWheat(900, 15, 1, 2, 4);\n\t\tassertEquals(3600, result);\n\t}", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "@Test\n public void sustainMassiveDamage() {\n }", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public void reduceHealth() {\n\t}", "@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}", "public void setHealth(int health) {\n this.health = health;\n }", "@Test\n\tpublic void testGetHealth() {\n\t\tassertEquals(alive.getHealth(), PeaShooter.INITIAL_HEALTH);\n\t\t\n\t\t// Test for broken code\n\t\tassertNotEquals(alive.getHealth(), -1);\n\t}", "void gainHealth(int points) {\n this.health += points;\n }", "public void testWatcherUsageStatsTests() {\n long watchCount = randomLongBetween(5, 20);\n for (int i = 0; i < watchCount; i++) {\n watcherClient().preparePutWatch(\"_id\" + i).setSource(watchBuilder()\n .trigger(schedule(cron(\"0/5 * * * * ? 2050\")))\n .input(simpleInput())\n .addAction(\"_id\", loggingAction(\"whatever \" + i)))\n .get();\n }\n\n XPackUsageRequest request = new XPackUsageRequest();\n XPackUsageResponse usageResponse = client().execute(XPackUsageAction.INSTANCE, request).actionGet();\n Optional<XPackFeatureSet.Usage> usage = usageResponse.getUsages().stream()\n .filter(u -> u instanceof WatcherFeatureSetUsage)\n .findFirst();\n assertThat(usage.isPresent(), is(true));\n WatcherFeatureSetUsage featureSetUsage = (WatcherFeatureSetUsage) usage.get();\n\n long activeWatchCount = (long) ((Map) featureSetUsage.stats().get(\"count\")).get(\"active\");\n assertThat(activeWatchCount, is(watchCount));\n }", "@Test\n public void testTankIsDead() {\n tank.hit();\n tank.hit();\n tank.hit();\n assertTrue(tank.isDead());\n\n // health of the tank is different - 1 | edge case\n Tank tank2 = new Tank(\n null, 320, 450, 22, 16, new int[]{1,0}, 1);\n tank2.hit();\n tank2.hit();\n tank2.hit();\n tank2.hit();\n\n assertTrue(tank2.isDead());\n }", "@Test\n public void testTurnHeaterOnPCT() {\n settings.setSetting(Period.MORNING, DayType.WEEKDAY, 69); \n thermo.setPeriod(Period.MORNING);\n thermo.setDay(DayType.WEEKDAY);\n thermo.setCurrentTemp(63); // clause a\n thermo.setThresholdDiff(5); // clause a\n thermo.setOverride(true); // clause b\n thermo.setOverTemp(70); // clause c\n thermo.setMinLag(10); // clause d\n thermo.setTimeSinceLastRun(12); // clause d\n assertTrue (thermo.turnHeaterOn(settings)); \n }", "@Test\n public void testTankFire() {\n assertNotNull(tank.fire());\n }", "@Test\n\tpublic void testWheatOfferings1() throws GameControlException {\n\t\tint result = GameControl.wheatOfferings(10, 2000);\n\t\tassertEquals(200, result);\n\t}", "public Integer getHealth();", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "@Test\n\tpublic void testTAlive3() {\n\t\tassertEquals(false, (tank.getHealth() == 0));\n\t}", "public void setHealth(double Health){\r\n health = Health;\r\n }", "int getHealth() {\n return health;\n }", "@Test\n public void testGetHealth() {\n \n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void setHealth(double h){\n health = h;\n }", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "@Test\n public void ifMyPetIsEatingIncreaseInitialValueBy2() {\n underTest.tick(1);\n int actualHungerLevel = underTest.getHungerLevel();\n // Assert\n assertThat(actualHungerLevel, is(7));\n }", "public int getHealth() { return this.health; }", "public int getHealthCost();", "@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "protected void onGetMeasuredAmountOfWaterRemainingInTank(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "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 }", "void doCheckHealthy();", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "float getPercentHealth();", "@Override\n public int maxHealth() {\n return 25;\n }", "private void takeDamage(int damage){ health -= damage;}", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "public int getHealth()\r\n {\r\n return health;\r\n }", "@Test\n public void isMyPetSleepy() {\n int isSleepy = underTest.getSleepLevel();\n // Assert\n assertThat(isSleepy, is(8));\n }", "@Test\n public void canUseSpecialPowerTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n workerHephaestus.build(nextWorkerCell);\n assertTrue(workerHephaestus.canUseSpecialPower());\n }", "public boolean health(){\n return health;\n }", "public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}", "@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }", "boolean getHealthy();", "private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public void addHealth(int add) {\n\t\tthis.health += add;\n\t\tif (this.health < 0)\n\t\t\tthis.health = 0;\n\t}", "@Test\n public void ifMyPetIsPlayingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(3));\n }", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "public int getHealth()\r\n {\r\n return this.health;\r\n }", "public interface CheckSystemHealthUseCase extends UseCase {\n void execute(final Callback callback, boolean showLoader);\n\n interface Callback {\n void onError(AppErrors error);\n\n\n void onSystemHealth(SystemHealth health);\n }\n}", "@Test\n public void ifMyPetIsSleepingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(10));\n }", "@Test\n public void testAttack() {\n enemy.attack(1, enemy);\n assertEquals(enemy.getHealth(), 90);\n \n hero.attack(2, hero);\n assertEquals(hero.getHealth(), 85);\n \n \n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void setHealth(int h) {\n setStat(h, health);\n }", "@Test\n\tpublic void testTAlive5() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "public int getHealth() {\n return getStat(health);\n }", "@Test\n public void RobotHitByDoubleLaserShouldTake2InDamage() {\n\n int damage = 2;\n\n //health before laser firing\n int healthRobotBeforeHit = robot4.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot4.getRobotHealthPoint();\n\n //should evaluate to true\n assertEquals(healthRobotBeforeHit, healthRobotAfterHit+damage);\n\n }", "void setHappiness(int happiness);", "@Test\n\tpublic void testPlayerHPwithTree() {\n\tEngine engine = new Engine(20);\n\t\tint shouldHit = 1;\n\t\tfor (int i = 0; i < 3; i++ ) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - player's hp is not functioning properly\", shouldHit, engine.getMoveableObject(0).getHP(), 0.0);\t\n\t}", "private void checkForInstability(boolean overshoot) { \n if (overshoot == true) {\n setUnstable();\n } else {\n setStable();\n }\n }", "public int getHealth(){\n return health;\n }", "public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}", "public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }", "public int getHealth() {\n return this.health;\n }", "@Test\n public void testSetHealth() {\n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}", "public void upgrade(){\n\n //upgrade stats\n this.setLevel(this.getLevel() + 1);\n this.setMaxHealth(this.getMaxHealth() + 500);\n this.setHealth(this.getHealth() + 500);\n this.maxCapacity += 20;\n\n }", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "@Override\r\npublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\r\n}", "public int getHealth() {\n \t\treturn health;\n \t}", "@Override\r\n\tpublic int getHealth() {\n\t\treturn health;\r\n\t}", "@Override\npublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\n}", "public int getHealth() {\r\n\t\treturn health;\r\n\t}", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}" ]
[ "0.705985", "0.7020743", "0.68948925", "0.6865186", "0.643447", "0.64295954", "0.64269155", "0.63915807", "0.6386871", "0.6298243", "0.62975734", "0.6294371", "0.6293469", "0.624073", "0.6227937", "0.62158394", "0.6202069", "0.618042", "0.6164214", "0.6148082", "0.61393535", "0.61142474", "0.608133", "0.60585", "0.60211205", "0.6013147", "0.60021555", "0.59939754", "0.5985288", "0.5981212", "0.59702", "0.59637403", "0.5919886", "0.5917629", "0.59012496", "0.58998185", "0.58935064", "0.5861787", "0.5857405", "0.58563554", "0.58490044", "0.5848916", "0.58443475", "0.58420104", "0.58349276", "0.5826213", "0.58157545", "0.5815047", "0.5797379", "0.57766324", "0.57607114", "0.5756318", "0.5755069", "0.57484794", "0.5744807", "0.5743658", "0.5740509", "0.5738315", "0.572585", "0.57226074", "0.5711468", "0.57080626", "0.57033265", "0.56835335", "0.5656696", "0.5650452", "0.5647958", "0.5633067", "0.56245667", "0.5614262", "0.56132424", "0.56068856", "0.5600981", "0.55972373", "0.55952483", "0.559214", "0.55898994", "0.55723196", "0.5572104", "0.5572018", "0.5570583", "0.55593354", "0.5556272", "0.5549135", "0.55421257", "0.5535096", "0.5534946", "0.5534691", "0.5528699", "0.5525455", "0.5519279", "0.5512083", "0.55029005", "0.55027956", "0.5496485", "0.549582", "0.54894483", "0.5480914", "0.54746455", "0.5474554" ]
0.6996014
2
Tests tank's ability to increase health (extension task)
@Test public void testHealthIncrease4() { tank.setHealth(1); tank.increaseHealth(); tank.increaseHealth(); assertEquals(3, tank.getHealth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testTankSetHealth() {\n tank.setHealth(5);\n assertTrue(tank.getHealth() == 5);\n }", "@Test\n\tpublic void testHealthIncrease2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void testHealthy() {\n checker.checkHealth();\n\n assertThat(checker.isHealthy(), is(true));\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "public abstract void incrementHealth(int hp);", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "public int getHealthGain();", "@Test\n public void lowHealthWarningTest() {\n }", "@Test\n\tpublic void testTInvader3() {\n\t\ttank.damage(proj);\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n\tpublic void testTInvader1() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(0, tank.getHealth());\n\t}", "int getHealth();", "@Test\n\tpublic void testTInvader2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(1, tank.getHealth());\n\t}", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "public int getHealth();", "public abstract void setHealth(int health);", "@Test\n public void enemySustainMassiveDamage() {\n }", "@Test\n public void ifMyPetIsDrinkingIncreaseInitialValueBy() {\n underTest.tick(1);\n int actualThirstLevel = underTest.getThirstLevel();\n assertThat(actualThirstLevel, is(5));\n\n\n }", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "@Test\n\tpublic void testHarvestWheat1() throws GameControlException {\n\t\tint result = GameControl.harvestWheat(900, 15, 1, 2, 4);\n\t\tassertEquals(3600, result);\n\t}", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "@Test\n public void sustainMassiveDamage() {\n }", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public void reduceHealth() {\n\t}", "@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}", "public void setHealth(int health) {\n this.health = health;\n }", "@Test\n\tpublic void testGetHealth() {\n\t\tassertEquals(alive.getHealth(), PeaShooter.INITIAL_HEALTH);\n\t\t\n\t\t// Test for broken code\n\t\tassertNotEquals(alive.getHealth(), -1);\n\t}", "void gainHealth(int points) {\n this.health += points;\n }", "public void testWatcherUsageStatsTests() {\n long watchCount = randomLongBetween(5, 20);\n for (int i = 0; i < watchCount; i++) {\n watcherClient().preparePutWatch(\"_id\" + i).setSource(watchBuilder()\n .trigger(schedule(cron(\"0/5 * * * * ? 2050\")))\n .input(simpleInput())\n .addAction(\"_id\", loggingAction(\"whatever \" + i)))\n .get();\n }\n\n XPackUsageRequest request = new XPackUsageRequest();\n XPackUsageResponse usageResponse = client().execute(XPackUsageAction.INSTANCE, request).actionGet();\n Optional<XPackFeatureSet.Usage> usage = usageResponse.getUsages().stream()\n .filter(u -> u instanceof WatcherFeatureSetUsage)\n .findFirst();\n assertThat(usage.isPresent(), is(true));\n WatcherFeatureSetUsage featureSetUsage = (WatcherFeatureSetUsage) usage.get();\n\n long activeWatchCount = (long) ((Map) featureSetUsage.stats().get(\"count\")).get(\"active\");\n assertThat(activeWatchCount, is(watchCount));\n }", "@Test\n public void testTankIsDead() {\n tank.hit();\n tank.hit();\n tank.hit();\n assertTrue(tank.isDead());\n\n // health of the tank is different - 1 | edge case\n Tank tank2 = new Tank(\n null, 320, 450, 22, 16, new int[]{1,0}, 1);\n tank2.hit();\n tank2.hit();\n tank2.hit();\n tank2.hit();\n\n assertTrue(tank2.isDead());\n }", "@Test\n public void testTurnHeaterOnPCT() {\n settings.setSetting(Period.MORNING, DayType.WEEKDAY, 69); \n thermo.setPeriod(Period.MORNING);\n thermo.setDay(DayType.WEEKDAY);\n thermo.setCurrentTemp(63); // clause a\n thermo.setThresholdDiff(5); // clause a\n thermo.setOverride(true); // clause b\n thermo.setOverTemp(70); // clause c\n thermo.setMinLag(10); // clause d\n thermo.setTimeSinceLastRun(12); // clause d\n assertTrue (thermo.turnHeaterOn(settings)); \n }", "@Test\n public void testTankFire() {\n assertNotNull(tank.fire());\n }", "public Integer getHealth();", "@Test\n\tpublic void testWheatOfferings1() throws GameControlException {\n\t\tint result = GameControl.wheatOfferings(10, 2000);\n\t\tassertEquals(200, result);\n\t}", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "@Test\n\tpublic void testTAlive3() {\n\t\tassertEquals(false, (tank.getHealth() == 0));\n\t}", "public void setHealth(double Health){\r\n health = Health;\r\n }", "int getHealth() {\n return health;\n }", "public void setHealth(double h){\n health = h;\n }", "@Test\n public void testGetHealth() {\n \n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "@Test\n public void ifMyPetIsEatingIncreaseInitialValueBy2() {\n underTest.tick(1);\n int actualHungerLevel = underTest.getHungerLevel();\n // Assert\n assertThat(actualHungerLevel, is(7));\n }", "public int getHealth() { return this.health; }", "public int getHealthCost();", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "@Test\n public void isMyPetHungry() {\n int isHungry = underTest.getHungerLevel();\n // Assert\n assertThat(isHungry, is(5));\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "protected void onGetMeasuredAmountOfWaterRemainingInTank(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "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 }", "void doCheckHealthy();", "@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "float getPercentHealth();", "@Override\n public int maxHealth() {\n return 25;\n }", "private void takeDamage(int damage){ health -= damage;}", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "public int getHealth()\r\n {\r\n return health;\r\n }", "@Test\n public void isMyPetSleepy() {\n int isSleepy = underTest.getSleepLevel();\n // Assert\n assertThat(isSleepy, is(8));\n }", "@Test\n public void canUseSpecialPowerTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n workerHephaestus.build(nextWorkerCell);\n assertTrue(workerHephaestus.canUseSpecialPower());\n }", "public boolean health(){\n return health;\n }", "public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}", "@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }", "boolean getHealthy();", "private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public void addHealth(int add) {\n\t\tthis.health += add;\n\t\tif (this.health < 0)\n\t\t\tthis.health = 0;\n\t}", "@Test\n public void ifMyPetIsPlayingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(3));\n }", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "public int getHealth()\r\n {\r\n return this.health;\r\n }", "public interface CheckSystemHealthUseCase extends UseCase {\n void execute(final Callback callback, boolean showLoader);\n\n interface Callback {\n void onError(AppErrors error);\n\n\n void onSystemHealth(SystemHealth health);\n }\n}", "@Test\n public void ifMyPetIsSleepingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(10));\n }", "public void setHealth(int h) {\n setStat(h, health);\n }", "@Test\n public void testAttack() {\n enemy.attack(1, enemy);\n assertEquals(enemy.getHealth(), 90);\n \n hero.attack(2, hero);\n assertEquals(hero.getHealth(), 85);\n \n \n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "@Test\n\tpublic void testTAlive5() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "public int getHealth() {\n return getStat(health);\n }", "void setHappiness(int happiness);", "@Test\n public void RobotHitByDoubleLaserShouldTake2InDamage() {\n\n int damage = 2;\n\n //health before laser firing\n int healthRobotBeforeHit = robot4.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot4.getRobotHealthPoint();\n\n //should evaluate to true\n assertEquals(healthRobotBeforeHit, healthRobotAfterHit+damage);\n\n }", "@Test\n\tpublic void testPlayerHPwithTree() {\n\tEngine engine = new Engine(20);\n\t\tint shouldHit = 1;\n\t\tfor (int i = 0; i < 3; i++ ) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - player's hp is not functioning properly\", shouldHit, engine.getMoveableObject(0).getHP(), 0.0);\t\n\t}", "public int getHealth(){\n return health;\n }", "private void checkForInstability(boolean overshoot) { \n if (overshoot == true) {\n setUnstable();\n } else {\n setStable();\n }\n }", "public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}", "public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }", "public int getHealth() {\n return this.health;\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "@Test\n public void testSetHealth() {\n assertEquals(hero.getHealth(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n\n }", "public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}", "public void upgrade(){\n\n //upgrade stats\n this.setLevel(this.getLevel() + 1);\n this.setMaxHealth(this.getMaxHealth() + 500);\n this.setHealth(this.getHealth() + 500);\n this.maxCapacity += 20;\n\n }", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "public int getHealth() {\n \t\treturn health;\n \t}", "@Override\r\npublic void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\r\n}", "@Override\r\n\tpublic int getHealth() {\n\t\treturn health;\r\n\t}", "@Override\npublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\n}", "public int getHealth() {\r\n\t\treturn health;\r\n\t}", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}" ]
[ "0.7059045", "0.70198727", "0.6995279", "0.689463", "0.6433996", "0.64303505", "0.64265716", "0.6393154", "0.6386818", "0.62988985", "0.62972367", "0.62932754", "0.62921244", "0.6242945", "0.62263507", "0.6216445", "0.62043", "0.61817634", "0.6162048", "0.61477363", "0.6140123", "0.6114316", "0.608242", "0.60559857", "0.6023201", "0.60147476", "0.6002103", "0.59951407", "0.5985722", "0.5981802", "0.59689426", "0.59619534", "0.5919807", "0.5915913", "0.5902324", "0.5899988", "0.5894749", "0.58607596", "0.5859182", "0.58586645", "0.58509374", "0.5848214", "0.5845751", "0.5841998", "0.5837056", "0.5827867", "0.5815818", "0.58154494", "0.57981485", "0.5778393", "0.57612616", "0.5756518", "0.5754424", "0.574821", "0.5747335", "0.5745436", "0.5740652", "0.57397616", "0.57283235", "0.57218575", "0.57101953", "0.57098716", "0.5703765", "0.5682287", "0.5657579", "0.5651506", "0.5649533", "0.5633745", "0.5624586", "0.5613312", "0.56132877", "0.5609365", "0.56009483", "0.5596568", "0.5593885", "0.5593341", "0.5588622", "0.55751485", "0.5572171", "0.5570876", "0.5569979", "0.55585355", "0.5558344", "0.55519044", "0.55428374", "0.5537711", "0.5533961", "0.5533902", "0.55298805", "0.5526629", "0.5520747", "0.5511242", "0.55053455", "0.5502192", "0.54992247", "0.5494945", "0.54920655", "0.547741", "0.547484", "0.5474652" ]
0.6864221
4
this is about rotatig a square matrix, so if the lenth of row and columns are not same we will return
public static void rotateMatrix(int[][] a]){ if (a == null || a.length == 0 || a.length != a[0].length){ return; } // we olny need half of the layers as other layers will be processed automatically for (int layer = 0; layer < a.length/2; layer++){ // rotate (array, start, end), this will take us to the end rotate(a, layer, a.length-1-layer) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean rotate(int[][] matrix) {\n\t\tif (matrix.length == 0 || matrix.length != matrix[0].length)\n\t\t\treturn false; // Not a square\n\t\tint n = matrix.length;\n\n\t\tfor (int layer = 0; layer < n / 2; layer++) {\n\t\t\tint first = layer;\n\t\t\tint last = n - layer - 1;\n\t\t\tfor (int i = first; i < last; i++) {\n\t\t\t\tint offset = i - first;\n\t\t\t\tint top = matrix[first][i]; // save top\n\t\t\t\t// left -> top\n\t\t\t\tmatrix[first][i] = matrix[last - offset][first];\n\t\t\t\t// bottom -> left\n\t\t\t\tmatrix[last - offset][first] = matrix[last][last - offset];\n\n\t\t\t\t// right -> bottom\n\t\t\t\tmatrix[last][last - offset] = matrix[i][last];\n\n\t\t\t\t// top -> right\n\t\t\t\tmatrix[i][last] = top; // right <- saved top\n\t\t\t\t\n\t\t\t\t// top = [first][i]\n\t\t\t\t// [first][i] = [last - offset][first]\n\t\t\t\t// [last - offset][first] = [last][last - offset]\n\t\t\t\t// [last][last - offset] = [i][last]\n\t\t\t\t// [i][last] = top\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static void rotateMatrix(int[][] matrix) {\n\n\t\t// Assume: the elements are integer, and are unique values so that the result\n\t\t// can be tested for correctness.\n\t\t// Question: are the dimensions square? i.e. row and column count are the same?\n\t\t// Assume Yes.\n\t\t// Question: Which direction should the array be rotated - Assume clockwise\n\n\t\t// Iterate from counter min to max - 1\n\t\t// Copy top row first cell into a temp variable.\n\t\t// Copy each corner into the next corner. Use temp variable to fill the last\n\t\t// corner\n\t\t// Decrement counter and perform for next set of cells\n\t\t// Repeat for inner layers.\n\n\t\t// Bounding Co-ordinates: matrix[min][min], matrix[min, max], matrix[max, max],\n\t\t// matrix[max, min]\n\t\t// Initially: min = 0, max = N-1 (i.e. 0 based array positions)\n\t\t// pos = min\n\t\t// While pos < max\n\t\t// temp = matrix[min][pos]\n\t\t// matrix[min][pos] = matrix[max - pos + min][min]\n\t\t// matrix[max - pos + min][min] = matrix[max][max - pos + min]\n\t\t// matrix[max][max - pos + min] = matrix[pos][max]\n\t\t// matrix[pos][max] = temp\n\t\t// Increment pos\n\t\t// Increment min and decrement max\n\t\t// Break when min >= max\n\t\t// For even N, the last grid will be a 2 X 2 matrix, for odd N, the last grid\n\t\t// will be a single cell\n\n\t\t// T.C. N/2 iterations of the while loop (for even N)\n\t\t// T.C. = (N - 1) + (N-3) + .. 1\n\t\t// [first calls executes 5 for loops, each N-1 times. last call executes 2*2\n\t\t// matrix. i.e. N-1 = 1]\n\t\t// = (N-1 + N-3 + .. + 1) = (N-1 + N-3 + ... + N-(N-1))\n\t\t// = (N*N/2 - (1 + 3 + .. + N-1))\n\t\t// Sum of n even no.s = n(n+1)\n\t\t// Sum of n odd no.s = N(N+1)/2 - n(n+1). Where N = Max of odd no. + 1\n\t\t// T.C. = (N*N/2 - (N(N+1)/2 - N/2 * (N/2 + 1)))\n\t\t// = ( N*N/2 - (N*N/2 + N/2 - N*N/4 - N/2)) = (N*N/4)\n\t\t// T.C = O(N*N), this is the best possible T.C as each element needs to be\n\t\t// visited once.\n\t\t// S.C. O(1)\n\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tif (matrix.length != matrix[0].length)\n\t\t\tthrow new NotASquareMatrixException(\"Not a square matrix. Cannot be rotated in place.\");\n\n\t\tint min = 0;\n\t\tint max = matrix.length - 1;\n\t\tprint(matrix);\n\n\t\twhile (min < max) {\n\t\t\trotateCellsInALayer(matrix, min, max);\n\t\t\tprint(matrix);\n\t\t\tmin++;\n\t\t\tmax--;\n\t\t}\n\t}", "public void testRotationMatrix() {\n\n u = 1;\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n // This should be the identity matrix\n double[][] m = rM.getMatrix();\n for(int i=0; i<m.length; i++) {\n for(int j=0; j<m.length; j++) {\n if(j==i) {\n assertEquals(m[i][j], 1, TOLERANCE);\n } else {\n assertEquals(m[i][j], 0, TOLERANCE);\n }\n }\n }\n }", "@Test\n public void testRotate90Degrees2(){\n double[][] a = new double[2][3];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.rotateArray90(a);\n checkRotate(a, newA);\n }", "public boolean rotate(int[][] matrix) {\n int n = matrix.length;\n if(n == 0 || n != matrix[0].length){\n return false;\n }\n for(int layer = 0; layer < n/2; layer++){\n int first = layer;\n int last = n - 1 - layer;\n \n for(int i = first; i < last; i++){\n int offset = i - first;\n int temp = matrix[first][i];\n //Left -> Top\n matrix[first][i] = matrix[last - offset][first];\n //Bottom -> Left\n matrix[last - offset][first] = matrix[last][last-offset];\n //Right -> Bottom\n matrix[last][last-offset] = matrix[i][last];\n //Top -> Right\n matrix[i][last] = temp;\n }\n \n }\n \n printMatrix(matrix);\n return true;\n }", "public static boolean rotateMatrix(int[][] matrix) {\n if (matrix.length == 0 || matrix.length != matrix[0].length) {\n return false;\n }\n int n = matrix.length;\n\n for (int layer = 0; layer < n / 2; layer++) {\n int first = layer;\n int last = n - 1 - layer;\n\n for (int i = first; i < last; i++) {\n int offset = i - first;\n int top = matrix[first][i]; //Save top\n\n //left -> top\n matrix[first][i] = matrix[last - offset][first];\n\n //bottom -> left\n matrix[last - offset][first] = matrix[last][last - offset];\n\n //right -> bottom\n matrix[last][last - offset] = matrix[i][last];\n\n //top -> right\n matrix[i][last] = top; //right <- saved top\n }\n }\n return true;\n }", "@Test\n public void testRotate90Degrees1(){\n double[][] a = new double[5][5];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.rotateArray90(a);\n checkRotate(a, newA);\n }", "public static long[][] rotate(long[][] matrix){\n int n = matrix[0].length;\n\n // We are going from the outside to the inside of the matrix\n for(int layer=0; layer<n/2; layer++){\n\n // The boundaries of the current layer\n int first = layer;\n int last = n - (layer + 1);\n\n // Swap each edge of the layer to the next edge\n for(int j=layer; j<last; j++){\n\n // The offset for the current pixel \n int offset = j - first;\n\n // Save the values of the pixels that will be swapped\n long pixelTop = matrix[first][j];\n long pixelRight = matrix[j][last];\n long pixelBottom = matrix[last][last-offset];\n long pixelLeft = matrix[last-offset][first];\n\n // Swap Top to Right\n matrix[j][last] = pixelTop;\n\n // Swap Right to Bottom\n matrix[last][last-offset] = pixelRight;\n\n // Swap Bottom to Left\n matrix[last-offset][first] = pixelBottom;\n\n // Swap Left to Top\n matrix[first][j] = pixelLeft;\n }\n }\n\n return matrix;\n }", "static void rotate(int[][] matrix) {\n int n = matrix.length;\n for (int i = 0; i < (n + 1) / 2; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[n - 1 - j][i];\n matrix[n - 1 - j][i] = matrix[n - 1 - i][n - j - 1];\n matrix[n - 1 - i][n - j - 1] = matrix[j][n - 1 - i];\n matrix[j][n - 1 - i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n }", "public void rotate() {\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\ttmp_grid[i][j] = squares[i][j];\n\t\t\t// copy back rotated 90 degrees\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tsquares[j][i] = tmp_grid[i][3-j];\n \n //log rotation\n LogEvent(\"rotate\");\n\t\t}", "private static int[][] rotateMartix(int[][] matrix) {\n for(int i=0;i<matrix.length;i++) {\n for(int j=i;j< matrix.length;j++) {\n int tmp=matrix[i][j];\n matrix[i][j]=matrix[j][i];\n matrix[j][i]=tmp;\n }\n }\n //swap columns\n for(int i=0;i<matrix.length;i++){\n int low = 0;\n int high = matrix.length-1;\n\n while(low < high)\n {\n int temp = matrix[i][low];\n matrix[i][low] = matrix[i][high];\n matrix[i][high] = temp;\n\n low++;\n high--;\n }\n }\n return matrix;\n }", "void calculateRotationMatrix() {\n R[0][0] = (float) (Math.cos(angle[0]) * Math.cos(angle[1]));\n R[1][0] = (float) (Math.sin(angle[0]) * Math.cos(angle[1]));\n R[0][1] = (float) (Math.cos(angle[0]) * Math.sin(angle[1]) * Math.sin(angle[2]) - Math.sin(angle[0]) * Math.cos(angle[2]));\n R[1][1] = (float) (Math.sin(angle[0]) * Math.sin(angle[1]) * Math.sin(angle[2]) + Math.cos(angle[0]) * Math.cos(angle[2]));\n R[0][2] = (float) (Math.cos(angle[0]) * Math.sin(angle[1]) * Math.cos(angle[2]) + Math.sin(angle[0]) * Math.sin(angle[2]));\n R[1][2] = (float) (Math.sin(angle[0]) * Math.sin(angle[1]) * Math.cos(angle[2]) - Math.cos(angle[0]) * Math.sin(angle[2]));\n R[2][0] = (float) - Math.sin(angle[1]);\n R[2][1] = (float) (Math.cos(angle[1]) * Math.sin(angle[2]));\n R[2][2] = (float) (Math.cos(angle[1]) * Math.cos(angle[2]));\n }", "private static void rotate(int[][] matrix) {\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = i; j < matrix[0].length; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[j][i];//转置,第i行变成第i列\r\n\t\t\t\tmatrix[j][i] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix.length / 2; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[i][matrix.length - 1 - j];\r\n\t\t\t\tmatrix[i][matrix.length - 1 - j] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void rotate(int[][] matrix) {\n int temp, len = matrix.length;\n\n int left = 0, top = 0, right = len-1, bottom = len-1;\n\n while(left < right) {\n for(int i = left; i < right; i++) {\n temp = matrix[top][i];\n matrix[top][i] = matrix[len-1-i][left];\n matrix[len-1-i][left] = matrix[bottom][len-1-i];\n matrix[bottom][len-1-i] = matrix[i][right];\n matrix[i][right] = temp;\n }\n left++;\n right--;\n top++;\n bottom--;\n }\n }", "public void rotate(int[][] matrix) {\n if (matrix == null || matrix.length == 0) return;\n int n = matrix.length-1;\n for (int i = 0; i <= n / 2; i++) {\n for (int j = i; j < n; j++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[n - j][i];\n matrix[n - j][i] = matrix[n - i][n - j];\n matrix[n - i][n - j] = matrix[j][n - i];\n matrix[j][n - i] = temp;\n }\n }\n }", "public void rotate(double deg) {\n deg = deg % 360;\n// System.out.println(\"Stopni:\" + deg);\n double e = 0;\n double f = 0;\n\n// for(int i = 0; i < pixels.length; i++) {\n// for(int j = 0; j < pixels[i].length; j++) {\n// e += pixels[i][j].getX();\n// f += pixels[i][j].getY();\n// }\n// }\n //e = e / (pixels.length * 2);\n //f = f / (pixels[0].length * 2);\n e = pixels.length / 2;\n f = pixels[0].length / 2;\n System.out.println(e);\n System.out.println(f);\n\n// System.out.println(e + \":\" + f);\n Matrix affineTransform;\n Matrix translateMinus = Matrix.translateRotate(-e, -f);\n Matrix translatePlus = Matrix.translateRotate(e, f);\n Matrix movedTransform = Matrix.multiply(translateMinus, Matrix.rotate(deg));\n //movedTransform.display();\n affineTransform = Matrix.multiply(movedTransform, translatePlus);\n //affineTransform.display();\n\n for(int i = 0; i < pixels.length; i++) {\n for(int j = 0; j < pixels[i].length; j++) {\n double[][] posMatrix1 = {{pixels[i][j].getX()}, {pixels[i][j].getY()}, {1}};\n Matrix m1 = new Matrix(posMatrix1);\n Matrix result1;\n result1 = Matrix.multiply(Matrix.transpose(affineTransform.v), m1);\n\n pixels[i][j].setX(Math.round(result1.v[0][0]));\n pixels[i][j].setY(Math.round(result1.v[1][0]));\n }\n }\n\n\n }", "public void rotate (int row) {\n\t\tif ( row < n / 2)\n\t\t\trotate(row + 1);\n\t\telse\n\t\t\treturn;\n\t\t//rotate the outter most row and col\n\t\trotateRow(row);\n\t}", "public void rotate(){\n\t\tint oneLoop = 0;\r\n\t\tmotherLoop: while(oneLoop == 0){\r\n\t\t\toneLoop = 1;\r\n\t\t// tworze i zeruje macierz 4x4\r\n\t\tint d = type == 1 ? 4 : 3;\t// dla podłużnego będzie klatka 4x4, dla reszty: 3x3\r\n\t\tif(type != 2 ){\t// a dla kwadratowego nic nie trzeba obracac\r\n\t\t\t// tworze macierz i przerzucam do niej klocka:\r\n\t\t\t// tworze i zeruje macierz dxd\r\n\t\t\tint[][] matrix = new int[d][d];\r\n\t\t\tfor(int i = 0 ; i < d ; i++)\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++)\r\n\t\t\t\t\tmatrix[i][j] = 0;\r\n\t\t\t// wyznaczam najmniejsze X i Y z tablic X[] i Y[]\r\n\t\t\tint minX = X[0], minY = Y[0];\r\n\t\t\tfor(int i = 1 ; i < d ; i++){\r\n\t\t\t\tif(X[i] < minX)\tminX = X[i];\r\n\t\t\t\tif(Y[i] < minY)\tminY = Y[i];\r\n\t\t\t}\r\n\t\t\t// przepisuje do czystej macierzy klocka, odejmujac najmniejsze X i Y\r\n\t\t\t// dzieki temu przystaje on do lewej i gornej krawedzi macierzy.\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\t\tmatrix[Y[i]-minY][X[i]-minX] = 1;\r\n\t\t\t\r\n\t\t\t// dla przypadkow przy scianie przerywam calosc:\r\n\t\t\tif(minX + d > Board.getWidth()){\r\n\t\t\t\tSystem.out.println(\"Protestuje, bo: minX+d=\" +(minX+d)+ \", a Board.getWidth()=\" + Board.getWidth());\r\n\t\t\t\tbreak motherLoop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(d==4){\t// dla dlugiego przycinam jeszcze raz\r\n\t\t\t\tif(matrix[3][0] == 1){\t// jest pionowo\r\n\t\t\t\t\tfor(int i = 0 ; i < 4 ; i++){\r\n\t\t\t\t\t\tmatrix[i][0] = 0;\r\n\t\t\t\t\t\tmatrix[i][1] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\t// jest poziomo\r\n\t\t\t\t\tfor(int i = 0 ; i < 4 ; i++){\r\n\t\t\t\t\t\tmatrix[0][i] = 0;\r\n\t\t\t\t\t\tmatrix[1][i] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// nowa macierz to macierz z klockiem obrocona o 90 stopni\r\n\t\t\tint[][] newMatrix = new int[d][d];\r\n\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\tnewMatrix[i][j] = matrix[j][d-i-1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tboolean isFree = true;\t// sprawdzam czy nowy klocek nie naruszy statycznych klockow\r\n\t\t\tint index = 0;\r\n\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\tif(i+minY < Board.getHeight() && j+minX < Board.getWidth()){\r\n\t\t\t\t\t\tif(motherBoard.getField(j+minX, i+minY).getContent() == 2){\r\n\t\t\t\t\t\t\tisFree = false;\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\tif(isFree){\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\t\tif( minY >= 0 && j+minX < Board.getWidth() && i+minY < Board.getHeight()){\t// wymiary sie beda zgadzac z plansza.\r\n\t\t\t\t\t\t\tif(newMatrix[i][j] == 1){\r\n\t\t\t\t\t\t\t\tX[index] = j+minX;\r\n\t\t\t\t\t\t\t\tY[index] = i+minY;\r\n\t\t\t\t\t\t\t\tindex++;\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}\r\n\t\t}\r\n\t}\r\n\t}", "public void rotateMatrix(int[][] matrix) {\n\n int length = matrix[0].length;\n // Rotate each layer of the NxN matrix starting with the outermost one first\n for(int layer = 0;layer < length/2; layer ++) {\n\n for(int i = layer; i < length - 1 - layer;i++) {\n int topLeft = matrix[layer][i];\n\n // topLeft = bottomLeft\n matrix[layer][i] = matrix[length - 1 - layer - i][layer];\n\n // bottomLeft = bottomRight\n matrix[length - 1 - layer - i][layer] = matrix[length - 1 - layer][length - 1 - layer - i];\n\n //bottomRight = topRight\n matrix[length - 1 - layer][length - 1 - layer - i] = matrix[i][length - 1 - layer];\n\n //topRight = topLeft\n matrix[i][length - 1 - layer] = topLeft;\n }\n }\n }", "public static void rotate(int[][] arr,int row,int col){\n for (int i = 0; i <(row+1)/2 ; i++) {\n for (int j = i; j <(col+1)/2 ; j++) {\n int temp=arr[i][j];\n arr[i][j]=arr[row-1-j][i];\n arr[row-1-j][i]=arr[row-1-i][col-1-j];\n arr[row-1-i][col-1-j]=arr[j][col-1-i];\n arr[j][col-1-i]=temp;\n }\n }\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n System.out.print(arr[i][j]+\" \");\n }\n System.out.println();\n }\n }", "public void rotateLayer(int[][] matrix, int x, int y, int len){\n for (int i = 0; i < len - 1; i++){\n int tmp = matrix[x][y+i];\n matrix[x][y+i] = matrix[x+len-i-1][y];\n matrix[x+len-i-1][y] = matrix[x+len-1][y+len-1-i];\n matrix[x+len-1][y+len-1-i] = matrix[x+i][y+len-1];\n matrix[x+i][y+len-1] = tmp;\n }\n }", "public void rotate(int[][] matrix) {\n if(matrix.length <= 0) {\n return;\n }\n \n int N= matrix.length;\n \n for(int i = 0 ; i < N/2; i++) {\n for(int j = i ; j < N-i-1; j ++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[N-1-j][i];\n matrix[N-1-j][i] = matrix[N-1-i][N-1-j];\n matrix[N-1-i][N-1-j] = matrix[j][N-1-i];\n matrix[j][N-1-i] = temp;\n }\n \n }\n }", "public static void rotateMatrix(int[][] data) {\n\t\tint N = data.length;\n\t\tfor (int x = 0; x < N / 2; x++) {\n\t\t\tfor (int y = x; y < N - 1 - x; y++) {\n\t\t\t\tint tmp = data[x][y];\n\t\t\t\tdata[x][y] = data[y][N-1-x];\n\t\t\t\tdata[y][N-1-x] = data[N-1-x][N-1-y];\n\t\t\t\tdata[N-1-x][N-1-y] = data[N-1-y][x];\n\t\t\t\tdata[N-1-y][x] = tmp;\n\t\t\t}\n\t\t}\n\t}", "public void rotateInPlace(int[][] matrix) {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = i; j < matrix[0].length; j++) {\n int temp = 0;\n temp = matrix[i][j];\n matrix[i][j] = matrix[j][i];\n matrix[j][i] = temp;\n }\n }\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix.length / 2; j++) {\n int temp = 0;\n temp = matrix[i][j];\n matrix[i][j] = matrix[i][matrix.length - 1 - j];\n matrix[i][matrix.length - 1 - j] = temp;\n }\n }\n }", "@Test\n\tpublic void testSquareIndexToSequence(){\n\t\t\n\t\tRow row = TestUtils.buildRow(\"3,1,2,1|-...-.....-....-.....-.-\");\n\t\tRowDecomposition decomposition = row.getDecomposition();\n\t\t\n\t\tAssert.assertEquals(18, decomposition.getTotalLength());\n\t\tAssert.assertEquals(decomposition.getSequence(0), decomposition.getSequenceContaining(0));\n\t\tAssert.assertEquals(decomposition.getSequence(0), decomposition.getSequenceContaining(2));\n\t\tAssert.assertEquals(decomposition.getSequence(1), decomposition.getSequenceContaining(3));\n\t\tAssert.assertEquals(decomposition.getSequence(1), decomposition.getSequenceContaining(7));\n\t\tAssert.assertEquals(decomposition.getSequence(2), decomposition.getSequenceContaining(8));\n\t\tAssert.assertEquals(decomposition.getSequence(2), decomposition.getSequenceContaining(11));\n\t\tAssert.assertEquals(decomposition.getSequence(3), decomposition.getSequenceContaining(12));\n\t\tAssert.assertEquals(decomposition.getSequence(3), decomposition.getSequenceContaining(16));\n\t\tAssert.assertEquals(decomposition.getSequence(4), decomposition.getSequenceContaining(17));\n\t\t\n\t}", "@Override\n\tpublic void rotateRight(int numberOfTurns) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] arrayCopy = copySquarelotron.squarelotron;\n\t\tfor(int i = 0; i <=size-1; i++){\n\t\t\tfor(int j = 0; j<=size-1; j++){\n\t\t\t\t//checks for each rotation to account for repeats and negatives and rotates accordingly\n\t\t\t\tif((numberOfTurns-1)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[size-j-1][i];\n\t\t\t\t}\n\t\t\t\telse if((numberOfTurns-2)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[size-i-1][size-j-1];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if((numberOfTurns-3)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[j][size-i-1];\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tthis.squarelotron = arrayCopy;\n\t}", "public static int[] findDiagonalOrder(int[][] matrix){\n if( matrix == null || matrix.length == 0)\n return new int[0];\n int i = 0;\n int j =0;\n int k = 0;\n int size = matrix.length * matrix[0].length;\n int[] result = new int[size];\n boolean moveUp =true;\n while(k< size){\n\n if(moveUp){\n for(;i >=0 && j<= matrix[0].length-1;i--, j++){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving up there are two conditions\n// 1. only row moves beyod 0 th row and column is in range (check for both row and column)\n //2. both row and column moves out ( check for column only)\n //case 1\n if(i<0 && j <= matrix[0].length-1){\n i = 0; // reset row to 0 and move down\n moveUp = !moveUp;\n }\n //case 2\n if(j == matrix[0].length){\n i = i+2; // reset row\n j--; // reduce column and move down\n moveUp = !moveUp;\n }\n\n }\n else\n {\n // moving down increment row and decrement column\n for(;j>=0 && i <= matrix.length - 1; i++, j-- ){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving down there are two cases\n // 1. column goes out but rows in order (we need to check both)\n // 2. both column and row goes out (we can only have row check)\n if(j < 0 && i<= matrix.length-1){\n j = 0;\n moveUp = !moveUp;\n }\n if( i == matrix.length){\n j = j+2;\n i--;\n moveUp = !moveUp;\n }\n\n }\n\n\n }\n return result;\n }", "int[][] rotate(int[][] image) {\n if(image.length != image[0].length) {\n throw new IllegalArgumentException();\n }\n // can assume the image is square matrix.\n int dimension = image.length;\n for(int i=0;i< dimension; i++) {\n for(int j=i;j<dimension;j++) {\n int temp = image[j][i];\n image[j][i] = image[i][j];\n image[i][j] = temp;\n }\n }\n return image;\n }", "public void rotate(int[][] matrix) {\n int m = matrix.length;\n int n = matrix[0].length;\n if (m != n) {\n return;\n }\n int[][] result = new int[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result[i][j] = matrix[n - j - 1][i];\n }\n }\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n matrix[i][j] = result[i][j];\n }\n }\n }", "private void shiftLeftToRight(int colNum, int rowNum, FloorTile tile, int rotation) {\n shiftTilesLeftToRight(colNum, rowNum, tile, rotation);\n shiftPlayerPiecesLeftToRight(rowNum);\n }", "private static void rotate(int[][] a) {\n\t\tint len = a.length;\n\t\tint k,l=0;\n\t\tint b[][] = new int[len][len];\n\t\tfor(int i=len-1;i>=0;i--)\n\t\t{\n\t\t\tk=0;\n\t\t\tfor(int j=0;j<len && k<3 && l<3;j++)\n\t\t\t{\n\t\t\t b[k][l]=a[i][j];\n\t\t\t k++;\n\t\t\t if(k>2)\n\t\t\t \t l++;\n\t }\n\t\t}\n\t\tfor(int c[]:b) {\n\t\t\tfor( int d : c) {\n\t\t\t\tSystem.out.print(d + \" \");\n\t\t\t}\n\t\tSystem.out.println();\n\t}\n\t\t\n\t}", "public ArrayList<Integer> spiralOrder(int[][] matrix) {\n ArrayList<Integer> resultList = new ArrayList<Integer>();\n if (matrix.length == 0 || matrix[0].length == 0) {\n\t\t\treturn resultList;\n\t\t}\n if (matrix.length == 1) {\n\t\t\tfor (int i = 0; i < matrix[0].length; i++) {\n\t\t\t\tresultList.add(matrix[0][i]);\n\t\t\t}\n\t\t\treturn resultList;\n\t\t}\n if (matrix[0].length == 1) {\n\t\t\tfor (int j = 0; j < matrix.length; j++) {\n\t\t\t\tresultList.add(matrix[j][0]);\n\t\t\t}\n\t\t\treturn resultList;\n\t\t}\n int width = matrix[0].length;\n int height = matrix.length;\n int round = Math.min(width, height)/2;\n if (Math.min(width, height) % 2 == 1) {\n\t\t\tround++;\n\t\t}\n for (int i = 0; i < round; i++) {\n \tresultList.add(matrix[i][i]);\n \tif (width > 1) {\n\t\t\t\tfor (int j = 1; j < width; j++) {\n\t\t\t\t\tresultList.add(matrix[i][i+j]);\n\t\t\t\t}\n\t\t\t}\n \tif (height > 1) {\n\t\t\t\tfor (int j = 1; j < height; j++) {\n\t\t\t\t\tresultList.add(matrix[i + j][width - 1 + i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n \tif (width > 1) {\n\t\t\t\tfor (int j = width -2; j >= 0; j--) {\n\t\t\t\t\tresultList.add(matrix[height - 1 + i][i + j]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n \tif (height > 1) {\n\t\t\t\tfor (int j = height - 2; j > 0; j--) {\n\t\t\t\t\tresultList.add(matrix[i + j][i]);\n\t\t\t\t}\n\t\t\t}\n \twidth -= 2;\n \theight -= 2;\n }\n return resultList;\n }", "private void shiftRightToLeft(int colNum, int rowNum, FloorTile tile, int rotation) {\n shiftTilesRightToLeft(colNum, rowNum, tile, rotation);\n shiftPlayerPiecesRightToLeft(rowNum);\n }", "private static void rotate(int[][] a, start, end){\n for (int current = 0; start+current < end; current++){\n int temp = a[start][start+current]; // save the top \n a[start][start+current] = a[end-current][start]; // left to top moveing left elemnt to top\n a[end-current][start] = a[end][end-current]; // bottom element to left \n a[end][end-current] = a[start+current][end]; // right element to bottom \n a[start+current][end] = temp; // top elemrnt to right\n }\n}", "public Matrix getCurrentRotation() throws ManipulatorException;", "public static void rotateBoard(Character[][] gameBoard, int boardLength) {\n\n if(boardLength == 0 || boardLength == 1) return;\n\n int quarterDimX = boardLength % 2 == 1 ? (boardLength/2) + 1 : boardLength/2;\n int quarterDimY = boardLength/2;\n\n for(int i=0; i<quarterDimY; i++) {\n for(int j=0; j<quarterDimX; j++) {\n char tempChar = gameBoard[j][i];\n int x1 = i; //Math.abs(i-(boardLength-1));\n int y1 = Math.abs(j-(boardLength-1));\n int x2 = y1; //Math.abs(y1-(boardLength-1));\n int y2 = Math.abs(x1-(boardLength-1));\n int x3 = y2; //Math.abs(y2-(boardLength-1));\n int y3 = Math.abs(x2-(boardLength-1));\n gameBoard[j][i] = gameBoard[x1][y1];\n gameBoard[x1][y1] = gameBoard[x2][y2];\n gameBoard[x2][y2] = gameBoard[x3][y3];\n gameBoard[x3][y3] = tempChar;\n }\n }\n }", "public static byte[][] rotate(byte[][] toRotate, byte direction){\n byte[][] newMatrix = {{-1, -1, -1},{-1, -1, -1},{-1, -1, -1}};\n //iterating throug each element of the matrix and placing them to the right spot\n //only works for 3x3 matrixes\n for(byte y = 0; y < 3; y ++){\n for(byte x = 0; x < 3; x ++){\n if(direction == 1){\n newMatrix[x][2-y] = toRotate[y][x];\n }\n else{\n newMatrix[2-x][y] = toRotate[y][x];\n }\n \n }\n }\n return newMatrix;\n }", "private static void rotate(int[][] matrix) {\n int rows = matrix.length;\n int cols = matrix[0].length;\n\n for (int[] ints : matrix) {\n reverse(ints, 0, cols - 1);\n }\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols - i; j++) {\n swapMatrix(matrix, i, j, cols - 1 - j, rows - 1 - i);\n }\n }\n }", "public void rotateClockwise(int[][] matrix) {\n int n = matrix.length;\n\n // 1. Transpose matrix , change row to column, could use XOR operator to remove temp dependency\n for (int i = 0; i < n; i++) {\n for (int j = i; j < n; j++) {\n int temp = matrix[j][i];\n matrix[j][i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n\n // 2. Reverse elements of matrix\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[i][n - j - 1];\n matrix[i][n - j - 1] = temp;\n }\n }\n }", "Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }", "public boolean pathClear(int oldCol, int oldRow, int newCol, int newRow ) {\r\n\r\n //vertical check\r\n if(oldCol == newCol) {\r\n while (oldRow!=newRow) {\r\n if(oldRow>newRow) {\r\n if (Chessboard.chessBoard[oldRow-1][oldCol].getPiece() != null && newRow != oldRow - 1) {\r\n return false;\r\n }\r\n oldRow--;\r\n //System.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n else if (oldRow<newRow) {\r\n if (Chessboard.chessBoard[oldRow+1][oldCol].getPiece() != null && newRow != oldRow + 1) {\r\n return false;\r\n }\r\n oldRow++;\r\n //System.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n\r\n }\r\n //System.out.println(\"debug a\");\r\n return true;\r\n }\r\n\r\n//horizontal check\r\n else if (oldRow==newRow){\r\n while (oldCol!=newCol) {\r\n if(oldCol>newCol) {\r\n if (Chessboard.chessBoard[oldRow][oldCol-1].getPiece() != null && newCol != oldCol - 1) {\r\n return false;\r\n }\r\n oldCol--;\r\n //System.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n else if (oldCol<newCol) {\r\n if (Chessboard.chessBoard[oldRow][oldCol+1].getPiece() != null && newCol != oldCol + 1) {\r\n return false;\r\n }\r\n oldCol++;\r\n //\tSystem.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n\r\n }\r\n //\tSystem.out.println(\"debug b\");\r\n return true;\r\n }\r\n\r\n //diagonal check\r\n else if(oldRow!=newRow && oldCol != newCol){\r\n\r\n\r\n //can only move diagonally the SAME number of spaces each direction\r\n if (Math.abs(newRow - oldRow) != Math.abs(newCol-oldCol)) {\r\n //System.out.println(\"number of rows and columns not equal\");\r\n return false;\r\n }\r\n\r\n\r\n\r\n //System.out.println(\"In diagonal check\");\r\n //System.out.println(\"old Row:\" + oldRow);\r\n //System.out.println(\"old Col:\" + oldCol);\r\n //System.out.println(\"new Row:\" + newRow);\r\n //System.out.println(\"new Col:\" + newCol);\r\n\r\n do{\r\n //System.out.println(\"In do\");\r\n //System.out.println(\"old Row:\" + oldRow);\r\n //System.out.println(\"old Col:\" + oldCol);\r\n //System.out.println(\"new Row:\" + newRow);\r\n //System.out.println(\"new Col:\" + newCol);\r\n\r\n if (oldCol<newCol) {\r\n oldCol++;\r\n }\r\n else {\r\n oldCol--;\r\n }\r\n\r\n if(oldRow<newRow) {\r\n oldRow++;\r\n }\r\n else {\r\n oldRow--;\r\n }\r\n\r\n\r\n if ((Chessboard.chessBoard[oldRow][oldCol].getPiece()!=null) && (oldCol!=newCol && oldRow!=newRow)) {\r\n\r\n return false;\r\n }\r\n\r\n } while (oldCol!=newCol && oldRow != newRow);\r\n //System.out.println(\"debug c\");\r\n return true;\r\n\r\n\r\n\r\n }\r\n\r\n return false;\r\n }", "public void rotateBack() {\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tsquares[i][j] = tmp_grid[i][j];\n\t\t}", "public static void rotate(int[][] matrix) {\n int numLayers = matrix.length / 2;\n\n for (int i = 0; i < numLayers; i++) {\n int beginningPixel = i;\n int lastPixel = matrix.length - i - 1;\n // don't swap the last pixel because it was already swapped as the first pixel of another row\n for (int j = beginningPixel; j < lastPixel; j++) {\n int top = matrix[i][j];\n // left -> top\n matrix[i][j] = matrix[matrix.length - j - 1][i];\n\n // bottom -> left\n matrix[matrix.length - j - 1][i] = matrix[matrix.length - i - 1][matrix.length - j - 1];\n\n // right -> bottom\n matrix[matrix.length - i - 1][matrix.length - j - 1] = matrix[j][matrix.length - i - 1];\n\n // top -> right\n matrix[j][matrix.length - i - 1] = top;\n }\n }\n }", "public static void rotate(int[][] mat) {\n System.out.println(Arrays.deepToString(mat));\n for(int i = 0; i < mat.length; i++) {\n \t// NOTE : j starts from i+1 and not 0. Else the matrix is restored to its initial state.\n for(int j = i+1; j < mat.length; j++) {\n \tint temp = mat[i][j];\n mat[i][j] = mat[j][i];\n mat[j][i] = temp;\n }\n }\n System.out.println(Arrays.deepToString(mat));\n for(int i = 0; i < mat.length; i++) {\n for(int j = 0; j < mat[0].length/2; j++) {\n int temp = mat[i][j];\n mat[i][j] = mat[i][mat[0].length-j-1];\n mat[i][mat[0].length - j - 1] = temp;\n }\n }\n System.out.println(Arrays.deepToString(mat));\n }", "public boolean isToeplitzMatrix(int[][] matrix) {\n \t\n \t//將i取出作為local variable,使能夠讀取當前行的下一行\n \t//例如當前讀第0行,使得能夠先讀到第1行\n \tint i=0;\n \tList<Integer> list = new ArrayList<>();\n \t\n \t//若矩陣長度<=1 則回傳true\n \tif(matrix.length <= 1)\n \t\treturn true;\n \t/*以行為主走訪\n \t * 走訪第n與n+1行*/\n \t\n \t//因為要讓內層第二個迴圈走訪到最後一行,故最外層走訪0~(列數-1)行\n \tfor(i=0 ; i<matrix[0].length-1 ; i++){\n \t\t//走訪每行的元素,並加到list中\n \t\tfor(int j=0 ; j<matrix.length ; j++){\n \t\t\tlist.add(matrix[j][i]);\n \t\t\t//System.out.println(matrix[j][i]);\n \t\t}\n \t\t//走訪i+1行的元素,並加到list中\n \t\tfor(int k=0 ; k<matrix.length ; k++){\n \t\t\tlist.add(matrix[k][i+1]);\n \t\t\t//System.out.println(matrix[k][i+1]);\n \t\t}\n \t\t\n \t\t/*以[1,2,3,4],[5,1,2,3],[9,5,1,2]為例\n \t\t * 我們以行為主走訪,可得知每次只需要比較前兩筆資料是否與下一行的後兩筆資料相符,就可以判斷是否符合題目要求\n \t\t * 因此將list內元素拿出來做比較,經過上面兩個迴圈的走訪後,第一次list內會有1,5,9,2,1,5這些元素\n \t\t * 只需比較上述矩陣的前兩筆資料是否與後兩筆相同(h+matrix.length+1)就可確認是否符合題目要求\n \t\t*/\n \t\tfor(int h=0 ; h<matrix.length-1 ;h++){\n \t\t\tif(list.get(h) != list.get(h+matrix.length+1)){\n \t\t\t//\tSystem.out.println(list.get(h));\n \t\t\t// System.out.println(list.get(h+matrix.length+1));\n \t\t\t\treturn false;\n \t\t\t}\n \t\t}\n \t\tlist.clear();\n \t}\n \treturn true;\n }", "public Matrix rotate90Degree() {\n\t\tMatrix rotatedMatrix = new Matrix(this.getHeight(), this.getWidth());\n\t\tfor(int i = 0; i < this.getWidth(); i++) {\n\t\t\tfor(int j = 0; j < this.getHeight(); j++) {\n\t\t\t\trotatedMatrix.setElement(j, (this.getWidth() -1) - i, data[i][j]);\n\t\t\t}\n\t\t}\n\t\tthis.show();\n\t\trotatedMatrix.show();\n\t\treturn rotatedMatrix;\n\t}", "public static void rotate(int [][]matrix, int n){\n for(int layer = 0; layer < n / 2 ; ++layer){\n int first = layer;\n int last = n - 1 - layer;\n for(int i = first; i < last; ++i){\n int offset = i - first;\n //save top\n int top = matrix[first][i];\n //left to top\n matrix[first][i] = matrix[last-offset][first];\n //bottom to left\n matrix[last-offset][first] = matrix[last][last-offset];\n //right to bottom\n matrix[last][last-offset] = matrix[i][last];\n //top to right\n matrix[i][last] = top;\n }\n }\n }", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "public void rotateRow(int a, int b) {\n for (int i = 0; i < b; i++) {\n char last = screen[a][screen[a].length - 1];\n for (int j = screen[a].length - 2; j >= 0; j--) {\n screen[a][j + 1] = screen[a][j];\n }\n screen[a][0] = last;\n }\n }", "public int orangesRotting(int[][] grid) {\n /**\n 经典的bfs 队列模拟\n 要注意的是 记录层数即为times的消耗 用queue.size 来遍历 每次先记录queue的大小 若size减为0 则说明当前层遍历完\n\n 这题要注意几个corner case\n 1.有永远新鲜的水果 1的周围都是0\n 2.原本就没有水果 全是空格0\n\n **/\n int time=0;\n if(grid==null||grid.length==0)return 0;\n\n Queue<int[]> queue=new LinkedList<>();\n\n\n int flag=0;\n for(int i=0;i<grid.length;i++){\n for(int j=0;j<grid[0].length;j++){\n if(grid[i][j]==2)\n queue.add(new int[]{i,j});\n if(grid[i][j]==1)\n flag=1;\n }\n }\n if(queue.isEmpty()&&flag==0)return 0;\n\n int dir[][]={{0,1},{0,-1},{1,0},{-1,0}};\n\n\n\n while(!queue.isEmpty()){\n int size=queue.size();\n while(size>0){\n int[] cur=queue.poll();\n\n for(int i=0;i<4;i++){\n int x=cur[0]+dir[i][0];\n int y=cur[1]+dir[i][1];\n if(x<0||x>=grid.length||y<0||y>=grid[0].length)continue;\n if(grid[x][y]==1){\n grid[x][y]=2;\n queue.add(new int[]{x,y});\n }\n\n }\n size--;\n }\n\n time++;\n\n }\n\n for(int i=0;i<grid.length;i++){\n for(int j=0;j<grid[0].length;j++){\n if(grid[i][j]==1)\n return -1;\n }\n }\n\n\n return time-1;\n }", "public boolean[][] getRotateRight() {\n boolean[][] out = new boolean[size][size];\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n out[x][y] = tileLogic[y][size - x - 1];\n return out;\n }", "public Matrix rotate90DegreeInPlace() {\n\t\tfor(int layer = 0; layer < this.getWidth() / 2; ++layer) {\n\t\t\tint first = layer;\n\t\t\tint last = this.getWidth() - 1 - layer;\n\t\t\t\n\t\t\tfor(int i = first; i < last; ++i) {\n\t\t\t\tint offset = i - first;\n\t\t\t\t\n\t\t\t\t//save top\n\t\t\t\tdouble top = this.getElement(first, i);\n\t\t\t\t\n\t\t\t\t// left -> top\n\t\t\t\tthis.setElement(first, i, this.getElement(last - offset, first));\n\t\t\t\t// bottom -> left\n\t\t\t\tthis.setElement(last - offset, first, this.getElement(last, last - offset));\n\t\t\t\t// right -> bottom\n\t\t\t\tthis.setElement(last, last - offset, this.getElement(i, last));\n\t\t\t\t// top -> right\n\t\t\t\tthis.setElement(i, last, top);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "private int checkRow() {\n for (int i = 0; i < 3; i++) {\n if ((this.board[0][i] == this.board[1][i]) && (this.board[0][i] == this.board[2][i])) {\n return this.board[0][i];\n }\n }\n return 0;\n }", "void rotate();", "public Matrix rref() {\n\t\tMatrix m = ref();\n\t\tint pivotRow = m.M - 1;\n\t\tArrayList<Integer> pivotColumns = m.pivotColumns();\n\t\tCollections.reverse(pivotColumns);\n\t\tfor (int i = 0; i < pivotColumns.size(); i++) {\n\t\t\tint pivotCol = pivotColumns.get(i);\n\t\t\twhile (pivotRow >= 0 && m.ROWS[pivotRow][pivotCol].equals(new ComplexNumber(0))) {\n\t\t\t\tpivotRow--;\n\t\t\t}\n\t\t\tfor (int upperRow = pivotRow - 1; upperRow > -1; upperRow--) {\n\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\tComplexNumber factor2 = m.ROWS[upperRow][pivotCol];\n\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][pivotCol];\n\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\tm = m.rowAdd(upperRow, pivotRow, weight);\n\t\t\t}\n\t\t\tpivotRow--;\n\t\t}\n\t\treturn m;\n\t}", "public void testXYLineRotation() {\n b = 1; // A line along y=1 and z=0.\n u = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 2, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 2, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, 1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1+Math.sqrt(2)/2, Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "@Test\n public void testGetRotationMatrix() {\n \n AxisRotation rotation = new AxisRotation(0, 0, 1, 54);\n Mat3D rotationMatrix1 = rotation.getRotationMatrix();\n \n AxisRotation rotation2 = new AxisRotation(0, 0, 1, 324);\n Mat3D rotationMatrix2 = rotation2.getRotationMatrix();\n \n System.out.println(\"test\");\n }", "private int[][] getSquare(int row, int col) {\n int[][] square = new int[3][3];\n\n int rowStart = (row/3)*3;\n int colStart = (col/3)*3;\n\n for (int r = rowStart; r < rowStart + 3; r++) {\n for (int c = colStart; c < colStart + 3; c++) {\n square[r-rowStart][c-colStart] = numbers[r][c];\n }\n }\n\n return square;\n }", "public void testStableRotations() {\n\n // Get a random point (x, y, z) and axis through (a, b, c).\n double x = getRandom();\n double y = getRandom();\n double z = getRandom();\n a = getRandom();\n b = getRandom();\n c = getRandom();\n u = getRandom();\n v = getRandom();\n w = getRandom();\n\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double distAxis = rM.distanceFromAxis(x, y, z);\n double distPt2 = (a-x)*(a-x) + (b-y)*(b-y) + (c-z)*(c-z);\n\n double[] result = null;\n double resultDistAxis;\n double resultDistPt2;\n for(int i=0; i<200; i++) {\n theta = getRandom()*pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(x, y, z);\n resultDistAxis\n = rM.distanceFromAxis(result[0], result[1], result[2]);\n // Rotations shouldn't change the distance from the axis.\n assertEquals(distAxis, resultDistAxis, TOLERANCE);\n\n // Rotations shouldn't change the distance from a fixed\n // point (a, b, c) on the axis.\n resultDistPt2 = (a-result[0])*(a-result[0])\n + (b-result[1])*(b-result[1]) + (c-result[2])*(c-result[2]);\n assertEquals(distPt2, resultDistPt2, TOLERANCE);\n }\n }", "private boolean isSafe(int row, int column) \r\n\t{\r\n\t\tfor(int i=0;i<row;i++)\r\n\t\t{\r\n\t\t\tif(x[i] == column) // Same Column\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\tif(i-row == x[i] -column || i-row == column-x[i]) // Same Diagonal\r\n\t\t\t\treturn false;\r\n\t\t\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\treturn true;\r\n\t}", "boolean ompleMatriuRestant(int i, int j) {\r\n // System.out.println(i+\" \"+j); \r\n if (j >= N && i < N - 1) {\r\n i = i + 1;\r\n j = 0;\r\n }\r\n if (i >= N && j >= N) {\r\n return true;\r\n }\r\n\r\n if (i < SRN) {\r\n if (j < SRN) {\r\n j = SRN;\r\n }\r\n } else if (i < N - SRN) {\r\n if (j == (int) (i / SRN) * SRN) {\r\n j = j + SRN;\r\n }\r\n } else {\r\n if (j == N - SRN) {\r\n i = i + 1;\r\n j = 0;\r\n if (i >= N) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n for (int num = 1; num <= N; num++) {\r\n if (validaNumero(i, j, num)) {\r\n mat[i][j] = num;\r\n if (ompleMatriuRestant(i, j + 1)) {\r\n return true;\r\n }\r\n\r\n mat[i][j] = 0;\r\n }\r\n }\r\n return false;\r\n }", "private static boolean isItSafe(boolean matrix[][] , int row , int col) {\t\n\t\tfor(int i = row ; i >= 0 ; i-- )\n\t\t{\n\t\t\tif(matrix[i][col] == true)\n\t\t\t\treturn false;\n\t\t}\n\t/*for loop to check LD*/\n\t\tfor(int i = row,j = col ; i>=0 && j>=0 ; i-- , j-- ) {\n\t\t\tif(matrix[i][j] == true)\n\t\t\t\treturn false;\n\t\t}\n\t/*for loop to check RD*/\n\t\tfor(int i= row , j = col ; i>=0 && j< matrix[0].length ; i--,j++) {\n\t\t\tif(matrix[i][j] == true)\n\t\t\t\treturn false;\n\t\t}\n\treturn true;\n\t}", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "public static void rotate90CCWGrid(char[][] grid) {\r\n\t\tchar tmp = grid[0][0];\r\n\t\tgrid[0][0] = grid[0][2];\r\n\t\tgrid[0][2] = grid[2][2];\r\n\t\tgrid[2][2] = grid[2][0];\r\n\t\tgrid[2][0] = tmp;\r\n\r\n\t\ttmp = grid[0][1];\r\n\t\tgrid[0][1] = grid[1][2];\r\n\t\tgrid[1][2] = grid[2][1];\r\n\t\tgrid[2][1] = grid[1][0];\r\n\t\tgrid[1][0] = tmp;\r\n\t}", "public boolean verificaLinhaEColuna(int x, int y){\n for(int i = 0; i < 9; i++){\n if(matriz[x][y] == matriz[x][i] && y!=i){\n return false;\n }\n }\n\n for (int j = 0; j < 9; j++){\n if(matriz[x][y] == matriz[j][y] && x!=j){\n return false;\n }\n }\n\n return true;\n }", "public void testYAxisRotation() {\n v = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = 12*pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, 1, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {Math.sqrt(2)/2, 1, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "public Matrix ref() {\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn m;\n\t}", "public int isSymmetric(Region r) {\n\t\tif (!sizeEquals(r))\n\t\t\treturn 0;\n\t\t\n\t\tint res=0;\n\t\tfor (int i=0;i<Math.min(sizeX, r.sizeX);i++) {\n\t\t\tfor (int j=0;j<Math.min(sizeY, r.sizeY);j++) {\n\t\t\t\tif (this.get(i, j)!=r.get(r.sizeX-i-1, j))\n\t\t\t\t\tres++;\n\t\t\t}\n\t\t}\n\t\tif (res<square/10)\n\t\t\treturn 1;\n\t\t\n\t\tres=0;\n\t\tfor (int i=0;i<Math.min(sizeX, r.sizeX);i++) {\n\t\t\tfor (int j=0;j<Math.min(sizeY, r.sizeY);j++) {\n\t\t\t\tif (this.get(i, j)!=r.get(i, r.sizeY-j-1))\n\t\t\t\t\tres++;\n\t\t\t}\n\t\t}\n\t\tif (res<square/10)\n\t\t\treturn 2;\n\t\t\n\t\treturn 0;\n\t}", "private int checkDiagonal() {\n if ((this.board[0][0] == this.board[1][1]) && this.board[0][0] == this.board[2][2]) {\n return this.board[0][0];\n } else if ((this.board[0][2] == this.board[1][1]) && this.board[0][2] == this.board[2][0]) {\n return this.board[0][2];\n } else {\n return 0;\n }\n }", "public boolean diag2(){\n\tboolean trouve=false;\n\tint i=0;\n\tObject tmp='@';\n\twhile(i<5 && !trouve){\n\t\tif(gc[i][gc.length-i-1]==tmp)\n\t\t\ttrouve=true;\n\t\telse\n\t\t\ti++;\n\t}\n\treturn trouve;\n}", "public static void main( String[] args ) {\n\tMatrix first = new Matrix();\n\tSystem.out.println(first);\n\tSystem.out.println(first.size());\n\tfirst.set(1,1,5);\n\tSystem.out.println(first.get(1,1)); //5\n\tSystem.out.println(first.isEmpty(1,1)); //false\n\tSystem.out.println(first.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tMatrix second = new Matrix(2);\n\tSystem.out.println(second);\n\tSystem.out.println(second.size());\n\tsecond.set(1,1,5);\n\tSystem.out.println(second.get(1,1)); //5\n\tSystem.out.println(second.isEmpty(1,1)); //false\n\tSystem.out.println(second.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tSystem.out.println(first.equals(second)); //true\n\n\tfirst.swapColumns(0,1);\n\tSystem.out.println(first);\n\tfirst.swapRows(0,1);\n\tSystem.out.println(first);\n\n\tSystem.out.println(first.isFull()); //false\n\t/*\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setRow(0,first.getCol(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setCol(0,first.getRow(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getCol(0));\n\t*/\n\tfirst.set(1,0,6);\n\tfirst.set(1,1,7);\n\tfirst.set(0,1,8);\n\tSystem.out.println(first);\n\tfirst.transpose();\n\tSystem.out.println(first);\n\tSystem.out.println(first.contains(6)); //true\n\n }", "public void testZAxisRotation() {\n w = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, Math.sqrt(2), 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = 3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {-Math.sqrt(2), 0, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, -Math.sqrt(2), 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "private int matrixRowToGridCol(int i) \n {\n return (i % dimSquared) / gDim + 1;\n }", "private Cell get_top_right_diagnoal_cell(int row, int col) {\n return get_cell(--row, ++col);\n }", "public int[][] rotate(){\r\n\t\tpos = (pos == (limit - 1))? 1:pos + 1;\r\n\t\treturn coords(pos);\r\n\t}", "private int matrixRowToGridRow(int i) \n {\n return i / dimSquared + 1;\n }", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "static PMatrix3D getRotMatrixForRodrigues(PVector rodrigues ) {\n PMatrix3D R =new PMatrix3D();\n float theta=rodrigues.mag();\n if (theta<0.0001)return R;\n PVector normalized=PVector.mult(rodrigues, 1.0f/theta);\n\n\n float x = normalized.x;\n float y = normalized.y;\n float z = normalized.z;\n\n float c = (float)Math.cos( theta );\n float s = (float)Math.sin( theta );\n float oc = 1.0f - c;\n\n R.m00 = c + x * x * oc;\n R.m01 = x * y * oc - z * s;\n R.m02 = x * z * oc + y * s;\n\n R.m10 = y * x * oc + z * s;\n R.m11 = c + y * y * oc;\n R.m12 = y * z * oc - x * s;\n\n R.m20 = z * x * oc - y * s;\n R.m21 = z * y * oc + x * s;\n R.m22 = c + z * z * oc;\n\n return R;\n }", "void applyRotationMatrix() {\n for (int i = 0; i < coors.length; i++) {\n for (int j = 0; j < coors[i].length; j++) {\n newCoors[i][j] = coors[i][0] * R[j][0] + coors[i][1] * R[j][1] + coors[i][2] * R[j][2];\n }\n // add perspective\n float scale = map(Math.abs(newCoors[i][2]), 0, (float) (halfSize * Math.sqrt(3)), 1, 1.5f);\n if (newCoors[i][2] < 0) {\n scale = 2f - scale;\n }\n for (int j = 0; j < 2; j++) {\n newCoors[i][j] *= scale;\n }\n }\n // to R2\n // just dont use Z\n setPathAndAlpha();\n }", "public static double[][] rotate2D180(double[][] r){\n\t\tint m = r.length;\n\t\tdouble[][] ret = new double[m][2];\n\t\tfor(int i=0; i<r.length; i++){\n\t\t\tret[i][0] = -1.0 * r[i][0];\n\t\t\tret[i][1] = -1.0 * r[i][1];\n\t\t}\n\t\t//System.out.println(\"After rotate:\");\n\t\t//System.out.println(Util.dblMatToString(ret));\n\t\treturn ret;\n\t}", "public static boolean isScalar(int [][] mat, int row) {\n\t for(int i=0;i<row;i++)\r\n\t\t if(mat[i][i]!=mat[i+1][i+1])\r\n\t\t\t return false;\r\n\t return true;\r\n }", "private int hashMath (int r, int c, int columns) {\n return currentState[r][c];\n }", "Matrix inverse(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n Matrix miden = new Matrix(m.rows,m.cols);\r\n miden = miden.identity();\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n swapRow(mtemp,i,j);\r\n swapRow(miden,i,j);\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=mtemp.rows-1;i>0;i--){\r\n for(int k=i-1; k>-1; k--){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=mtemp.cols-1;j>-1;j--){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n \r\n\r\n for(int i=0; i<mtemp.rows; i++){\r\n for(int j=0; j<mtemp.cols; j++){\r\n miden.M[i][j] /= mtemp.M[i][i];\r\n }\r\n }\r\n return miden;\r\n\r\n }", "private void getProperBaseMatrix(Matrix matrix) \r\n {\r\n \tif(mViewWidth == 0)\r\n \t\treturn;\r\n \t\r\n \tfloat w = mRoBitmap.getWidth();\r\n \tfloat h = mRoBitmap.getHeight();\r\n \t\r\n matrix.reset();\r\n // We limit up-scaling to 3x otherwise the result may look bad if it's\r\n // a small icon.\r\n float widthScale = (float)((float)mViewWidth / w);//Math.min((float)((float)mViewWidth / w), 3.0f);\r\n float heightScale = (float)((float)mViewHeight / h);//Math.min((float)((float)mViewHeight / h), 3.0f);\r\n float scale = Math.max(widthScale, heightScale);\r\n \r\n matrix.postConcat(mRoBitmap.getRotateMatrix());\r\n matrix.postScale(scale, scale);\r\n\r\n matrix.postTranslate(\r\n (mViewWidth - w * scale) / 2F,\r\n (mViewHeight - h * scale) / 2F);\r\n }", "private BigInteger squareKaratsuba() {\n int half = (mag.length+1) / 2;\n\n BigInteger xl = getLower(half);\n BigInteger xh = getUpper(half);\n\n BigInteger xhs = xh.square(); // xhs = xh^2\n BigInteger xls = xl.square(); // xls = xl^2\n\n // xh^2 << 64 + (((xl+xh)^2 - (xh^2 + xl^2)) << 32) + xl^2\n return xhs.shiftLeft(half*32).add(xl.add(xh).square().subtract(xhs.add(xls))).shiftLeft(half*32).add(xls);\n }", "List<Integer> spiralOrderWalk(int[][] matrix) {\n List<Integer> result = new LinkedList<Integer>();\n int rows = matrix.length;\n if (rows == 0) {\n return result;\n }\n int cols = matrix[0].length;\n int[] dc = new int[] { 1, 0, -1, 0 };\n int[] dr = new int[] { 0, 1, 0, -1 };\n boolean[][] visited = new boolean[rows][cols];\n int dir = 0;\n int r = 0;\n int c = 0;\n while (isInside(r, c, rows, cols) && !visited[r][c]) {\n visited[r][c] = true;\n result.add(matrix[r][c]);\n int nr = r + dr[dir];\n int nc = c + dc[dir];\n if (isInside(nr, nc, rows, cols) && !visited[nr][nc]) {\n r = nr;\n c = nc;\n } else {\n dir = (dir + 1) % 4;\n r += dr[dir];\n c += dc[dir];\n }\n }\n return result;\n }", "protected Matrix symmetrize(Matrix lower) {\r\n Matrix upper = lower;\r\n for(int i = 0; i < upper.getRowCount(); i++) {\r\n int index = i;\r\n upper.getAndSet(i, r -> {\r\n for(int j = index + 1; j < r.length; j++) {\r\n r[j] = lower.get(j, index);\r\n }\r\n });\r\n }\r\n return upper;\r\n }", "void copyRotation(DMatrix3 R);", "@Test\n public void testCreateTranspose2(){\n double[][] a = new double[5][5];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }", "public static void rotate(int num) {\n for (int s = 0; s < num; s++) {\n int up = s; // 0 , 1\n int down = N - 1 - s;\n int left = s;\n int right = M - 1 - s;\n\n int tmp = map[s][s];\n for (int i = left; i < right; i++){ // 위\n map[up][i] = map[up][i + 1];\n }\n for (int i = up; i < down; i++){ // 오른쪽\n map[i][right] = map[i + 1][right];\n }\n for (int i = right; i > left; i--){ // 아래\n map[down][i] = map[down][i - 1];\n }\n for (int i = down; i > up; i--){ // 왼쪽\n map[i][left] = map[i - 1][left];\n }\n map[up + 1][left] = tmp;\n }\n }", "private AVLTreeNode<E> smallRotateRight(AVLTreeNode<E> node) {\n AVLTreeNode<E> q = node.getLeft();\n node.setLeft(q.getRight());\n q.setRight(node);\n node.fixHeight();\n q.fixHeight();\n return q;\n }", "private boolean canMoveRight()\n {\n // runs through row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = grid[row].length-2; column >=0 ; column-- ) {\n\n // looks at tile directly to the right of the current tile\n int compare = column + 1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true; \n }\n }\n }\n } \n return false;\n }", "private int rcvToMatrixRow(int i, int j, String symb) \n {\n int v = indexOf(symb);\n return (i - 1) * dimSquared + (j - 1) * gDim + (v - 1);\n }", "public void testXAxisRotation() {\n u = 1;\n theta = pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, 1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, Math.sqrt(2)/2, Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -Math.sqrt(2)/2, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n u = -1;\n theta = 3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -Math.sqrt(2)/2, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "void rotate () {\n final int rows = currentPiece.height;\n final int columns = currentPiece.width;\n int[][] rotated = new int[columns][rows];\n\n for (int i = 0; i < rows; i++)\n for (int j = 0; j < columns; j++)\n rotated[j][i] = currentPiece.blocks[i][columns - 1 - j];\n\n Piece rotatedPiece = new Piece(currentPiece.color, rotated);\n int kicks[][] = {\n {0, 0},\n {0, 1},\n {0, -1},\n //{0, -2},\n //{0, 2},\n {1, 0},\n //{-1, 0},\n {1, 1},\n //{-1, 1},\n {1, -1},\n //{-1, -1},\n };\n for (int kick[] : kicks) {\n if (canMove(currentRow + kick[0], currentColumn + kick[1], rotatedPiece)) {\n //System.out.println(\"Kicking \" + kick[0] + \", \" + kick[1]);\n currentPiece = rotatedPiece;\n currentRow += kick[0];\n currentColumn += kick[1];\n updateView();\n break;\n }\n }\n }", "public static void main(String[] args) {\n int cols1, cols2, rows1, rows2, num_usu1, num_usu2;\r\n \r\n try{\r\n \r\n cols1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a primeira matriz:\"));\r\n rows1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a primeira matriz:\"));\r\n cols2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a segunda matriz:\"));\r\n rows2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a segunda matriz:\"));\r\n \r\n int[][] matriz1 = MatrixInt.newRandomMatrix(cols1, rows1);\r\n int[][] matriz2 = MatrixInt.newSequentialMatrix(cols2, rows2);\r\n \r\n System.out.println(\"Primeira matriz:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Segunda matriz:\");\r\n MatrixInt.imprimir(matriz2);\r\n System.out.println(\" \");\r\n \r\n MatrixInt.revert(matriz2);\r\n \r\n System.out.println(\"Matriz sequancial invertida:\");\r\n MatrixInt.imprimir(matriz2);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n \r\n num_usu1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero qualquer:\"));\r\n \r\n for1: for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 == matriz1[i][j]){\r\n System.out.println(\"O numero '\"+num_usu1+\"' foi encontardo na posição:\" + i);\r\n break for1;\r\n }else if(j == (matriz1[i].length - 1) && i == (matriz1.length - 1)){\r\n System.out.println(\"Não foi encontrado o numero '\"+num_usu1+\"' no vetor aleatorio.\");\r\n break for1;\r\n } \r\n }\r\n }\r\n \r\n String menores = \"\", maiores = \"\";\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 > matriz1[i][j]){\r\n menores = menores + matriz1[i][j] + \", \";\r\n }else if(num_usu1 < matriz1[i][j]){\r\n maiores = maiores + matriz1[i][j] + \", \";\r\n }\r\n }\r\n }\r\n System.out.println(\" \");\r\n System.out.print(\"Numeros menores que '\"+num_usu1+\"' :\");\r\n System.out.println(menores);\r\n System.out.print(\"Numeros maiores que '\"+num_usu1+\"' :\");\r\n System.out.println(maiores);\r\n \r\n num_usu2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero que exista na matriz aleatoria:\"));\r\n \r\n int trocas = MatrixInt.replace(matriz1, num_usu2, num_usu1);\r\n \r\n if (trocas == 0) {\r\n System.out.println(\" \");\r\n System.out.println(\"Não foi realizada nenhuma troca de valores.\");\r\n }else{\r\n System.out.println(\" \");\r\n System.out.println(\"O numero de trocas realizadas foi: \"+trocas);\r\n }\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n \r\n int soma_total = 0;\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n soma_total += matriz1[i][j];\r\n }\r\n \r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"A soma dos numeros da matriz foi: \" + soma_total);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria\");\r\n Exercicio2.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz sequencial\");\r\n Exercicio2.imprimir2(matriz2);\r\n \r\n }catch(Exception e){\r\n System.out.println(e);\r\n }\r\n \r\n \r\n \r\n }", "public int getSquareMoveNumber(int row, int col) {\n return playingBoard[row][col].getMoveNumber();\n }", "public boolean[][] getRotateLeft() {\n boolean[][] out = new boolean[size][size];\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n out[x][y] = tileLogic[size - y - 1][x];\n return out;\n }", "void copyOffsetRotation (DMatrix3 R);" ]
[ "0.6839497", "0.6573267", "0.63649976", "0.6329602", "0.6296674", "0.6256894", "0.6248781", "0.62473816", "0.62146395", "0.6207917", "0.6129315", "0.6120296", "0.60681856", "0.5935153", "0.5894334", "0.5887079", "0.58750725", "0.5817168", "0.58126867", "0.57958513", "0.5761493", "0.57422817", "0.57234454", "0.5685954", "0.5684736", "0.5656151", "0.56473356", "0.5640929", "0.56378615", "0.5609584", "0.5609025", "0.55995965", "0.5581829", "0.55790555", "0.55743474", "0.55448437", "0.5543124", "0.55317736", "0.5530645", "0.5529901", "0.5517434", "0.5506899", "0.54754186", "0.54700816", "0.5463294", "0.5459899", "0.5454569", "0.54495347", "0.54394275", "0.54267156", "0.54078436", "0.5403129", "0.53990567", "0.5394115", "0.53868335", "0.5374208", "0.5360608", "0.53524375", "0.53517836", "0.53464144", "0.53233427", "0.53123057", "0.5298806", "0.5298091", "0.5296124", "0.5294623", "0.5287184", "0.52764416", "0.52639055", "0.52631396", "0.5255641", "0.52532804", "0.5251828", "0.52499896", "0.5248065", "0.52451223", "0.52403575", "0.52344817", "0.5232756", "0.5231849", "0.52283585", "0.522672", "0.5226266", "0.5222206", "0.52187705", "0.5208881", "0.51964325", "0.51956403", "0.5194898", "0.5182871", "0.517617", "0.5174054", "0.51737595", "0.51720357", "0.5150753", "0.5150267", "0.514032", "0.5137234", "0.51372004", "0.5133145" ]
0.6121394
11
helper function shoudl beprivate and static
private static void rotate(int[][] a, start, end){ for (int current = 0; start+current < end; current++){ int temp = a[start][start+current]; // save the top a[start][start+current] = a[end-current][start]; // left to top moveing left elemnt to top a[end-current][start] = a[end][end-current]; // bottom element to left a[end][end-current] = a[start+current][end]; // right element to bottom a[start+current][end] = temp; // top elemrnt to right } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Util() { }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void strin() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private void kk12() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public abstract void mo56925d();", "private void m50366E() {\n }", "static void sm() {\n }", "static void feladat9() {\n\t}", "public void mo38117a() {\n }", "public abstract void mo70713b();", "private void test() {\n\n\t}", "public abstract String mo41079d();", "public abstract String mo13682d();", "static void feladat7() {\n\t}", "static void feladat4() {\n\t}", "private BuilderUtils() {}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo9239aw();", "public abstract String mo118046b();", "protected void mo6255a() {\n }", "protected boolean func_70041_e_() { return false; }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private static void staticFun()\n {\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "public void smell() {\n\t\t\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 }", "public abstract void mo27385c();", "public abstract void mo27386d();", "public void mo55254a() {\n }", "void mo57277b();", "static void feladat3() {\n\t}", "public abstract String mo8770a();", "private ReportGenerationUtil() {\n\t\t\n\t}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Override\n\tpublic void initUtils() {\n\n\t}", "static void feladat6() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "private test5() {\r\n\t\r\n\t}", "private Helper() {\r\n // empty\r\n }", "public final void mo51373a() {\n }", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "public abstract void mo6549b();", "private Rekenhulp()\n\t{\n\t}", "private Util() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private JacobUtils() {}", "static void init() {}", "private void poetries() {\n\n\t}", "public void mo4359a() {\n }", "public static void listing5_14() {\n }", "public void mo21787L() {\n }", "void m1864a() {\r\n }", "void mo57278c();", "public abstract String mo9238av();", "public abstract void mo30696a();", "protected abstract Set method_1559();", "static void feladat5() {\n\t}", "public void func_70295_k_() {}", "private CheckUtil(){ }", "public void mo21825b() {\n }", "private ProcessorUtils() { }", "private void sub() {\n\n\t}", "public void mo3376r() {\n }", "public abstract void mo35054b();", "public void mo56167c() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo21794S() {\n }", "void mo72113b();", "private FormatUtilities() {}", "public void mo21779D() {\n }", "public void method_191() {}", "private CreateDateUtils()\r\n\t{\r\n\t}", "public void mo21878t() {\n }", "public void mo21782G() {\n }", "private HelperLocation() {}", "public abstract String mo41086i();", "public void mo21793R() {\n }", "private void ss(){\n }", "protected void h() {}" ]
[ "0.62458336", "0.60561275", "0.60561275", "0.58356553", "0.58171916", "0.5800669", "0.5764604", "0.5760367", "0.5724719", "0.5704225", "0.5680794", "0.5672684", "0.5515734", "0.5515734", "0.5515734", "0.5515734", "0.5507018", "0.5494608", "0.5481578", "0.5467099", "0.5427324", "0.541459", "0.5399423", "0.53893137", "0.53871465", "0.5379625", "0.53742135", "0.5373413", "0.5369797", "0.53669167", "0.5363895", "0.5359203", "0.53568655", "0.5348396", "0.534245", "0.53352463", "0.5332675", "0.5332675", "0.53317744", "0.53294814", "0.53106004", "0.53106004", "0.53106004", "0.53106004", "0.53106004", "0.53106004", "0.53106004", "0.53098875", "0.53063613", "0.52997684", "0.52906644", "0.52901804", "0.5284495", "0.52789253", "0.5278036", "0.52763", "0.5273298", "0.5266559", "0.5261318", "0.5261164", "0.52578866", "0.525632", "0.5250235", "0.5250059", "0.5244281", "0.52441394", "0.52441394", "0.5240232", "0.52337736", "0.52323145", "0.5226825", "0.52224636", "0.52172595", "0.51939774", "0.5188608", "0.5184018", "0.5171613", "0.5166467", "0.5165444", "0.51635313", "0.515825", "0.5155661", "0.51494986", "0.51459473", "0.5143322", "0.51431686", "0.5137488", "0.51339585", "0.5132582", "0.51286143", "0.5125399", "0.5124546", "0.512243", "0.5120097", "0.5119471", "0.511315", "0.51114905", "0.51107293", "0.5110101", "0.51046747", "0.51044333" ]
0.0
-1
Create project with client.
protected Project createProjectWithClient(long id, Client client) { Project project = new Project(); setAuditableEntity(project); project.setActive(true); project.setClient(client); ProjectStatus projectStatus = createProjectStatus(100000); project.setProjectStatus(projectStatus); project.setId(id); project.setCompany(client.getCompany()); // persist object Query query = entityManager .createNativeQuery("insert into project (project_id, project_status_id, client_id, " + "company_id,name,active,sales_tax,po_box_number,payment_terms_id," + "description,creation_date,creation_user,modification_date," + "modification_user,is_deleted,is_manual_prize_setting)" + " values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); int idx = 1; query.setParameter(idx++, project.getId()); query.setParameter(idx++, project.getProjectStatus().getId()); query.setParameter(idx++, project.getClient().getId()); query.setParameter(idx++, project.getCompany().getId()); query.setParameter(idx++, project.getName()); query.setParameter(idx++, project.isActive()); query.setParameter(idx++, project.getSalesTax()); query.setParameter(idx++, project.getPOBoxNumber()); query.setParameter(idx++, project.getPaymentTermsId()); query.setParameter(idx++, project.getDescription()); query.setParameter(idx++, project.getCreateDate()); query.setParameter(idx++, project.getCreateUsername()); query.setParameter(idx++, project.getModifyDate()); query.setParameter(idx++, project.getModifyUsername()); query.setParameter(idx++, 0); query.setParameter(idx++, 0); query.executeUpdate(); query = entityManager .createNativeQuery("insert into client_project (project_id, client_id) values (?,?)"); idx = 1; query.setParameter(idx++, project.getId()); query.setParameter(idx++, project.getClient().getId()); query.executeUpdate(); return project; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Project createProject();", "Project createProject();", "Project createProject();", "public void createProject(Project newProject);", "@ApiMethod(\n \t\tname = \"createProject\", \n \t\tpath = \"createProject\", \n \t\thttpMethod = HttpMethod.POST)\n public Project createProject(final ProjectForm projectForm) {\n\n final Key<Project> projectKey = factory().allocateId(Project.class);\n final long projectId = projectKey.getId();\n final Queue queue = QueueFactory.getDefaultQueue();\n \n // Start transactions\n Project project = ofy().transact(new Work<Project>(){\n \t@Override\n \tpublic Project run(){\n \t\tProject project = new Project(projectId, projectForm);\n ofy().save().entities(project).now();\n \n return project;\n \t}\n }); \n return project;\n }", "public CreateProject() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void createProject(ProjectCreate project) {\n\t\tprojectDao.createProject(project);\n\t}", "public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }", "@TaskAction\n public void createProject()\n throws IOException {\n String projectName = getProjectName();\n\n // Get the output directory\n String outputDir = \"build/\";\n String projectFolderPath = outputDir + PROJECT_PREFIX + PROJECT_PREFIX_INTEGRATION + projectName;\n Path outputPath = getProject().mkdir(new File(projectFolderPath)).toPath();\n\n // Build the project\n new ProjectBuilder(projectName, outputPath, getProject()).build();\n }", "@Test (groups = {\"Functional\"})\n public void testAddProject() {\n //When\n CreateProject createProject = dashboard.clickCreateProjectButton();\n String projectName = \"TestProject\";\n String testAccount = \"Account1\";\n createProject.setProjectName(projectName);\n createProject.clickPublicProjectPrivacy();\n createProject.setAccountDropDown(testAccount);\n project = createProject.clickCreateProject();\n\n //Then\n assertEquals(PROJECT_NAME, project.getTitle());\n }", "private IProject createNewProject() {\r\n\t\tif (newProject != null) {\r\n\t\t\treturn newProject;\r\n\t\t}\r\n\r\n\t\t// get a project handle\r\n\t\tfinal IProject newProjectHandle = mainPage.getProjectHandle();\r\n\r\n\t\t// get a project descriptor\r\n\t\tURI location = mainPage.getLocationURI();\r\n\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tfinal IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());\r\n\t\tdescription.setLocationURI(location);\r\n\r\n\t\tlog.info(\"Project name: \" + newProjectHandle.getName());\r\n\t\t//log.info(\"Location: \" + location.toString());\r\n\t\t\r\n\t\t// create the new project operation\r\n\t\tIRunnableWithProgress op = new IRunnableWithProgress() {\r\n\t\t\tpublic void run(IProgressMonitor monitor)\r\n\t\t\t\t\tthrows InvocationTargetException {\r\n\t\t\t\tCreateProjectOperation op = new CreateProjectOperation(description, ResourceMessages.NewProject_windowTitle);\r\n\t\t\t\ttry {\r\n\t\t\t\t\top.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));\r\n\t\t\t\t} catch (ExecutionException e) {\r\n\t\t\t\t\tthrow new InvocationTargetException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// run the new project creation operation\r\n\t\ttry {\r\n\t\t\tgetContainer().run(true, true, op);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} catch (InvocationTargetException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tnewProject = newProjectHandle;\r\n\r\n\t\treturn newProject;\r\n\t}", "@PostMapping\n public ResponseEntity<Project> createNewProject(@Valid @RequestBody Project project) {\n\n Project project1 = projectService.saveOrUpdateProject(project);\n return new ResponseEntity<Project>(project1, HttpStatus.CREATED);\n }", "private static void createProject(final ProjectProperties props, final Path projectDir) throws IOException\n {\n // Create and set the Freemarker configuration\n final Configuration freeMarkerConfig = new Configuration();\n final File templateDir = new File(props.getApiDirectory(), \"templates\");\n freeMarkerConfig.setDirectoryForTemplateLoading(templateDir);\n freeMarkerConfig.setObjectWrapper(new DefaultObjectWrapper());\n\n // Generate the project\n final Injector injector = Guice.createInjector(new UtilInjectionModule(), new LocalInjectionModule());\n final ProjectGenerator projectGen = injector.getInstance(ProjectGenerator.class);\n projectGen.initialize(freeMarkerConfig, OUT_STREAM);\n try\n {\n projectGen.create(props, projectDir.toFile());\n }\n catch (final Exception ex)\n {\n OUT_STREAM.println(\"Error generating the project: \" + ex.getMessage());\n }\n }", "LectureProject createLectureProject();", "public static Projects createEntity() {\n Projects projects = new Projects();\n projects = new Projects()\n .name(DEFAULT_NAME)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .status(DEFAULT_STATUS);\n return projects;\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public OperationReference queueCreateProject(\r\n final TeamProject projectToCreate) {\r\n\r\n final UUID locationId = UUID.fromString(\"603fe2ac-9723-48b9-88ad-09305aa6c6e1\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.POST,\r\n locationId,\r\n apiVersion,\r\n projectToCreate,\r\n APPLICATION_JSON_TYPE,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, OperationReference.class);\r\n }", "private boolean createProject() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n Projects projects = app.getProjects();\r\n String userHome = System.getProperty(\"user.home\");\r\n // master file for projects management\r\n File projectsFile = new File(userHome + \"/.hackystat/projectoverviewer/projects.xml\");\r\n \r\n // create new project and add it to the projects\r\n Project project = new Project();\r\n project.setProjectName(this.projectName);\r\n project.setOwner(this.ownerName);\r\n project.setPassword(this.password);\r\n project.setSvnUrl(this.svnUrl);\r\n for (Project existingProject : projects.getProject()) {\r\n if (existingProject.getProjectName().equalsIgnoreCase(this.projectName)) {\r\n return false;\r\n }\r\n }\r\n projects.getProject().add(project);\r\n \r\n try {\r\n // create the specific tm3 file and xml file for the new project\r\n File tm3File = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".tm3\");\r\n File xmlFile = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".xml\");\r\n tm3File.createNewFile();\r\n \r\n // initialize the data for the file\r\n SensorDataCollector collector = new SensorDataCollector(app.getSensorBaseHost(), \r\n this.ownerName, \r\n this.password);\r\n collector.getRepository(this.svnUrl, this.projectName);\r\n collector.write(tm3File, xmlFile);\r\n } \r\n catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n // write the projects.xml file with the new project added\r\n String packageName = \"org.hackystat.iw.projectoverviewer.jaxb.projects\";\r\n return XmlConverter.objectToXml(projects, projectsFile, packageName);\r\n }", "public JiraProjectCreationResult createProject(\r\n String token, JiraProject project, JiraVersion version, ComponentType type) throws JiraManagerException {\r\n Util.logEnter(log, \"createProject\", token, project, version, type);\r\n Util.checkString(log, \"token\", token);\r\n Util.checkNull(log, \"project\", project);\r\n Util.checkNull(log, \"version\", version);\r\n Util.checkNull(log, \"type\", type);\r\n\r\n try {\r\n JiraProjectCreationResult result =\r\n getJiraManagementServicePort().createProject(token, project, version, type);\r\n Util.logExit(log, \"createProject\", result);\r\n return result;\r\n } catch (JiraServiceException e) {\r\n throw processError(e);\r\n }\r\n }", "@RequestMapping(value = \"/create/project/{projectId}\", method = RequestMethod.GET)\r\n public ModelAndView create(@PathVariable(\"projectId\") String projectId) {\r\n ModelAndView mav = new ModelAndView(\"creates2\");\r\n int pid = -1;\r\n try {\r\n pid = Integer.parseInt(projectId);\r\n } catch (Exception e) {\r\n LOG.error(e);\r\n }\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n Project project = hibernateTemplate.get(Project.class, pid);\r\n if (!dataAccessService.isProjectAvailableToUser(project, user)) {\r\n return accessdenied();\r\n }\r\n List<SubProject> subProjects = dataAccessService.getResearcherSubProjectsForUserInProject(user, project);\r\n mav.addObject(\"projectId\", projectId);\r\n mav.addObject(\"methods\", project.getMethods());\r\n mav.addObject(\"subProjects\", subProjects);\r\n return mav;\r\n }", "public static Project Create(String id)\n\t{\n\t\t// Need to use an ancestor query to do this inside a transaction.\n\t\t// But the ancestor of project is project.\n\t\t// So we just create a normal key with only the type and id\n\t\tproject = ofy().load().key(Key.create(Project.class, id)).now();\n\n\t\treturn project;\n\t}", "public void createProject(String nameProject, String nameDiscipline) throws \n InvalidDisciplineException,InvalidProjectException{\n int id = _person.getId();\n Professor _professor = getProfessors().get(id);\n _professor.createProject(nameProject, nameDiscipline);\n }", "@PostMapping(\"/projects\")\n @Timed\n public ResponseEntity<ProjectDTO> createProject(@Valid @RequestBody ProjectDTO projectDto)\n throws URISyntaxException, NotAuthorizedException {\n log.debug(\"REST request to save Project : {}\", projectDto);\n var org = projectDto.getOrganization();\n if (org == null || org.getName() == null) {\n throw new BadRequestException(\"Organization must be provided\",\n ENTITY_NAME, ERR_VALIDATION);\n }\n checkPermissionOnOrganization(token, PROJECT_CREATE, org.getName());\n\n if (projectDto.getId() != null) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"idexists\", \"A new project cannot already have an ID\"))\n .body(null);\n }\n if (projectRepository.findOneWithEagerRelationshipsByName(projectDto.getProjectName())\n .isPresent()) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"nameexists\", \"A project with this name already exists\"))\n .body(null);\n }\n ProjectDTO result = projectService.save(projectDto);\n return ResponseEntity.created(ResourceUriService.getUri(result))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getProjectName()))\n .body(result);\n }", "void createProjectForExercise(ProgrammingExercise programmingExercise) throws VersionControlException;", "Client createNewClient(Client client);", "public boolean createProject(String name, String key) {\n List<NameValuePair> param = new ArrayList<>();\n param.add(new BasicNameValuePair(\"name\", name));\n param.add(new BasicNameValuePair(\"key\", key));\n Map<String, String> props = new HashMap<>();\n props.put(\"Authorization\", Authentication.getBasicAuth(\"sonar\"));\n String url = Host.getSonar() + \"api/projects/create\";\n try {\n Object[] response = HttpUtils.sendPost(url, param, props);\n if (Integer.parseInt(response[0].toString()) == 200) return true;\n } catch (Exception e) {\n logger.error(\"Create sonar project: POST request error.\", e);\n }\n return false;\n }", "@When(\"I click on the Create new Project\")\n public void i_click_on_the_create_new_project(){\n\n i_click_on_create_a_new_project();\n }", "public Long createProject(ProjectTo projectTo) {\n\t\tprojectTo = new ProjectTo();\n\t\tprojectTo.setOrg_id(1L);\n\t\tprojectTo.setOrg_name(\"AP\");\n\t\tprojectTo.setName(\"Menlo\");\n\t\tprojectTo.setShort_name(\"Pioneer Towers\");\n\t\tprojectTo.setOwner_username(\"Madhapur\");\n\n\t\ttry {\n\t\t\tWebResource webResource = getJerseyClient(userOptixURL + \"CreateProject\");\n\t\t\tprojectTo = webResource.type(MediaType.APPLICATION_JSON).post(ProjectTo.class, projectTo);\n\t\t\tif(projectTo != null && projectTo.getProject_id() != null) {\n\t\t\t\treturn projectTo.getProject_id() ;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in getting the response from REST call CreateProject : \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/createClient/{moduleId}\", method = RequestMethod.GET)\n public @ResponseBody CreatorClient createClient(@PathVariable String moduleId){\n return creatorService.createClient(moduleId, null);\n }", "public static Project createProject() throws ParseException {\n System.out.println(\"Please enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the project name: \");\n String projName = input.nextLine();\n\n System.out.println(\"Please enter the type of building: \");\n String buildingType = input.nextLine();\n\n System.out.println(\"Please enter the physical address for the project: \");\n String address = input.nextLine();\n\n System.out.println(\"Please enter the ERF number: \");\n String erfNum = input.nextLine();\n\n System.out.println(\"Please enter the total fee for the project: \");\n int totalFee = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the total amount paid to date: \");\n int amountPaid = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the deadline for the project (dd/MM/yyyy): \");\n String sdeadline = input.nextLine();\n Date deadline = dateformat.parse(sdeadline);\n\n Person architect = createPerson(\"architect\", input);\n Person contractor = createPerson(\"contractor\", input);\n Person client = createPerson(\"client\", input);\n\n // If the user did not enter a name for the project, then the program will\n // concatenate the building type and the client's surname as the new project\n // name.\n\n if (projName == \"\") {\n String[] clientname = client.name.split(\" \");\n String lastname = clientname[clientname.length - 1];\n projName = buildingType + \" \" + lastname;\n }\n\n return new Project(projNum, projName, buildingType, address, erfNum, totalFee, amountPaid, deadline, contractor,\n architect, client);\n\n }", "@Test\n\tpublic void testCreate() throws Exception {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\tDate startDate = new Date();\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tcalendar.setTime(startDate);\n\t\tcalendar.add(Calendar.MONTH, 2);\n\t\t//\"name\":\"mizehau\",\"introduction\":\"dkelwfjw\",\"validityStartTime\":\"2015-12-08 15:06:21\",\"validityEndTime\":\"2015-12-10 \n\n\t\t//15:06:24\",\"cycle\":\"12\",\"industry\":\"1202\",\"area\":\"2897\",\"remuneration\":\"1200\",\"taskId\":\"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\"\n\t\tProject a = new Project();\n\t\tDate endDate = calendar.getTime();\n\t\tString name = \"mizehau\";\n\t\tString introduction = \"dkelwfjw\";\n\t\tString industry = \"1202\";\n\t\tString area = \"test闫伟旗创建项目\";\n\t\t//String document = \"test闫伟旗创建项目\";\n\t\tint cycle = 12;\n\t\tString taskId = \"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\";\n\t\tdouble remuneration = 1200;\n\t\tTimestamp validityStartTime = Timestamp.valueOf(sdf.format(startDate));\n\t\tTimestamp validityEndTime = Timestamp.valueOf(sdf.format(endDate));\n\t\ta.setArea(area);\n\t\ta.setName(name);\n\t\ta.setIntroduction(introduction);\n\t\ta.setValidityStartTime(validityStartTime);\n\t\ta.setValidityEndTime(validityEndTime);\n\t\ta.setCycle(cycle);\n\t\ta.setIndustry(industry);\n\t\ta.setRemuneration(remuneration);\n\t\ta.setDocument(taskId);\n\t\tProject p = projectService.create(a);\n\t\tSystem.out.println(p);\n\t}", "public static Project creer(String name){\n\t\treturn new Project(name);\n\t}", "protected void createProject(IProgressMonitor monitor)\n {\n monitor.beginTask(\"Creating the Totori project\", 50);\n try\n {\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n monitor.subTask(\"Defining the nature of the project\");\n IProject project = root.getProject(page.getProjectName());\n IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());\n if(!Platform.getLocation().equals(page.getLocationPath()))\n description.setLocation(page.getLocationPath());\n project.create(description,monitor);\n monitor.worked(10);\n project.open(monitor);\n description = project.getDescription();\n description.setNatureIds(new String[] { TotoriNature.NATURE_ID });\n project.setDescription(description,new SubProgressMonitor(monitor,10));\n monitor.subTask(\"Creating subdirectories\");\n createFolderHelper(root.getFolder(project.getFullPath().append(\"config\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"ext\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"ext\").append(\"nircmd\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"plugins\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"steps\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"support\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\").append(\"assets\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\").append(\"screens\")), monitor);\n project.setDescription(description,new SubProgressMonitor(monitor,10));\n monitor.subTask(\"Creating files\");\n Vector<String> assets = new Vector<String>();\n assets.add(\"config/myconfig.yml\");\n assets.add(\"ext/nircmd/nircmd.chm\");\n assets.add(\"ext/nircmd/nircmd.exe\");\n assets.add(\"ext/nircmd/nircmdc.exe\");\n assets.add(\"features/support/env.rb\");\n assets.add(\"features/support/functions.rb\");\n assets.add(\"features/support/screenshots.rb\");\n assets.add(\"features/support/totori_formatter.rb\");\n assets.add(\"reports/assets/jquery-1.4.1.min.js\");\n assets.add(\"reports/assets/jquery.lightbox-0.5.css\");\n assets.add(\"reports/assets/jquery.lightbox-0.5.min.js\");\n assets.add(\"reports/assets/jquery.thumbs.js\");\n assets.add(\"reports/assets/lightbox-blank.gif\");\n assets.add(\"reports/assets/lightbox-btn-close.gif\");\n assets.add(\"reports/assets/lightbox-btn-next.gif\");\n assets.add(\"reports/assets/lightbox-btn-prev.gif\");\n assets.add(\"reports/assets/lightbox-ico-loading.gif\");\n assets.add(\"reports/assets/search.png\");\n assets.add(\"reports/assets/thumbs.css\");\n assets.add(\"reports/assets/totori.css\");\n for(String asset : assets) {\n \t String resource = \"/assets/\"+asset;\n \t InputStream stream = this.getClass().getResourceAsStream(resource);\n \t System.out.println(resource + \" : \" + stream);\n IPath path = project.getFullPath();\n for(String dir : asset.split(\"/\")) {\n \t path = path.append(dir);\n }\n IFile file = root.getFile(path);\n //file.getFullPath().toFile().mkdirs();\n //file.setCharset(\"utf-8\", monitor);\n file.create(stream, false, monitor);\n }\n monitor.worked(20);\n }\n catch(CoreException x)\n {\n reportError(x);\n }\n finally\n {\n monitor.done();\n }\n }", "BuildClient createBuildClient();", "public void newProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_NewProjectDialog.fxml\");\n\t\tdialog.initOwner(newProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'new project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n @RequestMapping(value = \"/createClient/{moduleId}\", method = RequestMethod.POST)\n public @ResponseBody CreatorClient createClient(@RequestBody String body, @PathVariable String moduleId){\n Map<String, ?> data = parseJsonToMap(body);\n List<String> toolNames = (List<String>) data.remove(\"tools\");\n return creatorService.createClient(moduleId, toolNames, (Map<String, String>)data);\n }", "public Project procreate(Project pud) throws IOException {\n\t\tString ur = url + \"/procreate\";\n\t\tProject us = restTemplate().postForObject(ur, pud, Project.class);\n\t\tSystem.out.println(us.toString());\n\t\t//UserDetails user = om.readValue(us,UserDetails.class);\n\t\treturn us;\n\t}", "public void testGetProjectByNameWebService() throws Exception {\r\n ProjectService projectService = lookupProjectServiceWSClientWithUserRole();\r\n\r\n ProjectData projectData = new ProjectData();\r\n projectData.setName(\"project3\");\r\n projectData.setDescription(\"Hello\");\r\n\r\n projectService.createProject(projectData);\r\n\r\n // 1 is the user id\r\n ProjectData pd = projectService.getProjectByName(\"project3\", 1);\r\n\r\n assertNotNull(\"null project data received\", pd);\r\n }", "@Test\n public void createProjectTest() throws Exception {\n //set up user\n deleteUsers();\n String userId = createTestUser();\n\t //deleteProjects(userId);//all projects have already been deleted by server since deleteUsers();\n\n try {\n // Covered user cases 5.1\n CloseableHttpResponse response = createProject(\"testProjectName\", userId);\n\n int status = response.getStatusLine().getStatusCode();\n HttpEntity entity;\n if (status == 201) {\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n String strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n String id = getIdFromStringResponse(strResponse);\n\n String expectedJson = \"{\\\"id\\\":\" + id + \",\\\"projectname\\\":\\\"testProjectName\\\",\\\"userId\\\":\" + userId + \"}\";\n\t JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n // create duplicate name project // Covered user cases 5.2\n response = createProject(\"testProjectName\", userId);\n status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(409, status);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n // 400 bad request\n response = createProject(\"testProjectName1\", userId + \"abc\");\n status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(400, status);\n EntityUtils.consume(response.getEntity());\n response.close();\n // 404 user not found\n response = createProject(\"testProjectName2\", userId + \"666\");\n status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(404, status);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n } finally {\n httpclient.close();\n }\n }", "private void createProjectGroup(Composite parent) {\n int col = 0;\n\n // project name\n String tooltip = \"The Android Project where the new resource file will be created.\";\n Label label = new Label(parent, SWT.NONE);\n label.setText(\"Project\");\n label.setToolTipText(tooltip);\n ++col;\n\n mProjectTextField = new Text(parent, SWT.BORDER);\n mProjectTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mProjectTextField.setToolTipText(tooltip);\n mProjectTextField.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n onProjectFieldUpdated();\n }\n });\n ++col;\n\n mProjectBrowseButton = new Button(parent, SWT.NONE);\n mProjectBrowseButton.setText(\"Browse...\");\n mProjectBrowseButton.setToolTipText(\"Allows you to select the Android project to modify.\");\n mProjectBrowseButton.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n onProjectBrowse();\n }\n });\n mProjectChooserHelper = new ProjectChooserHelper(parent.getShell(), null /*filter*/);\n ++col;\n\n col = padWithEmptyCells(parent, col);\n\n // file name\n tooltip = \"The name of the resource file to create.\";\n label = new Label(parent, SWT.NONE);\n label.setText(\"File\");\n label.setToolTipText(tooltip);\n ++col;\n\n mFileNameTextField = new Text(parent, SWT.BORDER);\n mFileNameTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mFileNameTextField.setToolTipText(tooltip);\n mFileNameTextField.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n validatePage();\n }\n });\n ++col;\n\n padWithEmptyCells(parent, col);\n }", "public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "@PostMapping(value = \"/project\", consumes = \"application/json\", produces = \"application/json\")\n public ResponseEntity<?> addNewProject(@Valid @RequestBody Project newProject) throws URISyntaxException\n {\n newProject.setProjectid(0);\n newProject = projectService.save(newProject);\n\n // set the location header for the newly created resource\n HttpHeaders responseHeaders = new HttpHeaders();\n URI newProjectURI = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{projectid}\")\n .buildAndExpand(newProject.getProjectid())\n .toUri();\n responseHeaders.setLocation(newProjectURI);\n\n return new ResponseEntity<>(null, responseHeaders, HttpStatus.CREATED);\n }", "void createProject(IProjectDescription description, IProject proj,\n\t\t\tIProgressMonitor monitor) throws CoreException,\n\t\t\tOperationCanceledException {\n\t\ttry {\n\n\t\t\tmonitor.beginTask(\"\", 2000);\n\n\t\t\tproj.create(description, new SubProgressMonitor(monitor, 1000));\n\n\t\t\tif (monitor.isCanceled()) {\n\t\t\t\tthrow new OperationCanceledException();\n\t\t\t}\n\n\t\t\tproj.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(\n\t\t\t\t\tmonitor, 1000));\n\n\t\t\t/*\n\t\t\t * Okay, now we have the project and we can do more things with it\n\t\t\t * before updating the perspective.\n\t\t\t */\n\t\t\tIContainer container = (IContainer) proj;\n\n\t\t\t/* Add an XHTML file */\n\t\t\t/*addFileToProject(container, new Path(\"index.html\"),\n\t\t\t\t\tJ15NewModel.openContentStream(\"Welcome to \"\n\t\t\t\t\t\t\t+ proj.getName(),\"5\"),monitor);*/\n\n\t\t\t/* Create the admin folder */\n\t\t\tfinal IFolder adminFolder = container.getFolder(new Path(\"admin\"));\n\t\t\tadminFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminModels = adminFolder.getFolder(new Path(\"models\"));\n\t\t\tadminModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminControllers = adminFolder.getFolder(new Path(\"controllers\"));\n\t\t\tadminControllers.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminViews = adminFolder.getFolder(new Path(\"views\"));\n\t\t\tadminViews.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminTables = adminFolder.getFolder(new Path(\"tables\"));\n\t\t\tadminTables.create(true, true, monitor);\n\t\t\t\n\t\t\t/* Create the site folder */\n\t\t\tfinal IFolder siteFolder = container.getFolder(new Path(\"site\"));\n\t\t\tsiteFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteModels = siteFolder.getFolder(new Path(\"models\"));\n\t\t\tsiteModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteViews = siteFolder.getFolder(new Path(\"views\"));\n\t\t\tsiteViews.create(true, true, monitor);\n\n\t\t\tInputStream resourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\t/* Add blank HTML Files */\n\t\t\t\n\t\t\t/* Admin Folders first */\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminControllers.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminTables.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\t/* Now the site folders */\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\n\t\t\t/* All over! */\n\t\t} catch (IOException ioe) {\n\t\t\tIStatus status = new Status(IStatus.ERROR, \"J15Wizard\", IStatus.OK,\n\t\t\t\t\tioe.getLocalizedMessage(), null);\n\t\t\tthrow new CoreException(status);\n\t\t} finally {\n\t\t\tmonitor.done();\n\t\t}\n\t}", "@Test\n @org.junit.Ignore\n public void testProject_1()\n throws Exception {\n\n Project result = new Project();\n\n assertNotNull(result);\n assertEquals(null, result.getName());\n assertEquals(null, result.getWorkloadNames());\n assertEquals(null, result.getProductName());\n assertEquals(null, result.getComments());\n assertEquals(null, result.getCreator());\n assertEquals(0, result.getId());\n assertEquals(null, result.getModified());\n assertEquals(null, result.getCreated());\n }", "private Project(String id)\n\t{\n\t\t// set the id\n\t\tthis.id = id;\n\n\t\t// save the project\n\t\tofy().save().entity(this).now();\n\n\t\t// create log entry for the project created\n\t\tHistoryLog.Init(this.getID()).addEvent(new ProjectCreated(this));\n\n\t\t// Load functions from Firebase and\n\t\t// for each function queue a function create command\n\t\tString functions = FirebaseService.readClientRequest(this.getID());\n\t\tClientRequestDTO dto;\n\t\ttry {\n\n\t\t\tdto = (ClientRequestDTO) DTO.read(functions, ClientRequestDTO.class);\n\n\n\t\t\tADTCommand.create(\n\t\t\t\t\t\"A Boolean represents one of two values: true or false.\",\n\t\t\t\t\t\"Boolean\",\n\t\t\t\t\tnew HashMap<String, String>(),\n\t\t\t\t\tnew HashMap<String, String>(),\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tADTCommand.create(\n\t\t\t\t\t\"Number is the only type of number. Numbers can be written with, or without, decimals.\",\n\t\t\t\t\t\"Number\",\n\t\t\t\t\tnew HashMap<String, String>(),\n\t\t\t\t\tnew HashMap<String, String>(),\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tADTCommand.create(\n\t\t\t\t\t\"A String simply stores a series of characters like \\\"John Doe\\\". A string can be any text inside double quotes.\",\n\t\t\t\t\t\"String\",\n\t\t\t\t\tnew HashMap<String, String>(),\n\t\t\t\t\tnew HashMap<String, String>(),\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tfor(ADTDTO ADT : dto.ADTs){\n\t\t\t\tADTCommand.create(ADT.description, ADT.name, ADT.getStructure(), ADT.getExamples(), true, ADT.isReadOnly);\n\t\t\t}\n\n\n\t\t\tfor (FunctionDTO functionDTO : dto.functions)\n\t\t\t{\n\t\t\t\tFunctionCommand.addClientRequestsArtifacts(functionDTO);\n\t\t\t}\n\t\t\t// save project settings into firebase\n\n\t\t\tFirebaseService.writeSetting(\"reviews\", this.reviewsEnabled.toString() , this.getID());\n\t\t\tFirebaseService.writeSetting(\"tutorials\", this.tutorialsEnabled.toString() , this.getID());\n\n\t\t\t// save again the entity with the created functions\n\t\t\tofy().save().entity(this).now();\n\n\t\t} catch (JsonParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\t}", "@Test\n public void postTemplateProgrammerProjectTest() throws ApiException {\n ProjectDTO request = null;\n TaskIdResult response = api.postTemplateProgrammerProject(request);\n\n // TODO: test validations\n }", "public boolean insertProject(Project project) throws EmployeeManagementException;", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "@Override\n void create(Cliente cliente);", "@POST\n @Path(\"accept\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Factory acceptFactory(final Factory factory) {\n final ProjectImporter importer = getGitProjectImporter();\n\n //try to check if factory contains project name value otherwise we set default project name to \"Unnamed\"\n ProjectAttributes projectAttributes = factory.getProjectattributes();\n if (projectAttributes == null) {\n projectAttributes = DtoFactory.getInstance().createDto(ProjectAttributes.class).withPname(DEFAULT_PROJECT_NAME);\n factory.setProjectattributes(projectAttributes);\n } else if (projectAttributes.getPname() == null || projectAttributes.getPname().isEmpty()) {\n projectAttributes = factory.getProjectattributes().withPname(DEFAULT_PROJECT_NAME);\n }\n\n List<FolderEntry> existedFolders = projectManager.getProjectsRoot(workspace).getChildFolders();\n\n //if project with the same name exist we should create new one with another name.\n for (FolderEntry existProject : existedFolders) {\n if (projectAttributes.getPname().equals(existProject.getName())) {\n projectAttributes.setPname(NameGenerator.generate(projectAttributes.getPname(), 4));\n break;\n }\n }\n\n //get newly created empty folder in which clone should be proceed\n FolderEntry projectFolder = projectManager.getProjectsRoot(workspace).createFolder(factory.getProjectattributes().getPname());\n\n try {\n importer.importSources(projectFolder, factory.getVcsurl());\n } catch (IOException e) {\n if (e.getCause() != null && e.getCause() instanceof NotAuthorizedException) {\n throw halt(UNAUTHORIZED, e.getMessage(), e);\n }\n throw halt(INTERNAL_SERVER_ERROR, e.getMessage());\n }\n\n //get physical path to project on file system to allow native git to work with repository\n String absoluteProjectPath;\n try {\n absoluteProjectPath = localPathResolver.resolve(projectFolder.getVirtualFile());\n } catch (VirtualFileSystemException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to resolve Git project directory.\", e);\n }\n\n GitConnection gitConnection;\n try {\n gitConnection = gitConnectionFactory.getConnection(absoluteProjectPath);\n } catch (GitException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to get Git connection to cloned project.\", e);\n }\n\n if (!Strings.isNullOrEmpty(factory.getCommitid())) {\n performCheckoutToCommitId(factory.getCommitid(), gitConnection);\n } else if (!Strings.isNullOrEmpty(factory.getVcsbranch())) {\n performCheckoutToBranch(factory.getVcsbranch(), gitConnection);\n }\n\n if (factory.getVariables() != null && factory.getVariables().size() > 0) {\n performReplaceVariables(factory.getVariables(), absoluteProjectPath);\n }\n\n if (!factory.getVcsinfo()) {\n AbstractVirtualFileEntry gitFolder = projectFolder.getChild(\".git\");\n if (gitFolder != null && gitFolder.isFolder()) {\n pushClientNotification(\"Git information erased.\");\n gitFolder.remove();\n }\n }\n\n return factory;\n }", "private void createProjectAsync(IProgressMonitor monitor, ProjectInfo mainData, List<ProjectInfo> importData,\n boolean isAndroidProject) throws InvocationTargetException {\n monitor.beginTask(\"Create CMS Descriptor Project\", 100);\n try {\n IProject mainProject = null;\n\n if (mainData != null) {\n mainProject = createEclipseProject(\n new SubProgressMonitor(monitor, 50),\n mainData.getProject(),\n mainData.getDescription(),\n mainData.getParameters(),\n null,\n isAndroidProject);\n if (mainProject != null) {\n final IJavaProject javaProject = JavaCore.create(mainProject);\n }\n }\n } catch (CoreException e) {\n throw new InvocationTargetException(e);\n } catch (IOException e) {\n throw new InvocationTargetException(e);\n } finally {\n monitor.done();\n }\n }", "@Test\n \tpublic void testCreateMindProject() throws Exception {\n \t\tString name = \"Test\" ; //call a generator which compute a new name\n \t\tGTMenu.clickItem(\"File\", \"New\", FRACTAL_MIND_PROJECT);\n \t\tGTShell shell = new GTShell(Messages.MindProjectWizard_window_title);\n \t\t//shell.findTree().selectNode(\"Mind\",FRACTAL_MIND_PROJECT);\n \t\t//shell.findButton(\"Next >\").click();\n \t\tshell.findTextWithLabel(\"Project name:\").typeText(name);\n \t\tshell.close();\n \t\t\n \t\tTestMindProject.assertMindProject(name);\t\t\n \t}", "private IProject createEclipseProject(IProgressMonitor monitor, IProject project, IProjectDescription description,\n Map<String, Object> parameters, ProjectPopulator projectPopulator, boolean isCmsProject) \n \t\tthrows CoreException, IOException {\n\n // Create project and open it\n project.create(description, new SubProgressMonitor(monitor, 10));\n if (monitor.isCanceled()) throw new OperationCanceledException();\n\n project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 10));\n\n // Add the Java and CMS nature to the project\n DescriptorNature.setupProjectNatures(project, monitor, isCmsProject);\n\n // Create folders in the project if they don't already exist\n addDefaultDirectories(project, WS_ROOT, DEFAULT_DIRECTORIES, monitor);\n String[] sourceFolders;\n if (isCmsProject) {\n sourceFolders = new String[] {\n (String) parameters.get(PARAM_SRC_FOLDER),\n };\n } else {\n sourceFolders = new String[] {\n (String) parameters.get(PARAM_SRC_FOLDER)\n };\n }\n addDefaultDirectories(project, WS_ROOT, sourceFolders, monitor);\n\n if (projectPopulator != null) {\n try {\n projectPopulator.populate(project);\n } catch (InvocationTargetException ite) {\n ite.printStackTrace();\n }\n }\n\n // Setup class path: mark folders as source folders\n IJavaProject javaProject = JavaCore.create(project);\n setupSourceFolders(javaProject, sourceFolders, monitor);\n // Set output location\n// javaProject.setOutputLocation(project.getFolder(BIN_CLASSES_DIRECTORY).getFullPath(), monitor);\n // Create the reference to the target project\n\n return project;\n }", "private Project(){}", "public int DSAddProject(String ProjectName, String ProjectLocation);", "void build(String name, Project project);", "public void createProject(\n String projectName,\n int teamId,\n String assigneeName,\n LocalDate deadline,\n String description,\n Project.Importance importance)\n throws NoSignedInUserException, SQLException, InexistentUserException,\n InexistentTeamException, DuplicateProjectNameException, InexistentDatabaseEntityException,\n EmptyFieldsException, InvalidDeadlineException {\n if (isMissingProjectData(projectName, assigneeName, deadline)) {\n throw new EmptyFieldsException();\n }\n User currentUser = getMandatoryCurrentUser();\n User assignee = getMandatoryUser(assigneeName);\n Team team = getMandatoryTeam(teamId);\n // check that there is no other project with the same name\n if (projectRepository.getProject(teamId, projectName).isPresent()) {\n throw new DuplicateProjectNameException(projectName, team.getName());\n }\n // check if the new deadline of project is outdated (before the current date)\n if (isOutdatedDate(deadline)) {\n throw new InvalidDeadlineException();\n }\n // save project\n Project.SavableProject project =\n new Project.SavableProject(\n projectName, teamId, deadline, currentUser.getId(), assignee.getId(), importance);\n project.setDescription(description);\n projectRepository.saveProject(project);\n support.firePropertyChange(\n ProjectChangeablePropertyName.CREATE_PROJECT.toString(), OLD_VALUE, NEW_VALUE);\n }", "public Client create(Client created);", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "@Test\n public void getProjectTest() throws Exception {\n httpclient = HttpClients.createDefault();\n //set up user\n deleteUsers();\n\n String userId = createTestUser();\n\n //deleteProjects(userId);//all projects have already been deleted by server since deleteUsers();\n\n try {\n CloseableHttpResponse response = createProject(\"testProjectName\", userId);\n String id = getIdFromResponse(response);\n // EntityUtils.consume(response.getEntity());\n response.close();\n\n response = getProject(userId, id);\n\n int status = response.getStatusLine().getStatusCode();\n HttpEntity entity;\n String strResponse;\n if (status == 200) {\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n String expectedJson = \"{\\\"id\\\":\" + id + \",\\\"projectname\\\":\\\"testProjectName\\\",\\\"userId\\\":\" + userId + \"}\";\n\t JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n // 400 bad request\n response = getProject(userId + \"abc\", id);\n status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(400, status);\n EntityUtils.consume(response.getEntity());\n response.close();\n // 404 User not found\n response = getProject(userId + \"666\", id);\n status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(404, status);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n } finally {\n httpclient.close();\n }\n }", "public void handleCreateProject(SelectEvent event) {\n\t}", "private synchronized static void createProjectIfNotExist(Project aweProject, String rubyProjectName) {\r\n \t\tboolean exist = false;\r\n \t\t\r\n \t\tfor (RubyProject rubyProject : aweProject.getElements(RubyProject.class)) {\r\n \t\t\tif (rubyProject.getName().equals(rubyProjectName)) {\r\n \t\t\t\texist = true;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (!exist) {\r\n \t\t\tRubyProject ruby = ProjectFactoryImpl.eINSTANCE.createRubyProject();\r\n \t\t\truby.setName(rubyProjectName);\r\n \t\t\truby.setProjectInternal(aweProject);\t\t\t\r\n \t\t}\r\n \t}", "@SuppressWarnings(\"unchecked\")\n @RequestMapping(value = \"/myClient/{username}/{moduleId}\", method = RequestMethod.POST)\n public @ResponseBody CreatorClient createClient(@RequestBody String body, @PathVariable String username, @PathVariable String moduleId){\n Map<String, String> data = (Map<String, String>) parseJsonToMap(body);\n return creatorService.createClient(username, data.get(\"password\"), moduleId, data);\n }", "public Project() {\n\n }", "public static FavoriteProject createEntity(EntityManager em) {\n FavoriteProject favoriteProject = new FavoriteProject()\n .user(DEFAULT_USER)\n .project(DEFAULT_PROJECT);\n return favoriteProject;\n }", "public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }", "com.appscode.api.auth.v1beta1.Project getProject();", "void createRepository(String projectKey, String repoName, String parentProjectKey) throws VersionControlException;", "private void newProject(ActionEvent x) {\n\t\tthis.controller.newProject();\n\t}", "public void createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMonitoredProjectMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "@Override\n public final void generateProject(@NotNull final Project project,\n @NotNull final VirtualFile baseDir,\n @NotNull final T settings,\n @NotNull final Module module) {\n if (settings == NO_SETTINGS) {\n // We are in Intellij Module and framework is implemented as project template, not facet.\n // See class doc for mote info\n configureProjectNoSettings(project, baseDir, module);\n return;\n }\n\n /*Instead of this method overwrite ``configureProject``*/\n\n // If we deal with remote project -- use remote manager to configure it\n final Sdk sdk = settings.getSdk();\n\n if (sdk instanceof PyLazySdk) {\n final Sdk createdSdk = ((PyLazySdk)sdk).create();\n settings.setSdk(createdSdk);\n if (createdSdk != null) {\n SdkConfigurationUtil.addSdk(createdSdk);\n }\n }\n\n final PyProjectSynchronizer synchronizer = sdk != null ? PyProjectSynchronizerProvider.getSynchronizer(sdk) : null;\n\n if (synchronizer != null) {\n // Before project creation we need to configure sync\n // We call \"checkSynchronizationAvailable\" until it returns success (means sync is available)\n // Or user confirms she does not need sync\n String userProvidedPath = settings.getRemotePath();\n while (true) {\n final String syncError = synchronizer.checkSynchronizationAvailable(new PySyncCheckCreateIfPossible(module, userProvidedPath));\n if (syncError == null) {\n break;\n }\n userProvidedPath = null; // According to checkSynchronizationAvailable should be cleared\n final String message =\n PyBundle.message(\"python.new.project.synchronization.not.configured.dialog.message\", syncError);\n if (Messages.showYesNoDialog(project,\n message,\n PyBundle.message(\"python.new.project.synchronization.not.configured.dialog.title\"),\n General.WarningDialog) == Messages.YES) {\n break;\n }\n }\n }\n\n configureProject(project, baseDir, settings, module, synchronizer);\n var statisticsInfo = settings.getInterpreterInfoForStatistics();\n if (statisticsInfo instanceof InterpreterStatisticsInfo interpreterStatisticsInfo) {\n PythonNewProjectWizardCollector.Companion.logPythonNewProjectGenerated(interpreterStatisticsInfo,\n PyStatisticToolsKt.getVersion(settings.getSdk()),\n this.getClass());\n }\n }", "public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }", "@Transactional\r\n public long create(DirectProjectCPConfig config) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".create(DirectProjectCPConfig config)\";\r\n\r\n return createEntity(signature, config, \"config\", config == null ? 0L : config.getDirectProjectId(),\r\n \"config#directProjectId\");\r\n }", "@Override\n public void onClick(View view) {\n String projectName = etProjectName.getText().toString();\n String projectOwner = etProjectOwner.getText().toString();\n String projectDescription = etProjectDescription.getText().toString();\n long projectId = 0; // This is just to give some value. Not used when saving new project because auto-increment in DB for this value.\n\n\n // USerid and projectname are mandatory parameters\n if( userId != 0 && projectName != null) {\n newProject = new Project(projectId, userId, projectName, projectOwner, projectDescription);\n dbHelper.saveProject(newProject);\n// showToast(\"NewprojectId:\" + newProject.projectId+ \"-->UserId: \"+ userId + \"--> ProjectName\" + newProject.projectName +\"->Owner\"+newProject.projectOwner);\n dbHelper.close();\n\n // SIIRRYTÄÄN PROJEKTILISTAUKSEEN\n Intent newProjectList = new Intent( NewProject.this, ProjectListActivity.class);\n newProjectList.putExtra(\"userId\", userId);\n startActivity(newProjectList);\n }\n\n }", "@Test\n @Order(1)\n void create_client() {\n client = new Client();\n client.setName(\"Test Client\");\n Client c = service.createClient(client);\n Assertions.assertEquals(client.getName(), c.getName());\n Assertions.assertNotEquals(0, c.getId());\n client = c;\n }", "private void createClient() {\n tc = new TestClient();\n }", "@Test\n\tpublic void saveProjects() throws ParseException {\n\t\tproject.setEstimates(5);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tDate parsed = format.parse(\"20110210\");\n\t\tjava.sql.Date sql = new java.sql.Date(parsed.getTime());\n\t\tproject.setdRequested(sql);\n\t\tproject.setdRequired(sql);\n\t\tproject.setCritical(true);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tProjectKeyContacts contacts = new ProjectKeyContacts();\n\t\tcontacts.setEmail(\"assdasd.gmail.com\");\n\t\tcontacts.setFname(\"sdsd\");\n\t\tcontacts.setLname(\"asdasd\");\n\t\tcontacts.setPhone(\"asd\");\n\t\tcontacts.setRole(\"asda\");\n\t\tcontacts.setTeam(\"saad\");\n\t\tproject.setContacts(contacts);\n\t\tProjectDetails det = new ProjectDetails();\n\t\tdet.setDescription(\"asdsd\");\n\t\tdet.setName(\"asd\");\n\t\tdet.setName(\"asdad\");\n\t\tdet.setSummary(\"asdd\");\n\t\tproject.setProjectDetails(det);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tassertEquals(controller.saveProject(project).getStatusCode(), HttpStatus.CREATED);\n\t}", "public Project() {\n\t}", "public Project() {\n\t}", "public void testNewJavaProject() {\n NewProjectWizardOperator.invoke().cancel();\n NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke();\n // \"Standard\"\n String standardLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.wizards.Bundle\", \"Templates/Project/Standard\");\n npwo.selectCategory(standardLabel);\n // \"Java Application\"\n String javaApplicationLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.wizards.Bundle\", \"template_app\");\n npwo.selectProject(javaApplicationLabel);\n npwo.next();\n NewJavaProjectNameLocationStepOperator npnlso = new NewJavaProjectNameLocationStepOperator();\n npnlso.txtProjectName().setText(SAMPLE_PROJECT_NAME);\n npnlso.txtProjectLocation().setText(System.getProperty(\"netbeans.user\")); // NOI18N\n npnlso.btFinish().pushNoBlock();\n npnlso.getTimeouts().setTimeout(\"ComponentOperator.WaitStateTimeout\", 120000);\n npnlso.waitClosed();\n // wait project appear in projects view\n new ProjectsTabOperator().getProjectRootNode(SAMPLE_PROJECT_NAME);\n\n //disable the compile on save:\n ProjectsTabOperator.invoke().getProjectRootNode(SAMPLE_PROJECT_NAME).properties();\n // \"Project Properties\"\n String projectPropertiesTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Customizer_Title\");\n NbDialogOperator propertiesDialogOper = new NbDialogOperator(projectPropertiesTitle);\n // select \"Compile\" category\n String buildCategoryTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Config_BuildCategory\");\n String compileCategoryTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Config_Build\");\n new Node(new Node(new JTreeOperator(propertiesDialogOper), buildCategoryTitle), compileCategoryTitle).select();\n // actually disable the quick run:\n String compileOnSaveLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"CustomizerCompile.CompileOnSave\");\n JCheckBox cb = JCheckBoxOperator.waitJCheckBox((Container) propertiesDialogOper.getSource(), compileOnSaveLabel, true, true);\n if (cb.isSelected()) {\n cb.doClick();\n }\n // confirm properties dialog\n propertiesDialogOper.ok();\n\n // wait classpath scanning finished\n PerfWatchProjects.waitScanFinished();\n }", "public void testGetProjectByNameUserRole() throws Exception {\r\n ProjectServiceRemote projectService = lookupProjectServiceRemoteWithUserRole();\r\n\r\n ProjectData projectData = new ProjectData();\r\n projectData.setName(\"project1\");\r\n projectData.setDescription(\"Hello\");\r\n\r\n projectService.createProject(projectData);\r\n\r\n // 1 is the user id\r\n ProjectData pd = projectService.getProjectByName(\"project1\", 1);\r\n\r\n assertNotNull(\"null project data received\", pd);\r\n }", "public Project()\n {\n\n }", "public ProjectViewController(){\n InputStream request = appController.httpRequest(\"http://localhost:8080/project/getProject\", \"GET\");\n try {\n String result = IOUtils.toString(request, StandardCharsets.UTF_8);\n Gson gson = new Gson();\n this.projectModel = gson.fromJson(result, ProjectModel.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@SystemSetup(type = Type.PROJECT, process = Process.ALL)\n\tpublic void createProjectData(final SystemSetupContext context)\n\t{\n\t\tif (getBooleanSystemSetupParameter(context, IMPORT_PROJECT_DATA))\n\t\t{\n\t\t\t\n\t\t\t//Store locator is out of scope for SBD b2b\t\n\t\t\timportStoreInitialData(context, PROJECT_DATA_IMPORT_FOLDER, PROJECT_NAME, PROJECT_NAME,\n\t\t\t\t\tCollections.singletonList(PROJECT_NAME));\n\t\t\t\n\t\t}\n\t\tif (getBooleanSystemSetupParameter(context, IMPORT_SBD_SAMPLE_PRODUCT_DATA))\n\t\t{\n\t\t\timportCommonData(context, PROJECT_DATA_IMPORT_FOLDER);\n\t\t\timportProductCatalog(context, PROJECT_DATA_IMPORT_FOLDER, PROJECT_NAME);\t\n\t\t\t\n\t\t}\n\t}", "public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>\n createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMonitoredProjectMethod(), getCallOptions()), request);\n }", "public static void main(String[] args) {\n AddNewProject addNewProject = new AddNewProject();\n addNewProject.setVisible(true);\n }", "public JaxWsClientCreator(Project project, WizardDescriptor wiz) {\n this.project = project;\n this.wiz = wiz;\n }", "public static Builder newProject(String name) {\n return new Builder(name);\n }", "public void addNewProject(final String name) {\n Project p = new Project(name);\n ApplicationWideData.addNewProject(p);\n\n Callback<Response> responseCallback = new Callback<Response>() {\n @Override\n public void success(Response response, Response response2) {\n context.refreshLists();\n }\n\n @Override\n public void failure(RetrofitError error) {\n Log.e(\"RetrofitError\", \"Actions: AddNewProject: \"+error.getMessage());\n }\n };\n\n// boolean success = LocalDataSaver.addProject(p);\n// if (success) {\n// Toast.makeText(context, \"Successful adding of new project: \" + name + \" to local database\", Toast.LENGTH_LONG).show();\n// }\n if (!ApplicationWideData.getManualSync()) {\n service.addNewProject(p, userID, responseCallback);\n }\n else{\n LocalDataSaver.addNewSelectable(p, \"Project\");\n context.refreshLists();\n }\n LocalDataSaver.saveProject(p);\n Log.wtf(\"Added project\", \"to added table\");\n\n\n Log.wtf(\"Size of added table\", LocalDataRetriver.getAllAdded().size() + \"\");\n\n }", "Cloud createCloud();", "private void create(String[] dependencies) throws ThinklabClientException {\r\n \t\tif (dependencies == null) {\r\n \t\t\tString dps = Configuration.getProperties().getProperty(\r\n \t\t\t\t\t\"default.project.dependencies\",\r\n \t\t\t\t\t\"org.integratedmodelling.thinklab.core\");\r\n \t\t\t\r\n \t\t\tdependencies = dps.split(\",\");\r\n \t\t}\r\n \t\t\r\n \t\tFile plugdir = Configuration.getProjectDirectory(_id);\r\n \t\tcreateManifest(plugdir, dependencies);\r\n \t\t\r\n \t}", "public Project() {\n\t\t\n\t}", "public static AddProject newInstance() {\n AddProject fragment = new AddProject();\n return fragment;\n }", "public Project_Create() {\n initComponents();\n }", "public ApiProject(Long id, String name, String note, LocalDateTime createTime) {\n this.id = id;\n this.name = name;\n this.note = note;\n this.createTime = createTime;\n }", "protected ProjectCreationDescriptor() {\n\t}", "public void save(Project project) {\n\t\tcreate(project);\n\t}", "void createProjectReference(java.lang.String referenceName, org.apache.ant.common.model.Project model) throws org.apache.ant.common.util.ExecutionException;", "@RequestMapping(value = \"/createClient\", method = RequestMethod.GET)\n public @ResponseBody CreatorClient createClient(){\n return creatorService.createClient(null);\n }" ]
[ "0.7532319", "0.7532319", "0.7532319", "0.7355822", "0.7317998", "0.7096229", "0.69681513", "0.6817162", "0.6736042", "0.6594225", "0.64904886", "0.63655955", "0.6336917", "0.6324704", "0.6316505", "0.62314355", "0.618411", "0.6182859", "0.61695355", "0.6168736", "0.6136023", "0.6067038", "0.6046137", "0.60410243", "0.6021912", "0.60146374", "0.60113865", "0.59741324", "0.59468484", "0.5944652", "0.5940243", "0.59380484", "0.5919365", "0.5918592", "0.5865943", "0.58432156", "0.58418906", "0.5841023", "0.58160233", "0.5788427", "0.5788209", "0.5769493", "0.57563734", "0.5732496", "0.5722674", "0.57004553", "0.56937766", "0.5663742", "0.56600696", "0.5654971", "0.5650512", "0.56336874", "0.56213796", "0.56186104", "0.5613418", "0.560927", "0.5588202", "0.5574285", "0.55717486", "0.5561224", "0.5560769", "0.5556189", "0.55442953", "0.55253625", "0.5520063", "0.5518983", "0.55130094", "0.549832", "0.54819083", "0.54784524", "0.54670095", "0.5462908", "0.5462379", "0.5448307", "0.5447072", "0.54418045", "0.54340667", "0.54160726", "0.54159915", "0.54159915", "0.54118305", "0.5411587", "0.54112405", "0.5407593", "0.5398717", "0.53887063", "0.5380966", "0.53783196", "0.5368846", "0.5367025", "0.5358271", "0.53570026", "0.53562844", "0.535541", "0.5353462", "0.5353235", "0.53531146", "0.5350217", "0.53416955", "0.5341477" ]
0.7330704
4
Set fields of auditableEntity.
protected void setAuditableEntity(AuditableEntity auditableEntity) { auditableEntity.setCreateUsername("createUser"); auditableEntity.setModifyUsername("modifyUser"); auditableEntity.setCreateDate(new Date()); auditableEntity.setModifyDate(new Date()); auditableEntity.setName("name"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAttributes(IEntityObject obj) {\r\n\tDispenser dObj = (Dispenser) obj;\r\n\tdObj.pk = this.pk;\r\n\tdObj.versionInfoID = this.versionInfoID;\r\n\tdObj.interfaceID = this.interfaceID;\t\r\n\tdObj.setBlender(this.blender);\r\n }", "@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }", "default <T> T setAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) continue;\n\n try {\n set(field.getName(), field.get(object));\n } catch (IllegalAccessException e) {\n //hopefully we will be fine\n e.printStackTrace();\n }\n }\n\n return object;\n }", "public CopyEntityAttributes()\n\t{\n\t\tsetMandatory(ENTITY_PARAM, COPY_MODE);\n\t}", "public void setAuditDate(Date auditDate) {\n this.auditDate = auditDate;\n }", "protected void setAttributes(Resource resource, Object entity, ResourceInformation resourceInformation, QueryAdapter queryAdapter) {\n\t\tList<ResourceField> fields = DocumentMapperUtil.getRequestedFields(resourceInformation, queryAdapter, resourceInformation.getAttributeFields().getFields(), false);\n\n\t\t// serialize the individual attributes\n\t\tfor (ResourceField field : fields) {\n\t\t\tObject value = PropertyUtils.getProperty(entity, field.getUnderlyingName());\n\t\t\tJsonNode valueNode = objectMapper.valueToTree(value);\n\t\t\tresource.getAttributes().put(field.getJsonName(), valueNode);\n\t\t}\n\t}", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n if (myClass == TableEntity.class) {\n return;\n }\n\n for (Method m : myClass.getMethods()) {\n // Skip any non-getter methods\n if (m.getName().length() < 3\n || TABLE_ENTITY_METHODS.contains(m.getName())\n || (!m.getName().startsWith(\"get\") && !m.getName().startsWith(\"is\"))\n || m.getParameterTypes().length != 0\n || void.class.equals(m.getReturnType())) {\n continue;\n }\n\n // A method starting with `is` is only a getter if it returns a boolean\n if (m.getName().startsWith(\"is\") && m.getReturnType() != Boolean.class\n && m.getReturnType() != boolean.class) {\n continue;\n }\n\n // Remove the `get` or `is` prefix to get the name of the property\n int prefixLength = m.getName().startsWith(\"is\") ? 2 : 3;\n String propName = m.getName().substring(prefixLength);\n\n try {\n // Invoke the getter and store the value in the properties map\n entity.getProperties().put(propName, m.invoke(entity));\n } catch (ReflectiveOperationException | IllegalArgumentException e) {\n logger.logThrowableAsWarning(new ReflectiveOperationException(String.format(\n \"Failed to get property '%s' on type '%s'\", propName, myClass.getName()), e));\n }\n }\n }", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "public Map<Field, String> getAuditableFields();", "protected void reflectUpdateDatetimeToEntity(MemberDto dto, Member entity) {\r\n entity.setUpdateDatetime(extractUpdateDatetimeFromDto(dto));\r\n }", "private void setValue(Object entity, Field targetField, String targetValue) {\n if ( null == entity || null == targetField || 0 >= targetField.getName().length() ) {\n throw new IllegalStateException();\n }\n final Method[] declaredMethods = entity.getClass().getDeclaredMethods();\n final String fieldName = targetField.getName();\n String expectedMethodName = null;\n if ( fieldName.length() > 1 ) {\n expectedMethodName = \"set\" + fieldName.substring(0).toUpperCase() + fieldName.substring(1, fieldName.length() - 1);\n } else {\n expectedMethodName = \"set\" + fieldName.substring(0).toUpperCase();\n }\n Method expectedMethod = null;\n for ( Method method : declaredMethods ) {\n if ( method.getName().equals(expectedMethodName) ) {\n expectedMethod = method;\n }\n }\n if ( null != expectedMethod ) {\n boolean accessibilityChanged = false;\n try {\n if ( !expectedMethod.isAccessible() ) {\n expectedMethod.setAccessible(true);\n accessibilityChanged = true;\n }\n expectedMethod.invoke(entity, targetValue);\n } catch (Exception e) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, e.getMessage(), e);\n } finally {\n if ( accessibilityChanged ) {\n expectedMethod.setAccessible(false);\n }\n }\n } else {\n boolean accessibilityChanged = false;\n if ( !targetField.isAccessible() ) {\n targetField.setAccessible(true);\n accessibilityChanged = true;\n }\n try {\n targetField.set(entity, targetValue);\n } catch (Exception e) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, e.getMessage(), e);\n } finally {\n if ( accessibilityChanged ) {\n targetField.setAccessible(false);\n }\n }\n }\n }", "public void buildMetaFields() {\n for (AtreusMetaEntity metaEntity : environment.getMetaManager().getEntities()) {\n Class<?> entityType = metaEntity.getEntityType();\n\n // Build the fields\n for (Field field : entityType.getDeclaredFields()) {\n\n // Execute the meta property builder rule bindValue\n for (BaseEntityMetaComponentBuilder propertyBuilder : fieldPropertyBuilders) {\n if (!propertyBuilder.acceptsField((MetaEntityImpl) metaEntity, field)) {\n continue;\n }\n propertyBuilder.validateField((MetaEntityImpl) metaEntity, field);\n if (propertyBuilder.handleField((MetaEntityImpl) metaEntity, field)) {\n break;\n }\n }\n\n }\n }\n }", "public void setAttributeFields(Vector a) {\n\tattributeFields = a;\n }", "public void updateAuditTrailEntity(IAuditTrailEntity obj)\n {\n getDAO().update(obj);\n }", "public void setEditableFields(EditableFields fields) {\n\n List<AbstractField> allFields = Arrays.asList(firstName, lastName, legalFirstName, legalLastName,\n nameIsLegalName, fanName, badgeNumber, phoneNumber, birthDate, email, zip, emergencyContactFullName,\n emergencyContactPhone, parentFormReceived, parentFullName, parentPhone, paidAmount,\n compedBadge, checkedIn);\n switch (fields) {\n case ALL:\n for (AbstractField field : allFields) {\n field.setEnabled(true);\n// field.setValidationVisible(true);\n }\n badgeNumber.setEnabled(false);\n badge.setEnabled(true);\n break;\n case NONE:\n for (AbstractField field : allFields) {\n field.setEnabled(false);\n }\n badgeNumber.setEnabled(false);\n badge.setEnabled(false);\n }\n }", "public interface Auditable {\n Date getCreated();\n void setCreated(Date created);\n Date getLastUpdate();\n void setLastUpdate(Date lastUpdate);\n}", "public void setAuditDate(Date auditDate) {\n\t\tthis.auditDate = auditDate;\n\t}", "public void setEntityHere(Entity setThis) {\n \n entityHere_ = setThis;\n \n }", "public void setAttributes(TableAttributes attrs) {\n\tthis.attrs = attrs;\n }", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "private void setAllAttributesFromController() {\n obsoData.setSupplier(supplier);\n \n obsoData.setEndOfOrderDate(endOfOrderDate);\n obsoData.setObsolescenceDate(obsolescenceDate);\n \n obsoData.setEndOfSupportDate(endOfSupportDate);\n obsoData.setEndOfProductionDate(endOfProductionDate);\n \n obsoData.setCurrentAction(avlBean.findAttributeValueListById(\n ActionObso.class, actionId));\n obsoData.setMtbf(mtbf);\n \n obsoData.setStrategyKept(avlBean.findAttributeValueListById(\n Strategy.class,\n strategyId));\n obsoData.setContinuityDate(continuityDate);\n \n obsoData.setManufacturerStatus(avlBean.findAttributeValueListById(\n ManufacturerStatus.class, manufacturerStatusId));\n obsoData.setAirbusStatus(avlBean.findAttributeValueListById(\n AirbusStatus.class, airbusStatusId));\n \n obsoData.setLastObsolescenceUpdate(lastObsolescenceUpdate);\n obsoData.setConsultPeriod(avlBean.findAttributeValueListById(\n ConsultPeriod.class, consultPeriodId));\n \n obsoData.setPersonInCharge(personInCharge);\n obsoData.setCommentOnStrategy(comments);\n }", "@Test\n public void setPermissions() {\n cleanEntity0();\n\n entity0.setPermissions(permissionsS);\n assertEquals(permissionsS, ReflectionTestUtils.getField(entity0, \"permissions\"));\n }", "private RequestTypeEntity setUpdatedUserDetails(RequestTypeEntity requestTypeEntity,AuthDetailsVo authDetailsVo) {\n\n\t\trequestTypeEntity.setUpdateBy(authDetailsVo.getUserId());\n\t\trequestTypeEntity.setUpdateDate(CommonConstant.getCalenderDate());\n\n\t\treturn requestTypeEntity;\n\n\t}", "public void setEntity(Entity entity) {\n\t\tthis.entity = entity;\n\t\tString s = entity.getClass().toString();\n\t\t// trim \"Class \" from the above String\n\t\tentityType = s.substring(s.lastIndexOf(\" \") + 1);\n\t}", "private void modifyEntityFromModifyEmployeeDto(ModifyEmployeeDto modifyEmployeeDto, Employee originalEmployee){\n\t\toriginalEmployee.setId(modifyEmployeeDto.id);\n\n\t\tif(modifyEmployeeDto.children != null)\n\t\t\toriginalEmployee.setChildren(modifyEmployeeDto.children);\n\n\t\tif(modifyEmployeeDto.isJustMarried != null)\n\t\t\toriginalEmployee.setJustMarried(modifyEmployeeDto.isJustMarried);\n\n\t\tif(modifyEmployeeDto.isSingleParent != null)\n\t\t\toriginalEmployee.setSingleParent(modifyEmployeeDto.isSingleParent);\n\t}", "@Override\n public void updateEntity(String entitySetName, OEntity entity) {\n super.updateEntity(entitySetName, entity);\n }", "void setAuditingCompany(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData auditingCompany);", "public void updateNonDynamicFields() {\n\n\t}", "private void copyDtoToEntity(UserDTO dto, User entity) {\n\t\tentity.setFullName(dto.getFullName());\n\t\tentity.setEmail(dto.getEmail());\n\t\tentity.setCpf(dto.getCpf());\n\t\tentity.setBirthDate(dto.getBirthDate());\n\t}", "public void setAllFields(WritableComparable... values) {\n if (fields.length != values.length) {\n throw new IllegalArgumentException(\"Wrong number (\" + values.length +\n \") of fields for \" + schema);\n }\n for (int col = 0; col < fields.length && col < values.length; ++col) {\n fields[col] = values[col];\n }\n }", "public void setAuditModel(AuditModel auditModel)\n\t{\n\t\tthis.auditModel = auditModel;\n\t}", "@Override\n\tpublic void setFields(FieldList fl) {\n\t\tlogger.debug(\"setFields :\");\n\t\tsuper.setFields(fl);\n\t}", "@Override\n\tprotected void initializeFields() {\n\n\t}", "private void prepareFields(Entity entity, boolean usePrimaryKey) \r\n\t\t\tthrows IllegalArgumentException, IllegalAccessException, InvocationTargetException{\r\n\t\tprimaryKeyTos = new ArrayList<FieldTO>();\r\n\t\tfieldTos = new ArrayList<FieldTO>();\r\n\t\tField[] fields = entity.getClass().getDeclaredFields();\t\r\n\t\t\r\n\t\t//trunk entity to persistence\r\n\t\tfor(int i=0; i<fields.length; i++){\r\n\t\t\tField reflectionField = fields[i];\r\n\t\t\tif(reflectionField!=null){\r\n\t\t\t\treflectionField.setAccessible(true);\r\n\t\t\t\tAnnotation annoField = reflectionField.getAnnotation(GPAField.class);\r\n\t\t\t\tAnnotation annoFieldPK = reflectionField.getAnnotation(GPAPrimaryKey.class);\r\n\t\t\t\tAnnotation annoFieldBean = reflectionField.getAnnotation(GPAFieldBean.class);\r\n\t\t\t\t/* \r\n\t\t\t\t ainda falta validar a chave primária do objeto\r\n\t\t\t\t por enquanto so esta prevendo pk usando sequence no banco\r\n\t\t\t\t objeto id sempre é gerado no banco por uma sequence\r\n\t\t\t\t*/\r\n\t\t\t\tif(annoFieldPK!=null && annoFieldPK instanceof GPAPrimaryKey){\r\n\t\t\t\t\tGPAPrimaryKey pk = (GPAPrimaryKey)annoFieldPK;\r\n\t\t\t\t\t//if(pk.ignore() == true){\r\n\t\t\t\t\t//\tcontinue;\r\n\t\t\t\t\t//}else{\r\n\t\t\t\t\tString name = pk.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t//}\r\n\t\t\t\t}\r\n\t\t\t\tif(annoField!=null && annoField instanceof GPAField){\r\n\t\t\t\t\tGPAField field = (GPAField)annoField;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoFieldBean!=null && annoFieldBean instanceof GPAFieldBean){\r\n\t\t\t\t\tGPAFieldBean field = (GPAFieldBean)annoFieldBean;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void attach(final Object self)\n throws IllegalArgumentException, IllegalAccessException, NoSuchMethodException,\n InvocationTargetException {\n for (Class<?> currentClass = self.getClass(); currentClass != Object.class; ) {\n if (Proxy.class.isAssignableFrom(currentClass)) {\n currentClass = currentClass.getSuperclass();\n continue;\n }\n for (Field f : currentClass.getDeclaredFields()) {\n final String fieldName = f.getName();\n final Class<?> declaringClass = f.getDeclaringClass();\n\n if (OObjectEntitySerializer.isTransientField(declaringClass, fieldName)\n || OObjectEntitySerializer.isVersionField(declaringClass, fieldName)\n || OObjectEntitySerializer.isIdField(declaringClass, fieldName)) continue;\n\n Object value = OObjectEntitySerializer.getFieldValue(f, self);\n value = setValue(self, fieldName, value);\n OObjectEntitySerializer.setFieldValue(f, self, value);\n }\n currentClass = currentClass.getSuperclass();\n\n if (currentClass == null || currentClass.equals(ODocument.class))\n // POJO EXTENDS ODOCUMENT: SPECIAL CASE: AVOID TO CONSIDER\n // ODOCUMENT FIELDS\n currentClass = Object.class;\n }\n }", "public void setModifiedDate(Date modifiedDate);", "public void setModifiedDate(Date modifiedDate);", "public void setModifiedDate(Date modifiedDate);", "@Override\npublic void setAttributes() {\n\t\n}", "protected JPAEntityUpdateEvent(T entity, Map<String, Object> newValues) {\n\t\tsuper(entity);\n\t\tthis.newValues = newValues;\n\t}", "Employee setBirthdate(Date birthdate);", "public void setAuditingTime(Date auditingTime) {\r\n this.auditingTime = auditingTime;\r\n }", "public void setFields(FieldSet editedData) throws Exception {\n\t\tfor (String controlName : editedData.keySet()) {\n\t\t\tif (editedData.get(controlName) != null) {\n\t\t\t\tVoodooUtils.voodoo.log.fine(\"Editing field: \" + controlName);\n\t\t\t\tString toSet = editedData.get(controlName);\n\t\t\t\tVoodooUtils.pause(100);\n\t\t\t\tVoodooUtils.voodoo.log.fine(\"Setting \" + controlName + \" field to: \"\n\t\t\t\t\t\t+ toSet);\n\t\t\t\tgetEditField(controlName).set(toSet);\n\t\t\t\tVoodooUtils.pause(100);\n\t\t\t}\n\t\t}\n\t}", "protected void reflectFormalizedDatetimeToEntity(MemberDto dto, Member entity) {\r\n entity.setFormalizedDatetime(extractFormalizedDatetimeFromDto(dto));\r\n }", "protected void reflectUpdateDatetimeToDto(Member entity, MemberDto dto) {\r\n dto.setUpdateDatetime(extractUpdateDatetimeFromEntity(entity));\r\n }", "private <T> void setField(Field field, Object object, T fieldInstance) {\n try {\n field.setAccessible(true);\n field.set(object, fieldInstance);\n } catch (IllegalArgumentException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Feld \" + field.getName() + \" ist kein Objekt!\", ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Feld \" + field.getName() + \" ist nicht zugreifbar!\", ex);\n } finally {\n field.setAccessible(false);\n }\n }", "public EntityDefinitionModel withHasAudit(Boolean hasAudit) {\n this.hasAudit = hasAudit;\n return this;\n }", "private void ensureEntityValue(IEntity entity) {\n entity.setPrimaryKey(entity.getPrimaryKey());\n }", "public static void setField(Entity entity, boolean nms, String fieldName, Object value)\r\n\t\t\tthrows IllegalArgumentException, NoSuchFieldException {\r\n\t\tValidate.notNull(entity, \"entity +-\");\r\n\t\tValidate.notNull(value, \"value +-\");\r\n\r\n\t\tObject instance = nms ? NMSUtils.getHandle(entity) : entity;\r\n\r\n\t\tField field = NMSUtils.getField(instance, fieldName);\r\n\r\n\t\ttry {\r\n\t\t\tfield.set(instance, value);\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void setupWriteFieldsForInsert(ObjectLevelModifyQuery query) {\r\n Object lockValue = getInitialWriteValue(query.getSession());\r\n ObjectChangeSet objectChangeSet = query.getObjectChangeSet();\r\n if (objectChangeSet != null) {\r\n objectChangeSet.setInitialWriteLockValue(lockValue);\r\n }\r\n updateWriteLockValueForWrite(query, lockValue);\r\n }", "public void setEntityContext(EntityContext aContext) {\n context = aContext;\n }", "public void setEntityContext(EntityContext aContext) {\n context = aContext;\n }", "public void setEntityContext(EntityContext aContext) {\n context = aContext;\n }", "public void setEntityContext(EntityContext aContext) {\n context = aContext;\n }", "void setInternal(ATTRIBUTES attribute, Object iValue);", "public void setEntityType(StageableEntity entityType) {\n\t\tthis.entityType = entityType;\n\t}", "@Override\n public void setValueAt(Object obj, int row, int col) {\n if (isCellEditable(row,col)){\n Feature f = fc.get(row);\n LifeStageAttributesInterface atts = (LifeStageAttributesInterface) f.getAttribute(1);\n if (debug) logger.info(\"SetValue for row \"+atts.getCSV());\n atts.setValue(keys.get(col), obj);\n fireTableCellUpdated(row, col);\n }\n }", "@PrePersist\r\n void createdAt() {\r\n setDateRecordAdded();\r\n setDateRecordUpdated();\r\n }", "public interface AuditModel {\n\n\tpublic void setCreatedBy(String createdBy);\n\n\tpublic void setCreatedByName(String createdByName);\n\n\tpublic void setUpdatedBy(String updatedBy);\n\n\tpublic void setUpdatedByName(String updateByName);\n\t\n\tpublic void checkValidity();\n\n}", "protected void copyProperties(AbstractContext context) {\n\t\tcontext.description = this.description;\n\t\tcontext.batchSize = this.batchSize;\n\t\tcontext.injectBeans = this.injectBeans;\n\t\tcontext.commitImmediately = this.isCommitImmediately();\n\t\tcontext.script = this.script;\n\t}", "public static DaoResult setCheckpointAttrs(ICheckpointDao dao, String checkpointId,\n Map<String, Object> fieldNamesAndValues) {\n CheckpointBo cp = getCheckpoint(dao, checkpointId, new Date());\n cp.setTimestamp(new Date());\n for (Map.Entry<String, Object> entry : fieldNamesAndValues.entrySet()) {\n cp.setDataAttr(entry.getKey(), entry.getValue());\n }\n return saveCheckpoint(dao, cp);\n }", "public void setAttributes(FactAttributes param) {\r\n localAttributesTracker = true;\r\n\r\n this.localAttributes = param;\r\n\r\n\r\n }", "private static void setValue(Object object, String fieldName, Object fieldValue) \n throws NoSuchFieldException, IllegalAccessException {\n \n Class<?> studentClass = object.getClass();\n while(studentClass != null){\n Field field = studentClass.getDeclaredField(fieldName);\n field.setAccessible(true);\n field.set(object, fieldValue);\n //return true;\n } \n //return false;\n }", "public void setEntityId(long entityId);", "@Override\n\tpublic void save(Field entity) {\n\t\t\n\t}", "private boolean setTaskEntityProperties(Task task, Entity taskEntity) {\n if ((!taskEntity.getKind().equals(\"Task\")) || (taskEntity.getKey().getId() != task.getId())) {\n return false;\n }\n\n taskEntity.setProperty(\"title\", task.getTitle());\n taskEntity.setProperty(\"details\", task.getDetails());\n taskEntity.setProperty(\"creationTime\", task.getCreationTime());\n taskEntity.setProperty(\"compensation\", task.getCompensation());\n taskEntity.setProperty(\"creatorId\", task.getCreatorId());\n taskEntity.setProperty(\"deadline\", task.getDeadlineAsLong());\n taskEntity.setProperty(\"address\", task.getAddress());\n taskEntity.setProperty(\"assigned\", task.isAssigned());\n taskEntity.setProperty(\"assigneeId\", task.getAssigneeId());\n taskEntity.setProperty(\"completionRating\", task.getCompletionRating());\n taskEntity.setProperty(\"active\", task.isActive());\n return true;\n }", "@Override\n\tpublic void audit(String id) throws Exception {\n\t\t\n\t}", "public void setDateModified(Date dateModified);", "@Override\n\tprotected void setViewAtributes() throws Exception {\n\t\tif (log.isDebugEnabled())log.debug(\"Ingresando a setViewAttributes\");\n\t\tthis.loggertList = new ArrayList();\n\t\tListar();\n\t\t\n\t}", "public AttributeField(Field field){\n this.field = field;\n }", "@Override\n\tpublic void alterar(Parcela entidade) {\n\n\t}", "public OSMAttributedEntity(long id, Map<String, Object> fields) {\n\t\tthis.id = id;\n\n\t\t// for safety reasons, we duplicated the fields hash,\n\t\t// safety first, then performance.\n\t\tif (fields != null) {\n\t\t\tfields = new HashMap<String, Object>(fields);\n\t\t}\n\n\t\tthis.fields = fields;\n\t}", "@Override\n\tpublic void beforeSave(Collection<R> rows) {\n\t\ttable//\n\t\t\t.getTransactionAttribute()\n\t\t\t.ifPresent(attribute -> attribute.updateTransactionFields(rows));\n\n\t\t// track which fields where changed\n\t\tDbConnections//\n\t\t\t.getOrPutTransactionData(EmfChangeTracker.class, EmfChangeTracker::new)\n\t\t\t.ifPresent(tracker -> tracker.trackChanges(rows));\n\n\t\texecuteSaveHooks(hook -> hook.beforeSave(rows));\n\t}", "public void setEntity(EntityBase entity) {\n if (((entity != null) && !entity.equals(this.entity)) ||\n ((this.entity != null) && !this.entity.equals(entity))) {\n reset();\n }\n this.entity = entity;\n }", "@Override\n protected void applyEntityAttributes() {\n super.applyEntityAttributes();\n this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0);\n }", "void entityValueChange(String name, String value);", "public void set(T t, Object obj) {\n try {\n this.field.set(t, obj);\n } catch (IllegalAccessException e) {\n throw new AssertionError(e);\n }\n }", "public void set(Object requestor, String field);", "private void changeCardAttributes(Player player,LeaderCard toCopy){\n\t\tfor(LeaderCard leader : player.getLeaderCards()){\n\t\t\tif((\"Lorenzo de Medici\").equalsIgnoreCase(leader.getName())){\n\t\t\t\tleader.setEffect(toCopy.getEffect());\n\t\t\t\tleader.setPermanent(toCopy.getPermanent());\n\t\t\t\tleader.setName(toCopy.getName());\n\t\t\t}\n\t\t}\n\t}", "public TLogEntity(TLogEntity other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetTitle()) {\n this.Title = other.Title;\n }\n if (other.isSetMessage()) {\n this.Message = other.Message;\n }\n this.Level = other.Level;\n this.Time = other.Time;\n if (other.isSetSource()) {\n this.Source = other.Source;\n }\n this.Thread = other.Thread;\n if (other.isSetTags()) {\n Map<String,String> __this__Tags = new HashMap<String,String>(other.Tags);\n this.Tags = __this__Tags;\n }\n }", "public void _copyToEJB(java.util.Hashtable h) {\n java.lang.Integer localCreatedby = (java.lang.Integer) h.get(\"createdby\");\n java.sql.Date localDocumentDate = (java.sql.Date) h.get(\"documentDate\");\n java.lang.String localDocumentNumber = (java.lang.String) h.get(\"documentNumber\");\n Integer localLeaseDocument = (Integer) h.get(\"leaseDocument\");\n java.sql.Timestamp localCreated = (java.sql.Timestamp) h.get(\"created\");\n java.lang.Integer localModifiedby = (java.lang.Integer) h.get(\"modifiedby\");\n java.lang.Integer localOperator = (java.lang.Integer) h.get(\"operator\");\n Integer localRegionid = (Integer) h.get(\"regionid\");\n java.sql.Timestamp localModified = (java.sql.Timestamp) h.get(\"modified\");\n\n if ( h.containsKey(\"createdby\") )\n setCreatedby((localCreatedby));\n if ( h.containsKey(\"documentDate\") )\n setDocumentDate((localDocumentDate));\n if ( h.containsKey(\"documentNumber\") )\n setDocumentNumber((localDocumentNumber));\n if ( h.containsKey(\"leaseDocument\") )\n setLeaseDocument((localLeaseDocument).intValue());\n if ( h.containsKey(\"created\") )\n setCreated((localCreated));\n if ( h.containsKey(\"modifiedby\") )\n setModifiedby((localModifiedby));\n if ( h.containsKey(\"operator\") )\n setOperator((localOperator));\n if ( h.containsKey(\"regionid\") )\n setRegionid((localRegionid).intValue());\n if ( h.containsKey(\"modified\") )\n setModified((localModified));\n\n}", "@Override\n\tpublic void set(int id, Post entity) {\n\t\t\n\t}", "EntityDefinitionVisitor getEntityDefinitionStateSetterVisitor();", "@Override\r\n public void toEntity(SubscriptionUser entity, AbstractUser dto) {\r\n if(dto == null) return;\r\n entity.setEmail(dto.getEmail());\r\n entity.setFirstName(dto.getFirstName());\r\n entity.setLastName(dto.getLastName());\r\n entity.setAdministrator(false);\r\n entity.setLanguage(dto.getLanguage());\r\n entity.setOpenId(dto.getOpenId());\r\n entity.setUuid(dto.getUuid());\r\n }", "public void setEntidad(T entidad) {\r\n this.entidad = entidad;\r\n fillData(entidad);\r\n }", "public void setEntity(org.openejb.config.ejb11.Entity entity) {\n this._entity = entity;\n }", "void setFields(Set<F> fields);", "public EntityAndArguments (Entity entity, List<OVInstance> arguments) {\r\n\t\t\tthis.entity = entity;\r\n\t\t\tthis.arguments = arguments;\r\n\t\t}", "public void setEntity(String parName, Object parVal) throws HibException;", "@Override\r\n\tpublic void update( UserFields oldFields, UserFields newFields ) {\n\t\t\r\n\t}", "@Override\n\tpublic void update(finalDataBean t, String[] fields) throws Exception {\n\t\t\n\t}", "public void setDtMotivoLlamadoAtencion(DataTable dtMotivoLlamadoAtencion)\r\n/* 139: */ {\r\n/* 140:144 */ this.dtMotivoLlamadoAtencion = dtMotivoLlamadoAtencion;\r\n/* 141: */ }", "@NoProxy\n public void setDtstamps(final Timestamp val) {\n DateTime dt = new DateTime(val);\n setDtstamp(new DtStamp(dt).getValue());\n setLastmod(new LastModified(dt).getValue());\n setCtoken(getLastmod() + \"-\" + hex4FromNanos(val.getNanos()));\n\n if (getCreated() == null) {\n setCreated(new Created(dt).getValue());\n }\n }", "public void setEntityId(String entityId) {\n this.entityId = entityId;\n }", "@Test\n public void setEnabled() {\n cleanEntity0();\n\n entity0.setEnabled(enabledS);\n assertEquals(enabledS, ReflectionTestUtils.getField(entity0, \"enabled\"));\n }", "public void setModified();", "@Override\n\tpublic void setProperty(int arg0, Object arg1) {\n\t\tif (arg1 == null)\n\t\t\treturn;\n\t\tswitch (arg0) {\n\t\tcase 0:\n\t\t\tthis.EntityKey=arg1.toString();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tthis.Id=Integer.valueOf(arg1.toString());\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis.Description=arg1.toString();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis.StartDate=arg1.toString();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis.EndDate=arg1.toString();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void setField (String fieldToModify, String value, Double duration) {\n\n }", "@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}", "public EventoDTO(EventoEntity entity) {\n if(entity != null)\n {\n this.nombreEvento = entity.getNombreEvento();\n this.tipoEvento = entity.getTipoEvento();\n this.fechaEvento = entity.getFechaEvento();\n this.ubicacionLat = entity.getUbicacionLat();\n this.ubicacionLon = entity.getUbicacionLon();\n this.privado = entity.isPrivado();\n this.capacidad = entity.getCapacidad();\n this.distanciaVivienda = entity.getDistanciaVivienda();\n this.id = entity.getId();\n }\n }" ]
[ "0.58524746", "0.5801445", "0.5435285", "0.53608185", "0.5336651", "0.5334838", "0.5319945", "0.5254487", "0.52442575", "0.5231818", "0.5213473", "0.5143434", "0.5127877", "0.5111755", "0.51093227", "0.5092488", "0.5072182", "0.50315905", "0.5021498", "0.5015799", "0.49882996", "0.4970818", "0.4962211", "0.49497524", "0.49156645", "0.4915338", "0.49129155", "0.4903232", "0.48865372", "0.48808423", "0.48503822", "0.48300853", "0.48294222", "0.4810598", "0.48064768", "0.48051414", "0.48051414", "0.48051414", "0.47804934", "0.47695926", "0.47667506", "0.4766134", "0.476235", "0.47566608", "0.47546422", "0.47516066", "0.47457156", "0.4737655", "0.4706581", "0.46852902", "0.46847683", "0.46847683", "0.46847683", "0.46847683", "0.4673601", "0.4668184", "0.46670267", "0.46593052", "0.4655525", "0.46525946", "0.46167532", "0.46119338", "0.46076155", "0.46069694", "0.46058145", "0.4604763", "0.4602937", "0.4593292", "0.45783222", "0.4573822", "0.45737058", "0.4572991", "0.4572775", "0.4567446", "0.45661786", "0.45660827", "0.4564863", "0.45643768", "0.45603362", "0.4558074", "0.45550656", "0.45546144", "0.4547331", "0.45424747", "0.45376074", "0.45369682", "0.4531722", "0.45313713", "0.45282727", "0.45234156", "0.4516597", "0.4516145", "0.45092857", "0.4507303", "0.44951963", "0.44888103", "0.44822195", "0.44814447", "0.4481113", "0.44794446" ]
0.734217
0
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Bezparametricky konstruktor. Inicializuje kontejnery na soubory.
private DirectoryParser() { this.parsedFiles = new TreeMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "protected void setupParameters() {\n \n \n\n }", "@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }", "public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ this.placeholder = _placeholder_DefaultValue_xjal();\n/* 68: */ }", "public void initTsnParams(){\n }", "void setParameters() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public JpSetting() {\n initComponents();\n fillThongtin();\n }", "public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}", "public DepictionParameters() {\n this(200, 150, true, DEFAULT_BACKGROUND);\n }", "public BaseParameters(){\r\n\t}", "protected void _init(){}", "private Params()\n {\n }", "public contrustor(){\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tpublic void init() {}", "@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}", "private LocalParameters() {\n\n\t}", "protected void initDefaultParameters(String name) {\n\t\t// default parameter - name\n\t\tCaselessParameter cslpar =\n\t\t\tnew CaselessParameter(ISchemaComponent.KEY_NAME, false, new Caseless(name));\n\t\tcslpar.setParameterEvent(new NameChanger());\n\t\tparameters.addParameter(cslpar);\n\t\t\n\t\t// default parameter - component orientation\n\t\tGenericParameter<Orientation> orientpar =\n\t\t\tnew GenericParameter<Orientation>(ISchemaComponent.KEY_ORIENTATION, false,\n\t\t\t\t\tnew Orientation());\n\t\torientpar.getConstraint().setPossibleValues(Orientation.allAllowed);\n\t\tparameters.addParameter(orientpar);\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic void init()\r\n\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}", "public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void setDefaultParameters() {\n\t\toptions = 0;\n\t\toutBits = null;\n\t\ttext = new byte[0];\n\t\tyHeight = 3;\n\t\taspectRatio = 0.5f;\n\t}", "public HandicapParameterSet() {\n }", "public void init(){\n \n }", "public SessionParameters () {\n\t\tsuper();\n\t\tlocale = Locale.getDefault();\n\t\tcustomDictionaries = new HashSet<>();\n\t}", "@PostConstruct\r\n\tpublic void init() {\n\t\ttexto=\"Nombre : \";\r\n\t\topcion = 1;\r\n\t\tverPn = true;\r\n\t\ttipoPer = 1;\r\n\t\tsTipPer = \"N\";\r\n\t\tverGuar = true;\r\n\t\tvalBus = \"\";\r\n\t\tverCampo = true;\r\n\t\tread = false;\r\n\t\tgrabar = 0;\r\n\t\tcodCli = 0;\r\n\t\tcargarLista();\r\n\t}", "protected void init() {\n // to override and use this method\n }", "@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}", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\n protected void init() {\n }", "private void init() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void init() {\n \n }", "@Override\n\tpublic void init() {\n\t}", "@Override // opcional\n public void init(){\n\n }", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "public void init() {\r\n\r\n\t}", "public ParamJson() {\n\t\n\t}", "@Override\n public void init() {}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "protected void initialize() { \n param1 = SmartDashboard.getNumber(\"param1\");\n param2 = SmartDashboard.getNumber(\"param2\");\n param3 = SmartDashboard.getNumber(\"param3\");\n param4 = SmartDashboard.getNumber(\"param4\");\n command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3);\n }", "public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }", "public Setparam() {\r\n super();\r\n }", "protected void init(){\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Final_parametre() {\r\n\t}", "protected void parametersInstantiation_EM() {\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "private void init() {\n\n\n\n }", "@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}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public SocketParams() {\n init();\n }", "public void init()\n { \t\n }", "Constructor() {\r\n\t\t \r\n\t }", "public void init() {\n\t\t\n\t}", "public MParameterSystem() {\n\t\tsuper();\n\t}", "public void init() {\n\t\t}", "protected void initOtherParams() {\n\n\t\t// init other params defined in parent class\n\t\tsuper.initOtherParams();\n\n\t\t// the Component Parameter\n\t\t// first is default, the rest are all options (including default)\n\t\tcomponentParam = new ComponentParam(Component.AVE_HORZ, Component.AVE_HORZ,\n\t\t\t\tComponent.RANDOM_HORZ, Component.GREATER_OF_TWO_HORZ);\n\n\t\t// the stdDevType Parameter\n\t\tStringConstraint stdDevTypeConstraint = new StringConstraint();\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_TOTAL);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTER);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTRA);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_NONE);\n\t\tstdDevTypeConstraint.setNonEditable();\n\t\tstdDevTypeParam = new StdDevTypeParam(stdDevTypeConstraint);\n\n\t\t// add these to the list\n\t\totherParams.addParameter(componentParam);\n\t\totherParams.addParameter(stdDevTypeParam);\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}", "public RptPotonganGaji() {\n }", "public Tbdtokhaihq3() {\n super();\n }", "@Override public void init()\n\t\t{\n\t\t}", "@Override\n public void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n }", "public Plato(){\n\t\t\n\t}", "public void init() {\n\t\t \r\n\t\t }", "public void setInitialParameters() {\n /** DO NOTHING */\n }", "@Override\n void init() {\n }", "@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 public void init() {\n\n super.init();\n\n }", "protected void init() {\n\t}", "protected void init() {\n\t}", "public void init(){\r\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public SysMenuParams() {\n\t\tsuper();\n\t}" ]
[ "0.6722415", "0.632361", "0.6073283", "0.60097504", "0.5994712", "0.5969657", "0.5898024", "0.5889229", "0.58576506", "0.5852905", "0.5828161", "0.5818687", "0.5818466", "0.5816343", "0.5813871", "0.58003354", "0.57998663", "0.57907766", "0.57907766", "0.57907766", "0.578895", "0.57849956", "0.57769823", "0.5772408", "0.5770937", "0.5770937", "0.5770937", "0.5747877", "0.5745404", "0.57375664", "0.5733448", "0.57302964", "0.5719684", "0.56901324", "0.5688282", "0.5685745", "0.5685745", "0.5685745", "0.5685745", "0.5685745", "0.56820387", "0.5680799", "0.5660436", "0.5652591", "0.56443477", "0.56420964", "0.56317425", "0.56273735", "0.56262773", "0.56202275", "0.5620114", "0.5617044", "0.5617044", "0.5617044", "0.56081253", "0.56048", "0.55974674", "0.5594596", "0.5578937", "0.55770916", "0.557559", "0.5571268", "0.55699533", "0.55649894", "0.5563792", "0.5560538", "0.5560538", "0.5560538", "0.55548483", "0.55511636", "0.5529741", "0.5527273", "0.5527016", "0.55254", "0.5522342", "0.5516081", "0.55121833", "0.55117536", "0.55080914", "0.5506461", "0.5501444", "0.55004585", "0.55004585", "0.55003357", "0.5496419", "0.5496134", "0.54940563", "0.54904", "0.5489295", "0.5489295", "0.5489295", "0.5489295", "0.5489295", "0.5489295", "0.5486505", "0.5486119", "0.5486119", "0.5484954", "0.54845434", "0.54845434", "0.54845285" ]
0.0
-1
Tovarni metoda vraci odkaz na jedinou instanci DirectoryParser.
public static DirectoryParser getParser() { return DirectoryParser.INSTANCE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private DirectoryParser() {\n this.parsedFiles = new TreeMap<>();\n }", "public Directory(String nm){\r\n\t\tsuper();\r\n\t}", "public Directory parseDirectory() {\n\n\t// Create a buffer for the result.\n\tDirectory result = new DirectoryImpl( this);\n\n\t// The track and sector pos of the currency directory sector.\n\tint trackIndex = 18;\n\tint sectorIndex = 1;\n\n\t// The directory starts at track 18, sector 1 and normally continues to sector 18.\n\twhile( ( trackIndex != 0) && (sectorIndex != 0)) {\n\n\t // Get the data of the current sector.\n\t byte [] sectorData = getSector( trackIndex, sectorIndex).getDataBytes();\n\n\t // Parse the directory entries in this sector.\n\t for( int currentEntry = 0; currentEntry < 8; ++currentEntry) {\n\n\t\t// Calculate the byte, where the directory entry starts.\n\t\tint entryOffset = 32 * currentEntry;\n\n\t\t// Check, if this entry is a deleted file.\n\t\tif( sectorData[ entryOffset + 2] == 0) { \n\n\t\t continue; // This entry is deleted.\n\t\t}\n\n\t\t// Get the name of the filename.\n\t\tStringBuffer filenameBuffer = new StringBuffer();\n\n\t\tfor( int filenameIndex = 5; filenameIndex <= 14; ++filenameIndex) {\n\n\t\t // Get the current byte of the filename.\n\t\t byte currentFilenameChar = sectorData[ entryOffset + filenameIndex];\n\n\t\t if( currentFilenameChar == 0xa0) { // This is a padding byte. Filename is complete.\n\t\t\t\n\t\t\tbreak;\n\n\t\t } else { // Convert this petscii char and add it to the filename.\n\t\t\t\n\t\t\tfilenameBuffer.append( CharsetUtils.getInstance().petscii2ascii( currentFilenameChar));\n\t\t }\n\t\t}\n\n\t\t// Get the type of the file.\n\t\tbyte currentFileType = (byte)( sectorData[ entryOffset + 2] & (byte)7);\n\t\tString currentFileTypeName = \"\";\n\n\t\tswitch( currentFileType) {\n\t\tcase 1: currentFileTypeName = \"SEQ\"; break;\n\t\tcase 2: currentFileTypeName = \"PRG\"; break;\n case 3: currentFileTypeName = \"USR\"; break;\n\t\tcase 4: currentFileTypeName = \"REL\"; break;\n\t\t}\n\n\t\t// Try to approximate the filesize. The c64 only stores blocks of 254 bytes and not \n\t\t// the actual filesize in bytes.\n\t\tint filesize = sectorData[ entryOffset + 0x1e] + ( 256 * sectorData[ entryOffset + 0x1f]);\n\t\t\n\t\t// Create a directory entry and add it to the result.\n\t\tresult.addDirectoryEntry( new D64DirectoryEntry( filenameBuffer.toString()\n\t\t\t\t\t\t\t\t , filesize\n\t\t\t\t\t\t\t\t , currentFileTypeName\n\t\t\t\t\t\t\t\t , sectorData[ entryOffset + 3] // Track index of the first sector.\n\t\t\t\t\t\t\t\t , sectorData[ entryOffset + 4] // Sector index of the first sector.\n\t\t\t\t\t\t\t\t , result));\n\t }\n\n\t // Get the track and sector of the next directory sector from the current sector;\n\t trackIndex = sectorData[ 0];\n\t sectorIndex = sectorData[ 1];\n\t}\n\n\t// Return the parsed directory.\n\treturn result;\n }", "public DirectoryTree() {\r\n Directory root = new Directory(\"/\", null);\r\n rootDir = root;\r\n }", "public void ParseDir(String dirname)\n\t{\n\t\ttry {\n\t\t\tfor(File f: getFileListing(new File(dirname)))\n\t\t\t{\n\t\t\t\tString s = readFileAsString(f.getAbsolutePath());\n\t\t\t\ts = filterComments(s);\n\t\t\t\tdna.setParser(this);\n\t\t\t\tdna.createFromString(s);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Directory(String name) {\n super(name);\n this.parent = null;\n }", "public DirectoryFileLocator(File dir) {\r\n directory = dir;\r\n }", "public DirectoryManager(String directory,String _username){\n username = _username;\n root = new File(directory);\n if(!root.exists()) //create root directory if it doesn't exists\n root.mkdir();\n PWD = new File(root,username); //set home directory(root/username) as PWD\n if (!PWD.exists()) { //create PWD directory if it doesn't exists\n PWD.mkdir();\n }\n pattern = Pattern.compile(root + osPathSeprator + username + osPathSeprator + \"(.*)\");\n }", "public Directory(String dirName) {\n setDirName(dirName);\n }", "public LdapFilterParser()\n {\n this.scanner = new LdapFilterScanner();\n this.model = new LdapFilter();\n }", "public HtmlTagDir() {\n super(\"dir\");\n setValidAttributes(new String[]{\"compact\"});\n }", "private Directories() {\n\n\t}", "protected DirectoryFilter(String description) {\r\n super(description);\r\n }", "public DirectoryService() {\n\n }", "public DirectoryModel() {\r\n\tthis(null);\r\n }", "public CustomDirectoryFactory(){\n\t\tsuper();\n\t}", "public void parseDirectory(File directory) throws IOException {\n this.parsedFiles.clear();\n File[] contents = directory.listFiles();\n for (File file : contents) {\n if (file.isFile() && file.canRead() && file.canWrite()) {\n String fileName = file.getPath();\n if (fileName.endsWith(\".html\")) {\n Document parsed;\n parsed = Jsoup.parse(file, \"UTF-8\");\n if (this.isWhiteBearArticle(parsed)) {\n HTMLFile newParsedFile = new HTMLFile(parsed, false);\n String name = file.getName();\n this.parsedFiles.put(name, newParsedFile);\n } else if (this.isMenuPage(parsed)) {\n //HTMLFile newParsedFile = new HTMLFile(parsed, false);\n //String name = file.getName();\n //this.parsedFiles.put(name, newParsedFile);\n }\n }\n }\n }\n }", "private Parser () { }", "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 DirectoryFileFilter() {\n\t\tthis(true);\n\t}", "public CanonicalTreeParser() {\n \t\t// Nothing necessary.\n \t}", "public MockDirectoryManager(Path directory) throws IOException {\n\n\t\tthis(directory, true);\n\t}", "public Directory getDirectory() {\n\n\tif( _directory == null) { // If the current directory was not already parsed,\n \n \t _directory = parseDirectory(); // parse it.\n\t}\n\n\treturn _directory; // Return the current root directory.\n }", "public AParser(String RootPath) {\n\t\tthis.mngr = new AFileManager(RootPath, true);\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t}", "public DirectoryWalker(String path) throws InvalidPathException, IllegalArgumentException\n\t{\n\t\tthis(Paths.get(path));\n\t}", "public static void parseFromDirectory(File input){\n\t\t\n\t\tlong timer = System.currentTimeMillis();\n\t\t\n\t\tScanner nouns1;\n\t\tScanner nouns2;\n\t\tScanner nouns3;\n\t\tScanner nouns4;\n\t\tScanner nouns5;\n\t\t\n\t\tScanner verbs1;\n\t\tScanner verbs2;\n\t\tScanner verbs3;\n\t\tScanner verbs3IO;\n\t\tScanner verbs4;\n\t\t\n\t\tScanner adjectives12;\n\t\tScanner adjectives3;\n\t\t\n\t\tScanner adverbs;\n\t\tScanner prepositions;\n\t\tScanner conjunctions;\n\t\t\n\t\tif(!input.isDirectory()){\n\t\t\tthrow new IllegalArgumentException(\"Input file was not a directory!\");\n\t\t}\n\t\t\n\t\tString inputLocation = input.getAbsolutePath();\n\t\t\n\t\ttry {\n\t\t\t//Initialize everything\n\t\t\tnouns1 = new Scanner(new File(inputLocation+\"\\\\Nouns1.txt\"));\n\t\t\tnouns2 = new Scanner(new File(inputLocation+\"\\\\Nouns2.txt\"));\n\t\t\tnouns3 = new Scanner(new File(inputLocation+\"\\\\Nouns3.txt\"));\n\t\t\tnouns4 = new Scanner(new File(inputLocation+\"\\\\Nouns4.txt\"));\n\t\t\tnouns5 = new Scanner(new File(inputLocation+\"\\\\Nouns5.txt\"));\n\t\t\t\n\t\t\tverbs1 = new Scanner(new File(inputLocation+\"\\\\Verbs1.txt\"));\n\t\t\tverbs2 = new Scanner(new File(inputLocation+\"\\\\Verbs2.txt\"));\n\t\t\tverbs3 = new Scanner(new File(inputLocation+\"\\\\Verbs3.txt\"));\n\t\t\tverbs3IO = new Scanner(new File(inputLocation+\"\\\\Verbs3IO.txt\"));\n\t\t\tverbs4 = new Scanner(new File(inputLocation+\"\\\\Verbs4.txt\"));\n\t\t\t\n\t\t\tadjectives12 = new Scanner(new File(inputLocation+\"\\\\Adjectives12.txt\"));\n\t\t\tadjectives3 = new Scanner(new File(inputLocation+\"\\\\Adjectives3.txt\"));\n\t\t\t\n\t\t\tadverbs = new Scanner(new File(inputLocation+\"\\\\Adverbs.txt\"));\n\t\t\tprepositions = new Scanner(new File(inputLocation + \"\\\\Prepositions.txt\"));\n\t\t\tconjunctions = new Scanner(new File(inputLocation+\"\\\\Conjunctions.txt\"));\n\n\t\t\t//Make the arraylists to hold data\n\t\t\tallNouns = new TreeSet<Noun>();\n\t\t\tallVerbs = new TreeSet<Verb>();\n\t\t\tallAdjectives = new TreeSet<Adjective>();\n\t\t\tallAdverbs = new TreeSet<Adverb>();\n\t\t\tallConjunctions = new TreeSet<Conjunction>();\n\t\t\tallPrepositions = new TreeSet<Preposition>();\n\t\t\t\n\t\t\tallNouns.addAll(parseNouns(nouns1, Values.INDEX_NOUN_TYPE_DECLENSION_FIRST));\n\t\t\tallNouns.addAll(parseNouns(nouns2, Values.INDEX_NOUN_TYPE_DECLENSION_SECOND));\n\t\t\tallNouns.addAll(parse3rdNouns(nouns3));\n\t\t\tallNouns.addAll(parseNouns(nouns4, Values.INDEX_NOUN_TYPE_DECLENSION_FOURTH));\n\t\t\tallNouns.addAll(parseNouns(nouns5, Values.INDEX_NOUN_TYPE_DECLENSION_FIFTH));\n\t\t\t\n\t\t\tallVerbs.addAll(parseVerbs(verbs1, Values.INDEX_VERB_TYPE_CONJUGATION_FIRST));\n\t\t\tallVerbs.addAll(parseVerbs(verbs2, Values.INDEX_VERB_TYPE_CONJUGATION_SECOND));\n\t\t\tallVerbs.addAll(parseVerbs(verbs3, Values.INDEX_VERB_TYPE_CONJUGATION_THIRD));\n\t\t\tallVerbs.addAll(parseVerbs(verbs3IO, Values.INDEX_VERB_TYPE_CONJUGATION_THIRDIO));\n\t\t\tallVerbs.addAll(parseVerbs(verbs4, Values.INDEX_VERB_TYPE_CONJUGATION_FOURTH));\n\t\t\t\n\t\t\tallAdjectives.addAll(parseAdjective12(adjectives12));\n\t\t\tallAdjectives.addAll(parseAdjective3(adjectives3));\n\t\t\t\n\t\t\tallAdverbs.addAll(parseAdverbs(adverbs));\n\t\t\tallPrepositions.addAll(parsePrepositions(prepositions));\n\t\t\tallConjunctions.addAll(parseConjunctions(conjunctions));\n\t\t\t\n\t\t\t//make sure that everything is sorted by chapter!\n\t\t\t\n\t\t\t//close everything\n\t\t\tnouns1.close();\n\t\t\tnouns2.close();\n\t\t\tnouns3.close();\n\t\t\tnouns4.close();\n\t\t\tnouns5.close();\n\t\t\t\n\t\t\tverbs1.close();\n\t\t\tverbs2.close();\n\t\t\tverbs3.close();\n\t\t\tverbs3IO.close();\n\t\t\tverbs4.close();\n\t\t\t\n\t\t\tadjectives12.close();\n\t\t\tadjectives3.close();\n\t\t\t\n\t\t\tadverbs.close();\n\t\t\tprepositions.close();\n\t\t\tconjunctions.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\tSystem.out.println(\"Failed to open files!\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tint totalWords = allAdjectives.size() + allNouns.size() + allVerbs.size() + allAdverbs.size() + allConjunctions.size() + allPrepositions.size();\n\t\t\n\t\tSystem.out.printf(\"Done in: %d milliseconds! \\nParsed %d words. \\nFINISHED PARSING. \\n\", (System.currentTimeMillis()-timer), totalWords);\n\t\t\n\t}", "public Directory(IDirectory parentDirectory, String name) {\n super(name);\n this.parent = parentDirectory;\n }", "Object getDir();", "public Parser() {}", "public abstract ArgumentParser makeParser();", "public DirectoryFileLocator(String dirname) {\r\n this(new File(dirname));\r\n }", "public DirectoryFileLocator() {\r\n this(System.getProperty(\"user.dir\"));\r\n }", "private Parser() {\n objetos = new ListaEnlazada();\n }", "public CompanyDirectory() {\r\n\t\tcompanyDirectory = new LinkedListRecursive<Company>();\r\n\t}", "public LevelLoader(String directoryPath) {\n\t\tdirectory = TextFileReader.getDirectory(directoryPath);\n\t}", "private LdapTools() {}", "private DirectoryObjects getDirectory(String path, DirectoryObjects current) {\n\t\tif (path.lastIndexOf(\"/\") == 0) {\n\t\t\treturn current;// done\n\t\t} else {\n\t\t\t// parse directories...\n\t\t\tArrayList<String> direcs = new ArrayList<>();\n\t\t\tString temp = path;\n\t\t\tboolean cont = true;\n\t\t\ttemp = temp.substring(1);\n\t\t\twhile (temp.length() > 1 && cont) {\n\n\t\t\t\t// add the substring to the list of directories that need to be\n\t\t\t\t// checked and/or created\n\t\t\t\tdirecs.add(temp.substring(0, temp.indexOf(\"/\")));\n\t\t\t\t// if there are more \"/\"s left, repeat\n\t\t\t\tif (temp.contains(\"/\")) {\n\t\t\t\t\ttemp = temp.substring(temp.indexOf(\"/\") + 1);\n\t\t\t\t}\n\t\t\t\t// else break out of the loop\n\t\t\t\telse {\n\t\t\t\t\tcont = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do one last check to see if there are any extra characters left\n\t\t\tif (temp.length() > 0) {\n\t\t\t\t// there is still something left\n\t\t\t\tdirecs.add(temp);\n\t\t\t}\n\n\t\t\t// go through each directory, checking if it exists. if not, create\n\t\t\t// the directory and repeat.\n\t\t\tDirectoryObjects l = current;\n\n\t\t\tfor (String p : direcs) {\n\n\t\t\t\tif (l.getDirectoryByName(p) != null) {\n\t\t\t\t\tl = l.getDirectoryByName(p);\n\t\t\t\t} else {\n\t\t\t\t\t// instead of creating a new directory, we just throw an\n\t\t\t\t\t// exception\n\t\t\t\t\treturn l;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn l;\n\n\t\t}\n\n\t}", "private GraphParser(){ \n\t}", "public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }", "public NoKD getDir() {\r\n return dir;\r\n }", "public OptionParser() {\n\n\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}", "public DirectoryStack() {\n directoryStack = new Stack<Directory>();\n }", "public CommandParser(){\n setLanguage(\"ENGLISH\");\n commandTranslations = getPatterns(new String[] {TRANSLATION});\n commands = new ArrayList<>();\n addErrors();\n }", "@Override\n public boolean isDir() { return true; }", "public DirectoryWalker(Path path) throws IllegalArgumentException\n\t{\n\t\t//Need to throw up an exception if what was provided is not a directory\n\t\tif (!Files.isDirectory(path))\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"The specified path was not a directory\");\n\t\t}\n\t\tthis.root = path;\n\t\t\n\t}", "@Override\r\n\t\tpublic void setDir(String dir)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Basic @Raw\r\n\tpublic Directory getDir() {\r\n\t\treturn dir;\r\n\t}", "public Directory(Point origin, double radius, int owner) {\n\t\tsuper(origin, radius, PRODUCTION_SPEED, owner, new Arrow(owner));\n\t}", "public Directory() {\n files = new ArrayList<VipeFile>();\n sectors = new int[600];\n }", "@Override\n public boolean startVisit(Directory dir)\n {\n return true;\n }", "public String getDir(){\r\n\t\treturn dir;\r\n\t}", "public Parser() {\n\t\tpopulateMaps();\n\t}", "public InstanceList readDirectories(File[] directories) {\n FileIterator iterator =\n new FileIterator(directories,\n new TxtFilter(),\n FileIterator.LAST_DIRECTORY);\n\n // Construct a new instance list, passing it the pipe\n // we want to use to process instances.\n InstanceList instances = new InstanceList(pipe);\n\n // Now process each instance provided by the iterator.\n instances.addThruPipe(iterator);\n\n return instances;\n }", "public boolean isDir() { return _entry==null; }", "public LabsManager(File directory)\n {\n this.directory = directory;\n }", "public void setDir(File d) {\r\n this.dir = d;\r\n }", "public SimpleDirectory() {\n this.container = new Entry[SimpleDirectory.DEFAULT_SIZE];\n this.loadFactor = SimpleDirectory.DEFAULT_LOAD_FACTOR;\n }", "public Importer(File directory) {\r\n\t\tsuper();\r\n\t\t_headerObject = new HeaderObject();\r\n\t\t_headerObject._directory = directory;\r\n\t}", "public ImportCommandParser() {\n persons = new ArrayList<>();\n }", "public void initParser() {;\r\n lp = DependencyParser.loadFromModelFile(\"edu/stanford/nlp/models/parser/nndep/english_SD.gz\");\r\n tokenizerFactory = PTBTokenizer\r\n .factory(new CoreLabelTokenFactory(), \"\");\r\n }", "public RuleParser() {\n this.fileName = \"\";\n }", "public void setDir(File dir) {\n this.dir = dir;\n }", "@attribute(value = \"\", required = true)\t\r\n\tpublic void setDir(String dir) {\r\n\t\tthis.dir = new File(dir);\r\n\t}", "@DataBoundSetter\n public void setDir(String dir) {\n this.dir = dir;\n }", "@Override\n\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tPath resolve = target.resolve(source.relativize(dir));\n\t\t\t\tFile resolve_file = resolve.toFile();\n\n\t\t\t\tif (resolve_file.exists() == false) {\n\t\t\t\t\tFiles.createDirectory(resolve);\n\t\t\t\t} else {\n\t\t\t\t\t// delete old data in sub-directories\n\t\t\t\t\t// without deleting the directory\n\t\t\t\t\tArrays.asList(resolve_file.listFiles()).forEach(File::delete);\n\t\t\t\t}\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}", "protected StreamParser()\n {\n }", "public DList()\r\n {\r\n startTag=\"DL\";\r\n endTag=\"/DL\"; \r\n }", "public FileInfoMinc(final String name, final String directory, final int format) {\r\n super(name, directory, format);\r\n }", "public TIFFDirectory(SeekableStream stream, long ifdOffset, int directory)\n throws IOException {\n\n long globalSaveOffset = stream.getFilePointer();\n stream.seek(0L);\n int endian = stream.readUnsignedShort();\n if (!isValidEndianTag(endian)) {\n throw new IllegalArgumentException(PropertyUtil.getString(\"TIFFDirectory1\"));\n }\n isBigEndian = (endian == 0x4d4d);\n\n // Seek to the first IFD.\n stream.seek(ifdOffset);\n\n // Seek to desired IFD if necessary.\n int dirNum = 0;\n while (dirNum < directory) {\n // Get the number of fields in the current IFD.\n long numEntries = readUnsignedShort(stream);\n\n // Skip to the next IFD offset value field.\n stream.seek(ifdOffset + 12 * numEntries);\n\n // Read the offset to the next IFD beyond this one.\n ifdOffset = readUnsignedInt(stream);\n\n // Seek to the next IFD.\n stream.seek(ifdOffset);\n\n // Increment the directory.\n dirNum++;\n }\n\n initialize(stream);\n stream.seek(globalSaveOffset);\n }", "DiscDirectoryInfo getDirectoryInfo(String path) throws IOException;", "public String getDir();", "public SelectDirectoryMenuFactory() throws CoreException {\n\t\tsuper(new DirectoryOptionsChooserFactory());\n\t}", "public FileDiffDirectory(String directoryName, DiffState state) {\n \t\tthis.directoryName = directoryName;\n \t\tthis.state = state;\n \t\tthis.files = new ArrayList<FileDiffFile>();\n \t\tthis.directories = new ArrayList<FileDiffDirectory>();\n \t}", "public AliasListMetaCommandParser(AliasManager aliasManager, String command) {\n super(aliasManager, command);\n }", "public Parser()\n {\n //nothing to do\n }", "private LuceneManager(String indexDir) {\n this.indexDir = indexDir;\n }", "public String getDir() {\n return dir;\n }", "public void parse( String ldapFilter )\n {\n // reset state\n filterStack = new Stack<LdapFilter>();\n scanner.reset( ldapFilter );\n model = new LdapFilter();\n\n // handle error tokens before filter\n LdapFilterToken token = scanner.nextToken();\n while ( token.getType() != LdapFilterToken.LPAR && token.getType() != LdapFilterToken.EOF )\n {\n handleError( false, token, model );\n token = scanner.nextToken();\n }\n\n // check filter start\n if ( token.getType() == LdapFilterToken.LPAR )\n {\n // start top level filter\n model.setStartToken( token );\n filterStack.push( model );\n\n // loop till filter end or EOF\n do\n {\n // next token\n token = scanner.nextToken();\n\n switch ( token.getType() )\n {\n case LdapFilterToken.LPAR:\n {\n LdapFilter newFilter = new LdapFilter();\n newFilter.setStartToken( token );\n\n LdapFilter currentFilter = filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n if ( filterComponent != null && filterComponent.addFilter( newFilter ) )\n {\n filterStack.push( newFilter );\n }\n else\n {\n currentFilter.addOtherToken( token );\n }\n\n break;\n }\n case LdapFilterToken.RPAR:\n {\n LdapFilter currentFilter = filterStack.pop();\n handleError( currentFilter.setStopToken( token ), token, currentFilter );\n /*\n * if(!filterStack.isEmpty()) { LdapFilter parentFilter =\n * (LdapFilter) filterStack.peek(); LdapFilterComponent\n * filterComponent = parentFilter.getFilterComponent();\n * filterComponent.addFilter(currentFilter); }\n */\n break;\n }\n case LdapFilterToken.AND:\n {\n LdapFilter currentFilter = filterStack.peek();\n LdapAndFilterComponent filterComponent = new LdapAndFilterComponent( currentFilter );\n filterComponent.setStartToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n break;\n }\n case LdapFilterToken.OR:\n {\n LdapFilter currentFilter = filterStack.peek();\n LdapOrFilterComponent filterComponent = new LdapOrFilterComponent( currentFilter );\n filterComponent.setStartToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n break;\n }\n case LdapFilterToken.NOT:\n {\n LdapFilter currentFilter = filterStack.peek();\n LdapNotFilterComponent filterComponent = new LdapNotFilterComponent( currentFilter );\n filterComponent.setStartToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n break;\n }\n case LdapFilterToken.ATTRIBUTE:\n {\n LdapFilter currentFilter = filterStack.peek();\n LdapFilterItemComponent filterComponent = new LdapFilterItemComponent( currentFilter );\n filterComponent.setAttributeToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n break;\n }\n case LdapFilterToken.VALUE:\n {\n LdapFilter currentFilter = filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n if ( filterComponent instanceof LdapFilterItemComponent )\n {\n handleError( ( filterComponent instanceof LdapFilterItemComponent )\n && ( ( LdapFilterItemComponent ) filterComponent ).setValueToken( token ), token,\n currentFilter );\n }\n else if ( filterComponent instanceof LdapFilterExtensibleComponent )\n {\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent ).setValueToken( token ), token,\n currentFilter );\n }\n else\n {\n handleError( false, token, currentFilter );\n }\n break;\n }\n case LdapFilterToken.EQUAL:\n case LdapFilterToken.GREATER:\n case LdapFilterToken.LESS:\n case LdapFilterToken.APROX:\n case LdapFilterToken.PRESENT:\n case LdapFilterToken.SUBSTRING:\n {\n LdapFilter currentFilter = filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n if ( filterComponent instanceof LdapFilterItemComponent )\n {\n handleError( ( filterComponent instanceof LdapFilterItemComponent )\n && ( ( LdapFilterItemComponent ) filterComponent ).setFiltertypeToken( token ), token,\n currentFilter );\n }\n else if ( filterComponent instanceof LdapFilterExtensibleComponent )\n {\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent ).setEqualsToken( token ),\n token, currentFilter );\n }\n else\n {\n handleError( false, token, currentFilter );\n }\n break;\n }\n case LdapFilterToken.WHITESPACE:\n {\n LdapFilter currentFilter = filterStack.peek();\n currentFilter.addOtherToken( token );\n break;\n }\n case LdapFilterToken.EXTENSIBLE_ATTRIBUTE:\n {\n LdapFilter currentFilter = ( LdapFilter ) filterStack.peek();\n LdapFilterExtensibleComponent filterComponent = new LdapFilterExtensibleComponent(\n currentFilter );\n filterComponent.setAttributeToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n break;\n }\n case LdapFilterToken.EXTENSIBLE_DNATTR_COLON:\n {\n LdapFilter currentFilter = ( LdapFilter ) filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n if ( filterComponent == null )\n {\n filterComponent = new LdapFilterExtensibleComponent( currentFilter );\n ( ( LdapFilterExtensibleComponent ) filterComponent ).setDnAttrColonToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n }\n else\n {\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent ).setDnAttrColonToken( token ),\n token, currentFilter );\n }\n break;\n }\n case LdapFilterToken.EXTENSIBLE_DNATTR:\n {\n LdapFilter currentFilter = ( LdapFilter ) filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent ).setDnAttrToken( token ), token,\n currentFilter );\n break;\n }\n case LdapFilterToken.EXTENSIBLE_MATCHINGRULEOID_COLON:\n {\n LdapFilter currentFilter = ( LdapFilter ) filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n if ( filterComponent == null )\n {\n filterComponent = new LdapFilterExtensibleComponent( currentFilter );\n ( ( LdapFilterExtensibleComponent ) filterComponent ).setMatchingRuleColonToken( token );\n handleError( currentFilter.setFilterComponent( filterComponent ), token, currentFilter );\n }\n else\n {\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent )\n .setMatchingRuleColonToken( token ), token, currentFilter );\n }\n break;\n }\n case LdapFilterToken.EXTENSIBLE_MATCHINGRULEOID:\n {\n LdapFilter currentFilter = ( LdapFilter ) filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent ).setMatchingRuleToken( token ),\n token, currentFilter );\n break;\n }\n case LdapFilterToken.EXTENSIBLE_EQUALS_COLON:\n {\n LdapFilter currentFilter = ( LdapFilter ) filterStack.peek();\n LdapFilterComponent filterComponent = currentFilter.getFilterComponent();\n handleError( ( filterComponent instanceof LdapFilterExtensibleComponent )\n && ( ( LdapFilterExtensibleComponent ) filterComponent ).setEqualsColonToken( token ),\n token, currentFilter );\n break;\n }\n\n case LdapFilterToken.EOF:\n {\n model.addOtherToken( token );\n break;\n }\n default:\n {\n LdapFilter currentFilter = filterStack.peek();\n handleError( false, token, currentFilter );\n }\n }\n }\n while ( !filterStack.isEmpty() && token.getType() != LdapFilterToken.EOF );\n }\n\n // handle error token after filter\n token = scanner.nextToken();\n while ( token.getType() != LdapFilterToken.EOF )\n {\n handleError( false, token, model );\n token = scanner.nextToken();\n }\n }", "private void processDir(){\n // get the location of ISAW code base\n String isaw_home=SharedData.getProperty(\"ISAW_HOME\");\n if(isaw_home==null)\n throw new InstantiationError(\"Could not find directory:ISAW_HOME is null\");\n isaw_home=FilenameUtil.setForwardSlash(isaw_home+\"/\");\n\n // get the name of the directory to check\n String dir=FilenameUtil.setForwardSlash(isaw_home\n +\"DataSetTools/parameter/\");\n\n // check that the directory is okay to work with\n if(DEBUG) System.out.println(\"Looking in \"+dir);\n File paramDir=new File(dir);\n if( !(paramDir.exists()) || !(paramDir.isDirectory()) )\n throw new InstantiationError(\"Could not find directory \" + dir);\n\n // get the list of all possible classes\n File[] files=paramDir.listFiles();\n String filename=null;\n for( int i=0 ; i<files.length ; i++ ){\n filename=checkName(files[i].toString(),isaw_home.length());\n if(filename!=null) addParameter(filename);\n }\n \n \n\n dir=FilenameUtil.setForwardSlash(isaw_home\n +\"gov/anl/ipns/Parameters/\");\n\n // check that the directory is okay to work with\n if(DEBUG) System.out.println(\"Looking in \"+dir);\n paramDir=new File(dir);\n if( !(paramDir.exists()) || !(paramDir.isDirectory()) )\n throw new InstantiationError(\"Could not find directory \" + dir);\n\n // get the list of all possible classes\n files=paramDir.listFiles();\n filename=null;\n for( int i=0 ; i<files.length ; i++ ){\n filename=checkName(files[i].toString(),isaw_home.length());\n if(filename!=null) addParameter(filename);\n }\n\n }", "public int getDir() {\n return this.dir;\n }", "public File getDirectoryValue();", "static Dir getDirectoryTree(String startDir, int mode)\r\n\t{\r\n\t\tscaleMode = mode;\r\n\t\tFile f = new File(startDir);\r\n\t\tminage = now - f.lastModified();\r\n\t\treturn getDirectoryTree(new File[] { f });\r\n\t}", "public void newCompanyDirectory() {\r\n\t\t new CompanyDirectory();\r\n\t}", "private synchronized Directory getDirectoryEmDisco() throws IOException{\r\n\t\tif(diretorioEmDisco == null){\r\n\t\t\tdiretorioEmDisco = FSDirectory.open(pastaDoIndice);\r\n\t\t}\r\n\t\t\r\n\t\treturn diretorioEmDisco;\r\n\t}", "public File getDirectory()\n {\n return directory;\n }", "public EmployeeDirectory(Properties properties) {\n this();\n this.properties = properties;\n }", "private ArrayList<ISO9660Directory> createDirectoryList(BinaryReader reader,\n\t\t\tISO9660Directory parentDir, long blockSize, TaskMonitor monitor) throws IOException {\n\n\t\tArrayList<ISO9660Directory> directoryList = new ArrayList<>();\n\t\tISO9660Directory childDir = null;\n\t\tlong dirIndex;\n\t\tlong endIndex;\n\n\t\t//Get location from parent into child directory\n\t\tdirIndex = parentDir.getLocationOfExtentLE() * blockSize;\n\t\tendIndex = dirIndex + parentDir.getDataLengthLE();\n\n\t\t//while there is still more data in the current directory level\n\t\twhile (dirIndex < endIndex) {\n\t\t\treader.setPointerIndex(dirIndex);\n\n\t\t\t//If the next byte is not zero then create the directory\n\t\t\tif (reader.peekNextByte() != 0) {\n\t\t\t\tif (!lookedAtRoot) {\n\t\t\t\t\tchildDir = new ISO9660Directory(reader);\n\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\n\t\t\t\t}\n\n\t\t\t\t//Root level has already been looked at\n\t\t\t\telse {\n\t\t\t\t\tif (parentDir.getName() != null) {\n\t\t\t\t\t\tchildDir = new ISO9660Directory(reader, parentDir);\n\t\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Otherwise there is a gap in the data so keep looking forward\n\t\t\t//while still under the end index and create directory when data is\n\t\t\t//reached\n\t\t\telse {\n\t\t\t\treadWhileZero(reader, endIndex);\n\n\t\t\t\t//Create the data once the reader finds the next position\n\t\t\t\t//and not reached end index\n\t\t\t\tif (reader.getPointerIndex() < endIndex) {\n\t\t\t\t\tif (!lookedAtRoot) {\n\t\t\t\t\t\tchildDir = new ISO9660Directory(reader);\n\t\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\t\t\t\t\t\tdirIndex = childDir.getVolumeIndex();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (parentDir.getName() != null) {\n\t\t\t\t\t\t\tchildDir = new ISO9660Directory(reader, parentDir);\n\t\t\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\t\t\t\t\t\t\tdirIndex = childDir.getVolumeIndex();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tdirIndex += childDir.getDirectoryRecordLength();\n\t\t}\n\n\t\tlookedAtRoot = true;\n\t\treturn directoryList;\n\t}", "public DirectoryIterator(File rootDirectory, boolean changeInto)\n throws IOException {\n super();\n\n enumStack = new Stack();\n\n if (rootDirectory.isAbsolute() || changeInto) {\n rootLength = rootDirectory.getPath().length() + 1;\n } else {\n rootLength = 0;\n }\n\n Vector filesInRoot = getDirectoryEntries(rootDirectory);\n\n currentEnum = filesInRoot.elements();\n }", "Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }", "void parser() throws TemplateException {\n this.config.resolver.outputdir =\n PropertiesParser.parser(this.config.resolver.outputdir);\n this.config.resolver.sourcepackage = \n PropertiesParser.parser(this.config.resolver.sourcepackage);\n this.config.resolver.templatedir = \n PropertiesParser.parser(this.config.resolver.templatedir);\n }", "@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public parser(Scanner s) {super(s);}", "public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}", "public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}", "public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}", "public NameParser(WildcardManager wildcardManager)\n {\n this.wildcardManager = wildcardManager;\n }", "public BsmLogFileParser() {\r\n super();\r\n setLocationParser(new LocationParser());\r\n setTimeParser(new TimeParser());\r\n setSecResCodeParser(new SecurityResultCodeParser());\r\n setPayloadParser(new PayloadParser());\r\n }", "public TIFFDirectory(SeekableStream stream, int directory)\n throws IOException {\n\n long globalSaveOffset = stream.getFilePointer();\n long ifdOffset;\n\n // Read the TIFF header\n stream.seek(0L);\n int endian = stream.readUnsignedShort();\n if (!isValidEndianTag(endian)) {\n throw new IllegalArgumentException(PropertyUtil.getString(\"TIFFDirectory1\"));\n }\n isBigEndian = (endian == 0x4d4d);\n\n int magic = readUnsignedShort(stream);\n if (magic != 42) {\n throw new IllegalArgumentException(PropertyUtil.getString(\"TIFFDirectory2\"));\n }\n\n // Get the initial ifd offset as an unsigned int (using a long)\n ifdOffset = readUnsignedInt(stream);\n\n for (int i = 0; i < directory; i++) {\n if (ifdOffset == 0L) {\n throw new IllegalArgumentException(PropertyUtil.getString(\"TIFFDirectory3\"));\n }\n\n stream.seek(ifdOffset);\n long entries = readUnsignedShort(stream);\n stream.skip(12 * entries);\n\n ifdOffset = readUnsignedInt(stream);\n }\n if (ifdOffset == 0L) {\n throw new IllegalArgumentException(PropertyUtil.getString(\"TIFFDirectory3\"));\n }\n\n stream.seek(ifdOffset);\n initialize(stream);\n stream.seek(globalSaveOffset);\n }", "private List<String> processDirectory(Path path) {\n\t\treturn null;\r\n\t}" ]
[ "0.7597372", "0.6688518", "0.643189", "0.6190427", "0.61485136", "0.6111864", "0.6103627", "0.607695", "0.59707034", "0.5967603", "0.59294224", "0.5897853", "0.5849771", "0.5845566", "0.58351946", "0.5827485", "0.58009315", "0.5798055", "0.5795267", "0.5749356", "0.5693934", "0.5612241", "0.5592656", "0.55909425", "0.55836415", "0.5554426", "0.55356777", "0.5508973", "0.54701185", "0.5439921", "0.53995293", "0.5378389", "0.5371675", "0.53382176", "0.5321413", "0.5312933", "0.5312777", "0.52856", "0.52600455", "0.52559716", "0.52472395", "0.52408713", "0.5239524", "0.52327603", "0.522228", "0.52122986", "0.5199535", "0.5196643", "0.51835513", "0.51819414", "0.517867", "0.51694065", "0.5159929", "0.5150079", "0.5149899", "0.5145192", "0.5139361", "0.513513", "0.51322776", "0.51188767", "0.51159513", "0.5110308", "0.5094722", "0.5083796", "0.5083579", "0.5074002", "0.50693136", "0.506323", "0.50591415", "0.5055921", "0.5054866", "0.50424165", "0.5042064", "0.5035899", "0.5035521", "0.50354135", "0.5015426", "0.5012725", "0.50126725", "0.50067306", "0.5001897", "0.5000086", "0.49962565", "0.49946856", "0.49942014", "0.49925947", "0.4991847", "0.4990497", "0.49888667", "0.49872077", "0.49721682", "0.49658096", "0.49631724", "0.49622735", "0.49622735", "0.49622735", "0.49443534", "0.49333504", "0.4932621", "0.49308854" ]
0.7184601
1
Vrati odkaz na mapu naparsovanych souboru. Mapa je prazdna, pokud nebyla zavolana metoda parseDirectory.
public TreeMap<String, HTMLFile> getParsedFiles() { return this.parsedFiles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Multimap<String, File> createMapOfFiles(File folder, Multimap<String, File> map) throws Exception {\n if (folder.exists()) {\n File[] allFiles = folder.listFiles();\n assert allFiles != null;\n for (File file : allFiles) {\n if (file.isDirectory()) {\n createMapOfFiles(file, map);\n } else {\n String name = normaliseFileName(file.getName());\n map.put(name, file);\n }\n }\n return map;\n } else\n throw new Exception(\"Tried to sort an directory that no longer exist\");\n }", "private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }", "private void loadDirectoryUp() {\n\t\tString s = pathDirsList.remove(pathDirsList.size() - 1);\n\t\t// path modified to exclude present directory\n\t\tpath = new File(path.toString().substring(0,\n\t\t\t\tpath.toString().lastIndexOf(s)));\n\t\tfileList.clear();\n\t}", "@Override\n public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {\n if(!matcher.matches(path.getFileName()) ||\n Math.abs(path.getFileName().hashCode() % DirectoryScanner.NUM_THREADS) != num) {\n return FileVisitResult.CONTINUE;\n }\n\n logStream.println(\"Visiting file: \" + root.relativize(path));\n\n Path dest = outRoot.resolve(root.relativize(path));\n\n //moving is faster than copying and deleting\n if(autoDelete) {\n Files.move(path, dest, StandardCopyOption.REPLACE_EXISTING);\n } else {\n Files.copy(path, dest, StandardCopyOption.REPLACE_EXISTING);\n }\n\n\n return FileVisitResult.CONTINUE;\n }", "public Map<String, Object> fileFinder(String file_id) {\n\t\tMap<String, Object> tempMap = new HashMap<String,Object>();\n\t\tMap<String, Object> findMap = new HashMap<String,Object>();\n\t\tArrayList<File> rootList= new ArrayList<File>(Arrays.asList(rootFile.listFiles()));\n\t\tString curName;\n\t\tfor(File file:rootList) {\n\t\t\tcurName = file.getName();\n\t\t\tString reg1 = \"(^[FP]_\"+file_id+\"_TB.xml$)\";\n\t\t\tPattern p = Pattern.compile(reg1);\n\t\t\tMatcher m = p.matcher(curName);\n\t\t\tif(m.find()) {\n\t\t\t\tif((file.getName()).charAt(0)=='F')\n\t\t\t\t\ttempMap.put(\"F\", new File(file.getPath()));\n\t\t\t\telse\n\t\t\t\t\ttempMap.put(\"P\", new File(file.getPath()));\n\t\t\t}\n\t\t\ttempMap.put(curName, tempMap);\n\t\t}\n\t\treturn tempMap;\n\t}", "private DirectoryParser() {\n this.parsedFiles = new TreeMap<>();\n }", "public void parseDirectory(File directory) throws IOException {\n this.parsedFiles.clear();\n File[] contents = directory.listFiles();\n for (File file : contents) {\n if (file.isFile() && file.canRead() && file.canWrite()) {\n String fileName = file.getPath();\n if (fileName.endsWith(\".html\")) {\n Document parsed;\n parsed = Jsoup.parse(file, \"UTF-8\");\n if (this.isWhiteBearArticle(parsed)) {\n HTMLFile newParsedFile = new HTMLFile(parsed, false);\n String name = file.getName();\n this.parsedFiles.put(name, newParsedFile);\n } else if (this.isMenuPage(parsed)) {\n //HTMLFile newParsedFile = new HTMLFile(parsed, false);\n //String name = file.getName();\n //this.parsedFiles.put(name, newParsedFile);\n }\n }\n }\n }\n }", "public String getMappingFilePath();", "public static void main(String[] args) {\n String startDir = \"E:/DEKSTOP/Projets/photosortTest\";\n\n //We list what is in this folder :\n\n System.out.println(\"\\n\\n\\nListing of files recursively : \\n\");\n\n printListFilesRecursive(startDir);\n\n //Then we create 2 directories\n createDirectory(startDir, \"css_files\");\n createDirectory(startDir, \"js_files\");\n\n //Then we select all the js file and move it to /js_file, same for css files\n List<String> list_js = new ArrayList<>();\n List<String> list_css = new ArrayList<>();\n\n listFilesRecursiveByExtension(startDir,\"js\",list_js);\n listFilesRecursiveByExtension(startDir,\"css\",list_css);\n\n for (String item_js : list_js){\n copyFile(item_js,startDir+\"/js_files\",new File(item_js).getName());\n }\n\n\n for (String item_css : list_css){\n copyFile(item_css,startDir+\"/css_files\",new File(item_css).getName());\n }\n System.out.println(\"Listing of file dummy : \\n\");\n //array in which we will store the names of files and directories\n\n printDummyListFiles(startDir);\n\n\n\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n }", "private void validateMapFileOutputContent(\n FileSystem fs, Path dir) throws Exception {\n // map output is a directory with index and data files\n assertPathExists(\"Map output\", dir);\n Path expectedMapDir = getPart0000(dir);\n assertPathExists(\"Map output\", expectedMapDir);\n assertIsDirectory(expectedMapDir);\n FileStatus[] files = fs.listStatus(expectedMapDir);\n Assertions.assertThat(files)\n .as(\"No files found in \" + expectedMapDir)\n .isNotEmpty();\n assertPathExists(\"index file in \" + expectedMapDir,\n new Path(expectedMapDir, MapFile.INDEX_FILE_NAME));\n assertPathExists(\"data file in \" + expectedMapDir,\n new Path(expectedMapDir, MapFile.DATA_FILE_NAME));\n }", "static Multimap<String, File> createMapOfFiles(File folder) throws Exception {\n Multimap<String, File> map = ArrayListMultimap.create();\n return createMapOfFiles(folder, map);\n }", "private void parseUrlsPaths(String localPath) {\n String[] pathArray = localPath.split(\"/\");\n // Geometry_305_v6_fb_coupe_frontlightbulb1_a001.b3d.dflr\n this.fileName = pathArray[pathArray.length - 1];\n // /cars/mustang2015/geometry/\n this.subDirectory = localPath.replace(\"/\" + this.fileName, \"\");\n }", "public void loadMap(Maps map) throws FileNotFoundException{\n ArrayList<Station> stat; \n stat = new ArrayList<>();\n \n try {\n String hodnoty; //do premennej hodnoty budem nacitavat riadky z textaka\n int stanica_na_zapis = 1; //counter pre stanice\n \n //---------------------------------------- zaciatok nacitavania\n hodnoty = br.readLine(); //nacitam riadok z textaka\n int x,y; //x, y budu sluzit pre nacitane suradnice\n String nazov; \n String[] split; //split je pole stringov...tu rozdelim riadok na jednotlive hodnoty\n split = hodnoty.split(\"\\\\s+\"); //delim podla medzery\n nazov = split[0]; //nazov stanice bude prvy string\n x = Integer.parseInt(split[1]); //nasleduje konverzia suradnic\n y = Integer.parseInt(split[2]);\n \n Station st = new Station(nazov,stanica_na_zapis,x,y); //vytvorim novu stanicu\n \n stat.add(st); //a pridam do zoznamu stanic\n \n while(!\"\".equals(hodnoty = br.readLine())){ //toto robim, az kym nie som na prazdnom riadku\n stanica_na_zapis++;\n split = hodnoty.split(\"\\\\s+\");\n nazov = split[0];\n x = Integer.parseInt(split[1]);\n y = Integer.parseInt(split[2]);\n st = new Station(nazov,stanica_na_zapis,x,y); \n stat.add(st);\n }\n } catch (IOException ex) {\n Logger.getLogger(Maps.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n stations_loaded = stat.size(); \n map.setStations(stat); //nakoniec ukladam nahrany zoznam stanic\n }", "public void process(File path) throws IOException {\n\t\tIterator<File> files = Arrays.asList(path.listFiles()).iterator();\n\t\twhile (files.hasNext()) {\n\t\t\tFile f = files.next();\n\t\t\tif (f.isDirectory()) {\n\t\t\t\tprocess(f);\n\t\t\t} else {\n\t\t\t\tif (startFile != null && startFile.equals(f.getName())) {\n\t\t\t\t\tstartFile = null;\n\t\t\t\t}\n\n\t\t\t\tif (startFile == null) {\n\t\t\t\t\tprocessFile(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void loadFilesInFolder(File rootFile) {\r\n\t\tDefaultListModel<File> model = new DefaultListModel<>();\r\n\t\tfor (File nextFile : rootFile.listFiles()) {\r\n\t\t\tmodel.addElement(nextFile);\r\n\t\t}\r\n\t\tlist.setModel(model);\r\n\t}", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "Map<File, File> getOutputFileMap();", "public void parseFile(File dir) {\r\n\t\tFile[] files = dir.listFiles();\r\n\t\tfor(int i = 0; i < files.length; i++) {\r\n\t\t\tif(files[i].isDirectory()) {\r\n\t\t\t\tparseFile(files[i]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!files[i].exists()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString fileName = files[i].getName();\r\n\t\t\t\tif(fileName.toLowerCase().endsWith(\".json\")) {\r\n\t\t\t\t\twq.execute(new Worker(library, files[i]));\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public boolean isDir() { return true; }", "public Mapa(String ficheroMapa, String ficheroCamino) throws IOException\n{\n leerMapa(ficheroMapa);\n\n if(ficheroCamino != null)\n leerCamino(ficheroCamino);\n}", "public void isfolder(File findfile){\n\t\tif(findfile.isDirectory()){\n\t\t\tSystem.out.println(findfile + \"is a directory\");\n\t\t\tString[] directoryContents = findfile.list();\n\t\t\tfor(int i = 0; i < directoryContents.length; i++){\n\t\t\t\tFile newpath = new File(findfile + \"/\" + directoryContents[i]);\n\t\t\t\tisfolder(newpath);\n\t\t\t\t\t\t\n\t\t\t}\n\t\t}else{\n\t\t\tHashmappDemo.addtoHashMap(findfile);\n\t\t}\n\t\t\n\t}", "static void walkTheDir(){ \n\t try (Stream<Path> paths = Files.walk(Paths.get(\"/ownfiles/tullverketCert/source\"))) {\n\t \t paths\n\t \t .filter(Files::isRegularFile)\n\t \t //.forEach(System.out::println);\n\t \t .forEach( e ->{\n\t \t \t\tSystem.out.println(e);\n\t \t \t\tSystem.out.println(e.getParent());\n\t \t \t\t\n\t \t \t});\n\t \t \n \t}catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }", "private static void getFiles(String root, Vector files) {\n Location f = new Location(root);\n String[] subs = f.list();\n if (subs == null) subs = new String[0];\n Arrays.sort(subs);\n \n // make sure that if a config file exists, it is first on the list\n for (int i=0; i<subs.length; i++) {\n if (subs[i].endsWith(\".bioformats\") && i != 0) {\n String tmp = subs[0];\n subs[0] = subs[i];\n subs[i] = tmp;\n break;\n }\n }\n \n if (subs == null) {\n LogTools.println(\"Invalid directory: \" + root);\n return;\n }\n \n ImageReader ir = new ImageReader();\n Vector similarFiles = new Vector();\n \n for (int i=0; i<subs.length; i++) {\n LogTools.println(\"Checking file \" + subs[i]);\n subs[i] = new Location(root, subs[i]).getAbsolutePath();\n if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) {\n LogTools.println(subs[i] + \" is a bad file\");\n String[] matching = new FilePattern(subs[i]).getFiles();\n for (int j=0; j<matching.length; j++) {\n similarFiles.add(new Location(root, matching[j]).getAbsolutePath());\n }\n continue;\n }\n Location file = new Location(subs[i]);\n \n if (file.isDirectory()) getFiles(subs[i], files);\n else if (file.getName().equals(\".bioformats\")) {\n // special config file for the test suite\n configFiles.add(file.getAbsolutePath());\n }\n else {\n if (ir.isThisType(subs[i])) {\n LogTools.println(\"Adding \" + subs[i]);\n files.add(file.getAbsolutePath());\n }\n else LogTools.println(subs[i] + \" has invalid type\");\n }\n file = null;\n }\n }", "private static void iteratorFilePath(File file){\n while(file.isDirectory()){\n for(File f : file.listFiles()){\n System.out.println(f.getPath());\n iteratorFilePath(f);\n }\n break;\n }\n }", "@Override\n public boolean accept(File pathname) {\n\n if(pathname.isDirectory()) {\n \n String subDir = this.getRelativePath(pathname.getPath());\n \n if(subDir != null) {\n\n PageList subList = new PageList(this);\n \n // populates this list\n subList.setDir(subDir);\n\n this.addAll(subList);\n }\n }else{\n \n boolean accept = this.acceptFilename(pathname.getName());\n \n if(accept) {\n this.addFile(pathname);\n }\n }\n \n return false;\n }", "public void setWorkingFiles (final Map<String, NewData> mp){\n \t\tList<String> nf = new LinkedList<String>();\n \t\tString s =\"\";\n \t\t\n \t\tfor ( String str : mp.keySet()){\n //\t\t\tthis.getFilelist().remove(str);\n //\t\t\tthis.getFilelist().put(str, mp.get(str).getLclock());\n \t\t\tthis.getFilelist().get(str).putAll(mp.get(str).getLclock());\n \n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(mp.get(str).getFileContent()));\n \t\t\t\ttry {\n \t\t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\t\tnf.add(s);\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\te.printStackTrace();\n \t\t\t\t}\n \t\t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, nf);\n \t\t\tnf.clear();\n \t\t}\n \t\n \t}", "private List<String> processDirectory(Path path) {\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadMap(){\r\n\t\t//Datei anlegen, falls nicht vorhanden\r\n\t\ttry {\r\n\t\t\tFile file = new File(homeFileLocation);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t\tSystem.out.println(\"Created new File.\");\r\n\r\n\t\t\t\t//Leere Map schreiben\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\t\toos.writeObject(new HashMap<String, String>());\r\n\t\t\t\toos.flush();\r\n\t\t\t\toos.close();\r\n\r\n\t\t\t\tSystem.out.println(\"Wrote empty HashMap.\");\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Map laden\r\n\t\ttry {\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(homeFileLocation));\r\n\t\t\tthis.map = (HashMap<String, String>) ois.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (ClassNotFoundException 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 void loadFolderPressed() {\n\n\t\t// open a jfile chooser and then go through the directory chosen\n\t\t// then load all the video and audio files in that directory\n\n\t\tFile chosenDirectory =null;\n\n\t\t// choose a directory only\n\t\tJFileChooser chooser = new JFileChooser();\n\t\tchooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\tchooser.setDialogTitle(\"Choose Directory\");\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tint response = chooser.showOpenDialog(Library.this);\n\t\tif (response == JFileChooser.APPROVE_OPTION) {\n\t\t\t// Chose the directory to save to\n\t\t\tchosenDirectory = chooser.getSelectedFile().getAbsoluteFile();\n\t\t}\n\t\tif(chosenDirectory != null){\n\t\t\t// go through the chosen directory and get all the files\n\t\t\tl.clear();\n\t\t\tFile[] directoryListing = chosenDirectory.listFiles();\n\t\t\tif (directoryListing != null) {\n\n\t\t\t\t// check if that file chosen currently is a media file. If it is then\n\t\t\t\t// add it to the list\n\t\t\t\tInvalidCheck ic = new InvalidCheck();\n\n\t\t\t\tfor(File f : directoryListing){\n\t\t\t\t\tboolean isValid = ic.invalidCheck(f.getAbsolutePath());\n\n\t\t\t\t\tif(isValid){\n\t\t\t\t\t\tlistFolder.add(f);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(File f2 : listFolder){\n\t\t\t\t\tSystem.out.println(f2.getName());\n\t\t\t\t}\n\n\t\t\t\t// get the paths and sizes of the media files.\n\t\t\t\tfor(File f : listFolder){\n\t\t\t\t\t// only put the file in if it is not size 0 so that any bad files are avoided.\n\t\t\t\t\tif(f.length() != 0){\n\t\t\t\t\t\tl.addElement(f.getName());\n\t\t\t\t\t\tpaths.put(f.getName(),f.getAbsoluteFile());\n\t\t\t\t\t\tsizes.put(f.getName(), f.length());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isDir() { return false; }", "public void loadFiles(String location) {\r\n files = new ArrayList<>();\r\n try {\r\n // определяем объект для каталога\r\n File dir = new File(location);\r\n String[] listOfFiles = dir.list();\r\n if(dir.isDirectory()) {\r\n \tSystem.out.println(\"Dir: \" + dir.getAbsolutePath());\r\n \ttestWriter.write(\"Dir: \" + dir.getAbsolutePath());\r\n }\r\n for(File i : dir.listFiles()) {\r\n System.out.println(\"SubDir: \" + i.getAbsolutePath());\r\n for(File j : i.listFiles()) {\r\n files.add(new File(j.getAbsolutePath()));\r\n System.out.println(\"File: \" + j.getAbsolutePath() + \" is loaded\");\r\n testWriter.write(\"File: \" + j.getAbsolutePath() + \" is loaded\");\r\n }\r\n }\r\n }\r\n catch(NullPointerException e) {\r\n System.err.println(\"Error while loading file\");\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n \tSystem.err.println(\"Error while writing to log file\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public Stream<Path> loadAll() {\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"File Retrived\");\n\t\t\treturn Files.walk(this.path, 1).filter(path->!path.equals(this.path)).map(this.path::relativize);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File Retrived Error\");\n\t\t}\n\t\treturn null;\n\t}", "private static Map<String , Integer> getMap(File dir , String search){\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tString token;\n\t\tStringTokenizer st = new StringTokenizer(search, \" \");\n\n\t\tint total;\n\t\tfor(File f : dir.listFiles()) {\n\t\t\ttotal =0 ;\t\t\n\t\t\twhile(st.hasMoreTokens()) {\n\t\t\t\ttoken = st.nextToken();\n\t\t\t\tSystem.out.println(token);\n\t\t\t\tif(god.get(f.getName()).containsKey(token)) {\n\t\t\t\t\tSystem.out.println(god.get(f.getName()).get(token));\n\t\t\t\t\ttotal += god.get(f.getName()).get(token);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(total);\n\t\t\t}\n\t\t\tmap.put(f.getName(), total );\n\t\t}\n\t\treturn map;\n\t}", "AntiIterator<FsPath> listFilesAndDirectories(FsPath dir);", "@Override\n\tpublic void run() {\n\t\tif (!mainDir.isDirectory()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// inserisco il nome della cartella principale.\n\t\tproduceDirPath(mainDir.getName());\n\t\t\n\t\t// navigo ricorsivamente.\n\t\twalkDir(mainDir);\n\t}", "private void loadMap(String path) {\n\t\ttry {\n\t\t\tfor(Player p : players)\tp.clear();\n\t\t\tmap.players = players;\n\t\t\tmap.setPlayerNumber(playerNumber);\n\t\t\tfor(Player p : map.players) {\n\t\t\t\tp.setMap(map);\n\t\t\t\tp.setArmies(map.getInitialArmiesNumber());\n\t\t\t}\n\t\t\tmap.setPlayerNumber(map.players.size());\n\t\t\tmap.load(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void storeDirectory(ISO9660Directory directory, TaskMonitor monitor) {\n\n\t\tString dirName = directory.getName();\n\t\tboolean isDirectory = directory.isDirectoryFlagSet();\n\t\tint length = directory.getDataLengthLE();\n\t\tGFileImpl gFile = null;\n\n\t\t//Map does not contain entries yet since root level needs to be processed\n\t\tif (!lookedAtRoot) {\n\t\t\tgFile = GFileImpl.fromFilename(this, root, dirName, isDirectory, length, null);\n\t\t\tstoreFile(gFile, directory);\n\t\t}\n\t\telse {\n\t\t\t//Root has been processed, all other entries must have a parent\n\t\t\tString parentDirName = directory.getParentDirectory().getName();\n\t\t\tfor (GFile currGFile : fileToDirectoryMap.keySet()) {\n\t\t\t\t//Find the parent and store the file\n\t\t\t\tif (parentDirName.equals(currGFile.getName())) {\n\t\t\t\t\tgFile =\n\t\t\t\t\t\tGFileImpl.fromFilename(this, currGFile, dirName, isDirectory, length, null);\n\t\t\t\t\tstoreFile(gFile, directory);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isDir() { return _entry==null; }", "private void searchLocalFiles(TwitchVideoInfo videoInfo) {\n if (videoInfo.getState().equals(INITIAL)) {\n File playlist = new File(playlistFolderPath + videoInfo.getId() + \".m3u\");\n if (playlist.exists() && playlist.isFile() && playlist.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(playlist);\n videoInfo.putRelatedFile(\"playlist\", playlist);\n\n try {\n InputStream is = new FileInputStream(playlist);\n Scanner sc = new Scanner(is);\n int i = 0;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n File file = new File(line);\n if (file.exists()) {\n i++;\n String key = String.format(\"playlist_item_%04d\", i);\n videoInfo.putRelatedFile(key, file);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n videoInfo.setState(DOWNLOADED);\n }\n\n ffmpegFileListFile = new File(playlistFolderPath + videoInfo.getId() + \".ffmpeglist\");\n if (ffmpegFileListFile.exists()) {\n videoInfo.putRelatedFile(\"ffmpegFileListFile\", ffmpegFileListFile);\n }\n\n File mp4Video = getVideoFile(videoInfo, true);\n\n if (mp4Video.exists() && mp4Video.isFile() && mp4Video.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(mp4Video);\n videoInfo.putRelatedFile(\"mp4Video\", mp4Video);\n videoInfo.setState(CONVERTED);\n }\n }\n }", "protected abstract HashMap<String, InputStream> getFilesByPath(\n\t\t\tfinal String path);", "public static void checkDirectory(File appmobicache) {\n \tFile[] files = appmobicache.listFiles();\n \tif(files.length==1 && files[0].isDirectory() && new File(files[0].getAbsolutePath(), \"index.html\").exists()) {\n \t\tFile nestedDirectory = files[0];\n \t\t//move the nested directory to temp\n \t\tFile parent = nestedDirectory.getParentFile();\n \t\tFile temp = new File(parent, \"../temp\");\n \t\tnestedDirectory.renameTo(temp);\n \t\tfiles = temp.listFiles();\n \t\tfor(int i=0;i<files.length;i++) {\n \t\t\tFile source = files[i];\n \t\t\tString name = source.getName();\n \t\t\tFile dest = new File(appmobicache, name);\n \t\t\tsource.renameTo(dest);\n \t\t}\n \t\ttemp.delete();\n \t}\n\t}", "private Map<String, String> getDirectory() {\n return new HashMap<>() {{\n put(\"Moran Lin\", \"1111111111\"); // 546*6*\n put(\"Ming Kho\", \"2222222222\"); // 546*6*\n put(\"Sam Haboush\", \"3333333333\"); // 4226874*7*\n put(\"Heidi Haboush\", \"4444444444\"); // 4226874*4*\n put(\"Hakeem Haboush\", \"5555555555\"); // 4226874*4*\n put(\"Amanda Holden\", \"6666666666\"); // 465336*2*\n put(\"Megan Fox\", \"7777777777\"); // 369*6*\n put(\"Kate Moss\", \"8888888888\"); // 6677*5*\n put(\"Sarah Louche\", \"9999999999\"); // 568243*7*\n put(\"Cameron Diaz\", \"0000000000\"); // 3429*2*\n// put(\"Heidi Klum\", \"1212121212\"); // 5586*4* doesn't exist in dictionary\n }};\n }", "@Override\n\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tPath resolve = target.resolve(source.relativize(dir));\n\t\t\t\tFile resolve_file = resolve.toFile();\n\n\t\t\t\tif (resolve_file.exists() == false) {\n\t\t\t\t\tFiles.createDirectory(resolve);\n\t\t\t\t} else {\n\t\t\t\t\t// delete old data in sub-directories\n\t\t\t\t\t// without deleting the directory\n\t\t\t\t\tArrays.asList(resolve_file.listFiles()).forEach(File::delete);\n\t\t\t\t}\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\r\n private void newMap() throws IOException, ClassNotFoundException {\r\n this.music_map.clear();\r\n if (needNewMap()) {\r\n if (!save_file.exists()) {\r\n System.out.println(\"DIZIONARIO NON PRESENTE\");\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n\r\n this.setTarget();\r\n\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n } else {\r\n System.out.println(\"DIZIONARIO NON AGGIORNATO\");\r\n if (!UtilFunctions.newDictionaryRequest(this.save_file, this.music_root)) {\r\n System.out.println(\"AGGIORNAMENTO DIZIONARIO RIFIUTATO\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n } else {\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n this.setTarget();\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n }\r\n }\r\n } else {\r\n System.out.println(\"DIZIONARIO GIA' PRESENTE\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n }\r\n }", "private void seekBy() {\n Queue<File> queue = new LinkedList<>();\n queue.offer(new File(root));\n while (!queue.isEmpty()) {\n File file = queue.poll();\n File[] list = file.listFiles();\n if (file.isDirectory() && list != null) {\n for (File tempFile : list) {\n queue.offer(tempFile);\n }\n } else {\n if (args.isFullMatch() && searchingFile.equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isMask() && searchingFile.replaceAll(\"\\\\*\", \".*\").equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isRegex() && file.getName().matches(args.getName())) {\n result.add(file);\n }\n }\n }\n this.writeLog(output, result);\n }", "private void cacheFoldersFiles() throws Exception {\n\n ArrayList<FileManagerFile> files = new ArrayList<FileManagerFile>();\n if (fileCount > 0) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n int offset = 0;\n int count = 1000;\n List<FileManagerFile> filelist;\n\n do {\n filelist = connection.getFileManager().getFileManagerFiles(count, offset);\n offset += count;\n for (FileManagerFile file : filelist) {\n if (file.getFolderId() == id) {\n files.add(file);\n }\n }\n } while (filelist.size() > 0 && files.size() < fileCount);\n }\n this.files = files;\n }", "private void getAllFiles(File dir, List<File> fileList) throws IOException {\r\n File[] files = dir.listFiles();\r\n if(files != null){\r\n for (File file : files) {\r\n // Do not add the directories that we need to skip\r\n if(!isDirectoryToSkip(file.getName())){\r\n fileList.add(file);\r\n if (file.isDirectory()) {\r\n getAllFiles(file, fileList);\r\n }\r\n }\r\n }\r\n }\r\n }", "public Directory parseDirectory() {\n\n\t// Create a buffer for the result.\n\tDirectory result = new DirectoryImpl( this);\n\n\t// The track and sector pos of the currency directory sector.\n\tint trackIndex = 18;\n\tint sectorIndex = 1;\n\n\t// The directory starts at track 18, sector 1 and normally continues to sector 18.\n\twhile( ( trackIndex != 0) && (sectorIndex != 0)) {\n\n\t // Get the data of the current sector.\n\t byte [] sectorData = getSector( trackIndex, sectorIndex).getDataBytes();\n\n\t // Parse the directory entries in this sector.\n\t for( int currentEntry = 0; currentEntry < 8; ++currentEntry) {\n\n\t\t// Calculate the byte, where the directory entry starts.\n\t\tint entryOffset = 32 * currentEntry;\n\n\t\t// Check, if this entry is a deleted file.\n\t\tif( sectorData[ entryOffset + 2] == 0) { \n\n\t\t continue; // This entry is deleted.\n\t\t}\n\n\t\t// Get the name of the filename.\n\t\tStringBuffer filenameBuffer = new StringBuffer();\n\n\t\tfor( int filenameIndex = 5; filenameIndex <= 14; ++filenameIndex) {\n\n\t\t // Get the current byte of the filename.\n\t\t byte currentFilenameChar = sectorData[ entryOffset + filenameIndex];\n\n\t\t if( currentFilenameChar == 0xa0) { // This is a padding byte. Filename is complete.\n\t\t\t\n\t\t\tbreak;\n\n\t\t } else { // Convert this petscii char and add it to the filename.\n\t\t\t\n\t\t\tfilenameBuffer.append( CharsetUtils.getInstance().petscii2ascii( currentFilenameChar));\n\t\t }\n\t\t}\n\n\t\t// Get the type of the file.\n\t\tbyte currentFileType = (byte)( sectorData[ entryOffset + 2] & (byte)7);\n\t\tString currentFileTypeName = \"\";\n\n\t\tswitch( currentFileType) {\n\t\tcase 1: currentFileTypeName = \"SEQ\"; break;\n\t\tcase 2: currentFileTypeName = \"PRG\"; break;\n case 3: currentFileTypeName = \"USR\"; break;\n\t\tcase 4: currentFileTypeName = \"REL\"; break;\n\t\t}\n\n\t\t// Try to approximate the filesize. The c64 only stores blocks of 254 bytes and not \n\t\t// the actual filesize in bytes.\n\t\tint filesize = sectorData[ entryOffset + 0x1e] + ( 256 * sectorData[ entryOffset + 0x1f]);\n\t\t\n\t\t// Create a directory entry and add it to the result.\n\t\tresult.addDirectoryEntry( new D64DirectoryEntry( filenameBuffer.toString()\n\t\t\t\t\t\t\t\t , filesize\n\t\t\t\t\t\t\t\t , currentFileTypeName\n\t\t\t\t\t\t\t\t , sectorData[ entryOffset + 3] // Track index of the first sector.\n\t\t\t\t\t\t\t\t , sectorData[ entryOffset + 4] // Sector index of the first sector.\n\t\t\t\t\t\t\t\t , result));\n\t }\n\n\t // Get the track and sector of the next directory sector from the current sector;\n\t trackIndex = sectorData[ 0];\n\t sectorIndex = sectorData[ 1];\n\t}\n\n\t// Return the parsed directory.\n\treturn result;\n }", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }", "TiledMap loadMap(String path);", "public static void deleteFileOrDirectory(KVFile file) {\n if (file.isDirectory()) {\n String[] children = file.list();\n for (String aChildren : children) {\n if (new KVFile(file, aChildren).isDirectory() && !aChildren.equals(\"PreinstalledMaps\") && !aChildren.equals(\"Maps\")) {\n deleteFileOrDirectory(new KVFile(file, aChildren));\n } else {\n new KVFile(file, aChildren).delete();\n }\n }\n }\n }", "public ImageFileNameMap(FileNameMap map)\r\n {\r\n prevMap = map;\r\n }", "public static void searchForImageReferences(File rootDir, FilenameFilter fileFilter) {\n \t\tfor (File file : rootDir.listFiles()) {\n \t\t\tif (file.isDirectory()) {\n \t\t\t\tsearchForImageReferences(file, fileFilter);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (fileFilter.accept(rootDir, file.getName())) {\n \t\t\t\t\tif (MapTool.getFrame() != null) {\n \t\t\t\t\t\tMapTool.getFrame().setStatusMessage(\"Caching image reference: \" + file.getName());\n \t\t\t\t\t}\n \t\t\t\t\trememberLocalImageReference(file);\n \t\t\t\t}\n \t\t\t} catch (IOException ioe) {\n \t\t\t\tioe.printStackTrace();\n \t\t\t}\n \t\t}\n \t\t// Done\n \t\tif (MapTool.getFrame() != null) {\n \t\t\tMapTool.getFrame().setStatusMessage(\"\");\n \t\t}\n \t}", "public static void pokreniTagNadSvima(File[] files){\n\t for (File file : files) {\n\t \tif (file.isDirectory()) {\n\t //System.out.println(\"Directory: \" + file.getName());\n\t \t\tpokreniTagNadSvima(file.listFiles()); // Calls same method again.\n\t } else \n\t if(!file.getPath().contains(\".DS_Store\")){\n\t \t//System.out.println(file.getPath());\n\t \t //System.out.println(file.getAbsolutePath());\n\t \t//tekstovi.put((String)file.getPath(), vratiStringFajla((String)file.getPath()));\n\t \tnapraviTextFajloveKonacne(file.getAbsolutePath());\n\t \t//System.out.println((String)file.getPath()+vratiStringFajla((String)file.getPath()));\n\t }\n\t }\n\t \n\t \n\t\t//napraviTextFajloveKonacne(putanjaDoFajla)\n\t}", "public void process(Path path, int offset, List<String> groups) {\n String text = \"^\" + path.getName(offset).toString().replace('%', '*') + \"$\";\n Pattern pattern = Pattern.compile(text);\n File folder = ((offset == 0) ? absolutePath : absolutePath.resolve(path.subpath(0, offset))).toFile();\n if (folder.isDirectory()) {\n for (File file : folder.listFiles(new PatternFilter(pattern))) {\n List<String> values = new ArrayList<String>(groups);\n Matcher matcher = pattern.matcher(file.getName());\n if (matcher.find()) {\n for (int index = 0; index < matcher.groupCount(); index++) {\n values.add(matcher.group(index + 1));\n }\n }\n Path newPath =\n (offset == 0) ? Paths.get(file.getName()) : path.subpath(0, offset).resolve(Paths.get(file.getName()));\n if (offset + 1 < path.getNameCount())\n newPath = newPath.resolve(path.subpath(offset + 1, path.getNameCount()));\n\n if (offset + 1 >= path.getNameCount())\n matches.add(new PathMapper(absolutePath, newPath, values));\n else {\n process(newPath, offset + 1, values);\n }\n }\n }\n }", "private static void getFile(String path){\n File file = new File(path); \r\n // get the folder list \r\n File[] array = file.listFiles();\r\n // flag = array.length;\r\n \r\n for(int i=0;i<array.length;i++){ \r\n if(array[i].isFile()){ \r\n // only take file name \r\n //System.out.println(\"^^^^^\" + array[i].getName()); \r\n // take file path and name \r\n //System.out.println(\"#####\" + array[i]); \r\n // take file path and name \r\n System.out.println(\"*****\" + array[i].getPath()); \r\n\t\t\tcalculate_Ave(array[i].getPath());\r\n } \r\n }\r\n}", "public static List<HashMap<String, String>> _pma_filesToUpload(String localSourceSlide, String targetFolder, String sessionID) {\n\t\tif (localSourceSlide == null) {\n\t\t\tthrow new RuntimeException(\"Slide name is empty\");\n\t\t}\n\t\tfor (String slide : Core.getSlides(targetFolder, sessionID)) {\n\t\t\tif (slide.equals(targetFolder + Core.getSlideFileName(localSourceSlide))) {\n\t\t\t\ttry {\n\t\t\t\t\tthrow new Exception(\"The file: ===\" + Core.getSlideFileName(localSourceSlide) +\"=== with the same name and extension already exists in the target folder: \" + targetFolder);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tMap<String, Map<String, String>> files = Core.getFilesForSlide(localSourceSlide, pmaCoreLiteSessionID);\n\n\t\tString mainDirectory = \"\";\n\t\tfor (Map.Entry<String, Map<String, String>> entry : files.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tMap<String, String> value = entry.getValue();\n\t\t\tFile file = new File(key);\n\t\t\tString md = file.getParent();\n\n\t\t\tif (mainDirectory.length() == 0 || md.length() < mainDirectory.length()) {\n\t\t\t\tmainDirectory = md;\n\t\t\t}\n\t\t}\n\n\t\tmainDirectory = mainDirectory.replace(\"\\\\\", \"/\");\n\t\tList<HashMap<String, String>> uploadFiles = new ArrayList<HashMap<String, String>>();\n\t\tMap<String,Long> hm = new HashMap<>();\n\t\tLinkedHashMap<String, Long> reverseSortedMap = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, Map<String, String>> entry : files.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tMap<String, String> value = entry.getValue();\n\t\t\tlong s = (new File(key)).length();\n\t\t\tif (s <= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\thm.put(key, s);\n\t\t}\n\n\t\thm.entrySet()\n\t\t\t\t.stream()\n\t\t\t\t.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))\n\t\t\t\t.forEachOrdered(x -> reverseSortedMap.put(x.getKey(), x.getValue()));\n\t\tfor (Map.Entry<String, Long> revers : reverseSortedMap.entrySet()) {\n\t\t\tString key = revers.getKey();\n\t\t\tlong s = (new File(key)).length();\n\t\t\tif (s <= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString path = key.replace(mainDirectory, \"\").replaceAll(\"^\\\\+|\\\\+$/g\", \"\")\n\t\t\t\t\t.replaceAll(\"^/+|/+$/g\", \"\");\n\t\t\tHashMap<String, String> fileObj = new HashMap<String, String>();\n\t\t\tfileObj = new HashMap<String, String>();\n\t\t\tfileObj.put(\"Path\", path);\n\t\t\tfileObj.put(\"Length\", Long.toString(s));\n\t\t\tfileObj.put(\"IsMain\", Boolean.toString(path.equals(Core.getSlideFileName(localSourceSlide))));\n\t\t\tfileObj.put(\"FullPath\", key);\n\t\t\tuploadFiles.add(fileObj);\n\t\t}\n\t\treturn uploadFiles;\n\t}", "public void loadMapsModule(){\n Element rootElement = FileOperator.fileReader(MAPS_FILE_PATH);\n if(rootElement!=null){\n Iterator i = rootElement.elementIterator();\n while (i.hasNext()) {\n Element element = (Element) i.next();\n GridMap map =new GridMap();\n map.decode(element);\n mapsList.add(map);\n }\n }\n }", "public void loadMapTiles(String[] paths) throws FileNotFoundException {\n\t\tthis.paths=paths;\n\t\tfor (int i = 0; i < tileMap.length; i++) {\n\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\n\t\t\t\tif (tileMap[i][j] < 0) {\n\t\t\t\t\ttiles[i][j] = null;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tTile tile = new Tile();\n\t\t\t\ttile.getPosition().setX(j*tileDimensions.getX());\n\t\t\t\ttile.getPosition().setY(i*tileDimensions.getY());\n\t\t\t\ttile.getDimensions().setX(tileDimensions.getX());\n\t\t\t\ttile.getDimensions().setY(tileDimensions.getY());\n\t\t\t\tFileInputStream fin = new FileInputStream(paths[tileMap[i][j]]);\n\t\t\t\tImage img = new Image(fin, tileDimensions.getX(), tileDimensions.getY(), false, false);\n\t\t\t\tSprite sprite = new Sprite(img);\n\t\t\t\ttile.setSprite(sprite);\n\t\t\t\ttiles[i][j] = tile;\n\t\t\t}\n\t\t}\n\t}", "private static void joinFiles(String mainPath, ArrayList<File> oldFiles){\n FileFilter jsonFilter = new FileFilter() {\r\n public boolean accept(File path) {\r\n return path.getName().endsWith(\".json\");\r\n }\r\n };\r\n\r\n //contains all files in path\r\n File fileMain = new File(mainPath);\r\n File[] fileList = fileMain.listFiles();\r\n boolean checkedPath = false;\r\n\r\n if(fileList!=null){\r\n for(File fileTemp: fileList){\r\n //checkedPath makes sure JSON files are not cloned\r\n if(fileTemp.isFile() && checkedPath == false){\r\n //adds the JSON files found to arraylist\r\n File file = new File(mainPath);\r\n File[] jsonList = file.listFiles(jsonFilter);\r\n for(File temp: jsonList){\r\n oldFiles.add(temp);\r\n }\r\n checkedPath = true;\r\n }\r\n //if file found is a folder, recursively searches until JSON file is found\r\n else if(fileTemp.isDirectory()){\r\n joinFiles(fileTemp.getAbsolutePath(), oldFiles);\r\n }\r\n }\r\n }\r\n }", "public folderize() {\n }", "public DirectoryFileLocator(File dir) {\r\n directory = dir;\r\n }", "public File getWorldFolder(String worldName);", "public static void loadFiles(String rootDirectory, LinkedList<File> filepaths) throws IOException{\r\n\t\tFile root = new File(rootDirectory);\r\n\t\tfor(String str:root.list()){\r\n\t\t\tif(new File(rootDirectory+\"/\"+str).isDirectory())\r\n\t\t\t\tloadFiles(rootDirectory+\"/\"+str, filepaths);\r\n\t\t\telse\r\n\t\t\t\tfilepaths.add(new File(rootDirectory+\"/\"+str));\r\n\t\t}\r\n\t}", "private void populateList(File[] filesList) {\n Log.i(\"mPackage\",\"FilesList: \"+filesList.length);\n for(File file : filesList) {\n //Log.i(\"mPackage\",\"Path: \"+file);\n if(file.isDirectory()) {\n populateList(file.listFiles());\n }\n else {\n MarkerModel markerModel = new MarkerModel();\n Boolean containsObj = false;\n for(File modelFile : filesList) {\n String[] extension = modelFile.getName().split(\"\\\\.\");\n if(extension[extension.length-1].equals(\"obj\")) {\n markerModel.setObj(modelFile.getPath());\n containsObj = true;\n }\n else if(extension[extension.length-1].equals(\"mtl\"))\n markerModel.setMtl(modelFile.getPath());\n else\n markerModel.addTexture(modelFile.getPath());\n }\n if(containsObj)\n models.add(markerModel);\n return;\n //models.add(file.getPath());\n //Log.i(\"mPackage\",\"Path: \"+file.getPath());\n }\n }\n }", "@Override\r\n\tpublic Map<String, Object> select_file_info(Map<String, Object> map) throws Exception {\n\t\treturn sql.selectOne(\"cms_board.select_file_info\", map);\r\n\t}", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "private Vector getDirectoryEntries(File directory) {\n Vector files = new Vector();\n\n // File[] filesInDir = directory.listFiles();\n String[] filesInDir = directory.list();\n\n if (filesInDir != null) {\n int length = filesInDir.length;\n\n for (int i = 0; i < length; ++i) {\n files.addElement(new File(directory, filesInDir[i]));\n }\n }\n\n return files;\n }", "private static void traverse(Path path, ArrayList<Path> fileArray) {\r\n try (DirectoryStream<Path> listing = Files.newDirectoryStream(path)) {\r\n for (Path file : listing) {\r\n if (file.toString().toLowerCase().endsWith(\".txt\")) {\r\n fileArray.add(file);\r\n } else if (Files.isDirectory(file)) {\r\n traverse(file, fileArray);\r\n }\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Invalid path: \" + path);\r\n }\r\n }", "java.lang.String getFileLoc();", "private void traverseFile(File file, String relativePath)\n {\n if(!file.isDirectory())\n {\n currentInfo.add(relativePath);\n return;\n }\n\n\n File[] files = file.listFiles();\n\n //currently we do not send an empty file...\n if(files == null)return;\n\n for (int i = 0;i< files.length;++i)\n {\n traverseFile(files[i], relativePath + \"/\" + files[i].getName() );\n }\n\n }", "private File getMatchingFile(String fileName){\n debug(\"matching file: \"+fileName);\n StringBuffer filePath = new StringBuffer();\n filePath.append(rootDir.getAbsolutePath());\n filePath.append(File.separator);\n String compPath = fileName.replace('\\\\', '/'); \n Iterator it = files.iterator(); \n while(it.hasNext()){\n String rawPath = (String)it.next();\n String path = rawPath.replace('\\\\', '/');\n debug(\"path:\"+path); \n if(getFile(rawPath).isDirectory()){\n //check if path ends with the same name as fileName starts\n int rawIndex = path.lastIndexOf('/');\n String rawEnd = path.substring(rawIndex+1);\n debug(\"rawend:\"+rawEnd);\n int compIndex = compPath.indexOf('/');\n String compStart;\n if (compIndex < 0) {\n compStart = \".\";\n } else {\n compStart = compPath.substring(0,compIndex);\n }\n if(rawEnd.equals(compStart)){\n debug(\"equals\");\n filePath.append(path);\n if (compIndex >= 0) filePath.append(compPath.substring(compIndex));\n break;\n }\n }else{\n if(path.endsWith(compPath)){\n filePath.append(path);\n break;\n }\n }\n }\n debug(\"matching file result:\"+filePath.toString());\n return new File(filePath.toString());\n }", "@Override\n public boolean isDirectory(File directory) {\n\treturn false;\n }", "public HashMap<URL, HashSet<Nodemapper>> getLoadedFilesMap()\n {\n return this.loadedFiles;\n }", "public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public LevelOrderIterator(File rootNode) throws FileNotFoundException {\n\t\t// TODO 1\n\t\tfileQueue = new Queue<>();\n\t\tQueue<File> temp = new Queue<>();\n\t\t// Queue<File> tempTemp = new Queue<>();\n\t\tif (!rootNode.exists()) throw new FileNotFoundException();\n\t\tfileQueue.enqueue(rootNode);\n\t\t//temp.enqueue(rootNode);\n\t\tFile[] files = rootNode.listFiles();\n\t\tif (files == null) return;\n\t\tArrays.sort(files);\n\t\tfor (File f : files) {\n\t\t\ttemp.enqueue(f);\n\t\t}\n\t\twhile (!temp.isEmpty()) {\n\t\t\tif (temp.peek().isDirectory()){\n\t\t\t\tFile[] dir = temp.peek().listFiles();\n\t\t\t\tif (dir == null) {\n\t\t\t\t\tfileQueue.enqueue(temp.dequeue());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tArrays.sort(dir);\n\t\t\t\tfor (File f : dir) {\n\t\t\t\t\ttemp.enqueue(f);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tfileQueue.enqueue(temp.dequeue());\n\t\t}\n//\t\tfor (File f : files) {\n//\t\t\tfileQueue.enqueue(f);\n//\t\t\tif (f.isDirectory()){\n//\t\t\t\tFile[] filesTemp = f.listFiles();\n//\t\t\t\tif (filesTemp == null) continue;\n//\t\t\t\tArrays.sort(filesTemp);\n//\t\t\t\tfor (File g : filesTemp) {\n//\t\t\t\t\ttemp.enqueue(g);\n//\t\t\t\t\tif (f.isDirectory()){\n//\t\t\t\t\t\tFile[] filesTempTemp = f.listFiles();\n//\t\t\t\t\t\tif (filesTempTemp == null) continue;\n//\t\t\t\t\t\tArrays.sort(filesTempTemp);\n//\t\t\t\t\t\tfor (File h : filesTempTemp)\n//\t\t\t\t\t\t\ttempTemp.enqueue(h);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\twhile(!temp.isEmpty())\n//\t\t\tfileQueue.enqueue(temp.dequeue());\n//\t\twhile(!tempTemp.isEmpty())\n//\t\t\tfileQueue.enqueue(tempTemp.dequeue());\n\t}", "public Path getPath(String path,String nombreArchivo);", "private void showDirectory(final DefaultMutableTreeNode node) {\n view.getTree().setEnabled(false);\n view.getFileProperties().setLoadingFileStatus();\n view.getGuiPanel().repaint();\n\n SwingWorker<Void, File> worker = new SwingWorker<Void, File>() {\n @Override\n public Void doInBackground() {\n File file = (File) node.getUserObject();\n\n if (file.isFile() && ((FileTableModel)view.getTable().getModel())\n .getCurrentDirectory().equals(file.getParentFile())) {\n return null;\n }\n\n File[] files;\n\n if (file.isDirectory()) {\n files = fileSystemView.getFiles(file, true);\n\n if (node.isLeaf() || node.getChildCount() != files.length) {\n for (File child : files) {\n publish(child);\n }\n }\n } else {\n file = file.getParentFile();\n files = fileSystemView.getFiles(file, true);\n }\n\n setTableData(files, file);\n\n return null;\n }\n\n @Override\n protected void process(List<File> chunks) {\n chunks.stream()\n .sorted((o1, o2) -> o1.getName()\n .compareToIgnoreCase(o2.getName()))\n .map(DefaultMutableTreeNode::new)\n .forEach(node::add);\n }\n\n @Override\n protected void done() {\n view.getTree().setEnabled(true);\n view.getFileProperties().setOkFileStatus();\n view.getGuiPanel().repaint();\n }\n };\n worker.execute();\n }", "public File getWorldRegionFolder(String worldName);", "private static List<File> rootFiles(final File metaDir) throws IOException {\n File containerFile = new File(metaDir, \"container.xml\");\n if(!containerFile.exists()) {\n throw new IOException(\"Missing 'META-INF/container.xml'\");\n }\n\n List<File> rootFiles = Lists.newArrayListWithExpectedSize(2);\n try(FileInputStream fis = new FileInputStream(containerFile)) {\n Document doc = Jsoup.parse(fis, Charsets.UTF_8.name(), \"\", Parser.xmlParser());\n Elements elements = doc.select(\"rootfile[full-path]\");\n for(Element element : elements) {\n String path = element.attr(\"full-path\").trim();\n if(path.isEmpty()) {\n continue;\n } else if(path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n File rootFile = new File(metaDir.getParent(), path);\n if(!rootFile.exists()) {\n throw new IOException(String.format(\"Missing file, '%s'\", rootFile.getAbsolutePath()));\n }\n rootFiles.add(rootFile);\n }\n }\n\n return rootFiles;\n }", "@Override\n\tpublic boolean accept(File p1)\n\t{\n\t\treturn p1.isDirectory()&&!p1.getName().startsWith(\".\");\n\t}", "public abstract List<LocalFile> getAllFiles();", "static List<File> resolveFiles(List<File> filesOrDirs) throws IOException {\n if (filesOrDirs == null || filesOrDirs.isEmpty())\n return Collections.emptyList();\n\n List<File> files = new LinkedList<>();\n\n for (File file : filesOrDirs) {\n if (file.isDirectory()) {\n walkFileTree(file.toPath(), EnumSet.noneOf(FileVisitOption.class), 1,\n new SimpleFileVisitor<Path>() {\n @Override public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) {\n if (nodeId(path.toFile()) != null)\n files.add(path.toFile());\n\n return FileVisitResult.CONTINUE;\n }\n });\n\n continue;\n }\n\n if (nodeId(file) != null)\n files.add(file);\n }\n\n return files;\n }", "private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }", "public static void main (String []args){\n\t\tString root = \"/home/weslley/ArtigoGroundHog2015/LogProjetos2015\";\n\t\tString rootCompleto = \"/home/weslley/mestrado2014/FinalProjects\";\n\t\t//String listaProjetosSemData = \"/home/weslley/ArtigoGroundHog2015/projectsNames2015.txt\";\n\n\t\t//Para alguns projetos nao datados\n/*\t\tVector<String> listaProjetosNaoDatados = null;\n\t\ttry {\n\t\t\tlistaProjetosNaoDatados = readProjectsNames();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n*/\n\t\tFile folder = new File(root);\n\t\tFile folderCompleto = new File(rootCompleto);\n\n\t\tint x = 0;\n\t\tFile firstLevel[] = folder.listFiles();\n\t\tFile firstLevelCompleto[] = folderCompleto.listFiles();\n\n\t\tboolean completed = true;\n\n\t\tfor (int i = 0; i < firstLevel.length; i++){\n\n\t\t\t//if(listaProjetosNaoDatados.contains(firstLevel[i].getName())){\n\n\t\t\t\tFile projetoDatado=null;\n\t\t\t\ttry {\n\t\t\t\t\tprojetoDatado = findFile(firstLevelCompleto, firstLevel[i].getName());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(projetoDatado!=null){\n\n\t\t\t\t\tFile secondLevel[] = firstLevel[i].listFiles();\n\t\t\t\t\t//System.out.println(firstLevel[i].getName());\n\t\t\t\t\tif (secondLevel != null){\n\t\t\t\t\t\tfor(int j = 0; j < secondLevel.length && completed; j++){\n\t\t\t\t\t\t\t//System.out.println(secondLevel[j].getName());\n\t\t\t\t\t\t\tif (secondLevel[j].getName().compareTo(\".DS_Store\") != 0){\n\t\t\t\t\t\t\t\tFile thirdLevel[] = secondLevel[j].listFiles();\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t\tfor (int k = 0;thirdLevel!=null && k < thirdLevel.length && completed; k++){\n\t\t\t\t\t\t\t\t\tif (thirdLevel[k].getName().compareTo(\".DS_Store\") != 0){\n\t\t\t\t\t\t\t\t\t\tif (!(thirdLevel[k].getName().startsWith(\"[\") && thirdLevel[k].getName().contains(\"]\"))){\n\n\t\t\t\t\t\t\t\t\t\t\t//File secondLevelCompleto[] = projetoDatado.listFiles();\n\t\t\t\t\t\t\t\t\t\t\tFile secondLevelCompletoAuxiliar;\n\t\t\t\t\t\t\t\t\t\t\tFile thirdLevelCompletoAuxiliar;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tsecondLevelCompletoAuxiliar = findFile(projetoDatado.listFiles(), secondLevel[j].getName());\n\t\t\t\t\t\t\t\t\t\t\t\tif(secondLevelCompletoAuxiliar!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tthirdLevelCompletoAuxiliar = findFile(secondLevelCompletoAuxiliar.listFiles(), thirdLevel[k].getName());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (thirdLevelCompletoAuxiliar!=null && thirdLevelCompletoAuxiliar.getName().startsWith(\"[\") && thirdLevelCompletoAuxiliar.getName().contains(\"]\")){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(thirdLevelCompletoAuxiliar!=null && (thirdLevelCompletoAuxiliar.getName().endsWith(thirdLevel[k].getName()) || (compararProjetoSemExtensao(thirdLevelCompletoAuxiliar.getName(),thirdLevel[k].getName() )))){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFile rename = new File(thirdLevel[k].getParent() + \"/\" + thirdLevelCompletoAuxiliar.getName());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthirdLevel[k].renameTo(rename);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString novoNome = thirdLevel[k].getName();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}//System.out.println(\"asdasd\" + x);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t//}\n\n\t\t\t}\n\t\t}\n\t}", "public void setMapFile(String mapName) {\n map = Map.loadFromJSON(mapName);\n }", "private static boolean esDirectorio(String ruta) {\n\t\tboolean b = false;\n\t\tFile f = new File(ruta);\n\t\tif (f.isDirectory()) {\n\t\t\tb = true;\n\t\t}\n\t\treturn b;\n\t}", "List<File> list(String directory) throws FindException;", "public synchronized void readFileTree() throws FileTreeReadingException {\n final Set<Path> missingFiles = new HashSet<>(projectFiles.keySet());\n\n final LinkedHashMap<Path, Boolean> newFiles = new LinkedHashMap<>();\n\n try {\n Files.walkFileTree(projectDirectoryPath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {\n if (projectDirectoryPath.compareTo(path) == 0)\n return FileVisitResult.CONTINUE;\n\n if (!missingFiles.remove(path))\n newFiles.put(path, true);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {\n if (!missingFiles.remove(path))\n newFiles.put(path, false);\n return FileVisitResult.CONTINUE;\n }\n });\n\n projectFiles.keySet().removeAll(missingFiles);\n projectFiles.putAll(newFiles);\n globalEventManager.fireEventListeners(this,\n new ProjectFileListChangedEvent(newFiles, missingFiles));\n\n } catch (IOException e) {\n throw new FileTreeReadingException(projectDirectoryPath, e);\n }\n }", "public void onNewDirLoaded(File dirFile);", "private void createMaps(String pathToCsv) throws Exception {\n BufferedReader br = new BufferedReader(new FileReader(pathToCsv));\n String line = null;\n\n while ((line = br.readLine()) != null) {\n String[] mapping = line.split(\",\");\n fileUrlMap.put(mapping[0], mapping[1]);\n urlFileMap.put(mapping[1], mapping[0]);\n }\n\n br.close();\n }", "public static void prepareMapToShowOnlyTheseOSM(Set<File> files) {\n Set<String> filePaths = new HashSet<>();\n for (File f : files) {\n filePaths.add(f.getAbsolutePath());\n }\n Set<File> filesToRemove = new HashSet<>();\n for (String lf : loadedOSMFiles) {\n if (!filePaths.contains(lf)) {\n filesToRemove.add(new File(lf));\n }\n }\n removeOSMFilesFromModel(filesToRemove);\n\n // We don't want to do this, because files in the persistedOSMFiles set\n // will get loaded by buildMapFromExternalStorage when the MapActivity\n // gets reloaded.\n //addOSMFilesToModel(files);\n\n // just adds it to the set, the set gets read later\n addOSMFilesToPersistedOSMFiles(files);\n }", "public abstract String getFileLocation();", "private static File[] filesMiner(String path) {\n try {\n File directoryPath = new File(path);\n FileFilter onlyFile = new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n return pathname.isFile();\n }\n }; // filter directories\n return directoryPath.listFiles(onlyFile);\n } catch (Exception e) {\n System.err.println(UNKNOWN_ERROR_WHILE_ACCESSING_FILES);\n return null;\n }\n\n }", "private String get_FilePath(String put, int ind) {\n\n File file = new File(put);\n File[] files = file.listFiles();\n\n try {\n if (files[ind].isFile()) {\n return files[ind].getAbsolutePath();\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception error : \" + e.getMessage());\n }\n return null;\n }", "public MultiLevelLauncher withMapFiles(String[] maps) {\n this.maps = maps.clone();\n return this;\n }", "private DirDetailsForWrite fileWithDirListingEntry(String fileName, Block root, int rootIndex) {\n\t\tint slashIndex = fileName != null ? fileName.indexOf(\"/\") : Constants.NEGATIVE;\n\t\tString first = null;\n\t\tString second = null;\n\t\tDirEntryDetails dirEntryDetails = null;\n\t\tDirDetailsForWrite dirDetailsForWrite = null;\n\t\t\n\t\tif(slashIndex > 0) {\n\t\t\tsecond = fileName.substring(slashIndex+1);\n\t\t\tfirst = fileName.substring(0, slashIndex);\n\t\t\t\n\t\t\tdirEntryDetails = ((Directory)root).containDirEntryByName(first);\n\t\t\t//dirDetailsForWrite = new DirDetailsForWrite();\n\t\t\t//dirDetailsForWrite.setDirEntryDetails(dirEntryDetails);\n\t\t\t//dirDetailsForWrite.setRootIndex(rootIndex);\n\t\t\t\n\t\t\treturn fileWithDirListingEntry(second, sector.get(dirEntryDetails.getLink()), dirEntryDetails.getLink());\n\t\t} else {\n\t\t\tdirEntryDetails = ((Directory)root).containDirEntryByName(fileName);\n\t\t\t\n\t\t\tdirDetailsForWrite = new DirDetailsForWrite();\n\t\t\tdirDetailsForWrite.setDirEntryDetails(dirEntryDetails);\n\t\t\tdirDetailsForWrite.setRootIndex(rootIndex);\n\t\t\t\n\t\t\tif(dirEntryDetails != null)\n\t\t\t\treturn dirDetailsForWrite;\n\t\t}\n\t\treturn null;\n\t}", "public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}", "private static void listar(Path a){\n File dir = new File(a.toString());\n if(dir.isDirectory()){\n String[] dirContents = dir.list();\n for(int i =0; i < dirContents.length; i++){\n System.out.println(dirContents[i]);\n }\n }\n }", "public void openDir(ZMFileListEntry zMFileListEntry) {\n if (zMFileListEntry != null && zMFileListEntry.isDir() && (zMFileListEntry instanceof BoxFileListEntry)) {\n BoxFileObject object = ((BoxFileListEntry) zMFileListEntry).getObject();\n if (object != null && this.mBox.asyncLoadDir(object, this.mLoadFolderListener)) {\n showWaitingDialog(this.mActivity.getString(C4538R.string.zm_msg_loading), this.mWaitingDialogCancelListener);\n }\n }\n }", "private void addPackageDirFiles(WebFile aDir, List aList)\n{\n boolean hasNonPkgFile = false;\n for(WebFile child : aDir.getFiles())\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, aList);\n else hasNonPkgFile = true;\n if(hasNonPkgFile || aDir.getFileCount()==0) aList.add(aDir);\n}" ]
[ "0.6602147", "0.60723454", "0.5436156", "0.5338338", "0.52977204", "0.5294476", "0.52849776", "0.5243373", "0.52187157", "0.5217914", "0.5198118", "0.5174612", "0.517303", "0.5093092", "0.5084467", "0.506877", "0.5048289", "0.5027841", "0.5011638", "0.49735934", "0.4972365", "0.4964999", "0.4929364", "0.49155262", "0.49105984", "0.49051172", "0.4874657", "0.48674792", "0.48671198", "0.48531044", "0.48483136", "0.48451322", "0.4844364", "0.48442656", "0.48430803", "0.48369917", "0.48327115", "0.48265746", "0.48175374", "0.48007682", "0.47975683", "0.47955123", "0.4784051", "0.4781095", "0.47743237", "0.4767824", "0.47592553", "0.4749649", "0.47489414", "0.47422698", "0.47404483", "0.47350523", "0.47324148", "0.47312486", "0.4725157", "0.47175986", "0.47174883", "0.47162792", "0.47158328", "0.47047248", "0.4698104", "0.46917298", "0.46905994", "0.46889064", "0.46848634", "0.46820453", "0.4681878", "0.4680057", "0.4679377", "0.46673948", "0.46668884", "0.46667466", "0.46642864", "0.46588066", "0.46520233", "0.46485355", "0.464381", "0.46429065", "0.46346822", "0.46307427", "0.46272793", "0.46243522", "0.46221316", "0.46215138", "0.4614642", "0.46044978", "0.46042258", "0.45996022", "0.4596492", "0.4595606", "0.45926756", "0.4591151", "0.4585551", "0.45835403", "0.4582145", "0.45808095", "0.45796454", "0.45716473", "0.457027", "0.45673415", "0.45665067" ]
0.0
-1
Overi jestli je predany naparsovany html dokument clanek webu whitebear. Overeni se provadi tak, ze clanek webu ma pevne danou strukturu. V jedinem nadpisu h1 na strance musi byt definovany text (v konstantni promenne tridy), Ve strance musi byt jeden vyskyt elementu article, tento element musi mit jeden atribut id s obsahem main. Ve strance musi byt jeden element s tridou mainText.
private boolean isWhiteBearArticle(Document parsed) { boolean isCorrect = false; Element heading = parsed.getElementById("heading"); if (heading == null) { return false; } if (heading.text().equals(DirectoryParser.HEADING_TEST_STRING)) { isCorrect = true; } Elements selected = parsed.getElementsByTag("article"); if (selected.size() != 1) { return false; } else { Attributes articleAttributes = selected.first().attributes(); if (articleAttributes.size() > 1) { return false; } if (articleAttributes.asList().contains(new Attribute("id", "main"))) { isCorrect = true; } } selected = parsed.getElementsByClass("mainText"); if (selected.size() != 1) { return false; } return isCorrect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HTML createHTML();", "public static String getArticleHtml(Document document) {\n Elements article = document.select(\".widget.widget-richtext.6 .text\").first().children();\n return article.toString();\n }", "protected SafeHtml getInnerHtml() {\n return html;\n }", "private HTMLElement generateIntroText(IntroText element, int indentLevel) {\n \t\tHTMLElement textElement = generateTextElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_PARAGRAPH, null,\n \t\t\t\tIIntroHTMLConstants.SPAN_CLASS_TEXT, element.getText(),\n \t\t\t\tindentLevel);\n \t\treturn textElement;\n \t}", "@Override\n public String getText() {\n try {\n return doc.select(\".post-content\").get(0).text().replaceAll(\"\\n\", \" \").\n // removing references\n replaceAll(\"\\\\[[\\\\w\\\\s\\\\.\\\\-\\\\,;\\\\?\\\\!\\\\:]+\\\\]\", \"\");\n } catch (NullPointerException e) {\n return null;\n }\n }", "public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }", "@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }", "private DefaultHTMLs(String contents){\r\n\t\tthis.contents = contents;\r\n\t}", "public static Element setInnerHTML(Element e, SafeHtml str) {\n e.setInnerHTML(str.asString());\n return e;\n }", "public String getHtmlText() {\n return htmlText;\n }", "@DISPID(-2147417084)\n @PropPut\n void outerHTML(\n java.lang.String rhs);", "private HTMLElement generateInlineIntroHTML(IntroHTML element,\n \t\t\tint indentLevel) {\n \t\tStringBuffer content = readFromFile(element.getSrc());\n \t\tif (content != null && content.length() > 0) {\n \t\t\t// Create the outer div element\n \t\t\tHTMLElement divElement = generateDivElement(element.getId(),\n \t\t\t\t\tIIntroHTMLConstants.DIV_CLASS_INLINE_HTML, indentLevel);\n \t\t\t// add the content of the specified file into the div element\n \t\t\tdivElement.addContent(content);\n \t\t\treturn divElement;\n \t\t}\n \t\treturn null;\n \t}", "@Test\n\tpublic void h1_header_bold_test() {\n\t\tString text = \"# **heading1**\";\n\t\tassertEquals(\"<html><h1><strong>heading1</strong></h1></html>\", createHTML(text));\n\t}", "@DISPID(-2147417084)\n @PropGet\n java.lang.String outerHTML();", "private String parseHtmlText(HtmlPage htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage.getRawHTML(), htmlPage.getURL());\n StringBuilder sb = new StringBuilder();\n doc.getElementsByClass(MAIN_CONTENT_CLASS).forEach(element -> {\n element.getElementsByTag(PARAGRAPH_TAG).forEach(paragraph_element -> {\n sb.append(paragraph_element.text()).append(SPACE);\n });\n });\n\n String parsedText = sb.toString();\n // IF case folding is set, perform it\n if (this.isCaseFolding) {\n parsedText = parsedText.toLowerCase();\n }\n\n // IF punctuation handling is set, perform it\n if (this.isPunctuationHandling) {\n parsedText = punctuationHandler(parsedText);\n }\n\n return parsedText;\n }", "public void ajouterTexteAide(String texte) {\r\n\t\tif (bulleAide != null)\r\n\t\t\tbulleAide.setText(\"<HTML><BODY>\" + texte + \"</HTML></BODY>\");\r\n\t}", "@Override\r\n\t\tpublic String getTextContent() throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\tpublic void setInnerText(String arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void setInnerText(String arg0) {\n\n\t}", "public String markupAsHTML (Markup m)\n {\n\n if (m == null)\n {\n\n return this.paragraph;\n\n }\n\n Markup pm = new Markup (m,\n this.getAllTextStartOffset (),\n this.getAllTextEndOffset ());\n\n pm.shiftBy (-1 * this.getAllTextStartOffset ());\n\n return pm.markupAsHTML (this.paragraph);\n\n }", "public IndicadoresEficaciaHTML() {\n/* 163 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 165 */ buildDocument();\n/* */ }", "private static Paragraph obtenerContenido(String texto)\r\n\t{\r\n\t\tParagraph p = new Paragraph();\r\n\t\tChunk c = new Chunk();\r\n\t\tp.setAlignment(Element.ALIGN_LEFT);\r\n\t\tc.append(texto);\r\n\t\tc.setFont(fuenteNormal);\r\n\t\tp.add(c);\r\n\t\t\r\n\t\treturn p;\r\n\t}", "public FreeMindWriter richPreText( String text ) {\n tagClose();\n out.print( \"<richcontent TYPE='NODE'><html>\\n <head>\\n\\n </head>\\n <body><pre>\" );\n out.writeEscapedXMLString( text, true );\n out.print( \"</pre></body>\\n</html>\\n</richcontent>\" );\n return this; \n }", "private static void nekoTest() {\n\t\t\t\t DOMParser parser = new DOMParser();\n\t\t\t\t try {\n\t\t\t\t parser\n\t\t\t\t .setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/scanner/allow-selfclosing-iframe\",\n\t\t\t\t true);\n\t\t\t\t parser.setFeature(\"http://cyberneko.org/html/features/augmentations\",\n\t\t\t\t true);\n\t\t//\t\t parser.setProperty(\n\t\t//\t\t \"http://cyberneko.org/html/properties/default-encoding\",\n\t\t//\t\t defaultCharEncoding);\n\t\t\t\t parser\n\t\t\t\t .setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/scanner/ignore-specified-charset\",\n\t\t\t\t true);\n\t\t\t\t parser\n\t\t\t\t .setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/balance-tags/ignore-outside-content\",\n\t\t\t\t false);\n\t\t\t\t parser.setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/balance-tags/document-fragment\",\n\t\t\t\t true);\n\t\t//\t\t parser.setFeature(\"http://cyberneko.org/html/features/report-errors\",\n\t\t\t\t\t\tString url=\"http://et.21cn.com/movie/xinwen/huayu/2004/05/20/1571743.shtml\";\n\t\t\t\t Document document = Jsoup.connect(url).get();\n\t\t\t\t W3CDom wad= new W3CDom();\n\t\t\t\t org.w3c.dom.Document fromJsoup = wad.fromJsoup(document);\n\t\t//\t\t parser.parse(new InputSource(new StringReader(document.html())));\n\t\t//\t\t org.w3c.dom.Document document2 = parser.getDocument();\n\t\t\t\t XpathV3Selector selector = XpathV3Selector.selector(new DOMSource(fromJsoup));\n\t\t\t\t \tString string = selector.evaluate(\"//div[@class='texttit_m1']\");\n\t\t\t\t\tSystem.out.println(string);\n\t\t//\t\t DOMSource\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t}", "private static String generateHTML(String heading) {\n\t\theading = StringUtil.removeH(heading);\n\t\tif (heading.length() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"<h1>\" + heading + \"</h1>\");\n\t\t\tsb.append(\"<p></p>\");\n\t\t\treturn sb.toString();\n\t\t}\n\t}", "public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }", "public static void old_kategorien_aus_grossem_text_holen (String htmlfile) // alt, funktioniert zwar bis auf manche\n\t// dafür müsste man nochmal loopen um dien ächste zeile derü berschrift auch noch abzufangen bei <h1 class kategorie western\n\t// da manche bausteine in die nächste zeile verrutscht sind.\n\t// viel einfacher geht es aus dem inhaltsverzeichnis des katalogs die kategorien abzufangen.\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n // System.out.println(\"Gelesene Zeile: \" + zeile);\n \t\n \t\n \t// 1. Pruefe ob die Zeile eine Kategorie ist: wenn ja Extrahiere diese KATEGORIE aus dem Code:\n \t// Schema <h1 class=\"kategorie-western\"><a name=\"_Toc33522153\"></a>Bescheide\n \t// Rücknahme 44 X\t</h1>\n \t/*if (zeile.contains(\"<h1\"))\n \t\t\t{\n \t\t\t// grussformeln:\n \t\tzeile.replace(\"class=\\\"kategorie-western\\\" style=\\\"page-break-before: always\\\">\",\"\");\n \t\t\n \t\t\t}\n \t*/\n \t// der erste hat immer noch ein page-break before: drinnen; alle anderen haben dann kategorie western ohne drin\n \tif (zeile.contains(\"<h1 class=\\\"kategorie-western\\\"\"))\n \t\t\t/*zeile.contains(\"<h1 class=\\\"kategorie-western\\\">\") /*|| zeile.contains(\"</h1>\")*/\n \t{\n \t\tSystem.out.println (zeile + \"\\n\"); // bis hier werden alle kategorien erfasst !\n \t\t\n \t\t// hier passiert es, dass vllt. die kategorie in die nächste Zeile gerutscht ist:\n \t\t// daher nochmal loopen und mit stringBetween die nächste einfangen:\n \t\t\n \t\tString kategoriename = \"\";\n \t/*\tif (zeile.contains(\"</h1>\") && !zeile.contains(\"<h1 class=\")) // das ist immer der fall wenn es in die nächste zeile rutscht , weil der string zu lang ist:\n \t\t{\n \t\t\t kategoriename = zeile.replace(\"</h1>\", \"\");\n \t\t}\n \t\telse\n \t\t{\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t}*/\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t \n \t\t if (! zeile.contains(\"</h1>\")) // dann ist es in die nächste Zeile gerutscht\n \t\t {\n \t\t\t // hole nächste Zeile und vervollständige damit kategorie:\n \t\t }\n\n \t\tif (kategoriename == null || kategoriename ==\"\")\n \t\t{\n \t\t\t// keine kategorie adden (leere ist sinnlos)\n \t\t}\n \t\n \t\t\tif (kategoriename.contains(\"lass=\\\"kategorie-western\\\">\"))\n \t\t\t{\n \t\t\t\tkategoriename.replace(\"lass=\\\"kategorie-western\\\">\", \"\");\n \t\t\t}\n \t\t\n \t\t\t//System.out.println (kategoriename + \"\\n\");\n \t\t/*\tkategoriename.replace(\"lass=\",\"\");\n \t\t\tkategoriename.replace(\"kategorie-western\",\"\");\n \t\t\tkategoriename.replace(\"\\\"\",\"\");\n \t\t\tkategoriename.replace(\">\",\"\");\n \t\t\tkategoriename.replace(\"/ \",\"\");*/\n\t \t\t//mainobject.kategoriencombo.addItem(kategoriename);\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFileWriter fwk1 = new FileWriter (\"kategorien.txt\",true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n \t\t\n \t}\n \t\n\n \n \t// 2. Pruefe ob die Zeile der Name eines Textbausteins ist d.h. Unterkateogrie:\n \t//<p style=\"margin-top: 0.21cm; page-break-after: avoid\"><a name=\"_Toc33522154\"></a>\n \t//Ablehnung erneute Überprüfung</p>\n // System.out.println (\"Ermittle alle Unterkateogrien (d.h. Textbausteinnamen an sich)... 243\\n\");\n\n \tif (zeile.contains(\"<p style=\\\"margin-top: 0.21cm; page-break-after: avoid\\\"><a name=\"))\n \t{\n \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n \t\tif (unterkategorie == null || unterkategorie ==\"\")\n \t\t{\n \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n \t\t}\n \t\telse\n \t\t{\n \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n \t\t\t\n \t\t\t\n\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\t//mainobject.bausteinecombo.addItem(unterkategorie);\n\n \t\t\tcount_unterkategorien = count_unterkategorien+1; // anzahl der bausteine anhand der bausteinnamen ermitteln \n \t\t\t// Schreibe die unter Kategorien in Textfile:\n\t \t\tFileWriter fwk2 = new FileWriter (\"unterkategorien.txt\",true);\n\t \t\tfwk2.write(unterkategorie+\"\\n\");\n\t \t\tfwk2.flush();\n\t \t\tfwk2.close();\n\n \t\t//unterkategorienamen[count_unterkategorien] = unterkategorie;\n \t\t// (= hier unterkateogrienamen)\n \t\t\n \t\t\n \t // parts.length = anzahl der bausteine müsste gleich count_unterkategorien sein.\n \t // jetzt zugehörigen baustein reinschreiben:\n \t // also je nach count_unterkateogerien dann den parts[count] reinschrieben:\n \t /* try {\n \t\t\tfwb.write(parts[count_unterkategorien]);\n \t\t} catch (IOException e) {\n \t\t\t// TODO Auto-generated catch block\n \t\tSystem.out.println(\"503 konnte datei mit baustein nicht schreiben\");\n \t\t}\n \t \n \t */\n \t \n\n \t\t}\n \t\t\n \t\t\n \t\t \n \t} // if zeile contains\n \t\t \n \n }\t// while\n \n } // try\n catch (Exception y)\n {}\n \t\t \n \t\t \n\t \t// <p style=\"margin-left: 0.64cm; font-weight: normal\"> usw... text </p> sthet immer dazwischen\n\t \t/*if (zeile.contains(\"<p style=\\\"margin-left: 0.64cm; font-weight: normal\\\">\"))\n\t \t{\n\t \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n\t \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n\t \t\tif (unterkategorie == null || unterkategorie ==\"\")\n\t \t\t{\n\t \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n\t \t\t\t\n\t \t\t\t\n\t\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\tmainobject.bausteinecombo.addItem(unterkategorie);\n\t \t\t}\n\t \t}\n\t \t*/\n System.out.println (\"Alle Oberkategorien, Namen erfolgreich ermittelt und eingefügt 239\\n\");\n\n System.out.println (\"Alle Unterkategorien oder Bausteinnamen erfolgreich eingefügt 267\\n\");\n\n \n \n\t}", "@Test\n public void commentGetHtmlStart() {\n // White-Box! Temporär mit NotNull-Test ersetzt\n // assertEquals(\"<i><font color=\\\"grey\\\">\", comment.htmlStart());\n assertNotNull(comment.htmlStart());\n }", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "public String parseHTML(String html) {\n\n int endIndex;\n for (int startIndex = html.indexOf(\"<figure\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<figure\")) {\n endIndex = html.indexOf(\"figure>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 7);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<span class=\\\"editsection\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<span class=\\\"editsection\")) {\n endIndex = html.indexOf(\"span>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<img\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<img\")) {\n endIndex = html.indexOf(\"img>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n return html;\n }", "public void markup( String text )\n {\n // Indent only of this is the first text on the line\n markup( text, rst.isEmpty() || rst.endsWith( NEW_LINE ) );\n }", "@Override\r\n\tpublic String getInnerText() {\n\t\treturn null;\r\n\t}", "@Test\n\tpublic void h2_header_bold_test() {\n\t\tString text = \"## **heading2**\";\n\t\tassertEquals(\"<html><h2><strong>heading2</strong></h2></html>\", createHTML(text));\n\t}", "public AdmClientePreferencialHTML(AdmClientePreferencialHTML src) {\n/* 209 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 211 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 213 */ syncAccessMethods();\n/* */ }", "@Test\n\tpublic void h1_header_test() {\n\t\tString text = \"# heading1\";\n\t\tassertEquals(\"<html><h1>heading1</h1></html>\", createHTML(text));\n\t}", "@Override\n protected void extractChapText(Chapter chapter) {\n StringBuilder chapterText = new StringBuilder();\n\n Elements content = chapter.rawHtml.select(chapTextSelector);\n Iterator<Element> iterator = content.iterator();\n while (iterator.hasNext()) {\n chapterText.append(iterator.next().html());\n if (iterator.hasNext()) chapterText.append(\"<hr />\");\n }\n chapter.contentFromString(chapterText.toString().replace(\"blockquote\", \"div\"));\n }", "@Override\n\tpublic String getInnerText() {\n\t\treturn null;\n\t}", "private static String HtmlToText(final String s) {\n final HTMLEditorKit kit = new HTMLEditorKit();\n final Document doc = kit.createDefaultDocument();\n try {\n kit.read(new StringReader(s), doc, 0);\n return doc.getText(0, doc.getLength()).trim();\n } catch (final IOException | BadLocationException ioe) {\n return s;\n }\n }", "@Test\n\tpublic void h1_header_italic_test() {\n\t\tString text = \"# *heading1*\";\n\t\tassertEquals(\"<html><h1><em>heading1</em></h1></html>\", createHTML(text));\n\t}", "@org.junit.Test\n public static final void testSgmlShortTags() {\n junit.framework.TestCase.assertEquals(\"<p></p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p/b/\")));// Short-tag discarded.\n\n junit.framework.TestCase.assertEquals(\"<p></p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|1\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p<b>\")));// Discard <b attribute\n\n // This behavior for short tags is not ideal, but it is safe.\n junit.framework.TestCase.assertEquals(\"<p href=\\\"/\\\">first part of the text&lt;/&gt; second part</p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|2\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p<a href=\\\"/\\\">first part of the text</> second part\")));\n }", "public String getHtml() {\n return html;\n }", "public void setHTML(String html);", "public void setTextDivEdicion(String text) { doSetText(this.$element_DivEdicion, text); }", "public String getContent() {\n String s = page;\n\n // Bliki doesn't seem to properly handle inter-language links, so remove manually.\n s = LANG_LINKS.matcher(s).replaceAll(\" \");\n\n wikiModel.setUp();\n s = getTitle() + \"\\n\" + wikiModel.render(textConverter, s);\n wikiModel.tearDown();\n\n // The way the some entities are encoded, we have to unescape twice.\n s = StringEscapeUtils.unescapeHtml(StringEscapeUtils.unescapeHtml(s));\n\n s = REF.matcher(s).replaceAll(\" \");\n s = HTML_COMMENT.matcher(s).replaceAll(\" \");\n\n // Sometimes, URL bumps up against comments e.g., <!-- http://foo.com/-->\n // Therefore, we want to remove the comment first; otherwise the URL pattern might eat up\n // the comment terminator.\n s = URL.matcher(s).replaceAll(\" \");\n s = DOUBLE_CURLY.matcher(s).replaceAll(\" \");\n s = HTML_TAG.matcher(s).replaceAll(\" \");\n\n return s;\n }", "private void textilize () {\n\n textIndex = 0;\n int textEnd = line.length() - 1;\n listChars = new StringBuffer();\n linkAlias = false;\n while (textIndex < line.length()\n && (Character.isWhitespace(textChar()))) {\n textIndex++;\n }\n while (textEnd >= 0\n && textEnd >= textIndex\n && Character.isWhitespace (line.charAt (textEnd))) {\n textEnd--;\n }\n boolean blankLine = (textIndex >= line.length());\n if (blankLine) {\n textilizeBlankLine();\n }\n else\n if ((textIndex > 0)\n || ((line.length() > 0 )\n && (line.charAt(0) == '<'))) {\n // First character is white space of the beginning of an html tag:\n // Doesn't look like textile... process it without modification.\n }\n else\n if (((textEnd - textIndex) == 3)\n && line.substring(textIndex,textEnd + 1).equals (\"----\")) {\n // && (line.substring(textIndex, (textEnd + 1)).equals (\"----\")) {\n textilizeHorizontalRule(textIndex, textEnd);\n } else {\n textilizeNonBlankLine();\n };\n }", "String renderHTML();", "private static String getTextFromHtml(File f) throws Exception {\n\t\tInputStream is = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(f);\n\t\t\tContentHandler contenthandler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tParser parser = new AutoDetectParser();\n\t\t\tparser.parse(is, contenthandler, metadata, new ParseContext());\n\t\t\treturn contenthandler.toString();\n\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tif (is != null)\n\t\t\t\tis.close();\n\t\t}\n\t}", "public static void setHTML(String html) {\n if (create()) {\n tag.setInnerHTML(SimpleHtmlSanitizer.sanitizeHtml(html).asString());\n }\n }", "private void textilizeNonBlankLine () {\n StringBuffer blockMod = new StringBuffer();\n int startPosition = 0;\n int textPosition = 0;\n leftParenPartOfURL = false;\n attributeType = 0;\n klass = new StringBuffer();\n id = new StringBuffer();\n style = new StringBuffer();\n language = new StringBuffer();\n String imageTitle = \"\";\n String imageURL = \"\";\n int endOfImageURL = -1;\n boolean doublePeriod = false;\n int periodPosition = line.indexOf (\".\");\n if (periodPosition >= 0) {\n textPosition = periodPosition + 1;\n if (textPosition < line.length()) {\n if (line.charAt (textPosition) == '.') {\n doublePeriod = true;\n textPosition++;\n }\n if (textPosition < line.length()\n && line.charAt (textPosition) == ' ') {\n textPosition++;\n textIndex = 0;\n while (textIndex < periodPosition\n && (Character.isLetterOrDigit (textChar()))) {\n blockMod.append (textChar());\n textIndex++;\n } // end while more letters and digits\n if (blockMod.toString().equals (\"p\")\n || blockMod.toString().equals (\"bq\")\n || blockMod.toString().equals (\"h1\")\n || blockMod.toString().equals (\"h2\")\n || blockMod.toString().equals (\"h3\")\n || blockMod.toString().equals (\"h4\")\n || blockMod.toString().equals (\"h5\")\n || blockMod.toString().equals (\"h6\")) {\n // look for attributes\n collectAttributes (periodPosition);\n } else {\n blockMod = new StringBuffer();\n textPosition = 0;\n }\n } // end if space follows period(s)\n } // end if not end of line following first period\n } // end if period found\n\n // Start processing at the beginning of the line\n textIndex = 0;\n\n // If we have a block modifier, then generate appropriate HTML\n if (blockMod.length() > 0) {\n lineDelete (textPosition);\n closeOpenBlockQuote();\n closeOpenBlock();\n doLists();\n if (blockMod.toString().equals (\"bq\")) {\n lineInsert (\"<blockquote><p\");\n context.blockQuoting = true;\n } else {\n lineInsert (\"<\" + blockMod.toString());\n }\n if (klass.length() > 0) {\n lineInsert (\" class=\\\"\" + klass.toString() + \"\\\"\");\n }\n lineInsert (\">\");\n if (doublePeriod) {\n context.nextBlock = blockMod.toString();\n } else {\n context.nextBlock = \"p\";\n }\n }\n\n // See if line starts with one or more list characters\n if (blockMod.length() <= 0) {\n while (textIndex < line.length()\n && (textChar() == '*'\n || textChar() == '#'\n || textChar() == ';')) {\n listChars.append (textChar());\n textIndex++;\n }\n if (listChars.length() > 0\n && (textIndex >= line.length()\n || ((! Character.isWhitespace (textChar()))\n && (textChar() != '(')))) {\n listChars = new StringBuffer();\n textIndex = 0;\n }\n int firstSpace = line.indexOf (\" \", textIndex);\n if (listChars.length() > 0) {\n collectAttributes (firstSpace);\n }\n }\n int endDelete = textIndex;\n if (endDelete < line.length()\n && Character.isWhitespace (line.charAt (endDelete))) {\n endDelete++;\n }\n\n if (listChars.length() > 0) {\n lineDelete (0, endDelete);\n }\n doLists();\n if (listChars.length() > 0\n && listChars.charAt(listChars.length() - 1) == ';') {\n lastDefChar = ';';\n } else {\n lastDefChar = ' ';\n }\n\n // See if this line contains a link alias\n if ((blockMod.length() <= 0)\n && ((line.length() - textIndex) >= 4)\n && (textChar() == '[')) {\n int rightBracketIndex = line.indexOf (\"]\", textIndex);\n if (rightBracketIndex > (textIndex + 1)) {\n linkAlias = true;\n String alias = line.substring (textIndex + 1, rightBracketIndex);\n String url = line.substring (rightBracketIndex + 1);\n lineDelete (line.length() - textIndex);\n lineInsert (\"<a alias=\\\"\" + alias + \"\\\" href=\\\"\" + url + \"\\\"> </a>\");\n }\n }\n\n // If no other instructions, use default start for a new line\n if (blockMod.length() <= 0 \n && listChars.length() <= 0\n & (! linkAlias)) {\n // This non-blank line does not start with a block modifier or a list char\n if (context.lastLineBlank) {\n if (context.nextBlock.equals (\"bq\")) {\n lineInsert (\"<p>\");\n } else {\n closeOpenBlockQuote();\n lineInsert (\"<\" + context.nextBlock + \">\");\n }\n } else {\n lineInsert (\"<br />\");\n }\n }\n\n // Now examine the rest of the line\n char last = ' ';\n char c = ' ';\n char next = ' ';\n leftParenPartOfURL = false;\n resetLineIndexArray();\n while (textIndex <= line.length()) {\n // Get current character, last character and next character\n last = c;\n if (textIndex < line.length()) {\n c = textChar();\n } else {\n c = ' ';\n }\n if ((textIndex + 1) < line.length()) {\n next = line.charAt (textIndex + 1);\n } else {\n next = ' ';\n }\n \n // ?? means a citation\n if (c == '?' && last == '?') {\n if (ix [CITATION] >= 0) {\n replaceWithHTML (CITATION, 2);\n } else {\n ix [CITATION] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // __ means italics\n if (c == '_' && last == '_' && ix [QUOTE_COLON] < 0) {\n if (ix [ITALICS] >= 0) {\n replaceWithHTML (ITALICS, 2);\n } else {\n ix [ITALICS] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // ** means bold\n if (c == '*' && last == '*') {\n if (ix [BOLD] >= 0) {\n replaceWithHTML (BOLD, 2);\n } else {\n ix [BOLD] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // _ means emphasis\n if (c == '_' && next != '_' && ix [QUOTE_COLON] < 0) {\n if (ix [EMPHASIS] >= 0) {\n replaceWithHTML (EMPHASIS, 1);\n } else {\n ix [EMPHASIS] = textIndex;\n textIndex++;\n }\n }\n else\n // * means strong\n if (c == '*' && next != '*') {\n if (ix [STRONG] >= 0) {\n replaceWithHTML (STRONG, 1);\n } else {\n ix [STRONG] = textIndex;\n textIndex++;\n }\n }\n else\n // Exclamation points surround image urls\n if (c == '!' && Character.isLetter(next)\n && ix [QUOTE_COLON] < 0 && ix [EXCLAMATION] < 0) {\n // First exclamation point : store its location and move on\n ix [EXCLAMATION] = textIndex;\n textIndex++;\n }\n else\n // Second exclamation point\n if (c == '!'\n && ix [QUOTE_COLON] < 0 && ix [EXCLAMATION] >= 0) {\n // Second exclamation point\n imageTitle = \"\";\n endOfImageURL = textIndex;\n if (last == ')' && ix [EXCLAMATION_LEFT_PAREN] > 0) {\n ix [EXCLAMATION_RIGHT_PAREN] = textIndex - 1;\n endOfImageURL = ix [EXCLAMATION_LEFT_PAREN];\n imageTitle = line.substring\n (ix [EXCLAMATION_LEFT_PAREN] + 1, ix [EXCLAMATION_RIGHT_PAREN]);\n }\n imageURL = line.substring (ix [EXCLAMATION] + 1, endOfImageURL);\n // Delete the image url, title and parentheses,\n // but leave exclamation points for now.\n lineDelete (ix [EXCLAMATION] + 1, textIndex - ix [EXCLAMATION] - 1);\n String titleString = \"\";\n if (imageTitle.length() > 0) {\n titleString = \" title=\\\"\" + imageTitle + \"\\\" alt=\\\"\" + imageTitle + \"\\\"\";\n }\n lineInsert (ix [EXCLAMATION] + 1,\n \"<img src=\\\"\" + imageURL + \"\\\"\" + titleString + \" />\");\n if (next == ':') {\n // Second exclamation followed by a colon -- look for url for link\n ix [QUOTE_COLON] = textIndex;\n ix [LAST_QUOTE] = ix [EXCLAMATION];\n } else {\n lineDelete (ix [EXCLAMATION], 1);\n lineDelete (textIndex, 1);\n }\n ix [EXCLAMATION] = -1;\n ix [EXCLAMATION_LEFT_PAREN] = -1;\n ix [EXCLAMATION_RIGHT_PAREN] = -1;\n textIndex++;\n } // end if second exclamation point\n else\n // Parentheses within exclamation points enclose the image title\n if (c == '(' && ix [EXCLAMATION] > 0 ) {\n ix [EXCLAMATION_LEFT_PAREN] = textIndex;\n textIndex++;\n }\n else\n // Double quotation marks surround linked text\n if (c == '\"' && ix [QUOTE_COLON] < 0) {\n if (next == ':'\n && ix [LAST_QUOTE] >= 0\n && textIndex > (ix [LAST_QUOTE] + 1)) {\n ix [QUOTE_COLON] = textIndex;\n } else {\n ix [LAST_QUOTE] = textIndex;\n }\n textIndex++;\n }\n else\n // Flag a left paren inside of a url\n if (c == '(' && ix [QUOTE_COLON] > 0) {\n leftParenPartOfURL = true;\n textIndex++;\n }\n else\n // Space may indicate end of url\n if (Character.isWhitespace (c)\n && ix [QUOTE_COLON] > 0\n && ix [LAST_QUOTE] >= 0\n && textIndex > (ix [QUOTE_COLON] + 2)) {\n int endOfURL = textIndex - 1;\n // end of url is last character of url\n // do not include any trailing punctuation at end of url\n int backup = 0;\n while ((endOfURL > (ix [QUOTE_COLON] + 2))\n && (! Character.isLetterOrDigit (line.charAt(endOfURL)))\n && (! ((line.charAt(endOfURL) == ')') && (leftParenPartOfURL)))\n && (! (line.charAt(endOfURL) == '/'))) {\n endOfURL--;\n backup++;\n }\n String url = line.substring (ix [QUOTE_COLON] + 2, endOfURL + 1);\n // insert the closing anchor tag\n lineInsert (endOfURL + 1, \"</a>\");\n // Delete the quote, colon and url from the line\n lineDelete (ix [QUOTE_COLON], endOfURL + 1 - ix [QUOTE_COLON]);\n // insert the beginning of the anchor tag\n lineDelete (ix [LAST_QUOTE], 1);\n lineInsert (ix [LAST_QUOTE], \"<a href=\\\"\" + url + \"\\\">\");\n // Reset the pointers\n ix [QUOTE_COLON] = -1;\n ix [LAST_QUOTE] = -1;\n leftParenPartOfURL = false;\n // Increment the index to the next character\n if (backup > 0) {\n textIndex = textIndex - backup;\n } else {\n textIndex++;\n }\n }\n else\n // Look for start of definition\n if ((c == ':' || c == ';')\n && Character.isWhitespace(last)\n && Character.isWhitespace(next)\n && listChars.length() > 0\n && (lastDefChar == ';' || lastDefChar == ':')) {\n lineDelete (textIndex - 1, 3);\n lineInsert (closeDefinitionTag (lastDefChar)\n + openDefinitionTag (c));\n lastDefChar = c;\n }\n /* else\n // -- means an em dash\n if (c == '-' && last == '-') {\n textIndex--;\n lineDelete (2);\n lineInsert (\"&#8212;\");\n } */ else {\n textIndex++;\n }\n }// end while more characters to examine\n\n context.lastLineBlank = false;\n\n }", "@Test\n\tpublic void h2_header_test() {\n\t\tString text = \"## heading2\";\n\t\tassertEquals(\"<html><h2>heading2</h2></html>\", createHTML(text));\n\t}", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "private HTMLElement generateIntroHTML(IntroHTML element, int indentLevel) {\n \t\tif (element.isInlined())\n \t\t\treturn generateInlineIntroHTML(element, indentLevel);\n \t\telse\n \t\t\treturn generateEmbeddedIntroHTML(element, indentLevel);\n \t}", "String extractContentFromDocument(BotswanaCourtDocument bcd, String htmlfile,int startpage,int endpage){\n\t\t//dom tree structured in two formats example for 1st format(47-98) USA.1947.002 and for 2nd format(1998.25 - 2013) USA.2000.003\n\t\tDocument document = null;\n\t\tFile input = new File(htmlfile);\n\t\tString textContent = null;\n\t \t\n\t\tif( htmlfile == null ){\n\t\t\tSystem.out.println(\"File name is not valid\");\n\t\t}\n\t\telse{\n\t\t\ttry{\n\t\t\t\tdocument = Jsoup.parse(input,\"UTF-8\");\n\t\t\t\tString htmlText = document.body().toString();\n\t\t\t\tString textToBeExtracted = document.select(\"title\").text();\n\t \tSystem.out.println(\"text extracted =\"+textToBeExtracted);\n\t \t\n\t \t\n\t \tPattern pattern = Pattern.compile(\"\\\\((.*?)\\\\)\");\n\t \tMatcher matcher = pattern.matcher(textToBeExtracted);\n\t \tArrayList<String> matchedDataArray = new ArrayList<String>();\n\t \twhile(matcher.find()){\n\t \t\tmatchedDataArray.add(matcher.group());\n\t \t}\n\t \tif(matchedDataArray.size()>0){\n\t \t\tint firstIndex = textToBeExtracted.indexOf(matchedDataArray.get(matchedDataArray.size()-2)); \n\t\t \tif(firstIndex == -1){\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t\t \t}\n\t\t \telse{\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted.substring(0,firstIndex-1));\n\t\t \t}\n\t\t \tbcd.setDecisionDate( matchedDataArray.get(matchedDataArray.size()-1));\n\t\t \tbcd.setCaseId(matchedDataArray.get(matchedDataArray.size()-2));\n\t\t \t\n\t \t}\n\t \telse{\n\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t \t\tbcd.setDecisionDate(\"\");\n\t\t \tbcd.setCaseId(\"\");\n\t \t}\n\t \t\n//\t \tint indexOfParticipantsEnd = textToBeExtracted.indexOf(\"[\");\n//\t \tString participantsName = textToBeExtracted.substring(0,indexOfParticipantsEnd-1);\n//\t \tbcd.setParticipantsName(participantsName);\n//\t \t\n//\t \tint indexOfDateStart = textToBeExtracted.indexOf(\"(\");\n//\t \tint indexOfDateEnd = textToBeExtracted.indexOf(\")\");\n//\t \tString decideDate = textToBeExtracted.substring(indexOfDateStart+1, indexOfDateEnd-1);\n//\t \tbcd.setDecisionDate(decideDate);\n//\t \t\n//\t \t\n//\t \tString caseIDPatternString = \"SC ([0-9]+/[0-9]+|CRI [0-9]+/[0-9]+)\";\n//\t \tPattern caseidPattern = Pattern.compile(caseIDPatternString);\n//\t \tMatcher caseidMatcher = caseidPattern.matcher(htmlText);\n//\t \t\n//\t \tString caseID =\"\";\n//\t \twhile (caseidMatcher.find()) {\n//\t \t\tcaseID = caseidMatcher.group();\n//\t \t \n//\t \t}\n//\t \tbcd.setCaseId(caseID);\n\t \t\n\t \ttextContent = htmlText;\n\t \t\n\t \t\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tSystem.out.println(\"Error in parsing html : \" + e.getMessage());\n\t \t}\n\t\t}\n\t\treturn textContent;\n\t}", "@Override\r\n\tpublic String textOnPage(EnumContent content, int p){\n\t\tif(stack == null)\r\n\t\t\tstack = new ItemStack(ItemRegistry.nomadSack);\r\n\t\tif(con == null)\r\n\t\t\tcon = RecipeRegistry.getRecipreFor(new ItemStack(BlockRegistry.nest));\r\n\t\tString s = \"\";\r\n\t\tswitch(p){\r\n\t\tcase 0:\r\n\t\t\ts += \"The nomads wanted to protect their insects so they built \"\r\n\t\t\t + \"nests. They soon noticed that the insects thanked them by \"\r\n\t\t\t + \"working the envoirment in their favor. All the insects \"\r\n\t\t\t + \"have their own way to help the nomads. What is intressting \"\r\n\t\t\t + \"is the sleep they enter when there is no help to be given. \";\r\n\t\t\tbreak;\r\n\t\tcase 1: //Sodium acetate, Cara Rot (Carrot), Elle D'berry (Elderberry), Rabarberpaj... Carla & Fleur (Cauliflower)\r\n\t\t\ts += KnowledgeDescriptions.getDisplayName(con) + \"\\n\\n\";\r\n\t\t\ts += \" ~ Structure ~\\n\";\r\n\t\t\ts += KnowledgeDescriptions.getStructure(con);\r\n\t\t\ts += \" ~ Creation ~\\n\\n\";\r\n\t\t\ts += KnowledgeDescriptions.getResult(con);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public static String getElementText(Element e) {\n\t\tString text = e.getText();\n\t\tfor (int i = 1; i < 10; i++) {\n\t\t\tString n = Integer.toString(i);\n\t\t\tString link = e.attributeValue(\"link\" + n);\n\t\t\tString url = e.attributeValue(\"url\" + n);\n\t\t\tString style = e.attributeValue(\"style\" + n);\n\n\t\t\tif (link == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttext = applyMarkup(text, link, url, style);\n\t\t}\n\t\treturn text;\n\t}", "public static String removeHTML(String str) {\n return removeHTML(str, true);\n }", "protected void content(String text) {\n // small hack due to DOXIA-314\n String txt = escapeHTML(text);\n txt = StringUtils.replace(txt, \"&amp;#\", \"&#\");\n write(txt);\n }", "protected void markup( String text, boolean useIdent )\n {\n if ( useIdent )\n {\n // Very dirty hack to avoid opening space if this line start with inline raw HTML\n // (needs to be separated from surrounding text by one space)\n text = text.replaceAll( \"^\\\\s\", \"\" );\n }\n\n int spaces = useIdent ? indent * INDENT_SPACES : 0;\n String[] lines = text.split( NEW_LINE );\n\n for ( int i = 0; i < lines.length; ++i )\n {\n rst += StringUtils.repeat( \" \", spaces ) + lines[i];\n\n // Do not write a new line character if this is the last line of the markup\n if ( i < ( lines.length - 1 ) )\n {\n newLine();\n }\n }\n\n lastLineLength = lines[lines.length - 1].length();\n }", "public void firstSem10a(){\n chapter = \"firstSem10a\";\n String firstSem10a = \"There's a commotion outside your room - your door looks like it's been smashed down, and your RA is standing outside, looking \" +\n \"distressed. You can hear a shout from inside - your roommate - and sounds of a struggle. \\\"Get in there and help!\\\" you shout to the RA, \" +\n \"but he just shakes his head. \\\"Sorry, I can't. I'm anti-violence. You can't fight hate with hate, you know.\\\"\\tPushing past him, you \" +\n \"run into your room to see your roommate grappling with a large beast. THE beast. It is real. What do you want to do?\";\n getTextIn(firstSem10a);\n }", "private void setTexto() {\n textViewPolitica.setText(Html.fromHtml(politica));\n }", "public HtmlHolder (@Nonnull final Id id)\n {\n super(id);\n addAttribute(\"style\", NW + id.stringValue());\n setMimeType(\"text/html\");\n }", "@Override\n\tpublic void beforeGetText(WebElement arg0, WebDriver arg1) {\n\n\t}", "private boolean containsHtml(final String str) {\n if (str == null)\n return false;\n return str.indexOf('<') != -1 || str.indexOf('&') != -1;\n }", "public String ProcessHTMLPage(String url) {\n\t\tString htmlSource = null;\n\t\tSystem.out.println(\"processing ..\" + url);\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\ttry {\n\t\t\thtmlSource = getURLSource(url);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDocument document = Jsoup.parse(htmlSource);\n\n\t\torg.jsoup.select.Elements allElements = document.getAllElements();\n\t\tfor (Element element : allElements) {\n\t\t\tif (element.nodeName().matches(\n\t\t\t\t\t\"^.*(p|h1|h2|h3|h4|h5|h6|title|body|li|a|em|i|ins|big|bdo|b|blockquote|center|mark|small|string|sub|sup|tt|u).*$\")) {\n\t\t\t\tif (!element.ownText().isEmpty()) {\n\t\t\t\t\t// System.out.println(element.nodeName()\n\t\t\t\t\t// + \" \" + element.ownText());\n\t\t\t\t\tstringBuilder.append(element.ownText());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\n\t}", "@Test\n public void testHelloEmptyTrail()\n {\n driver.get(\"https://cs1632ex.herokuapp.com/hello//\");\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Hello CS1632, from !\"));\n }", "public void setTextDivCreacionRegistro(String text) { doSetText(this.$element_DivCreacionRegistro, text); }", "private String renderSpecific( String strHTML )\n {\n String strRender = strHTML;\n strRender = strRender.replaceAll( \"\\\\[lt;\", \"&lt;\" );\n strRender = strRender.replaceAll( \"\\\\[gt;\", \"&gt;\" );\n strRender = strRender.replaceAll( \"\\\\[nbsp;\", \"&nbsp;\" );\n strRender = strRender.replaceAll( \"\\\\[quot;\", \"&quot;\" );\n strRender = strRender.replaceAll( \"\\\\[amp;\", \"&amp;\" );\n strRender = strRender.replaceAll( \"\\\\[hashmark;\", \"#\" );\n\n if ( _strPageUrl != null )\n {\n strRender = strRender.replaceAll( \"#page_url\", _strPageUrl );\n }\n\n return strRender;\n }", "public String getHtmlDescription() {\n\t\treturn null;\n\t}", "public void testBlogEntryHasTagsAndMediaIsHtml() throws Exception {\n Category category = new Category(\"/java\", \"Java\");\n category.setBlog(blog);\n category.setTags(\"java\");\n blogEntry.addCategory(category);\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n blogEntry.setTags(\"junit, automated unit testing\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n tags.append(\"<div class=\\\"tags\\\"><span>Technorati Tags : </span>\");\n tags.append(\"<a href=\\\"http://technorati.com/tag/automatedunittesting\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">automatedunittesting</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">java</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">junit</a>\");\n tags.append(\"</div>\");\n\n assertEquals(\"Excerpt - here is some text\" + tags, blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\" + tags, blogEntry.getBody());\n }", "public void firstSem2a6(){\n chapter = \"firstSem2a6\";\n String firstSem2a6 = \"\\\"Well? Are we friends, like that guy said?\\\"\";\n getTextIn(firstSem2a6);\n }", "private String removeHTML(String word) {\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\tString temp = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<word.length();i++) {\r\n\t\t\tchar character = word.charAt(i);\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(word.charAt(i) == '<') {\r\n\t\t\t\tstartFlag = true;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(startFlag == true) {\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//System.out.println(word.charAt(i)+\" Removed\");\r\n\t\t\t\t//end bracket > found so we can continue to add now \r\n\t\t\t\tif(character == '>') {\r\n\t\t\t\t\tstartFlag = false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\t\r\n\t\t\t\tif(i == 0) {\t\t\t\t\r\n\t\t\t\t\tresult = Character.toString(character);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult += character;\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t\t\r\n\t\t}\t\r\n\t\t\ttemp = result;\r\n\t\t\treturn temp;\t\t \r\n\t\t\r\n\t}", "public String getPlainText(Element element) {\n FormattingVisitor formatter = new FormattingVisitor();\n NodeTraversor.traverse(formatter, element);\n\n return formatter.toString().trim();\n }", "private String removeHTMLTags(final String lineToFix) {\n String fixedLine = lineToFix;\n\n fixedLine = fixedLine.replaceAll(\"<b>\", \"\");\n fixedLine = fixedLine.replaceAll(\"</b>\", \"\");\n fixedLine = fixedLine.replaceAll(\"<i>\", \"\");\n fixedLine = fixedLine.replaceAll(\"</i>\", \"\");\n fixedLine = fixedLine.replaceAll(\"<br>\", \"\");\n fixedLine = fixedLine.replaceAll(\"<br />\", \"\");\n\n return fixedLine;\n }", "public URL getHtmlDescription();", "public String convertMarkupToHTML(String text) {\n return text;\n }", "private Spanned getRichText(String htmlText) {\n Spanned richText;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n richText = Html.fromHtml(htmlText, Html.FROM_HTML_MODE_LEGACY);\n } else {\n richText = Html.fromHtml(htmlText);\n }\n return richText;\n }", "public static String removeHTML(String str, boolean addSpace) {\n if (str == null) return \"\";\n StringBuffer ret = new StringBuffer(str.length());\n int start = 0;\n int beginTag = str.indexOf(\"<\");\n int endTag = 0;\n if (beginTag == -1)\n return str;\n \n while (beginTag >= start) {\n if (beginTag > 0) {\n ret.append(str.substring(start, beginTag));\n \n // replace each tag with a space (looks better)\n if (addSpace) ret.append(\" \");\n }\n endTag = str.indexOf(\">\", beginTag);\n \n // if endTag found move \"cursor\" forward\n if (endTag > -1) {\n start = endTag + 1;\n beginTag = str.indexOf(\"<\", start);\n }\n // if no endTag found, get rest of str and break\n else {\n ret.append(str.substring(beginTag));\n break;\n }\n }\n // append everything after the last endTag\n if (endTag > -1 && endTag + 1 < str.length()) {\n ret.append(str.substring(endTag + 1));\n }\n return ret.toString().trim();\n }", "@Test\n\tpublic void h2_header_italic_test() {\n\t\tString text = \"## *heading2*\";\n\t\tassertEquals(\"<html><h2><em>heading2</em></h2></html>\", createHTML(text));\n\t}", "private HTMLElement generateEmbeddedIntroHTML(IntroHTML element,\n \t\t\tint indentLevel) {\n \t\tHTMLElement objectElement = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_OBJECT, indentLevel, true);\n \t\tobjectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_TYPE,\n \t\t\t\tIIntroHTMLConstants.OBJECT_TYPE);\n \t\tif (element.getId() != null)\n \t\t\tobjectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_ID,\n \t\t\t\t\telement.getId());\n \t\tif (element.getSrc() != null)\n \t\t\tobjectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_DATA,\n \t\t\t\t\telement.getSrc());\n \t\t// The alternative content is added in case the browser can not render\n \t\t// the specified content\n \t\tif (element.getText() != null) {\n \t\t\tHTMLElement text = generateTextElement(\n \t\t\t\t\tIIntroHTMLConstants.ELEMENT_PARAGRAPH, null,\n \t\t\t\t\tIIntroHTMLConstants.SPAN_CLASS_TEXT, element.getText(),\n \t\t\t\t\tindentLevel);\n \t\t\tif (text != null)\n \t\t\t\tobjectElement.addContent(text);\n \t\t}\n \t\tif (element.getIntroImage() != null) {\n \t\t\tHTMLElement img = generateIntroImage(element.getIntroImage(),\n \t\t\t\t\tindentLevel);\n \t\t\tif (img != null)\n \t\t\t\tobjectElement.addContent(img);\n \t\t}\n \t\treturn objectElement;\n \t}", "public void firstSem2b(){\n chapter = \"firstSem2b\";\n String firstSem2b = \"You decide that you'd better stay here and unpack, so your roommate goes ahead without you. In\" +\n \" no time at all, you've got everything arranged like you want it - the strand of Christmas lights, the band \" +\n \"posters, the pictures of you and your high school friends being cool. You decide you'd better go grab some food, \" +\n \"so you walk outside into the sunlight. Look around?\\t\";\n getTextIn(firstSem2b);\n }", "public IndicadoresEficaciaHTML(IndicadoresEficaciaHTML src) {\n/* 181 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 183 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 185 */ syncAccessMethods();\n/* */ }", "@DISPID(-2147417086)\n @PropGet\n java.lang.String innerHTML();", "public static String extractHTML(String str) {\n if (str == null) return \"\";\n StringBuffer ret = new StringBuffer(str.length());\n int start = 0;\n int beginTag = str.indexOf(\"<\");\n int endTag = 0;\n if (beginTag == -1)\n return str;\n \n while (beginTag >= start) {\n endTag = str.indexOf(\">\", beginTag);\n \n // if endTag found, keep tag\n if (endTag > -1) {\n ret.append( str.substring(beginTag, endTag+1) );\n \n // move start forward and find another tag\n start = endTag + 1;\n beginTag = str.indexOf(\"<\", start);\n }\n // if no endTag found, break\n else {\n break;\n }\n }\n return ret.toString();\n }", "public AdmClientePreferencialHTML(DocumentLoader loader) { this(loader, true); }", "ElementText createElementText();", "private void commonLoadTestForHtml(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n waitForText(RESULTS_CONTAINER, \"id=news\");\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Previous\n\t\tWebElement previous = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['title']\\\"}\");\n\n\t\tWebElement previousDiscIcon = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\n\t\tAssert.assertNotNull(previousDiscIcon);\n\n\t\t//Click on Previous Node\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\t\tpreviousDiscIcon.click();\n\n\t\t//Find the children of previous node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of previous node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#daysback2']['title']\\\"}\");\n\n\n\n\n\t}", "private static String removeVisibleHTMLTags(String str) {\n str = stripLineBreaks(str);\n StringBuffer result = new StringBuffer(str);\n StringBuffer lcresult = new StringBuffer(str.toLowerCase());\n \n // <img should take care of smileys\n String[] visibleTags = {\"<img\"}; // are there others to add?\n int stringIndex;\n for ( int j = 0 ; j < visibleTags.length ; j++ ) {\n while ( (stringIndex = lcresult.indexOf(visibleTags[j])) != -1 ) {\n if ( visibleTags[j].endsWith(\">\") ) {\n result.delete(stringIndex, stringIndex+visibleTags[j].length() );\n lcresult.delete(stringIndex, stringIndex+visibleTags[j].length() );\n } else {\n // need to delete everything up until next closing '>', for <img for instance\n int endIndex = result.indexOf(\">\", stringIndex);\n if (endIndex > -1) {\n // only delete it if we find the end! If we don't the HTML may be messed up, but we\n // can't safely delete anything.\n result.delete(stringIndex, endIndex + 1 );\n lcresult.delete(stringIndex, endIndex + 1 );\n }\n }\n }\n }\n \n // TODO: This code is buggy by nature. It doesn't deal with nesting of tags properly.\n // remove certain elements with open & close tags\n String[] openCloseTags = {\"li\", \"a\", \"div\", \"h1\", \"h2\", \"h3\", \"h4\"}; // more ?\n for (int j = 0; j < openCloseTags.length; j++) {\n // could this be better done with a regular expression?\n String closeTag = \"</\"+openCloseTags[j]+\">\";\n int lastStringIndex = 0;\n while ( (stringIndex = lcresult.indexOf( \"<\"+openCloseTags[j], lastStringIndex)) > -1) {\n lastStringIndex = stringIndex;\n // Try to find the matching closing tag (ignores possible nesting!)\n int endIndex = lcresult.indexOf(closeTag, stringIndex);\n if (endIndex > -1) {\n // If we found it delete it.\n result.delete(stringIndex, endIndex+closeTag.length());\n lcresult.delete(stringIndex, endIndex+closeTag.length());\n } else {\n // Try to see if it is a self-closed empty content tag, i.e. closed with />.\n endIndex = lcresult.indexOf(\">\", stringIndex);\n int nextStart = lcresult.indexOf(\"<\", stringIndex+1);\n if (endIndex > stringIndex && lcresult.charAt(endIndex-1) == '/' && (endIndex < nextStart || nextStart == -1)) {\n // Looks like it, so remove it.\n result.delete(stringIndex, endIndex + 1);\n lcresult.delete(stringIndex, endIndex + 1);\n \n }\n }\n }\n }\n \n return result.toString();\n }", "public String cleanHtmlTextForPlayer(String unrefinedHtmlText) {\n\n String figureRemove = replaceAllCharacter(unrefinedHtmlText, ConstantUtil.HTML_EXTRACT_FIGURE_REGEX, ConstantUtil.BLANK);\n String figcaptionRemove = replaceAllCharacter(figureRemove, ConstantUtil.HTML_EXTRACT_FIGCAPTION_REGEX, ConstantUtil.BLANK);\n String almostRefinedText = figcaptionRemove.replaceAll(ConstantUtil.HTML_EXTRACT_IMG_REGEX, ConstantUtil.BLANK);\n return almostRefinedText;\n\n }", "protected Text text(String content){\n\t\treturn doc.createTextNode(content);\n\t}", "private static void appendAutoTextEntry(GlossaryDocument glossaryDoc, String name, String contents) {\n BuildingBlock buildingBlock = new BuildingBlock(glossaryDoc);\n buildingBlock.setName(name);\n buildingBlock.setGallery(BuildingBlockGallery.AUTO_TEXT);\n buildingBlock.setCategory(\"General\");\n buildingBlock.setBehavior(BuildingBlockBehavior.PARAGRAPH);\n\n Section section = new Section(glossaryDoc);\n section.appendChild(new Body(glossaryDoc));\n section.getBody().appendParagraph(contents);\n buildingBlock.appendChild(section);\n\n glossaryDoc.appendChild(buildingBlock);\n }", "private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }", "public String getHtmlDescription() {\n\t\treturn \"http://prom.win.tue.nl/research/wiki/online/redesign\";\n\t}", "private void setHtmlText(final MimeMultipart related, final MimeMultipart alternative, final String body)\n throws MessagingException {\n // Plain text\n final BodyPart plainText = new MimeBodyPart();\n plainText.setContent(HtmlToText(body), \"text/plain; \" + CHARSET);\n alternative.addBodyPart(plainText);\n // Html text ou Html text + images incluses\n final BodyPart htmlText = new MimeBodyPart();\n htmlText.setContent(body, \"text/html; \" + CHARSET);\n if (0 != related.getCount()) {\n related.addBodyPart(htmlText, 0);\n final MimeBodyPart tmp = new MimeBodyPart();\n tmp.setContent(related);\n alternative.addBodyPart(tmp);\n } else {\n alternative.addBodyPart(htmlText);\n }\n }", "@Test(groups = { \"tree\" })\n\tpublic void testLoadViaInlineHtml() throws Exception {\n\t\t\tstartupTest(\"treeLoadViaInlineHtml.html\",null);\n\n\t\t\t//Verify the url\n\t\t\tString url = getBrowserUrl();\n\t\t\tlog(\"URL##########\"+ url);\n\n\t\t\t// Verify if the title of the page is correct\n\t\t\tverifyTitle(\"Incorrect page title;\", TITLE_INLINEHTML);\n\t\t\tcheckPageContent(TITLE_INLINEHTML);\n\n\t\t\t//Find the tree element\n\t\t\tWebElement tree = getElement(\"id=tree\");\n\t\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t\tcommonLoadTestForHtml();\n\n }", "@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "public void loadxml ()\n\t{\n\t\t\t\tString [] kategorienxml;\n\t\t\t\tString [] textbausteinexml;\n\t\t\t\tString [] textexml;\n\t\t\t\t\n\t\t\t\tString filenamexml = \"Katalogname_gekuerzt_lauffaehig-ja.xml\";\n\t\t\t\tFile xmlfile = new File (filenamexml);\n\t\t\t\t\n\t\t\t\t// lies gesamten text aus: String gesamterhtmlcode = \"\";\n\t\t\t\tString gesamterhtmlcode = \"\";\n\t\t\t\tString [] gesamtertbarray = new String[1001];\n\t\t BufferedReader inx = null;\n\t\t try {\n\t\t inx = new BufferedReader(new FileReader(xmlfile));\n\t\t String zeilex = null;\n\t\t while ((zeilex = inx.readLine()) != null) {\n\t\t \tSystem.out.println(zeilex + \"\\n\");\n\t\t \tRandom rand = new Random();\n\t\t \tint n = 0;\n\t\t \t// Obtain a number between [0 - 49].\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.End\\\"/>\")) // dann ab hier speichern bis zum ende:\n\t\t \t{\n\t\t \t\t// \terstelle neue random zahl und speichere alle folgenden zeilen bis zum .Start in diesen n rein\n\t\t \t\tn = rand.nextInt(1001);\n\n\t\t \t\t\n\t\t \t}\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n] + zeilex;\n\t\t \tFile f = new File (\"baustein_\"+ n + \".txt\");\n\t\t \t\n\t\t \tFileWriter fw = new FileWriter (f);\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\\\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\\\"\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/></w:rPr><w:r><w:rPr><w:rStyle w:val=\\\"T8\\\"/></w:rPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\t\t \t<w:rStyle\" , \"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:p>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:pStyle w:val=\\\"_37_b._20_Text\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr><w:r><w:t>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:r><w:rPr><w:rStyle\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\\\"><w:pPr></\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:pPr><w:r>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"compatible:1.0\\\"><w:pPr></w:pPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:p><w:p\",\"\");\n\t\t \n\n\t\t \t\n\n\t\t \tfw.write(gesamtertbarray[n]);\n\t\t \tfw.flush();\n\t\t \tfw.close();\n\t\t \t\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.Start\\\"))\"))\n \t\t\t{\n\t\t \t\t// dann erhöhe speicher id für neue rand zahl, weil ab hier ist ende des vorherigen textblocks;\n\t\t\t \tn = rand.nextInt(1001);\n \t\t\t}\n\t\t \n\t\t }}\n\t\t \tcatch (Exception s)\n\t\t {}\n\t\t \n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t}", "public String tagger(String textDariWebsite){\n String[] splitter = textDariWebsite.split(\"\\n\");\n\n\n String textWithTag = \"\";\n for(int i = 0; i < splitter.length; i++){\n String hasilNer = sentenceTagger.addNer(splitter[i]);\n textWithTag += hasilNer;\n textWithTag += \"\\n\";\n }\n\n return textWithTag;\n }", "public String stripHtml(String content) {\n\n System.out.println(content);\n\n // <p>段落替换为换行\n content = content.replaceAll(\"</p>\", \"tabstr\");\n // <br><br/>替换为换行\n content = content.replaceAll(\"<br/>\", \"tabstr\");\n // 去掉其它的<>之间的东西\n content = content.replaceAll(\"\\\\<.*?>\", \"\");\n content = content.replaceAll(\"(&nbsp;){3,}\", \" \");\n content = content.replaceAll(\"(&nbsp;){2,}\", \" \");\n content = content.replaceAll(\"&nbsp;\", \" \");\n System.out.println(content);\n\n return content;\n }", "private void replaceWithHTML (int tagType, int numberOfChars) {\n\n lineDelete (ix [tagType], numberOfChars);\n lineInsert (ix [tagType], \"<\" + html [tagType] + \">\");\n if (numberOfChars > 1) {\n textIndex--;\n }\n lineDelete (numberOfChars);\n lineInsert (\"</\" + html [tagType] + \">\");\n resetLineIndex (tagType);\n }", "private HTMLElement generateHTMLElement() {\n \t\t// this is the outermost element, so it has no indent\n \t\tint indentLevel = 0;\n \t\tHTMLElement html = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_HTML, indentLevel, true);\n \t\tHTMLElement head = generateHeadElement(indentLevel + 1);\n \t\tHTMLElement body = generateBodyElement(indentLevel + 1);\n \t\thtml.addContent(head);\n \t\thtml.addContent(body);\n \t\treturn html;\n \t}", "protected String completeHtml(String data) {\n if (data.indexOf(\"<html>\") == -1) {\n\t\t\tdata = \"<html><head></head><body style='margin:0;padding:0;'>\"\n\t\t\t\t\t+ data + \"</body></html>\";\n }\n\n\t\treturn data;\n\t}" ]
[ "0.57917", "0.5734547", "0.5600263", "0.5542198", "0.5335907", "0.5314978", "0.5314243", "0.5295824", "0.5287962", "0.5265459", "0.5240888", "0.523576", "0.5199914", "0.5170027", "0.51694447", "0.51660323", "0.5155635", "0.51385444", "0.51377887", "0.51304096", "0.51295835", "0.51293296", "0.51260346", "0.5125607", "0.51213634", "0.5119986", "0.51100963", "0.5106745", "0.5099782", "0.5094451", "0.50860256", "0.5077796", "0.50697255", "0.5068385", "0.50638396", "0.5046141", "0.50364363", "0.5027298", "0.5026454", "0.5023151", "0.5021603", "0.50041795", "0.500167", "0.4975632", "0.49701", "0.49589956", "0.49536088", "0.49505842", "0.49467164", "0.49370018", "0.49340457", "0.49236238", "0.49114907", "0.4907241", "0.4898554", "0.4891312", "0.4888717", "0.48863676", "0.48858118", "0.48812136", "0.48692286", "0.48675603", "0.486734", "0.48664683", "0.48626733", "0.48621652", "0.48509306", "0.48405778", "0.48309755", "0.48254758", "0.48252922", "0.48243013", "0.48208535", "0.4820788", "0.4818313", "0.4812821", "0.48087972", "0.47916436", "0.47900212", "0.47880536", "0.47868663", "0.47836667", "0.47791412", "0.47760576", "0.47704592", "0.476531", "0.47595897", "0.4757639", "0.4757339", "0.47566307", "0.47550392", "0.47535282", "0.47526997", "0.47449708", "0.47435555", "0.47311202", "0.47308093", "0.47291172", "0.47269207", "0.47103003", "0.46995577" ]
0.0
-1
Overi jestli je predany naparsovany html dokument menu webu whitebear. Overeni se provadi tak, ze clanek webu ma pevne danou strukturu. V jedinem nadpisu h1 na strance musi byt definovany text (v konstantni promenne tridy). Ve strance je jeden vyskyt elementu article, ten ma dva atributy id s obsahem main a class s obsahem wholePage. Ve strance je jeden element s id sixItems.
private boolean isMenuPage(Document parsed) { boolean isCorrect = false; Element heading = parsed.getElementById("heading"); if (heading == null) { return false; } if (heading.text().equals(DirectoryParser.HEADING_TEST_STRING)) { isCorrect = true; } Elements selected = parsed.getElementsByTag("article"); if (selected.size() != 1) { return false; } else { Attributes articleAttributes = selected.first().attributes(); if (articleAttributes.size() != 2) { return false; } if (articleAttributes.asList().contains(new Attribute("id", "main"))) { if ((articleAttributes.asList().contains(new Attribute("class", "wholePage")))) { isCorrect = true; } } } Element menu = parsed.getElementById("sixItems"); if (menu == null) { return false; } return isCorrect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}", "public void setTextElMenu(String text) { doSetText(this.$element_ElMenu, text); }", "public void setTextElMenu(String text) { doSetText(this.$element_ElMenu, text); }", "public void setTextElMenu(String text) { doSetText(this.$element_ElMenu, text); }", "@Test\n\tpublic void testListMainDish() {\n\t\tMenu menu = new Menu(\"Menu\");\n\t\tassertTrue(menu.getMainDishes().get(2).getName().equals(\"Entrecote\"));\n\t}", "IMenu getMainMenu();", "public HomePageHelper writeTextOfMenuCommands(){\n System.out.println (\"Quantity of elements: \" + menuCommands.size());\n for(WebElement el : menuCommands){\n System.out.println(\"Name of menu: \" + el.getText());\n }\n return this;\n }", "public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "public void readTheMenu();", "private static void printnews(final Loot li, final int newspaper) {\r\n if (!i.freeSpeech()) {\r\n i.offended.put(CrimeSquad.FIREMEN, true);\r\n }\r\n setView(R.layout.generic);\r\n if (li.id().equals(\"LOOT_CEOPHOTOS\")) // Tmp -XML\r\n {\r\n ui().text(\"The Liberal Guardian runs a story featuring photos of a major CEO\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(10)) {\r\n default:\r\n ui().text(\"engaging in lewd behavior with animals.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(15, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"digging up graves and sleeping with the dead.\").add();\r\n break;\r\n case 2:\r\n ui().text(\"participating in a murder.\").add();\r\n i.issue(Issue.POLICEBEHAVIOR).changeOpinion(15, 1, 100);\r\n i.issue(Issue.JUSTICES).changeOpinion(10, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"engaging in heavy bondage. A cucumber was involved in some way.\").add();\r\n break;\r\n case 4:\r\n ui().text(\"tongue-kissing an infamous dictator.\").add();\r\n break;\r\n case 5:\r\n ui().text(\"making out with an FDA official overseeing the CEO's products.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(10, 1, 100);\r\n i.issue(Issue.POLLUTION).changeOpinion(10, 1, 100);\r\n break;\r\n case 6:\r\n ui().text(\"castrating himself.\").add();\r\n break;\r\n case 7:\r\n ui().text(\"waving a Nazi flag at a supremacist rally.\").add();\r\n break;\r\n case 8:\r\n ui().text(\"torturing an employee with a hot iron.\").add();\r\n i.issue(Issue.LABOR).changeOpinion(10, 1, 100);\r\n break;\r\n case 9:\r\n ui().text(\"playing with feces and urine.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_CEOLOVELETTERS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring love letters from a major CEO\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(8)) {\r\n default:\r\n ui().text(\"addressed to his pet dog. Yikes.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(15, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"to the judge that acquit him in a corruption trial.\").add();\r\n i.issue(Issue.JUSTICES).changeOpinion(15, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"to an illicit gay lover.\").add();\r\n i.issue(Issue.GAY).changeOpinion(15, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"to himself. They're very steamy.\").add();\r\n break;\r\n case 4:\r\n ui().text(\"implying that he has enslaved his houseservants.\").add();\r\n i.issue(Issue.LABOR).changeOpinion(10, 1, 100);\r\n break;\r\n case 5:\r\n ui().text(\"to the FDA official overseeing the CEO's products.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(10, 1, 100);\r\n i.issue(Issue.POLLUTION).changeOpinion(10, 1, 100);\r\n break;\r\n case 6:\r\n ui().text(\"that seem to touch on every fetish known to man.\").add();\r\n break;\r\n case 7:\r\n ui().text(\"promising someone company profits in exchange for sexual favors.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_CEOTAXPAPERS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring a major CEO's tax papers\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(1)) {\r\n default:\r\n ui().text(\"showing that he has engaged in consistent tax evasion.\").add();\r\n i.issue(Issue.TAX).changeOpinion(25, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_CORPFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring Corporate files\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(newspaper * 10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(newspaper * 10, 1, 100);\r\n switch (i.rng.nextInt(5)) {\r\n default:\r\n ui().text(\"describing a genetic monster created in a lab.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(50, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"with a list of gay employees entitled \\\"Homo-workers\\\".\").add();\r\n i.issue(Issue.GAY).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"containing a memo: \\\"Terminate the pregnancy, I terminate you.\\\"\").add();\r\n i.issue(Issue.ABORTION).changeOpinion(50, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"cheerfully describing foreign corporate sweatshops.\").add();\r\n i.issue(Issue.LABOR).changeOpinion(50, 1, 100);\r\n break;\r\n case 4:\r\n ui().text(\"describing an intricate tax scheme.\").add();\r\n i.issue(Issue.TAX).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Corporations a little riled up.\").add();\r\n i.issue(Issue.CEOSALARY).changeOpinion(50, 1, 100);\r\n i.issue(Issue.CORPORATECULTURE).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CORPORATE, true);\r\n } else if (li.id().equals(\"LOOT_INTHQDISK\") || li.id().equals(\"LOOT_SECRETDOCUMENTS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring CIA and other intelligence files\")\r\n .add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(6)) {\r\n default:\r\n ui().text(\"documenting the overthrow of a government.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"documenting the planned assassination of a Liberal federal judge.\").add();\r\n i.issue(Issue.JUSTICES).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"containing private information on innocent citizens.\").add();\r\n break;\r\n case 3:\r\n ui().text(\"documenting \\\"harmful speech\\\" made by innocent citizens.\").add();\r\n i.issue(Issue.FREESPEECH).changeOpinion(50, 1, 100);\r\n break;\r\n case 4:\r\n ui().text(\"used to keep tabs on gay citizens.\").add();\r\n i.issue(Issue.GAY).changeOpinion(50, 1, 100);\r\n break;\r\n case 5:\r\n ui().text(\"documenting the infiltration of a pro-choice group.\").add();\r\n i.issue(Issue.ABORTION).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Government a little riled up.\").add();\r\n i.issue(Issue.PRIVACY).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CIA, true);\r\n } else if (li.id().equals(\"LOOT_POLICERECORDS\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring police records\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(6)) {\r\n default:\r\n ui().text(\"documenting human rights abuses by the force.\").add();\r\n i.issue(Issue.TORTURE).changeOpinion(15, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"documenting a police torture case.\").add();\r\n i.issue(Issue.TORTURE).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"documenting a systematic invasion of privacy by the force.\").add();\r\n i.issue(Issue.PRIVACY).changeOpinion(15, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"documenting a forced confession.\").add();\r\n break;\r\n case 4:\r\n ui().text(\"documenting widespread corruption in the force.\").add();\r\n break;\r\n case 5:\r\n ui().text(\"documenting gladiatorial matches held between prisoners by guards.\").add();\r\n i.issue(Issue.DEATHPENALTY).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n i.issue(Issue.POLICEBEHAVIOR).changeOpinion(50, 1, 100);\r\n } else if (li.id().equals(\"LOOT_JUDGEFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story with evidence of a Conservative judge\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(2)) {\r\n default:\r\n ui().text(\"taking bribes to acquit murderers.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"promising Conservative rulings in exchange for appointments.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n i.issue(Issue.JUSTICES).changeOpinion(50, 1, 100);\r\n } else if (li.id().equals(\"LOOT_RESEARCHFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring research papers\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(4)) {\r\n default:\r\n ui().text(\"documenting horrific animal rights abuses.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(50, 1, 100);\r\n break;\r\n case 1:\r\n ui().text(\"studying the effects of torture on cats.\").add();\r\n i.issue(Issue.ANIMALRESEARCH).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"covering up the accidental creation of a genetic monster.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(50, 1, 100);\r\n break;\r\n case 3:\r\n ui().text(\"showing human test subjects dying under genetic research.\").add();\r\n i.issue(Issue.GENETICS).changeOpinion(50, 1, 100);\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n } else if (li.id().equals(\"LOOT_PRISONFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring prison documents\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(4)) {\r\n default:\r\n ui().text(\"documenting human rights abuses by prison guards.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"documenting a prison torture case.\").add();\r\n i.issue(Issue.TORTURE).changeOpinion(50, 1, 100);\r\n break;\r\n case 2:\r\n ui().text(\"documenting widespread corruption among prison employees.\").add();\r\n break;\r\n case 3:\r\n ui().text(\"documenting gladiatorial matches held between prisoners by guards.\").add();\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n i.issue(Issue.DEATHPENALTY).changeOpinion(50, 1, 100);\r\n } else if (li.id().equals(\"LOOT_CABLENEWSFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring cable news memos\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(4)) {\r\n default:\r\n ui().text(\"calling their news 'the vanguard of Conservative thought'.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"mandating negative coverage of Liberal politicians.\").add();\r\n break;\r\n case 2:\r\n ui().text(\"planning to drum up a false scandal about a Liberal figure.\").add();\r\n break;\r\n case 3:\r\n ui().text(\"instructing a female anchor to 'get sexier or get a new job'.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Conservative masses a little riled up.\").add();\r\n i.issue(Issue.CABLENEWS).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.CABLENEWS, true);\r\n } else if (li.id().equals(\"LOOT_AMRADIOFILES\")) {\r\n ui().text(\"The Liberal Guardian runs a story featuring AM radio plans\").add();\r\n i.issue(Issue.LIBERALCRIMESQUAD).changeOpinion(10, 1, 100);\r\n i.issue(Issue.LIBERALCRIMESQUADPOS).changeOpinion(10, 1, 100);\r\n switch (i.rng.nextInt(3)) {\r\n default:\r\n ui().text(\"calling listeners 'sheep to be told what to think'.\").add();\r\n break;\r\n case 1:\r\n ui().text(\"saying 'it's okay to lie, they don't need the truth'.\").add();\r\n break;\r\n case 2:\r\n ui().text(\"planning to drum up a false scandal about a Liberal figure.\").add();\r\n break;\r\n }\r\n ui().text(\"The major networks and publications take it up and run it for weeks.\").add();\r\n ui().text(\"This is bound to get the Conservative masses a little riled up.\").add();\r\n i.issue(Issue.AMRADIO).changeOpinion(50, 1, 100);\r\n i.offended.put(CrimeSquad.AMRADIO, true);\r\n }\r\n getch();\r\n }", "@Test\n public void testMenu() {\n MAIN_MENU[] menusDefined = MAIN_MENU.values();\n\n // get menu items\n List<String> menuList = rootPage.menu().items();\n _logger.debug(\"Menu items:{}\", menuList);\n // check the count\n Assert.assertEquals(menuList.size(), menusDefined.length, \"Number of menus test\");\n // check the names\n for (String item : menuList) {\n Assert.assertNotNull(MAIN_MENU.fromText(item), \"Checking menu: \" + item);\n }\n // check the navigation\n for (MAIN_MENU item : menusDefined) {\n _logger.debug(\"Testing menu:[{}]\", item.getText());\n rootPage.menu().select(item.getText());\n Assert.assertEquals(item.getText(), rootPage.menu().selected());\n }\n }", "public static void old_kategorien_aus_grossem_text_holen (String htmlfile) // alt, funktioniert zwar bis auf manche\n\t// dafür müsste man nochmal loopen um dien ächste zeile derü berschrift auch noch abzufangen bei <h1 class kategorie western\n\t// da manche bausteine in die nächste zeile verrutscht sind.\n\t// viel einfacher geht es aus dem inhaltsverzeichnis des katalogs die kategorien abzufangen.\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n // System.out.println(\"Gelesene Zeile: \" + zeile);\n \t\n \t\n \t// 1. Pruefe ob die Zeile eine Kategorie ist: wenn ja Extrahiere diese KATEGORIE aus dem Code:\n \t// Schema <h1 class=\"kategorie-western\"><a name=\"_Toc33522153\"></a>Bescheide\n \t// Rücknahme 44 X\t</h1>\n \t/*if (zeile.contains(\"<h1\"))\n \t\t\t{\n \t\t\t// grussformeln:\n \t\tzeile.replace(\"class=\\\"kategorie-western\\\" style=\\\"page-break-before: always\\\">\",\"\");\n \t\t\n \t\t\t}\n \t*/\n \t// der erste hat immer noch ein page-break before: drinnen; alle anderen haben dann kategorie western ohne drin\n \tif (zeile.contains(\"<h1 class=\\\"kategorie-western\\\"\"))\n \t\t\t/*zeile.contains(\"<h1 class=\\\"kategorie-western\\\">\") /*|| zeile.contains(\"</h1>\")*/\n \t{\n \t\tSystem.out.println (zeile + \"\\n\"); // bis hier werden alle kategorien erfasst !\n \t\t\n \t\t// hier passiert es, dass vllt. die kategorie in die nächste Zeile gerutscht ist:\n \t\t// daher nochmal loopen und mit stringBetween die nächste einfangen:\n \t\t\n \t\tString kategoriename = \"\";\n \t/*\tif (zeile.contains(\"</h1>\") && !zeile.contains(\"<h1 class=\")) // das ist immer der fall wenn es in die nächste zeile rutscht , weil der string zu lang ist:\n \t\t{\n \t\t\t kategoriename = zeile.replace(\"</h1>\", \"\");\n \t\t}\n \t\telse\n \t\t{\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t}*/\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t \n \t\t if (! zeile.contains(\"</h1>\")) // dann ist es in die nächste Zeile gerutscht\n \t\t {\n \t\t\t // hole nächste Zeile und vervollständige damit kategorie:\n \t\t }\n\n \t\tif (kategoriename == null || kategoriename ==\"\")\n \t\t{\n \t\t\t// keine kategorie adden (leere ist sinnlos)\n \t\t}\n \t\n \t\t\tif (kategoriename.contains(\"lass=\\\"kategorie-western\\\">\"))\n \t\t\t{\n \t\t\t\tkategoriename.replace(\"lass=\\\"kategorie-western\\\">\", \"\");\n \t\t\t}\n \t\t\n \t\t\t//System.out.println (kategoriename + \"\\n\");\n \t\t/*\tkategoriename.replace(\"lass=\",\"\");\n \t\t\tkategoriename.replace(\"kategorie-western\",\"\");\n \t\t\tkategoriename.replace(\"\\\"\",\"\");\n \t\t\tkategoriename.replace(\">\",\"\");\n \t\t\tkategoriename.replace(\"/ \",\"\");*/\n\t \t\t//mainobject.kategoriencombo.addItem(kategoriename);\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFileWriter fwk1 = new FileWriter (\"kategorien.txt\",true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n \t\t\n \t}\n \t\n\n \n \t// 2. Pruefe ob die Zeile der Name eines Textbausteins ist d.h. Unterkateogrie:\n \t//<p style=\"margin-top: 0.21cm; page-break-after: avoid\"><a name=\"_Toc33522154\"></a>\n \t//Ablehnung erneute Überprüfung</p>\n // System.out.println (\"Ermittle alle Unterkateogrien (d.h. Textbausteinnamen an sich)... 243\\n\");\n\n \tif (zeile.contains(\"<p style=\\\"margin-top: 0.21cm; page-break-after: avoid\\\"><a name=\"))\n \t{\n \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n \t\tif (unterkategorie == null || unterkategorie ==\"\")\n \t\t{\n \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n \t\t}\n \t\telse\n \t\t{\n \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n \t\t\t\n \t\t\t\n\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\t//mainobject.bausteinecombo.addItem(unterkategorie);\n\n \t\t\tcount_unterkategorien = count_unterkategorien+1; // anzahl der bausteine anhand der bausteinnamen ermitteln \n \t\t\t// Schreibe die unter Kategorien in Textfile:\n\t \t\tFileWriter fwk2 = new FileWriter (\"unterkategorien.txt\",true);\n\t \t\tfwk2.write(unterkategorie+\"\\n\");\n\t \t\tfwk2.flush();\n\t \t\tfwk2.close();\n\n \t\t//unterkategorienamen[count_unterkategorien] = unterkategorie;\n \t\t// (= hier unterkateogrienamen)\n \t\t\n \t\t\n \t // parts.length = anzahl der bausteine müsste gleich count_unterkategorien sein.\n \t // jetzt zugehörigen baustein reinschreiben:\n \t // also je nach count_unterkateogerien dann den parts[count] reinschrieben:\n \t /* try {\n \t\t\tfwb.write(parts[count_unterkategorien]);\n \t\t} catch (IOException e) {\n \t\t\t// TODO Auto-generated catch block\n \t\tSystem.out.println(\"503 konnte datei mit baustein nicht schreiben\");\n \t\t}\n \t \n \t */\n \t \n\n \t\t}\n \t\t\n \t\t\n \t\t \n \t} // if zeile contains\n \t\t \n \n }\t// while\n \n } // try\n catch (Exception y)\n {}\n \t\t \n \t\t \n\t \t// <p style=\"margin-left: 0.64cm; font-weight: normal\"> usw... text </p> sthet immer dazwischen\n\t \t/*if (zeile.contains(\"<p style=\\\"margin-left: 0.64cm; font-weight: normal\\\">\"))\n\t \t{\n\t \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n\t \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n\t \t\tif (unterkategorie == null || unterkategorie ==\"\")\n\t \t\t{\n\t \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n\t \t\t\t\n\t \t\t\t\n\t\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\tmainobject.bausteinecombo.addItem(unterkategorie);\n\t \t\t}\n\t \t}\n\t \t*/\n System.out.println (\"Alle Oberkategorien, Namen erfolgreich ermittelt und eingefügt 239\\n\");\n\n System.out.println (\"Alle Unterkategorien oder Bausteinnamen erfolgreich eingefügt 267\\n\");\n\n \n \n\t}", "@Override\r\n\tpublic void setContentMenu() {\n\r\n\t}", "public static WebElement clkMainMenu(String mainMenu) \n\t{\n\t\tString xpath = \"//div[@class='de-menu-header']/ul//li[text()='\"+mainMenu+\"']\";\n\t\treturn driver.findElement(By.xpath(xpath));\n\t}", "public void navigateTo(String header, String menu) throws Exception {\n\r\n\t\tWebDriverWait w = new WebDriverWait(driver, 50);\r\n\t\tw.until(ExpectedConditions.elementToBeClickable(pages.Utill().find(\"//*[text()='\" + header + \"']\")));\r\n\t\tpages.Utill().click_element(\"//*[text()='\" + header + \"']\");\r\n\t\tpages.Utill().click_element(\"//*[text()='\" + menu + \"']\");\r\n\t\tSystem.out.println(\"title was :\" + driver.getTitle());\r\n\t\tlogger.log(Status.INFO, \"title was :\" + driver.getTitle());\r\n\r\n\t}", "void clickAmFromMenu();", "public interface Menu {\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item (which will be interpreted as plain text and\n * HTML-escaped if necessary)\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(String title, Command callback);\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item, as a {@link SafeHtml}\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(SafeHtml title, Command callback);\n}", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "@Test(priority = 4)\n public void serviceLeftDropdownMenuTest() {\n driver.findElement(By.cssSelector(\"li[class='menu-title']\")).click();\n List<WebElement> elements = driver.findElements(By.cssSelector(\"li[index='3'] ul.sub li\"));\n assertEquals(elements.size(), 9);\n }", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}", "protected void addTagSpecificMenuItems(IMenuManager menu)\n \t{\n \t\t//all this mess is really just to get the offset and a handle to the\n \t\t//CFDocument object attached to the Document...\n \t\tIEditorPart iep = getSite().getPage().getActiveEditor();\n \t\tITextEditor editor = (ITextEditor)iep;\n \t\tIDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tICFDocument cfd = (ICFDocument)doc;\n \t\tISelection sel = editor.getSelectionProvider().getSelection();\n \t\t\n \t\t//ok got our tag (or null)\n \t\tint startpos = ((ITextSelection)sel).getOffset();\n \t\t\n \t\tCfmlTagItem cti = cfd.getTagAt(startpos,startpos);\n \t\t\n \t\t\n \t\tif(cti != null)\n \t\t \n \t\t{\n \t\t \n \n \t\t\tif(cti.matchingItem != null) {\n \t\t\t\tjumpAction.setDocPos(cti.matchingItem.getEndPosition());\n \t\t\t\tjumpAction.setActiveEditor(null, getSite().getPage().getActiveEditor());\n \t\t\t\tAction jumpNow = new Action(\"Jump to end tag\", \n \t\t\t\t\t\t\t\t\t\t\tCFPluginImages.getImageRegistry().getDescriptor(CFPluginImages.ICON_FORWARD)\n \t\t\t\t\t\t\t\t\t\t\t) { public void run() { jumpAction.run(null); } };\n \t\t\t\tmenu.add(jumpNow);\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tString n = cti.getName(); \n \t\t\tif(n.equalsIgnoreCase(\"include\") || n.equalsIgnoreCase(\"module\"))\n \t\t\t{\n \t\t\t\t//this is a bit hokey - there has to be a way to load the action\n \t\t\t\t//in the xml file then just call it here...\n \t\t\t\t//TODO\n \t\t\t\tgfa.setActiveEditor(null,getSite().getPage().getActiveEditor());\n \t\t\t\tAction ack = new Action(\n \t\t\t\t\t\"Open File\",\n \t\t\t\t\tCFPluginImages.getImageRegistry().getDescriptor(CFPluginImages.ICON_IMPORT)\n \t\t\t\t){\n \t\t\t\t\tpublic void run()\n \t\t\t\t\t{\n \t\t\t\t\t\tgfa.run(null);\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tmenu.add(ack);\n \t\t\t}\n \t\t}\n \t}", "IMenuView getMenuView();", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public HTMLScriptElement getElementElMenu() { return this.$element_ElMenu; }", "public HTMLScriptElement getElementElMenu() { return this.$element_ElMenu; }", "public HTMLScriptElement getElementElMenu() { return this.$element_ElMenu; }", "public String getParentMenu();", "public abstract Menu mo2158c();", "void supprimerMenu(int numeroArticle);", "private void commonLoadTestForHtml(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n waitForText(RESULTS_CONTAINER, \"id=news\");\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Previous\n\t\tWebElement previous = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['title']\\\"}\");\n\n\t\tWebElement previousDiscIcon = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\n\t\tAssert.assertNotNull(previousDiscIcon);\n\n\t\t//Click on Previous Node\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\t\tpreviousDiscIcon.click();\n\n\t\t//Find the children of previous node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of previous node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#daysback2']['title']\\\"}\");\n\n\n\n\n\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "@Override\r\n\tpublic String textOnPage(EnumContent content, int p){\n\t\tif(stack == null)\r\n\t\t\tstack = new ItemStack(ItemRegistry.nomadSack);\r\n\t\tif(con == null)\r\n\t\t\tcon = RecipeRegistry.getRecipreFor(new ItemStack(BlockRegistry.nest));\r\n\t\tString s = \"\";\r\n\t\tswitch(p){\r\n\t\tcase 0:\r\n\t\t\ts += \"The nomads wanted to protect their insects so they built \"\r\n\t\t\t + \"nests. They soon noticed that the insects thanked them by \"\r\n\t\t\t + \"working the envoirment in their favor. All the insects \"\r\n\t\t\t + \"have their own way to help the nomads. What is intressting \"\r\n\t\t\t + \"is the sleep they enter when there is no help to be given. \";\r\n\t\t\tbreak;\r\n\t\tcase 1: //Sodium acetate, Cara Rot (Carrot), Elle D'berry (Elderberry), Rabarberpaj... Carla & Fleur (Cauliflower)\r\n\t\t\ts += KnowledgeDescriptions.getDisplayName(con) + \"\\n\\n\";\r\n\t\t\ts += \" ~ Structure ~\\n\";\r\n\t\t\ts += KnowledgeDescriptions.getStructure(con);\r\n\t\t\ts += \" ~ Creation ~\\n\\n\";\r\n\t\t\ts += KnowledgeDescriptions.getResult(con);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public static void printMenu() {\n System.out.print(\"\\n(A)dd Item (R)emove Item (F)ind Item (I)nitialize Tree (N)ew Tree (Q)uit\\n\");\n }", "public Menu createToolsMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_article, menu);\n return true;\n }", "protected DynamicDocumentTitleMenu() {\n super(true);\n }", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "UnorderedListContent createUnorderedListContent();", "public TitleScreen(MenuHandler menuHandler)\n\t{\n\t\tsuper();\n\t\tsetName(\"TitleScreen\");\n\t\tmenuEntities = new ArrayList<MenuEntity>();\n\t\tMenuEntity gameStarter = new GameStarter(440,522,120,42,\"\",\"Load/Characters/CharacterFile.txt\",menuHandler);\n\t\tgameStarter.setFont(new Font(\"Arial\",Font.PLAIN,18));\n\t\tgameStarter.setColor(Color.BLACK);\n\t\tmenuEntities.add(gameStarter);\n\t\tsetMenuEntities(menuEntities);\n\t}", "public void list_of_menu_items() {\n\t\tdriver.findElement(open_menu_link).click();\n\t}", "private void InitializeUI(){\n\t\t//Set up the menu items, which are differentiated by their IDs\n\t\tArrayList<MenuItem> values = new ArrayList<MenuItem>();\n\t\tMenuItem value = new MenuItem();\n\t\tvalue.setiD(0); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(1); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(2); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(3); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(4); values.add(value);\n\n MenuAdapter adapter = new MenuAdapter(this, R.layout.expandable_list_item3, values);\n \n // Assign adapter to List\n setListAdapter(adapter);\n \n //Set copyright information\n Calendar c = Calendar.getInstance();\n\t\tString year = String.valueOf(c.get(Calendar.YEAR));\n\t\t\n\t\t//Set up the copyright message which links to the author's linkedin page\n TextView lblCopyright = (TextView)findViewById(R.id.lblCopyright);\n lblCopyright.setText(getString(R.string.copyright) + year + \" \");\n \n TextView lblName = (TextView)findViewById(R.id.lblName);\n lblName.setText(Html.fromHtml(\"<a href=\\\"http://uk.linkedin.com/in/lekanbaruwa/\\\">\" + getString(R.string.name) + \"</a>\"));\n lblName.setMovementMethod(LinkMovementMethod.getInstance());\n\t}", "public int showMenu() {\n\t\tSystem.out.print(\"\\n--- 학생 관리 프로그램 ---\\n\");\n\t\tSystem.out.println(\"1. 학생 정보 등록\");\n\t\tSystem.out.println(\"2. 전체 학생 정보\");\n\t\tSystem.out.println(\"3. 학생 정보 출력(1명)\");\n\t\tSystem.out.println(\"4. 학생 정보 수정\");\n\t\tSystem.out.println(\"5. 학생 정보 삭제\");\n\t\tSystem.out.print(\"선택 > \");\n\t\tint itemp = sc.nextInt();\n\t\treturn itemp;\n\t}", "Menu setMenuSectionsFromInfo(RestaurantFullInfo fullInfoOverride);", "public int getMenuId() {\n return 0;\n }", "public Menu getMenu() { return this.menu; }", "public Menu createViewMenu();", "public void visMedlemskabsMenu ()\r\n {\r\n System.out.println(\"Du har valgt medlemskab.\");\r\n System.out.println(\"Hvad Oensker du at foretage dig?\");\r\n System.out.println(\"1: Oprette et nyt medlem\");\r\n System.out.println(\"2: Opdatere oplysninger paa et eksisterende medlem\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB)\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t\t((HomeActivity)getActivity()).getSlidingMenu().toggle();\n\t\t\t\t\n\t\t\t\tif(arg2 == 0){\n\t\t\t\t\tgetActivity().setTitle(\"Wei随享\");\n\t\t\t\t\tFragmentTransaction fraTra = getFragmentManager().beginTransaction();\n\t\t\t\t\tfraTra.replace(R.id.main, new HomeFragment());\n\t\t\t\t\tfraTra.commit();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(arg2 == 1){\n\t\t\t\t\tgetActivity().setTitle(\"我\");\n\t\t\t\t\tFragmentTransaction fraTra = getFragmentManager().beginTransaction();\n\t\t\t\t\tfraTra.replace(R.id.main, new AboutFragment());\n\t\t\t\t\tfraTra.commit();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(arg2 == 2){\n\t\t\t\t\tgetActivity().setTitle(\"选项\");\n\t\t\t\t\tFragmentTransaction fraTra = getFragmentManager().beginTransaction();\n\t\t\t\t\tfraTra.replace(R.id.main, new OptionFragment());\n\t\t\t\t\tfraTra.commit();\n\t\t\t\t\t}\n\t\t\t\t}", "private void updateMenuTitles() {\n boolean isFollow = MainActivity.discussionsImIn.contains(discussionTableName);\n menu.findItem(R.id.settings_follow).setVisible(!isFollow);\n menu.findItem(R.id.settings_unfollow).setVisible(isFollow);\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public abstract void displayMenu();", "public void navigateToWomanCategory(){\n a = new Actions(driver);\n a.moveToElement(driver.findElement(By.cssSelector(\"div[id ='block_top_menu'] a[title='Women']\"))).build().perform();\n driver.findElement(By.cssSelector(\"ul[class='submenu-container clearfix first-in-line-xs'] li a[title='Casual Dresses'] \")).click();\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "public abstract int getMenu();", "private void showFullMenu() {\r\n Menu[] menu = MenuFactory.showMenu();\r\n System.out.println(\"Menu_Id \\t Food_Name \\t Food_Type \\t\\t Calories \\t Food_Amount\");\r\n for (Menu m : menu) {\r\n System.out.println(m.getFoodId() + \"\\t\\t\" + m.getFoodName() + \"\\t\\t\" + m.getFoodType() + \"\\t\\t\\t\" + m.getCalories() + \"\\t\\t\" + m.getFoodAmt());\r\n }\r\n }", "public MainMenuView() {\r\n super(\"\\n\" +\r\n \"**************************\\n\" +\r\n \"* CIT 360 - Technologies *\\n\" +\r\n \"**************************\\n\" +\r\n \" 1 - Java Collections\\n\" +\r\n \" 2 - Threads, Executors and Runnables\\n\" +\r\n \" 3 - Application Controller Pattern\\n\" +\r\n \" 4 - MVC\\n\" + \r\n \" 5 - Hibernate\\n\" +\r\n \" 6 - JSON\\n\" +\r\n \" 7 - HttpURLConnection\\n\" +\r\n \" 8 - Quit\\n\", \r\n 8);\r\n }", "@Override\n\tpublic String getMenuId() {\n\t\treturn null;\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_showarticle, menu);\r\n return true;\r\n }", "String getMenuName();", "private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "MenuItem getMenuItemAbout();", "public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}", "protected abstract List<OpcionMenu> inicializarOpcionesMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.news, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_selected_news, menu);\n return true;\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public JMenu addMenuItem (String texte, JMenu menu) {\n return addMenuItem (texte,menu,\"\");\n }", "public void viewMenu() {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\tmm.clear();\n\n\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\n\t\t\tString leftAlignFormat = \"| %-10s | %-37s | %-5s | %-12s | %n\";\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\n\t\t\t\n\t\t\tCollections.sort(mm); \n\t\t\tfor (AlacarteMenu item : mm) {\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tSystem.out.format(leftAlignFormat, item.getMenuName(), item.getMenuDesc(), item.getMenuPrice(),\n\t\t\t\t\t\titem.getMenuType());\n\t\t\t}\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (IOException e) {\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Bundle args = new Bundle();\n args.putString(\"text\", menuLists.get(position).getContent());\n// contenFragment.setArguments(args);\n // FragmentManager fm = getFragmentManager();\n // fm.beginTransaction().replace(R.id.ly_content, contenFragment).commit();\n drawerLayout.closeDrawer(list_left_drawer);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \tsuper.onCreateOptionsMenu(menu);\r\n\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.title_menu, menu);\r\n \r\n\t\treturn true;\r\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "protected void CriarEventos(){\n ListMenu.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String opcMenu = ((TextView) view).getText().toString();\n\n RedirecionaTela(opcMenu);\n }\n });\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tmenu.findItem(R.id.menu_principla_4).setTitle(\"Notificacion\");\n \treturn true;\n }", "@Override\n public List<WebElement> getSubMenu() {\n\n final List<WebElement> subMenus = DriverConfig.getDriver().findElements(\n By.xpath(\"//*[@id='submenu']/a\"));\n if (subMenus != null) {\n for (final WebElement webElement : subMenus) {\n DriverConfig.setLogString(\"SubMenu :\" + webElement.getText(), true);\n }\n }\n return subMenus;\n }", "public static void main(String[] args){\n Menu iniciar_menu = new Menu();\r\n }", "private void loadNavHeader() {\n // name, website\n txtName.setText(\"Ashish Jain\");\n txtWebsite.setText(\"www.ashish.jain@gmail.com\");\n\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }", "public static void imprimirMenuCliente() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción comprar entrada\");\r\n System.out.println(\"B: despliega la opción informacion usuario\");\r\n System.out.println(\"C: despliega la opción devolucion entrada\");\r\n System.out.println(\"D: despliega la opción cartelera\");\r\n\tSystem.out.println(\"E: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n \r\n }", "public void gotoMenu() {\n try {\n MenuClienteController menu = (MenuClienteController) replaceSceneContent(\"MenuCliente.fxml\");\n menu.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void printMenu(List<String> list) {\n\t\t\tSystem.out.println(HEADER);\n\t\t\tfor(String s : list) {\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\t\t\tSystem.out.println(HEADER);\n\t\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu)\n\t{\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.title_menu, menu);\n\t\treturn super.onCreateOptionsMenu(menu); \n\t}", "UmsMenu getItem(Long id);", "private void homeTitles() {\n String udata = \"B U I L D M A N\";\n SpannableString content = new SpannableString(udata);\n content.setSpan(new UnderlineSpan(), 0, udata.length(), 0);\n mBuilder_txv.setText(content);\n }", "private void searchMenu(){\n\t\t\n\t}", "@Override\r\n public void Story(){\r\n super.Story();\r\n System.out.println(\"=======================================================================================\");\r\n System.out.println(\"|| Arya harus bergegas untuk menyelamatkan seluruh warga. Dia tidak tau posisi warga ||\");\r\n System.out.println(\"|| yang harus diselamatkan ada pada ruangan yang mana. ||\");\r\n System.out.println(\"=======================================================================================\");\r\n }", "public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }", "private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }", "IMenuFactory getMenuFactory();", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }", "public static void displaySubTitles()\r\n {\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_story_details, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n if(names==null ||names==\"\" ){\n menu.findItem(R.id.login).setTitle(\"登入\");\n }\n else{\n menu.findItem(R.id.login).setTitle(\"歡迎\"+names);\n }\n this.menu = menu;\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n if(names==null ||names==\"\" ){\n menu.findItem(R.id.login).setTitle(\"登入\");\n }\n else{\n menu.findItem(R.id.login).setTitle(\"歡迎\"+names);\n }\n this.menu = menu;\n return true;\n }", "@Override\n\tprotected void getContent() {\n\t\taddStyleName(\"Menu\");\n//\t\tsetMargin(true);\n\t\tsetSpacing(true);\n\t}" ]
[ "0.5722438", "0.54492974", "0.54492974", "0.54492974", "0.53777605", "0.536176", "0.535705", "0.53375083", "0.53127927", "0.5303544", "0.5277369", "0.52763486", "0.52735996", "0.5265173", "0.5249075", "0.5225441", "0.5211301", "0.52020985", "0.5156457", "0.5140993", "0.5139192", "0.5133727", "0.51306343", "0.5130387", "0.5129169", "0.51282424", "0.511514", "0.51100713", "0.51100713", "0.51100713", "0.5101472", "0.5099897", "0.5094377", "0.5091735", "0.50855285", "0.5085073", "0.50760597", "0.50742066", "0.5055324", "0.50520855", "0.50454515", "0.50412124", "0.50292194", "0.5026783", "0.5022683", "0.5022357", "0.5009803", "0.5000769", "0.49996912", "0.49983296", "0.49963003", "0.49962798", "0.49862248", "0.49739507", "0.49714056", "0.4969421", "0.4969106", "0.49631923", "0.4950235", "0.4946222", "0.49456698", "0.4936529", "0.49347776", "0.4927802", "0.49271458", "0.4926521", "0.4902856", "0.49003124", "0.48957637", "0.48921424", "0.4891652", "0.48898372", "0.48890314", "0.48878306", "0.48864016", "0.48834437", "0.48812005", "0.48787203", "0.48744717", "0.4871364", "0.48651317", "0.48595142", "0.4857137", "0.48529992", "0.48525143", "0.4851784", "0.48420295", "0.48415318", "0.4828378", "0.4828296", "0.48272958", "0.48271966", "0.4826925", "0.48266453", "0.48205578", "0.48177627", "0.48158956", "0.48126215", "0.48126215", "0.48084685" ]
0.5317313
8
Projde vsechny soubory v predanem adresari a pokusi se je naparsovat. Pokud je soubor ke cteni i k zapisu a konci koncovkou .html, spusti se parsovani a vysledny dokument se ulozi do objektu HTMLFile s tim, ze nebyl modifikovan. Nakonec se vysledny objekt vlozi do mapy pod jmenem souboru. Pred kazdym parsovanim noveho adresare se stavajici seznamy souboru vymazou.
public void parseDirectory(File directory) throws IOException { this.parsedFiles.clear(); File[] contents = directory.listFiles(); for (File file : contents) { if (file.isFile() && file.canRead() && file.canWrite()) { String fileName = file.getPath(); if (fileName.endsWith(".html")) { Document parsed; parsed = Jsoup.parse(file, "UTF-8"); if (this.isWhiteBearArticle(parsed)) { HTMLFile newParsedFile = new HTMLFile(parsed, false); String name = file.getName(); this.parsedFiles.put(name, newParsedFile); } else if (this.isMenuPage(parsed)) { //HTMLFile newParsedFile = new HTMLFile(parsed, false); //String name = file.getName(); //this.parsedFiles.put(name, newParsedFile); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createHTMLFile(Webpage webpage) {\n String filepath = \"resources/tempHTML\" +Thread.currentThread().getName() +\".html\";\n\n try {\n //Create HTML file\n File file = new File(filepath);\n OutputStreamWriter fW = new OutputStreamWriter(new FileOutputStream(file), Charset.forName(\"UTF-8\").newEncoder());\n fW.write(webpage.getHTML());\n fW.flush();\n fW.close();\n\n //Set HTML file size\n webpage.setFileSize(Utils.getFileSize(filepath));\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static String getHtmlFilePath(RenderRequest request, String htmlFile) {\r\n\t\tString markup = request.getProperty(\"wps.markup\");\r\n\t\tif( markup == null )\r\n\t\t\tmarkup = getMarkup(request.getResponseContentType());\r\n\t\treturn HTML_FOLDER + markup + \"/\" + htmlFile + \".\" + getHtmlExtension(markup);\r\n\t}", "public HTMLFile (URL url) {\n this.inFile = null;\n inURL = url;\n inName = url.toString();\n commonConstruction();\n }", "public HTMLFile (File inFile) {\n this.inFile = inFile;\n inName = inFile.toString();\n inURL = null;\n commonConstruction();\n }", "public void writeHTMLFile(String path) throws IOException {\n String index = slurp(getClass().getResourceAsStream(INDEX));\n String d3js = slurp(getClass().getResourceAsStream(D3JS));\n\n FileWriter fw = new FileWriter(path + HTML_EXT);\n ObjectWriter writer = new ObjectMapper().writer(); // .writerWithDefaultPrettyPrinter();\n fw.write(index.replace(TITLE_PLACEHOLDER, path)\n .replace(D3JS_PLACEHOLDER, d3js)\n .replace(DATA_PLACEHOLDER, writer.writeValueAsString(toJson())));\n fw.close();\n }", "public static void htmlExtractor() throws IOException {\t\n\t\tString inizio=\"Inizio:\"+new Date();\n\t\tfinal File sourceDocDir = new File(\"datasetWarc\");\n\t\tif (sourceDocDir.canRead()) {\n\t\t\tif (sourceDocDir.isDirectory()) {\n\t\t\t\tString[] files = sourceDocDir.list();\n\t\t\t\t// an IO error could occur\n\t\t\t\tif (files != null) {\n\t\t\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\t\t\tSystem.out.println(files[i]);\n\t\t\t\t\t\tFromWarcToHtml.WarcExtractor(new File(sourceDocDir, files[i]));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\n\n\t\t}\n\n\t\tSystem.out.println(\"Tempo Estrazione HTML:\"+\"Inizio: \"+inizio+\"Fine: \"+new Date());\n\n\t}", "public static void htmlFile(Website websiteInfo){\n File file = new File(websiteInfo.currentPath + \"/index.html\");\n\n try(BufferedWriter writer = new BufferedWriter(new FileWriter(file))){\n writer.write(websiteInfo.htmltext);\n System.out.println(websiteInfo.successMessage + websiteInfo.name + \"/index.html\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public boolean saveHTMLInFile()\n {\n String filePath = formatFilePath();\n return saveHTMLInFile(filePath);\n }", "void saveHtmFile(String htmFileName, String path) throws IOException\r\n \t{\r\n \t\tString filePath = path + \"/\" + htmFileName + \".html\";\r\n \t\tFileWriter out = new FileWriter( filePath );\r\n \t\tout.write(getTemplateContent());\r\n \t\tout.close();\r\n \t}", "public String generar(String id) throws FileNotFoundException, ZipException {\n\t\t//Inicializar las variables con la plantilla\n\t\tString index = this.index,\n\t\t\t\thtml = content.html,\n\t\t\t\thead = content.head,\n\t\t\t\tbody = content.body, \n\t\t\t\theader = content.header, \n\t\t\t\tmenu = content.menu, \n\t\t\t\tmain = content.main, \n\t\t\t\tsection = content.section, \n\t\t\t\tactividad = content.actividad, \n\t\t\t\trecurso = content.recursootro,\n\t\t\t\tfooter = content.footer,\n\t\t\t\textra = content.extra;\n\t\t\n\t\t//Adecuar index.html\n\t\tindex = index.replace(\"[titulo]\", titulo);\n\t\tindex = index.replace(\"[descripcion]\", descripcion);\n\t\t\n\t\t//Adecuar content.html\n\t\tfor (Actividad i : content.actividades) {\n\t\t\tactividad = content.actividad;\n\t\t\tmenu = content.menu;\n\t\t\t//Agregar la informacion del elemento menu para la actividad i\n\t\t\tmenu = menu.replace(\"[actividad]\", i.titulo);\n\t\t\tmenu = menu.replace(\"[idactividad]\", i.id);\n\t\t\t//Agregar la informacion de la seccion de la actividad i\n\t\t\tactividad = actividad.replace(\"[idactividad]\", i.id);\n\t\t\tactividad = actividad.replace(\"[actividad]\", i.titulo);\n\t\t\tactividad = actividad.replace(\"[descactividad]\", i.descactividad);\n\t\t\tfor(Recurso j : i.recursos) {\n\t\t\t\t//Adecuar segun el tipo de recurso\n\t\t\t\tswitch (j.type.split(\"/\")[0]) {\n\t\t\t\tcase \"audio\":\n\t\t\t\t\trecurso = content.recursoaudio;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"video\":\n\t\t\t\t\trecurso = content.recursovideo;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"imagen\":\n\t\t\t\t\trecurso = content.recursoimagen;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\trecurso = content.recursootro;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Llenar el recurso j con su informacion\n\t\t\t\trecurso = recurso.replace(\"[recurso]\", j.titulo);\n\t\t\t\trecurso = recurso.replace(\"[descrecurso]\", j.descrecurso);\n\t\t\t\trecurso = recurso.replace(\"[path]\", j.path);\n\t\t\t\trecurso = recurso.replace(\"[type]\", j.type);\n\t\t\t\trecurso = recurso.replace(\"[name]\", j.name);\n\t\t\t\t//Agregar el recurso j a la actividad i (se vuelve agregar la etiqueta recurso para seguir añadiendo)\n\t\t\t\tactividad = actividad.replace(\"<!--recurso-->\", recurso+\" <!--recurso--> \\r\\n\");\n\t\t\t}\n\t\t\t//Se agrega el menu de la actividad i para que aparezca en la barra de navegacion\n\t\t\theader = header.replace(\"<!--item-->\", menu+\" <!--item--> \\r\\n\");\n\t\t\t//Agregar la seccion de la actividad i que ya tiene toda su informacion para ser mostrada\n\t\t\tmain = main.replace(\"<!--sectionactividad-->\",actividad+\" <!--sectionactividad--> \\r\\n\");\n\t\t}\n\t\t//Se llena la informacion de la seccion principal\n\t\tsection = section.replace(\"[titulo]\", content.titulo);\n\t\tsection = section.replace(\"[descripcion]\", content.descripcion);\n\t\t//Se agrega la seccion principal para mostrar\n\t\tmain = main.replace(\"<!--sectioninicio-->\", section);\n\t\t//Se agregan los elementos en su orden que van construyendo la pagina de forma incremental\n\t\tbody = body.replace(\"<!--header-->\", header);\n\t\tbody = body.replace(\"<!--main-->\", main);\n\t\tbody = body.replace(\"<!--footer-->\", content.footer);\n\t\tbody = body.replace(\"<!--extra-->\", content.extra);\n\t\thtml = html.replace(\"<!--head-->\", content.head);\n\t\thtml = html.replace(\"<!--body-->\", body);\n\t\t\n\t\t//Crear el archivo index.html y escribir el contenido\n\t\tPrintWriter indexhtml = new PrintWriter(new File(path+\"/index.html\"));\n\t\tindexhtml.print(index);\n\t\tindexhtml.close();\n\t\t\n\t\t//Crear el archivo content.html y escribir el contenido\n\t\tPrintWriter contenthtml = new PrintWriter(new File(path+\"/content.html\"));\n\t\tcontenthtml.print(html);\n\t\tcontenthtml.close();\n\t\t\n\t\t//Generar el .zip\n\t\tString scorm = path;\n\t\tString scormZip = path+id+\".zip\";\n\t\tconvertToZip(scorm, scormZip);\n\t\t\n\t\treturn scormZip;\n\t}", "public HTMLFile (String inFileName) {\n inFile = new File(inFileName);\n inName = inFileName;\n inURL = null;\n commonConstruction();\n }", "public static void main(String[] args) throws IOException {\n\t\tString path = \"/Users/amit/Documents/FileHandlingTesting/abcd\";\n\t\tFile file = new File(path);\n\t\t//File file = new File(path+\"/abcd/xyz/tt/pp\");\n//\t\tString allFiles[] = file.list();\n//\t\tfor(String f : allFiles){\n//\t\t\tSystem.out.println(f);\n//\t\t}\n\t\tFile files[] = file.listFiles(new MyFilter());\n\t\tSystem.out.println(\"U have \"+files.length+\" html files\");\n\t\tint counter = 1;\n\t\tfor(File f : files){\n\t\t\tf.renameTo(new File(path+\"/virus\"+counter+\".haha\"));\n\t\t\tcounter++;\n//\t\t\tif(f.isDirectory()){\n//\t\t\t\tSystem.out.println(\"<DIR> \"+f.getName() + \" \"+new Date(f.lastModified()));\n//\t\t\t}\n//\t\t\telse\n//\t\t\tif(f.isFile()){\n//\t\t\t\tif(f.isHidden()){\n//\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t\tif(!f.canWrite()){\n//\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t\t//f.delete();\n//\t\t\t\tf.setWritable(false);\n//\t\t\t\tSystem.out.println(\"<FILE> \"+f.getName()+\" \"+new Date(f.lastModified()));\n\t\t\t}\n\t\t}", "public void load(String typ, String souborMilnik, String souborNaplanovane, String souborVysledek) {\r\n\t\t/* cteni dat */\r\n\t\tISourceReader reader = SourceReaderFactory.getReader(typ);\r\n\t\tif(reader == null) return;\r\n\t\tList<Data> dataMilniky = reader.read(DocType.MILNIK, souborMilnik);\r\n\t\tList<Data> dataNaplanovane = reader.read(DocType.NAPLANOVANE, souborNaplanovane);\r\n\t\tList<Data> dataVysledky = reader.read(DocType.VYSLEDKY, souborVysledek);\r\n\t\tif((dataMilniky == null) || (dataNaplanovane == null) || (dataVysledky == null)) return;\r\n\r\n\t\t/* mapovani dat */\r\n\t\tIMapper mapper;\r\n\t\tmapper = MapperFactory.getMapper(DocType.MILNIK);\r\n\t\tList<OutData> dataMilnikyOut = mapper.map(dataMilniky);\r\n\t\tmapper = MapperFactory.getMapper(DocType.NAPLANOVANE);\r\n\t\tList<OutData> dataNaplanovaneOut = mapper.map(dataNaplanovane);\r\n\t\tmapper = MapperFactory.getMapper(DocType.VYSLEDKY);\r\n\t\tList<OutData> dataVysledkyOut = mapper.map(dataVysledky);\r\n\t\tif((dataMilnikyOut == null) || (dataNaplanovaneOut == null) || (dataVysledkyOut == null)) return;\r\n\r\n\t\t/* slouceni dat */\r\n\t\tMerger merger = new Merger();\r\n\t\tmerger.mergeData(dataMilnikyOut, dataNaplanovaneOut, dataVysledkyOut);\r\n\r\n\t\t/* zapis dat do databaze */\r\n\t\tMongoWriter writer = new MongoWriter();\r\n\t\tSystem.out.println(\"Zadej URI: \");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString uri = sc.nextLine();\r\n\t\tsc.close();\r\n\t\tMongoDatabase db = writer.connectToDB(uri);\r\n\t\tif(db == null) return;\r\n\t\twriter.write(dataMilnikyOut, db);\r\n\t}", "public HTMLFile (URL url, String label) {\n this.inFile = null;\n inURL = url;\n inName = url.toString();\n commonConstruction();\n context.setType (label);\n }", "private void uploadTrickHtml(String htmlName, String htmlContent) throws IOException {\n Path webWolfFilePath = Paths.get(webwolfFileDir);\n if (webWolfFilePath.resolve(Paths.get(this.getUser(), htmlName)).toFile().exists()) {\n Files.delete(webWolfFilePath.resolve(Paths.get(this.getUser(), htmlName)));\n }\n\n //upload trick html\n RestAssured.given()\n .when()\n .relaxedHTTPSValidation()\n .cookie(\"WEBWOLFSESSION\", getWebWolfCookie())\n .multiPart(\"file\", htmlName, htmlContent.getBytes())\n .post(webWolfUrl(\"/WebWolf/fileupload\"))\n .then()\n .extract().response().getBody().asString();\n }", "public boolean saveHTMLInFile(String filePath)\n {\n boolean result = false;\n File file = new File(filePath);\n if(!file.exists())\n try {\n file.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n return result;\n }\n if(file.exists()) {\n CloseableHttpResponse response = null;\n try {\n response = httpClient.execute(httpUriRequest);\n HttpEntity httpEntity = response.getEntity();\n InputStream inputStream = httpEntity.getContent();\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n IOUtil.writeByInputStream(inputStream,fileOutputStream);\n EntityUtils.consume(httpEntity);\n result = true;\n } catch (IOException e) {\n e.printStackTrace();\n return result;\n } finally{\n try {\n if(response != null)\n response.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return result;\n }", "public static String readHTML(String path){\r\n String htmlStr = \"\";\r\n String root = \"\";\r\n try { \r\n root = System.getProperty(\"user.dir\") + \"\\\\src\\\\\";\r\n htmlStr = FileUtils.readFileToString(new File(root+path), \"UTF-8\");\r\n System.out.println(EchoServer_HTTP.getDate() + \" - File '\" + root+path + \"' was requested from the server.\");\r\n } catch(IOException e){ \r\n System.out.println(EchoServer_HTTP.getDate() + \" - ERROR: File '\" + root+path + \"' not found.\");\r\n }\r\n return htmlStr;\r\n }", "protected File copyURLToFile(String filename) throws IOException {\r\n\t\tURL deltaFileUrl = getClass().getResource(filename);\t\t\r\n\t\tFile tempFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t_tempFiles.add(tempFile);\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempFile);\t\t\r\n\t\treturn tempFile;\t\r\n\t}", "public void saveToFile(String datafile) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException {\n try {\n FileWriter writer = new FileWriter(\"test.html\");\n writer.write(datafile);\n writer.flush();\n writer.close();\n } catch (IOException ioe) {\n System.out.println(\"Error writing file\");\n }\n }", "public void updateDirectorCovHtml() {\n\n Connection dbConnection = connectToDb();\n String selectIdStmt = \"SELECT id, testposition, directory_cov_html FROM testruns ORDER BY id DESC\";\n System.out.println(selectIdStmt);\n try {\n PreparedStatement selectId = dbConnection\n .prepareStatement(selectIdStmt);\n ResultSet rs = selectId.executeQuery();\n while (rs.next()) {\n Integer testrunId = rs.getInt(\"id\");\n Integer testPosition = rs.getInt(\"testposition\");\n String directory_cov_html = rs.getString(\"directory_cov_html\");\n if (null == directory_cov_html) {\n String directoryFuncCovCsv = \"directoryFuncCov_\"+testPosition +\"__\"+testrunId +\".csv\";\n generateDirectoryFuncCovCsv(sourceDirFilename,\n directoryFuncCovCsv, testrunId, testPosition);\n String outputHTMLFilename= \"function_coverage_\"+testPosition +\"__\"+testrunId +\".html\";\n generateHtmlFromFsTree(outputHTMLFilename);\n addHtmlDocToDb(outputHTMLFilename, testrunId);\n } else {\n System.err\n .println(\"WARNING: directory_cov_html already set for testrunId \"\n + testrunId + \". Skipping testrunId.\");\n }\n }\n rs.close();\n selectId.close();\n } catch (SQLException e) {\n\n myExit(e);\n }\n }", "protected String parseAndSaveHtml() {\n\t\t// the line of the html code\n\t\tString inputLine;\n\n\t\t// creates the folder's name from the domain name\n\t\tString folderName = nameFolder();\n\t\tFile folderNameFile = new File(path + folderName);\n\n\t\t// checks if there is already a folder with the same name\n\t\tif (!existsFolder(folderNameFile)) {\n\t\t\tmakeFolder(folderNameFile);\n\t\t}\n\n\t\t// creates the file with a random unique name\n\t\tString fileName = generateFileName(folderName);\n\t\tFile file = new File(path + folderName + \"\\\\\" + fileName + \".txt\");\n\n\t\ttry {\n\t\t\t// streams which help to read from the url\n\t\t\tInputStreamReader is = new InputStreamReader(url.openStream(), \"UTF-8\");\n\t\t\tBufferedReader br = new BufferedReader(is);\n\t\t\tbr.mark(0);\n\n\t\t\t// streams which help to write from the url\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos, \"UTF-8\");\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n\t\t\t// reads line by line the html code\n\t\t\twhile ((inputLine = br.readLine()) != null) {\n\t\t\t\tbw.write(inputLine);\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbw.close(); //closes the writer stream\n\n\t\t\treturn path + folderName + \"\\\\\" + fileName + \".txt\";\n\t\t} catch (IOException e) {\n\t\t\tfile.delete();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public void gerarSelenium(Map<String, String> mapPreferencia) {\t\r\n\t\tthis.diretorioScreenShots = mapPreferencia.get(\"DiretorioScreenShot\");\t\t\t\r\n\t\tthis.diretorioJava = mapPreferencia.get(\"DiretorioArquivoJava\");\r\n\t\tthis.url = mapPreferencia.get(\"URL\");\r\n\t\t\r\n\t\tif (mapPreferencia.get(\"Lista\").equals(\"true\")) {\r\n\t\t\tisPaginaLista = true;\r\n\t\t}\r\n\r\n\t\t//if (url.contains(\"?id\") || isPaginaLista) {\r\n\t\t//\tgerarTestSelenium(null, url.substring(url.lastIndexOf(\"/\")+1, url.indexOf(\"xhtml\")-1));\r\n\t\t//\tgerarArquivo();\r\n\t\t//} else {\r\n\t\t\t//File fileSelecionado = new File(mapPreferencia.get(\"DiretorioXHTML\"));\r\n\t\t\tfileList.clear();\r\n\t\t\tList<File> l = listarArquivos(new File(mapPreferencia.get(\"DiretorioXHTML\")));\r\n\t\t\tfor (File arquivo : l) {\r\n\t\t\t\tif (arquivo.getAbsolutePath().endsWith(\".xhtml\")) {\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Gerando o arquivo....:\"+arquivo.getName());\t\t\t\t\t\r\n\t\t\t\t\tgerarTestSelenium(arquivo.getAbsolutePath(), arquivo.getName().substring(0, arquivo.getName().indexOf(\".\")));\r\n\t\t\t\t\tgerarArquivo();\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t//for (File f : fileSelecionado.listFiles()) {\r\n\t\t\t\t//if (f.getAbsolutePath().endsWith(\".xhtml\")) {\r\n\t\t\t\t//\tgerarTestSelenium(f.getAbsolutePath(), f.getName().substring(0, f.getName().indexOf(\".\")));\r\n\t\t\t\t//\tgerarArquivo();\r\n\t\t\t\t//}\t\t\t\t\r\n\t\t\t//}\r\n\t\t//}\t\t\t\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n HttpPageExtractor httpPageExtractor = new HttpPageExtractor();\n Page page = httpPageExtractor.extractPage(\"http://www.obrazki.org/upload/ob_0_33793200_1306404375.JPEG\");\n // new BufferedWriter(new FileWriter(new File(\"C:\\\\Users\\\\Jaras\\\\Desktop\\\\Temporary\\\\obrazek.jpeg\")))\n //Files.write(Paths.get(\"C:\\\\Users\\\\Jaras\\\\Desktop\\\\Temporary\\\\obraze.png\"), page.getBody().getBytes());\n try (InputStream in = URI.create(\"https://demotywatory.pl/uploads/201008/1282322197_by_MACTEP_600.jpg\").toURL().openStream()) {\n Files.copy(in, Paths.get(\"C:\\\\Users\\\\Jaras\\\\Desktop\\\\Temporary\\\\obrazek1.png\"));\n }\n }", "public void exportPuzzle (Puzzle puzzle) {\n if (puzzle != null && puzzle.getNumWords () > 0) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n FileWriter writer = new FileWriter (newFile + \" puzzle.html\");\n writer.write (puzzle.export (true));\n writer.close ();\n writer = new FileWriter (newFile + \" solution.html\");\n writer.write (puzzle.export (false));\n writer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n } else {\n JOptionPane.showMessageDialog (null, \"Please Generate a Puzzle before Exporting\", \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Test\n\tpublic void testUsingTempFolder2() throws IOException {\n\t\tFile createdFile1= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title<title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile1));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = null; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile1);\n\t\tassertEquals(res,result); \n\t}", "@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "public static void convert(String filename1) throws IOException {\n\t\tFile myfile = new File(\"C:\\\\Users\\\\user\\\\Desktop\\\\1000_web_htm_archive\\\\1000_web_htm_archive\\\\\" + filename1); //location of html pages\r\n\t\torg.jsoup.nodes.Document doc = Jsoup.parse(myfile, \"UTF-8\");\r\n\t\tString text = doc.text();\r\n\r\n\t\t// Save the content of htm file into text(.txt) file \r\n\t\tString modifiedfilename = filename1.replaceFirst(\"[.][^.]+$\", \"\");\r\n\t\tPrintWriter out = new PrintWriter(\r\n\t\t\t\t\"C:\\\\Users\\\\user\\\\Desktop\\\\Files_Converted\\\\\" + modifiedfilename + \".txt\"); \r\n\t\tout.println(text);\r\n\t\tout.close();\r\n\t}", "private void loadHTMLFile(File file) {\n\t\ttry {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tBufferedInputStream bis = new BufferedInputStream(fis);\n\t\t\twhile (bis.available() > 0) {\n\t\t\t\tsb.append((char) bis.read());\n\t\t\t}\n\t\t\tbis.close();\n\n\t\t\tString htmlContent = sb.toString();\n\n\t\t\twebEngineLoadContent(htmlContent, false);\n\t\t\thtmlEditor.setHtmlText(htmlContent);\n\n\t\t} catch (Exception e) { // catches ANY exception\n\t\t\tDialogs.create()\n\t\t\t\t\t.title(\"Error\")\n\t\t\t\t\t.masthead(\n\t\t\t\t\t\t\t\"Could not load data from file:\\n\" + file.getPath())\n\t\t\t\t\t.showException(e);\n\t\t}\n\t}", "private void deleteTempHTMLFile()\n {\n File file = new File(\"resources/tempHTML\" +Thread.currentThread().getName() +\".html\");\n file.delete();\n }", "public String getHTMLResourceFileName() \n {\n return null; \n }", "public String createHTML(String websiteName, String author){\n directory = path + websiteName + \"/index.html\";\n\n String html = \"<title>\" + websiteName + \"</title>\\n<meta>\" + author + \"</meta>\";\n\n File file = new File(directory);\n\n try{\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\n writer.write(html);\n writer.close();\n return directory;\n }catch(Exception e){\n return \"Directory is messed up\";\n }\n }", "public static void otvoriFajl() {\r\n\t\tJFileChooser fc = new JFileChooser();\r\n\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Gym files\", \"gym\");\r\n\r\n\t\tfc.setFileFilter(filter);\r\n\t\tfc.setCurrentDirectory(new File(\".\"));\r\n\t\tint izbor = fc.showOpenDialog(teretanaGui.getContentPane());\r\n\r\n\t\tif (izbor == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile f = fc.getSelectedFile();\r\n\r\n\t\t\tString fileName = f.getAbsolutePath();\r\n\r\n\t\t\tpath = fileName;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tlistaClanova.ucitajIzFajla(fileName);\r\n\t\t\t\tpopuniTabelu();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(teretanaGui.getContentPane(), \"Greska pri ucitavanju clanova!\", \"Greska\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@GET\n @Path(\"/data/add\")\n @Produces(\"text/html\")\n public String addFile()throws IOException {\n\n if(!login)\n return logIn();\n\n System.out.println(commandes.getCurrentDir());\n if(commandes.CMDCWD(\"/data\")){\n return \"<!DOCTYPE html>\"+\n \"<html>\"+\n \"<head>\t\"+\n \"<meta charset=\\\"utf-8\\\" />\"+\n \"<title>Add File</title>\"+\n\n \"</head>\"+\n \"<body>\"+\n \"<label for=\\\"name\\\">Name</label>\"+\n \"<input type=\\\"text\\\" name=\\\"name\\\" id=\\\"name\\\"/>\"+\n \"<br/>\"+\n \"Content :\"+\n \"<TEXTAREA id=\\\"content\\\" NAME=\\\"content\\\" COLS=40 ROWS=6></TEXTAREA>\"+\n \"<br/>\"+\n \"<button onclick= \\\"p()\\\">Submit</button>\"+\n \"<script type=\\\"text/javascript\\\">\"+\n \"function p(){\"+\n \"console.log(\\\"Ici\\\");\"+\n \"xhr=window.ActiveXObject ? new ActiveXObject(\\\"Microsoft.XMLHTTP\\\") : new XMLHttpRequest();\"+\n \"xhr.onreadystatechange=function(){};\"+\n \"xhr.open(\\\"PUT\\\", \\\"http://localhost:8080/rest/tp2/res/data\\\");\"+\n \"xhr.send(null);\"+\n \"};\"+\n \"</script>\"+\n \"<form action=\\\"/rest/tp2/res/data\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Return\\\">\"+\n \"</form></br>\"+\n \"</body>\"+\n \"</html>\";\n }\n return \"<h1>PATH NOT FOUND</h1>\";\n }", "private void setTemplateFile() throws IOException, BusinessException, ObjectNotFoundException, JackrabbitException,\n CertitoolsAuthorizationException, BadElementException {\n super.setFolder(folder);\n if (fileTemplate1 != null) {\n String folderPath;\n if (insertFolderFlag) {\n folderPath = folderId + \"/folders/\" + folder.getName();\n } else {\n folderPath = PlanUtils.getParentPath(folderId) + \"/folders/\" + folder.getName();\n }\n\n Template1Diagram template1Diagram = new Template1Diagram(new Resource(\"/\" + fileTemplate1.getFileName(),\n fileTemplate1.getFileName(),\n fileTemplate1.getContentType(), fileTemplate1.getInputStream(),\n \"\" + fileTemplate1.getSize(), true),\n PlanUtils.convertResourceToHTML(folderPath, getContext().getRequest().getContextPath(),\n getModuleTypeFromEnum()));\n if (replaceImageMap == null) {\n replaceImageMap = Boolean.FALSE;\n }\n if (!insertFolderFlag && !replaceImageMap) {\n\n Folder previousVersion =\n planService.findFolder(folderId, true, getUserInSession(), getModuleTypeFromEnum());\n try {\n TemplateWithImage previousTemplate = (TemplateWithImage) previousVersion.getTemplate();\n String htmlContent = template.getImageMap();\n Image newImage = TemplateWithImageUtils.getImage(fileTemplate1.getInputStream());\n Image oldImage = TemplateWithImageUtils.getImage(previousTemplate.getResource().getData());\n\n String unescapedHtml = StringEscapeUtils.unescapeHtml(htmlContent);\n\n String htmlResultContent = TemplateWithImageUtils.resizeImageMap(unescapedHtml, oldImage, newImage);\n\n if(htmlResultContent != null){\n template1Diagram.setImageMap(htmlResultContent);\n }\n } catch (ClassCastException ex) {\n //Do nothing\n }\n }\n super.setTemplateToFolder(template1Diagram);\n\n } else {\n Folder dbFolder = planService.findFolder(folderId, false, getUserInSession(), getModuleTypeFromEnum());\n //User does not changed template\n if (dbFolder.getTemplate().getName().equals(Template.Type.TEMPLATE_DIAGRAM.getName())) {\n Template1Diagram dbTemplate1Diagram = (Template1Diagram) dbFolder.getTemplate();\n //set old resource and update image Map\n super.setTemplateToFolder(\n new Template1Diagram(dbTemplate1Diagram.getResource(), template.getImageMap()));\n } else {\n //User changed template to this one, and do not upload image, so create empty template\n super.setTemplateToFolder(new Template1Diagram());\n }\n }\n }", "public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }", "Path getContent(String filename);", "private static JEditorPane editorPane()\n {\n try\n {\n JEditorPane editor = new JEditorPane(); //this will be the editor returned\n editor.setPage(Resources.getResource(filename)); //gives the editor the URL of the HTML file\n editor.setEditable(false); //prevents the about page from being edited\n return editor; //return the editor which is now displaying the HTML file\n } catch(Exception e){\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, \"ERROR: could not access about.HTML file\");\n return null; //if the editor could not be built\n }\n }", "public static void pokreniTagNadSvima(File[] files){\n\t for (File file : files) {\n\t \tif (file.isDirectory()) {\n\t //System.out.println(\"Directory: \" + file.getName());\n\t \t\tpokreniTagNadSvima(file.listFiles()); // Calls same method again.\n\t } else \n\t if(!file.getPath().contains(\".DS_Store\")){\n\t \t//System.out.println(file.getPath());\n\t \t //System.out.println(file.getAbsolutePath());\n\t \t//tekstovi.put((String)file.getPath(), vratiStringFajla((String)file.getPath()));\n\t \tnapraviTextFajloveKonacne(file.getAbsolutePath());\n\t \t//System.out.println((String)file.getPath()+vratiStringFajla((String)file.getPath()));\n\t }\n\t }\n\t \n\t \n\t\t//napraviTextFajloveKonacne(putanjaDoFajla)\n\t}", "public void generateHtml(String title, List<HtmlData> data, FilePathToUrl filePathToUrl)\n throws IOException {\n String content = generateHtmlLayout(title, data);\n createFile(filePathToUrl.getFilePath(), content);\n FileUtil.saveResource(getClass().getResourceAsStream(\"/docs/stylesheets/asciidoctor.css\"),\n \"asciidoctor.css\", false);\n }", "private void loadArticle() {\n String filename = getFilesDir().getAbsolutePath() + \"/article\" + article.getId();\n if (Build.VERSION.SDK_INT >= 19)\n filename += \".mht\";\n File file = new File(filename);\n if (file.exists()) {\n Log.i(\"loadArticle\", \"Article loaded successfully\");\n // Pro novejsi verze systemu\n if (Build.VERSION.SDK_INT >= 19) {\n webView.loadUrl(\"file://\" + filename);\n return;\n }\n try {\n InputStream is = new FileInputStream(file);\n WebArchiveReader wr = new WebArchiveReader() {\n public void onFinished(WebView v) {\n continueWhenLoaded(v);\n }\n };\n if (wr.readWebArchive(is)) {\n wr.loadToWebView(webView);\n }\n } catch (IOException e) {\n article.setSaved(false);\n db.updateArticle(article);\n webView.loadUrl(article.getLink());\n Toast.makeText(ArticleActivity.this, getResources().getString(R.string.save_not_found), Toast.LENGTH_SHORT).show();\n }\n } else {\n // Ulozeny clanek nenalezen, bude nacten ze site\n article.setSaved(false);\n db.updateArticle(article);\n webView.loadUrl(article.getLink());\n Toast.makeText(ArticleActivity.this, getResources().getString(R.string.save_not_found), Toast.LENGTH_SHORT).show();\n }\n }", "public static void main(String[] args) {\r\n // Getting directory of file.\r\n String userDirectory = System.getProperty(\"user.dir\");\r\n File pathOfHTML = new File(userDirectory + \"\\\\\" + NAMEOFHTML);\r\n SearchFiles searchFiles = new SearchFiles();\r\n BuildHTML report = new BuildHTML();\r\n // Create HTML table of files from this directory.\r\n report.createHTML(pathOfHTML, searchFiles.searchFiles(new File(userDirectory)));\r\n }", "@Test\n\tpublic void testUsingTempFolder1() throws IOException {\n\t\tFile createdFile= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title</title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = \"This is title\"; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile);\n\t\tassertEquals(res,result); \n\t}", "void downloadProjectedEto(File file, int id) throws IOException, SQLException;", "public void createHTMLpage(String jarFilename) {\r\n\t\tJFileChooser chooser = OSPRuntime.createChooser(\"HTML\", new String[] { \"html\" });\r\n\t\tchooser.setSelectedFile(new File(getModelClassname() + \".html\"));\r\n\t\tString filename = OSPRuntime.chooseFilename(chooser, popupTriggeredBy, true); // true = to save\r\n\t\tif (filename == null)\r\n\t\t\treturn;\r\n\t\tif (filename.lastIndexOf('.') < 0)\r\n\t\t\tfilename += \".html\";\r\n\r\n\t\tComponent mainWindow = getView().getComponent(getMainWindow());\r\n\t\tDimension size = new Dimension(100, 100);\r\n\t\tif (mainWindow != null)\r\n\t\t\tsize = mainWindow.getSize();\r\n\r\n\t\tString name = getClass().getName();\r\n\t\t// System.out.println (\"Classname = \"+name);\r\n\t\tif (name.endsWith(\"Simulation\"))\r\n\t\t\tname = name.substring(0, name.length() - 10);\r\n\t\tname += \"Applet.class\";\r\n\t\tString programName = getModelClassname();\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\tbuffer.append(\"<html>\\n\");\r\n\t\tbuffer.append(\" <head>\\n\");\r\n\t\tbuffer.append(\" <title>\" + programName + \" HTML</title>\\n\");\r\n\t\tbuffer.append(\" </head>\\n\");\r\n\t\tbuffer.append(\" <body >\\n\");\r\n\t\tbuffer.append(\" <applet code=\\\"\" + name + \"\\\"\\n\");\r\n\t\tbuffer.append(\" codebase=\\\".\\\" archive=\\\"\" + jarFilename + \"\\\"\\n\");\r\n\t\tbuffer.append(\" name=\\\"\" + programName + \"\\\" id=\\\"\" + programName + \"\\\"\\n\");\r\n\t\tbuffer.append(\" width=\\\"\" + size.width + \"\\\" height=\\\"\" + size.height + \"\\\">\\n\");\r\n\t\tbuffer.append(\" <param name=\\\"permissions\\\" value=\\\"sandbox\\\">\\n\");\r\n\t\tbuffer.append(\" </applet>\\n\");\r\n\t\tbuffer.append(\" </body>\\n\");\r\n\t\tbuffer.append(\"</html>\\n\");\r\n\r\n\t\ttry {\r\n\t\t\tFileWriter fout = new FileWriter(filename);\r\n\t\t\tfout.write(buffer.toString());\r\n\t\t\tfout.close();\r\n\t\t} catch (Exception exc) {\r\n\t\t\texc.printStackTrace();\r\n\t\t\tJOptionPane.showMessageDialog(popupTriggeredBy, \"Error saving file: \" + filename, \"File Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws IOException,FileNotFoundException,NullPointerException {\n\t\tint _fileNumber = 1;\n\t\ttry {\n\t\t\tFile _directory = new File(\"C:\\\\Users\\\\Aayush\\\\Desktop\\\\Advance Computing Concepts\\\\W3C Web Pages\");\n\t\t\tFile[] _fileArray = _directory.listFiles();\n\t\t\tFile[] _fileArray2 = new File[102];\n\t\t\tint _numberOfFiles=0;\n\t\t\tfor(int _i=0;_i<(_fileArray.length);_i++)\n\t\t\t{\n\t\t\t\tif(_fileArray[_i].isFile())\n\t\t\t\t{\n\t\t\t\t\t_fileArray2[_numberOfFiles] = _fileArray[_i];\n\t\t\t\t\t_numberOfFiles++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<100;i++)\n\t\t\t{\n\t\t\t\tconvertHtmlToText(_fileArray2[i],_fileNumber);\n\t\t\t\t_fileNumber = _fileNumber + 1;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception:\"+e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n String startDir = \"E:/DEKSTOP/Projets/photosortTest\";\n\n //We list what is in this folder :\n\n System.out.println(\"\\n\\n\\nListing of files recursively : \\n\");\n\n printListFilesRecursive(startDir);\n\n //Then we create 2 directories\n createDirectory(startDir, \"css_files\");\n createDirectory(startDir, \"js_files\");\n\n //Then we select all the js file and move it to /js_file, same for css files\n List<String> list_js = new ArrayList<>();\n List<String> list_css = new ArrayList<>();\n\n listFilesRecursiveByExtension(startDir,\"js\",list_js);\n listFilesRecursiveByExtension(startDir,\"css\",list_css);\n\n for (String item_js : list_js){\n copyFile(item_js,startDir+\"/js_files\",new File(item_js).getName());\n }\n\n\n for (String item_css : list_css){\n copyFile(item_css,startDir+\"/css_files\",new File(item_css).getName());\n }\n System.out.println(\"Listing of file dummy : \\n\");\n //array in which we will store the names of files and directories\n\n printDummyListFiles(startDir);\n\n\n\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n }", "public File getTemplateFile();", "@Test\n\tpublic void testLocalLinkHTML(){\n\t\t\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick.parser.html-switch\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tTestUtils.view().getTextArea().scrollTo(893,false);\n \tgotoPositionAndWait(893);\n \tPause.pause(2000);\n \tHyperlinkSource src = new HTMLHyperlinkSource();\n\t\tfinal Hyperlink h = src.getHyperlink(b, 893);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileAndGotoHyperlink);\n\t\tassertEquals(29, h.getStartLine());\n\t\tassertEquals(29, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\t// moved same file, but below\n\t\tassertEquals(b.getPath(),TestUtils.view().getBuffer().getPath());\n\t\tassertEquals(114, TestUtils.view().getTextArea().getCaretLine());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "public void compDirFiles(String dir1,String dir2) throws Exception{\n\t\tFile file1=new File(dir1);\n\t\tFile file2=new File(dir2);\n\t\tif(!file1.isDirectory()){\n\t\t\tSystem.out.println(dir1+\" is not a directory!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tif(!file2.isDirectory()){\n\t\t\tSystem.out.println(dir2+\" is not a directory!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tHashMap map=compare(file1,file2);\n\t\tmap.put(\"templateFtl\", \"fileList.html.ftl\");\n\t\tint noExistsFiles=((HashMap)map.get(\"noExistsMap\")).keySet().size();\n\t\tint noEqualFiles=((HashMap)map.get(\"diffMap\")).keySet().size();\n\t\tSystem.out.println(noExistsFiles);\n\t\tSystem.out.println(noEqualFiles);\n\t\tif(((HashMap)map.get(\"noExistsMap\")).keySet().size()==0){\n\t\t\tSystem.out.println(\"测试文件夹所有文件都在生成文件夹中存在!\");\n\t//\t\tSystem.exit(0);\n\t\t}\n\t\tSystem.out.println(\"测试文件夹中以下文件在生成文件夹中不存在!\");\n\t\t\n\t\tHashMap diffMap=(HashMap)map.get(\"diffMap\");\n\t\tIterator diffIter=diffMap.keySet().iterator();\n\t\twhile(diffIter.hasNext()){\n\t\t\tString fileName=(String)diffIter.next();\n\t\t\tString fileName2=dir2+fileName.substring(dir1.length());\n\t\t\t\n\t\t\t\n\t\t\tFileDiff.getDiffResultFile(fileName, fileName2);\n\t\t}\n \tHtmlFileReport.printResultHtml(map);\n \t\n \t\n\t}", "public static void main(String[] args) throws MalformedURLException, URISyntaxException, IOException {\n File file = new File(\"../index.html\");\n\n Desktop desktop = Desktop.getDesktop();\n if (file.exists()) {\n desktop.open(file);\n System.out.println(\"Archivo abierto\");\n } else {\n System.out.println(\"Archivo no existe\");\n }\n\n }", "public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}", "public static void zapisPliku(String nazwaPlikuZapis) throws IOException{\n FileWriter plikZapisz = null;\n try {\n // tworzy nowy plik jeżeli nie istnieje, w przeciwnym przypadku\n // usuwa zawartość pliku i nadpisuje od początku\n plikZapisz = new FileWriter(nazwaPlikuZapis);\n //zapis łańcucha\n plikZapisz.write(tekstDoZapisu);\n //zapis po znaku\n for (char znak = 'a'; znak <='z'; znak++){\n plikZapisz.write(znak);\n plikZapisz.write('\\n');\n }\n }finally {\n if (plikZapisz != null){\n plikZapisz.close();\n }\n }\n }", "public static void main(String[] args) throws IOException {\n\n\t\tFile myObj = new File(\"filehtml.html\");\n\t\ttry {\n\t\t\tif (myObj.createNewFile()) // returns a boolean value: true if the file was successfully created\n\t\t\t{\n\t\t\t\tSystem.out.println(\"File created: \" + myObj.getName());\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"File already exists.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// stream connectivity\n\t\tFileWriter fw = new FileWriter(myObj,true);\n\t\tBufferedWriter writer = new BufferedWriter(fw);\n\t\twriter.write(\"<html><body><title>Way2Automation</title><h1>Learning Java</hi</body></html>\");\n\t\twriter.newLine();\n\t\twriter.close();\n\t\tSystem.out.println(\"FileCreated!..\");\n\n\t}", "public static void old_kategorien_aus_grossem_text_holen (String htmlfile) // alt, funktioniert zwar bis auf manche\n\t// dafür müsste man nochmal loopen um dien ächste zeile derü berschrift auch noch abzufangen bei <h1 class kategorie western\n\t// da manche bausteine in die nächste zeile verrutscht sind.\n\t// viel einfacher geht es aus dem inhaltsverzeichnis des katalogs die kategorien abzufangen.\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n // System.out.println(\"Gelesene Zeile: \" + zeile);\n \t\n \t\n \t// 1. Pruefe ob die Zeile eine Kategorie ist: wenn ja Extrahiere diese KATEGORIE aus dem Code:\n \t// Schema <h1 class=\"kategorie-western\"><a name=\"_Toc33522153\"></a>Bescheide\n \t// Rücknahme 44 X\t</h1>\n \t/*if (zeile.contains(\"<h1\"))\n \t\t\t{\n \t\t\t// grussformeln:\n \t\tzeile.replace(\"class=\\\"kategorie-western\\\" style=\\\"page-break-before: always\\\">\",\"\");\n \t\t\n \t\t\t}\n \t*/\n \t// der erste hat immer noch ein page-break before: drinnen; alle anderen haben dann kategorie western ohne drin\n \tif (zeile.contains(\"<h1 class=\\\"kategorie-western\\\"\"))\n \t\t\t/*zeile.contains(\"<h1 class=\\\"kategorie-western\\\">\") /*|| zeile.contains(\"</h1>\")*/\n \t{\n \t\tSystem.out.println (zeile + \"\\n\"); // bis hier werden alle kategorien erfasst !\n \t\t\n \t\t// hier passiert es, dass vllt. die kategorie in die nächste Zeile gerutscht ist:\n \t\t// daher nochmal loopen und mit stringBetween die nächste einfangen:\n \t\t\n \t\tString kategoriename = \"\";\n \t/*\tif (zeile.contains(\"</h1>\") && !zeile.contains(\"<h1 class=\")) // das ist immer der fall wenn es in die nächste zeile rutscht , weil der string zu lang ist:\n \t\t{\n \t\t\t kategoriename = zeile.replace(\"</h1>\", \"\");\n \t\t}\n \t\telse\n \t\t{\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t}*/\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t \n \t\t if (! zeile.contains(\"</h1>\")) // dann ist es in die nächste Zeile gerutscht\n \t\t {\n \t\t\t // hole nächste Zeile und vervollständige damit kategorie:\n \t\t }\n\n \t\tif (kategoriename == null || kategoriename ==\"\")\n \t\t{\n \t\t\t// keine kategorie adden (leere ist sinnlos)\n \t\t}\n \t\n \t\t\tif (kategoriename.contains(\"lass=\\\"kategorie-western\\\">\"))\n \t\t\t{\n \t\t\t\tkategoriename.replace(\"lass=\\\"kategorie-western\\\">\", \"\");\n \t\t\t}\n \t\t\n \t\t\t//System.out.println (kategoriename + \"\\n\");\n \t\t/*\tkategoriename.replace(\"lass=\",\"\");\n \t\t\tkategoriename.replace(\"kategorie-western\",\"\");\n \t\t\tkategoriename.replace(\"\\\"\",\"\");\n \t\t\tkategoriename.replace(\">\",\"\");\n \t\t\tkategoriename.replace(\"/ \",\"\");*/\n\t \t\t//mainobject.kategoriencombo.addItem(kategoriename);\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFileWriter fwk1 = new FileWriter (\"kategorien.txt\",true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n \t\t\n \t}\n \t\n\n \n \t// 2. Pruefe ob die Zeile der Name eines Textbausteins ist d.h. Unterkateogrie:\n \t//<p style=\"margin-top: 0.21cm; page-break-after: avoid\"><a name=\"_Toc33522154\"></a>\n \t//Ablehnung erneute Überprüfung</p>\n // System.out.println (\"Ermittle alle Unterkateogrien (d.h. Textbausteinnamen an sich)... 243\\n\");\n\n \tif (zeile.contains(\"<p style=\\\"margin-top: 0.21cm; page-break-after: avoid\\\"><a name=\"))\n \t{\n \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n \t\tif (unterkategorie == null || unterkategorie ==\"\")\n \t\t{\n \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n \t\t}\n \t\telse\n \t\t{\n \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n \t\t\t\n \t\t\t\n\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\t//mainobject.bausteinecombo.addItem(unterkategorie);\n\n \t\t\tcount_unterkategorien = count_unterkategorien+1; // anzahl der bausteine anhand der bausteinnamen ermitteln \n \t\t\t// Schreibe die unter Kategorien in Textfile:\n\t \t\tFileWriter fwk2 = new FileWriter (\"unterkategorien.txt\",true);\n\t \t\tfwk2.write(unterkategorie+\"\\n\");\n\t \t\tfwk2.flush();\n\t \t\tfwk2.close();\n\n \t\t//unterkategorienamen[count_unterkategorien] = unterkategorie;\n \t\t// (= hier unterkateogrienamen)\n \t\t\n \t\t\n \t // parts.length = anzahl der bausteine müsste gleich count_unterkategorien sein.\n \t // jetzt zugehörigen baustein reinschreiben:\n \t // also je nach count_unterkateogerien dann den parts[count] reinschrieben:\n \t /* try {\n \t\t\tfwb.write(parts[count_unterkategorien]);\n \t\t} catch (IOException e) {\n \t\t\t// TODO Auto-generated catch block\n \t\tSystem.out.println(\"503 konnte datei mit baustein nicht schreiben\");\n \t\t}\n \t \n \t */\n \t \n\n \t\t}\n \t\t\n \t\t\n \t\t \n \t} // if zeile contains\n \t\t \n \n }\t// while\n \n } // try\n catch (Exception y)\n {}\n \t\t \n \t\t \n\t \t// <p style=\"margin-left: 0.64cm; font-weight: normal\"> usw... text </p> sthet immer dazwischen\n\t \t/*if (zeile.contains(\"<p style=\\\"margin-left: 0.64cm; font-weight: normal\\\">\"))\n\t \t{\n\t \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n\t \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n\t \t\tif (unterkategorie == null || unterkategorie ==\"\")\n\t \t\t{\n\t \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n\t \t\t\t\n\t \t\t\t\n\t\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\tmainobject.bausteinecombo.addItem(unterkategorie);\n\t \t\t}\n\t \t}\n\t \t*/\n System.out.println (\"Alle Oberkategorien, Namen erfolgreich ermittelt und eingefügt 239\\n\");\n\n System.out.println (\"Alle Unterkategorien oder Bausteinnamen erfolgreich eingefügt 267\\n\");\n\n \n \n\t}", "public void fileSave()\n {\n try\n {\n // construct the default file name using the instance name + current date and time\n StringBuffer currentDT = new StringBuffer();\n try {\n currentDT = new StringBuffer(ConnectWindow.getDatabase().getSYSDate());\n }\n catch (Exception e) {\n displayError(e,this) ;\n }\n\n // construct a default file name\n String defaultFileName;\n if (ConnectWindow.isLinux()) {\n defaultFileName = ConnectWindow.getBaseDir() + \"/Output/RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n else {\n defaultFileName = ConnectWindow.getBaseDir() + \"\\\\Output\\\\RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setSelectedFile(new File(defaultFileName));\n File saveFile;\n BufferedWriter save;\n\n // prompt the user to choose a file name\n int option = fileChooser.showSaveDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n\n // force the user to use a new file name if the specified filename already exists\n while (saveFile.exists())\n {\n JOptionPane.showConfirmDialog(this,\"File already exists\",\"File Already Exists\",JOptionPane.ERROR_MESSAGE);\n option = fileChooser.showOpenDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n }\n }\n save = new BufferedWriter(new FileWriter(saveFile));\n saveFile.createNewFile();\n\n // create a process to format the output and write the file\n try {\n OutputHTML outputHTML = new OutputHTML(saveFile,save,\"Database\",databasePanel.getResultCache());\n outputHTML.savePanel(\"Performance\",performancePanel.getResultCache(),null);\n// outputHTML.savePanel(\"Scratch\",scratchPanel.getResultCache(),scratchPanel.getSQLCache());\n\n JTabbedPane scratchTP = ScratchPanel.getScratchTP();\n \n for (int i=0; i < scratchTP.getComponentCount(); i++) {\n try {\n System.out.println(\"i=\" + i + \" class: \" + scratchTP.getComponentAt(i).getClass());\n if (scratchTP.getComponentAt(i) instanceof ScratchDetailPanel) {\n ScratchDetailPanel t = (ScratchDetailPanel)scratchTP.getComponentAt(i);\n System.out.println(\"Saving: \" + scratchTP.getTitleAt(i));\n outputHTML.savePanel(scratchTP.getTitleAt(i), t.getResultCache(), t.getSQLCache());\n }\n } catch (Exception e) {\n // do nothing \n }\n }\n }\n catch (Exception e) {\n displayError(e,this);\n }\n\n // close the file\n save.close();\n }\n }\n catch (IOException e)\n {\n displayError(e,this);\n }\n }", "public void uploadFile() throws IOException {\n\n\t\t// Provera da li ima jos mesta za upload (samo za standard korisnike -\n\t\t// ogranicenje je 4 fajla)\n\t\tfor (User u : Server.dataBase)\n\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\tif (u.getTipKorisnika().toString().equals(\"STANDARD\"))\n\t\t\t\t\tif (u.getBrojFajlova() > 3)\n\t\t\t\t\t\tpom = \"***ogranicenje\";\n\n\t\tif (pom.equals(\"***ogranicenje\")) {\n\t\t\tclientOutput.println(\"Dostignut je maksimalan broj fajlova!\");\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tclientOutput.println(\n\t\t\t\t\t\">>> Unesite relativnu putanju do fajla koji zelite da upload-ujete, zajedno sa imenom fajla: \");\n\t\t\tuserInput = clientInput.readLine();\n\n\t\t\tclientOutput.println(\n\t\t\t\t\t\">>> Unesite relativnu putanju do mesta gde zelite da upload-ujete fajl, zajedno sa imenom fajla: \");\n\t\t\tuserInput = clientInput.readLine();\n\n\t\t\tuserInput = \"drive/\" + username + \"/\" + userInput;\n\t\t\tdestinacija = new File(userInput);\n\t\t\tdestinacija.createNewFile();\n\n\t\t\tif (destinacija.getName().endsWith(\".txt\")) {\n\t\t\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(userInput)));\n\t\t\t\tpom = null;\n\n\t\t\t\tdo {\n\t\t\t\t\tuserInput = clientInput.readLine();\n\t\t\t\t\tif (userInput.equals(\"***kraj\"))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (pom != null)\n\t\t\t\t\t\tpw.print(\"\\n\");\n\t\t\t\t\tpw.print(userInput);\n\t\t\t\t\tpom = \"upis\";\n\t\t\t\t\tclientOutput.println(userInput);\n\t\t\t\t} while (true);\n\t\t\t\tpw.close();\n\t\t\t\tfor (User u : Server.dataBase)\n\t\t\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\t\t\tu.setBrojFajlova(u.getBrojFajlova() + 1);\n\t\t\t} else {\n\t\t\t\tuserInput = clientInput.readLine();\n\t\t\t\ttry {\n\t\t\t\t\tFileOutputStream fOut = new FileOutputStream(destinacija);\n\t\t\t\t\tbyte[] b = Base64.getDecoder().decode(userInput);\n\t\t\t\t\tfOut.write(b);\n\t\t\t\t\tfOut.close();\n\t\t\t\t\tfor (User u : Server.dataBase)\n\t\t\t\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\t\t\t\tu.setBrojFajlova(u.getBrojFajlova() + 1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public WebFile getFile() { return _file; }", "public String saveToClasspath(FormFile file, String newName, String path) {\n\t\t\n\t\tString webroot=\"/WEB-INF/classes/\";\n\t\tString filePath=\"file:/\";\n\t\tString absPath=LoadServiceImpl.class.getResource(\"\").toString();\n\t\tString packagePath=LoadServiceImpl.class.getPackage().getName();\n\t\tpackagePath=packagePath.replace(\".\",\"/\");\n\t\twebroot=webroot+packagePath+\"/\";\n\t\tabsPath=absPath.replaceFirst(filePath,\"\");\n\t\tabsPath=absPath.replaceAll(webroot,path);\n\t\treturn saveToLocal(file,newName,absPath);\n\t}", "public void write(File dir, String name) {\r\n try {\r\n PrintWriter out = new PrintWriter(new FileWriter(new File(dir, name + \".html\")));\r\n // Add an HTML \"BASE\" element with the original URL so that\r\n // image and link references in the page will be properly \"based\" and work correctly.\r\n // Ideally, this command should be added to the <head> part of the document; however,\r\n // many documents don't have explicit <head>'s and putting it at the from of the\r\n // document seems to work since browsers are robust to \"ungrammatical\" HTML\r\n out.println(\"<base href=\\\"\" + addEndSlash(link.getURL()) + \"\\\">\");\r\n out.print(text);\r\n out.close();\r\n }\r\n catch (IOException e) {\r\n System.err.println(\"HTMLPage.write(): \" + e);\r\n }\r\n }", "public void processFile() {\n Matcher m = css.matcher(html);\n html = m.replaceAll(matchResult -> {\n String location = File.relative(this.file, matchResult.group(1));\n String stylesheet = File.readFrom(location);\n File loc = new File(location).getParentFile();\n Matcher urlMatcher = url.matcher(stylesheet);\n stylesheet = urlMatcher.replaceAll(match -> {\n String s = \"url(\\\"\" + File.relative(loc, match.group(1)) + \"\\\")\";\n return s.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\n });\n loc.close();\n return String.format(\"<style type=\\\"text/css\\\">%n%s%n</style>\", stylesheet);\n });\n replaceItAll(js, \"<script type=\\\"text/javascript\\\">%n%s%n</script>\", s -> File.readFrom(file.getAbsolutePath() + \"\\\\\" + s));\n }", "public PoaMaestroMultivaloresHTML(PoaMaestroMultivaloresHTML src) {\n/* 271 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 273 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 275 */ syncAccessMethods();\n/* */ }", "public void getCache(int docid){\n try {\n FileReader fr;\n String file_name = ServerThread.collection_path+docid+\".html\";\n fr = new FileReader(file_name);\n BufferedReader file_input = new BufferedReader(fr);\n String line;\n String file_content=\"\";\n while ((line = file_input.readLine()) != null) {\n file_content += line;\n }\n fr.close(); \n send(file_content);\n //System.out.println(file_content); \n } \n catch (IOException ex) {\n Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Could not access file: \"+docid);\n } \n }", "private void uploadLocalDocument(){\t\t\n\t\tif(getFileChooser(JFileChooser.FILES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tNode node = null;\n\t\t\ttry {\n\t\t\t\tnode = alfrescoDocumentClient.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t\t//Node node = alfrescoManager.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\t\t\n\t\t\tif(node!=null){\n\t\t\t\tgetDynamicTreePanel().getChildFiles(getTreeSelectedDefaultMutableNode());\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha subido correctamente.\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al subir el documento.\");\n\t\t}\n\t\t//el boton solo esta activo si un directorio esta seleccionado en el arbol directorios\n\t\t//se abre un filechooser y se elije un documento\n\t\t//solo se sube a alfresco, no se asocia automaticamente\n\t\t//se enviara la instancia de File() con el fichero seleccionado\n\t\t//se crea el fichero en alfresco, se recupera el nodo y se añade a la tabla actual (se hace de nuevo la peticion a getChildFiles())\n\t}", "public Files files();", "public static String getDirectoryContentAsHtml(File file, String uri) {\n\t\tStringBuilder dirContent = new StringBuilder(\"<html><head><title>Index of \");\n\t\tdirContent.append(uri);\n\t\tdirContent.append(\"</title></head><body><h1>Index of \");\n\t\tdirContent.append(uri);\n\t\tdirContent.append(\"</h1><hr><pre>\");\n\t\t\n\t\tFile[] files = file.listFiles();\n for (File subfile : files) {\n \tdirContent.append(\" <a href=\\\"\" + subfile.getPath() + \"\\\">\" + subfile.getPath() + \"</a>\\n\");\n }\n dirContent.append(\"<hr></pre></body></html>\");\n \n return dirContent.toString();\n\t}", "public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}", "public static void main(String[] args) throws IOException \n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tFile dir = new File(\"C:\\\\apache-tomcat-7.0.52\\\\webapps\\\\proj\");\t \n\t\t dir.mkdir();\n\t\t \n\t\t /* File dir1 = new File(\"C:\\\\Root\\\\module\");\n\t\t dir1.mkdir();\n\t\t \t \n\t\t File dir2 = new File(\"C:\\\\Root\\\\module\\\\file\"); \n\t\t dir2.mkdir(); \n\t\t \n\t\t File f=new File(\"C:\\\\Root\\\\module\\\\file\\\\rid.txt\");\n\t\t\tf.createNewFile();\n\t\t\tFileWriter fw=new FileWriter(f);\n\t\t\tfw.write(\"hi ridd\");\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\t\n\t\t\t File f1=new File(\"C:\\\\Root\\\\module\\\\file\\\\vid.txt\");\n\t\t f1.createNewFile();\n\t\t FileWriter fw1=new FileWriter(f1);\n\t\t\tfw1.write(\"hi vidd\");\n\t\t\tfw1.flush();\n\t\t\tfw1.close();\n\n\t\t\t File f2=new File(\"C:\\\\Root\\\\module\\\\file\\\\khu.txt\");\n\t\t\t f2.createNewFile();\n\t\t\t FileWriter fw2=new FileWriter(f2);\n\t\t\t fw2.write(\"hi khu\");\n\t\t\t fw2.flush();\n\t\t\t fw2.close();\n\t\t\t \n\t\t\t File f3=new File(\"C:\\\\Root\\\\module\\\\file\\\\anu.txt\");\n\t\t\t f3.createNewFile();\n\t\t\t FileWriter fw3=new FileWriter(f3);\n\t\t\t fw3.write(\"hi anuu\");\n\t\t fw3.flush();\n\t\t\t fw3.close();\n\t\t\t\t\t\t\n\t\t \n\t\t /*rename a file*/\n\t\t\t\t \n\t\t}", "public interface FileConfig {\n /**\n * get the mustache file path.\n * @return file path\n */\n String getPath();\n}", "private void generarDocP(){\n generarPdf(this.getNombre());\n }", "private static void getFile(String strFileName, String strURL, Boolean blnExtract)\r\n {\r\n String webPageContentsRaw = \"\";\r\n String webPageContentsCleaned = \"\";\r\n String webPageURL = strURL;\r\n INET net = new INET();\r\n\r\n\r\n\r\n if(!blnExtract)\r\n {\r\n System.out.println(strFileName);\r\n try {\r\n webPageContentsRaw = net.getURLRaw(webPageURL);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n webPageContentsCleaned = webPageContentsRaw.trim();\r\n\r\n if (strFileName.equals(strFileName.endsWith(\"data/FBIN.txt\")||strFileName.endsWith(\"data/World.txt\"))) {\r\n webPageContentsCleaned = net.getPREData(webPageContentsRaw);\r\n }\r\n\r\n webPageContentsCleaned = webPageContentsCleaned.trim();\r\n\r\n try {\r\n net.saveToFile(strFileName, webPageContentsCleaned);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "public static void main(String[] args) {\n\t\tPath ulaznaPutanja = Paths.get(\"input.txt\");\n\t\t\n\t\t// Neke zanimljivosti\n\t\tSystem.out.println(\"path.toString() = \" + ulaznaPutanja/*.toString()*/);\n\t\t\n\t\t// Npr ako je path: /home/korisnik/Desktop/input.txt\n\t\t// getFileName(): vratice se \"input.txt\"\n\t\t// getParent(): vratice se \"/home/korisnik\"\n\t\t// getRoot(): vratice se \"/\"\n\t\tSystem.out.println(\"Ime datoteke: \" + ulaznaPutanja.getFileName());\n\t\tSystem.out.println(\"Parent putanje: \" + ulaznaPutanja.getParent());\n\t\tSystem.out.println(\"Root: \" + ulaznaPutanja.getRoot());\n\t\t\n\t\t// Izuzetno koristan metod za slucaj da nam se ne pronalazi datoteka\n\t\t// koja je zadataka relativno (jer najcesce ne znamo od odnosu NA STA je relativno).\n\t\tSystem.out.println(\"Apsolutna putanja: \" + ulaznaPutanja.toAbsolutePath().toString());\n\t\tSystem.out.println();\n\t\t\n\t\t// ----------------------------------------------------------------------------------------\n\t\t// CITANJE\n\t\t// ----------------------------------------------------------------------------------------\n\t\ttry {\n\t\t\t// Liste i ostale genericke kolekcije u Javi ce biti obradjeni narednih casova.\n\t\t\t// Za sada, dovoljno nam je da znamo da iteriramo kroz listu.\n\t\t\t// StandardCharsets predstavlja klasu kojoj mozemo pronaci kodiranje koje nam je potrebno.\n\t\t\t// Na kursu cemo uvek specifikovati UTF_8.\n\t\t\tList<String> linije = Files.readAllLines(ulaznaPutanja, StandardCharsets.UTF_8);\n\t\t\tSystem.out.println(\"Sadrzaj datoteke:\" + ulaznaPutanja.toAbsolutePath());\n\t\t\tfor (String linija: linije)\n\t\t\t\tSystem.out.println(linija);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Neuspelo otvaranje ulazne datoteke!\");\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\t// ----------------------------------------------------------------------------------------\n\t\t// PISANJE\n\t\t// ----------------------------------------------------------------------------------------\n\t\tPath izlaznaPutanja = Paths.get(\"output.txt\");\n\t\tSystem.out.println(\"\\nPisemo u datoteku: \" + izlaznaPutanja.toAbsolutePath());\n\t\tList<String> linije;\n\t\t\n\t\t// Primer kako mozemo da inicijalizujemo listu (slicno poput int[] a = {1, 2, 3, 4};\n\t\tlinije = Arrays.asList(\"Zdravo\", \" \", \"svete\", \"!\");\n\n\t\ttry {\n\t\t\t// Klasa StandardOpenOption omogucava da specifikujemo na koji nacin se \"otvara\" datoteka.\n\t\t\t// Odnosno, da li da ukoliko postoji datoteka, ne uspe otvaranje (eng. File already exists),\n\t\t\t// da li da se pisanje vrsi tako sto se stari sadrzaj obrise, ili se ipak pise na kraj datoteke i slicno.\n\t\t\t// Ukoliko se ne specifikuju opcije java radi:\n // * StandardOpenOption.CREATE \t\t\t\t\t- kreira datoteku \n // * StandardOpenOption.TRUNCATE_EXISTING \t\t- brise prethodni sadrzaj ukoliko postoji\n\t\t\t// Files.write(izlaznaPutanja, linije);\n\t\t\tFiles.write(izlaznaPutanja, linije, StandardOpenOption.APPEND); \t// dodaje sadrzaj na kraj datoteke\n\t\t\tSystem.out.println(\"Sadrzaj je uspesno upisan!\");\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Neuspelo pisanje u datotekU!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setHtmldir(String htmldir) \r\n {\r\n this.htmldir = htmldir;\r\n }", "public String FormatDirectory(File file, String path){\n\n\t\tString[] subFiles = file.list();\n\t\tString html = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\";\n\t\tfor(int i=0;i<subFiles.length;i++){\n\t\t\thtml += \"<a href=\" + path + \"/\" + subFiles[i] + \">\" + subFiles[i] + \"</a></br>\";\n\t\t}\n\t\treturn html;\n\t}", "public static void odczytZnakPoZnaku(String nazwaPlikuOdczyt) throws IOException {\n FileReader plikZPZ = null;\n try {\n plikZPZ = new FileReader(nazwaPlikuOdczyt);\n System.out.println(\"\\n\\nOdczyt pliku znak po znaku:\\n\");\n int znaki;\n //odczyt pliku znak po anaku i wyświetlenie na ekranie\n while ((znaki = plikZPZ.read()) != -1) {//jeśli znaki = -1 to znaczy koniec pliku\n System.out.println((char) znaki);\n }\n } finally {// klauzula finally służy do wykonania instrukcji\n // niezależnie od tego kiedy i w jaki sposób (normalnie lub\n // przez wyjątek) zostało zakończone wykonywanie bloku try\n if (plikZPZ != null) {\n plikZPZ.close();//zamknięcie pliku\n }\n }\n }", "private static void addProjectFiles(IProject newProject){\n \t//add README file\n \taddProjectFile(newProject , README_FILE_NAME , \"\" );\n \t//add ProviderClass\n \taddProjectFile(newProject , PROVIDER_SCRIPT_FILE_NAME , CLASSES_FOLDER+\"/\" );\n }", "public AdmClientePreferencialHTML(AdmClientePreferencialHTML src) {\n/* 209 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 211 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 213 */ syncAccessMethods();\n/* */ }", "public static void makeHtmlFile(String s,PrintWriter pw,String first,String second,String third)\n \t{\n \t pw.println(\"<!DOCTYPE html><html lang=\\\"en\\\"><head><meta charset=\\\"UTF-8\\\"><title>\"+s+\"</title><link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css\\\"></head>\");\n \t pw.println(\"<body id=\\\"body\\\"><div class=main id=\\\"main\\\"> </div>\");\n \t pw.println(\"<div id=\\\"\"+ first+\"\\\" class=\"+\"\\\"#\"+first+\"\\\"><h3>\"+first+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+second+\"\\\" class=\\\"#\"+second+\"\\\"><h3>\"+second+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+third+\"\\\" class=\\\"#\"+third+\"\\\"><h3>\"+third+\"</h3></div>\");\n \t pw.println(\"<script src=\\\"Main.js\\\"></script>\");\n \t pw.println(\"</body></html>\");\n\t \t pw.close();\n\t }", "public static void main(String[] args) {\n\t\tPath path = Paths.get(\"F:\\\\AccentureMayBatch\\\\JSTLProject\");\r\n\r\n\t\r\n\r\n\t\tSystem.out.format(\"toString: %s%n\", path.toString());\r\n\t\tSystem.out.format(\"getFileName: %s%n\", path.getFileName());\r\n\t\tSystem.out.format(\"getName(0): %s%n\", path.getName(0));\r\n\t\tSystem.out.format(\"getNameCount: %d%n\", path.getNameCount());\r\n\t\tSystem.out.format(\"subpath(0,2): %s%n\", path.subpath(0,2));\r\n\t\tSystem.out.format(\"getParent: %s%n\", path.getParent());\r\n\t\tSystem.out.format(\"getRoot: %s%n\", path.getRoot());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFiles.list(new File(\".\").toPath())\r\n\t\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tFiles.walk(new File(\".\").toPath())\r\n\t\t .filter(p -> !p.getFileName()\r\n\t\t .toString().startsWith(\".\"))\r\n\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\tFiles.lines(new File(\"./src/com/polaris/utility/PathDemo.java\").toPath())\r\n\t\t .map(s -> s.trim())\r\n\t\t .filter(s -> !s.isEmpty())\r\n\t\t .forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//finding path and sub path into string\r\n\t\t Path start = Paths.get(\".\");\r\n\t\t int maxDepth = 5;\r\n\t\t try (Stream<Path> stream = Files.find(start, maxDepth, (path2, attr) -> String.valueOf(path2).endsWith(\".java\"))) \r\n\t\t {\r\n\t\t String joined = stream\r\n\t\t .sorted()\r\n\t\t .map(String::valueOf)\r\n\t\t .collect(Collectors.joining(\"; \"));\r\n\t\t System.out.println(\"Found: \" + joined);\r\n\t\t } catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t \r\n\t\t\r\n\t\tPath source = Paths.get(\"./src/com/polaris/utility/PathDemo.java\");\r\n\t\tPath target = Paths.get(\"F:/yatrabakup\");\r\n\t\t\r\n/*\r\n\t\ttry {\r\n\t\t // Files.copy(source, target);\r\n\t\t} catch(FileAlreadyExistsException fae) {\r\n\t\t fae.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // something else went wrong\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\ttry (BufferedReader reader = Files.newBufferedReader(Paths.get(\"f:\\\\yatrabakup\\\\EmployeeData.csv\"))) {\r\n\t\t reader.lines().map(String::toLowerCase).forEach(System.out::println);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args){\n InputStream mdIs = App.class.getClassLoader().getResourceAsStream(\"14.html\");\n\n System.out.println(mdIs);\n int length = 0;\n\n byte[] bytes = new byte[1024];\n StringBuilder stringBuilder = new StringBuilder();\n try {\n\n while ((length = mdIs.read(bytes)) != -1){\n stringBuilder.append(new String(bytes,0,length,\"utf-8\"));\n }\n\n System.out.println(stringBuilder.toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "@Test\n public void createFile(){\n try\n {\n URI uri = new URI(\"http://www.yu.edu/documents/doc390\");//given the complete uri\n String path = uri.getAuthority() + this.disectURI(uri);//get the Path which is www.yu.edu\\documents\n File file = new File(baseDir.getAbsolutePath() + File.separator + path);//make a File with the full class path and with the \"URI Path\"\n Files.createDirectories(file.toPath());//create the directories we didn't have before, ie not apart of the baseDir\n\n File theFile = new File(file.getAbsolutePath() + File.separator + \"doc390.txt\");//create a new File with the document as the last piece\n //wrap in a try because if the file is already there than we don't need to create a file\n if(!theFile.exists())Files.createFile(theFile.toPath());//create this file in the computer\n\n //write to the file -- in the real application this is the writing of the json\n FileWriter fileWriter = new FileWriter(theFile);\n fileWriter.write(\"HaYom sishi BShabbos\");\n fileWriter.flush();\n fileWriter.close();\n\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "@GET\n @Path(\"/data/{name}\")\n @Produces(\"text/html\")\n public String getFile(@PathParam( \"name\" ) String name)throws IOException {\n\n if(!login)\n return logIn();\n\n if(commandes.CMDCWD(\"/data\")){\n String result = AdditionnalResources.searchFile(name);\n if(commandes.getCurrentDir().equals(\"data\")){\n result += \"<form action=\\\"/rest/tp2/ftp/\"+ commandes.getCurrentDir()+\"/\"+name+\"/edit\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Edit\\\">\"+\n \"</form>\";\n result += \"<button onclick= \\\"p()\\\">Delete</button>\"+\n \"<script type=\\\"text/javascript\\\">\"+\n \"function p(){\"+\n \"console.log(\\\"Ici\\\");\"+\n \"xhr=window.ActiveXObject ? new ActiveXObject(\\\"Microsoft.XMLHTTP\\\") : new XMLHttpRequest();\"+\n \"xhr.onreadystatechange=function(){};\"+\n \"xhr.open(\\\"DELETE\\\", \\\"http://localhost:8080/rest/tp2/ftp/data/\"+name+\"\\\");\"+\n \"xhr.send(null);\"+\n \"};\"+\n \"</script>\";\n result +=\"<form action=\\\"/rest/tp2/ftp/data\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Return\\\">\"+\n \"</form></br>\";\n }else{\n result +=\"<form action=\\\"/rest/tp2/ftp/\"+ commandes.getCurrentDir()+\"/add\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Add File\\\">\"+\n \"</form></br>\";\n result +=\"<form action=\\\"/rest/tp2/ftp/logout\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Logout\\\">\"+\n \"</form></br>\";\n }\n return result;\n }\n return \"<h1>PATH NOT FOUND</h1>\";\n }", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@GET\n @Path(\"/data/{dir}/{name}\")\n @Produces(\"text/html\")\n public String getFile(@PathParam( \"name\" ) String name,@PathParam( \"dir\" ) String dir)throws IOException {\n\n if(!login)\n return logIn();\n\n System.out.println(commandes.getCurrentDir());\n if(commandes.CMDCWD(\"/data/\"+dir)){\n String result = AdditionnalResources.searchFile(name);\n if(commandes.getCurrentDir().equals(\"data/\"+dir)){\n result += \"<form action=\\\"/rest/tp2/ftp/\"+commandes.getCurrentDir()+\"/\"+name+\"/edit\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Edit\\\">\"+\n \"</form></br>\";\n result += \"<button onclick= \\\"p()\\\">Delete</button>\"+\n \"<script type=\\\"text/javascript\\\">\"+\n \"function p(){\"+\n \"console.log(\\\"Ici\\\");\"+\n \"xhr=window.ActiveXObject ? new ActiveXObject(\\\"Microsoft.XMLHTTP\\\") : new XMLHttpRequest();\"+\n \"xhr.onreadystatechange=function(){};\"+\n \"xhr.open(\\\"DELETE\\\", \\\"http://localhost:8080/rest/tp2/ftp/data/\"+dir+\"/\"+name+\"\\\");\"+\n \"xhr.send(null);\"+\n \"};\"+\n \"</script>\";\n result +=\"<form action=\\\"/rest/tp2/ftp/data/\"+dir+\"\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Return\\\">\"+\n \"</form></br>\";\n }else{\n result +=\"<form action=\\\"/rest/tp2/ftp/\"+commandes.getCurrentDir()+\"/add\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Add File\\\">\"+\n \"</form></br>\";\n result +=\"<form action=\\\"/rest/tp2/ftp/logout\\\">\"+\n \"<input type=\\\"submit\\\" value=\\\"Logout\\\">\"+\n \"</form></br>\";\n }\n return result;\n\n }\n return \"<h1>PATH NOT FOUND</h1>\";\n }", "private static String getHTMLFile(String googleScholarURL) throws Exception {\r\n HTMLExtractor googleScholarParser = new HTMLExtractor();\r\n String rawHTMLString = googleScholarParser.getHTML(googleScholarURL);\r\n return rawHTMLString;\r\n }", "public void creaRutaImgPerfil(){\n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta de uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n \n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"users\"+File.separatorChar;\n \n //Asignacion de la ruta creada\n this.rutaImgPerfil=ruta;\n }", "private boolean createHTMLFiles(final DocTrees docTree,\n final Set<? extends Element> classes) throws IOException {\n\t\tboolean createdFiles = false;\n\t\tboolean documentationErrors = false;\n\t\tboolean invalidFileContent = false;\n\n\t\tfor (final Element clazz : classes) {\n // only add classes which are registered in our modules lookup table\n\t\t\tif (fModuleNodes.containsKey(clazz.toString())) {\n\t\t\t\t// class found to create help for\n\t\t\t\tfinal HTMLWriter htmlWriter = new HTMLWriter(clazz, fLinkProvider, fModuleNodes.get(clazz.toString()).getChildren(\"dependency\"), docTree);\n\t\t\t\tfinal String content = htmlWriter.createContents(fModuleNodes.get(clazz.toString()).getString(\"name\"));\n\n\t\t\t\tif (!htmlWriter.getDocumentationErrors().isEmpty()) {\n\t\t\t\t\tdocumentationErrors = true;\n\n\t\t\t\t\t// print errors\n\t\t\t\t\tSystem.out.println((fFailOnMissingDocs ? \"ERROR\" : \"WARNING\") + \": missing documentation content for \" + clazz + \":\");\n\t\t\t\t\tfor (final String errorMessage : htmlWriter.getDocumentationErrors())\n\t\t\t\t\t\tSystem.out.println(\"\\t\" + errorMessage);\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tverifyContent(content);\n\t\t\t\t} catch (final Exception e) {\n\t\t\t\t\tSystem.out.println((fFailOnHTMLErrors ? \"ERROR\" : \"WARNING\") + \": invalid file content for \" + clazz + \":\");\n\t\t\t\t\tSystem.out.println(\"\\t\" + e.getMessage());\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\tinvalidFileContent = true;\n\t\t\t\t}\n\n\t\t\t\t// write document\n\t\t\t\tfinal File targetFile = getChild(getChild(fRootFolder, \"help\"), createHTMLFileName(fModuleNodes.get(clazz.toString()).getString(\"id\")));\n\t\t\t\twriteFile(targetFile, content);\n\t\t\t\tcreatedFiles = true;\n\t\t\t}\n\t\t}\n\n\t\tif ((fFailOnMissingDocs) && (documentationErrors))\n\t\t\tthrow new IOException(\"Documentation is not complete\");\n\n\t\tif ((fFailOnHTMLErrors) && (invalidFileContent))\n\t\t\tthrow new IOException(\"Documentation invalid\");\n\n\t\treturn createdFiles;\n\t}", "public void exportToXML(String sciezka) {\n\t\tFile plik = new File(sciezka);\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\n\t\ttry\t{\n\t\t\tplik.createNewFile();\n\t\t\tFileWriter strumienZapisu = new FileWriter(plik);\n\t\t\tstrumienZapisu.write(\"<ListaZdarzen>\\n\");\n\t\t\tfor (int i=0; i < listaZdarzen.size(); i++) {\n\t\t\t\tstrumienZapisu.write(\"\\t<zdarzenie>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<id>\");\n\t\t\t\tstrumienZapisu.write(Integer.toString(listaZdarzen.get(i).getId()));\n\t\t\t\tstrumienZapisu.write(\"</id>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<data>\");\n\t\t\t\tstrumienZapisu.write(sdf.format(listaZdarzen.get(i).getDataZdarzenia()));\n\t\t\t\tstrumienZapisu.write(\"</data>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<nazwa>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getNazwa());\n\t\t\t\tstrumienZapisu.write(\"</nazwa>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<opis>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getOpis());\n\t\t\t\tstrumienZapisu.write(\"</opis>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<miejsce>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getMiejsce());\n\t\t\t\tstrumienZapisu.write(\"</miejsce>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t</zdarzenie>\\n\");\n\t\t\t}\n\t\t\tstrumienZapisu.write(\"</ListaZdarzen>\");\n\t\t\tstrumienZapisu.close();\n\t\t}\n\t\tcatch (IOException io)\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t{System.out.println(io.getMessage());}\n\t\tcatch (Exception se)\n\t\t\t{System.err.println(\"blad sec\");}\n\t}", "void downloadProjectedTrmm(File file, int id) throws IOException, SQLException;", "public void guardarArchivo(String nombre, byte[] contenido) {\n\t\tFileOutputStream fos = null;\r\n\t\t// tenemos un objeto de tipo file, aqui no se crea el archivo\r\n\t\tFile carpetaPrincipal = new File(\"C:\\\\java\\\\wildfly-9.0.2.Final\\\\welcome-content\\\\documentos\\\\clientes\");\r\n\t\t// se crea la carpeta\r\n\t\tcarpetaPrincipal.mkdir();\r\n\t\tString nombreSinEspacios = \"\";\r\n\t\tFile miArchivo = new File(\"C:\\\\java\\\\wildfly-9.0.2.Final\\\\welcome-content\\\\documentos\\\\clientes\\\\\" + nombre);\r\n\t\ttry {\r\n\t\t\tmiArchivo.createNewFile();// se crea el archivo\r\n\t\t\tfos = new FileOutputStream(miArchivo);\r\n\t\t\tfos.write(contenido); // en memoria se escribe el archivo\r\n\t\t\tfos.flush();// escribir en el disco y tambien\r\n\t\t\tSystem.out.println(\"path donde se guardo \" + carpetaPrincipal.getAbsolutePath());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tfos.close();// permite liberar el archivo\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tString nmArchivo = \"<a href=\\\"http://localhost:8081/documentos/clientes/\" + nombre + \"\\\" target=\\\"_blank\\\">\"\r\n\t\t\t\t+ nombre + \"</a><br/>\";\r\n\t\tSystem.out.println(\"filename:\" + nmArchivo);\r\n\t}", "public void save(File f) {\n\t\tif (f.exists()) {\r\n\t\t\tString filename = f.getName();\r\n\t\t\tString backName;\r\n\t\t\tif (filename.contains(\".\")) {\r\n\t\t\t\tbackName = filename.substring(0,filename.lastIndexOf('.'));\r\n\t\t\t\tbackName += \"_backup\";\r\n\t\t\t\tbackName += filename.substring(filename.lastIndexOf('.'));\r\n\t\t\t} else {\r\n\t\t\t\tbackName = filename + \"_backup\";\r\n\t\t\t}\r\n\t\t\tFile back = new File(f.getParent(),backName);\r\n\t\t\tSystem.out.println(\"Writing backup to: \"+back.getAbsolutePath());\r\n\t\t\tif (back.exists()) back.delete();\r\n\t\t\tFile newF = f;\r\n\t\t\tf.renameTo(back);\r\n\t\t\tf = newF;\r\n\t\t}\r\n\r\n\t\tFileOutputStream outputStream = null;\r\n\t\ttry {\r\n\t\t\tDocument doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();\r\n//\t\t\tb.append(\"<Map xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"map.xsd\\\">\");\r\n//\t\t\tProcessingInstruction pi = doc.createProcessingInstruction(\"xml-stylesheet\", \"type=\\\"text/xsl\\\" href=\\\"/assistantdm/static/CharacterSheetTemplate.xsl\\\"\");\r\n//\t\t\tdoc.appendChild(pi);\r\n\t\t\tXMLMapExporter processor = new XMLMapExporter(doc);\r\n\t\t\tmapPanel.executeProcess(processor);\r\n\t\t\tdoc.setXmlStandalone(true);\r\n\r\n\t\t\tTransformer trans = TransformerFactory.newInstance().newTransformer();\r\n\t\t\ttrans.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\ttrans.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\r\n\t\t\ttrans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\r\n\t\t\toutputStream = new FileOutputStream(f);\r\n\t\t\ttrans.transform(new DOMSource(doc), new StreamResult(outputStream));\r\n\t\t\tmapPanel.modified = false;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (outputStream != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toutputStream.close();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "private void storeToHtmlFile( final File aSelectedFile, final Asm45DataSet aAnalysisResult )\n {\n try\n {\n toHtmlPage( aSelectedFile, aAnalysisResult );\n }\n catch ( final IOException exception )\n {\n // Make sure to handle IO-interrupted exceptions properly!\n if ( !HostUtils.handleInterruptedException( exception ) )\n {\n LOG.log( Level.WARNING, \"HTML export failed!\", exception );\n }\n }\n }", "@Test\n public void testGetFile() {\n System.out.println(\"getFile with valid path of existing folder with 2 subfiles\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"+fSeparator+\"Users\"+fSeparator+\n \"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"+fSeparator+\"Texnologia2\"+fSeparator+\"Images\";\n FilesDao instance = new FilesDao();\n File expResult = new File(path+fSeparator+\"testImg.jpg\");\n File result;\n try{\n result = instance.getFile(path);\n }catch(EntryException ex){\n result = null;\n }\n assertEquals(\"Some message\",expResult, result);\n }", "public String saveToLocal(FormFile file, String newName, String path) {\n\t\tint ai=path.lastIndexOf(\"/\");\n\t\tif(ai<path.length())\n\t\t\tpath=path+\"/\";\n\t\tString type=null;\n\t\tString name=file.getFileName();\n\t\tint i=name.lastIndexOf(\".\");\n\t\ttype=name.substring(i+1,name.length());\n\t\tif(newName==null||newName.equals(\"\"))\n\t\t\tnewName=name;\n\t\telse\n\t\t{\n\t\t\tif(newName.lastIndexOf(\".\")==-1)\n\t\t\tnewName=newName+\".\"+type;\n\t\t}\n\t\ttry {\n\t\tFile f=new File(path);\n\t\tif(!f.exists())\n\t\t{\n\t\t\tf.mkdir();\n\t\t}\n\t\tf=new File(path+newName);\n\t\tif(!f.exists())\n\t\t{\n\t\t\t\n\t\t\t\tf.createNewFile();\n\t\t\t\n\t\t}\n\t\t\n\t\tFileOutputStream fos=new FileOutputStream(f);\n\t\tfos.write(file.getFileData());\n\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(this,e);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(this,e);\n\t\t}\n\t\treturn url+newName;\n\t}", "@GET\n\t@Produces(MediaType.TEXT_HTML)\n\tpublic String sayWelcome(){\n\t\t//System.out.println(\"This is a GET message---------\");\n\t\tString endHTML=\"\";\n\t\tString workingPath;\n\t\ttry {\n\t\t\t//workingPath = context.getResource(\"/WEB-INF\").getPath();\n\t\t\tStringBuffer fileData = new StringBuffer(1000);\n\t\t\t//Using the classLoader to get the file in the Classes\n\t\t\t//This method allow us to read the file from any web server\n\t\t\tInputStream uploadFileIS = GenerateHTMLDoc.class.getClassLoader().getResourceAsStream(\"/test/quick/UploadFile.html\");\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(uploadFileIS));\n\t\t\t//Tomcat use this\n\t\t\t//BufferedReader reader = new BufferedReader(new FileReader(\"../UploadFile.html\"));\n\t\t\tchar[] buf = new char[1024];\n\t\t\tint numRead=0;\n\t\t\twhile((numRead=reader.read(buf))!=-1){\n\t\t\t\tString readData = String.valueOf(buf,0,numRead);\n\t\t\t\tfileData.append(readData);\n\t\t\t\tbuf=new char[1024];\n\t\t\t}\n\t\t\treader.close();\n\t\t\tendHTML = fileData.toString();\n\t\t\treturn endHTML;\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\tif(endHTML == \"\"){\n\t\t\treturn \"<html> \" + \"<title>\" + \"Docorro - Special Document Generation Thingy\" + \"</title>\" + \n\t\t\"<body><h1>\" +\"Hello,\" +\n\t\t\t\t\" Welcome to Docorro!!!!\" + \"</h1></body>\" + \"</html>\";\n\t\t}else\n\t\t{\n\t\t\treturn endHTML;\n\t\t}\n\t}", "public void foreachResultCreateHTML(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n\n // call for a single ini file\n if (sInputPath.toLowerCase().endsWith(\".ini\") )\n {\n callEntry(sInputPath, _aParam);\n }\n else\n {\n // check if there exists an ini file\n String sPath = FileHelper.getPath(sInputPath); \n String sBasename = FileHelper.getBasename(sInputPath);\n\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n \n // Create a HTML page which shows locally to all files in .odb\n if (sInputPath.toLowerCase().endsWith(\".odb\"))\n {\n String sIndexFile = FileHelper.appendPath(sPath, \"index.ini\");\n File aIndexFile = new File(sIndexFile);\n if (aIndexFile.exists())\n { \n IniFile aIniFile = new IniFile(sIndexFile);\n\n if (aIniFile.hasSection(sBasename))\n {\n // special case for odb files\n int nFileCount = aIniFile.getIntValue(sBasename, \"reportcount\", 0);\n ArrayList<String> aList = new ArrayList<String>();\n for (int i=0;i<nFileCount;i++)\n {\n String sValue = aIniFile.getValue(sBasename, \"report\" + i);\n\n String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, sValue);\n if (sPSorPDFName.length() > 0)\n {\n aList.add(sPSorPDFName);\n }\n }\n if (aList.size() > 0)\n {\n // HTML output for the odb file, shows only all other documents.\n HTMLResult aOutputter = new HTMLResult(sPath, sBasename + \".ps.html\" );\n aOutputter.header(\"content of DB file: \" + sBasename);\n aOutputter.indexSection(sBasename);\n \n for (int i=0;i<aList.size();i++)\n {\n String sPSFile = aList.get(i);\n\n // Read information out of the ini files\n String sIndexFile2 = FileHelper.appendPath(sPath, sPSFile + \".ini\");\n IniFile aIniFile2 = new IniFile(sIndexFile2);\n String sStatusRunThrough = aIniFile2.getValue(\"global\", \"state\");\n String sStatusMessage = \"\"; // aIniFile2.getValue(\"global\", \"info\");\n aIniFile2.close();\n\n\n String sHTMLFile = sPSFile + \".html\";\n aOutputter.indexLine(sHTMLFile, sPSFile, sStatusRunThrough, sStatusMessage);\n }\n aOutputter.close();\n\n// String sHTMLFile = FileHelper.appendPath(sPath, sBasename + \".ps.html\");\n// try\n// {\n//\n// FileOutputStream out2 = new FileOutputStream(sHTMLFile);\n// PrintStream out = new PrintStream(out2);\n//\n// out.println(\"<HTML>\");\n// out.println(\"<BODY>\");\n// for (int i=0;i<aList.size();i++)\n// {\n// // <A href=\"link\">blah</A>\n// String sPSFile = (String)aList.get(i);\n// out.print(\"<A href=\\\"\");\n// out.print(sPSFile + \".html\");\n// out.print(\"\\\">\");\n// out.print(sPSFile);\n// out.println(\"</A>\");\n// out.println(\"<BR>\");\n// }\n// out.println(\"</BODY></HTML>\");\n// out.close();\n// out2.close();\n// }\n// catch (java.io.IOException e)\n// {\n// \n// }\n }\n }\n aIniFile.close();\n }\n\n }\n }\n }", "public boolean addDocument(File srcFile) {\n File destFile = new File(Main.mainObj.projectObj.projectPath + \"/\" + srcFile.getName());\r\n try {\r\n FileUtils.copyFile(srcFile, destFile);\r\n Main.mainObj.projectObj.textFiles.add(new Document(this.projectPath, srcFile.getName()));\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File Not found exception when initializing project\\n\" + ex);\r\n } catch (IOException exept) {\r\n System.out.println(\"IO Exception when initializing a previousl created project\\n\" + exept);\r\n }\r\n return true;\r\n\r\n }", "public void FileDownloadView(PojoPropuestaConvenio pojo) throws IOException {\n BufferedOutputStream out = null;\n try {\n String extension = null;\n String nombre = null;\n String contentType = null;\n InputStream stream = null;\n listadoDocumento = documentoService.getDocumentFindCovenio(pojo.getID_PROPUESTA());\n\n for (Documento doc : listadoDocumento) {\n if (doc.getIdTipoDocumento().getNombreDocumento().equalsIgnoreCase(TIPO_DOCUMENTO)) {\n if (getFileExtension(doc.getNombreDocumento()).equalsIgnoreCase(\"pdf\")) {\n stream = new ByteArrayInputStream(doc.getDocumento());\n nombre = doc.getNombreDocumento();\n extension = \"pdf\";\n }\n }\n }\n\n if (extension != null) {\n if (extension.equalsIgnoreCase(\"pdf\")) {\n contentType = \"Application/pdf\";\n }\n content = new DefaultStreamedContent(stream, contentType, nombre);\n } else {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, \"Documento\", \"No se cuenta con documento firmado para descargar\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (out != null) {\n out.close();\n }\n }\n\n }", "public void subir_file()\n {\n FileChooser fc = new FileChooser();\n\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"PDF Files\",\"*.pdf\")\n , new FileChooser.ExtensionFilter(\"Jpg Images\",\"*.jpg\",\"*.JPEG\",\"*.JPG\",\"*.jpeg\",\"*.PNG\",\"*.png\"));\n\n File fileSelected = fc.showOpenDialog(null);\n\n if (fileSelected!= null){\n txt_ruta.setText(fileSelected.getPath());\n\n if(txt_ruta.getText().contains(\".pdf\"))\n {\n System.out.println(\"si es pdf\");\n Image image = new Image(\"/sample/Clases/pdf.png\");\n image_esquema.setImage(image);\n\n }\n else\n {\n File file = new File(txt_ruta.getText());\n javafx.scene.image.Image image = new Image(file.toURI().toString());\n image_esquema.setImage(image);\n }\n\n }\n else{\n System.out.println(\"no se seleccinoó\");\n }\n }", "public static Card dohvatiPozadinu(){\r\n\t\tFile dir = new File(\"images\");\r\n\t\tFile[] lista = dir.listFiles();\r\n\t\tCard kartaPozadine = null;\r\n\t\tfor (File file : lista){\r\n\t\t\tif (file.isFile()){\r\n\t\t\t\tif (file.toString().contains(\"pozadina_0.gif\")){\r\n\t\t\t\t\tString[] niz = file.getName().toString().split(\"\\\\.\");\r\n\t\t\t\t\tkartaPozadine =new Card(new ImageIcon(file.toString()),0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn kartaPozadine;\r\n\t}" ]
[ "0.59236324", "0.5905375", "0.57787013", "0.5767836", "0.56521076", "0.5613748", "0.55619025", "0.5528977", "0.54069334", "0.54020995", "0.5392757", "0.53348213", "0.52451825", "0.52364707", "0.52231884", "0.520768", "0.51505226", "0.5144675", "0.51208496", "0.511792", "0.50326914", "0.50301385", "0.5021288", "0.5014695", "0.50130475", "0.49882343", "0.49752322", "0.4971049", "0.49568337", "0.49450132", "0.49327707", "0.49287975", "0.49257135", "0.49167797", "0.49112484", "0.49064654", "0.48988494", "0.48952863", "0.48841318", "0.48761576", "0.48608238", "0.48606372", "0.48539314", "0.48464715", "0.4822106", "0.4809126", "0.48043245", "0.48014194", "0.4796675", "0.47904626", "0.4784315", "0.47812417", "0.47759938", "0.4772921", "0.47712678", "0.4768639", "0.47646227", "0.47575352", "0.47548786", "0.4745647", "0.47311538", "0.47270468", "0.47158822", "0.47133166", "0.4705121", "0.4696437", "0.46913266", "0.46893308", "0.46873853", "0.4682998", "0.4682611", "0.46739566", "0.46739322", "0.4671115", "0.46686438", "0.46653545", "0.46621904", "0.46619567", "0.46619478", "0.46588355", "0.4658012", "0.4654477", "0.46537355", "0.46449885", "0.46408963", "0.46396172", "0.46372163", "0.46315706", "0.4629322", "0.46235713", "0.46152282", "0.4614047", "0.4613061", "0.4612047", "0.4608435", "0.46019217", "0.4598105", "0.45977503", "0.45929858", "0.45910963", "0.45856732" ]
0.0
-1
Click one button on page, and redirect to respect pages. Added by Sicheng.
@Override public void onClick(View v) { switch (v.getId()) { case R.id.convertButton: Intent convertorMainIntent = new Intent(getApplicationContext(), ConvertorMainActivity.class); startActivity(convertorMainIntent); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goToNextPage() {\n nextPageButton.click();\n }", "public EmagHomePage clickonContinueButton()\n {\n continueButton.click();\n return new EmagHomePage(driver);\n }", "HtmlPage clickSiteLink();", "HtmlPage clickLink();", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\t\t\t(DccdSearchResultPanel) callingPanel));\n\t\t\t}", "private WriteAReviewPage clickOnStartHereButton(){\n click(button_StartHereLocator);\n return new WriteAReviewPage();\n }", "@Step\n public void clickContactUsPage(){\n contactusPages.clickContactUsPage();\n }", "public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"2\");\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIntent i1= new Intent(MainActivity.this,page1.class);\n\t\t\tstartActivity(i1);\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(getApplicationContext(), Page_forty_four.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n public void onClick(View view) {\n ((Page) Page.activity).selectPage(list.get(position) + 1);\n ((BookmarksActivity) context).finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i= new Intent(MainActivity.this,page8.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\t\n\t\t\t}", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "HtmlPage clickSiteName();", "@Override\n public void buttonClick(ClickEvent event) {\n \tgetUI().getNavigator().navigateTo(NAME + \"/\" + contenView);\n }", "public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}", "public void clickDynamicPage() {\n driver.get(\"https://\"+B1MainClass.site);\n driver.findElement(dynamicPage).click();\n }", "private void forwardPage()\n {\n page++;\n open();\n }", "public MyPage goToMyPage(){\n new WebDriverWait(driver, 60).until(ExpectedConditions.visibilityOf(submitButton));\n submitButton.click();\n return new MyPage(driver);\n }", "public DeliAndBakeryPage clickOnDeliAndBakeryLink() {\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tdeliAndbakery.click();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\treturn new DeliAndBakeryPage();\n\t}", "@Before\n public void openNewStockPage() {\n onView(withId(R.id.button3)).perform(click());\n }", "public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}", "public void clickOnContinueShoppingButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnContinueShoppingButton.click();\n\n \t}", "public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }", "private void moveToLastPage() {\n while (!isLastPage()) {\n click(findElement(next_btn));\n }\n }", "public void ClickNotesAndMessagesPage() {\r\n\t\tnotesandmessages.click();\r\n\t\t\tLog(\"Clicked the \\\"Notes and Messages\\\" button on the Birthdays page\");\r\n\t}", "@Test\r\n public void testHomePageButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"HomePageButton\", false);\r\n tester.assertRenderedPage(GreenOMeterPage.class);\r\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "private void clickContinueButton() {\n clickElement(continueButtonLocator);\n }", "public NewcommunityPage submitKo() {\n driver.findElement(nextLocator).click();\r\n\r\n // Return a new page object representing the destination. Should the login page ever\r\n // go somewhere else (for example, a legal disclaimer) then changing the method signature\r\n // for this method will mean that all tests that rely on this behaviour won't compile.\r\n return new NewcommunityPage(driver); \r\n\t}", "protected Page click() throws IOException {\n\n if( isDisabled() == true ) {\n return getPage();\n }\n\n final String onClick = getOnClickAttribute();\n final HtmlPage page = getPage();\n if( onClick.length() == 0 || page.getWebClient().isJavaScriptEnabled() == false ) {\n return doClickAction();\n }\n else {\n final ScriptResult scriptResult = page.executeJavaScriptIfPossible(\n onClick, \"onClick handler for \"+getClass().getName(), true, this);\n scriptResult.getJavaScriptResult();\n return doClickAction();\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, PageDetailDestinasiPopuler.class);\n startActivity(intent);\n }", "private void redirectTo( Part p ) {\n Set<Long> ids = Collections.emptySet();\n setResponsePage( new RedirectPage( SegmentLink.linkStringFor( p, ids ) ) );\n }", "private LoginPage clickOnNext() {\n if (waitForElementDisplayed(By.id(ID_NEXT), 10, 20)) {\n clickOnElementUsingJquery(driver.findElement(By.id(ID_NEXT)));\n return this;\n }\n return null;\n }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tif(v==Bn_Pre){\r\n\t\t\t\tIntent intent = new Intent(NextActivity.this, MainActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}else if(v==Bn_Next){\r\n\t\t\t\tIntent intent = new Intent(NextActivity.this, Next2Activity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}\r\n\t\t}", "public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}", "public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}", "@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}", "@Override\n public void onClick(View view) {\n // Opens the next page (left)\n //=================================\n if (!leftIsEmpty) {\n Intent nextIntent = new Intent(GlobalPageActivity.this,GlobalPageActivity.class);\n nextIntent.putExtra(\"nextpage\", mThisPage.getNextLeft());\n nextIntent.putExtra(\"MyUserId\", iUserId);\n startActivity(nextIntent);\n finish();\n return;\n }\n\n //=================================\n // Edits the button (left) or\n // denies you access if being worked on\n //=================================\n if (mainIsEmpty){\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.draw_picture_first), Toast.LENGTH_SHORT).show();\n } else {\n if (!mThisPage.getLeftUser().equals(iUserId) && !mThisPage.getRightUser().equals(iUserId) && !mThisPage.getUser().equals(iUserId)) {\n createLeftDialog();\n } else {\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.done_something_already), Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void redirectToPlan() {\n setResponsePage( new RedirectPage( \"plan\" ) );\n }", "@Test\r\n public void testConceptsButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"ConceptsPageButton\", false);\r\n tester.assertRenderedPage(ConceptsPage.class);\r\n }", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "public void ClickPlansOfferedPage() {\r\n\t\tplansoffered.click();\r\n\t\t\tLog(\"Clicked the \\\"Plans Offered\\\" button on the Birthdays page\");\r\n\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.FeedServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "public static void checkAndClickQuitButtonStartPlayingPage() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of Start playing page\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of Start playing page\");\r\n\t}", "public HtmlPage clickContentPath();", "private void goOnPageBySendRedirect(final HttpServletResponse response, String goToPage, final String methodName)\n\t\t\tthrows IOException {\n\t\ttry {\n\t\t\tresponse.sendRedirect(goToPage);\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"ServiceHrImpl: \" + methodName + \" : errorSendRedirect\", e);\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "public String clickLink(int _index) {\n String item_ = getItems().get(_index).getName();\n return tryRedirectIt(item_);\n// getForms().put(CST_ITEM, item_);\n// Item it_ = data_.getItem(item_);\n// return switchItem(it_);\n }", "@Then(\"^click on Go button$\")\n\tpublic void click_on_Go_button() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//a[@class='nav-item'][contains(text(),'Blog')]\")).click();\n\t}", "private void gotoCompletePage() {\n WebkitUtil.forward(mWebView, AFTER_PRINT_PAGE);\n }", "@Override\n public void onClick(View v) {\n Intent r2page = new Intent(v.getContext(), Cherwell_Boathouse.class);\n startActivity(r2page);\n }", "public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }", "@Override\n // Function for once the button gets clicked\n public void onClick(View v) {\n Intent i = new Intent(FindOutMore.this, Tab_Main.class);\n // The activity is started and the variable i is placed into this\n startActivity(i);\n // This is an animation overrider...\n // This means that once the button has been pressed it will perform an animation to take\n // the users back to the new page that they have selected...\n overridePendingTransition(R.animator.ui_animation_in, R.animator.ui_animation_out);\n }", "public static void checkAndClickQuitButtonResultsPage() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of results page\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of results page\");\r\n\t}", "private void viewPageClicked() {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n try{\n Desktop d = Desktop.getDesktop();\n d.browse(new URI(itemView.getItem().getURL()));\n }catch(Exception e){\n e.printStackTrace();\n }\n\n showMessage(\"View clicked!\");\n }", "public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}", "@Override\n public void onClick(View view) {\n // Opens the next page (right)\n //=================================\n if (!rightIsEmpty) {\n Intent nextIntent = new Intent(GlobalPageActivity.this,GlobalPageActivity.class);\n nextIntent.putExtra(\"nextpage\", mThisPage.getNextRight());\n nextIntent.putExtra(\"MyUserId\", iUserId);\n startActivity(nextIntent);\n finish();\n return;\n }\n\n //=================================\n // Edits the button (right) or\n // denies you access if being worked on\n //=================================\n if (mainIsEmpty){\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.draw_picture_first), Toast.LENGTH_SHORT).show();\n } else {\n if (!mThisPage.getLeftUser().equals(iUserId) && !mThisPage.getRightUser().equals(iUserId) && !mThisPage.getUser().equals(iUserId)) {\n createRightDialog();\n } else {\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.done_something_already), Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n public void onClick(View v) {\n editor4.putInt(\"page\", ++page);\n editor4.apply();\n startActivity(new Intent(FileUpload.this, UploadActivity.class));\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgoNext();\r\n\t\t\t\t}", "public void clickHandler(View view){\r\n\t\tswitch (view.getId()) {\r\n\t\t\r\n\t\tcase R.id.button1 :\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View arg0) {\n Intent i = new Intent(getApplicationContext(), web1.class);\n startActivity(i);\n }", "public void ClickCommissionRatesPage() {\r\n\t\tcommissionrates.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Rates\\\" button on the Birthdays page\");\r\n\t}", "public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }", "public void clickContinueInAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n\n\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "private void backPage()\n {\n page--;\n open();\n }", "public static void clickBackBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"backquest\\\"]\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Back button doesnt work\");\n\t\t}\n\t}", "public void ClickPartnerInformationPage() {\r\n\t\tpartnerinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Partner Information\\\" button on the Birthdays page\");\r\n\t}", "@Override\n protected void clickAction(int numClicks) {\n exit(true);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n startActivity(new Intent(StartPage.this,SafeMove.class));\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.example.thirdapp.LocationActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"4\");\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tPageUtil.jumpTo(MyOrderActivity.this, MyOrderAll.class);\n\t\t\t}", "public void ClickToNavigateTo(String ClickToNavigateTo) {\r\n\t\tdriver.findElement(By.xpath(\"//a[@id='SideBarButton' and text()='\" + ClickToNavigateTo + \"']\")).click();\r\n\t\t\tLog(\"Clicked the \\\"'\" + ClickToNavigateTo + \"'\\\" button on the Birthdays page\");\r\n\t}", "public boolean clickMyWebinarsLink(){\n\t\tif(util.clickElementByLinkText(\"My Webinars\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> My Webinar link clicked successfully...............\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n \t\t\n \t}", "public void ClickVtube(View view){\n MainActivity.redirectActivity(this,Vtube.class);\n\n\n }", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "public SelectGradableItemsPage clickNextButton() throws Exception {\n try {\n logInstruction(\"LOG INSTRUCTION:clicking the next button\");\n frameSwitch.switchToFrameContent();\n uiDriver.waitToBeDisplayed(btnNextButton, waitTime);\n btnNextButton.click();\n } catch (Exception e) {\n throw new Exception(\"ISSUE IN CLICKING THE 'Next' BUTTON\" + \"clickNextButton\" + e\n .getLocalizedMessage());\n }\n return new SelectGradableItemsPage(uiDriver);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmyViewPager.setCurrentItem(1);\n\t\t\t}", "public void clickbtnBack() {\n\t\tdriver.findElement(btnBack).click();\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tswitch (v.getId()) {\n\t\t\tcase R.id.basicview_btn:\n\t\t\t\tviewPager.setCurrentItem(0);\n\t\t\t\tbreak;\n\t\t\tcase R.id.uploadview_btn:\n\t\t\t\tviewPager.setCurrentItem(1);\n\t\t\t\tbreak;\n\t\t\tcase R.id.back:\n\t\t\t\tfinish();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public void ClickCommissionInformationPage() {\r\n\t\tcommissioninfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Information\\\" button on the Birthdays page\");\r\n\t}", "public void pageListAtmosphere(View view) {\n start_button.setEnabled(false);\n Intent intent = new Intent(getApplicationContext(), PageVersion2.class);\n startActivity(intent);\n\n }", "@Test\n public void turboVotesButton_onClick_redirectsToTurboVotes() {\n driver.get(\"http://localhost:9876\");\n\n Assert.assertEquals(1, driver.getWindowHandles().size());\n\n WebElement turboVotesButton = driver.findElement(By.id(\"turbo-vote-button\"));\n turboVotesButton.click();\n\n Assert.assertEquals(MAX_NUM_TABS, driver.getWindowHandles().size());\n\n String currentWindow = driver.getWindowHandle();\n for (String windowHandle : driver.getWindowHandles()) {\n if (!currentWindow.contentEquals(windowHandle)) {\n driver.switchTo().window(windowHandle);\n break;\n }\n }\n\n Assert.assertEquals(\"TurboVote\", driver.getTitle());\n }", "@Override\n\tprotected void actionPerformed(GuiButton par1GuiButton)\n {\n\n if (par1GuiButton.enabled)\n {\n if (par1GuiButton.id == 1)\n {\n if (this.currPage < this.totalPages - 1)\n {\n ++this.currPage;\n }\n }\n else if (par1GuiButton.id == 2)\n {\n if (this.currPage > 0)\n {\n --this.currPage;\n }\n }\n else if (par1GuiButton.id == 8)\n {\n this.index = true;\n this.currPage = 0;\n this.totalPages = (this.maxResearch - (this.maxResearch % 5))/5 + 1;\n }\n else if (par1GuiButton.id == 9)\n {\n if (this.currentResearch == this.bookmarkpage) {\n \tthis.bookmarkpage = this.maxResearch + 1;\n \tSystem.out.println(\"changed\");\n }\n else\n {\n \tthis.bookmarkpage = this.currentResearch;\n \tSystem.out.println(\"changed\");\n }\n editingPlayer.inventory.mainInventory[editingPlayer.inventory.currentItem].stackTagCompound.setInteger(\"SelectedResearch\", this.bookmarkpage);\n updateBookmark();\n\n }\n else if (par1GuiButton.id > 2)\n {\n\t this.index = false;\n\t this.currentResearch = par1GuiButton.id + (currPage*5) - 2;\n\t NBTTagCompound var4 = itemstack.getTagCompound();\n\t this.researchKey = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getString(\"Research\");\n\t this.complete = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\");\n\t \tif (itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\") == 1) {\n\t this.totalPages = ResearchDictionary.researchList.get(researchKey).description.size();\n\t }\n\t this.currPage = 0;\n }\n\n this.updateButtons();\n }\n }", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void ClickScanner(View view){\n MainActivity.redirectActivity(this,Scanner.class);\n\n }", "@Override\n public void onClick(View v) {\n Intent r1page = new Intent(v.getContext(), the_oxford_kitchen.class);\n startActivity(r1page);\n }", "public void clickCookieOKButton(WebDriver driver)\n\t\t {\n\t\t\t \n\t\t\t try\n\t\t\t {\n\t\t\t\tList<WebElement> allbutton = driver.findElements(By.tagName(\"button\"));\n\t\t\t\t\n\t\t\t\tfor(WebElement btn:allbutton)\n\t\t\t\t{\n\t\t\t\t\tString strbtnText = btn.getText();\n\t\t\t\t\tif(strbtnText.equals(\"OK\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbtn.click();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t }\n\t\t\t catch(Exception e)\n\t\t\t {\n\t\t\t\t System.out.println(\"\");\n\t\t\t }\n\t\t }", "@Override\n public void buttonExecute(String menuId, PageParam pageParam,\n String buttonId) throws KkmyException {\n\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "PreViewPopUpPage clickImageLink();" ]
[ "0.6929574", "0.69027036", "0.6845198", "0.68268424", "0.6752006", "0.67273086", "0.67014635", "0.66133237", "0.6518385", "0.6510634", "0.6503866", "0.6487002", "0.64208937", "0.6372822", "0.63601565", "0.6346135", "0.6310794", "0.6263759", "0.6253149", "0.62277627", "0.6224734", "0.61946374", "0.6175781", "0.61735564", "0.6146485", "0.6136116", "0.6134866", "0.6130663", "0.612617", "0.6115221", "0.61087185", "0.6100067", "0.6078071", "0.6066012", "0.60615665", "0.6055584", "0.60432017", "0.60365844", "0.60264635", "0.60160875", "0.60057473", "0.5994036", "0.59761846", "0.59700817", "0.5965758", "0.59561974", "0.5954152", "0.5952621", "0.5949155", "0.59465384", "0.5939054", "0.592723", "0.59245336", "0.59216183", "0.5919649", "0.59128195", "0.5909867", "0.5909202", "0.5908164", "0.5903004", "0.5901347", "0.589591", "0.58955884", "0.58948386", "0.5888372", "0.5887682", "0.5883291", "0.58760774", "0.58681124", "0.5863638", "0.58617175", "0.5861024", "0.5847623", "0.5847586", "0.5832592", "0.58308226", "0.58217394", "0.5820928", "0.58077574", "0.5802818", "0.57908756", "0.5790427", "0.57868207", "0.578601", "0.57842493", "0.5784087", "0.57796204", "0.5779586", "0.57764924", "0.5772528", "0.5772428", "0.57690454", "0.5767445", "0.57662135", "0.576359", "0.5756967", "0.57506543", "0.57462174", "0.5743471", "0.57374203", "0.57362217" ]
0.0
-1
TODO Autogenerated method stub
public List<Topic> getAllTopics() { return topics; }
{ "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
topics is a List which is converted to stream Then filter is applied to get the id that matches first with passed argumet 'id' & fetched via get(). > is lambda expression ( efficient way of searching).
public Topic getTopic(String id) { return topics.stream().filter(t -> t.getId().equals(id)).findFirst().get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserTopic selectByPrimaryKey(Integer id);", "@GetMapping(\"/topic/{id}\") // se captura lo que se pone entre llaves\n\tpublic Topic getTopicById(@PathVariable int id) {\n\t\treturn topicService.getTopicById(id);\n\t}", "@Override\r\n\tpublic TopicContent findById(Serializable id) {\n\t\treturn topicContentDao.findById(id);\r\n\t}", "UserTopic selectByPrimaryKey(Integer userid);", "public Topic findByid() {\n\t\treturn null;\n\t}", "List<UserTopic> selectByExample(UserTopicExample example);", "List<UserTopic> selectByExample(UserTopicExample example);", "public List<Course> findByTopicId(int topicId);", "public Topic getTopic(String id) {\n\t\tOptional<Topic> res = topicRepository.findById(id);\n\t\treturn res.isPresent() ? res.get() : null;\n\t}", "public TopicObject(int id) {\n this.id = id;\n }", "public Topic getTopic(String id) {\n\t\treturn topicRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(id));\n\t}", "public Set<Topic> getTopics();", "public CompletableFuture<List<Details>> searchTweetByTopic(String topic) {\n\n List<Details> tweetData = new ArrayList<>();\n try {\n Query query = new Query(topic);\n query.setCount(100);\n listCompletableFuture = CompletableFuture.supplyAsync(() -> {\n QueryResult result = null;\n try {\n result = twitter.search(query);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }).thenApply((QueryResult result) -> {\n tweetStatusObjects = result.getTweets();\n return tweetStatusObjects;\n }).thenApply((tweetStatusObjects) -> {\n tweetStatusObjects.stream()\n .map((Status s) -> {\n tweetData.add(new Details(s.getUser().getName(), s.getUser().getLocation(),\n s.getUser().getFollowersCount(), s.getUser().getScreenName(), s.getText(),s.getHashtagEntities()));\n return tweetData;\n })\n .collect(Collectors.toList());\n return tweetData;\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return listCompletableFuture;\n }", "public List<Topic> getTopics(int eId){\r\n List<Topic> topics = new ArrayList<>();\r\n String selectQuery = \"SELECT * FROM \" + TABLE_TOPICS + \" AS t INNER JOIN \" +\r\n TABLE_EXAMS_TOPICS + \" AS et ON t.\" +\r\n KEY_ID + \" = et.\" + KEY_TID +\r\n \" WHERE et.\" + KEY_EID + \" = \" + eId;\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n if(cursor.moveToFirst()){\r\n do{\r\n Topic topic = new Topic();\r\n topic.setId(cursor.getInt(cursor.getColumnIndex(KEY_TID)));\r\n topic.setName(cursor.getString(cursor.getColumnIndex(KEY_NAME)));\r\n\r\n topics.add(topic);\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n\r\n cursor.close();\r\n db.close();\r\n return topics;\r\n }", "public Topic readTopic(int topicId);", "List<SemanticTag> getSTagByTopicId(long id);", "@Override\r\n\tpublic PassInfo find(String userId, String topic) {\n\t\tList<PassInfo> list = (List<PassInfo>) getHt().find(\"From PassInfo o where o.userId=? and o.topic=?\", userId,topic);\r\n\t\tif(list != null && list.size() > 0)\r\n\t\t\treturn list.get(0);\r\n\t\treturn null;\r\n\t}", "public Topic retrieveTopic(String topic) //from hashmap\r\n\t{\r\n\t\treturn topics.get(topic);\r\n\t}", "public List<Topic> queryOnePage(Page page, int id) {\n\t\treturn dao.queryOnePage(page, id);\n\t}", "public String getID()\n {\n return \"topic=\" + id;\n }", "@RequestMapping( value = \"/topic\", method = RequestMethod.GET )\n\t@Transactional\n\tpublic @ResponseBody Map<String, Object> getPublicationTopic( \n\t\t\t@RequestParam( value = \"id\", required = false ) final String id,\n\t\t\t@RequestParam( value = \"pid\", required = false ) final String pid, \n\t\t\t@RequestParam( value = \"maxRetrieve\", required = false ) final String maxRetrieve,\n\t\t\tfinal HttpServletResponse response ) throws UnsupportedEncodingException, InterruptedException, URISyntaxException, ExecutionException\n\t{\n\t\treturn publicationFeature.getPublicationMining().getPublicationExtractedTopicsById( id, pid, maxRetrieve );\n\t}", "public interface TopicService {\n Topic saveNew(Topic topic);\n Topic findOne(int id);\n Topic update(int id, int parentId, Stream<Integer> relatedTopicIds);\n Topic update(int id, int parentId, List<Integer> relatedTopicIds);\n Topic findByName(String name);\n Stream<Topic> getLatestTopics(int authorId);\n}", "public abstract FeedbackDocuments getFeedbackDocuments(String topicId);", "TopicFragmentWithBLOBs selectByPrimaryKey(Long id);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Topic)) {\n return false;\n }\n Topic other = (Topic) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@ApiOperation(value = \"get by ID\")\n\t@ApiResponses({\n\t\t\t@ApiResponse(code = ResponseStatusConstants.CREATED, message = \"Get by ID.\", response = TopicRO.class),\n\t\t\t@ApiResponse(code = ResponseStatusConstants.INTERNAL_SERVER_ERROR, message = ResponseStatusConstants.INTERNAL_SERVER_ERROR_MESSAGE, response = RestException.class),\n\t\t\t@ApiResponse(code = ResponseStatusConstants.BAD_REQUEST, message = ResponseStatusConstants.BAD_REQUEST_MESSAGE, response = RestException.class),\n\t\t\t@ApiResponse(code = ResponseStatusConstants.NOT_FOUND, message = ResponseStatusConstants.NOT_FOUND_MESSAGE, response = RestException.class),\n\t\t\t@ApiResponse(code = 412, message = \"Precondition Failed\", response = RestException.class),\n\t\t\t@ApiResponse(code = ResponseStatusConstants.FORBIDDEN, message = ResponseStatusConstants.FORBIDDEN_MESSAGE, response = RestException.class) })\n \t@GetMapping(\"/api/topic/{id}\")\n public ResponseEntity<TopicRO> getTopicById(@PathVariable(\"id\") Long id) \n throws RestException {\n TopicRO entity = mTopicService.getTopicById(id);\n \n return new ResponseEntity<TopicRO>(entity, new HttpHeaders(), HttpStatus.OK);\n }", "public List<Topic> getAllTopics() {\n\t\tlogger.info(\"getAllTopics executed\");\n\t\t//return topics;\n\t\tList<Topic> topics = new ArrayList<Topic>();\n\t\ttopicRepository.findAll().forEach(topics::add);\n\t\treturn topics;\n\t}", "List<TopicFragment> selectByExample(TopicFragmentExample example);", "public Book getBookById(int id){\n Book book = null;\n //list.stream->to take the stream\n\n book = list.stream().filter(e->e.getId()==id).findFirst().get();\n return book;\n }", "public static Predicate<Sample> isidequalto(String id)\n\t{\n\t\treturn p -> p.getId().equals(id);\n\t}", "public interface Topic {\n int getId();\n String getTitle();\n User getAdmin();\n List<Comment> getComments();\n}", "@Override\n\tpublic List<Danmu> getDanmuList(String topicId) {\n\t\tString hql = \"from Danmu m where m.topicId =?\";\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n//\t\tString sql=\"select * from danmu where topicid=?\";\n//\t\tQuery query=sessionFactory.getCurrentSession().createSQLQuery(sql);\n\t\tquery.setString(0, topicId);\n//\t\tSystem.out.println(query.list().size());\n\t\treturn query.list();\n\t}", "@Override\n\tpublic List<TopicSummary> getSubTopics(String topic) {\n\t\treturn null;\n\t}", "public void getTopics(String projectID) {\n logger.log(Level.INFO, \"Will try to get topics for project {0} ...\", projectID);\n\n ListTopicsRequest request = ListTopicsRequest.newBuilder()\n .setPageSize(10) // get max 10 topics\n .setProject(projectID) // for our projectID\n .build();\n\n ListTopicsResponse response;\n try {\n response = blockingStub.listTopics(request);\n } catch (StatusRuntimeException e) {\n logger.log(Level.WARNING, \"RPC failed: {0}\", e.getStatus());\n return;\n }\n logger.log(Level.INFO, \"Topics list:\\n {0}\", response.getTopicsList());\n }", "@Override\r\n\tpublic Subjects getById( int id) {\n\t\treturn subectsDao.getById( id);\r\n\t}", "public List<Course> getAllCourses(String topicId){\n//\t\treturn topics;\n\t\tList<Course> courses = new ArrayList<Course>();\n\t\tcourseRepo.findByTopicId(topicId).forEach(courses::add);\n\t\treturn courses;\n\t}", "public ArrayList<Course> findCoursesById(String id) {\n ArrayList<Course> coursesById = new ArrayList<>(); \r\n for(int i=0; i < courses.size(); i++) {\r\n if (courses.get(i).getId().contains(id)) \r\n coursesById.add(courses.get(i));\r\n } \r\n return coursesById;\r\n }", "public List<Movie> getMovie_Actor(final int Actor_id) {\n List<Movie> actor_mov = new ArrayList<Movie>();\n if (actors_movies.size()!=NULL) {\n actor_mov = actors_movies.entrySet().stream().filter(x->x.getValue().getId()==Actor_id).map(x -> x.getKey()).collect(Collectors.toList());\n System.out.println( actor_mov);\n System.out.println(\"LENGTH:\" + actor_mov.size());\n\n }else{\n System.out.println(\"Tiene que dar valor al ID para buscar por ID\");\n\n }\n return actor_mov;\n }", "private List[] query() {\n\t\tList[] result = new ArrayList[topics.length];\n\t\tint i = 0;\n\t\tfor(String topic:topics) {\n\t\t\tList<byte[]> bocache = fcache.getList(topic);\n\t\t\tif(bocache == null || bocache.isEmpty()) {\n\t\t\t\tlog.info(\"topic {} has no message in cache\",topic);\n\t\t\t}else {\n\t\t\t\tresult[i++] = bocache;\n\t\t\t}\t\t\n\t\t}\n\t\treturn result;\n\t}", "public Topic findTopic() {\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Enter the name of the Topic:\");\r\n String identifier = input.nextLine().trim();\r\n List<Topic> topicList;\r\n try {\r\n topicList = server.getTopics();\r\n } catch (RemoteException f) {\r\n System.err.println(\"Couldn't Connect to Server...\");\r\n return null;\r\n }\r\n try {\r\n for (Topic t : topicList ) {\r\n String topicName = t.getTopicName().toLowerCase();\r\n if (topicName.equals(identifier.toLowerCase())) {\r\n return t;\r\n }\r\n }\r\n System.out.println(\"Topic is not listed.\");\r\n\r\n } catch (NumberFormatException e) {\r\n System.err.println(\"This is not a Name\");\r\n }\r\n return null;\r\n }", "public List<News> getNewsList(Integer id) {\n List<News> newsList = newsMapper.selectByAuthorId(id);\n newsList.sort((dt1,dt2) -> {\n if (dt1.getPubdate().getTime() < dt2.getPubdate().getTime()) {\n return 1;\n } else if (dt1.getPubdate().getTime() > dt2.getPubdate().getTime()) {\n return -1;\n } else {\n return 0;\n }\n });\n return newsList;\n }", "public List<Course> getAllCourses(String topicId){\n\t\t//return courses;\n\t\tArrayList<Course> course = new ArrayList<>();\n\t\tcourseRepository.findByTopicId(topicId).forEach(course::add);\n\t\treturn course;\n\t}", "public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}", "@GetMapping(\"{id}\")\r\n public Map<String, String> getMessageByID(@PathVariable(\"id\") String id) {\r\n return messages.stream().\r\n filter(message -> message.get(\"id\").equals(id))\r\n .findFirst()\r\n .orElseThrow(NotFoundException::new);\r\n }", "public Student searchStudent(String id) {\n\t\tfor (String key : list.keySet()) {\n\t\t\tif(id.equals(key))\n\t\t\t\treturn list.get(key);\n\t\t}\n\t\treturn null;\n\t}", "public void initialize(int id, Topic topic) {\n\t\tthis.id = id;\n\t\tthis.topic = topic;\n\t\tactive_status = true;\n\t\tmaximum_age = -10;\n\t\tage = 0;\n\t}", "@Override\n\tpublic List<Topic> getTopics(String categoryId, String forumId)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "public Optional<Course> getCourse(String id) {\n//\t\treturn topics.stream().filter(t -> t.getId().equals(id)).findFirst().get();\n\t\treturn courseRepository.findById(id);\n\t}", "List<FeedsUsersKey> selectByExample(FeedsUsersExample example);", "public Todo retrieveTodos(int id) {\n\t\tfor (Todo todo : todos) {\n\t\t\tif (todo.getId() == id) {\n\t\t\t\treturn todo;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "TSourceChannels selectByPrimaryKey(Long id);", "public List<Topic> getTopicTree(Topic topic);", "public interface ITopicDao {\n public List<Topic> findTopicswithplatOption( platForumType type);\n\n}", "@RequestMapping(value = \"/topics\", method = RequestMethod.GET)\n public String topicsList(ModelMap model, HttpSession session) {\n\t String userCode = session.getAttribute(\"currentUserCode\").toString();\n\t String userRole = session.getAttribute(\"currentUserRole\").toString();\n\t List<mStaff> staffs = staffService.listStaffs();\n\t HashMap<String, String> mStaffCode2Name = new HashMap<String, String>();\n\t for(mStaff st: staffs)\n\t\t mStaffCode2Name.put(st.getStaff_Code(), st.getStaff_Name());\n\t \n\t List<mTopics> topicsList = tProjectService.loadTopicListByStaff(userRole, userCode);\n\t System.out.println(name() + \"::topicsList\"\n\t \t\t+ \", staffs.sz = \" + staffs.size() + \", topicsList.sz = \" + topicsList.size());\n\t for(mTopics p: topicsList){\n\t\t p.setPROJDECL_User_Code(mStaffCode2Name.get(p.getPROJDECL_User_Code()));\n\t\t System.out.println(name() + \"::topicsList, userName = \" + p.getPROJDECL_User_Code());\n\t }\n\t \n\t model.put(\"topicsList\", topicsList);\n\t model.put(\"topics\", status);\n\t return \"cp.topics\";\n }", "public void filterBy(String id, Function<Trip, Boolean> flt) {\n filters.put(id, flt);\n modifiedSinceLastResult = true;\n }", "public static FAQ find(int id){\n\t\treturn find.byId(id);\n\t}", "public News getByid(News news);", "private ListTopicByUid(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "TopicStatus getById(Long topicStatusId);", "@Override\n\tpublic List<TopicSummary> discoverTopics(String query) {\n\t\treturn null;\n\t}", "@PostMapping(\n value = \"/faves\",\n params = {\"id\", \"add\"},\n produces = \"application/json\")\n @Secured(allowedRoles={})\n public Set<String> addToFavesById(@RequestParam(\"id\") String id, @RequestParam(\"add\") String topic){\n return userService.addTopic(id, topic);\n }", "@Override\n public void updateTopicAccess(String userId, String topicId) {\n\n\t}", "public static List<TopicBean> getRecentTopics() {\r\n\t\tDBCollection topicsColl = getCollection(TOPICS_COLLECTION);\r\n\t\t\r\n\t\tDBObject query = new BasicDBObject(\"deleted\", new BasicDBObject(\"$ne\", true));\r\n\t\t\r\n\t\tList<DBObject> topicsDBList=new ArrayList<DBObject>();//List<DBObject> topicsDBList = topicsColl.find(query).sort(new BasicDBObject(\"last_update\", -1)).toArray();\r\n\t\tDBCursor topicCur=topicsColl.find(query).sort(new BasicDBObject(\"last_update\", -1));\r\n\t\twhile(topicCur.hasNext()){\r\n\t\t\ttopicsDBList.add(topicCur.next());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tList<TopicBean> recentTopics = new ArrayList<TopicBean>();\r\n\t\tfor (DBObject topicDBObject : topicsDBList) {\r\n\t\t\tTopicBean topic = new TopicBean();\r\n\t\t\ttopic.parseBasicFromDB(topicDBObject);\r\n\t\t\ttopic.setConversations(ConversationDAO.loadConversationsByTopic(topic.getId()));\r\n\t\t\trecentTopics.add(topic);\r\n\t\t\t\r\n\t\t\tif (recentTopics.size() == 20) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn recentTopics;\r\n\t}", "public static List<Topic> Topics(JSONArray topicsJSON, String projectId){\n List<Topic> topics = new ArrayList<>();\n\n for(int i = 0; i < topicsJSON.length(); i++){\n try {\n topics.add(new Topic(topicsJSON.getJSONObject(i), projectId));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return topics;\n }", "void subscribe(String id);", "Page<Reply> findByTopicId(Long id, Pageable pageRequest);", "public static Cursor query(SQLiteDatabase db, long topicId, int from, int to, int limit) {\n String sql = \"SELECT * FROM \" + TABLE_NAME +\n \" WHERE \" +\n COLUMN_NAME_TOPIC_ID + \"=\" + topicId +\n (from > 0 ? \" AND \" + COLUMN_NAME_SEQ + \">\" + from : \"\") +\n (to > 0 ? \" AND \" + COLUMN_NAME_SEQ + \"<=\" + to : \"\") +\n \" AND \" + COLUMN_NAME_STATUS + \"<=\" + BaseDb.STATUS_VISIBLE +\n \" ORDER BY \" + COLUMN_NAME_TS +\n (limit > 0 ? \" LIMIT \" + limit : \"\");\n\n // Log.d(TAG, \"Sql=[\" + sql + \"]\");\n\n return db.rawQuery(sql, null);\n }", "public static Set<TopicBean> loadAllTopics(boolean onlyBasicInfo) {\r\n\t\tDBCollection topicsColl = getCollection(TOPICS_COLLECTION);\r\n\t\ttopicsColl.ensureIndex(new BasicDBObject(\"views\", 1));\r\n\t\t\r\n\t\tDBObject query = new BasicDBObject(\"deleted\", new BasicDBObject(\"$ne\", true));\r\n\t\tList<DBObject> topicsDBList = null;\r\n\t\tif (onlyBasicInfo) {\r\n\t\t\tDBObject fields = BasicDBObjectBuilder.start()\r\n\t\t\t\t.add(\"title\", 1)\r\n\t\t\t\t.add(\"fixed\", 1)\r\n\t\t\t\t.add(\"deleted\", 1)\r\n\t\t\t\t.add(\"main_url\", 1)\r\n\t\t\t\t.add(\"bitly\", 1)\r\n\t\t\t\t.add(\"views\", 1)\r\n\t\t\t\t.add(\"cr_date\", 1)\r\n\t\t\t\t.get();\r\n\t\t\t\r\n\t\t\ttopicsDBList=new ArrayList<DBObject>();//topicsDBList = topicsColl.find(query, fields).sort(new BasicDBObject(\"views\", -1)).toArray();\r\n\t\t\tDBCursor topicCur=topicsColl.find(query, fields).sort(new BasicDBObject(\"views\", -1));\r\n\t\t\twhile(topicCur.hasNext()){\r\n\t\t\t\ttopicsDBList.add(topicCur.next());\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\ttopicsDBList=new ArrayList<DBObject>();//topicsDBList = topicsColl.find(query).sort(new BasicDBObject(\"views\", -1)).toArray();\r\n\t\t\tDBCursor topicCur= topicsColl.find(query).sort(new BasicDBObject(\"views\", -1));\r\n\t\t\twhile(topicCur.hasNext()){\r\n\t\t\t\ttopicsDBList.add(topicCur.next());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSet<TopicBean> topicsSet = new LinkedHashSet<TopicBean>();\r\n\t\tfor (DBObject topicDBObject : topicsDBList) {\r\n\t\t\tTopicBean topic = new TopicBean();\r\n\t\t\tif (onlyBasicInfo) {\r\n\t\t\t\ttopic.parseBasicFromDB(topicDBObject);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttopic.parseFromDB(topicDBObject);\r\n\t\t\t}\r\n\t\t\ttopicsSet.add(topic);\r\n\t\t}\r\n\t\treturn topicsSet;\r\n\t}", "@Transactional(readOnly=true)\n\tpublic List<Film> getFilmInfoAboveId(int id) {\n\t\tList<Film> films = filmRepository.findByFilmIdGreaterThan(id);\n\t\t\n\t\tfor(Film film : films) {\n\t\t\t// call the getter to load the data to cache\n\t\t\tfor(FilmActor actor : film.getFilmActors()) {\n\t\t\t\t// do nothing here\n\t \t}\n\t\t}\n\t\n\t\treturn films;\n\t}", "public interface TopicService {\n\nboolean topicsave(Topic topic, HttpServletRequest request);\n List<Topic> getTopicList(String query);\n Topic findByname(String name);\n}", "int updateByPrimaryKeySelective(UserTopic record);", "int updateByPrimaryKeySelective(UserTopic record);", "public List<Kweet> getTopicKweets(String topic) {\n return kweetDAO.getTopicKweets(topic);\n }", "VoteTopic getVoteTopicById(String voteTopicEncodedId);", "public java.util.List<Todo> filterFindByGroupId(long groupId);", "public Set<Topic> getTopicsForForum(Forums obj)\r\n {\r\n if ( !Hibernate.isInitialized(obj.getTopics()))\r\n {\r\n getCurrentSession().refresh(obj);\r\n }\r\n return obj.getTopics();\r\n }", "protected TopicMapObject identifyByID(TopicMap tm) {\n\n // id of a topic supplied?\n if (id == null)\n return null;\n\n return tm.getObjectByID(id);\n\n }", "@GetMapping(\"/ref-categories-streams/{id}\")\n public ResponseEntity<RefCategoriesStream> getRefCategoriesStream(@PathVariable Long id) {\n log.debug(\"REST request to get RefCategoriesStream : {}\", id);\n Optional<RefCategoriesStream> refCategoriesStream = refCategoriesStreamRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(refCategoriesStream);\n }", "@Override\n\tpublic Response topics() {\n\t\tList<Topic> topics = null;\n\t\ttry {\n\t\t\ttopics = userResourceAccess.getTopicsForUser(getUser());\n\t\t} catch (GovernanceExeption e) {\n\t\t\te.printStackTrace();\n\t\t\treturn error(Status.INTERNAL_SERVER_ERROR, \"Can not get topics\");\n\n\t\t}\n\n\t\tCollection<org.ow2.play.governance.platform.user.api.rest.bean.Topic> out = Collections2\n\t\t\t\t.transform(\n\t\t\t\t\t\ttopics,\n\t\t\t\t\t\tnew Function<Topic, org.ow2.play.governance.platform.user.api.rest.bean.Topic>() {\n\t\t\t\t\t\t\tpublic org.ow2.play.governance.platform.user.api.rest.bean.Topic apply(\n\t\t\t\t\t\t\t\t\tTopic input) {\n\t\t\t\t\t\t\t\torg.ow2.play.governance.platform.user.api.rest.bean.Topic topic = new org.ow2.play.governance.platform.user.api.rest.bean.Topic();\n\t\t\t\t\t\t\t\ttopic.name = input.getName();\n\t\t\t\t\t\t\t\ttopic.ns = input.getNs();\n\t\t\t\t\t\t\t\ttopic.prefix = input.getPrefix();\n\t\t\t\t\t\t\t\ttopic.resourceUrl = getResourceURI(input);\n\t\t\t\t\t\t\t\treturn topic;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\n\t\treturn ok(out\n\t\t\t\t.toArray(new org.ow2.play.governance.platform.user.api.rest.bean.Topic[out\n\t\t\t\t\t\t.size()]));\n\t}", "private void convertTopics() throws Exception {\r\n final File file = new File(TOPICS);\r\n if(!file.exists()) {\r\n Main.outln(\"Could not read \\\"\" + file.getAbsolutePath() + \"\\\"\");\r\n return;\r\n }\r\n \r\n // scan all queries\r\n final FileInputStream fis = new FileInputStream(file);\r\n final InputStreamReader isr = new InputStreamReader(fis, \"UTF8\");\r\n final BufferedReader br = new BufferedReader(isr);\r\n String line = null;\r\n String t = \"\";\r\n String ty = \"\";\r\n \r\n final PrintOutput out = new PrintOutput(QUERIES);\r\n while((line = br.readLine()) != null) {\r\n if(line.indexOf(\"topic ct_no\") > -1) {\r\n // extract topic id\r\n int s0 = line.indexOf('\"');\r\n int s1 = line.indexOf('\"', s0 + 1);\r\n t = line.substring(s0 + 1, s1);\r\n // extract content id\r\n s0 = line.indexOf('\"', s1 + 1);\r\n s1 = line.indexOf('\"', s0 + 1);\r\n //ca = line.substring(s0 + 1, s1);\r\n // extract type\r\n s0 = line.indexOf('\"', s1 + 1);\r\n s1 = line.indexOf('\"', s0 + 1);\r\n ty = line.substring(s0 + 1, s1);\r\n } else if(line.indexOf(\"xpath_title\") > -1) {\r\n // extract query\r\n final int s0 = line.indexOf('/');\r\n final String q = line.substring(s0, line.lastIndexOf('<'));\r\n out.println(t + \";\" + c + \";\" + ty + \";\" + q);\r\n }\r\n }\r\n br.close();\r\n }", "public List<TopicResponse> search(String key) {\n return apiClient.deserializeAsList(apiClient.get(\"/topics/search\", Maps.NEW(\"q\", key), null), TopicResponse.class);\n }", "public Topic readTopicByCode(String code);", "List<TSubjectInfo> selectByExample(TSubjectInfoExample example);", "@Override\n\tpublic List<String> getTagNameInTopic(String userAndTopicId)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "public Student find(int id) {\n\n\t\tfor (int i = 0; i < studentList.size(); i++) {\n\t\t\tif (studentList.get(i).getId() == id) {\n\t\t\t\treturn studentList.get(i);\n\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\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 }", "public ArrayList<Tweet> getTweetsByUserId(long id) {\n\t\tTweet tweet = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\t\"?user sweb:id \" + id + \".\" +\n\t\t\t \t\t\"?tweet sweb:user ?user. \" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t ArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"tweet\");\n\n\t /* Taking care of the date */\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d k:m:s\");\n\t\t\tString dateRaw = currentResource.getProperty(this.createdAt).getString();\n\t\t\tdateRaw = dateRaw.replace('T', ' ');\n\t\t\tdateRaw = dateRaw.replace(\"Z\", \"\");\n\t\t\t\n\t\t\tDate date = null;\n\t\t\ttry {\n\t\t\t\tdate = dateFormat.parse(dateRaw);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t tweet = new Tweet(\n\t \t\tString.valueOf(id),\n\t \t\tcurrentResource.getProperty(this.text).getString(),\n\t \t\tdate\n\t );\t\n\t \n\t tweets.add(tweet);\n\t }\n\t \n\t return tweets;\n\t}", "public List<Integer> getNewsFeed(int userId) {\n User target = null;\n for (User user : users) {\n if (user.id == userId) {\n target = user;\n }\n }\n if (target == null) {\n return null;\n }\n List<Tweet> tweets = new ArrayList<>(target.tweetList);\n for (User follower : target.followers) {\n tweets.addAll(follower.tweetList);\n }\n tweets.sort((o1, o2) -> o2.publishTime - o1.publishTime);\n while (tweets.size() > 10) {\n tweets.remove(tweets.size() - 1);\n }\n List<Integer> list = new ArrayList<>();\n for (Tweet tweet : tweets) {\n list.add(tweet.Id);\n }\n return list;\n }", "@Override\n\tpublic int compare(Topic top1, Topic top2) \n\t{\n\t\treturn top1.getId().compareTo(top2.getId());\n\t}", "List<ClientTopicCouple> listAllSubscriptions();", "@GetMapping(\"/deleteTopicFromAllTopic/{id}\")\n public String deleteTopicFromAllTopic(@PathVariable(\"id\") Integer topicId, Model model) {\n Topic topic = topicService.getTopicById(topicId);\n topicService.deleteTopic(topic);\n return \"redirect:/alltopicsPage\";\n }", "public List<Integer> getNewsFeed(int userId) {\n List<Integer> res = new ArrayList<>();\n PriorityQueue<Tweet> queue = new PriorityQueue<Tweet>((t1, t2) -> t2.ts - t1.ts);\n User u = u_map.get(userId);\n if(u == null) return res;\n u.followed.forEach(followeeId->{\n Tweet head = u_map.get(followeeId).head;\n if(head != null){\n queue.offer(head);\n }\n });\n \n while(res.size() < 10 && !queue.isEmpty()){\n Tweet t = queue.poll();\n res.add(t.id);\n if(t.next != null) queue.offer(t.next);\n }\n return res;\n }", "public List getTopicSubscriberList(String topicName)\n {\n List resultList = new ArrayList();\n for(int ii = 0; ii < topicSubscriberList.size(); ii++)\n {\n TopicSubscriber subscriber = (TopicSubscriber)topicSubscriberList.get(ii);\n try\n {\n if(subscriber.getTopic().getTopicName().equals(topicName))\n {\n resultList.add(subscriber);\n }\n }\n catch(JMSException exc)\n {\n \n }\n }\n return Collections.unmodifiableList(resultList);\n }", "public static List<Action> loadLatestByTopic(TalkerBean talker, TopicBean topic, String nextActionId,boolean isExp) {\r\n\t\tDate firstActionTime = null;\r\n\t\tif (nextActionId != null) {\r\n\t\t\tfirstActionTime = getActionTime(nextActionId);\r\n\t\t}\r\n\t\t\r\n\t\tList<String> cat = FeedsLogic.getCancerType(talker);\r\n\t\t\r\n\t\t//list of needed actions for this Feed\r\n\t\tSet<String> actionTypes = new HashSet<String>();\r\n\t\t//for (ActionType actionType : TOPIC_FEED_ACTIONS) {\r\n\t\t//\tactionTypes.add(actionType.toString());\r\n\t\t//}\r\n\t\tactionTypes.add(ActionType.ANSWER_CONVO.toString());\r\n\t\tSet<DBRef> convosDBSet = ConversationDAO.getConversationsByTopics(new HashSet(Arrays.asList(topic)));\r\n\t\t\r\n\t\t// thoughts are removed from home page\r\n\t\tactionTypes.remove(ActionType.PERSONAL_PROFILE_COMMENT.toString());\r\n\t\t\r\n\t\tBasicDBObjectBuilder queryBuilder = \r\n\t\t\tBasicDBObjectBuilder.start()\r\n\t\t\t\t.add(\"type\", new BasicDBObject(\"$in\", actionTypes))\r\n\t\t\t\t.add(\"convoId\", new BasicDBObject(\"$in\", convosDBSet));\r\n\t\tif (firstActionTime != null) {\r\n\t\t\tqueryBuilder.add(\"time\", new BasicDBObject(\"$lt\", firstActionTime));\r\n\t\t}\r\n\t\tDBObject query = queryBuilder.get();\r\n\t\t\r\n\t\treturn loadPreloadActions(query);\r\n\t}", "@Component\npublic interface FetchSubscribedTopicsDao {\n List<Susbcription> getTopics(String topicname,String username);\n}", "public List<Question> getQuestionsTopic(int tId){\r\n List<Question> questions = new ArrayList<>();\r\n String selectQuery = \"SELECT * FROM \" + TABLE_QUESTIONS + \" AS q INNER JOIN \" +\r\n TABLE_TOPICS_QUESTIONS + \" AS tq ON q.\" +\r\n KEY_ID + \" = tq.\" + KEY_QID +\r\n \" WHERE tq.\" + KEY_TID + \" = \" + tId + \" ORDER BY RANDOM()\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n if(cursor.moveToFirst()){\r\n do{\r\n Question question = new Question();\r\n question.setId(cursor.getInt(cursor.getColumnIndex(KEY_QID)));\r\n question.setQuestion(cursor.getString(cursor.getColumnIndex(KEY_QUESTION)));\r\n question.setAnswer(cursor.getString(cursor.getColumnIndex(KEY_ANSWER)));\r\n question.setExplanation(cursor.getString(cursor.getColumnIndex(KEY_EXPLANATION)));\r\n question.setOptA(cursor.getString(cursor.getColumnIndex(KEY_OPT_A)));\r\n question.setOptB(cursor.getString(cursor.getColumnIndex(KEY_OPT_B)));\r\n question.setOptC(cursor.getString(cursor.getColumnIndex(KEY_OPT_C)));\r\n question.setOptD(cursor.getString(cursor.getColumnIndex(KEY_OPT_D)));\r\n\r\n questions.add(question);\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n\r\n\r\n\r\n cursor.close();\r\n db.close();\r\n return questions;\r\n }", "public ToDo getToDo(String id) {\n return Arrays.stream(allTodos).filter(x -> x._id.equals(id)).findFirst().orElse(null);\n }", "@RequestMapping(value = \"/topics/{id}/courses\", method = RequestMethod.GET)\n public List<Course> getAllCourses(@PathVariable String id) {\n return courseService.getAllCourses(id);\n }", "@GetMapping(value = \"/topics\")\n public String getKafkaTopics() {\n return ksqlService.retrieveTopics();\n }", "public List<Course> getAllCourses(String topicId) {\n\t\tList<Course> courses = new ArrayList<>();\n\t\tcourseRepository.findByTopicId(topicId)\n\t\t.forEach(courses::add);\n\t\treturn courses;\n\t}" ]
[ "0.62007636", "0.59779257", "0.5915415", "0.5851312", "0.58450294", "0.58398354", "0.58398354", "0.57474846", "0.5730356", "0.57254374", "0.5710869", "0.56193763", "0.5604505", "0.5566779", "0.5559936", "0.5542921", "0.5483361", "0.5366984", "0.5361383", "0.5360188", "0.53157175", "0.5273803", "0.5232948", "0.52116704", "0.51673704", "0.5162423", "0.5132918", "0.5117036", "0.51143587", "0.51125634", "0.50923795", "0.5089717", "0.5080789", "0.5066723", "0.50661683", "0.50472784", "0.50419694", "0.50028455", "0.49833667", "0.49818522", "0.49817502", "0.49791643", "0.49770656", "0.49420056", "0.49297765", "0.49179104", "0.49015933", "0.48883146", "0.4871031", "0.48700762", "0.48638168", "0.48638025", "0.48449853", "0.48372537", "0.48364305", "0.48241928", "0.4820581", "0.4811087", "0.480569", "0.4801362", "0.47949955", "0.47910476", "0.4788801", "0.47882748", "0.47822303", "0.47820365", "0.47693497", "0.47692832", "0.4764495", "0.47636276", "0.47572568", "0.47572568", "0.47564545", "0.47505528", "0.4744751", "0.47425637", "0.47370273", "0.47269574", "0.4724793", "0.47225705", "0.47126535", "0.4704069", "0.4702544", "0.4697952", "0.46967375", "0.46953064", "0.4691471", "0.469059", "0.46760875", "0.4676043", "0.46700993", "0.46650183", "0.46629703", "0.46446085", "0.4640048", "0.46362728", "0.4631218", "0.46301794", "0.4626096", "0.46236885" ]
0.6525271
0
TODO Autogenerated method stub
public void putTopic(Topic topic) { topics.add(topic) ; }
{ "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
Test of values method, of class ReviewState.
@Test public void testValues() { System.out.println("values"); ReviewState[] expResult = {ReviewState.PENDING, ReviewState.FINISHED}; ReviewState[] result = ReviewState.values(); assertTrue(Arrays.equals(expResult, result)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String name = \"PENDING\";\n ReviewState expResult = ReviewState.PENDING;\n ReviewState result = ReviewState.valueOf(name);\n assertEquals(expResult, result);\n name = \"FINISHED\";\n expResult = ReviewState.FINISHED;\n result = ReviewState.valueOf(name);\n assertEquals(expResult, result);\n }", "@Test\n public void testValues() {\n System.out.println(\"values\");\n StatusType[] result = StatusType.values();\n assertEquals(result.length, 1);\n }", "@Test\n\tpublic void testValidatePrivacyState() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validatePrivacyState(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validatePrivacyState(\"Invalid value.\");\n\t\t\t\tfail(\"The privacy state was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tfor(SurveyResponse.PrivacyState privacyState: SurveyResponse.PrivacyState.values()) {\n\t\t\t\tAssert.assertEquals(privacyState, SurveyResponseValidators.validatePrivacyState(privacyState.toString()));\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\n public void testValue() {\n System.out.println(\"value\");\n String[] expResults = {\"deleted\"};\n StatusType[] verbTypes = {StatusType.DELETED};\n for (int index1 = 0; index1 < verbTypes.length; index1++) {\n String result = verbTypes[index1].value();\n assertEquals(expResults[index1], result);\n }\n }", "@Test\n public void testGetValues(){\n assertTrue(vector.x == 1 && vector.z == 1);\n }", "@Test\r\n\tpublic void testGetState() {\r\n\t}", "public interface ValueState {\n }", "public abstract void userValues();", "@Test\n public void testValues() {\n System.out.println(\"values\");\n ChannelType[] expResult = null;\n ChannelType[] result = ChannelType.values();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void createFiveValueSet()\n\t{\n\t\tm_mockery.checking(new Expectations()\n\t\t{\n\t\t\t{\n\t\t\t\tallowing(m_values).getItemCount();\n\t\t\t\twill(returnValue(5));\n\t\t\t\t\n\t\t\t\t// Keys.\n\t\t\t\tallowing(m_values).getKey(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getKey(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\tallowing(m_values).getKey(2);\n\t\t\t\twill(returnValue(2));\n\t\t\t\tallowing(m_values).getKey(3);\n\t\t\t\twill(returnValue(3));\n\t\t\t\tallowing(m_values).getKey(4);\n\t\t\t\twill(returnValue(4));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getIndex(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getIndex(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\tallowing(m_values).getIndex(2);\n\t\t\t\twill(returnValue(2));\n\t\t\t\tallowing(m_values).getIndex(3);\n\t\t\t\twill(returnValue(3));\n\t\t\t\tallowing(m_values).getIndex(4);\n\t\t\t\twill(returnValue(4));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getKeys();\n\t\t\t\twill(returnValue(new ArrayList<Integer>() {\n\t\t\t\t\t{\n\t\t\t\t\t\tadd(0);\n\t\t\t\t\t\tadd(1);\n\t\t\t\t\t\tadd(2);\n\t\t\t\t\t\tadd(3);\n\t\t\t\t\t\tadd(4);\n\t\t\t\t\t}}));\n\t\t\t\t\n\t\t\t\t// Values.\n\t\t\t\tallowing(m_values).getValue(0);\n\t\t\t\twill(returnValue(1.1));\n\t\t\t\tallowing(m_values).getValue(1);\n\t\t\t\twill(returnValue(2));\n\t\t\t\tallowing(m_values).getValue(2);\n\t\t\t\twill(returnValue(3.14));\n\t\t\t\tallowing(m_values).getValue(3);\n\t\t\t\twill(returnValue(4));\n\t\t\t\tallowing(m_values).getValue(4);\n\t\t\t\twill(returnValue(5));\n\t\t\t}\n\t\t});\n\t}", "public void verifyValues() {\r\n // update the values view to the latest version, then proceed to verify\r\n // as usual. \r\n values = map.values();\r\n super.verifyValues();\r\n }", "@Test\r\n\tpublic void testValues(){\n\t\tEntityType[] values = EntityType.values();\r\n\t\tassertNotNull(values);\r\n\t}", "int getStateValuesCount();", "@Test\n public void testFromValue() {\n System.out.println(\"fromValue\");\n String[] values = {\"deleted\"};\n StatusType[] expResults = {StatusType.DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.fromValue(values[index1]);\n assertEquals(expResults[index1], result);\n }\n }", "int getStateValue2();", "int getStateValue1();", "int getStateValue();", "int getStateValue();", "int getStateValue();", "public IterableAssertion<V> toValues() {\n checkActualIsNotNull();\n return initializeAssertion(Raw.<V>iterableAssertion(), getActual().values(), Messages.Check.VALUES);\n }", "Object visitValue(ValueNode node, Object state);", "@Test\n public void testGetValue()\n {\n // single default value\n when(m_AttributeModel.getDefaultValues()).thenReturn(Arrays.asList(new String[]{\"one default\"}));\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getValue(), is((Object)\"one default\"));\n \n when(m_AttributeModel.getDefaultValues()).thenReturn(Arrays.asList(new String[]{\"default 1\", \"default 2\"}));\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getValue(), is((Object)Arrays.asList(new String[]{\"default 1\", \"default 2\"})));\n \n // set a value\n m_SUT.setValue(\"test non-default\");\n assertThat(m_SUT.getValue(), is((Object)\"test non-default\"));\n \n //test empty default value array\n when(m_AttributeModel.getDefaultValues()).thenReturn(Arrays.asList(new String[]{}));\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n assertThat(m_SUT.getValue(), is((Object)\"\"));\n \n //ensure that returned type corresponds to given attribute definition type (boolean)\n when(m_AttributeModel.getDefaultValues()).thenReturn(Arrays.asList(new String[]{\"true\"}));\n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.BOOLEAN);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n Boolean myBool = (Boolean)m_SUT.getValue();\n assertThat(myBool, is(true));\n \n //for good measure, verify bad boolean type will result in exception\n when(m_AttributeModel.getDefaultValues()).thenReturn(Arrays.asList(new String[]{\"not a bool\"}));\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n try\n {\n fail(\"illegal argument exception expected. Value is: \"+ m_SUT.getValue());\n }\n catch (IllegalArgumentException e)\n {\n assertThat(e.getMessage(), containsString(\"cannot be parsed to a boolean\"));\n }\n }", "@Test\n public void Test_Maintain_State() {\n Map<String, Integer> inMap = new HashMap<>();\n calc = new StomaStateCalculator(3, 800);\n\n inMap.put(\"UrineColour\", 2);\n inMap.put(\"UrineFrequency\", 3);\n inMap.put(\"Volume\", 600);\n inMap.put(\"Consistency\", 2);\n inMap.put(\"PhysicalCharacteristics\", 6);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n\n calc.Calculate_New_State(inMap);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n }", "@Test\n public void testBasicScorer() {\n assertEquals(0, stateScorer.scoreState(builder().build(), TwoPlayerKey.PLAYER_1));\n\n //The other player has won if they occupy every node on the board:\n assertEquals(-1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_2).build(), TwoPlayerKey.PLAYER_1));\n\n //I have won if I occupy every node on the board:\n assertEquals(1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_1).build(), TwoPlayerKey.PLAYER_1));\n }", "@Test\n public void testInsuredPayerInsuredSex() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setInsuredSexEnum,\n RdaFissPayer::getInsuredSex,\n FissBeneficiarySex.BENEFICIARY_SEX_UNKNOWN,\n \"U\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setInsuredSexUnrecognized,\n RdaFissPayer::getInsuredSex,\n RdaFissPayer.Fields.insuredSex,\n 1);\n }", "@Test\r\n public void testGetOperandValueType() {\r\n System.out.println(\"getOperandValueType\");\r\n Assignment instance = new Assignment();\r\n Value.Type expResult = Value.Type.UNDEFINED;\r\n Value.Type result = instance.getOperandValueType();\r\n assertEquals(expResult, result);\r\n }", "Object visitMapOfValues(MapOfValuesNode node, Object state);", "public int getStateValuesCount() {\n return stateValues_.size();\n }", "@Test\n\tpublic void shouldListStates() {\n\t\tRoleDTO role = workflowStub.assignRole(app, user, formDto);\n\t\n\t\t// Creamos estados con el mismo rol\n\t\tnewState(formDto, \"state1\", role);\n\t\tnewState(formDto, \"state2\", role);\n\t\tnewState(formDto, \"state3\", role);\n\t\t\n\t\tList<State> states = stateService.listStatesForUser(user, formDto);\n\t\tAssert.assertNotNull(\"List of states should NOT be null\", states);\n\t\tAssert.assertEquals(\"List should have the expected size\", 3, states.size());\n\t}", "public abstract Object getDecisionValue();", "int getStateValue3();", "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String[] values = {\"DELETED\"};\n StatusType[] expResults = {StatusType. DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.valueOf(values[index1].toUpperCase());\n assertEquals(expResults[index1], result);\n }\n }", "protected abstract Value evaluate();", "public void testGetStateName() {\r\n test1 = state2;\r\n assertEquals(test1.getStateName(), \"Virginia\");\r\n }", "public int getStateValuesCount() {\n return stateValues_.size();\n }", "Object visitArrayOfValues(ArrayOfValuesNode node, Object state);", "@Test\n public void tc_VerifyValue_MemorizedValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n // Set Value in \"Memory\"\n OKW_Memorize_Sngltn.getInstance().set( \"Key1\", \"The one and only Value\" );\n\n // Wert in \"All_MethodsObj\" setzen.\n EN.SetValue( \"All_MethodsObj\", \"The one and only Value\" );\n // Prüfung des Schlüsselwortes?\n EN.VerifyValue( \"All_MethodsObj\", \"${Key1}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n //assertEquals( \"Wert 1\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyValue()\", myClipBoard.getMethod() );\n }", "@Test\n public void testSetLostValues() {\n System.out.println(\"setLostValues\");\n }", "private int evaluateState() {\r\n\r\n\t\t// add up score\r\n\t\t//\r\n\t\tint scoreWhite = 0;\r\n\t\tint scoreBlack = 0;\r\n\t\tfor (Piece piece : this.chessGame.getPieces()) {\r\n\t\t\tif(piece.getColor() == Piece.COLOR_BLACK){\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else if( piece.getColor() == Piece.COLOR_WHITE){\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else{\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"unknown piece color found: \"+piece.getColor());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// return evaluation result depending on who's turn it is\r\n\t\tint gameState = this.chessGame.getGameState();\r\n\t\t\r\n\t\tif( gameState == ChessGame.GAME_STATE_BLACK){\r\n\t\t\treturn scoreBlack - scoreWhite;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_WHITE){\r\n\t\t\treturn scoreWhite - scoreBlack;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t\t|| gameState == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\treturn Integer.MIN_VALUE + 1;\r\n\t\t\r\n\t\t}else{\r\n\t\t\tthrow new IllegalStateException(\"unknown game state: \"+gameState);\r\n\t\t}\r\n\t}", "public void testGetNewValue_Accuracy() {\r\n String newValue = \"newValue\";\r\n UnitTestHelper.setPrivateField(AuditDetail.class, auditDetail, \"newValue\", newValue);\r\n assertEquals(\"The newValue value should be got properly.\", newValue, auditDetail.getNewValue());\r\n }", "public boolean evaluate() {\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// handle the case when this.getValue() is null\r\n\t\t\tif (this.getValue() == null) {\r\n\t\t\t\t// if the value is null, then we just need to see if expected evaluation is also null\r\n\t\t\t\treturn this.getCurrentEvaluation() == null;\r\n\t\t\t}\r\n\t\t\t// if entities have the same name, they are equals.\r\n\t\t\tif (this.getCurrentEvaluation().getName().equalsIgnoreCase(this.getValue().getName())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "protected abstract int evaluate(GameState state, String playername);", "private void createTwoValueSet()\n\t{\n\t\tm_mockery.checking(new Expectations()\n\t\t{\n\t\t\t{\n\t\t\t\tallowing(m_values).getItemCount();\n\t\t\t\twill(returnValue(2));\n\t\t\t\t\n\t\t\t\t// Keys.\n\t\t\t\tallowing(m_values).getKey(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getKey(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getIndex(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getIndex(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getKeys();\n\t\t\t\twill(returnValue(new ArrayList<Integer>() {{ add(0); add(1); }}));\n\t\t\t\t\n\t\t\t\t// Values.\n\t\t\t\tallowing(m_values).getValue(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getValue(1);\n\t\t\t\twill(returnValue(3));\n\t\t\t}\n\t\t});\n\t}", "@Test\n public void testBeneZPayerInsuredSex() {\n new BeneZPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissBeneZPayer.Builder::setInsuredSexEnum,\n RdaFissPayer::getInsuredSex,\n FissBeneficiarySex.BENEFICIARY_SEX_FEMALE,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissBeneZPayer.Builder::setInsuredSexUnrecognized,\n RdaFissPayer::getInsuredSex,\n RdaFissPayer.Fields.insuredSex,\n 1);\n }", "java.util.List<java.lang.Integer> getStateValuesList();", "@Test\n\tpublic void testSetters()\n\t{\n\t\tAIContext context = new AIContext(a, e); \n\t\tassertTrue(context.getCurrentState() instanceof NoWeaponState); \n\t\t\n\t\tcontext.setCurrentState(new DeadState(context));\n\t\tassertTrue(context.getCurrentState() instanceof DeadState);\n\t\t\n\t\tcontext.setCurrentState(new HasWeaponState(context));\n\t\tassertTrue(context.getCurrentState() instanceof HasWeaponState);\n\t\t\n\t\tcontext.setCurrentState(new OutOfAmmoState(context));\n\t\tassertTrue(context.getCurrentState() instanceof OutOfAmmoState);\n\t\t\n\t\tcontext.setCurrentState(new NoWeaponState(context));\n\t\tassertTrue(context.getCurrentState() instanceof NoWeaponState);\n\t}", "@Test\n public void tc_VerifySelectedValue_MemorizedValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n // Set Value in \"Memory\"\n OKW_Memorize_Sngltn.getInstance().set( \"Key1\", \"The one and only Value\" );\n\n // Wert in \"All_MethodsObj\" setzen.\n EN.SetValue( \"All_MethodsObj\", \"The one and only Value\" );\n // Prüfung des Schlüsselwortes?\n EN.VerifySelectedValue( \"All_MethodsObj\", \"${Key1}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n //assertEquals( \"Wert 1\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifySelectedValue()\", myClipBoard.getMethod() );\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n String expResult = \"Pendente\";\n String result = ReviewState.PENDING.toString();\n assertEquals(expResult, result);\n expResult = \"Terminada\";\n result = ReviewState.FINISHED.toString();\n assertEquals(expResult, result);\n }", "@Test\n public void consumedStates() {\n transaction(database, tx -> {\n fillWithSomeTestCash(services,\n new Amount<>(100, Currency.getInstance(\"USD\")),\n getDUMMY_NOTARY(),\n 3,\n 3,\n new Random(),\n new OpaqueBytes(\"1\".getBytes()),\n null,\n getDUMMY_CASH_ISSUER(),\n getDUMMY_CASH_ISSUER_KEY() );\n\n // DOCSTART VaultJavaQueryExample1\n @SuppressWarnings(\"unchecked\")\n Set<Class<ContractState>> contractStateTypes = new HashSet(Collections.singletonList(Cash.State.class));\n Vault.StateStatus status = Vault.StateStatus.CONSUMED;\n\n VaultQueryCriteria criteria = new VaultQueryCriteria(status, null, contractStateTypes);\n Vault.Page<ContractState> results = vaultSvc.queryBy(criteria);\n // DOCEND VaultJavaQueryExample1\n\n assertThat(results.getStates()).hasSize(3);\n\n return tx;\n });\n }", "@Given(\"^Value is 3$\")\n\tpublic void captureValue() {\n\t\ti = 3;\n\t\t//Assert.assertEquals(true, false);\n\t}", "private void verifyAllValues(AllValues allValues, int offset) {\n\t\tfor (int i = offset; i < allValues.size(); i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tassertTrue(\"OneValue at index \" + i + \" should be of type OneResult\", allValues.get(i) instanceof OneResult);\n\t\t\t\tassertEquals(\"Value at index \" + i + \" should be equal to \" + i, i, allValues.get(i).getValue());\n\t\t\t} else {\n\t\t\t\tassertTrue(\"OneValue at index \" + i + \" should be of type OneReject\", allValues.get(i) instanceof OneReject);\n\t\t\t\tassertTrue(\"Value at index \" + i + \" should be of type IndexedRuntimeException\", allValues.get(i).getValue() instanceof IndexedRuntimeException);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testClaimProvStateCd() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setProvStateCd,\n RdaFissClaim::getProvStateCd,\n RdaFissClaim.Fields.provStateCd,\n 2);\n }", "@Test\n public void valuesTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.values());\n }", "@Test\r\n\tpublic void testValuesMatchObjecType(){\r\n\t\t// Make sure we can get all of the values\r\n\t\tEntityType[] values = EntityType.values();\r\n\t\tassertNotNull(values);\r\n\t\tassertEquals(\"Expected one EntityType for each EntityType\",EntityType.values().length,values.length);\r\n\t}", "@Test\n\tpublic void validState_changeState() {\n\t\tString testState = \"OFF\";\n\t\tItem testItem = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\ttestItem.changeState(testItem.getName(), testState);\n\t\tSystem.out.println(testItem.getState());\n\t\tassertEquals(testItem.getState(), testState);\n\t\t\n\t}", "Values values();", "public void testGetNewValue_Default_Accuracy() {\r\n assertEquals(\"The newValue value should be got properly.\", null, auditDetail.getNewValue());\r\n }", "@Test\n public void tc_VerifyIsActive_MemorizedValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n // Set Value in \"Memory\"\n OKW_Memorize_Sngltn.getInstance().set( \"Key1\", \"YES\" );\n\n // Wert in \"All_MethodsObj\" setzen.\n EN.SetValue( \"All_MethodsObj\", \"YES\" );\n // Prüfung des Schlüsselwortes?\n EN.VerifyIsActive( \"All_MethodsObj\", \"${Key1}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"YES\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyIsActive()\", myClipBoard.getMethod() );\n }", "@Test\n public void value() {\n assertEquals(\"4\", onPage.get(\"select\").withName(\"plain_select\").value());\n // Get the first selected value for a multiple select\n assertEquals(\"2\", onPage.get(\"select\").withName(\"multiple_select\").value());\n // Get the value of the option\n assertEquals(\"1\", onPage.get(\"select\").withName(\"plain_select\").get(\"option\").value());\n assertEquals(\" The textarea content. \", onPage.get(\"textarea\").value());\n assertEquals(\"Enter keywords here\", onPage.get(\"#keywords\").value());\n // Checkboxes and radiobuttons simply return the value of the first element,\n // not the first checked element\n assertEquals(\"google\", onPage.get(\"input\").withName(\"site\").value());\n }", "@Test\n void getCurrentRewardsFromUpgradeTest() {\n EnumMap<CardPoints,Integer> oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 3);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); //index/state = 0, cost stage 1\n assertEquals(oracle, this.wonder.getProp().get(this.wonder.getState()).y); //index/state = 0, cost stage 1\n\n wonder.setState(wonder.getState() + 1); // stage one is build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n //reward is an effect, so no cardpoints\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 1, cost stage 2\n\n wonder.setState(wonder.getState() + 1); // 2 stage build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 7);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 2, cost stage 3\n wonder.setState(wonder.getState() + 1); // Build the last stage\n\n //return an outIndexError when we call this method\n }", "int getStateValues(int index);", "@Test\n void saveStateSuccessForAnonimUser() throws Exception {\n //given\n Map<String, Object> populatedObjects = populateDb.populateDbWithAnonimUserAndCredentialsAndToken();\n TokenEntity tokenEntity = (TokenEntity) populatedObjects.get(\"tokenEntity\");\n User user = (User) populatedObjects.get(\"user\");\n\n ValueCompatibilityAnswersEntity valueCompatibilityAnswersEntity = getValueCompatibilityEntity();\n valueCompatibilityAnswersEntity = populateDb.populateDbWithValueCompatibilityAnswersEntity(\n valueCompatibilityAnswersEntity.getUserAnswers(), user, Area.QUALITY);\n assertDbBeforeSaveState(valueCompatibilityAnswersEntity);\n\n ValueCompatibilityAnswersDto requestBody = getValueCompatibilityAnswersDto(env);\n\n //when\n MvcResult mvcResult = mockMvc.perform(post(\"/test/state\")\n .contentType(MediaType.APPLICATION_JSON_UTF8)\n .content(mapper.writeValueAsString(requestBody))\n .header(\"AUTHORIZATION\", ACCESS_TOKEN_PREFIX + \" \" + tokenEntity.getToken()))\n .andExpect(status().isOk())\n .andReturn();\n\n //then\n ValueCompatibilityAnswersDto responseBody = mapper.readValue(mvcResult\n .getResponse()\n .getContentAsString(), ValueCompatibilityAnswersDto.class);\n\n assertEquals(TOTAL_NUMBER_OF_QUESTIONS_FOR_AREA, responseBody.getGoal().size());\n assertEquals(TOTAL_NUMBER_OF_QUESTIONS_FOR_AREA, responseBody.getQuality().size());\n assertEquals(TOTAL_NUMBER_OF_QUESTIONS_FOR_AREA, responseBody.getState().size());\n\n assertEquals(requestBody.getGoal(), responseBody.getGoal());\n for (int i = 0; i < responseBody.getGoal().size(); i++) {\n assertEquals(requestBody.getGoal().get(i).getChosenScale().getScale(),\n responseBody.getGoal().get(i).getChosenScale().getScale());\n }\n assertEquals(requestBody.getQuality(), responseBody.getQuality());\n for (int i = 0; i < responseBody.getQuality().size(); i++) {\n assertEquals(requestBody.getQuality().get(i).getChosenScale().getScale(),\n responseBody.getQuality().get(i).getChosenScale().getScale());\n }\n assertEquals(requestBody.getState(), responseBody.getState());\n for (int i = 0; i < responseBody.getState().size(); i++) {\n assertEquals(requestBody.getState().get(i).getChosenScale().getScale(),\n responseBody.getState().get(i).getChosenScale().getScale());\n }\n\n assertEquals(1, userRepository.findAll().size());\n assertEquals(1, credentialsRepository.findAll().size());\n assertEquals(1, tokenRepository.findAll().size());\n assertEquals(1, valueCompatibilityAnswersRepository.findAll().size());\n assertEquals(0, userAccountRepository.findAll().size());\n }", "@Test\n\tpublic void shouldListStatesForAssigendRoles() {\n\t\tRoleDTO roleAssignedToUser = workflowStub.assignRole(app, user, formDto);\n\t\n\t\tRoleDTO anotherRoleDto = createAnotherRole(app, user);\n\t\t\n\t\t// Creamos un solo estado con el rol asignado al usuario\n\t\tnewState(formDto, \"state1\", roleAssignedToUser);\n\t\t\n\t\t// Otros estados con roles que no tiene\n\t\tnewState(formDto, \"state2\", anotherRoleDto);\n\t\tnewState(formDto, \"state3\", anotherRoleDto);\n\t\t\n\t\t\n\t\tList<State> states = stateService.listStatesForUser(user, formDto);\n\t\tAssert.assertNotNull(\"List of states should NOT be null\", states);\n\t\tAssert.assertEquals(\"List should have the expected size\", 1, states.size());\n\t}", "@Test\n public void tc__VerifyValue_EnviromentValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n EN.SetValue( \"All_MethodsObj\", \"${TCN}\" );\n // Umgebungsvariable eingeben\n EN.VerifyValue( \"All_MethodsObj\", \"${TCN}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( TestName, myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyValue()\", myClipBoard.getMethod() );\n }", "@Test\n public void testGetValue() {\n System.out.println(\"getValue\");\n int index = 0;\n Vector instance = null;\n double expResult = 0.0;\n double result = instance.getValue(index);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public abstract Value validateValue(Value value);", "@Override\n public void verifyResult() {\n assertThat(calculator.getResult(), is(4));\n }", "public java.util.List<java.lang.Integer>\n getStateValuesList() {\n return stateValues_;\n }", "@Test\n\tpublic void shouldListAllStatesRegardlessAssignedRoles() {\n\t\tRoleDTO roleAssignedToUser = workflowStub.assignRole(app, user, formDto);\n\t\n\t\tRoleDTO anotherRoleDto = createAnotherRole(app, user);\n\t\t\n\t\t// Creamos un solo estado con el rol asignado al usuario\n\t\tnewState(formDto, \"state1\", roleAssignedToUser);\n\t\tnewState(formDto, \"state2\", roleAssignedToUser);\n\t\tnewState(formDto, \"state3\", anotherRoleDto);\n\t\tnewState(formDto, \"state4\", anotherRoleDto);\n\t\t\n\t\t\n\t\tList<State> states = stateService.listAllStates(formDto);\n\t\tAssert.assertNotNull(\"List of states should NOT be null\", states);\n\t\tAssert.assertEquals(\"List should have the expected size\", 4, states.size());\n\t}", "boolean isValue();", "public void testQuery() {\n Random random = new Random();\n ContentValues values = makeServiceStateValues(random, mBaseDb);\n final long rowId = mBaseDb.insert(TBL_SERVICE_STATE, null, values);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n List<ServiceStateTuple> tuples = table.query(mTestContext, null, null, null, null,\n null, null, null);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(rowId, values, tuple);\n }", "@Test\n public void tc__VerifyTablecellValue_EnviromentValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n EN.SetValue( \"All_MethodsObj\", \"${TCN}\" );\n // Umgebungsvariable eingeben\n EN.VerifyTablecellValue( \"All_MethodsObj\", \"X\", \"Y\", \"${TCN}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( 3, myClipBoard.getValue().size() );\n assertEquals( TestName, myClipBoard.getValue().get( 0 ) );\n assertEquals( \"X\", myClipBoard.getValue().get( 1 ) );\n assertEquals( \"Y\", myClipBoard.getValue().get( 2 ) );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyTablecellValue()\", myClipBoard.getMethod() );\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n public void tc__VerifySelectedValue_EnviromentValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n EN.SetValue( \"All_MethodsObj\", \"${TCN}\" );\n // Umgebungsvariable eingeben\n EN.VerifySelectedValue( \"All_MethodsObj\", \"${TCN}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( TestName, myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifySelectedValue()\", myClipBoard.getMethod() );\n }", "public void allActualValuesUpdated ();", "public void displayStateValues()\n\t{\n\t\tfor (State s : stateSpace)\n\t\t{\n\t\t\tSystem.out.println(s.state + \"\\t\" + this.value.get(s));\n\t\t}\n\t}", "@Test\n public void testInsuredPayerAssignInd() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setAssignIndEnum,\n RdaFissPayer::getAssignInd,\n FissAssignmentOfBenefitsIndicator.ASSIGNMENT_OF_BENEFITS_INDICATOR_BENEFITS_ASSIGNED,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setAssignIndUnrecognized,\n RdaFissPayer::getAssignInd,\n RdaFissPayer.Fields.assignInd,\n 1);\n }", "public void testSetNewValue_Accuracy() {\r\n String newValue = \"newValue\";\r\n auditDetail.setNewValue(newValue);\r\n assertEquals(\"The newValue value should be set properly.\", newValue,\r\n UnitTestHelper.getPrivateField(AuditDetail.class, auditDetail, \"newValue\").toString());\r\n }", "@Test\n public void test_getStatus() {\n UserStatus value = new UserStatus();\n instance.setStatus(value);\n\n assertSame(\"'getStatus' should be correct.\",\n value, instance.getStatus());\n }", "@Test\n public void test_setStatus() {\n UserStatus value = new UserStatus();\n instance.setStatus(value);\n\n assertSame(\"'setStatus' should be correct.\",\n value, TestsHelper.getField(instance, \"status\"));\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void getPriceValue() throws Exception {\r\n assertEquals(p1,point1.getPriceValue(),0.0);\r\n assertEquals(p2,point2.getPriceValue(),0.0);\r\n assertEquals(p3,point3.getPriceValue(),0.0);\r\n assertEquals(p4,point4.getPriceValue(),0.0);\r\n }", "private static int evalState(GameState state){\n Move m = state.getMove();\n int counter = 0;\n\n // return directly if we encouter win or loss\n if(m.isXWin()){\n return 10000;\n }\n else if(m.isOWin()){\n return -1;\n }\n\n Vector<Integer> points = new Vector<Integer>();\n points.setSize(state.BOARD_SIZE*2+2);\n int player;\n Collections.fill(points, 1);\n int scaling = 4;\n int value = 0;\n\n for(int row = 0; row < state.BOARD_SIZE; row ++){\n for(int col = 0; col < state.BOARD_SIZE; col ++){\n player = state.at(row, col);\n\n // add points to the vector, increase by a factor for every new entry\n if(player == 1){\n points.set(row, points.get(row)*scaling);\n points.add(state.BOARD_SIZE + col, points.get(state.BOARD_SIZE - 1 + col)*scaling);\n\n // if it's in the first diagonal\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, points.get(state.BOARD_SIZE*2)*scaling);\n }\n\n // checking other diagonal\n if(counter%state.BOARD_SIZE-1 == 0 && row+col != 0){\n points.add(state.BOARD_SIZE*2 + 1, points.get(state.BOARD_SIZE*2)*scaling);\n }\n }\n // if an enemy player is encoutered null the value of the row/col\n else if(player == 2){\n points.set(row, 0);\n points.set(state.BOARD_SIZE + col, 0);\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, 0);\n }\n if(counter%state.BOARD_SIZE-1 == 0){\n points.add(state.BOARD_SIZE*2 + 1, 0);\n }\n }\n counter++;\n }\n }\n\n // if we have nulled the point we don't count it for the value of the state\n for(Integer i: points){\n if(i > 1){\n value += i;\n }\n }\n //System.err.println(\"Value: \" + value);\n return value;\n }", "private void valueIteration(double discount, double threshold) {\n\t\tArrayList<Double> myStateValueCopy = new ArrayList<Double>(this.numMyStates);\n\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\tmyStateValueCopy.add((double) this.stateValueList.get(i));\n\t\t}\n\t\tdouble delta = 100.0;\n\t\tdo {\n\t\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\t\tdouble maxValue = -1000000000000000.0;\n\t\t\t\tmyState s = new myState(i);\n\t\t\t\tfor(myAction a: this.getActions(s)) {\n\t\t\t\t\tdouble qValue = this.rewardTable.get(i).get(a.id);\n\t\t\t\t\tfor(int k=0; k<this.numMyStates; k++) {\n\t\t\t\t\t\tdouble transProb = this.transitionProbabilityTable.get(i).get(a.id).get(k);\n\t\t\t\t\t\tqValue+=discount*(transProb*myStateValueCopy.get(k));\n\t\t\t\t\t}\n\t\t\t\t\tif(qValue>maxValue) {\n\t\t\t\t\t\tmaxValue = qValue;\n\t\t\t\t\t\tthis.policy.set(i, a.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmyStateValueCopy.set(i, maxValue);\n\t\t\t}\n\t\t\t// compute delta change in value list\n\t\t\tdelta = 0.0;\n\t\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\t\tdouble vsDelta = this.stateValueList.get(i) - myStateValueCopy.get(i);\n\t\t\t\tthis.stateValueList.set(i, (double) myStateValueCopy.get(i));\n\t\t\t\tdelta+= vsDelta*vsDelta;\n\t\t\t}\n\t\t} while(delta>threshold);\n\t\tSystem.gc();\n\t}", "@Test\n public void testGameStateStack_OnPlayState(){\n\n System.out.println(gsm.getCurrentState());\n }", "@Test\n public void tc_VerifyTablecellValue_MemorizedValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n // Set Value in \"Memory\"\n OKW_Memorize_Sngltn.getInstance().set( \"Key1\", \"The one and only Value\" );\n\n // Wert in \"All_MethodsObj\" setzen.\n EN.SetValue( \"All_MethodsObj\", \"The one and only Value\" );\n // Prüfung des Schlüsselwortes?\n EN.VerifyTablecellValue( \"All_MethodsObj\", \"X\", \"Y\", \"${Key1}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( 3, myClipBoard.getValue().size() );\n assertEquals( \"The one and only Value\", myClipBoard.getValue().get( 0 ) );\n assertEquals( \"X\", myClipBoard.getValue().get( 1 ) );\n assertEquals( \"Y\", myClipBoard.getValue().get( 2 ) );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyTablecellValue()\", myClipBoard.getMethod() );\n }", "public void testUpdate() {\n Random random = new Random();\n ContentValues originalValues = makeServiceStateValues(random, mBaseDb);\n final long rowId = mBaseDb.insert(TBL_SERVICE_STATE, null, originalValues);\n\n // update state and timestamp\n ServiceStateTuple tuple = new ServiceStateTuple();\n tuple.put(COL_STATE, String.valueOf(random.nextGaussian()));\n tuple.put(COL_TIMESTAMP, random.nextLong());\n\n // update table\n ServiceStateTable table = new ServiceStateTable();\n int updated = table.update(mTestContext, tuple, null, null);\n assertEquals(1, updated);\n\n // query and verify using base db\n Cursor cursor = mBaseDb.query(TBL_SERVICE_STATE, null, null, null, null, null, null);\n assertNotNull(cursor);\n assertTrue(cursor.moveToFirst());\n assertEquals(1, cursor.getCount());\n // original values\n assertEquals(rowId, cursor.getLong(cursor.getColumnIndex(COL_ID)));\n assertEquals(TestHelper.getLong(originalValues, COL_FK_MONITOR_SESSION),\n cursor.getLong(cursor.getColumnIndex(COL_FK_MONITOR_SESSION)));\n // updated values\n try {\n assertEquals(tuple.getString(COL_STATE),\n cursor.getString(cursor.getColumnIndex(COL_STATE)));\n assertEquals(tuple.getLong(COL_TIMESTAMP),\n cursor.getLong(cursor.getColumnIndex(COL_TIMESTAMP)));\n } catch (IllegalArgumentException iae) {\n fail(iae.toString());\n }\n cursor.close();\n }", "Object getState();", "public void getState();", "public boolean isValid(GameState gameState);", "boolean getValue();", "protected void test_VALUES(final Map values, final Class clazz) {\n try {\n validate(values != null);\n validate(values.size() > 0);\n validate(!values.keySet().contains(null));\n validate(!values.values().contains(null));\n Iterator iter = values.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry entry = (Map.Entry)iter.next();\n validate(entry.getValue().getClass() == clazz);\n validate(entry.getKey() instanceof String);\n }\n }\n catch (Throwable t) {\n unexpectedThrowable(t);\n }\n }", "@Test\r\n\tpublic void testPortfolioValueUpdate1() {\n\t\tassertTrue(\"Portfolio value must reflect current data\", false);\r\n\t}", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@Test\n public void testBeneZPayerAssignInd() {\n new BeneZPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissBeneZPayer.Builder::setAssignIndEnum,\n RdaFissPayer::getAssignInd,\n FissAssignmentOfBenefitsIndicator.ASSIGNMENT_OF_BENEFITS_INDICATOR_BENEFITS_ASSIGNED,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissBeneZPayer.Builder::setAssignIndUnrecognized,\n RdaFissPayer::getAssignInd,\n RdaFissPayer.Fields.assignInd,\n 1);\n }", "@Test\n public void testGetValue() {\n System.out.println(\"getValue\");\n Setting instance = null;\n Object expResult = null;\n Object result = instance.getValue();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public int getMyNumStates() { return myNumStates; }", "@Test\r\n public void testGetRating() {\r\n }" ]
[ "0.62675357", "0.59805316", "0.59445715", "0.5939004", "0.5899693", "0.57641447", "0.57296795", "0.5633476", "0.56070995", "0.5602328", "0.5560461", "0.5550297", "0.5535156", "0.55215293", "0.5514626", "0.54544634", "0.54367644", "0.54367644", "0.54367644", "0.5415088", "0.53991777", "0.534275", "0.532778", "0.5327754", "0.53245145", "0.53216463", "0.5307142", "0.5290318", "0.5290196", "0.52877396", "0.5272108", "0.5257343", "0.5253176", "0.5250237", "0.5241581", "0.5228339", "0.5227459", "0.5220202", "0.52154875", "0.5215254", "0.5173352", "0.5167519", "0.51627606", "0.5154228", "0.5152105", "0.5148971", "0.51374376", "0.5133883", "0.512671", "0.51232356", "0.5118389", "0.51069266", "0.51008826", "0.5095269", "0.50944287", "0.5091326", "0.50833917", "0.5066926", "0.50579673", "0.5053818", "0.50452965", "0.50292325", "0.5026121", "0.5025204", "0.5024628", "0.501777", "0.5005136", "0.4998193", "0.49865496", "0.4982158", "0.4979491", "0.4948358", "0.4948117", "0.49391997", "0.49386624", "0.49329767", "0.4927227", "0.4926255", "0.49216735", "0.49199477", "0.4917473", "0.4911537", "0.48966306", "0.48790836", "0.48775247", "0.48699573", "0.48665664", "0.48642045", "0.48596686", "0.48525912", "0.4852255", "0.48454303", "0.48417392", "0.48375666", "0.48375666", "0.48375666", "0.48355418", "0.48333603", "0.4833231", "0.4829049" ]
0.78233474
0
Test of valueOf method, of class ReviewState.
@Test public void testValueOf() { System.out.println("valueOf"); String name = "PENDING"; ReviewState expResult = ReviewState.PENDING; ReviewState result = ReviewState.valueOf(name); assertEquals(expResult, result); name = "FINISHED"; expResult = ReviewState.FINISHED; result = ReviewState.valueOf(name); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testToString() {\n System.out.println(\"toString\");\n String expResult = \"Pendente\";\n String result = ReviewState.PENDING.toString();\n assertEquals(expResult, result);\n expResult = \"Terminada\";\n result = ReviewState.FINISHED.toString();\n assertEquals(expResult, result);\n }", "int getStateValue2();", "@Test\n public void testValues() {\n System.out.println(\"values\");\n ReviewState[] expResult = {ReviewState.PENDING, ReviewState.FINISHED};\n ReviewState[] result = ReviewState.values();\n assertTrue(Arrays.equals(expResult, result));\n }", "int getStateValue();", "int getStateValue();", "int getStateValue();", "int getStateValue1();", "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String[] values = {\"DELETED\"};\n StatusType[] expResults = {StatusType. DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.valueOf(values[index1].toUpperCase());\n assertEquals(expResults[index1], result);\n }\n }", "java.lang.String getState();", "Object getState();", "public void testGetStateName() {\r\n test1 = state2;\r\n assertEquals(test1.getStateName(), \"Virginia\");\r\n }", "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String name = \"\";\n ChannelType expResult = null;\n ChannelType result = ChannelType.valueOf(name);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "String getState();", "String getState();", "String getState();", "int getStateValue3();", "public abstract String getState();", "State getState();", "State getState();", "State getState();", "State getState();", "private static ContextState stringToContextState(String s) \n {\n for (ContextState enumVal : ContextState.values())\n {\n if (enumVal.toString().equals(s))\n return enumVal;\n }\n \n // in case of failure:\n return ContextState.PUBLISHED;\n }", "@Test\n\tpublic void validState_changeState() {\n\t\tString testState = \"OFF\";\n\t\tItem testItem = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\ttestItem.changeState(testItem.getName(), testState);\n\t\tSystem.out.println(testItem.getState());\n\t\tassertEquals(testItem.getState(), testState);\n\t\t\n\t}", "StateType createStateType();", "public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }", "@Test\r\n\tpublic void testGetState() {\r\n\t}", "@Test\r\n public void testGetOperandValueType() {\r\n System.out.println(\"getOperandValueType\");\r\n Assignment instance = new Assignment();\r\n Value.Type expResult = Value.Type.UNDEFINED;\r\n Value.Type result = instance.getOperandValueType();\r\n assertEquals(expResult, result);\r\n }", "ESMFState getState();", "@Test\n public void testValueOf() {\n assertSame(Configuration.Key.isDoubleToDoubleSupported,\n Configuration.Key.valueOf(\"isDoubleToDoubleSupported\", Boolean.class));\n assertSame(Configuration.Key.mtFactory,\n Configuration.Key.valueOf(\"mtFactory\", MathTransformFactory.class));\n }", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "@Test\n public void testFromValue() {\n System.out.println(\"fromValue\");\n String[] values = {\"deleted\"};\n StatusType[] expResults = {StatusType.DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.fromValue(values[index1]);\n assertEquals(expResults[index1], result);\n }\n }", "@Test\n public void testClaimCurrStatus() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCurrStatusEnum,\n claim -> String.valueOf(claim.getCurrStatus()),\n FissClaimStatus.CLAIM_STATUS_MOVE,\n \"M\")\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setCurrStatusUnrecognized,\n claim -> String.valueOf(claim.getCurrStatus()),\n RdaFissClaim.Fields.currStatus,\n 1);\n }", "@Test\n public void testInsuredPayerInsuredSex() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setInsuredSexEnum,\n RdaFissPayer::getInsuredSex,\n FissBeneficiarySex.BENEFICIARY_SEX_UNKNOWN,\n \"U\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setInsuredSexUnrecognized,\n RdaFissPayer::getInsuredSex,\n RdaFissPayer.Fields.insuredSex,\n 1);\n }", "@Test(expected = IllegalArgumentException.class)\n public void testFromValueWithException() {\n System.out.println(\"fromValue\");\n String value = \"DELETED\";\n StatusType expResult = StatusType.DELETED;\n StatusType result = StatusType.fromValue(value);\n assertEquals(expResult, result);\n }", "@Test\n @DisplayName(\"The state key must match what was provided in the constructor\")\n void testStateKey() {\n final var state = new WritableSingletonStateBase<>(COUNTRY_STATE_KEY, () -> AUSTRALIA, val -> {});\n assertThat(state.getStateKey()).isEqualTo(COUNTRY_STATE_KEY);\n }", "StateT getState();", "@Test\n public void testClaimProvStateCd() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setProvStateCd,\n RdaFissClaim::getProvStateCd,\n RdaFissClaim.Fields.provStateCd,\n 2);\n }", "public String idToState(int id);", "@Test\n public void testInsuredPayerAssignInd() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setAssignIndEnum,\n RdaFissPayer::getAssignInd,\n FissAssignmentOfBenefitsIndicator.ASSIGNMENT_OF_BENEFITS_INDICATOR_BENEFITS_ASSIGNED,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setAssignIndUnrecognized,\n RdaFissPayer::getAssignInd,\n RdaFissPayer.Fields.assignInd,\n 1);\n }", "public interface ValueState {\n }", "@Test\n public void Test_Maintain_State() {\n Map<String, Integer> inMap = new HashMap<>();\n calc = new StomaStateCalculator(3, 800);\n\n inMap.put(\"UrineColour\", 2);\n inMap.put(\"UrineFrequency\", 3);\n inMap.put(\"Volume\", 600);\n inMap.put(\"Consistency\", 2);\n inMap.put(\"PhysicalCharacteristics\", 6);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n\n calc.Calculate_New_State(inMap);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n }", "State mo5880e(String str);", "public State getState();", "public State getState();", "public void testEnum() {\n assertNotNull(MazeCell.valueOf(MazeCell.UNEXPLORED.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.INVALID_CELL.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.CURRENT_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.FAILED_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.WALL.toString()));\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public abstract State getSourceState ();", "public AeBpelState getState();", "private static String getStateInput() {\n\t\treturn getQuery(\"Valid State\");\n\t}", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@Test\n public void testBeneZPayerAssignInd() {\n new BeneZPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissBeneZPayer.Builder::setAssignIndEnum,\n RdaFissPayer::getAssignInd,\n FissAssignmentOfBenefitsIndicator.ASSIGNMENT_OF_BENEFITS_INDICATOR_BENEFITS_ASSIGNED,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissBeneZPayer.Builder::setAssignIndUnrecognized,\n RdaFissPayer::getAssignInd,\n RdaFissPayer.Fields.assignInd,\n 1);\n }", "@Test\n public void getAction() {\n Card dealerCard = new CardClassAdapter(RankEnum.NINE, SuitEnum.DIAMONDS);\n\n PlayerActionEnum actionEnum1 = PlayerActionEnum.STAND;\n State55 instance = State55.getInstance();\n assertEquals(\"STAND\", actionEnum1, instance.getAction(dealerCard));\n\n }", "@Test\n public void testBeneZPayerInsuredSex() {\n new BeneZPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissBeneZPayer.Builder::setInsuredSexEnum,\n RdaFissPayer::getInsuredSex,\n FissBeneficiarySex.BENEFICIARY_SEX_FEMALE,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissBeneZPayer.Builder::setInsuredSexUnrecognized,\n RdaFissPayer::getInsuredSex,\n RdaFissPayer.Fields.insuredSex,\n 1);\n }", "@Test\n public void testConstruction()\n {\n String constructed = StateUtils.construct(TEST_DATA, externalContext);\n Object object = org.apache.myfaces.application.viewstate.StateUtils.reconstruct(constructed, externalContext);\n Assertions.assertTrue(TEST_DATA.equals(object));\n }", "public abstract ExplicitMachineState convertToExplicitMachineState(MachineState state);", "@Test\n\tpublic void testKeyedValueStateMigration() throws Exception {\n\t\tfinal String stateName = \"test-name\";\n\n\t\ttestKeyedValueStateUpgrade(\n\t\t\tnew ValueStateDescriptor<>(\n\t\t\t\tstateName,\n\t\t\t\tnew TestType.V1TestTypeSerializer()),\n\t\t\tnew ValueStateDescriptor<>(\n\t\t\t\tstateName,\n\t\t\t\t// restore with a V2 serializer that has a different schema\n\t\t\t\tnew TestType.V2TestTypeSerializer()));\n\t}", "public interface STATE_TYPE {\r\n public static final int RESERVED = 1;\r\n public static final int PARKED = 2;\r\n public static final int UNPARKED = 3;\r\n public static final int CANCELED = 4;\r\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "public void testGetNewValue_Accuracy() {\r\n String newValue = \"newValue\";\r\n UnitTestHelper.setPrivateField(AuditDetail.class, auditDetail, \"newValue\", newValue);\r\n assertEquals(\"The newValue value should be got properly.\", newValue, auditDetail.getNewValue());\r\n }", "public void testAddressStateConstant() {\n assertEquals(\"ADDRESS_STATE is incorrect\", UserConstants.ADDRESS_STATE, \"address-state\");\n }", "BGPv4FSMState state();", "@Test\n public void stringValue()\n {\n final Currency currency = Currency.of(CurrencyTests.EUR);\n assertEquals(CurrencyTests.EUR, currency.stringValue(), CurrencyTests.CURRENCY_CODE_NOT_AS_EXPECTED);\n }", "org.landxml.schema.landXML11.StateType.Enum getState();", "@Test\n public void stateExample2() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n assertEquals(\" O O O\\n\"\n + \" O O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O _ O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }", "@Test\r\n\tpublic void test() {\r\n\t\tDifficulty easy = Difficulty.EASY;\r\n\t\tDifficulty moderate = Difficulty.MODERATE;\r\n\t\tDifficulty challenging = Difficulty.CHALLENGING;\r\n\t\tDifficulty extreme = Difficulty.EXTREME;\r\n\t\tDifficulty difficult = Difficulty.DIFFICULT;\r\n\t\tDifficulty veryDifficult = Difficulty.VERY_DIFFICULT;\r\n\r\n\t\tassertEquals(Difficulty.EASY, easy);\r\n\t\tassertEquals(Difficulty.MODERATE, moderate);\r\n\t\tassertEquals(Difficulty.CHALLENGING, challenging);\r\n\t\tassertEquals(Difficulty.EXTREME, extreme);\r\n\t\tassertEquals(Difficulty.DIFFICULT, difficult);\r\n\t\tassertEquals(Difficulty.VERY_DIFFICULT, veryDifficult);\r\n\t\t\r\n\t\tDifficulty.valueOf(Difficulty.EASY.toString());\r\n\r\n\t}", "public abstract Object getDecisionValue();", "public IState getState();", "Object visitValue(ValueNode node, Object state);", "public State state();", "@Test\n public void testBasicScorer() {\n assertEquals(0, stateScorer.scoreState(builder().build(), TwoPlayerKey.PLAYER_1));\n\n //The other player has won if they occupy every node on the board:\n assertEquals(-1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_2).build(), TwoPlayerKey.PLAYER_1));\n\n //I have won if I occupy every node on the board:\n assertEquals(1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_1).build(), TwoPlayerKey.PLAYER_1));\n }", "@Test\n public void test_getStatus() {\n UserStatus value = new UserStatus();\n instance.setStatus(value);\n\n assertSame(\"'getStatus' should be correct.\",\n value, instance.getStatus());\n }", "public State(String state_rep) {\n\t\tthis.state_rep = state_rep;\n\t}", "public static State parseString(String name)\n\t\t{\n\t\t\tif (FULL.toString().equals(name))\n\t\t\t\treturn FULL;\n\t\t\telse if (PARTIAL.toString().equals(name))\n\t\t\t\treturn PARTIAL;\n\t\t\telse if (DELETED.toString().equals(name))\n\t\t\t\treturn DELETED;\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}", "public void testGetEnumValue_differentCase() {\r\n\r\n TestEnum result = ReflectionUtils.getEnumValue(TestEnum.class, \"Value1\");\r\n assertSame(TestEnum.VALUE1, result);\r\n }", "public String getState() {\n Scanner scanner = new Scanner(System.in);\n\n // Tell User to enter two digit state\n System.out.println(\"Enter state name: \");\n\n // Get the two digit state\n String state = scanner.next();\n\n return state;\n }", "@Test\n public void stateExample2() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(7);\n assertEquals(\" _\\n\" +\n \" O O\\n\" +\n \" O O O\\n\" +\n \" O O O O\\n\" +\n \" O O O O O\\n\" +\n \" O O O O O O\\n\" +\n \"O O O O O O O\", exampleBoard.getGameState());\n }", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "LabState state();", "public void testGetAbbr() {\r\n assertEquals(test1.getStateAbbr(), \"VM\");\r\n }", "@Test\n public void stateExample4() {\n MarbleSolitaireModel exampleBoard =\n new MarbleSolitaireModelImpl(3, 2, 4);\n assertEquals(\" O O O\\n\"\n + \" O O O\\n\"\n + \"O O O O _ O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }", "@NotNull\r\n State getState();", "T transformToAndValidateInitialState(VendingMachine vendingMachine);", "public static OperationType stateOf(String state) {\n for (OperationType stateEnum : values()) {\n if (stateEnum.getOperation().equals(state)) {\n return stateEnum;\n }\n }\n return null;\n }", "public interface State {\n\n\t/**\n\t * The internal ID of the state. Is not dictated by any external/official\n\t * nomenclature, although it may match one for the sake of readability.\n\t * \n\t * Example: The ID of Massachusetts, USA might be \"ma\".\n\t * \n\t * @return The internal ID. Should never be null or empty.\n\t */\n\tString getId();\n\n\t/**\n\t * The common name of the state.\n\t * \n\t * Example: The name of Massachusetts, USA would be \"Massachusetts\", not the\n\t * official \"The Commonwealth of Massachusetts\".\n\t * \n\t * @return The common name of the state. Should never be null or empty.\n\t */\n\tString getName();\n\n\t/**\n\t * The public abbreviation of the state. Should match the official\n\t * nomenclature, typically defined by postal services.\n\t * \n\t * Example: The abbreviation of Massachusetts, USA would be \"MA\".\n\t * \n\t * @return The public abbreviation of the state. Should never be null or\n\t * empty.\n\t */\n\tString getAbbr();\n\n\t/**\n\t * The country of which this state is a part.\n\t * \n\t * Example: The country of Massachusetts, USA would be ISOCountry.USA\n\t * \n\t * @return The Country object for this state's nation. Should never be null\n\t * or empty.\n\t */\n\tCountry getCountry();\n\n}", "long getStateChange();" ]
[ "0.65378225", "0.6195227", "0.61394733", "0.60852385", "0.60852385", "0.60852385", "0.5902305", "0.5852287", "0.5760242", "0.5741685", "0.5677155", "0.5659446", "0.56458116", "0.56458116", "0.56458116", "0.5645", "0.56371146", "0.5619774", "0.5619774", "0.5619774", "0.5619774", "0.5615228", "0.55553025", "0.55521977", "0.547307", "0.54100376", "0.5405355", "0.5399748", "0.53810996", "0.53672516", "0.53672516", "0.53672516", "0.53672516", "0.53672516", "0.53672516", "0.53510547", "0.5336126", "0.5335826", "0.5330716", "0.5319179", "0.5312341", "0.5272929", "0.52723485", "0.5237141", "0.5218696", "0.52176887", "0.5209934", "0.5188481", "0.5188481", "0.5188443", "0.51856834", "0.51856834", "0.51856834", "0.51856834", "0.5176873", "0.5162562", "0.5151871", "0.51394314", "0.51285714", "0.51285714", "0.51285714", "0.51224166", "0.511639", "0.5103708", "0.5081053", "0.5075563", "0.5064142", "0.50599813", "0.50598145", "0.50598145", "0.50598145", "0.5059251", "0.50571555", "0.5052445", "0.5050117", "0.5045904", "0.5043328", "0.5042538", "0.5017196", "0.5016659", "0.50091064", "0.5006326", "0.4993617", "0.49896586", "0.4983459", "0.49830365", "0.49820104", "0.49784213", "0.49729174", "0.49710503", "0.49710503", "0.49710503", "0.49668938", "0.49628347", "0.49551094", "0.494997", "0.49455962", "0.49396294", "0.49223876", "0.49200213" ]
0.8254247
0
Test of toString method, of class ReviewState.
@Test public void testToString() { System.out.println("toString"); String expResult = "Pendente"; String result = ReviewState.PENDING.toString(); assertEquals(expResult, result); expResult = "Terminada"; result = ReviewState.FINISHED.toString(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString()\n {\n return state.toString();\n }", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn state.toString();\r\n\t}", "public String getStateString()\n {\n return stateString;\n }", "java.lang.String getState();", "public String toString() {\r\n\t\treturn gameState;\r\n\t}", "public String toString(){\n \tif(state){\n\t\treturn (\"1\");\n\t }\n\t else{\n\t\t return(\"0\");\n\t }\n }", "public String getStateAsString() {\n return storeStateIntoString();\n }", "@Test\n\tpublic final void testToString() {\n\t\tanimal.moveTo(testForest);\n\t\t\n\t\tassertEquals(animal.toString(), \n\t\t\t\t\"[Animal: Possum, Type: Mammal, Gender: male, Legs: 4\"\n\t\t\t\t+ \" is in \" + testForest.toString() + \"]\");\n\t}", "public String getStateString()\r\n\t{\r\n\t\treturn stateString;\r\n\t}", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n String expResult = \"Name: Gates, Bill\" + \"\\n\"\n + \"Date of Birth: 09/05/1993\";\n String result = customer.toString();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n RevisorParentesis instance = null;\r\n String expResult = \"\";\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void testToString_True() {\n\n\t\tString result = \"\";\n\t\tresult = \"\\n*************Title: \" + book1.getTitle();\n\t\tresult += \"\\n*************Author: \" + book1.getAuthor();\n\t\tresult += \"\\n*************Publication Year: \" + book1.getPublicationDate();\n\t\tresult += \"\\n*************ISBN: \" + book1.getIsbnNumber() + \"\\n \";\n\t\tassertEquals(result, book1.toString());\n\n\t}", "private String gameStateToString() // Convert the game state into a string type.\n\t{\n\t\tString getGameStateString = \"\";\n\n\t\tswitch (gameState) // Check the state of the game and change the messages as needed.\n\t\t{\n\t\tcase waitingForStart:\n\t\t\tgetGameStateString = \"waitingForStart\";\n\t\t\tbreak;\n\t\tcase gameWelcome:\n\t\t\tgetGameStateString = \"gameWelcome\";\n\t\t\tbreak;\n\t\tcase decideWhoGoesFirst:\n\t\t\tgetGameStateString = \"decideWhoGoesFirst\";\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerOneGoesFirst:\n\t\t\tgetGameStateString = \"twoPlayersPlayerOneGoesFirst\";\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerTwoGoesFirst:\n\t\t\tgetGameStateString = \"twoPlayersPlayerTwoGoesFirst\";\n\t\t\tbreak;\n\t\tcase twoPlayersNowPlayerOnesTurn: \n\t\t\tgetGameStateString = \"twoPlayersNowPlayerOnesTurn\";\n\t\t\tbreak;\n\t\tcase twoPlayersNowPlayerTwosTurn:\n\t\t\tgetGameStateString = \"twoPlayersNowPlayerTwosTurn\";\n\t\t\tbreak;\n\t\tcase aPlayerHasWon:\n\t\t\tgetGameStateString = \"aPlayerHasWon\";\n\t\t\tbreak;\t\n\t\t}\n\n\t\treturn getGameStateString;\n\n\t}", "@Test\n\tpublic void statePrint_test()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(0,1, 'o');\n\t\tb.set(0,2, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.statePrint();\n\t\tassertTrue(out.toString().contains(\"x|o|x\\n------\\no|x| \\n------\\n | | \\n\"));\n\t}", "@Test\n\tpublic void testToString() {\n\t\tString result = email + \" \" + amount;\n\t\tassertEquals(\"Test : toString()\", bid.toString(), result);\n\t}", "@Test\n public void testToString_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n\n String result = fixture.toString();\n\n assertEquals(\"LogicStep : \", result);\n }", "@Test\n public void toString_shouldReturnInCorrectFormat() {\n Task task = new Task(\"Test\");\n String expected = \"[N] Test\";\n Assertions.assertEquals(expected, task.toString());\n }", "public String toString()\n {\n \tint tempIndex;\n \tStringBuilder statesStr = new StringBuilder(\"States: { \");\n \tfor(ComplexState state: states)\n \t\tstatesStr.append(state.getName() + \", \");\n\t\ttempIndex = statesStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tstatesStr.deleteCharAt(statesStr.lastIndexOf(\",\"));\n \tstatesStr.append(\"}\\n\");\n \tStringBuilder initStatesStr = new StringBuilder(\"Initial states: { \");\n \tfor(ComplexState state: initialStates)\n \t\tinitStatesStr.append(state.getName() + \", \");\n \ttempIndex = initStatesStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tinitStatesStr.deleteCharAt(initStatesStr.lastIndexOf(\",\"));\n \tinitStatesStr.append(\"}\\n\");\n \tStringBuilder transitionFuncStr = new StringBuilder(\"Transition relation: { \");\n \tArrayList<ComplexState> destStates = new ArrayList<ComplexState>();\n \tfor(ComplexState srcState: states) \n \t{\n \t\tdestStates = transitionRelation.get(srcState);\n \t\tif(destStates != null)\n\t \t\tfor(ComplexState destState: destStates)\n\t \t\t\ttransitionFuncStr.append(\"( \" + srcState.getName() + \", \" + destState.getName() + \" ), \" );\t\n \t}\n \ttempIndex = transitionFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\ttransitionFuncStr.deleteCharAt(transitionFuncStr.lastIndexOf(\",\"));\n \ttransitionFuncStr.append(\"}\\n\");\n \tStringBuilder labelingFuncStr = new StringBuilder(\"Labeling function: { \");\n \tArrayList<AtomicProp> atomicProps = new ArrayList<AtomicProp>();\n \tfor(ComplexState state: states) \n \t{\n \t\tlabelingFuncStr.append(\"( \" + state.getName() + \", { \");\n \t\tatomicProps = state.getLabels();\n \t\tif(atomicProps != null)\n \t\t\tfor(AtomicProp ap: state.getLabels())\n \t\t\t\tlabelingFuncStr.append(ap.getName() + \", \");\n \t\ttempIndex = labelingFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tlabelingFuncStr.deleteCharAt(labelingFuncStr.lastIndexOf(\",\"));\n \t\tlabelingFuncStr.append(\"} ), \");\n \t}\n \ttempIndex = labelingFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tlabelingFuncStr.deleteCharAt(labelingFuncStr.lastIndexOf(\",\"));\n \tlabelingFuncStr.append(\"}\\n\"); \t\n \tString result = statesStr.toString() + initStatesStr.toString() + transitionFuncStr.toString() + labelingFuncStr.toString() + \"Type: \" + type.toString();\n \treturn result;\n }", "public String toString() {\n\treturn state.toString() + \" \" + context.toString();\n }", "public String toString() {\n return review;\n }", "public String toString() {\r\n\t\treturn (\"State: \" + this.key + \", Value: \" + this.val);\r\n\t}", "@Test\n public void toStringTest() {\n assertEquals(\"1 2 3 4\", stack.toString());\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tfor (int i = 0; i < 2 * size + 1; i++)\n\t\t{\n\t\t\tstringBuilder.append(\"-\");\n\t\t}\n\t\tstringBuilder.append(\"\\n|\");\n\t\tfor (int i = 0; i < state.size(); i++)\n\t\t{\n\t\t\tstringBuilder.append(state.get(i)).append(\"|\");\n\t\t\tif (i % size == size - 1 && i < state.size() - 1)\n\t\t\t{\n\t\t\t\tstringBuilder.append(\"\\n|\");\n\t\t\t}\n\t\t}\n\t\tstringBuilder.append(\"\\n\");\n\t\tfor (int i = 0; i < 2 * size + 1; i++)\n\t\t{\n\t\t\tstringBuilder.append(\"-\");\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"New Game State\";\n\t}", "public void testToString() {\r\n tree.insert(\"act\");\r\n tree.insert(\"apple\");\r\n tree.insert(\"bagel\");\r\n\r\n assertEquals(\"(act, apple, bagel)\", tree.toString());\r\n Lab14BinarySearchTree<String> tree2 =\r\n new Lab14BinarySearchTree<String>();\r\n assertEquals(\"()\", tree2.toString());\r\n }", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n Assignment instance = new Assignment();\r\n String expResult = \":=\";\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n public void testToString() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : toString\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setFormation(\"Miage\");\r\n instance.setModule(\"programmation\");\r\n String expResult = instance.getFormation() + \"\\n\" + instance.getModule() ;\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n }", "@Override\n public String toString()\n {\n return stateAbbr + \"/\" + stateName + \"/\" + taxRate;\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Account instance = new Account(\"Piper\", 10.0);\n String expResult = \"Piper has a total of $10.0 in their account.\";\n String result = instance.toString();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "abstract public String toString();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getState() != null)\n sb.append(\"State: \").append(getState()).append(\",\");\n if (getStateReason() != null)\n sb.append(\"StateReason: \").append(getStateReason()).append(\",\");\n if (getStateReasonCode() != null)\n sb.append(\"StateReasonCode: \").append(getStateReasonCode());\n sb.append(\"}\");\n return sb.toString();\n }", "@Test public void toStringTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertTrue(pb1.toString().contains(\"Estimated Monthly Cost: \"));\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Category instance = new Category();\n instance.setCategoryDescription(\"desc\");\n instance.setCategoryName(\"name\");\n instance.setCategoryParentId(0);\n \n String expResult = \"name\";\n String result = instance.toString();\n assertEquals(expResult, result);\n }", "@Override\n public String toString ()\n {\n StringBuffer buffer = new StringBuffer();\n for (State value : stateMap.values()) {\n buffer.append(value.toString());\n buffer.append(\"\\n\");\n }\n return buffer.toString();\n }", "@Test\n public void testToString() {\n System.out.println(\"Animal.toString\");\n assertEquals(\"Abstract Axe (17 yo Aardvark) resides in cage #202\", animal1.toString());\n assertEquals(\"Brave Beard (3 yo Beaver) resides in cage #112\", animal2.toString());\n }", "public String toString()\n\t{\n\n\t\treturn String.format(City+\",\"+State);\n\n\t}", "@Override\n\tpublic String toString() {\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(super.toString());\n\t\tbuffer.append('\\n');\n\t\tfor (final State state : getStates()) {\n\t\t\tif (initialState == state) {\n\t\t\t\tbuffer.append(\"--> \");\n\t\t\t}\n\t\t\tbuffer.append(state);\n\t\t\tif (isFinalState(state)) {\n\t\t\t\tbuffer.append(\" **FINAL**\");\n\t\t\t}\n\t\t\tbuffer.append('\\n');\n\t\t\tfor (final Transition transition : getTransitionsFromState(state)) {\n\t\t\t\tbuffer.append('\\t');\n\t\t\t\tbuffer.append(transition);\n\t\t\t\tbuffer.append('\\n');\n\t\t\t}\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "@Test\n\tpublic void statePrint_test1()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(1,2, 'o');\n\t\tb.set(0,2, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.statePrint();\n\t\tassertTrue(out.toString().contains(\"x| |x\\n------\\no|x|o\\n------\\n | | \\n\"));\n\t}", "String getState();", "String getState();", "String getState();", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n OpeningTicketPurpose instance = new OpeningTicketPurpose();\r\n String expResult = \"\";\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Reserva instance = new Reserva();\n String expResult = \"\";\n String result = instance.toString();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String name = \"PENDING\";\n ReviewState expResult = ReviewState.PENDING;\n ReviewState result = ReviewState.valueOf(name);\n assertEquals(expResult, result);\n name = \"FINISHED\";\n expResult = ReviewState.FINISHED;\n result = ReviewState.valueOf(name);\n assertEquals(expResult, result);\n }", "public void testToString()\n {\n // An empty board\n assertEquals(b1.toString(), \"EEEEEEEEE\");\n\n // A more complex case\n b1.fromString(\"RRRBEEBBE\");\n assertEquals(b1.toString(), \"RRRBEEBBE\");\n }", "@Test\r\n public void testToString() {\r\n // TODO \r\n assertTrue(true); \r\n }", "public void test_toString() {\n // ## Arrange ##\n FromToOption option = createOption();\n option.compareAsDate();\n\n // ## Act ##\n String actual = option.toString();\n\n // ## Assert ##\n log(actual);\n assertTrue(actual.contains(\"lessThan=true\"));\n }", "@Override String toString();", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n Simulacao instance = new Simulacao(TipoDPolarizacao.ABSORCAO);\r\n String expResult = \"Simulacao{\" + \"tipoDPolarizacao=\" + instance.getTipoDPolarizacao() + '}';\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n }", "@Override\n\tpublic String getStateString() {\n\t\treturn null;\n\t}", "@Test\n public void testToString()\n {\n try\n {\n Square s1 = new Square();\n assertEquals(\"_\", s1.toString());\n\n s1.setType(Square.squareType.DB_LETTER);\n assertEquals(\"2L\", s1.toString());\n\n s1.setType(Square.squareType.STAR);\n assertEquals(\"S\", s1.toString());\n\n s1.setType(Square.squareType.DB_WORD);\n assertEquals(\"2W\", s1.toString());\n\n s1.setType(Square.squareType.TR_LETTER);\n assertEquals(\"3L\", s1.toString());\n\n s1.setType(Square.squareType.TR_WORD);\n assertEquals(\"3W\", s1.toString());\n\n s1.setTile(Tile.getInstance('A'));\n assertEquals(\"A\", s1.toString());\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when calling toString on Square.\");\n }\n }", "@Test\n\tpublic void testToString() {\n\t\tSystem.out.println(\"toString\");\n\t\tDeleteTask task = new DeleteTask(1);\n\t\tassertEquals(task.toString(), \"DeleteTask -- [filePath=1]\");\n\t}", "public String toString() {\n\t\treturn \"PushObstacleState\";\n\t}", "public void testToString() {\n }", "@Test\r\n\tpublic void testToString() {\r\n\t\tPerson p1 = new Person(1, \"JavaLord\", \"hunter2\", \"The Lord of Java\");\r\n\t\tString s = p1.toString();\r\n\t\tassertTrue(s.equals(\"JavaLord:hunter2:The Lord of Java\"));\r\n\t}", "@Test\n public void testToString() {\n String expected =\"Business: name='AMC Lowes', description='', price_range=2, stars=3.75}\";\n String actual = theater.toString();\n Assert.assertEquals(expected,actual);\n }", "@Test\r\n\tpublic void testToString() {\r\n\r\n\t\t// Create a new Notification and use accessors to set the note name\r\n\t\tINotification note = new Notification(\"TestNote\", \"1,3,5\", \"TestType\");\r\n\t\tString ts = \"Notification Name: TestNote Body:1,3,5 Type:TestType\";\r\n\r\n\t\t// test assertions\r\n\t\tAssert.assertEquals(\"Expecting note.testToString() == '\" + ts + \"'\", note.toString(), ts);\r\n\t}", "public String printState(){\n if (this.state.equals(\"unstarted\")) return \"unstarted 0\";\n\n else if (this.state.equals(\"terminated\")) return \"terminated 0\";\n else if (this.state.equals(\"blocked\")) {\n return String.format(\"blocked %d\", ioBurstTime);\n }\n else if (this.state.equals(\"ready\")) {\n if (remainingCPUBurstTime !=null){\n return String.format(\"ready %d\", remainingCPUBurstTime);\n }\n return \"ready 0\";\n }\n\n else if (this.state.equals(\"running\")){\n return String.format(\"running %d\", cpuBurstTime);\n }\n\n else return \"Something went wrong.\";\n }", "public abstract String getState();", "@Test\n\tpublic void test_toString() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertEquals(\"[Sherlock,BBC]\",t1.toString());\n }", "public String toString() {\n\tStringBuffer buffer = new StringBuffer();\n\t//\tbuffer.append(\" 6 5 4 3 2 1 \\n\");\n\tbuffer.append(\"+---------------------------------------+\\n\");\n\t\n\tbuffer.append(\"| |\");\n\tfor (int i = 12; i >= 7; --i) {\n\t buffer.append(toString(state[i]));\n\t}\n\tbuffer.append(\" |\\n\");\n\t\n\tbuffer.append(\"|\");\n\tbuffer.append(toString(state[13]));\n\tbuffer.append(\"-----------------------------|\");\n\tbuffer.append(toString(state[6]));\n\tbuffer.append(\"\\n\");\n\t\n\tbuffer.append(\"| |\");\n\tfor (int i = 0; i <= 5; ++i) {\n\t buffer.append(toString(state[i]));\n\t}\n\tbuffer.append(\" |\\n\");\n\t\n\tbuffer.append(\"+---------------------------------------+\\n\");\n\tbuffer.append(\" 0 1 2 3 4 5 \\n\");\n\t\n\treturn buffer.toString();\n }", "public abstract String toString(String context);", "@Override\n\tpublic\n\tString toString () {\n\n\t\treturn nextIsA\n\t\t\t? aString\n\t\t\t: bString;\n\n\t}", "@Test\n public void testToString() {\n Order order = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n\n Assert.assertEquals(\"Compare toString.\",\n \"Order [orderId=Test, orderTime=12:00, customerLocation=GridCoordinate [x=0, y=0]]\",\n order.toString());\n }", "@Override\n\tpublic abstract String toString();", "public State(String state_rep) {\n\t\tthis.state_rep = state_rep;\n\t}", "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\"Proper string format\", basic.toString(), \"5, 5\");\n\t}", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Library instance = new Library();\n instance.setName(\"Test\");\n instance.setSize(5);\n String expResult = \"Library{\" + \"name=\" + instance.getName() + \", size=\" + instance.getSize() + \"}\";\n String result = instance.toString();\n assertEquals(expResult, result);\n \n }", "public String toString() {\n try {\n StringBuilder sb = new StringBuilder();\n sb.append((\"STATES\") + System.getProperty(\"line.separator\"));\n sb.append((\"-----------\") + System.getProperty(\"line.separator\"));\n sb.append(statesToString());\n sb.append((\"TRANSITIONS\") + System.getProperty(\"line.separator\"));\n sb.append((\"-------------------\") + System.getProperty(\"line.separator\"));\n sb.append(transitionsToString());\n return sb.toString();\n } catch (RuntimeException sbe) {\n throw sbe;\n } catch (Exception sbe) {\n throw new RuntimeException(sbe);\n }\n }", "@Test\n void testToString() {\n // Create a new item object with the following parameters:\n // Description: \"Test Description\", Due Date: \"2022-05-30\", isComplete: \"Complete\"\n Item actualResult = new Item(\"Test Description\", \"2022-05-30\", \"Complete\");\n // Then assertEquals to see if the actual string equals \"Test Description,2022-05-30,Complete\"\n assertEquals(\"Test Description,2022-05-30,Complete\", actualResult.toString());\n }", "public void testToString() {\n assertEquals(\"[Hannibal Burress, rap, 2018, Morpheus Rap]\", burr\n .toString());\n }", "public void testToString()\n {\n // test making a few EthernetAddresss and check that the toString\n // gives back the same value in string form that was used to create it\n \n // test the null EthernetAddress\n EthernetAddress ethernet_address = new EthernetAddress(0L);\n assertEquals(\"null EthernetAddress string and toString did not match\",\n NULL_ETHERNET_ADDRESS_STRING.toLowerCase(),\n ethernet_address.toString().toLowerCase());\n \n // test a non-null EthernetAddress\n ethernet_address =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertEquals(\n \"EthernetAddress string and toString results did not match\",\n MIXED_CASE_VALID_ETHERNET_ADDRESS_STRING.toLowerCase(),\n ethernet_address.toString().toLowerCase());\n \n // EthernetAddress implementation returns strings all lowercase.\n // Although relying on this behavior in code is not recommended,\n // here is a unit test which will break if this assumption\n // becomes bad. This will act as an early warning to anyone\n // who relies on this particular behavior.\n ethernet_address =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"mixed case EthernetAddress string and toString \" +\n \"matched (expected toString to be all lower case)\",\n MIXED_CASE_VALID_ETHERNET_ADDRESS_STRING.equals(\n ethernet_address.toString()));\n assertEquals(\"mixed case string toLowerCase and \" +\n \"toString results did not match (expected toString to \" +\n \"be all lower case)\",\n MIXED_CASE_VALID_ETHERNET_ADDRESS_STRING.toLowerCase(),\n ethernet_address.toString());\n }", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Test\n public void testToString() {\n assertEquals(r1.toString(), \"Rectangle\");\n assertEquals(r2.toString(), \"Rectangle\");\n }", "@Override public String toString();", "public String toString() { return stringify(this, true); }", "@Override\n public String toString() {\n return (this.str);\n }", "public String dumpState() {\n StringBuilder out = new StringBuilder();\n out.append(currentPlayer);\n for (int i = 0; i < board.length; ++i)\n out.append(\" \" + board[i]);\n\n return out.toString();\n }" ]
[ "0.6837195", "0.68166536", "0.63779473", "0.63554186", "0.6330065", "0.6325087", "0.63229066", "0.628269", "0.6280483", "0.62548757", "0.6219168", "0.61984867", "0.61790997", "0.6160471", "0.6128439", "0.6128336", "0.6125188", "0.61172664", "0.6102553", "0.61008584", "0.6084405", "0.60783434", "0.60652196", "0.6064375", "0.6054669", "0.6050809", "0.6038491", "0.6011063", "0.59951997", "0.5994331", "0.5993335", "0.5991513", "0.59908247", "0.5990686", "0.5984295", "0.59784704", "0.59747666", "0.59662503", "0.59524", "0.59524", "0.59524", "0.59497803", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.5945636", "0.59416467", "0.59303045", "0.5930144", "0.5924431", "0.5917067", "0.59105915", "0.59088653", "0.5906278", "0.59007925", "0.5897643", "0.58843666", "0.5876591", "0.58750606", "0.5865353", "0.58633363", "0.585951", "0.5858878", "0.58433014", "0.584118", "0.5839693", "0.58333355", "0.5832935", "0.5832192", "0.5831649", "0.5826723", "0.58224905", "0.5816502", "0.5812742", "0.5807989", "0.5801512", "0.5794347", "0.5794347", "0.5794347", "0.5794347", "0.5794347", "0.5794347", "0.5794347", "0.57934314", "0.57736874", "0.5770648", "0.5767305", "0.5756398" ]
0.82260233
0
funcao recursiva que particiona e ordena o vetor
private static void quickDecrescente( int[ ] v , int inicio , int fim ) { int aux, down, up, pivo, i; // determinar qual valor sera o pivo do particionamento do vetor pivo = v[ inicio ]; down = inicio; up = fim; while( down < up ) { while( v[ down ] >= pivo && down < fim ) down++; while( v[ up ] < pivo && up > inicio ) up--; if( down < up ) { aux = v[ down ]; v[ down ] = v[ up ]; v[ up ] = aux; } } v[ inicio ] = v[ up ]; v[ up ] = pivo; System.out.println("\n"); for( i = 0 ; i < v.length ; i++ ) System.out.print(v[ i ] + " "); if( inicio < up && inicio != up-1 ) quickDecrescente( v , inicio , up-1 ); if( fim > down && up+1 != fim ) quickDecrescente( v , up+1 , fim ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void extendPath(Grafo g, List<Integer> caminho) {\n Integer next = null;\n for (Integer v : caminho) {\n if (g.estaConectado(v, caminho.get(caminho.size() - 1))) { //Vi\n int index = caminho.indexOf(v); //Vi+1\n int unvisited, maxEta = 0;\n for (Integer w : g.vizinhos(caminho.get(index + 1))) { //Checando se Vi+1 tem vizinhos não visitados\n if (caminho.contains(w)) {\n continue;\n }\n unvisited = 0;\n for (Integer m : g.vizinhos(w)) { //eta de w\n if (!caminho.contains(m)) {\n unvisited++;\n }\n }\n if (unvisited > maxEta) {\n next = w;\n maxEta = unvisited;\n }\n }\n if (next != null) {\n //Reorganizar o caminho\n Collections.reverse(caminho.subList(index + 1, caminho.size()));\n caminho.add(next);\n findAPath(g, caminho, null);\n extendPath(g, caminho);\n break;\n }\n }\n }\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "void topologicalSortUtil(int v, Boolean visited[], Stack stack) {\n // Mark the current node as visited.\n visited [v] = true;\n Integer i;\n System.out.println(\"At vertex: \" + v);\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> it = adj [v].iterator();\n while (it.hasNext()) {\n i = it.next();\n if (!visited [i])\n topologicalSortUtil(i, visited, stack);\n }\n // System.out.println(\"pushing into stack: \" + v);\n\n // Push current vertex to stack which stores result\n stack.push(new Integer(v));\n }", "public void inOrderTraverseIterative();", "private void traverseHelper(Graph<VLabel, ELabel>.Vertex v) {\n PriorityQueue<Graph<VLabel, ELabel>.Vertex> fringe =\n new PriorityQueue<Graph<VLabel,\n ELabel>.Vertex>(_graph.vertexSize(), _comparator);\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n visit(curV);\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n if (!_marked.contains(e.getV(curV))) {\n preVisit(e, curV);\n fringe.add(e.getV(curV));\n }\n }\n }\n } catch (StopException e) {\n _finalVertex = curV;\n return;\n }\n }\n }", "private static void quickCrescente( int[ ] v , int inicio , int fim )\r\n {\r\n int aux, down, up, pivo, i;\r\n // determinar qual valor sera o pivo do particionamento do vetor\r\n pivo = v[ inicio ];\r\n down = inicio; \r\n up = fim;\r\n while( down < up )\r\n {\r\n while( v[ down ] <= pivo && down < fim )\r\n down++;\r\n while( v[ up ] > pivo && up > inicio )\r\n up--;\r\n if( down < up )\r\n {\r\n aux = v[ down ];\r\n v[ down ] = v[ up ];\r\n v[ up ] = aux;\r\n }\r\n }\r\n v[ inicio ] = v[ up ];\r\n v[ up ] = pivo;\r\n \r\n System.out.println(\"\\n\");\r\n for( i = 0 ; i < v.length ; i++ )\r\n System.out.print(v[ i ] + \" \");\r\n\r\n if( inicio < up && inicio != up-1 )\r\n quickCrescente( v , inicio , up-1 );\r\n \r\n if( fim > down && up+1 != fim )\r\n quickCrescente( v , up+1 , fim );\r\n }", "public void inOrderTraverseRecursive();", "private void Visitar(Vertice v, int p) {\n\t\t\n\t\tv.setVisited(true);\n\t\tv.setPredecessor(p);\n\t\t\n\t\tLinkedList<ListaAdjacencia> L = v.getAdjList();\n\t\t\n\t\tfor (ListaAdjacencia node : L) {\n\t\t\tint n = node.getverticeNumero();\n\t\t\tif (!vertices[n].getVisited()) {\n\t\t\t\tVisitar(vertices[n], v.getIndex());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private int find(int[] parent, int v) {\n if(parent[v] == -1) return v;\n return find(parent, parent[v]);\n }", "private void balancearAgrega(Vertice<T> v){\n\tif(v == this.raiz){\n\t v.color = Color.NEGRO;\n\t return;\n\t}else if(v.padre.getColor() == Color.NEGRO){\n\t return;\n\t}\n\tVertice<T> abuelo = v.padre.padre;\n\tif(v.padre == abuelo.derecho){\n\t if(abuelo.izquierdo != null &&\n\t abuelo.izquierdo.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.izquierdo.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\t \n\t }else if(v.padre.izquierdo == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraDerecha(v.padre);\n\t\tbalancearAgrega(v2); \n\t }else if(v.padre.derecho == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraIzquierda(abuelo);\n\t }\n\t}else if(v.padre == abuelo.izquierdo){\n\t if(abuelo.derecho != null &&\n\t abuelo.derecho.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.derecho.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\n\t }else if(v.padre.derecho == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraIzquierda(v.padre);\n\t\tbalancearAgrega(v2); \n\t \n\t }else if(v.padre.izquierdo == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraDerecha(abuelo);\n\t }\n\t} \t\n\t\n }", "int query_up(int u, int v) {\n int uchain, vchain = chainInInd[v], ans = 0;\n // uchain and vchain are chain numbers of u and v\n int last = -1;\n while (true) {\n uchain = chainInInd[u];\n if (uchain == vchain) {\n // Both u and v are in the same chain, so we need to query from u to v, update answer and break.\n // We break because we came from u up till v, we are done\n if (u == v) break;\n out.println(\"query = \" + (posInBase[v]) + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[v], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[v], posInBase[u], 1, pointer);\n // Above is call to segment tree query function\n break;\n }\n out.println(\"query = \" + posInBase[chainInHead[uchain]] + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer);\n // Above is call to segment tree query function. We do from chainHead of u till u. That is the whole chain from\n // start till head. We then update the answer\n u = chainInHead[uchain]; // move u to u's chainHead\n u = par[u]; //Then move to its parent, that means we changed chains\n }\n out.println(ans+\" =ans\");\n return ans;\n }", "private void dfs(DigrafoAristaPonderada G, int v) {\n enPila[v] = true;\n marcado[v] = true;\n for (AristaDirigida a : G.ady(v)) {\n int w = a.hacia();\n\n // short circuit if directed ciclo found\n if (ciclo != null) return;\n\n //found new vertex, so recur\n else if (!marcado[w]) {\n aristaHacia[w] = a;\n dfs(G, w);\n }\n\n // trace back directed ciclo\n else if (enPila[w]) {\n ciclo = new Pila<AristaDirigida>();\n while (a.desde() != w) {\n ciclo.push(a);\n a = aristaHacia[a.desde()];\n }\n ciclo.push(a);\n return;\n }\n }\n\n enPila[v] = false;\n }", "private void inOrderTraversal(int index) {\n // go through the graph as long as has values\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n inOrderTraversal(2 * index + 1);\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on right child\n inOrderTraversal(2 * index + 2);\n }", "static int recursiva1(int n)\n\t\t{\n\t\tif (n==0)\n\t\t\treturn 10; \n\t\tif (n==1)\n\t\t\treturn 20; \n\t\treturn recursiva1(n-1) - recursiva1 (n-2);\t\t\n\t\t}", "@Override\r\n\tpublic Iterable<Integer> pathTo(int v) {\r\n\t\tif (!hasPathTo(v)) return null;\r\n\r\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\twhile(v != -1) {\r\n\t\t\tlist.add(v);\r\n\t\t\tv = edgeTo[v];\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "private TreeNode napraviStabloUtil(List<TreeNode> cvorovi, int pocetni, int krajnji) {\n// osnovni slučaj\n if (pocetni > krajnji) {\n return null;\n }\n /* Nadji srednji element i proglasi ga korenom */\n int mid = (pocetni + krajnji) / 2;\n TreeNode cvor = cvorovi.get(mid);\n /* Koristeci indeks u infiks obilasku\n* konstruiši levo i desno podstablo */\n cvor.left = napraviStabloUtil(cvorovi, pocetni, mid - 1);\n cvor.right = napraviStabloUtil(cvorovi, mid + 1, krajnji);\n return cvor;\n }", "private void cazaFantasma(Vertice<T> v){\n\tif(v.padre == null){\n\t if(v == this.raiz){\n\t\tthis.raiz = null;\n\t\treturn;\n\t }\n\t return;\n\t}else{\n\t Vertice<T> padre = v.padre;\n\t if(v == padre.izquierdo){\n\t\tif(v.hayIzquierdo()){\n\t\t padre.izquierdo = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.izquierdo = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.izquierdo = null;\n\t\t}\t\t\n\t }else{\n\t\tif(v.hayIzquierdo()){\n\t\t padre.derecho = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.derecho = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.derecho = null;\n\t\t}\n\t }\n\t}\n }", "void DFSUtil(int v, boolean visited[]) {\n // Mark the current node as visited and print it\n visited [v] = true;\n System.out.print(v + \" \");\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> i = adj [v].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n])\n DFSUtil(n, visited);\n }\n }", "@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "private NodoGrafo Vert2Nodo(int v) {\n\t\tNodoGrafo aux = origen;\n\t\twhile (aux != null && aux.nodo != v)\n\t\t\taux = aux.sigNodo;\t\t\n\t\treturn aux;\n\t}", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "public void topologicalSortUtil(int v, HashSet<Integer> visited, Stack<Integer> stack) {\n visited.add(v);\n for (int n : g.getNeighbors(v)) {\n if (visited.contains(n))\n continue;\n topologicalSortUtil(n, visited, stack);\n }\n stack.add(v);\n }", "public static Nodo buscarSolucionPorAmplitud(Nodo inicio, int[][] solucion) {\n\t\tArrayList<Nodo> abiertos = new ArrayList<Nodo>();\n\t\tabiertos.add(inicio);\n\t\tint cont = 0;\n\t\tArrayList<Nodo> visitados = new ArrayList<Nodo>();\n\t\twhile(abiertos.size()!=0) {\n\t\t\tSystem.out.println(\"Visitados\");\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tfor(Nodo n : visitados) {\n\t\t\t\timprimirEstado(n.getEstado());\n\t\t\t\tSystem.out.println(\"Costo de este nodo: \" + n.getCosto());\n\t\t\t\tSystem.out.println(\"---------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tNodo revisar = abiertos.remove(0);\n\t\t\trevisar.setCosto(calcularCosto(revisar.getEstado(), solucion));\n\t\t\timprimirEstado(revisar.getEstado());\n\t\t\tint[] pcero = ubicarPosicionCero(revisar.getEstado());\n\t\t\tSystem.out.println(\"Iteracion # \" + ++cont);\n\t\t\tif(Arrays.deepEquals(revisar.getEstado(), solucion)) {\n\t\t\t\tSystem.out.println(\"***** SOLUCION ENCONTRADA *****\");\n\t\t\t\treturn revisar;\n\n\t\t\t}\n\n\t\t\tArrayList<Nodo> hijos = new ArrayList<Nodo>();\n\t\t\tvisitados.add(revisar);\n\t\t\tif(pcero[0]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint arriba = hijo.getEstado()[pcero[0]-1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = arriba;\n\t\t\t\thijo.getEstado()[pcero[0]-1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[0]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint abajo = hijo.getEstado()[pcero[0]+1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = abajo;\n\t\t\t\thijo.getEstado()[pcero[0]+1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint izq = hijo.getEstado()[pcero[0]][pcero[1]-1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = izq;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]-1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint der = hijo.getEstado()[pcero[0]][pcero[1]+1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = der;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]+1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\trevisar.setHijos(hijos);\n\t\t}\n\t\treturn null;\n\n\t}", "private Node<T> LongestPathRec(Node<T> nodo, int prof, Node<T> ret) {\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tprof++;// Aumenta la profundidad\r\n\t\t\tif (prof == this.getMaxDepth()) {// Si es el mas profundo\r\n\t\t\t\tret = nodo.getChildren().get(1);// Asigna ret como el mas\r\n\t\t\t\t\t\t\t\t\t\t\t\t// profundo\r\n\t\t\t\treturn ret;// Retorna\r\n\t\t\t}\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\tret = LongestPathRec(hijos.get(i), prof, ret);// Recursividad\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// del metodo\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }", "@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }", "void DFSUtil(int v, boolean visited[]) {\n \t// Mark the current node as visited and print it \n visited[v] = true; \n System.out.print(v + \" \"); \n \n for(int w: adj[v]) \n \tif (!visited[w]) { \n \t\tDFSUtil(w, visited);\n \t}\n }", "static int introTutorial(int V, int[] arr) {\n// return searchBinaryRecursive(V, arr, 0, arr.length-1);\n return searchBinaryIterative(V, arr, 0, arr.length-1);\n }", "private static <V> int buscarArbol(V pValor, List<Graph<V>> pLista) {\n for (int x = 1; x <= pLista.size(); x++) {\n Graph<V> arbol = pLista.get(x);\n Iterator<V> it1 = arbol.iterator();\n while (it1.hasNext()) {\n V aux = it1.next();\n if (aux.equals(pValor)) {\n return x;\n }\n }\n }\n return 0;\n }", "static int reverseRecursiveTravesal(Node node, int k) {\n\t\tif(node == null)\n\t\t\treturn -1;\n\t\t\n\t\tint indexFromLast = reverseRecursiveTravesal(node.getNext(), k) + 1;\n\t\tif(indexFromLast == k) \n\t\t\tSystem.out.println(node.getData());\n\t\t\n\t\treturn indexFromLast;\n\t\t\n\t}", "void query(int u, int v) {\n int lca = lca2(u, v, spar, dep);\n// out.println(query_up(u, lca) + \" dv\");\n// out.println(query_up(v, lca) + \" ds\");\n int ans = query_up(u, lca) + query_up(v, lca); // One part of path\n out.println(ans);\n// if (temp > ans) ans = temp; // take the maximum of both paths\n// printf(\"%d\\n\", ans);\n }", "void DFSUtil(int v, boolean visited[]) {\n\t\t\tvisited[v] = true;\n\t\t\tSystem.out.println(v +\" \");\n\t\t\t\n\t\t\t//Recur all the vertices adjacents to this vertex\n\t\t\tIterator<Integer> i = adj[v].listIterator();\n\t\t\twhile(i.hasNext()) {\n\t\t\t\tint node = i.next();\n\t\t\t\tif(!visited[node]) {\n\t\t\t\t\tDFSUtil(node, visited);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private Vector<Vector<BusStopInfo>> findRek (BusStopInterface from, BusStopInterface to, Vector <BusStopInfo> toInfo, Vector<BusStopInfo> visited, int swaps, int transfers )\r\n {\r\n Vector<Vector<BusStopInfo>> sciezka = new Vector<Vector<BusStopInfo>>();\r\n \r\n if(from.getName()==to.getName())\r\n {\r\n sciezka.add(toInfo);\r\n return sciezka;\r\n }\r\n\r\n for(BusStopInfo vis: visited)\r\n {\r\n if(vis.awtobus.busLine.getBusStop(vis.pozycja).getName()==from.getName())\r\n return sciezka;\r\n }\r\n\r\n Vector <BusStopInfo> fromInfo = findStopInfo(from);\r\n\r\n fromInfo = infoFilter(fromInfo, toInfo);\r\n\r\n for(BusStopInfo info: fromInfo)\r\n {\r\n int swapsNow = swaps;\r\n if(visited.size()>0 && info.awtobus.bus.getBusNumber()!=visited.lastElement().awtobus.bus.getBusNumber())\r\n {\r\n swapsNow++;\r\n }\r\n\r\n if(swapsNow <= transfers)\r\n {\r\n int nextPosition = info.pozycja +1; //ide do przodu linii\r\n int prevPosition = info.pozycja -1; //ide do tyłu linii\r\n\r\n Vector<BusStopInfo> temp = new Vector<BusStopInfo>(visited);\r\n temp.add(info);\r\n Vector<Vector<BusStopInfo>> result ;\r\n if(nextPosition<info.awtobus.busLine.getNumberOfBusStops())\r\n {\r\n BusStopInterface nextStop = info.awtobus.busLine.getBusStop(nextPosition);\r\n result = findRek(nextStop, to, toInfo, temp, swapsNow, transfers);\r\n for(Vector<BusStopInfo> res: result)\r\n {\r\n res.add(0, info);\r\n sciezka.add(res);\r\n }\r\n }\r\n if(prevPosition >= 0)\r\n {\r\n BusStopInterface prevStop = info.awtobus.busLine.getBusStop(prevPosition);\r\n result = findRek(prevStop, to, toInfo, temp, swapsNow, transfers);\r\n for(Vector<BusStopInfo> res: result)\r\n {\r\n res.add(0, info);\r\n sciezka.add(res);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return sciezka;\r\n }", "public Iterable<Integer> pathTo(int v)\n {\n if (!hasPathTo(v)) return null;\n Stack<Integer> path = new Stack<Integer>();\n for (int x = v; x != s; x = edgeTo[x])\n path.push(x);\n path.push(s);\n return path;\n }", "private int resolver(int x, int y, int pasos) {\n \n \tif(visitado[x][y]){ // si ya he estado ahi vuelvo (como si fuera una pared el sitio en el que ya he estado)\n \t\treturn 0;\n \t}\n \tvisitado[x][y]=true; // marcamos el sitio como visitado y lo pintamos de azul\n \tStdDraw.setPenColor(StdDraw.BLUE);\n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \tif(x==Math.round(N/2.0)&& y== Math.round(N/2.0)){// Si estoy en la posicion central cambio encontrado y lo pongo true.\n \t\ttotal=pasos;\n \t\tencontrado=true;\n \t\treturn total;\n \t}\n \tif(encontrado)return total;\n \t\n \tdouble random = Math.random()*11;//creo un numero aleatorio\n \t\n \tif(random<3){\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);// voy pal norte y vuelvo a empezar el metodo con un paso mas\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \t}\n \tif (random >=3 && random<6){\n \t\tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \t}\n \tif(random>=6 && random<9){\n \t\tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \t}\n \tif(random >=9){\n \t\tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \t}\n \t\n \tif(encontrado){\n \t\treturn total;\n \t}\n \tStdDraw.setPenColor(StdDraw.GRAY);// si no puedo ir a ningún lado lo pinto de gris \n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \treturn 0;// vuelvo al punto anterior \n \n }", "private void balancearElimina(Vertice<T> v){\n\t//Caso 1 RAIZ\n\tif(v.padre == null){\n\t this.raiz = v;\n\t v.color = Color.NEGRO;\n\t return;\n\t}\n\t//Vertice<T> hermano = getHermano(v);\n\t//Caso 2 HERMANO ROJO\n\tif(getHermano(v).color == Color.ROJO){\n\t v.padre.color = Color.ROJO;\n\t getHermano(v).color = Color.NEGRO;\n\t if(v.padre.izquierdo == v)\n\t\tsuper.giraIzquierda(v.padre);\n\t else\n\t\tsuper.giraDerecha(v.padre);\n\t //Actualizar V\n\t // hermano = getHermano(v);\n\t \n\t}\n\t//Caso 3 TODOS SON NEGROS\n\tif(v.padre.color == Color.NEGRO && existeNegro(getHermano(v)) && existeNegro(getHermano(v).izquierdo) && existeNegro(getHermano(v).derecho)){\n\t getHermano(v).color = Color.ROJO;\n\t //Checar color\n\t //v.color = Color.ROJO; //POR H DE HERMANO 20:00\n\t\tbalancearElimina(v.padre);\n\t\treturn;\n\t}\n\t//Caso 4 HERMANO Y SOBRINOS NEGROS Y PADRE ROJO\n\tif(existeNegro(getHermano(v)) && v.padre.color == Color.ROJO && existeNegro(getHermano(v).izquierdo)\n\t && existeNegro(getHermano(v).derecho)){\n\t v.padre.color = Color.NEGRO;\n\t getHermano(v).color = Color.ROJO;\n\t return;\n\t \n\t}\n\t//Caso 5 HERMANO NEGRO Y SOBRINOS BICOLORES\n\tif(getHermano(v).color == Color.NEGRO && (!(existeNegro(getHermano(v).izquierdo) && existeNegro(getHermano(v).derecho)))){\n\t if(v.padre.derecho == v){\n\t if(!existeNegro(getHermano(v).derecho)){\n\t\t getHermano(v).color = Color.ROJO;\n\t\t getHermano(v).derecho.color = Color.NEGRO;\n\t\t super.giraIzquierda(getHermano(v));\n\t }else{\n\t\t if(!existeNegro(getHermano(v).izquierdo)){\n\t\t getHermano(v).color = Color.ROJO;\n\t\t getHermano(v).izquierdo.color = Color.NEGRO;\t \n\t\t super.giraDerecha(getHermano(v));\n\t\t }\n\t }\n\t }\n\t}\n\t//Caso 6 SOBRINO INVERSO DE V ES ROJO\n\tif(v.padre.izquierdo == v){\n\t if(!existeNegro(getHermano(v).derecho)){\n\t\tgetHermano(v).color = v.padre.color;\n\t\t v.padre.color = Color.NEGRO;\n\t\t getHermano(v).derecho.color = Color.NEGRO;\n\t\t super.giraIzquierda(v.padre);\n\t }\n\t}else{\n\t if(!existeNegro(getHermano(v).izquierdo)){\n\t\tgetHermano(v).color = v.padre.color;\n\t\t v.padre.color = Color.NEGRO;\n\t\t getHermano(v).izquierdo.color = Color.NEGRO;\n\t\t super.giraDerecha(v.padre);\n\t }\n\t}\t\n }", "private void inorderRec(TreeNode root, List<Integer> result) {\n if (root != null) {\n inorderRec(root.left,result);\n result.add(root.val);\n inorderRec(root.right,result);\n }\n }", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }", "void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }", "private List<Node<T>> completaCamino(Node<T> ret, List<Node<T>> camino) {\r\n\t\tboolean comp = true;// Comprobacion\r\n\t\tcamino.add(ret);// Aņadimos el nodo al camino\r\n\t\twhile (comp) {\r\n\t\t\tif (ret.getParent() != null) {// Mientras no sea la raiz\r\n\t\t\t\tcamino.add(ret.getParent(), 1);// Aņade al inicio de la lista\r\n\t\t\t\tret = ret.getParent();// Hace que el padre sea el nuevo nodo\r\n\t\t\t} else if (ret.getParent() == null) {// Si es la raiz\r\n\t\t\t\tcomp = false;// Cancela\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn camino;\r\n\t}", "public List<Vertex> runTabuSearch() {\r\n\t\tBestPath = convertPath(ClothestPath.findCycle(this.vertexGraph, this.edgeGraph, this.isOriented));\r\n\t\tLastPath = new ArrayList<Vertex>(BestPath);\r\n\t\tint BestEval = fit(BestPath);\r\n\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\r\n\t\tint iteration_actuel = 0;\r\n\t\twhile (iteration_actuel < this.numberIteration) {\r\n\t\t\tLastPath = newPath();\r\n\t\t\t\r\n\t\t\tif(LastPath.isEmpty()) {\r\n\t\t\t\titerationReal = iteration_actuel;\r\n\t\t\t\treturn BestPath;\r\n\t\t\t}\r\n\r\n\t\t\tif (fit(LastPath) < BestEval) {\r\n\t\t\t\tBestPath = new ArrayList<Vertex>(LastPath);\r\n\t\t\t\tBestEval = fit(LastPath);\r\n\t\t\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\t\t\t}\r\n\r\n\t\t\titeration_actuel++;\r\n\t\t}\r\n\r\n\t\titerationReal = iteration_actuel;\r\n\t\treturn BestPath;\r\n\t}", "public void EliminarVertice(int v) {\n\t\tNodoGrafo aux = origen;\n\t\tif (origen.nodo == v) \n\t\t\torigen = origen.sigNodo;\t\t\t\n\t\twhile (aux != null){\n\t\t\t// remueve de aux todas las aristas hacia v\n\t\t\tthis.EliminarAristaNodo(aux, v);\n\t\t\tif (aux.sigNodo!= null && aux.sigNodo.nodo == v) {\n\t\t\t\t// Si el siguiente nodo de aux es v , lo elimina\n\t\t\t\taux.sigNodo = aux.sigNodo.sigNodo;\n\t\t\t}\n\t\t\taux = aux.sigNodo;\n\t\t}\t\t\n\t}", "private Square[] returnPath(Vertex v, GameBoard b) {\n // because we're starting at the end point,\n // we need build the path in 'reverse'\n Stack<Square> path = new Stack<Square>();\n\n // while we're not at the start point\n while ( v.dist != 0 ) {\n path.push(vertexToSquare(v,b));\n v = v.path;\n }\n\n // place the locations in the proper order\n Square[] road = new Square[path.size()];\n for ( int i = 0; i < path.size(); i++ )\n road[i] = path.pop();\n\n return road;\n }", "public Arestas primeiroListaAdj (int v) {\n this.pos[v] = -1; return this.proxAdj (v);\n }", "public List<List<Vertice<T>>> caminos(Vertice<T> v1,Vertice<T> v2) {\n\t\t\n \tList<List<Vertice<T>>>salida = new ArrayList<List<Vertice<T>>>();\n \tList<Vertice<T>> marcados = new ArrayList<Vertice<T>>();\n \tmarcados.add(v1);\n return buscarCaminosAux(v1,v2,marcados,salida);\n \n\n }", "private void modify(seg_node root, int l, int r, int a, int b, int v) {\n push_down(root);\n if (l == a && r == b) {\n root._sum += v * root.tot ;\n root._product = root._product * power_mod(root._product_of_di, v) % mod;\n root._lazy_sum += v;\n return;\n }\n int m = (l + r) / 2;\n if (b <= m) {\n modify(root.left, l, m, a, b, v);\n } else if (a >= m + 1) {\n modify(root.right, m + 1, r, a, b, v);\n } else {\n modify(root.left, l, m, a, m, v);\n modify(root.right, m + 1, r, m + 1, b, v);\n }\n push_up(root);\n }", "void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }", "public void postOrden(nodoArbolAVL r){\n if(r != null){\n postOrden(r.hijoIzquierdo);\n postOrden(r.hijoDerecho);\n //System.out.print(r.dato + \" , \");\n for (int i = 1; i<=7;i++) {\n if(r.nivel==i)\n {\n //vector[i]=r.dato;\n System.out.println(r.dato + \" NIVEL: \"+i);\n }\n }\n \n } \n \n }", "public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}", "protected abstract void traverse();", "private void preOrderTraversal(int index) {\n if (array[index] == null) {\n return;\n }\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on left child\n preOrderTraversal(2 * index + 1);\n //call recursively the method on right child\n preOrderTraversal(2 * index + 2);\n }", "private RegressionTreeNode traverseNumericalNode(Double v) {\n\t\tdouble val = (Double) this.value;\n\t\tif(v.compareTo(val) <= 0){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "private void eliminarAux(NodoAVL<T> actual){\n NodoAVL<T> papa= actual.getPapa();\n if(actual.getHijoIzq()==null && actual.getHijoDer()==null)\n eliminaSinHijos(actual,papa); \n else{//CASO2: Nodo con un solo hijo (izq)\n NodoAVL<T> sustituto;\n if(actual.getHijoIzq()!=null && actual.getHijoDer()==null){\n sustituto= actual.getHijoIzq();\n eliminaSoloConHijoIzq(actual,papa,sustituto); \n }\n else//CASO3: Nodo con un solo hijo (der)\n if(actual.getHijoIzq()==null && actual.getHijoDer()!=null){\n sustituto= actual.getHijoDer();\n eliminaSoloConHijoDer(actual,papa, sustituto);\n }\n else //CASO4: Nodo con dos hijos\n if(actual.getHijoIzq()!=null && actual.getHijoDer()!=null)\n eliminaConDosHijos(actual);\n }\n \n }", "private static void spreadVirus(int v){\n Queue<Integer> queue = new LinkedList<>();\n queue.add(v);\n while(!queue.isEmpty()){\n int temp = queue.poll();\n isVisited[temp]=true;\n for(int i = 1; i<adj[temp].length;i++){\n if(isVisited[i]==false && adj[temp][i]==1){\n queue.add(i);\n isVisited[i]=true;\n maxContamination++;\n }\n }\n }\n }", "public void vincula(){\n for (Nodo n : exps)\n n.vincula();\n }", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "private int helper(List<List<Integer>> res, TreeNode root) {\n if (root == null) return -1;\n int left = helper(res, root.left);\n int right = helper(res, root.right);\n int curr = Math.max(left, right) + 1;\n if (res.size() == curr) res.add(new ArrayList<>());\n res.get(curr).add(root.val);\n return curr;\n }", "static int recursiva2(int n)\n\t\t{\n\t\t\tif (n==0)\n\t\t\treturn 10; \n\t\t\tif (n==1)\n\t\t\treturn 20;\n\t\t\tif (n==2)\n\t\t\treturn 30;\n\t\t\t\n\t\t\treturn recursiva2(n-1) + recursiva2 (n-2) * recursiva2 (n-3); \n\t\t}", "public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}", "void fillOrder(int v, boolean visited[], Stack stack) {\n \t\n \t// Mark the current node as visited and print it \n visited[v] = true;\n \n for(int w: adj[v]) \n \tif (!visited[w]) \n \t\tfillOrder(w, visited, stack);\n \n // All vertices reachable from v are processed by now, \n // push v to Stack \n stack.push(new Integer(v));\n }", "public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}", "private static void traverse(int i, int j) {\r\n\t\tif(i + j == SIZE + SIZE){\r\n\t\t\tCOUNT++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(i < SIZE){\r\n\t\t\ttraverse(i + 1, j);\r\n\t\t}\r\n\t\tif(j < SIZE){\r\n\t\t\ttraverse(i, j + 1);\r\n\t\t}\r\n\t}", "Iterable<DirectedEdge> pathTo(int v)\n\t{\n\t\tStack<DirectedEdge> path=new Stack<>();\n\t\tfor(DirectedEdge e=edgeTo[v]; e!=null; e=edgeTo[e.from()])\n\t\t{\n\t\t\tpath.push(e);\n\t\t}\n\t\treturn path;\n\t}", "private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}", "static void PrintRecorrido(int ini, int fin) {\n\n //System.out.println(\"Recorrido de nodos para llegar de nodo \" + ini + \" a \" + fin);\n List<Integer> path = new ArrayList<Integer>();\n int total=0;\n for (;;) { //infinite loop\n\n path.add(fin);\n if (prev[fin] == -1) {//si se llegó al inicio\n break;\n }\n total+=pesos[fin];//va sumando los pesos \n fin = prev[fin]; //\n }\n\n for (int i = path.size() - 1, k = 0; i >= 0; --i) {//se recorre de atrás para adelante printing los valores\n if (k != 0) {\n System.out.print(\" \");\n }\n System.out.print(path.get(i));//muestra el valor en posicion i (ultimo)\n k = 1;\n }\n System.out.print(\" Total:\"+total);\n System.out.println();\n }", "public void inOrden(nodoArbolAVL r){\n if(r != null){\n inOrden(r.hijoIzquierdo);\n System.out.print (r.dato + \" , \");\n inOrden(r.hijoDerecho);\n \n } \n }", "public int succ(int v, int i) {\n\t\treturn graph[v][i];\n\t}", "private int find(int z, int[] parent) {\n if(parent[z] == -1) {\n return z;\n }\n // System.out.println(parent[z]+\" \"+ z);\n parent[z] = find(parent[z], parent);\n\n return parent[z];\n }", "public void backTrack (){\n LinkedList<Integer> v = new LinkedList<> (); //Lista de vecinos.\n boolean mover = false;\n int r = 0;\n while (!mover && v.size () < 4){\n r = rnd.nextInt (4);\n\t\t//Hay un vecino disponible.\n\t\t//Nos podemos mover.\n if (vecinoDisponible (r))\n\t\t mover = true;\n if (!v.contains (r))\n v.add (r);\n\t }\n\t if (mover){\n\t\t//Nos movemos a la siguiente dirección.\n\t\ttumbaMuros (r);\n\t\tmoverLaberinto (r);\n\t }else if (!p.empty ()){\n\t\t//Nos movemos a la celda previa\n\t\t//pues no hay vecnos a los que movernos\n\t\tCelda a = p.pop ();\n\t\tt.posY = a.celdaY;\n\t\tt.posX = a.celdaX; \n\t }\n \n terminado = p.isEmpty();\n\t}", "private Paths sap(int v, int w) {\n validate(v);\n validate(w);\n BreadthFirstDirectedPaths fromV = new BreadthFirstDirectedPaths(this.G, v);\n BreadthFirstDirectedPaths fromW = new BreadthFirstDirectedPaths(this.G, w);\n return processPaths(fromV, fromW);\n }", "public void allPaths(int v1, int v2, int x)\n {\n \tboolean[] visited = new boolean[V];\n \tArrayList<DirectedEdge> paths = new ArrayList<>(V);\n \td = 0;\n \tif(online[v1] == false || online[v2] == false)\n \t{\n \t\tSystem.out.println(\"One or more vertices are down\");\n \t\treturn;\n \t}\n \trecursivePaths(v1,v2,x,visited,paths, 0);\n \tSystem.out.println(\"\\n\\n\");\n }", "public ArrayList<Integer> path(int startVertex, int stopVertex) {\n// you supply the body of this method\n int start = startVertex;\n int stop = stopVertex;\n int previous;\n ArrayList<Integer> list = new ArrayList<>();\n HashMap<Integer, Integer> route = new HashMap<>();\n Stack<Integer> visited = new Stack<>();\n Stack<Integer> reverse = new Stack<>();\n int parent;\n if(!pathExists(startVertex,stopVertex)){\n return new ArrayList<Integer>();\n }\n else if(startVertex == stopVertex){\n list.add(startVertex);\n return list;\n }\n else{\n while(!neighbors(start).contains(stopVertex)){\n List neighbor = neighbors(start);\n for (Object a: neighbor) {\n if(!pathExists((int)a,stopVertex)){\n continue;\n }\n if(visited.contains(a)){\n continue;\n }\n else {\n route.put((int) a, start);\n visited.push(start);\n start = (int) a;\n break;\n }\n }\n }\n route.put(stopVertex,start);\n list.add(stopVertex);\n previous = route.get(stopVertex);\n list.add(previous);\n while(previous!=startVertex){\n int temp = route.get(previous);\n list.add(temp);\n previous = temp;\n }\n for(int i=0; i<list.size(); i++){\n reverse.push(list.get(i));\n }\n int i=0;\n while(!reverse.empty()){\n int temp = reverse.pop();\n list.set(i,temp);\n i++;\n }\n//list.add(startVertex);\n return list;\n }\n }", "private int findAllPathsUtil(int s, int t, boolean[] isVisited, List<Integer> localPathList,int numOfPath,LinkedList<Integer>[] parent )\n {\n\n if (t==s) {\n numOfPath++;\n return numOfPath;\n }\n isVisited[t] = true;\n\n for (Integer i : parent[t]) {\n if (!isVisited[i]) {\n localPathList.add(i);\n numOfPath =findAllPathsUtil(s,i , isVisited, localPathList,numOfPath,parent);\n localPathList.remove(i);\n }\n }\n isVisited[t] = false;\n return numOfPath;\n }", "private static Node traverseList(Node n){\n\t if(n == null)\n\t return null;\n\t if(n.visited)\n\t return n;\n\t \n\t n.visited = true;\n\t return traverseList(n.next);\n\t }", "void DFS(int v) {\n\t\t\tboolean visited[] = new boolean[number_of_vertices];\n\t\t\t\n\t\t\t//in case that the vertex are not connected, I need to make DFS for all\n\t\t\t//available vertex and checking before if they are not visited\n\t\t\tfor(int i = 0 ; i < number_of_vertices; i++) {\n\t\t\t\tif(visited[i] == false)\n\t\t\t\t\tDFSUtil(v, visited);\n\t\t\t}\n\t\t}", "static int APUtil(ArrayList<Arista>[] adj, int u, boolean visited[], int disc[], int low[], int parent[], int ap[]){\n\n // Count of children in DFS Tree\n int children = 0;\n\n // Mark the current node as visited\n visited[u] = true;\n\n // Initialize discovery time and low value\n disc[u] = low[u] = ++time;\n\n // Go through all vertices aadjacent to this\n for (Arista arista : adj[u]) {\n int v = arista.to; // v is current adjacent of u\n\n // If v is not visited yet, then make it a child of u\n // in DFS tree and recur for it\n if (!visited[v]) {\n children++;\n parent[v] = u;\n sol = APUtil(adj, v, visited, disc, low, parent, ap);\n\n // Check if the subtree rooted with v has a connection to\n // one of the ancestors of u\n low[u] = Math.min(low[u], low[v]);\n\n // u is an articulation point in following cases\n\n // (1) u is root of DFS tree and has two or more chilren.\n if (parent[u] == -1 && children > 1){\n ap[u]++;\n if((ap[u] > ap[sol]) || (ap[u] == ap[sol] && u < sol))\n sol = u;\n }\n\n\n // (2) If u is not root and low value of one of its child\n // is more than discovery value of u.\n if (parent[u] != -1 && low[v] >= disc[u]){\n ap[u]++;\n if((ap[u] > ap[sol]) || (ap[u] == ap[sol] && u < sol))\n sol = u;\n }\n\n }\n\n // Update low value of u for parent function calls.\n else if (v != parent[u])\n low[u] = Math.min(low[u], disc[v]);\n }\n\n return sol;\n }", "private int dfsInOrderIterativeSol(TreeNode root, int k) {\n // Corner Case\n if (root == null) {\n return 0;\n }\n\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n int countNum = 0;\n\n while (!stack.isEmpty() || node != null) {\n if (node != null) {\n stack.push(node); // just like the recursion\n node = node.left;\n } else {\n TreeNode curNode = stack.pop();\n countNum++;\n if (countNum == k) {\n return curNode.val;\n }\n node = curNode.right;\n }\n }\n return 0;\n\n // // push nodes till the left end\n // while (root != null) {\n // stack.push(root);\n // root = root.left;\n // }\n\n // while (k != 0) {\n // TreeNode curNode = stack.pop();\n // k -= 1;\n // if (k == 0) {\n // return curNode.val;\n // }\n\n // TreeNode rightNode = curNode.right;\n // // push the right node till the left end still!!!\n // while(rightNode != null) {\n // stack.push(rightNode);\n // rightNode = rightNode.left;\n // }\n // }\n\n // return 0; // never hit if k is valid and root is not null\n }", "private List<Valuable> helper(double amount, List<Valuable> money) {\n if(money.size() == 0) return null;\n Valuable current = money.get(0);\n if(amount >= current.getValue()) {\n if(amount - current.getValue() == 0) return new ArrayList<Valuable>(money.subList(1,money.size()));\n List<Valuable> tempList;\n if(( tempList=helper(amount-current.getValue(),money.subList(1,money.size())) ) != null ) {\n return tempList;\n }\n }\n List<Valuable> returnList = helper(amount,money.subList(1,money.size()));\n if(returnList != null) returnList.add(current);\n return returnList;\n }", "@Override\n public int indeksTil(T verdi) {\n int indeks=0;\n Node<T> curr= hode;\n for (; curr!=null; curr= curr.neste, indeks++){\n if (curr.verdi.equals(verdi)){\n return indeks;\n\n }// end if\n\n }// end for\n return -1;\n }", "public static <V> void printAllShortestPaths(Graph<V> graph) {\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] pesos = new double[matrizPesos.length][matrizPesos.length];\n V[] vertices = graph.getValuesAsArray();\n V[][] caminos = (V[][]) new Object[matrizPesos.length][matrizPesos.length];\n for (int x = 0; x < matrizPesos.length; x++) {\n for (int y = 0; y < matrizPesos.length; y++) {\n if (x == y) {\n pesos[x][y] = -1;\n } else {\n if (matrizPesos[x][y] == -1) {\n pesos[x][y] = Integer.MAX_VALUE; //Si no existe arista se pone infinito\n } else {\n pesos[x][y] = matrizPesos[x][y];\n }\n }\n caminos[x][y] = vertices[y];\n }\n }\n for (int x = 0; x < vertices.length; x++) { // Para cada uno de los vertices del grafo\n for (int y = 0; y < vertices.length; y++) { // Recorre la fila correspondiente al vertice\n for (int z = 0; z < vertices.length; z++) { //Recorre la columna correspondiente al vertice\n if (y != x && z != x) {\n double tam2 = pesos[y][x];\n double tam1 = pesos[x][z];\n if (pesos[x][z] != -1 && pesos[y][x] != -1) {\n double suma = pesos[x][z] + pesos[y][x];\n if (suma < pesos[y][z]) {\n pesos[y][z] = suma;\n caminos[y][z] = vertices[x];\n }\n }\n }\n }\n }\n }\n\n //Cuando se termina el algoritmo, se imprimen los caminos\n for (int x = 0; x < vertices.length; x++) {\n for (int y = 0; y < vertices.length; y++) {\n boolean seguir = true;\n int it1 = y;\n String hilera = \"\";\n while (seguir) {\n if (it1 != y) {\n hilera = vertices[it1] + \"-\" + hilera;\n } else {\n hilera += vertices[it1];\n }\n if (caminos[x][it1] != vertices[it1]) {\n int m = 0;\n boolean continuar = true;\n while (continuar) {\n if (vertices[m].equals(caminos[x][it1])) {\n it1 = m;\n continuar = false;\n } else {\n m++;\n }\n }\n } else {\n if (x == y) {\n System.out.println(\"El camino entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera);\n } else {\n hilera = vertices[x] + \"-\" + hilera;\n if (pesos[x][y] == Integer.MAX_VALUE) {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera + \" con distancia de: \" + (pesos[x][y]));\n }\n }\n seguir = false;\n }\n }\n }\n System.out.println();\n }\n }", "@Override\n public ArrayList<ArrayList<String>> getNeighborhood(ArrayList<String> point, double argument1, double argument2) {\n ArrayList<ArrayList<String>> neighborhood = new ArrayList<>();\n String[] moves = {\"U\", \"D\", \"L\", \"R\"};\n if(point.size() == 0){\n point.add(moves[(int)(Math.random()*4)]);\n }\n\n //kazde rozwiązanie powstaje przez wstawienie każdego ruchu w środku ścieżki\n for(int i = 0; i<point.size(); i++){\n for(String move : moves){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.add(i, move);\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n for(String move : moves){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.add(i, move);\n newPath.add(i, move);\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n }\n\n //kazde rozwiązanie powstaje przez usunięcie jednego elementu\n for(int i=0; i<point.size(); i++){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.remove(i);\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n\n //kazde rozwiązanie powstaje przez swapowanie wszystkich z losowym\n int random = (int)(Math.random()*point.size());\n for(int i=0; i<point.size(); i++){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.set(i, point.get(random));\n newPath.set(random, point.get(i));\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n\n //System.out.println(neighborhood.size());\n\n ArrayList<ArrayList<String>> newNeighborhood = new ArrayList<>();\n for (int i = 0; i < neighborhood.size(); i++) {\n newNeighborhood.add(shortenPath(neighborhood.get(i)));\n }\n\n return newNeighborhood;\n }", "public Nodo Buscar(Nodo r, int clave){\r\n\t Nodo Aux = null;\r\n\t\tif(r!=null){\r\n\t \tif(r.getClave()==clave){\r\n\t \t\tAux = r;\r\n\t \t}\r\n\t \telse{\r\n\t Aux = Buscar(r.getRight(),clave);\r\n\t if(Aux==null)\r\n\t Aux = Buscar(r.getLeft(),clave);\r\n\t }\r\n\t \t\r\n\t }\r\n\t return Aux;\r\n\t}", "static void inorderTraversal(Node tmp)\n {\n if(tmp!=null) {\n inorderTraversal(tmp.left);\n System.out.print(tmp.val+\" \");\n inorderTraversal(tmp.right);\n }\n \n \n \n }", "public void inOrden(Nodo r){\n if(r != null){\n inOrden(r.hijoIzquierdo);\n System.out.println(r.valor);\n inOrden(r.hijoDerecho);\n }\n }", "public void continueTraversing(Graph<VLabel, ELabel>.Vertex v) {\n if (_curTraversal.equals(\"dfs\")) {\n try {\n depthHelper(_graph, v, _marked, false);\n } catch (StopException e) {\n return;\n }\n _finalVertex = null;\n } else if (_curTraversal.equals(\"gt\")) {\n traverseHelper(v);\n } else if (_curTraversal.equals(\"bft\")) {\n breadthHelper(v);\n }\n }", "@Override public T next(){\n Vertice v = pila.saca();\n T e = v.elemento;\n v = v.derecho;\n while (v != null) {\n pila.mete(v);\n v = v.izquierdo;\n }\n\t\treturn e;\n }", "private int method2(TreeNode root, int k) {\n result = root.val;\n count = 0;\n inorder(root, k);\n return result;\n }", "public Item recursivHelper(StuffNode x, int index) {\n if (index == 0) {\n return x.item;\n } else {\n return recursivHelper(x.next, index-1);\n }\n }", "private void recInOrderTraversal(BSTNode<T> node) {\n\t\tif (node != null) {\n\t\t\trecInOrderTraversal(node.getLeft());\n\t\t\ta.add(node.getData());\n\t\t\trecInOrderTraversal(node.getRight());\n\t\t}\n\t}", "private static int helper(TreeNode root, TreeNode p, TreeNode q, List<TreeNode> ans) {\n if (root == null)\n return 0;\n int sum = 0;\n if (root.val == p.val || root.val == q.val)\n ++sum;\n int leftSum = helper(root.left, p, q, ans);\n int rightSum = helper(root.right, p, q, ans);\n sum += leftSum + rightSum;\n if (sum == 2 && leftSum < 2 && rightSum < 2)\n ans.add(root);\n return sum;\n }", "public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }", "public List<MapPoint> buildPath(MapPoint point) { // Palauttaa polun alusta loppuun listana.\n List<MapPoint> finalPath = new ArrayList<>();\n MapPoint tempPoint = point;\n while (true) {\n finalPath.add(0, tempPoint);\n \n if (!tempPoint.hasPrevious()) {\n break;\n }\n tempPoint = tempPoint.getPrevious();\n }\n return finalPath; \n }", "private static void depthFirstSearch(Vertex v, ArrayList<Vertex> visitedArrayList, Graph graph){\n visitedArrayList.add(v);\n Iterator<Vertex> iter=graph.getNeighbors(v).iterator();\n while (iter.hasNext()){\n Vertex v1=iter.next();\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n for(Vertex v1 : graph.getNeighbors(v)){\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n }", "public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }", "public void pagarFerrovia(int credor, int devedor, int valor, String NomePopriedade) {\n\n Jogador JogadorDevedor = listaJogadores.get(devedor);\n Jogador JogadorCredor = listaJogadores.get(credor);\n if ((NomePopriedade.equals(\"Reading Railroad\")) ||\n (NomePopriedade.equals(\"Pennsylvania Railroad\")) ||\n (NomePopriedade.equals(\"B & O Railroad\")) ||\n (NomePopriedade.equals(\"Short Line Railroad\"))) {\n int quantidadeFerrovias = DonosFerrovias[credor];\n int divida = quantidadeFerrovias * valor;\n this.print(\"Credor tem \" + quantidadeFerrovias);\n this.print(\"Divida eh \" + divida);\n\n if (listaJogadores.get(devedor).getDinheiro() >= divida) {\n JogadorDevedor.retirarDinheiro(divida);\n JogadorCredor.addDinheiro(divida);\n this.print(\"aqui\");\n\n } else {\n int DinheiroRestante = listaJogadores.get(devedor).getDinheiro();\n JogadorDevedor.retirarDinheiro(DinheiroRestante);\n\n if(bankruptcy);\n\n else\n JogadorCredor.addDinheiro(DinheiroRestante);\n this.removePlayer(devedor);\n\n }\n\n }\n }", "private int parent(int i){return (i-1)/2;}", "public static String BFS(Graph grafo, Vertice vertice) {\r\n\t\tArrayList<Integer> busca = new ArrayList<Integer>(); // vertice nivel pai em ordem de descoberta\r\n\t\tArrayList<Vertice> aux1 = new ArrayList<Vertice>(); // fila de nos pais a serem visitados\r\n\t\tArrayList<Vertice> aux2 = new ArrayList<Vertice>(); // fila de nos filhos a serem visitdados\r\n\r\n\t\tint nivel = 0;\r\n\r\n\t\taux1.add(vertice);// adiciona a raiz a aux1 para inicio da iteracao\r\n\t\tvertice.setPai(0);// seta o pai da raiz para zero\r\n\r\n\t\twhile (aux1.size() > 0) {\r\n\t\t\tfor (int i = 0; i < aux1.size(); i++) {\r\n\t\t\t\tif (aux1.get(i).statusVertice() == false) {// verifrifica se o no ja nao foi atingido por outra ramificacao.\r\n\t\t\t\t\tbusca.add(aux1.get(i).getValor());\r\n\t\t\t\t\tbusca.add(nivel);\r\n\t\t\t\t\tbusca.add(aux1.get(i).getPai());\r\n\t\t\t\t\tvertice.alteraStatusVertice(true);\r\n\r\n\t\t\t\t\tfor (int j = 0; i < vertice.getArestas().size(); j++) {\r\n\t\t\t\t\t\tproxVertice(vertice, vertice.getArestas().get(j)).setPai(aux1.get(i).getValor());// associa o no pai\r\n\t\t\t\t\t\taux2.add(proxVertice(vertice, vertice.getArestas().get(j)));// adiciona lista dos proximos nos filhos serem percorridos\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\taux1 = aux2; // todos os nos pai ja foram percoridos, filhos se tornam a lista de nos pai\r\n\t\t\t\t\taux2.clear(); // lista de nos filhos e esvaziada para o proximo ciclo de iteracoes\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tnivel++;\r\n\t\t}\r\n\r\n\t\tresetStatusVertex(grafo);\r\n\r\n\t\treturn criaStringDeSaida(grafo, busca);// formata o resutltado da busca para a string esperada\r\n\t}" ]
[ "0.61941886", "0.6010248", "0.596308", "0.5811993", "0.57908446", "0.5786544", "0.57712114", "0.57366705", "0.57160133", "0.5709672", "0.5641861", "0.56194305", "0.55784714", "0.55451703", "0.5536886", "0.55244684", "0.54963416", "0.54926354", "0.5475411", "0.54671526", "0.54123306", "0.5404502", "0.53739053", "0.5366393", "0.5356948", "0.5350376", "0.53458893", "0.5336773", "0.5334113", "0.5325227", "0.5315108", "0.53016514", "0.5290871", "0.5285989", "0.5282365", "0.5278417", "0.5274013", "0.5270193", "0.52684796", "0.52298605", "0.5216445", "0.52103436", "0.5197612", "0.5195134", "0.51805544", "0.5178752", "0.517156", "0.517082", "0.5165293", "0.5163202", "0.5160559", "0.5142046", "0.5141873", "0.51402634", "0.51265943", "0.51241577", "0.5118904", "0.5116955", "0.5113841", "0.51097536", "0.5103972", "0.5103364", "0.5103095", "0.5102035", "0.5091636", "0.50869095", "0.5083033", "0.5080796", "0.5080129", "0.5076852", "0.5073771", "0.5071209", "0.50710267", "0.5063056", "0.5055234", "0.5042213", "0.5023054", "0.500757", "0.5007537", "0.50071794", "0.5004043", "0.5003344", "0.5001909", "0.50007516", "0.50000536", "0.49985778", "0.49971098", "0.4995103", "0.49918228", "0.49869153", "0.49860507", "0.49855348", "0.49812388", "0.49598175", "0.49589372", "0.49545833", "0.49505", "0.4950207", "0.49488238", "0.4935508" ]
0.5846996
3
funcao recursiva que particiona e ordena o vetor
private static void quickCrescente( int[ ] v , int inicio , int fim ) { int aux, down, up, pivo, i; // determinar qual valor sera o pivo do particionamento do vetor pivo = v[ inicio ]; down = inicio; up = fim; while( down < up ) { while( v[ down ] <= pivo && down < fim ) down++; while( v[ up ] > pivo && up > inicio ) up--; if( down < up ) { aux = v[ down ]; v[ down ] = v[ up ]; v[ up ] = aux; } } v[ inicio ] = v[ up ]; v[ up ] = pivo; System.out.println("\n"); for( i = 0 ; i < v.length ; i++ ) System.out.print(v[ i ] + " "); if( inicio < up && inicio != up-1 ) quickCrescente( v , inicio , up-1 ); if( fim > down && up+1 != fim ) quickCrescente( v , up+1 , fim ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void extendPath(Grafo g, List<Integer> caminho) {\n Integer next = null;\n for (Integer v : caminho) {\n if (g.estaConectado(v, caminho.get(caminho.size() - 1))) { //Vi\n int index = caminho.indexOf(v); //Vi+1\n int unvisited, maxEta = 0;\n for (Integer w : g.vizinhos(caminho.get(index + 1))) { //Checando se Vi+1 tem vizinhos não visitados\n if (caminho.contains(w)) {\n continue;\n }\n unvisited = 0;\n for (Integer m : g.vizinhos(w)) { //eta de w\n if (!caminho.contains(m)) {\n unvisited++;\n }\n }\n if (unvisited > maxEta) {\n next = w;\n maxEta = unvisited;\n }\n }\n if (next != null) {\n //Reorganizar o caminho\n Collections.reverse(caminho.subList(index + 1, caminho.size()));\n caminho.add(next);\n findAPath(g, caminho, null);\n extendPath(g, caminho);\n break;\n }\n }\n }\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "void topologicalSortUtil(int v, Boolean visited[], Stack stack) {\n // Mark the current node as visited.\n visited [v] = true;\n Integer i;\n System.out.println(\"At vertex: \" + v);\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> it = adj [v].iterator();\n while (it.hasNext()) {\n i = it.next();\n if (!visited [i])\n topologicalSortUtil(i, visited, stack);\n }\n // System.out.println(\"pushing into stack: \" + v);\n\n // Push current vertex to stack which stores result\n stack.push(new Integer(v));\n }", "private static void quickDecrescente( int[ ] v , int inicio , int fim )\r\n {\r\n int aux, down, up, pivo, i;\r\n // determinar qual valor sera o pivo do particionamento do vetor\r\n pivo = v[ inicio ];\r\n down = inicio; \r\n up = fim;\r\n while( down < up )\r\n {\r\n while( v[ down ] >= pivo && down < fim )\r\n down++;\r\n while( v[ up ] < pivo && up > inicio )\r\n up--;\r\n if( down < up )\r\n {\r\n aux = v[ down ];\r\n v[ down ] = v[ up ];\r\n v[ up ] = aux;\r\n }\r\n }\r\n v[ inicio ] = v[ up ];\r\n v[ up ] = pivo;\r\n \r\n System.out.println(\"\\n\");\r\n for( i = 0 ; i < v.length ; i++ )\r\n System.out.print(v[ i ] + \" \");\r\n\r\n if( inicio < up && inicio != up-1 )\r\n quickDecrescente( v , inicio , up-1 );\r\n \r\n if( fim > down && up+1 != fim )\r\n quickDecrescente( v , up+1 , fim );\r\n }", "public void inOrderTraverseIterative();", "private void traverseHelper(Graph<VLabel, ELabel>.Vertex v) {\n PriorityQueue<Graph<VLabel, ELabel>.Vertex> fringe =\n new PriorityQueue<Graph<VLabel,\n ELabel>.Vertex>(_graph.vertexSize(), _comparator);\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n visit(curV);\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n if (!_marked.contains(e.getV(curV))) {\n preVisit(e, curV);\n fringe.add(e.getV(curV));\n }\n }\n }\n } catch (StopException e) {\n _finalVertex = curV;\n return;\n }\n }\n }", "public void inOrderTraverseRecursive();", "private void Visitar(Vertice v, int p) {\n\t\t\n\t\tv.setVisited(true);\n\t\tv.setPredecessor(p);\n\t\t\n\t\tLinkedList<ListaAdjacencia> L = v.getAdjList();\n\t\t\n\t\tfor (ListaAdjacencia node : L) {\n\t\t\tint n = node.getverticeNumero();\n\t\t\tif (!vertices[n].getVisited()) {\n\t\t\t\tVisitar(vertices[n], v.getIndex());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private int find(int[] parent, int v) {\n if(parent[v] == -1) return v;\n return find(parent, parent[v]);\n }", "private void balancearAgrega(Vertice<T> v){\n\tif(v == this.raiz){\n\t v.color = Color.NEGRO;\n\t return;\n\t}else if(v.padre.getColor() == Color.NEGRO){\n\t return;\n\t}\n\tVertice<T> abuelo = v.padre.padre;\n\tif(v.padre == abuelo.derecho){\n\t if(abuelo.izquierdo != null &&\n\t abuelo.izquierdo.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.izquierdo.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\t \n\t }else if(v.padre.izquierdo == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraDerecha(v.padre);\n\t\tbalancearAgrega(v2); \n\t }else if(v.padre.derecho == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraIzquierda(abuelo);\n\t }\n\t}else if(v.padre == abuelo.izquierdo){\n\t if(abuelo.derecho != null &&\n\t abuelo.derecho.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.derecho.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\n\t }else if(v.padre.derecho == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraIzquierda(v.padre);\n\t\tbalancearAgrega(v2); \n\t \n\t }else if(v.padre.izquierdo == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraDerecha(abuelo);\n\t }\n\t} \t\n\t\n }", "int query_up(int u, int v) {\n int uchain, vchain = chainInInd[v], ans = 0;\n // uchain and vchain are chain numbers of u and v\n int last = -1;\n while (true) {\n uchain = chainInInd[u];\n if (uchain == vchain) {\n // Both u and v are in the same chain, so we need to query from u to v, update answer and break.\n // We break because we came from u up till v, we are done\n if (u == v) break;\n out.println(\"query = \" + (posInBase[v]) + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[v], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[v], posInBase[u], 1, pointer);\n // Above is call to segment tree query function\n break;\n }\n out.println(\"query = \" + posInBase[chainInHead[uchain]] + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer);\n // Above is call to segment tree query function. We do from chainHead of u till u. That is the whole chain from\n // start till head. We then update the answer\n u = chainInHead[uchain]; // move u to u's chainHead\n u = par[u]; //Then move to its parent, that means we changed chains\n }\n out.println(ans+\" =ans\");\n return ans;\n }", "private void dfs(DigrafoAristaPonderada G, int v) {\n enPila[v] = true;\n marcado[v] = true;\n for (AristaDirigida a : G.ady(v)) {\n int w = a.hacia();\n\n // short circuit if directed ciclo found\n if (ciclo != null) return;\n\n //found new vertex, so recur\n else if (!marcado[w]) {\n aristaHacia[w] = a;\n dfs(G, w);\n }\n\n // trace back directed ciclo\n else if (enPila[w]) {\n ciclo = new Pila<AristaDirigida>();\n while (a.desde() != w) {\n ciclo.push(a);\n a = aristaHacia[a.desde()];\n }\n ciclo.push(a);\n return;\n }\n }\n\n enPila[v] = false;\n }", "private void inOrderTraversal(int index) {\n // go through the graph as long as has values\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n inOrderTraversal(2 * index + 1);\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on right child\n inOrderTraversal(2 * index + 2);\n }", "static int recursiva1(int n)\n\t\t{\n\t\tif (n==0)\n\t\t\treturn 10; \n\t\tif (n==1)\n\t\t\treturn 20; \n\t\treturn recursiva1(n-1) - recursiva1 (n-2);\t\t\n\t\t}", "@Override\r\n\tpublic Iterable<Integer> pathTo(int v) {\r\n\t\tif (!hasPathTo(v)) return null;\r\n\r\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\twhile(v != -1) {\r\n\t\t\tlist.add(v);\r\n\t\t\tv = edgeTo[v];\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "private TreeNode napraviStabloUtil(List<TreeNode> cvorovi, int pocetni, int krajnji) {\n// osnovni slučaj\n if (pocetni > krajnji) {\n return null;\n }\n /* Nadji srednji element i proglasi ga korenom */\n int mid = (pocetni + krajnji) / 2;\n TreeNode cvor = cvorovi.get(mid);\n /* Koristeci indeks u infiks obilasku\n* konstruiši levo i desno podstablo */\n cvor.left = napraviStabloUtil(cvorovi, pocetni, mid - 1);\n cvor.right = napraviStabloUtil(cvorovi, mid + 1, krajnji);\n return cvor;\n }", "private void cazaFantasma(Vertice<T> v){\n\tif(v.padre == null){\n\t if(v == this.raiz){\n\t\tthis.raiz = null;\n\t\treturn;\n\t }\n\t return;\n\t}else{\n\t Vertice<T> padre = v.padre;\n\t if(v == padre.izquierdo){\n\t\tif(v.hayIzquierdo()){\n\t\t padre.izquierdo = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.izquierdo = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.izquierdo = null;\n\t\t}\t\t\n\t }else{\n\t\tif(v.hayIzquierdo()){\n\t\t padre.derecho = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.derecho = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.derecho = null;\n\t\t}\n\t }\n\t}\n }", "void DFSUtil(int v, boolean visited[]) {\n // Mark the current node as visited and print it\n visited [v] = true;\n System.out.print(v + \" \");\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> i = adj [v].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n])\n DFSUtil(n, visited);\n }\n }", "@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "private NodoGrafo Vert2Nodo(int v) {\n\t\tNodoGrafo aux = origen;\n\t\twhile (aux != null && aux.nodo != v)\n\t\t\taux = aux.sigNodo;\t\t\n\t\treturn aux;\n\t}", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "public void topologicalSortUtil(int v, HashSet<Integer> visited, Stack<Integer> stack) {\n visited.add(v);\n for (int n : g.getNeighbors(v)) {\n if (visited.contains(n))\n continue;\n topologicalSortUtil(n, visited, stack);\n }\n stack.add(v);\n }", "public static Nodo buscarSolucionPorAmplitud(Nodo inicio, int[][] solucion) {\n\t\tArrayList<Nodo> abiertos = new ArrayList<Nodo>();\n\t\tabiertos.add(inicio);\n\t\tint cont = 0;\n\t\tArrayList<Nodo> visitados = new ArrayList<Nodo>();\n\t\twhile(abiertos.size()!=0) {\n\t\t\tSystem.out.println(\"Visitados\");\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tfor(Nodo n : visitados) {\n\t\t\t\timprimirEstado(n.getEstado());\n\t\t\t\tSystem.out.println(\"Costo de este nodo: \" + n.getCosto());\n\t\t\t\tSystem.out.println(\"---------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tNodo revisar = abiertos.remove(0);\n\t\t\trevisar.setCosto(calcularCosto(revisar.getEstado(), solucion));\n\t\t\timprimirEstado(revisar.getEstado());\n\t\t\tint[] pcero = ubicarPosicionCero(revisar.getEstado());\n\t\t\tSystem.out.println(\"Iteracion # \" + ++cont);\n\t\t\tif(Arrays.deepEquals(revisar.getEstado(), solucion)) {\n\t\t\t\tSystem.out.println(\"***** SOLUCION ENCONTRADA *****\");\n\t\t\t\treturn revisar;\n\n\t\t\t}\n\n\t\t\tArrayList<Nodo> hijos = new ArrayList<Nodo>();\n\t\t\tvisitados.add(revisar);\n\t\t\tif(pcero[0]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint arriba = hijo.getEstado()[pcero[0]-1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = arriba;\n\t\t\t\thijo.getEstado()[pcero[0]-1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[0]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint abajo = hijo.getEstado()[pcero[0]+1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = abajo;\n\t\t\t\thijo.getEstado()[pcero[0]+1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint izq = hijo.getEstado()[pcero[0]][pcero[1]-1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = izq;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]-1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint der = hijo.getEstado()[pcero[0]][pcero[1]+1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = der;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]+1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\trevisar.setHijos(hijos);\n\t\t}\n\t\treturn null;\n\n\t}", "private Node<T> LongestPathRec(Node<T> nodo, int prof, Node<T> ret) {\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tprof++;// Aumenta la profundidad\r\n\t\t\tif (prof == this.getMaxDepth()) {// Si es el mas profundo\r\n\t\t\t\tret = nodo.getChildren().get(1);// Asigna ret como el mas\r\n\t\t\t\t\t\t\t\t\t\t\t\t// profundo\r\n\t\t\t\treturn ret;// Retorna\r\n\t\t\t}\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\tret = LongestPathRec(hijos.get(i), prof, ret);// Recursividad\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// del metodo\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }", "@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }", "void DFSUtil(int v, boolean visited[]) {\n \t// Mark the current node as visited and print it \n visited[v] = true; \n System.out.print(v + \" \"); \n \n for(int w: adj[v]) \n \tif (!visited[w]) { \n \t\tDFSUtil(w, visited);\n \t}\n }", "static int introTutorial(int V, int[] arr) {\n// return searchBinaryRecursive(V, arr, 0, arr.length-1);\n return searchBinaryIterative(V, arr, 0, arr.length-1);\n }", "private static <V> int buscarArbol(V pValor, List<Graph<V>> pLista) {\n for (int x = 1; x <= pLista.size(); x++) {\n Graph<V> arbol = pLista.get(x);\n Iterator<V> it1 = arbol.iterator();\n while (it1.hasNext()) {\n V aux = it1.next();\n if (aux.equals(pValor)) {\n return x;\n }\n }\n }\n return 0;\n }", "static int reverseRecursiveTravesal(Node node, int k) {\n\t\tif(node == null)\n\t\t\treturn -1;\n\t\t\n\t\tint indexFromLast = reverseRecursiveTravesal(node.getNext(), k) + 1;\n\t\tif(indexFromLast == k) \n\t\t\tSystem.out.println(node.getData());\n\t\t\n\t\treturn indexFromLast;\n\t\t\n\t}", "void query(int u, int v) {\n int lca = lca2(u, v, spar, dep);\n// out.println(query_up(u, lca) + \" dv\");\n// out.println(query_up(v, lca) + \" ds\");\n int ans = query_up(u, lca) + query_up(v, lca); // One part of path\n out.println(ans);\n// if (temp > ans) ans = temp; // take the maximum of both paths\n// printf(\"%d\\n\", ans);\n }", "void DFSUtil(int v, boolean visited[]) {\n\t\t\tvisited[v] = true;\n\t\t\tSystem.out.println(v +\" \");\n\t\t\t\n\t\t\t//Recur all the vertices adjacents to this vertex\n\t\t\tIterator<Integer> i = adj[v].listIterator();\n\t\t\twhile(i.hasNext()) {\n\t\t\t\tint node = i.next();\n\t\t\t\tif(!visited[node]) {\n\t\t\t\t\tDFSUtil(node, visited);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public Iterable<Integer> pathTo(int v)\n {\n if (!hasPathTo(v)) return null;\n Stack<Integer> path = new Stack<Integer>();\n for (int x = v; x != s; x = edgeTo[x])\n path.push(x);\n path.push(s);\n return path;\n }", "private Vector<Vector<BusStopInfo>> findRek (BusStopInterface from, BusStopInterface to, Vector <BusStopInfo> toInfo, Vector<BusStopInfo> visited, int swaps, int transfers )\r\n {\r\n Vector<Vector<BusStopInfo>> sciezka = new Vector<Vector<BusStopInfo>>();\r\n \r\n if(from.getName()==to.getName())\r\n {\r\n sciezka.add(toInfo);\r\n return sciezka;\r\n }\r\n\r\n for(BusStopInfo vis: visited)\r\n {\r\n if(vis.awtobus.busLine.getBusStop(vis.pozycja).getName()==from.getName())\r\n return sciezka;\r\n }\r\n\r\n Vector <BusStopInfo> fromInfo = findStopInfo(from);\r\n\r\n fromInfo = infoFilter(fromInfo, toInfo);\r\n\r\n for(BusStopInfo info: fromInfo)\r\n {\r\n int swapsNow = swaps;\r\n if(visited.size()>0 && info.awtobus.bus.getBusNumber()!=visited.lastElement().awtobus.bus.getBusNumber())\r\n {\r\n swapsNow++;\r\n }\r\n\r\n if(swapsNow <= transfers)\r\n {\r\n int nextPosition = info.pozycja +1; //ide do przodu linii\r\n int prevPosition = info.pozycja -1; //ide do tyłu linii\r\n\r\n Vector<BusStopInfo> temp = new Vector<BusStopInfo>(visited);\r\n temp.add(info);\r\n Vector<Vector<BusStopInfo>> result ;\r\n if(nextPosition<info.awtobus.busLine.getNumberOfBusStops())\r\n {\r\n BusStopInterface nextStop = info.awtobus.busLine.getBusStop(nextPosition);\r\n result = findRek(nextStop, to, toInfo, temp, swapsNow, transfers);\r\n for(Vector<BusStopInfo> res: result)\r\n {\r\n res.add(0, info);\r\n sciezka.add(res);\r\n }\r\n }\r\n if(prevPosition >= 0)\r\n {\r\n BusStopInterface prevStop = info.awtobus.busLine.getBusStop(prevPosition);\r\n result = findRek(prevStop, to, toInfo, temp, swapsNow, transfers);\r\n for(Vector<BusStopInfo> res: result)\r\n {\r\n res.add(0, info);\r\n sciezka.add(res);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return sciezka;\r\n }", "private int resolver(int x, int y, int pasos) {\n \n \tif(visitado[x][y]){ // si ya he estado ahi vuelvo (como si fuera una pared el sitio en el que ya he estado)\n \t\treturn 0;\n \t}\n \tvisitado[x][y]=true; // marcamos el sitio como visitado y lo pintamos de azul\n \tStdDraw.setPenColor(StdDraw.BLUE);\n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \tif(x==Math.round(N/2.0)&& y== Math.round(N/2.0)){// Si estoy en la posicion central cambio encontrado y lo pongo true.\n \t\ttotal=pasos;\n \t\tencontrado=true;\n \t\treturn total;\n \t}\n \tif(encontrado)return total;\n \t\n \tdouble random = Math.random()*11;//creo un numero aleatorio\n \t\n \tif(random<3){\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);// voy pal norte y vuelvo a empezar el metodo con un paso mas\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \t}\n \tif (random >=3 && random<6){\n \t\tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \t}\n \tif(random>=6 && random<9){\n \t\tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \t}\n \tif(random >=9){\n \t\tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \t}\n \t\n \tif(encontrado){\n \t\treturn total;\n \t}\n \tStdDraw.setPenColor(StdDraw.GRAY);// si no puedo ir a ningún lado lo pinto de gris \n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \treturn 0;// vuelvo al punto anterior \n \n }", "private void balancearElimina(Vertice<T> v){\n\t//Caso 1 RAIZ\n\tif(v.padre == null){\n\t this.raiz = v;\n\t v.color = Color.NEGRO;\n\t return;\n\t}\n\t//Vertice<T> hermano = getHermano(v);\n\t//Caso 2 HERMANO ROJO\n\tif(getHermano(v).color == Color.ROJO){\n\t v.padre.color = Color.ROJO;\n\t getHermano(v).color = Color.NEGRO;\n\t if(v.padre.izquierdo == v)\n\t\tsuper.giraIzquierda(v.padre);\n\t else\n\t\tsuper.giraDerecha(v.padre);\n\t //Actualizar V\n\t // hermano = getHermano(v);\n\t \n\t}\n\t//Caso 3 TODOS SON NEGROS\n\tif(v.padre.color == Color.NEGRO && existeNegro(getHermano(v)) && existeNegro(getHermano(v).izquierdo) && existeNegro(getHermano(v).derecho)){\n\t getHermano(v).color = Color.ROJO;\n\t //Checar color\n\t //v.color = Color.ROJO; //POR H DE HERMANO 20:00\n\t\tbalancearElimina(v.padre);\n\t\treturn;\n\t}\n\t//Caso 4 HERMANO Y SOBRINOS NEGROS Y PADRE ROJO\n\tif(existeNegro(getHermano(v)) && v.padre.color == Color.ROJO && existeNegro(getHermano(v).izquierdo)\n\t && existeNegro(getHermano(v).derecho)){\n\t v.padre.color = Color.NEGRO;\n\t getHermano(v).color = Color.ROJO;\n\t return;\n\t \n\t}\n\t//Caso 5 HERMANO NEGRO Y SOBRINOS BICOLORES\n\tif(getHermano(v).color == Color.NEGRO && (!(existeNegro(getHermano(v).izquierdo) && existeNegro(getHermano(v).derecho)))){\n\t if(v.padre.derecho == v){\n\t if(!existeNegro(getHermano(v).derecho)){\n\t\t getHermano(v).color = Color.ROJO;\n\t\t getHermano(v).derecho.color = Color.NEGRO;\n\t\t super.giraIzquierda(getHermano(v));\n\t }else{\n\t\t if(!existeNegro(getHermano(v).izquierdo)){\n\t\t getHermano(v).color = Color.ROJO;\n\t\t getHermano(v).izquierdo.color = Color.NEGRO;\t \n\t\t super.giraDerecha(getHermano(v));\n\t\t }\n\t }\n\t }\n\t}\n\t//Caso 6 SOBRINO INVERSO DE V ES ROJO\n\tif(v.padre.izquierdo == v){\n\t if(!existeNegro(getHermano(v).derecho)){\n\t\tgetHermano(v).color = v.padre.color;\n\t\t v.padre.color = Color.NEGRO;\n\t\t getHermano(v).derecho.color = Color.NEGRO;\n\t\t super.giraIzquierda(v.padre);\n\t }\n\t}else{\n\t if(!existeNegro(getHermano(v).izquierdo)){\n\t\tgetHermano(v).color = v.padre.color;\n\t\t v.padre.color = Color.NEGRO;\n\t\t getHermano(v).izquierdo.color = Color.NEGRO;\n\t\t super.giraDerecha(v.padre);\n\t }\n\t}\t\n }", "private void inorderRec(TreeNode root, List<Integer> result) {\n if (root != null) {\n inorderRec(root.left,result);\n result.add(root.val);\n inorderRec(root.right,result);\n }\n }", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }", "void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }", "public List<Vertex> runTabuSearch() {\r\n\t\tBestPath = convertPath(ClothestPath.findCycle(this.vertexGraph, this.edgeGraph, this.isOriented));\r\n\t\tLastPath = new ArrayList<Vertex>(BestPath);\r\n\t\tint BestEval = fit(BestPath);\r\n\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\r\n\t\tint iteration_actuel = 0;\r\n\t\twhile (iteration_actuel < this.numberIteration) {\r\n\t\t\tLastPath = newPath();\r\n\t\t\t\r\n\t\t\tif(LastPath.isEmpty()) {\r\n\t\t\t\titerationReal = iteration_actuel;\r\n\t\t\t\treturn BestPath;\r\n\t\t\t}\r\n\r\n\t\t\tif (fit(LastPath) < BestEval) {\r\n\t\t\t\tBestPath = new ArrayList<Vertex>(LastPath);\r\n\t\t\t\tBestEval = fit(LastPath);\r\n\t\t\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\t\t\t}\r\n\r\n\t\t\titeration_actuel++;\r\n\t\t}\r\n\r\n\t\titerationReal = iteration_actuel;\r\n\t\treturn BestPath;\r\n\t}", "private List<Node<T>> completaCamino(Node<T> ret, List<Node<T>> camino) {\r\n\t\tboolean comp = true;// Comprobacion\r\n\t\tcamino.add(ret);// Aņadimos el nodo al camino\r\n\t\twhile (comp) {\r\n\t\t\tif (ret.getParent() != null) {// Mientras no sea la raiz\r\n\t\t\t\tcamino.add(ret.getParent(), 1);// Aņade al inicio de la lista\r\n\t\t\t\tret = ret.getParent();// Hace que el padre sea el nuevo nodo\r\n\t\t\t} else if (ret.getParent() == null) {// Si es la raiz\r\n\t\t\t\tcomp = false;// Cancela\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn camino;\r\n\t}", "public void EliminarVertice(int v) {\n\t\tNodoGrafo aux = origen;\n\t\tif (origen.nodo == v) \n\t\t\torigen = origen.sigNodo;\t\t\t\n\t\twhile (aux != null){\n\t\t\t// remueve de aux todas las aristas hacia v\n\t\t\tthis.EliminarAristaNodo(aux, v);\n\t\t\tif (aux.sigNodo!= null && aux.sigNodo.nodo == v) {\n\t\t\t\t// Si el siguiente nodo de aux es v , lo elimina\n\t\t\t\taux.sigNodo = aux.sigNodo.sigNodo;\n\t\t\t}\n\t\t\taux = aux.sigNodo;\n\t\t}\t\t\n\t}", "private Square[] returnPath(Vertex v, GameBoard b) {\n // because we're starting at the end point,\n // we need build the path in 'reverse'\n Stack<Square> path = new Stack<Square>();\n\n // while we're not at the start point\n while ( v.dist != 0 ) {\n path.push(vertexToSquare(v,b));\n v = v.path;\n }\n\n // place the locations in the proper order\n Square[] road = new Square[path.size()];\n for ( int i = 0; i < path.size(); i++ )\n road[i] = path.pop();\n\n return road;\n }", "public Arestas primeiroListaAdj (int v) {\n this.pos[v] = -1; return this.proxAdj (v);\n }", "public List<List<Vertice<T>>> caminos(Vertice<T> v1,Vertice<T> v2) {\n\t\t\n \tList<List<Vertice<T>>>salida = new ArrayList<List<Vertice<T>>>();\n \tList<Vertice<T>> marcados = new ArrayList<Vertice<T>>();\n \tmarcados.add(v1);\n return buscarCaminosAux(v1,v2,marcados,salida);\n \n\n }", "private void modify(seg_node root, int l, int r, int a, int b, int v) {\n push_down(root);\n if (l == a && r == b) {\n root._sum += v * root.tot ;\n root._product = root._product * power_mod(root._product_of_di, v) % mod;\n root._lazy_sum += v;\n return;\n }\n int m = (l + r) / 2;\n if (b <= m) {\n modify(root.left, l, m, a, b, v);\n } else if (a >= m + 1) {\n modify(root.right, m + 1, r, a, b, v);\n } else {\n modify(root.left, l, m, a, m, v);\n modify(root.right, m + 1, r, m + 1, b, v);\n }\n push_up(root);\n }", "void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }", "public void postOrden(nodoArbolAVL r){\n if(r != null){\n postOrden(r.hijoIzquierdo);\n postOrden(r.hijoDerecho);\n //System.out.print(r.dato + \" , \");\n for (int i = 1; i<=7;i++) {\n if(r.nivel==i)\n {\n //vector[i]=r.dato;\n System.out.println(r.dato + \" NIVEL: \"+i);\n }\n }\n \n } \n \n }", "public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}", "protected abstract void traverse();", "private void preOrderTraversal(int index) {\n if (array[index] == null) {\n return;\n }\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on left child\n preOrderTraversal(2 * index + 1);\n //call recursively the method on right child\n preOrderTraversal(2 * index + 2);\n }", "private RegressionTreeNode traverseNumericalNode(Double v) {\n\t\tdouble val = (Double) this.value;\n\t\tif(v.compareTo(val) <= 0){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "private void eliminarAux(NodoAVL<T> actual){\n NodoAVL<T> papa= actual.getPapa();\n if(actual.getHijoIzq()==null && actual.getHijoDer()==null)\n eliminaSinHijos(actual,papa); \n else{//CASO2: Nodo con un solo hijo (izq)\n NodoAVL<T> sustituto;\n if(actual.getHijoIzq()!=null && actual.getHijoDer()==null){\n sustituto= actual.getHijoIzq();\n eliminaSoloConHijoIzq(actual,papa,sustituto); \n }\n else//CASO3: Nodo con un solo hijo (der)\n if(actual.getHijoIzq()==null && actual.getHijoDer()!=null){\n sustituto= actual.getHijoDer();\n eliminaSoloConHijoDer(actual,papa, sustituto);\n }\n else //CASO4: Nodo con dos hijos\n if(actual.getHijoIzq()!=null && actual.getHijoDer()!=null)\n eliminaConDosHijos(actual);\n }\n \n }", "private static void spreadVirus(int v){\n Queue<Integer> queue = new LinkedList<>();\n queue.add(v);\n while(!queue.isEmpty()){\n int temp = queue.poll();\n isVisited[temp]=true;\n for(int i = 1; i<adj[temp].length;i++){\n if(isVisited[i]==false && adj[temp][i]==1){\n queue.add(i);\n isVisited[i]=true;\n maxContamination++;\n }\n }\n }\n }", "public void vincula(){\n for (Nodo n : exps)\n n.vincula();\n }", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "private int helper(List<List<Integer>> res, TreeNode root) {\n if (root == null) return -1;\n int left = helper(res, root.left);\n int right = helper(res, root.right);\n int curr = Math.max(left, right) + 1;\n if (res.size() == curr) res.add(new ArrayList<>());\n res.get(curr).add(root.val);\n return curr;\n }", "void fillOrder(int v, boolean visited[], Stack stack) {\n \t\n \t// Mark the current node as visited and print it \n visited[v] = true;\n \n for(int w: adj[v]) \n \tif (!visited[w]) \n \t\tfillOrder(w, visited, stack);\n \n // All vertices reachable from v are processed by now, \n // push v to Stack \n stack.push(new Integer(v));\n }", "public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}", "public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}", "static int recursiva2(int n)\n\t\t{\n\t\t\tif (n==0)\n\t\t\treturn 10; \n\t\t\tif (n==1)\n\t\t\treturn 20;\n\t\t\tif (n==2)\n\t\t\treturn 30;\n\t\t\t\n\t\t\treturn recursiva2(n-1) + recursiva2 (n-2) * recursiva2 (n-3); \n\t\t}", "private static void traverse(int i, int j) {\r\n\t\tif(i + j == SIZE + SIZE){\r\n\t\t\tCOUNT++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(i < SIZE){\r\n\t\t\ttraverse(i + 1, j);\r\n\t\t}\r\n\t\tif(j < SIZE){\r\n\t\t\ttraverse(i, j + 1);\r\n\t\t}\r\n\t}", "Iterable<DirectedEdge> pathTo(int v)\n\t{\n\t\tStack<DirectedEdge> path=new Stack<>();\n\t\tfor(DirectedEdge e=edgeTo[v]; e!=null; e=edgeTo[e.from()])\n\t\t{\n\t\t\tpath.push(e);\n\t\t}\n\t\treturn path;\n\t}", "private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}", "public void inOrden(nodoArbolAVL r){\n if(r != null){\n inOrden(r.hijoIzquierdo);\n System.out.print (r.dato + \" , \");\n inOrden(r.hijoDerecho);\n \n } \n }", "public int succ(int v, int i) {\n\t\treturn graph[v][i];\n\t}", "static void PrintRecorrido(int ini, int fin) {\n\n //System.out.println(\"Recorrido de nodos para llegar de nodo \" + ini + \" a \" + fin);\n List<Integer> path = new ArrayList<Integer>();\n int total=0;\n for (;;) { //infinite loop\n\n path.add(fin);\n if (prev[fin] == -1) {//si se llegó al inicio\n break;\n }\n total+=pesos[fin];//va sumando los pesos \n fin = prev[fin]; //\n }\n\n for (int i = path.size() - 1, k = 0; i >= 0; --i) {//se recorre de atrás para adelante printing los valores\n if (k != 0) {\n System.out.print(\" \");\n }\n System.out.print(path.get(i));//muestra el valor en posicion i (ultimo)\n k = 1;\n }\n System.out.print(\" Total:\"+total);\n System.out.println();\n }", "private Paths sap(int v, int w) {\n validate(v);\n validate(w);\n BreadthFirstDirectedPaths fromV = new BreadthFirstDirectedPaths(this.G, v);\n BreadthFirstDirectedPaths fromW = new BreadthFirstDirectedPaths(this.G, w);\n return processPaths(fromV, fromW);\n }", "private int find(int z, int[] parent) {\n if(parent[z] == -1) {\n return z;\n }\n // System.out.println(parent[z]+\" \"+ z);\n parent[z] = find(parent[z], parent);\n\n return parent[z];\n }", "public void backTrack (){\n LinkedList<Integer> v = new LinkedList<> (); //Lista de vecinos.\n boolean mover = false;\n int r = 0;\n while (!mover && v.size () < 4){\n r = rnd.nextInt (4);\n\t\t//Hay un vecino disponible.\n\t\t//Nos podemos mover.\n if (vecinoDisponible (r))\n\t\t mover = true;\n if (!v.contains (r))\n v.add (r);\n\t }\n\t if (mover){\n\t\t//Nos movemos a la siguiente dirección.\n\t\ttumbaMuros (r);\n\t\tmoverLaberinto (r);\n\t }else if (!p.empty ()){\n\t\t//Nos movemos a la celda previa\n\t\t//pues no hay vecnos a los que movernos\n\t\tCelda a = p.pop ();\n\t\tt.posY = a.celdaY;\n\t\tt.posX = a.celdaX; \n\t }\n \n terminado = p.isEmpty();\n\t}", "public void allPaths(int v1, int v2, int x)\n {\n \tboolean[] visited = new boolean[V];\n \tArrayList<DirectedEdge> paths = new ArrayList<>(V);\n \td = 0;\n \tif(online[v1] == false || online[v2] == false)\n \t{\n \t\tSystem.out.println(\"One or more vertices are down\");\n \t\treturn;\n \t}\n \trecursivePaths(v1,v2,x,visited,paths, 0);\n \tSystem.out.println(\"\\n\\n\");\n }", "public ArrayList<Integer> path(int startVertex, int stopVertex) {\n// you supply the body of this method\n int start = startVertex;\n int stop = stopVertex;\n int previous;\n ArrayList<Integer> list = new ArrayList<>();\n HashMap<Integer, Integer> route = new HashMap<>();\n Stack<Integer> visited = new Stack<>();\n Stack<Integer> reverse = new Stack<>();\n int parent;\n if(!pathExists(startVertex,stopVertex)){\n return new ArrayList<Integer>();\n }\n else if(startVertex == stopVertex){\n list.add(startVertex);\n return list;\n }\n else{\n while(!neighbors(start).contains(stopVertex)){\n List neighbor = neighbors(start);\n for (Object a: neighbor) {\n if(!pathExists((int)a,stopVertex)){\n continue;\n }\n if(visited.contains(a)){\n continue;\n }\n else {\n route.put((int) a, start);\n visited.push(start);\n start = (int) a;\n break;\n }\n }\n }\n route.put(stopVertex,start);\n list.add(stopVertex);\n previous = route.get(stopVertex);\n list.add(previous);\n while(previous!=startVertex){\n int temp = route.get(previous);\n list.add(temp);\n previous = temp;\n }\n for(int i=0; i<list.size(); i++){\n reverse.push(list.get(i));\n }\n int i=0;\n while(!reverse.empty()){\n int temp = reverse.pop();\n list.set(i,temp);\n i++;\n }\n//list.add(startVertex);\n return list;\n }\n }", "private int findAllPathsUtil(int s, int t, boolean[] isVisited, List<Integer> localPathList,int numOfPath,LinkedList<Integer>[] parent )\n {\n\n if (t==s) {\n numOfPath++;\n return numOfPath;\n }\n isVisited[t] = true;\n\n for (Integer i : parent[t]) {\n if (!isVisited[i]) {\n localPathList.add(i);\n numOfPath =findAllPathsUtil(s,i , isVisited, localPathList,numOfPath,parent);\n localPathList.remove(i);\n }\n }\n isVisited[t] = false;\n return numOfPath;\n }", "private static Node traverseList(Node n){\n\t if(n == null)\n\t return null;\n\t if(n.visited)\n\t return n;\n\t \n\t n.visited = true;\n\t return traverseList(n.next);\n\t }", "void DFS(int v) {\n\t\t\tboolean visited[] = new boolean[number_of_vertices];\n\t\t\t\n\t\t\t//in case that the vertex are not connected, I need to make DFS for all\n\t\t\t//available vertex and checking before if they are not visited\n\t\t\tfor(int i = 0 ; i < number_of_vertices; i++) {\n\t\t\t\tif(visited[i] == false)\n\t\t\t\t\tDFSUtil(v, visited);\n\t\t\t}\n\t\t}", "static int APUtil(ArrayList<Arista>[] adj, int u, boolean visited[], int disc[], int low[], int parent[], int ap[]){\n\n // Count of children in DFS Tree\n int children = 0;\n\n // Mark the current node as visited\n visited[u] = true;\n\n // Initialize discovery time and low value\n disc[u] = low[u] = ++time;\n\n // Go through all vertices aadjacent to this\n for (Arista arista : adj[u]) {\n int v = arista.to; // v is current adjacent of u\n\n // If v is not visited yet, then make it a child of u\n // in DFS tree and recur for it\n if (!visited[v]) {\n children++;\n parent[v] = u;\n sol = APUtil(adj, v, visited, disc, low, parent, ap);\n\n // Check if the subtree rooted with v has a connection to\n // one of the ancestors of u\n low[u] = Math.min(low[u], low[v]);\n\n // u is an articulation point in following cases\n\n // (1) u is root of DFS tree and has two or more chilren.\n if (parent[u] == -1 && children > 1){\n ap[u]++;\n if((ap[u] > ap[sol]) || (ap[u] == ap[sol] && u < sol))\n sol = u;\n }\n\n\n // (2) If u is not root and low value of one of its child\n // is more than discovery value of u.\n if (parent[u] != -1 && low[v] >= disc[u]){\n ap[u]++;\n if((ap[u] > ap[sol]) || (ap[u] == ap[sol] && u < sol))\n sol = u;\n }\n\n }\n\n // Update low value of u for parent function calls.\n else if (v != parent[u])\n low[u] = Math.min(low[u], disc[v]);\n }\n\n return sol;\n }", "private int dfsInOrderIterativeSol(TreeNode root, int k) {\n // Corner Case\n if (root == null) {\n return 0;\n }\n\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n int countNum = 0;\n\n while (!stack.isEmpty() || node != null) {\n if (node != null) {\n stack.push(node); // just like the recursion\n node = node.left;\n } else {\n TreeNode curNode = stack.pop();\n countNum++;\n if (countNum == k) {\n return curNode.val;\n }\n node = curNode.right;\n }\n }\n return 0;\n\n // // push nodes till the left end\n // while (root != null) {\n // stack.push(root);\n // root = root.left;\n // }\n\n // while (k != 0) {\n // TreeNode curNode = stack.pop();\n // k -= 1;\n // if (k == 0) {\n // return curNode.val;\n // }\n\n // TreeNode rightNode = curNode.right;\n // // push the right node till the left end still!!!\n // while(rightNode != null) {\n // stack.push(rightNode);\n // rightNode = rightNode.left;\n // }\n // }\n\n // return 0; // never hit if k is valid and root is not null\n }", "@Override\n public int indeksTil(T verdi) {\n int indeks=0;\n Node<T> curr= hode;\n for (; curr!=null; curr= curr.neste, indeks++){\n if (curr.verdi.equals(verdi)){\n return indeks;\n\n }// end if\n\n }// end for\n return -1;\n }", "public static <V> void printAllShortestPaths(Graph<V> graph) {\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] pesos = new double[matrizPesos.length][matrizPesos.length];\n V[] vertices = graph.getValuesAsArray();\n V[][] caminos = (V[][]) new Object[matrizPesos.length][matrizPesos.length];\n for (int x = 0; x < matrizPesos.length; x++) {\n for (int y = 0; y < matrizPesos.length; y++) {\n if (x == y) {\n pesos[x][y] = -1;\n } else {\n if (matrizPesos[x][y] == -1) {\n pesos[x][y] = Integer.MAX_VALUE; //Si no existe arista se pone infinito\n } else {\n pesos[x][y] = matrizPesos[x][y];\n }\n }\n caminos[x][y] = vertices[y];\n }\n }\n for (int x = 0; x < vertices.length; x++) { // Para cada uno de los vertices del grafo\n for (int y = 0; y < vertices.length; y++) { // Recorre la fila correspondiente al vertice\n for (int z = 0; z < vertices.length; z++) { //Recorre la columna correspondiente al vertice\n if (y != x && z != x) {\n double tam2 = pesos[y][x];\n double tam1 = pesos[x][z];\n if (pesos[x][z] != -1 && pesos[y][x] != -1) {\n double suma = pesos[x][z] + pesos[y][x];\n if (suma < pesos[y][z]) {\n pesos[y][z] = suma;\n caminos[y][z] = vertices[x];\n }\n }\n }\n }\n }\n }\n\n //Cuando se termina el algoritmo, se imprimen los caminos\n for (int x = 0; x < vertices.length; x++) {\n for (int y = 0; y < vertices.length; y++) {\n boolean seguir = true;\n int it1 = y;\n String hilera = \"\";\n while (seguir) {\n if (it1 != y) {\n hilera = vertices[it1] + \"-\" + hilera;\n } else {\n hilera += vertices[it1];\n }\n if (caminos[x][it1] != vertices[it1]) {\n int m = 0;\n boolean continuar = true;\n while (continuar) {\n if (vertices[m].equals(caminos[x][it1])) {\n it1 = m;\n continuar = false;\n } else {\n m++;\n }\n }\n } else {\n if (x == y) {\n System.out.println(\"El camino entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera);\n } else {\n hilera = vertices[x] + \"-\" + hilera;\n if (pesos[x][y] == Integer.MAX_VALUE) {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera + \" con distancia de: \" + (pesos[x][y]));\n }\n }\n seguir = false;\n }\n }\n }\n System.out.println();\n }\n }", "public Nodo Buscar(Nodo r, int clave){\r\n\t Nodo Aux = null;\r\n\t\tif(r!=null){\r\n\t \tif(r.getClave()==clave){\r\n\t \t\tAux = r;\r\n\t \t}\r\n\t \telse{\r\n\t Aux = Buscar(r.getRight(),clave);\r\n\t if(Aux==null)\r\n\t Aux = Buscar(r.getLeft(),clave);\r\n\t }\r\n\t \t\r\n\t }\r\n\t return Aux;\r\n\t}", "private List<Valuable> helper(double amount, List<Valuable> money) {\n if(money.size() == 0) return null;\n Valuable current = money.get(0);\n if(amount >= current.getValue()) {\n if(amount - current.getValue() == 0) return new ArrayList<Valuable>(money.subList(1,money.size()));\n List<Valuable> tempList;\n if(( tempList=helper(amount-current.getValue(),money.subList(1,money.size())) ) != null ) {\n return tempList;\n }\n }\n List<Valuable> returnList = helper(amount,money.subList(1,money.size()));\n if(returnList != null) returnList.add(current);\n return returnList;\n }", "public void continueTraversing(Graph<VLabel, ELabel>.Vertex v) {\n if (_curTraversal.equals(\"dfs\")) {\n try {\n depthHelper(_graph, v, _marked, false);\n } catch (StopException e) {\n return;\n }\n _finalVertex = null;\n } else if (_curTraversal.equals(\"gt\")) {\n traverseHelper(v);\n } else if (_curTraversal.equals(\"bft\")) {\n breadthHelper(v);\n }\n }", "@Override\n public ArrayList<ArrayList<String>> getNeighborhood(ArrayList<String> point, double argument1, double argument2) {\n ArrayList<ArrayList<String>> neighborhood = new ArrayList<>();\n String[] moves = {\"U\", \"D\", \"L\", \"R\"};\n if(point.size() == 0){\n point.add(moves[(int)(Math.random()*4)]);\n }\n\n //kazde rozwiązanie powstaje przez wstawienie każdego ruchu w środku ścieżki\n for(int i = 0; i<point.size(); i++){\n for(String move : moves){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.add(i, move);\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n for(String move : moves){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.add(i, move);\n newPath.add(i, move);\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n }\n\n //kazde rozwiązanie powstaje przez usunięcie jednego elementu\n for(int i=0; i<point.size(); i++){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.remove(i);\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n\n //kazde rozwiązanie powstaje przez swapowanie wszystkich z losowym\n int random = (int)(Math.random()*point.size());\n for(int i=0; i<point.size(); i++){\n ArrayList<String> newPath = arrayListDeepCopy(point);\n newPath.set(i, point.get(random));\n newPath.set(random, point.get(i));\n newPath = cleanUpPath(newPath);\n if(testFunction.check(newPath)) neighborhood.add(newPath);\n }\n\n //System.out.println(neighborhood.size());\n\n ArrayList<ArrayList<String>> newNeighborhood = new ArrayList<>();\n for (int i = 0; i < neighborhood.size(); i++) {\n newNeighborhood.add(shortenPath(neighborhood.get(i)));\n }\n\n return newNeighborhood;\n }", "static void inorderTraversal(Node tmp)\n {\n if(tmp!=null) {\n inorderTraversal(tmp.left);\n System.out.print(tmp.val+\" \");\n inorderTraversal(tmp.right);\n }\n \n \n \n }", "public void inOrden(Nodo r){\n if(r != null){\n inOrden(r.hijoIzquierdo);\n System.out.println(r.valor);\n inOrden(r.hijoDerecho);\n }\n }", "@Override public T next(){\n Vertice v = pila.saca();\n T e = v.elemento;\n v = v.derecho;\n while (v != null) {\n pila.mete(v);\n v = v.izquierdo;\n }\n\t\treturn e;\n }", "private int method2(TreeNode root, int k) {\n result = root.val;\n count = 0;\n inorder(root, k);\n return result;\n }", "public Item recursivHelper(StuffNode x, int index) {\n if (index == 0) {\n return x.item;\n } else {\n return recursivHelper(x.next, index-1);\n }\n }", "private void recInOrderTraversal(BSTNode<T> node) {\n\t\tif (node != null) {\n\t\t\trecInOrderTraversal(node.getLeft());\n\t\t\ta.add(node.getData());\n\t\t\trecInOrderTraversal(node.getRight());\n\t\t}\n\t}", "private static int helper(TreeNode root, TreeNode p, TreeNode q, List<TreeNode> ans) {\n if (root == null)\n return 0;\n int sum = 0;\n if (root.val == p.val || root.val == q.val)\n ++sum;\n int leftSum = helper(root.left, p, q, ans);\n int rightSum = helper(root.right, p, q, ans);\n sum += leftSum + rightSum;\n if (sum == 2 && leftSum < 2 && rightSum < 2)\n ans.add(root);\n return sum;\n }", "public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }", "public List<MapPoint> buildPath(MapPoint point) { // Palauttaa polun alusta loppuun listana.\n List<MapPoint> finalPath = new ArrayList<>();\n MapPoint tempPoint = point;\n while (true) {\n finalPath.add(0, tempPoint);\n \n if (!tempPoint.hasPrevious()) {\n break;\n }\n tempPoint = tempPoint.getPrevious();\n }\n return finalPath; \n }", "private static void depthFirstSearch(Vertex v, ArrayList<Vertex> visitedArrayList, Graph graph){\n visitedArrayList.add(v);\n Iterator<Vertex> iter=graph.getNeighbors(v).iterator();\n while (iter.hasNext()){\n Vertex v1=iter.next();\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n for(Vertex v1 : graph.getNeighbors(v)){\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n }", "public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }", "public void pagarFerrovia(int credor, int devedor, int valor, String NomePopriedade) {\n\n Jogador JogadorDevedor = listaJogadores.get(devedor);\n Jogador JogadorCredor = listaJogadores.get(credor);\n if ((NomePopriedade.equals(\"Reading Railroad\")) ||\n (NomePopriedade.equals(\"Pennsylvania Railroad\")) ||\n (NomePopriedade.equals(\"B & O Railroad\")) ||\n (NomePopriedade.equals(\"Short Line Railroad\"))) {\n int quantidadeFerrovias = DonosFerrovias[credor];\n int divida = quantidadeFerrovias * valor;\n this.print(\"Credor tem \" + quantidadeFerrovias);\n this.print(\"Divida eh \" + divida);\n\n if (listaJogadores.get(devedor).getDinheiro() >= divida) {\n JogadorDevedor.retirarDinheiro(divida);\n JogadorCredor.addDinheiro(divida);\n this.print(\"aqui\");\n\n } else {\n int DinheiroRestante = listaJogadores.get(devedor).getDinheiro();\n JogadorDevedor.retirarDinheiro(DinheiroRestante);\n\n if(bankruptcy);\n\n else\n JogadorCredor.addDinheiro(DinheiroRestante);\n this.removePlayer(devedor);\n\n }\n\n }\n }", "private int parent(int i){return (i-1)/2;}", "public static String BFS(Graph grafo, Vertice vertice) {\r\n\t\tArrayList<Integer> busca = new ArrayList<Integer>(); // vertice nivel pai em ordem de descoberta\r\n\t\tArrayList<Vertice> aux1 = new ArrayList<Vertice>(); // fila de nos pais a serem visitados\r\n\t\tArrayList<Vertice> aux2 = new ArrayList<Vertice>(); // fila de nos filhos a serem visitdados\r\n\r\n\t\tint nivel = 0;\r\n\r\n\t\taux1.add(vertice);// adiciona a raiz a aux1 para inicio da iteracao\r\n\t\tvertice.setPai(0);// seta o pai da raiz para zero\r\n\r\n\t\twhile (aux1.size() > 0) {\r\n\t\t\tfor (int i = 0; i < aux1.size(); i++) {\r\n\t\t\t\tif (aux1.get(i).statusVertice() == false) {// verifrifica se o no ja nao foi atingido por outra ramificacao.\r\n\t\t\t\t\tbusca.add(aux1.get(i).getValor());\r\n\t\t\t\t\tbusca.add(nivel);\r\n\t\t\t\t\tbusca.add(aux1.get(i).getPai());\r\n\t\t\t\t\tvertice.alteraStatusVertice(true);\r\n\r\n\t\t\t\t\tfor (int j = 0; i < vertice.getArestas().size(); j++) {\r\n\t\t\t\t\t\tproxVertice(vertice, vertice.getArestas().get(j)).setPai(aux1.get(i).getValor());// associa o no pai\r\n\t\t\t\t\t\taux2.add(proxVertice(vertice, vertice.getArestas().get(j)));// adiciona lista dos proximos nos filhos serem percorridos\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\taux1 = aux2; // todos os nos pai ja foram percoridos, filhos se tornam a lista de nos pai\r\n\t\t\t\t\taux2.clear(); // lista de nos filhos e esvaziada para o proximo ciclo de iteracoes\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tnivel++;\r\n\t\t}\r\n\r\n\t\tresetStatusVertex(grafo);\r\n\r\n\t\treturn criaStringDeSaida(grafo, busca);// formata o resutltado da busca para a string esperada\r\n\t}" ]
[ "0.61936516", "0.60124797", "0.59655374", "0.5846534", "0.580988", "0.5794453", "0.57690585", "0.5739529", "0.5717465", "0.57102996", "0.56445706", "0.5620698", "0.5578039", "0.5541549", "0.5539068", "0.55243146", "0.5498197", "0.5494103", "0.5473808", "0.5465521", "0.5414829", "0.5404527", "0.5374991", "0.53637266", "0.5355679", "0.53502995", "0.5347415", "0.5336549", "0.53355026", "0.5327265", "0.5314559", "0.53011173", "0.5292612", "0.52874935", "0.5280967", "0.5279992", "0.527237", "0.5271104", "0.52668047", "0.5227633", "0.5214944", "0.5210148", "0.5194421", "0.5194161", "0.5183523", "0.51797473", "0.5174043", "0.51709074", "0.51663977", "0.5163027", "0.5160975", "0.51440996", "0.51419115", "0.5139921", "0.5129347", "0.51229674", "0.5120672", "0.511764", "0.51140004", "0.5107337", "0.5104891", "0.5104355", "0.5102626", "0.5100686", "0.5091162", "0.5088672", "0.50815225", "0.5080367", "0.5079112", "0.5078825", "0.50745916", "0.507212", "0.50719297", "0.5062794", "0.50537604", "0.50397277", "0.5022131", "0.50085825", "0.5006598", "0.5005932", "0.5003059", "0.50022095", "0.50003505", "0.5000237", "0.49988052", "0.49981198", "0.4997796", "0.49969348", "0.49928272", "0.49865735", "0.49843517", "0.49837688", "0.49799734", "0.4957885", "0.49566737", "0.49545625", "0.49498925", "0.4948761", "0.49476784", "0.49333793" ]
0.5786491
6
/ A student can get and set their id as well as generate their answers to a question, given a string of options and whether or not the question is MC or SC.
public interface IStudent { public String getId(); public void setId(String i); public List<Integer> generateAnswers(List<String> options, boolean multi); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSingleChoices() {\r\n Random randomGenerator = new Random();\r\n int singleAnswer = randomGenerator.nextInt(4);\r\n studentAnswer.add(singleAnswer); }", "public abstract String promptSelectionFromAnswers(final String question, final List<String> answers) throws JVMIOException;", "public void createQuestion(int sid,int qid,String qtype,String qtitle,String answer_a,String answer_b,String answer_c,String answer_d);", "public void setIdQuestion(int idT) {\r\n idQuestion=rand(idT);\r\n }", "public void setSecurity_question(String security_question);", "public void setSecurity_answer(String security_answer);", "public MAidQuestion(String s) {\n\t\tScanner sc = new Scanner(s);\n\t\tSystem.err.println(\"s: \"+s);\n //test if there is an integer\n\t\ttry {\n\t\t\tsc.nextInt();\n\t\t\tsc.next();\n\t\t} catch (Exception e) {\n\t\t\tsc.next();\n\t\t}\n\t\t\n //tests if there is one and only one question mark\n\t\ts = \"\";\n\t\twhile (sc.hasNextLine()){\n\t\t\ts = s+sc.nextLine().trim()+\" \";\n\t\t}\n\t\ts = s.trim();\n\t\tint lq = s.lastIndexOf('?');\n\t\tint fq = s.indexOf('?');\n\t\tif (fq != lq){\n\t\t\tSystem.out.println(\"bad question:\\n\"+s);\n\t\t\treturn;\n\t\t}\n \n\t\tquestion = s.substring(0,lq+1);\n\t\t//validate the answer\n s = s.substring(lq+1).trim();\n\t\tSystem.out.println(\"ans s: \"+s);\n\t\tint f_ = s.indexOf('_');\n\t\ts = s.substring(0,f_);\n\t\tsc = new Scanner(s);\n\t\tString numS = Util.dollarProcess(sc.next()); //process currency quantity\n\t\ttry {\n\t\t\tanswerNum = Double.parseDouble(numS); //gets answer as a number if possible\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tgoodQ = false; //if we can't represent the answer as a number, badness results\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tanswerObj = sc.nextLine();\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t}\n\t\t\n\t\tif (sc.hasNext()){\n\t\t\tSystem.out.println(\"bad end \"+question+\" \"+answerNum);\n\t\t\tgoodQ = false;\n\t\t}\n\t\tgoodQ = true;\n\t}", "public static void sitExam(int stuId) {\n ExamService examService = new ExamServiceImpl();\n Scanner sc = new Scanner(System.in);\n\n int testId;\n while (true) {\n System.out.print(\"Please input the test ID: \");\n try {\n String input = sc.nextLine().trim();\n if (input.length() == 6) {\n testId = Integer.parseInt(input);\n break;\n }\n } catch (NumberFormatException ignored) {\n }\n System.out.println(\"The id should be 6 digits!\");\n }\n\n List<Question> allQuestion = examService.sitExam(stuId, testId);\n LoggerUtil.addLog(\"[Student \" + stuId + \"] take exam \" + testId);\n\n for (Question q : allQuestion) {\n if (isTimeUp(testId) == true) {\n System.out.println(\"Exam ended, please wait us upload your answer...\");\n AutoJudgeService autoJudgeService = new AutoJudgeServiceImpl();\n autoJudgeService.judgeAnExam(testId);\n break;\n }\n System.out.printf(\"QNo:%d Type:%s, Complsory:%s Score:%d \\n\", q.getqNo(), q.getType(), q.getCompulsory(),\n q.getScore());\n System.out.println(\"****************************************\");\n System.out.println(q.getqDescri());\n System.out.println(\"****************************************\");\n\n String answer;\n while (true) {\n System.out.printf(\"Input your answer(in one line): \");\n answer = sc.nextLine();\n\n boolean nextQustion = false;\n while (true) {\n System.out.println(\"Next question?(Y/N)\");\n String op = sc.nextLine().trim().toUpperCase();\n if (op.equals(\"Y\"))\n nextQustion = true;\n else if (!op.equals(\"N\"))\n continue;\n break;\n }\n if (nextQustion) {\n break;\n }\n }\n examService.answerAnQuestion(q, stuId, answer);\n }\n\n while (true) {\n System.out.println(\"You have answered all question, submit now?(Y/N)\");\n String op = sc.nextLine().trim().toUpperCase();\n if (op.equals(\"Y\")) {\n AutoJudgeService autoJudgeService = new AutoJudgeServiceImpl();\n autoJudgeService.judgeAnExam(testId);\n break;\n }\n }\n }", "public void setAnswer(MCQChoice answer)\n\t{\n\t\tmcqAnswer = answer;\n\t}", "public void saveQuestion(){\n\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString setAnswerBox = Integer.toString(numAnswers);\n\n\t\ttestGenerator.setQuestionText(questionNo, ques.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 1, ans1.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 2, ans2.getText());\n\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 1, answer1.isSelected());\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 2, answer2.isSelected());\n\n\t\tif((setAnswerBox.equals(\"3\")) || setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 3, ans3.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 3, answer3.isSelected());\n\t\t}\n\n\t\tif(setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 4, ans4.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 4, answer4.isSelected());\n\t\t}\n\t}", "public void submitAnswer(String question, ArrayList<Integer> choices) {\r\n Question currentQuestion = new Question(question, choices);\r\n\r\n // 6 options, multiple answers\r\n if (currentQuestion.getSize() == 6) {\r\n setMultChoices();\r\n System.out.println(studentID + \" : \" + studentAnswer);\r\n }\r\n // 4 options, only accept single answer\r\n else if (currentQuestion.getSize() == 4){\r\n setSingleChoices();\r\n System.out.println(studentID + \" : \" + studentAnswer);\r\n }\r\n // 2 options, either true or false answer\r\n else {\r\n setTFChoices();\r\n System.out.println(studentID + \" : \" + studentAnswer);\r\n }\r\n\r\n // jump to changeAnswers to check if student wants to change answer\r\n changeAnswers(question, choices);\r\n }", "public String singleSelect() throws IOException{\n\t\t int count = 0;\t\t\t\t\t\t// count variable is used for count lines in file\n\t\t Fin = new FileReader(\"Survey.txt\");// to read form text file\n\t\t \n\t\t bufferReader = new BufferedReader(Fin);\t// take contents of file in bufferReader\n\t\t\n\t\t String[] questionArray = new String[6];\n\t\t while( count != 6 ) \t\t // starting 6 lines of files contains data for single select question. so it reads only six line\n\t\t {\n\t\t\t\n\t\t\t String line = bufferReader.readLine();\n\t\t\t System.out.println(line);\n\t\t\t questionArray[count] = line;\t// questionArray holds sentence with its option of single select question\n\t\t\t \n\t\t\t count++;\n\t\t }\n\t\t int flag = 0;\n\t\t String answer = new String();\t// string ans which holds the resultant option given by the user\n while( flag == 0 )\n {\n \t answer = sc.nextLine();\n \n\t for( int i=1; i<6; i++ )\n\t {\n\t if( questionArray[i].equals(answer) )\t// check whether user select answer is available or not\n\t {\n\t \t flag = 1;\t\t\t\t\t// if yes than make flag=1\n\t \t break;\n\t }\n\t }\n\t if( flag == 0 )\n\t {\n\t System.out.println(\"Enter Valid ans\");\t // otherwise continue the loop until answer is valid\n\t \n\t }\n }\n return answer;\t\t\t// return output\n\t }", "public interface Question {\n public String question();\n public String answer();\n public void setQuestion(String q);\n public void setAnswer(String a);\n public boolean isMultipleChoice();\n}", "public void setQuestion(){\n\n\n triggerReport(); //Check if max questions are displayed, if yes then show report\n\n MyDatabase db = new MyDatabase(QuizCorner.this);\n Cursor words = db.getQuizQuestion();\n TextView question_text = (TextView) findViewById(R.id.question_text);\n RadioButton rb;\n resetOptions();\n disableCheck();\n enableRadioButtons();\n hideAnswer();\n words.moveToFirst();\n word = words.getString(words.getColumnIndex(\"word\"));\n correct_answer = words.getString(words.getColumnIndex(\"meaning\"));\n question_text.setText(word + \" means:\");\n for (int i = 0; i < 4; i++){\n answers[i] = words.getString(words.getColumnIndex(\"meaning\"));\n words.moveToNext();\n }\n answers = randomizeArray(answers);\n for (int i = 0; i < 4; i++){\n rb = (RadioButton) findViewById(options[i]);\n rb.setText(answers[i]);\n }\n question_displayed_count++;\n }", "public AnswerOption(long optionId) {\n this.optionId = optionId;\n this.database = new DBAccess();\n\n try {\n populateFromDatabase();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String generateQuestion(){\r\n qType = rand.nextInt(2);\r\n if (qType ==0)\r\n return \"Multiple choice question.\";\r\n else\r\n return \"Single choice question.\";\r\n }", "private void optionsSelect() {\n switch (currentQueNum) {\n case 1:\n ans1Option();\n break;\n case 2:\n ans2Option();\n break;\n case 3:\n ans3Option();\n break;\n case 4:\n ans4Option();\n break;\n case 5:\n ans5Option();\n break;\n case 6:\n ans6Option();\n break;\n case 7:\n ans7Option();\n break;\n case 8:\n ans8Option();\n break;\n case 9:\n ans9Option();\n break;\n case 10:\n ans10Option();\n break;\n }\n }", "public AssistantJack(int answerSet) {\n\t\tthis();\n\t\tif(answerSet == 1) {\n\t\t\tthis.correctTheory = new Theory(1,1,1);\n\t\t}\n\t\telse if (answerSet == 2) {\n\t\t\tthis.correctTheory = new Theory(6, 10, 6);\n\t\t}\n\t\telse {\n\t\t\tRandom random = new Random();\n\t\t\tint weapon = random.nextInt(6) + 1;\n\t\t\tint location = random.nextInt(10) + 1;\n\t\t\tint person = random.nextInt(6) + 1;\n\t\t\tthis.correctTheory = new Theory(weapon, location, person);\n\t\t}\n\t}", "private void setAnswers(HttpServletRequest request, SectionInstanceDto currentSection,\r\n\t\t\tQuestionInstanceDto currentQuestion, String questionMapperId, Boolean calledFromSubmit) {\r\n\t\tList<SectionInstanceDto> sectionInstanceDtos = (List<SectionInstanceDto>) request.getSession()\r\n\t\t\t\t.getAttribute(\"sectionInstanceDtos\");\r\n\t\tfor (SectionInstanceDto sectionInstanceDto : sectionInstanceDtos) {\r\n\t\t\tif (sectionInstanceDto.getSection().getSectionName()\r\n\t\t\t\t\t.equals(currentSection.getSection().getSectionName())) {\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Get the corresponding Question from section from the session object\r\n\t\t\t\t */\r\n\t\t\t\tfor (QuestionInstanceDto questionInstanceDto : currentSection.getQuestionInstanceDtos()) {\r\n\r\n\t\t\t\t\tif (questionInstanceDto.getQuestionMapperInstance().getQuestionMapper().getId()\r\n\t\t\t\t\t\t\t.equals(Long.valueOf(questionMapperId))) {\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Add code for evaluating coding engine Q\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tif (questionInstanceDto.getQuestionMapperInstance().getQuestionMapper()\r\n\t\t\t\t\t\t\t\t.getQuestion().getQuestionType() == null) {\r\n\t\t\t\t\t\t\tquestionInstanceDto.getQuestionMapperInstance().getQuestionMapper()\r\n\t\t\t\t\t\t\t\t\t.getQuestion().setQuestionType(QuestionType.MCQ);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString type = questionInstanceDto.getQuestionMapperInstance().getQuestionMapper()\r\n\t\t\t\t\t\t\t\t.getQuestion().getQuestionType().getType();\r\n\t\t\t\t\t\tQuestion q = questionInstanceDto.getQuestionMapperInstance().getQuestionMapper()\r\n\t\t\t\t\t\t\t\t.getQuestion();\r\n\t\t\t\t\t\tif (type != null && type.equals(QuestionType.CODING.getType())) {\r\n\t\t\t\t\t\t\tevaluateCodingAnswer(currentQuestion, questionInstanceDto);// here\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// questionInstanceDto\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// updated\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// compilation\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// results\r\n\t\t\t\t\t\t\tsectionInstanceDto.setQuestionInstanceDtos(\r\n\t\t\t\t\t\t\t\t\tcurrentSection.getQuestionInstanceDtos());\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * End Add code for evaluating coding engine Q\r\n\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\t\tString userChoices = \"\";\r\n\t\t\t\t\t\tif (currentQuestion.getOne()) {\r\n\t\t\t\t\t\t\tuserChoices = \"Choice 1\";\r\n\t\t\t\t\t\t\tquestionInstanceDto.setOne(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tquestionInstanceDto.setOne(false);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (currentQuestion.getTwo()) {\r\n\t\t\t\t\t\t\tif (userChoices.length() > 0) {\r\n\t\t\t\t\t\t\t\tuserChoices += \"-Choice 2\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setTwo(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tuserChoices = \"Choice 2\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setTwo(true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tquestionInstanceDto.setTwo(false);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (currentQuestion.getThree()) {\r\n\t\t\t\t\t\t\tif (userChoices.length() > 0) {\r\n\t\t\t\t\t\t\t\tuserChoices += \"-Choice 3\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setThree(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tuserChoices = \"Choice 3\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setThree(true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tquestionInstanceDto.setThree(false);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (currentQuestion.getFour()) {\r\n\t\t\t\t\t\t\tif (userChoices.length() > 0) {\r\n\t\t\t\t\t\t\t\tuserChoices += \"-Choice 4\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setFour(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tuserChoices = \"Choice 4\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setFour(true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tquestionInstanceDto.setFour(false);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (currentQuestion.getFive()) {\r\n\t\t\t\t\t\t\tif (userChoices.length() > 0) {\r\n\t\t\t\t\t\t\t\tuserChoices += \"-Choice 5\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setFive(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tuserChoices = \"Choice 5\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setFive(true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tquestionInstanceDto.setFive(false);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (currentQuestion.getSix()) {\r\n\t\t\t\t\t\t\tif (userChoices.length() > 0) {\r\n\t\t\t\t\t\t\t\tuserChoices += \"-Choice 6\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setSix(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tuserChoices = \"Choice 6\";\r\n\t\t\t\t\t\t\t\tquestionInstanceDto.setSix(true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tquestionInstanceDto.setSix(false);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tquestionInstanceDto.getQuestionMapperInstance().setUserChoices(userChoices);\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Confidence based assessment\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tquestionInstanceDto.getQuestionMapperInstance()\r\n\t\t\t\t\t\t\t\t.setConfidence(currentQuestion.getConfidence());\r\n\t\t\t\t\t\tquestionInstanceDto.setConfidence(currentQuestion.getConfidence());\r\n\t\t\t\t\t\tquestionInstanceDto.setRadioAnswer(currentQuestion.getRadioAnswer());\r\n\t\t\t\t\t\tsectionInstanceDto.setQuestionInstanceDtos(\r\n\t\t\t\t\t\t\t\tcurrentSection.getQuestionInstanceDtos());\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}\r\n\t\t}\r\n\t}", "public AnswerRecord(Integer id, Integer seq, String answer, String correctText, String incorrectText, String selectedText, Boolean isCorrect, Integer questionId) {\n super(Answer.ANSWER);\n\n set(0, id);\n set(1, seq);\n set(2, answer);\n set(3, correctText);\n set(4, incorrectText);\n set(5, selectedText);\n set(6, isCorrect);\n set(7, questionId);\n }", "public void setMultChoices() {\r\n Random randomGenerator = new Random();\r\n int howManyAnswer = randomGenerator.nextInt(6) + 1;\r\n for (int i = 0; i < howManyAnswer; i++) {\r\n int multipleAnswer = randomGenerator.nextInt(6);\r\n checkDuplicate(studentAnswer, multipleAnswer);\r\n\r\n }\r\n }", "private void setquestion() {\n qinit();\n question_count++;\n\n if (modeflag == 3) {\n modetag = (int) (Math.random() * 3);\n } else {\n modetag = modeflag;\n }\n\n WordingIO trueword = new WordingIO(vocabulary);\n\n if (modetag == 0) {\n\n MCmode(trueword);\n }\n\n if (modetag == 1) {\n BFmode(trueword);\n }\n\n if (modetag == 2) {\n TLmode(trueword);\n }\n\n if (time_limit != 0) {\n timingtoanswer(time_limit, jLabel2, answer_temp, jLabel5, jLabel6, jButton1);\n }\n }", "private void updateQuestion()//update the question each time\n\t{\n\t\tInteger num = random.nextInt(20);\n\t\tcurrentAminoAcid = FULL_NAMES[num];\n\t\tcurrentShortAA= SHORT_NAMES[num];\n\t\tquestionField.setText(\"What is the ONE letter name for:\");\n\t\taminoacid.setText(currentAminoAcid);\n\t\tanswerField.setText(\"\");\n\t\tvalidate();\n\t}", "public abstract void generateQuestion();", "Question(String ques, String opt1, String opt2, String opt3, String opt4) {\n this.ques = ques;\n this.opt1 = opt1;\n this.opt2 = opt2;\n this.opt3 = opt3;\n this.opt4 = opt4;\n }", "public abstract String chooseAnswer();", "private void setQuestion(int resID){\n questionView.setText(resID);\n ecaFragment.sendToECAToSpeak(getResources().getString(resID));\n }", "public void setIdQuestion(int value) {\n this.idQuestion = value;\n }", "public void setTFChoices() {\r\n Random randomGenerator = new Random();\r\n int trueFalseAnswer = randomGenerator.nextInt(2);\r\n studentAnswer.add(trueFalseAnswer);\r\n }", "public static void main(){\n \n \n String question = \"There are 10 types of people in this world, those who understand binary and those who don't.\";\n String answer = \"true\";\n \n Question tfQuest = new Question (question, answer);\n tfQuest.getAnswer();\n \n }", "private static boolean setStudentInput(int i, String value, StudentDetails student){\n\t\tswitch (i){\n\t\tcase 0:\n\t\t\tif(Integer.parseInt(value) < 1){//checks if value for student Id is < 1. Students cannot have Id numbers less than 1.\n\t\t\t\tSystem.out.println(\"ERROR: Invalid Student Id! Student Id cannot be less than 1.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tstudent.setId(Integer.parseInt(value));\n\t\t\treturn true;\n\t\tcase 1:\n\t\t\treturn student.setFirstName(value); //returns false if name input was invalid\n\t\tcase 2:\n\t\t\treturn student.setMiddleName(value); //returns false if name input was invalid\n\t\tcase 3:\n\t\t\treturn student.setLastName(value); //returns false if name input was invalid\n\t\tcase 4:\n\t\t\treturn student.setGrade(Integer.parseInt(value)); //returns false if grade input was invalid\t\t\t\n\t\tcase 5:\n\t\t\t/*check if bookId exists. If bookId exists set student's bookIdBorrowed property to bookId. If student has\n\t\t\tnot borrowed a book, then bookId borrowed should be 0.*/\n\t\t\tif(ALL_BOOKS.containsKey(Integer.parseInt(value)) || Integer.parseInt(value) == 0){\n\t\t\t\tstudent.setBookIdBorrowed(Integer.parseInt(value));\n\t\t\t\treturn true; //indicates no error was encountered when setting bookIdBorrowed\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"ERROR: BookId does not exist!\");\n\t\t\t\treturn false; //indicates error setting bookIdBorrowed\n\t\t\t}\n\t\tcase 6:\n\t\t\tstudent.setTotalFine(Double.parseDouble(value));\n\t\t\treturn true;\n\t\tdefault: //error input, a student can only have up to 7 fields\n\t\t\tSystem.out.println(\"Invalid Property\");\n\t\t\treturn false;\n\t\t}\t\n\t}", "private void generateNewQuestion() {\n GameManager gameManager = new GameManager();\n long previousQuestionId = -1;\n try {\n previousQuestionId = mGameModel.getQuestion().getId();\n } catch (NullPointerException e) {\n previousQuestionId = -1;\n }\n mGameModel.setQuestion(gameManager.generateRandomQuestion(previousQuestionId));\n mGameModel.getGameMaster().setDidPlayerAnswer(false);\n mGameModel.getGameMaster().setPlayerAnswerCorrect(false);\n mGameModel.getGameSlave().setDidPlayerAnswer(false);\n mGameModel.getGameSlave().setPlayerAnswerCorrect(false);\n LOGD(TAG, \"New question generated\");\n }", "private void setAnswer() {\n DbHelper dbhelper = new DbHelper(context);\n questionNo = questionNo + 1;\n QuizAnswer answer = new QuizAnswer();\n answer.setQuizId(quizId);\n answer.setQuestionId(questionId);\n int optionId = shareprefs.getInt(\"optionId\", 0);\n answer.setOptionId(optionId);\n int correctAns = shareprefs.getInt(\"correctAns\", 0);\n answer.setAnswer(correctAns);\n answer.setContentId(contentId);\n boolean flage = dbhelper.upsertQuizAnswerEntity(answer);\n if (flage) {\n shareprefs.edit().clear().commit();//clear select OptionPreferences\n setValue();\n }\n }", "private String choose_among_the_subjects_offered(){\n String subject;\n \n System.out.println(\"************************************************\");\n System.out.println(\"The Subjects offered are:-\");\n System.out.println(\"OOP\\nDE\\nDSA\");\n System.out.println(\"************************************************\");\n \n //Asking user for his/her choice of Subject.\n System.out.println(\"Enter the one of the Subject from above whose Quiz you want to take.\");\n subject=input.nextLine().toUpperCase();\n while(true){\n try{\n \n subject=input.nextLine().toUpperCase();\n break;\n }catch(InputMismatchException e){\n System.out.println(\"Invalid Input. Please Enter your choice again.\");\n input.nextLine();\n }\n }\n\n switch(subject){\n case \"OOP\":\n case \"DE\":\n case \"DSA\":\n break;\n default:\n System.out.println(\"You entered a wrong choice of Subject.\");\n subject=choose_among_the_subjects_offered();\n\n }\n\n return subject;\n }", "public Question(String question, String[] options, String correctAnswer, String type) {\r\n this.question = question;\r\n this.correctAnswer = correctAnswer;\r\n this.type = \"Multiple Choice\";\r\n this.options = options;\r\n }", "public void answer(Properties answers) {\n/* 56 */ setAnswer(answers);\n/* 57 */ QuestionParser.parseManageAllianceQuestion(this);\n/* */ }", "public void setQuestion(){\n txt_question.setText(arrayList.get(quesAttempted).getQuestion());\n txt_optionA.setText(arrayList.get(quesAttempted).getOptionA());\n txt_optionB.setText(arrayList.get(quesAttempted).getOptionB());\n txt_optionC.setText(arrayList.get(quesAttempted).getOptionC());\n txt_optionD.setText(arrayList.get(quesAttempted).getOptionD());\n txt_que_count.setText(\"Que: \"+(quesAttempted+1)+\"/\"+totalQues);\n txt_score.setText(\"Score: \"+setScore);\n }", "public void questionGenerator()\n\t{\n\t\t//creates questions\n\t\toperation = rand.nextInt(3) + min;\n\t\t\n\t\t//makes max # 10 to make it easier for user if random generator picks multiplication problem\n\t\tif (operation == 3)\n\t\t\tmax = 10; \n\t\t\n\t\t//sets random for number1 & number2\n\t\tnumber1 = rand.nextInt(max) + min; //random number max and min\n\t\tnumber2 = rand.nextInt(max) + min; \n\t\t\t\t\n\t\t//ensures final answer of problem is not negative by switching #'s if random generator picks subtraction problem\n\t\tif (operation == 2 && number1 < number2)\n\t\t{\n\t\t\tint tempNum = number1;\n\t\t\tnumber1 = number2;\n\t\t\tnumber2 = tempNum;\n\t\t}\n\t\tanswer = 0;\n\t\t\n\t\t//randomizes operator to randomize question types\n\t\tif (operation == 1)\n\t\t{\n\t\t\toperator = '+';\n\t\t\tanswer = number1 + number2;\n\t\t}\n\t\tif (operation == 2)\n\t\t{\n\t\t\toperator = '-';\n\t\t\tanswer = number1 - number2;\n\t\t}\n\t\tif (operation == 3)\n\t\t{\n\t\t\toperator = '*';\n\t\t\tanswer = number1 * number2;\n\t\t}\n\t\t\t\n\t\t//prints question\n\t\tlabel2.setText(\"Question: \" + number1 + \" \" + operator + \" \" + number2 + \" = ?\");\n\t}", "public List<MultQuestion> multChoiceQuestions(int qid);", "private void fetchNewQuestion()\r\n\t{\r\n\t\t//Gets question and answers from model\r\n\t\tString[] question = quizModel.getNewQuestion();\r\n\t\t\r\n\t\t//Allocates answers to a new ArrayList then shuffles them randomly\r\n\t\tArrayList<String> answers = new ArrayList<String>();\r\n\t\tanswers.add(question[1]);\r\n\t\tanswers.add(question[2]);\r\n\t\tanswers.add(question[3]);\r\n\t\tanswers.add(question[4]);\r\n\t\tCollections.shuffle(answers);\r\n\t\t\r\n\t\t//Allocates north label to the question\r\n\t\tnorthLabel.setText(\"<html><div style='text-align: center;'>\" + question[0] + \"</div></html>\");\r\n\t\t\r\n\t\t//Allocates each radio button to a possible answer. Based on strings, so randomly generated questions...\r\n\t\t//...which by chance repeat a correct answer in two slots, either will award the user a point.\r\n\t\toption1.setText(answers.get(0));\r\n\t\toption2.setText(answers.get(1));\r\n\t\toption3.setText(answers.get(2));\r\n\t\toption4.setText(answers.get(3));\r\n\t\toption1.setActionCommand(answers.get(0));\r\n\t\toption2.setActionCommand(answers.get(1));\r\n\t\toption3.setActionCommand(answers.get(2));\r\n\t\toption4.setActionCommand(answers.get(3));\r\n\t\toption1.setSelected(true);\r\n\t\t\r\n\t\t//Update score\r\n\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"</div></html>\");\r\n\t}", "public void setQuestions(){\r\n question.setTestname(test.getText().toString());\r\n question.setQuestion(ques.getText().toString());\r\n question.setOption1(opt1.getText().toString());\r\n question.setOption2(opt2.getText().toString());\r\n question.setOption3(opt3.getText().toString());\r\n int num = Integer.parseInt(correct.getText().toString());\r\n question.setAnswerNumber(num);\r\n long check = db.addToDb(question);\r\n if(check == -1){\r\n Toast.makeText(getBaseContext(), \"Question already exists\", Toast.LENGTH_LONG).show();\r\n }else{\r\n Toast.makeText(getBaseContext(), \"Question added\", Toast.LENGTH_LONG).show();\r\n }\r\n }", "public Question getQuestionbyId(int sid,int qid);", "public void setAnswer(String newAnswer){\n this.answer = newAnswer; \n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public static void main(String[] args){\n \n Scanner input=new Scanner(System.in);\n String modality,decision;\n short length=0;\n Questions thisSession=new Questions();\n System.out.println(\"\\nWelcome. This program is your personal teacher.\\nEach time you need to study for any subject, your teacher will help you.\"\n +\"\\nTo start you need to create your question set.\");\n thisSession.createQuestions(input);\n\n do{ \n modality=changeModality(input);\n switch(modality){\n \n case \"1\":\n System.out.println(\"Flaschard initializing...\");\n System.out.println(\"\\nWelcome to Flashcards!\" );\n learnWithFlaschcards(input, modality, thisSession);\n break;\n case \"2\":\n System.out.println(\"Number mania initializing...\"+\n \"\\nWelcome to Number Mania!\");\n numberManiaDifficulty(input);\n break;\n case \"3\":\n System.out.println(\"Russian roulette initializing...\"+\n \"\\nWelcome to Russian Roulette!\");\n russianRoulette(input, thisSession);\n break;\n case \"4\":\n System.out.println(\"Hangman Initializing...\"+\n \"\\nWelcome to Hangman!\");\n hangMan(input, thisSession);\n break;\n case \"5\":\n System.out.println(\"Rock, Paper, Scissor Initializing...\"+\n \"\\nWelcome to R.P.S!\");\n rPS(input, thisSession);\n break;\n case \"6\":\n thisSession.createQuestions(input);\n break;\n case \"exit\":\n System.out.println(\"Closing all current processes...\\n\"+\n \"Closing scanner...\");\n input.close();\n System.exit(400);\n break;\n default:\n System.out.println(\"Ingrese una opcion valida\");\n input.next();\n }\n }while (modality!=\"exit\");\n \n }", "public interface QuestionInterface {\n\t/**\n\t * Sets the question.\n\t * @param question to be asked\n\t */\n\tpublic void setQuestion(String question);\n\t\n\t/**\n\t * Add options to the question\n\t * @param opiton The text for the option\n\t * @param correct is this option a correct answer.\n\t */\n\tpublic void addOption(String opiton, boolean correct);\n\t\n\tpublic List<String> getOptions();\n\t\n\tpublic List<Boolean> getCorrectA();\n}", "public abstract void selectQuestion();", "public Question(String id, String description, String correctAnswer,\n List<String> options) {\n super();\n this.id = id;\n this.description = description;\n this.correctAnswer = correctAnswer;\n this.options = options;\n }", "public void setQuestion(int questionId) {\n\n if (questionId < 10) {\n TextView questionNumber = (TextView) findViewById(R.id.QuestionNumber);\n questionNumber.setText(\"Question \" + (questionId + 1));\n TextView question = (TextView) findViewById(R.id.txtQuestion);\n question.setText(roundOne[questionId].getQuestion());\n // set coins\n TextView coinsTextView = (TextView)findViewById(R.id.TxtCoins);\n\n //better approuch than .tostring()\n coinsTextView.setText(String.valueOf(score));\n } else {\n //make new preferences for score\n sharePrefsScore = contextScore.getSharedPreferences(SCORE_PREFS, contextScore.MODE_PRIVATE);\n editorScore = sharePrefsScore.edit();\n\n // Score to pass it trough shared prefs\n editor.putString(\"SCORE\", String.valueOf(score) );\n editor.commit();\n\n //go to new Activity\n Intent roudnTwoActivty = new Intent(getApplicationContext(), RoundTwoActivity.class);\n startActivity(roudnTwoActivty);\n\n }\n\n }", "public Question(String question, String answer, List<String> mcAnswers) {\n\t\tis_multiple_choice = false;\n\t\t\n\t\t/* pads the list if less than total answers */\n\t\tif (mcAnswers.size() < 5) {\n\t\t\tmcAnswers.add(null);\n\t\t}\n\t\toption_a = mcAnswers.get(0);\n\t\toption_b = mcAnswers.get(1);\n\t\toption_c = mcAnswers.get(2);\n\t\toption_d = mcAnswers.get(3);\n\t\toption_e = mcAnswers.get(4);\n\t\tis_mp_question = false;\n\t\tis_bp_question = true;\n\t\tthis.question = question;\n\t\tanswer_to_question_explanation = answer;\n\t}", "public MultipleAnswerQuestion(String question ,boolean isSingleAnswered)\r\n {\r\n super(question,isSingleAnswered);\r\n this.answers = new ArrayList<>(); //Initializing the HashSet\r\n }", "public void setAnswer(String answer) {\r\n this.answer = answer;\r\n }", "public void changeAnswers(String question, ArrayList<Integer> choices) {\r\n Random randomGenerator = new Random();\r\n boolean hasChange = randomGenerator.nextBoolean();\r\n\r\n // if boolean is true, student will change answer by jumping back to submitAnswer()\r\n if (hasChange) {\r\n System.out.println(studentID + \" is changing answer...\");\r\n studentAnswer.clear();\r\n submitAnswer(question, choices);\r\n }\r\n }", "public Question(String text, String type, String[] answers, int crrAnswer)\n {\n this.type = type;\n this.text = text;\n this.answers = answers;\n this.mcCrrAnswer = crrAnswer;\n\n this.id = Utility.generateUUID();\n }", "public String selectedAnswer()\n {\n \n if(jrbOption1.isSelected())\n \n return\"Answer1\";\n else if(jrbOption2.isSelected())\n return\"Answer2\";\n else if(jrbOption3.isSelected())\n return\"Answer3\";\n else if(jrbOption4.isSelected())\n return\"Answer4\";\n else return null;\n}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Do you want to try your luck with the slot machine? Type 1 for YES or 2 for NO:\");\n int answer = sc.nextInt();\n\n\n //Create If/Else based on Yes/No response\n //Create For loop to generate numbers\n //Convert int affirmation to string value\n\n if (answer == 1)\n {\n for (int i = 0; i <= 2; i++)\n {\n double j = (Math.random() *10);\n int k = (int) j;\n System.out.print(\"[\"+k+\"]\");\n }\n }\n\n else\n {\n System.out.println(\"Maybe next time!\");\n\n }\n }", "private void ans1Option() {\n RadioButton radioButtonA = (RadioButton) findViewById(R.id.radio_button_A);\n RadioButton radioButtonB = (RadioButton) findViewById(R.id.radio_button_B);\n RadioButton radioButtonC = (RadioButton) findViewById(R.id.radio_Button_C);\n RadioButton radioButtonD = (RadioButton) findViewById(R.id.radio_Button_D);\n radioButtonA.setText(R.string.que1Opt1);\n radioButtonB.setText(R.string.que1Opt2);\n radioButtonC.setText(R.string.que1Opt3);\n radioButtonD.setText(R.string.que1Opt4);\n }", "public void setSelectionStrategy( IAnswerSelectionStrategy iass );", "public void createShortAnswer() {\n Question q = new ShortAnswer(this.in,this.o);\n this.o.setDisplay(\"Enter the prompt for your Short Answer question:\\n\");\n this.o.getDisplay();\n\n q.setPrompt(this.in.getUserInput());\n\n int charlimit = 0;\n while (charlimit == 0) {\n this.o.setDisplay(\"Enter character limit\\n\");\n this.o.getDisplay();\n\n try {\n charlimit = Integer.parseInt(this.in.getUserInput());\n if (charlimit < 1) {\n charlimit = 0;\n } else {\n ((ShortAnswer) q).setCharLimit(charlimit);\n }\n } catch (NumberFormatException e) {\n charlimit = 0;\n }\n }\n\n int numAns = 0;\n while (numAns == 0) {\n this.o.setDisplay(\"How many answers does this question have?\\n\");\n this.o.getDisplay();\n\n try {\n numAns = Integer.parseInt(this.in.getUserInput());\n if (numAns > numChoices || numAns < 1) {\n numAns = 0;\n } else {\n q.setMaxResponses(numAns);\n }\n } catch (NumberFormatException e) {\n numAns = 0;\n }\n }\n\n if (isTest) {\n RCA ca = new RCA(this.in,this.o);\n Test t = (Test)this.survey;\n String ans;\n\n for (int j=0; j < q.getMaxResponses(); j++){\n this.o.setDisplay(\"Enter correct answer(s):\\n\");\n this.o.getDisplay();\n\n ans = this.in.getUserInput();\n\n while (ans.length() > ((ShortAnswer) q).getCharLimit()) {\n this.o.setDisplay(\"Answer must be less then \" + ((ShortAnswer) q).getCharLimit() + \" characters \\n\");\n this.o.getDisplay();\n ans = this.in.getUserInput();\n }\n\n ca.addResponse(ans);\n }\n t.addAnswer(ca);\n }\n this.survey.addQuestion(q);\n }", "private void addQuestion() {\n Question q = new Question(\n \"¿Quien propuso la prueba del camino básico ?\", \"Tom McCabe\", \"Tom Robert\", \"Tom Charlie\", \"Tom McCabe\");\n this.addQuestion(q);\n\n\n Question q1 = new Question(\"¿Qué es una prueba de Caja negra y que errores desean encontrar en las categorías?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \" determina la funcionalidad del sistema\", \" determina la funcionalidad del sistema\");\n this.addQuestion(q1);\n Question q2 = new Question(\"¿Qué es la complejidad ciclomática es una métrica de calidad software?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \"basada en el cálculo del número\", \"basada en el cálculo del número\");\n this.addQuestion(q2);\n //preguntas del quiz II\n Question q3=new Question(\"Las pruebas de caja blanca buscan revisar los caminos, condiciones, \" +\n \"particiones de control y datos, de las funciones o módulos del sistema; \" +\n \"para lo cual el grupo de diseño de pruebas debe:\",\n \"Conformar un grupo de personas para que use el sistema nuevo\",\n \"Ejecutar sistema nuevo con los datos usados en el sistema actual\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\");\n this.addQuestion(q3);\n Question q4=new Question(\"¿Las pruebas unitarias son llamadas?\",\n \"Pruebas del camino\", \"Pruebas modulares\",\n \"Pruebas de complejidad\", \"Pruebas modulares\");\n this.addQuestion(q4);\n Question q5=new Question(\"¿Qué es una prueba de camino básico?\",\n \"Hace una cobertura de declaraciones del código\",\n \"Permite determinar si un modulo esta listo\",\n \"Técnica de pueba de caja blanca\",\n \"Técnica de pueba de caja blanca\" );\n this.addQuestion(q5);\n Question q6=new Question(\"Prueba de camino es propuesta:\", \"Tom McCabe\", \"McCall \", \"Pressman\",\n \"Tom McCabe\");\n this.addQuestion(q6);\n Question q7=new Question(\"¿Qué es complejidad ciclomatica?\",\"Grafo de flujo\",\"Programming\",\n \"Metrica\",\"Metrica\");\n this.addQuestion(q7);\n //preguntas del quiz III\n Question q8 = new Question(\n \"¿Se le llama prueba de regresión?\", \"Se tienen que hacer nuevas pruebas donde se han probado antes\",\n \"Manten informes detallados de las pruebas\", \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\");\n this.addQuestion(q8);\n Question q9 = new Question(\"¿Cómo se realizan las pruebas de regresión?\",\n \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\", \"A través de herramientas de automatización de pruebas\", \"A través de herramientas de automatización de pruebas\");\n this.addQuestion(q9);\n Question q10 = new Question(\"¿Cuándo ya hay falta de tiempo para ejecutar casos de prueba ya ejecutadas se dejan?\",\n \"En primer plano\", \"En segundo plano\", \"En tercer plano\", \"En segundo plano\");\n this.addQuestion(q10);\n //preguntas del quiz IV\n Question q11 = new Question(\n \"¿En qué se enfocan las pruebas funcionales?\",\n \"Enfocarse en los requisitos funcionales\", \"Enfocarse en los requisitos no funcionales\",\n \"Verificar la apropiada aceptación de datos\", \"Enfocarse en los requisitos funcionales\");\n this.addQuestion(q11);\n Question q12 = new Question(\"Las metas de estas pruebas son:\", \"Verificar la apropiada aceptación de datos\",\n \"Verificar el procesamiento\", \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\",\n \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\");\n this.addQuestion(q12);\n Question q13 = new Question(\"¿En qué estan basadas este tipo de pruebas?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Técnicas de cajas negra\", \"Técnicas de cajas negra\");\n this.addQuestion(q13);\n //preguntas del quiz V\n Question q14 = new Question(\n \"¿Cúal es el objetivo de esta técnica?\", \"Identificar errores introducidos por la combinación de programas probados unitariamente\",\n \"Decide qué acciones tomar cuando se descubren problemas\",\n \"Verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Identificar errores introducidos por la combinación de programas probados unitariamente\");\n this.addQuestion(q14);\n Question q15 = new Question(\"¿Cúal es la descripción de la Prueba?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\");\n this.addQuestion(q15);\n Question q16 = new Question(\"Por cada caso de prueba ejecutado:\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Comparar el resultado esperado con el resultado obtenido\", \"Comparar el resultado esperado con el resultado obtenido\");\n this.addQuestion(q16);\n //preguntas del quiz VI\n Question q17 = new Question(\n \"Este tipo de pruebas sirven para garantizar que la calidad del código es realmente óptima:\",\n \"Pruebas Unitarias\", \"Pruebas de Calidad de Código\",\n \"Pruebas de Regresión\", \"Pruebas de Calidad de Código\");\n this.addQuestion(q17);\n Question q18 = new Question(\"Pruebas de Calidad de código sirven para: \",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Verificar que las especificaciones de diseño sean alcanzadas\",\n \"Garantizar la probabilidad de tener errores o bugs en la codificación\", \"Garantizar la probabilidad de tener errores o bugs en la codificación\");\n this.addQuestion(q18);\n Question q19 = new Question(\"Este análisis nos indica el porcentaje que nuestro código desarrollado ha sido probado por las pruebas unitarias\",\n \"Cobertura\", \"Focalización\", \"Regresión\", \"Cobertura\");\n this.addQuestion(q19);\n\n Question q20 = new Question( \"¿Qué significa V(G)?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Regiones\");\n this.addQuestion(q20);\n\n Question q21 = new Question( \"¿Qué significa A?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Aristas\");\n this.addQuestion(q21);\n\n Question q22 = new Question( \"¿Qué significa N?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Nodos\");\n this.addQuestion(q22);\n\n Question q23 = new Question( \"¿Qué significa P?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos Predicado\", \"Número de Nodos Predicado\");\n this.addQuestion(q23);\n Question q24 = new Question( \"De cuantás formas se puede calcular la complejidad ciclomatica V(G):\",\n \"3\", \"1\", \"2\", \"3\");\n this.addQuestion(q24);\n\n // END\n }", "public Menutable(String question, String answer) {\r\n\t\tthis.question = question;\r\n\t\tthis.answer = answer;\r\n\t}", "public abstract boolean verifyIdAnswers(String firstName, String lastName, String address, String city, String state, String zip, String ssn, String yob);", "public static int sapQuestions (int sapPathway)\r\n {\r\n int questionNumber = (int)(Math.random()*20)+1;\r\n\r\n switch (questionNumber)\r\n {\r\n case 1: System.out.println(\"Which of the following is not a social institution?\\r\\n\" + \r\n \"1.) family\\r\\n\" + \r\n \"2.) education\\r\\n\" + \r\n \"3.) hidden Media\\r\\n\" + \r\n \"4.) social Media\\r\\n\");\r\n break;\r\n case 2: System.out.println(\"Stereotypes are maintained by _______\\r\\n\" + \r\n \"1.) ignoring contradictory evidence\\r\\n\" + \r\n \"2.) individualization \\r\\n\" + \r\n \"3.) overcomplicating generalization that is applied to all members of a group\\r\\n\" + \r\n \"4.) the ideology of “rescue”\\r\\n\");\r\n break;\r\n case 3: System.out.println(\"Racism is about _____\\r\\n\" + \r\n \"1.) effect not Intent\\r\\n\" + \r\n \"2.) intent not effect\\r\\n\" + \r\n \"3.) response not question\\r\\n\" + \r\n \"4.) question not response\\r\\n\");\r\n break;\r\n case 4: System.out.println(\"What is the definition of theory?\\r\\n\" + \r\n \"1.) what’s important to you\\r\\n\" + \r\n \"2.) best possible explanation based on available evidence\\r\\n\" + \r\n \"3.) your experiences, what you think is real\\r\\n\" + \r\n \"4.) determines how you interpret situations\\r\\n\");\r\n break;\r\n case 5: System.out.println(\"Which of the following is not an obstacle to clear thinking?\\r\\n\" + \r\n \"1.) drugs\\r\\n\" + \r\n \"2.) close-minded\\r\\n\" + \r\n \"3.) honesty\\r\\n\" + \r\n \"4.) emotions\\r\\n\");\r\n break;\r\n case 6: System.out.println(\"What does the IQ test asses?\\r\\n\" + \r\n \"1.) literacy skills\\r\\n\" + \r\n \"2.) survival skills\\r\\n\" + \r\n \"3.) logical reasoning skills\\r\\n\" + \r\n \"4.) 1 and 3\\r\\n\");\r\n break;\r\n case 7: System.out.println(\"How many types of intelligence are there?\\r\\n\" + \r\n \"1.) 27\\r\\n\" + \r\n \"2.) 5\\r\\n\" + \r\n \"3.) 3\\r\\n\" + \r\n \"4.) 8\\r\\n\");\r\n break;\r\n case 8: System.out.println(\"Emotions have 3 components\\r\\n\" + \r\n \"1.) psychological, cognitive, behavioral\\r\\n\" + \r\n \"2.) psychological, physical, social\\r\\n\" + \r\n \"3.) intensity, range, exposure\\r\\n\" + \r\n \"4.) range, duration, intensity\\r\\n\");\r\n break;\r\n case 9: System.out.println(\"Which of the following is not a component of happiness?\\r\\n\" + \r\n \"1.) diet and nutrition\\r\\n\" + \r\n \"2.) time in nature\\r\\n\" + \r\n \"3.) interventions\\r\\n\" + \r\n \"4.) relationships\\r\\n\");\r\n break;\r\n case 10: System.out.println(\"The brain compensates for damaged neurons by ______.\\r\\n\" + \r\n \"1.) extending neural connections over the dead neurons\\r\\n\" + \r\n \"2.) it doesn’t need too\\r\\n\" + \r\n \"3.) grows new neurons\\r\\n\" + \r\n \"4.) send neurons in from different places\\r\\n\");\r\n break;\r\n case 11: System.out.println(\"Which of the following is true?\\r\\n\" + \r\n \"1.) you continue to grow neurons until age 50\\r\\n\" + \r\n \"2.) 90% of the brain is achieved by age 6\\r\\n\" + \r\n \"3.) only 20% of the brain is actually being used \\r\\n\" + \r\n \"4.) the size of your brain determines your intelligence\\r\\n\");\r\n break;\r\n case 12: System.out.println(\"The feel-good chemical is properly known as?\\r\\n\" + \r\n \"1.) acetycholine\\r\\n\" + \r\n \"2.) endocrine\\r\\n\" + \r\n \"3.) dopamine\\r\\n\" + \r\n \"4.) doperdoodle\\r\\n\");\r\n break;\r\n case 13: System.out.println(\"Who created the theory about ID, superego and ego?\\r\\n\" + \r\n \"1.) Albert\\r\\n\" + \r\n \"2.) Freud\\r\\n\" + \r\n \"3.) Erikson\\r\\n\" + \r\n \"4.) Olaf\\r\\n\");\r\n break;\r\n case 14: System.out.println(\"Classic Conditioning is _______?\\r\\n\" + \r\n \"1.) when an organism learns to associate two things that are normally unrelated\\r\\n\" + \r\n \"2.) when an organism learns to disassociate two things that are normally related \\r\\n\" + \r\n \"3.) when you teach an organism the survival style of another organism\\r\\n\" + \r\n \"4.) when you train an organism without the use of modern technology\\r\\n\");\r\n break;\r\n case 15: System.out.println(\"The cerebellum is responsible for what?\\r\\n\" + \r\n \"1.) visual info processing\\r\\n\" + \r\n \"2.) secrets hormones\\r\\n\" + \r\n \"3.) balance and coordination\\r\\n\" + \r\n \"4.) controls heartbeat\\r\\n\");\r\n break;\r\n case 16: System.out.println(\"Transphobia is the fear of?\\r\\n\" + \r\n \"1.) transgender individuals\\r\\n\" + \r\n \"2.) homosexual individuals\\r\\n\" + \r\n \"3.) women\\r\\n\" + \r\n \"4.) transfats\\r\\n\");\r\n break;\r\n case 17: System.out.println(\"What factors contribute to a positive IQ score in children?\\r\\n\" + \r\n \"1.) early access to words\\r\\n\" + \r\n \"2.) affectionate parents\\r\\n\" + \r\n \"3.) spending time on activities\\r\\n\" + \r\n \"4.) all of the above\\r\\n\");\r\n break;\r\n case 18: System.out.println(\"Emotions can be ______.\\r\\n\" + \r\n \"1.) a reaction\\r\\n\" + \r\n \"2.) a goal\\r\\n\" + \r\n \"3.) all of the above\\r\\n\" + \r\n \"4.) none of the above\\r\\n\");\r\n break;\r\n case 19: System.out.println(\"What is not a stage in increasing prejudice?\\r\\n\" + \r\n \"1.) verbal rejection\\r\\n\" + \r\n \"2.) extermination\\r\\n\" + \r\n \"3.) avoidance\\r\\n\" + \r\n \"4.) self agreement\\r\\n\");\r\n break;\r\n case 20: System.out.println(\"What part of the brain is still developing in adolescents?\\r\\n\" + \r\n \"1.) brain stem\\r\\n\" + \r\n \"2.) pons\\r\\n\" + \r\n \"3.) prefrontal cortex\\r\\n\" + \r\n \"4.) occipital\\r\\n\");\r\n break;\r\n }\r\n\r\n return questionNumber;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate String flowMultiple(Object options) {\n\t\t((JSONArray) options).forEach(item -> {\n\t\t\tif (((JSONObject) item).containsKey(answerUser.toUpperCase())) {\n\t\t\t\tquestionBot.put(owner.id(), ((JSONObject) item).get(answerUser.toUpperCase()).toString());\n\t\t\t}\n\t\t});\n\t\treturn buildMessage(questionBot.get(owner.id()));\n\t}", "public String printOutQuestion()\n\t{\n\t\tRandom rand = new Random();\n\t\tString[] answers = new String[4];\n\t\tString returnString;\n\t\tanswers[0] = answer;\n\t\tanswers[1] = falseAnswers[0];\n\t\tanswers[2] = falseAnswers[1];\n\t\tanswers[3] = falseAnswers[2];\n\t\tString firstAns = \"\", secondAns = \"\", thirdAns = \"\", fourthAns = \"\";\n\t\t\n\t\twhile(firstAns == secondAns || firstAns == thirdAns || firstAns == fourthAns || secondAns == thirdAns || secondAns == fourthAns || thirdAns == fourthAns)\n\t\t{\n\t\t\tfirstAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(firstAns); Used for debugging\n\t\t\tsecondAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(secondAns); Used for debugging\n\t\t\tthirdAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(thirdAns); Used for debugging\n\t\t\tfourthAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(fourthAns); Used for debugging\n\t\t}\n\t\t\n\t\tanswerA = firstAns;\n\t\tanswerB = secondAns;\n\t\tanswerC = thirdAns;\n\t\tanswerD = fourthAns;\n\t\t//System.out.println(questionString + \"Answer A: \" + firstAns + \"Answer B: \" + secondAns + \"Answer C: \" + thirdAns + \"Answer D: \" + fourthAns); Used for debugging\n\t\treturnString = questionString + \"?\"; \n\t\tSystem.out.println(\"Actual Answer is: \" + answer);\n\t\treturn returnString;\n\t}", "private void creatingNewQuestion() {\r\n AbstractStatement<?> s;\r\n ListQuestions lq = new ListQuestions(ThemesController.getThemeSelected());\r\n switch ((String) typeQuestion.getValue()) {\r\n case \"TrueFalse\":\r\n // just to be sure the answer corresponds to the json file\r\n Boolean answer = CorrectAnswer.getText().equalsIgnoreCase(\"true\");\r\n s = new TrueFalse<>(Text.getText(), answer);\r\n break;\r\n\r\n case \"MCQ\":\r\n s = new MCQ<>(Text.getText(), TextAnswer1.getText(), TextAnswer2.getText(), TextAnswer3.getText(), CorrectAnswer.getText());\r\n break;\r\n\r\n default:\r\n s = new ShortAnswer<>(Text.getText(), CorrectAnswer.getText());\r\n break;\r\n }\r\n lq.addQuestion(new Question(s, ThemesController.getThemeSelected(), Difficulty.fromInteger((Integer) difficulty.getValue()) ));\r\n lq.writeJson(ThemesController.getThemeSelected());\r\n }", "@Override\n public String ask(String question) {\n return answers[position++];\n }", "public void saveSurveyAnswer(HttpServletRequest request, Answers answers, long userId);", "@Override\n\tpublic void setSurvey(int id, int survey) {\n\t\t\n\t}", "public ArrayList<String> mulipleSelect() throws IOException{\n\t\t\tint count = 0;\n\t\t\tString line = null;\n\t\t\tFin = new FileReader(\"Survey.txt\");\t\t// take file in file reader \n\t\t\tbufferReader = new BufferedReader(Fin);\t// take contents of file in buffer reader\n\t\t\twhile( count != 6 )\t\t\t\t\t\t// skip first 6 lines of file because they are of question one \n\t\t {\n\t\t\t\tline = bufferReader.readLine();\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tArrayList<String> answer = new ArrayList<String>();\t\t// array list which holds answer\n\t\t\tString[] questionArray = new String[4];\n\t\t\t \n\t\t\twhile(count!=10) {\n\t\t\t\t line = bufferReader.readLine();\t\t\t// next 4 lines of file contain Multiple choice question\n\t\t\t\t System.out.println(line);\n\t\t\t\t questionArray[count-6] = line;\t\t\t// take it into question array\n\t\t\t\t \n\t\t\t\t count++;\n\t\t\t}\n\t\t\t \n\t\t\tint flag = 0;\n\t\t\t\n\t\t\twhile( flag == 0 )\n\t\t\t{\n String Ans = new String();\n answer = new ArrayList<String>();\n\t for(int p=0; p<3; p++)\n\t {\n\t \tAns=sc.nextLine();\n\t answer.add(Ans);\n\t }\n\t for(int c=0; c<answer.size(); c++)\t\t\t\t// check user answers are valid or not\n\t {\n\t if( answer.get(c).equals(\"1\") )\n\t {\n\t \tanswer.set( c, \"1.Service Quality\" );\n\t }\n\t else if(answer.get(c).equals(\"2\"))\n\t {\n\t \tanswer.set( c, \"2.Communication\" );\n\t }\n\t else if(answer.get(c).equals(\"3\"))\n\t {\n\t \tanswer.set( c, \"3.Delivery Process\" );\n\t }\n\t }\n\t int p = 0;\n\t for( int i=0; i<3; i++ )\n\t {\n\t if( (questionArray[1].equals(answer.get(i))) || (questionArray[2].equals(answer.get(i))) || (questionArray[3].equals(answer.get(i))) || (answer.get(i).equals(\"\")) )// to check validation\n\t {\n\t \tflag++;\n\t \n\t \tif( (answer.get(i).equals(\"\")) )\n\t \t{\n\t \t\tp++;\n\t \t}\n\t }\n\t }\n\t if( p == 3 || flag < 3 )\t\t\t// if invalid then re enter the answers\n\t \t{\n\t \tSystem.out.println(\"Enter valid answer\");\n\t \t \tflag=0;\n\t \t}\n\t\t\t}\n\t\t\treturn answer;\n\t\t }", "public Question(String statement, String answer){\n this.statement = statement;\n this.answer = answer;\n }", "void setQuestionType(QuestionType type);", "public void studIdGenr()\n {\n \tthis.studentID = (int)(Math.random() * (2047300 - 2047100 + 1) + 2047100);\n }", "public boolean createQuestion(int qID, int cID, String q, String a1, String a2, String a3, String a4, String a5, int correctAns) {\n try {\n Connection con = Database.createDBconnection();\n String ins = \"INSERT into question (question_ID, category_ID, question, ans1, ans2, ans3, ans4, ans5, correct_answer, point_value) values ('\"\n + qID + \"','\" + cID + \"','\" + q + \"','\" + a1 + \"','\" + a2 + \"','\" + a3 + \"','\" + a4 + \"','\" + a5 + \"','\" + correctAns + \"','\" + 10 + \"');\";\n Statement ins_stmt = con.createStatement();\n ins_stmt.executeUpdate(ins);\n\n Database.closeDBconnection(con);\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "public void getInput() {\r\n System.out.print(\"Is the car silent when you turn the key? \");\r\n setAnswer1(in.nextLine());\r\n if(getAnswer1().equals(YES)) {\r\n System.out.print(\"Are the battery terminals corroded? \");\r\n setAnswer2(in.nextLine());\r\n if(getAnswer2().equals(YES)){\r\n printString(\"Clean the terminals and try again\");\r\n }\r\n else {\r\n printString(\"The battery may be damaged.\\nReplace the cables and try again\");\r\n }\r\n\r\n }\r\n else {\r\n System.out.print(\"Does the car make a slicking noise? \");\r\n setAnswer3(in.nextLine());\r\n if(getAnswer3().equals(YES)) {\r\n printString(\"Replace the battery\");\r\n }\r\n else {\r\n System.out.print(\"Does the car crank up but fail to start? \");\r\n setAnswer4(in.nextLine());\r\n if(getAnswer4().equals(YES)) {\r\n printString(\"Check spark plug connections.\");\r\n }\r\n else{\r\n System.out.print(\"Does the engine start and then die? \");\r\n setAnswer5(in.nextLine());\r\n if(getAnswer5().equals(YES)){\r\n System.out.print(\"Does your care have fuel injection? \");\r\n setAnswer6(in.nextLine());\r\n if(getAnswer6().equals(YES)){\r\n printString(\"Get it in for service\");\r\n }\r\n else{\r\n printString(\"Check to insure the chock is opening and closing\");\r\n }\r\n }\r\n else {\r\n printString(\"This should be impossible\");\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n }", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "java.lang.String getCorrectAnswer();", "void setQuestion(){\n int numberRange = currentLevel * 3;\n Random randInt = new Random();\n\n int partA = randInt.nextInt(numberRange);\n partA++;//not zero\n\n int partB = randInt.nextInt(numberRange);\n partB++;//not zero\n\n correctAnswer = partA * partB;\n int wrongAnswer1 = correctAnswer-2;\n int wrongAnswer2 = correctAnswer+2;\n\n textObjectPartA.setText(\"\"+partA);\n textObjectPartB.setText(\"\"+partB);\n\n //set the multi choice buttons\n //A number between 0 and 2\n int buttonLayout = randInt.nextInt(3);\n switch (buttonLayout){\n case 0:\n buttonObjectChoice1.setText(\"\"+correctAnswer);\n buttonObjectChoice2.setText(\"\"+wrongAnswer1);\n buttonObjectChoice3.setText(\"\"+wrongAnswer2);\n break;\n\n case 1:\n buttonObjectChoice2.setText(\"\"+correctAnswer);\n buttonObjectChoice3.setText(\"\"+wrongAnswer1);\n buttonObjectChoice1.setText(\"\"+wrongAnswer2);\n break;\n\n case 2:\n buttonObjectChoice3.setText(\"\"+correctAnswer);\n buttonObjectChoice1.setText(\"\"+wrongAnswer1);\n buttonObjectChoice2.setText(\"\"+wrongAnswer2);\n break;\n }\n }", "public static void changeQuestion(int qid, String username) {\n\t\t\tboolean flag = false;\n\t\t\tString a2 = null;\n \t\tint d = 0;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif ((qid <= 12) || (qid == 14)) {\n\t\t\t\t\t\ta2 = JOptionPane.showInputDialog(null, qid + \" Update your answer\", \"QUESTIONNAIRE\", JOptionPane.PLAIN_MESSAGE);\n \t\t\t\tflag = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\td = JOptionPane.showConfirmDialog(null, qid + \" Update your answer\", \"QUESTIONNAIRE\", JOptionPane.YES_NO_OPTION,JOptionPane.PLAIN_MESSAGE);\n \t\t\t\ta2 = String.valueOf(d);\n \t\t\tflag = true;\n \t\t\t} \n \t\t\tif (a2.equals(null) || (d == -1)) {\n \t\t\t\tthrow new NullPointerException();\n \t\t\t}\n \t\t} catch (NullPointerException e1) {\n \t\t\tJOptionPane.showMessageDialog(null, \"Please insert your answer\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n \t\t\tflag = false;\n \t\t}\n \t\t}while (flag == false);\n\t\t\tif (checkQuestion(qid, a2) == false) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"We regret to inform you that you are no longer compatible as a blood donor.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\tSystem.exit(0);\n\t\t\t} else {\n\t\t\t\tupdateTableAnswers(qid, username, a2);\n\t\t\t}\n\t\t\t\n\t\t\treturn;\t\n\t\t}", "static ArrayList<Integer> generateQuestion(ArrayList<Integer> remainingSongsIds)\n {\n //shuffle the ids\n Collections.shuffle(remainingSongsIds);\n\n ArrayList<Integer> options = new ArrayList<>();\n\n //pick the random first fours sample ids\n for(int i=0;i<NUM_OPTIONS;i++)\n {\n if(i<remainingSongsIds.size())\n {\n options.add(remainingSongsIds.get(i));\n }\n }\n return options;\n }", "public Question(String question, String answer, boolean isMP, boolean isBP) {\n\t\tis_multiple_choice = false;\n\t\toption_a = null;\n\t\toption_b = null;\n\t\toption_c = null;\n\t\toption_d = null;\n\t\toption_e = null;\n\t\tis_mp_question = isMP;\n\t\tis_bp_question = isBP;\n\t\tthis.question = question;\n\t\tanswer_to_question_explanation = answer;\n\t}", "public void createAnswerStatistics(int sid,int qid);", "public static void GeneratorMethod(boolean vP, boolean nP, boolean sP, boolean sS, boolean nS, boolean vS) throws IOException {\n List<String> lines = new ArrayList<>();\n\n if(vP){\n VerbPluralGen vpg;\n for (int i = 0; i<50; i++){\n vpg = new VerbPluralGen();\n lines.add(vpg.verbPluralExercise());\n }\n }\n if(nP){\n NounPluralGen npg;\n for (int i = 0; i<50; i++){\n npg = new NounPluralGen();\n lines.add(npg.nounPluralExercises());\n }\n }\n if(sP){\n SentencePluraliserGen spg;\n for (int i = 0; i<50; i++){\n spg = new SentencePluraliserGen();\n lines.add(spg.sentencePluraliseExercise());\n }\n }\n if(sS){\n SentenceScrabbleGen ssg;\n for (int i = 0; i<50; i++){\n ssg = new SentenceScrabbleGen();\n lines.add(ssg.sentenceScrabbleExercise());\n }\n }\n if(nS){\n NounSingularGen nsg;\n for (int i = 0; i<50; i++){\n nsg = new NounSingularGen();\n lines.add(nsg.nounSingularExercises());\n }\n }\n if(vS){\n VerbSCModifier vscm;\n for (int i = 0; i<50; i++){\n vscm = new VerbSCModifier();\n lines.add(vscm.verbSCModifier());\n }\n }\n Path file = Paths.get(\"questions.txt\");\n Files.write(file, lines, Charset.forName(\"UTF-8\"));\n }", "protected static <T> T promptUserForSelection(BufferedReader console, Map<Integer, T> options, Function<T, String> optionToString) {\n T userSelectedOption = null;\n\n System.out.print(\"Please select one from the list above.\\n> \");\n while (userSelectedOption == null) {\n try {\n userSelectedOption = options.get(Integer.parseInt(console.readLine().trim()));\n } catch (Exception ignored) {\n }\n\n if (userSelectedOption == null) {\n System.out.print(\"\\nInvalid selection, please try again.\\n> \");\n }\n }\n System.out.println(\"\\nYou selected: \" + optionToString.apply(userSelectedOption) + \"\\n\");\n\n return userSelectedOption;\n }", "public static int sapQuizAnswer (int sapQuestions)\r\n {\r\n int answer = 0;\r\n\r\n switch(sapQuestions)\r\n {\r\n case 1: answer = 3;\r\n break;\r\n case 2: answer = 1;\r\n break;\r\n case 3: answer = 1;\r\n break;\r\n case 4: answer = 2;\r\n break;\r\n case 5: answer = 3;\r\n break;\r\n case 6: answer = 4;\r\n break;\r\n case 7: answer = 4;\r\n break;\r\n case 8: answer = 1;\r\n break;\r\n case 9: answer = 3;\r\n break;\r\n case 10: answer = 1;\r\n break;\r\n case 11: answer = 2;\r\n break;\r\n case 12: answer = 3;\r\n break;\r\n case 13: answer = 2;\r\n break;\r\n case 14: answer = 1;\r\n break;\r\n case 15: answer = 3;\r\n break;\r\n case 16: answer = 1;\r\n break;\r\n case 17: answer = 4;\r\n break;\r\n case 18: answer = 3;\r\n break;\r\n case 19: answer = 4;\r\n break;\r\n case 20: answer = 3;\r\n break; \r\n }\r\n return answer;\r\n }", "Question getQuestionInPick(String questionId);", "private void setFAQs () {\n\n QuestionDataModel question1 = new QuestionDataModel(\n \"What is Psychiatry?\", \"Psychiatry deals with more extreme mental disorders such as Schizophrenia, where a chemical imbalance plays into an individual’s mental disorder. Issues coming from the “inside” to “out”\\n\");\n QuestionDataModel question2 = new QuestionDataModel(\n \"What Treatments Do Psychiatrists Use?\", \"Psychiatrists use a variety of treatments – including various forms of psychotherapy, medications, psychosocial interventions, and other treatments (such as electroconvulsive therapy or ECT), depending on the needs of each patient.\");\n QuestionDataModel question3 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"A psychiatrist is a medical doctor (completed medical school and residency) with special training in psychiatry. A psychologist usually has an advanced degree, most commonly in clinical psychology, and often has extensive training in research or clinical practice.\");\n QuestionDataModel question4 = new QuestionDataModel(\n \"What is Psychology ?\", \"Psychology is the scientific study of the mind and behavior, according to the American Psychological Association. Psychology is a multifaceted discipline and includes many sub-fields of study such areas as human development, sports, health, clinical, social behavior, and cognitive processes.\");\n QuestionDataModel question5 = new QuestionDataModel(\n \"What is psychologists goal?\", \"Those with issues coming from the “outside” “in” (i.e. lost job and partner so feeling depressed) are better suited with psychologists, they offer guiding you into alternative and healthier perspectives in tackling daily life during ‘talk therapy’\");\n QuestionDataModel question6 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question7 = new QuestionDataModel(\n \"What is a behavioural therapist?\", \"A behavioural therapist such as an ABA (“Applied Behavioural Analysis”) therapist or an occupational therapist focuses not on the psychological but rather the behavioural aspects of an issue. In a sense, it can be considered a “band-aid” fix, however, it has consistently shown to be an extremely effective method in turning maladaptive behaviours with adaptive behaviours.\");\n QuestionDataModel question8 = new QuestionDataModel(\n \"Why behavioral therapy?\", \"Cognitive-behavioral therapy is used to treat a wide range of issues. It's often the preferred type of psychotherapy because it can quickly help you identify and cope with specific challenges. It generally requires fewer sessions than other types of therapy and is done in a structured way.\");\n QuestionDataModel question9 = new QuestionDataModel(\n \"Is behavioral therapy beneficial?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question10 = new QuestionDataModel(\n \"What is alternative therapy?\", \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\");\n QuestionDataModel question11 = new QuestionDataModel(\n \"Can they treat mental health problems?\", \"Complementary and alternative therapies can be used as a treatment for both physical and mental health problems. The particular problems that they can help will depend on the specific therapy that you are interested in, but many can help to reduce feelings of depression and anxiety. Some people also find they can help with sleep problems, relaxation, and feelings of stress.\");\n QuestionDataModel question12 = new QuestionDataModel(\n \"What else should I consider before starting therapy?\", \"Only you can decide whether a type of treatment feels right for you, But it might help you to think about: What do I want to get out of it? Could this therapy be adapted to meet my needs?\");\n\n ArrayList<QuestionDataModel> faqs1 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs2 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs3 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs4 = new ArrayList<>();\n faqs1.add(question1);\n faqs1.add(question2);\n faqs1.add(question3);\n faqs2.add(question4);\n faqs2.add(question5);\n faqs2.add(question6);\n faqs3.add(question7);\n faqs3.add(question8);\n faqs3.add(question9);\n faqs4.add(question10);\n faqs4.add(question11);\n faqs4.add(question12);\n\n\n CategoryDataModel category1 = new CategoryDataModel(R.drawable.psychaitry,\n \"Psychiatry\",\n \"Psychiatry is the medical specialty devoted to the diagnosis, prevention, and treatment of mental disorders.\",\n R.drawable.psychiatry_q);\n\n CategoryDataModel category2 = new CategoryDataModel(R.drawable.psychology,\n \"Psychology\",\n \"Psychology is the science of behavior and mind which includes the study of conscious and unconscious phenomena.\",\n R.drawable.psychology_q);\n\n CategoryDataModel category3 = new CategoryDataModel(R.drawable.behavioral_therapy,\n \"Behavioral Therapy\",\n \"Behavior therapy is a broad term referring to clinical psychotherapy that uses techniques derived from behaviorism\",\n R.drawable.behaviour_therapy_q);\n CategoryDataModel category4 = new CategoryDataModel(R.drawable.alternative_healing,\n \"Alternative Therapy\",\n \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\",\n R.drawable.alternative_therapy_q);\n\n String FAQ1 = \"What is Psychiatry?\";\n String FAQ2 = \"What is Psychology?\";\n String FAQ3 = \"What is Behavioral Therapy?\";\n String FAQ4 = \"What is Alternative Therapy?\";\n String FAQ5 = \"Report a problem\";\n\n FAQsDataModel FAQsDataModel1 = new FAQsDataModel(FAQ1, category1,faqs1);\n FAQsDataModel FAQsDataModel2 = new FAQsDataModel(FAQ2, category2,faqs2);\n FAQsDataModel FAQsDataModel3 = new FAQsDataModel(FAQ3, category3,faqs3);\n FAQsDataModel FAQsDataModel4 = new FAQsDataModel(FAQ4, category4,faqs4);\n FAQsDataModel FAQsDataModel5 = new FAQsDataModel(FAQ5, category4,faqs4);\n\n\n\n if (mFAQs.isEmpty()) {\n\n mFAQs.add(FAQsDataModel1);\n mFAQs.add(FAQsDataModel2);\n mFAQs.add(FAQsDataModel3);\n mFAQs.add(FAQsDataModel4);\n mFAQs.add(FAQsDataModel5);\n\n\n }\n }", "public int askquestion(int J, int M, int X, int Y){\n\t\t//type of 5 shall result questions that are a randomly mixture of addition, multiplication, subtraction, and division problems\n\t\tif(M == 5) {\n\t\t\tM = 1 + rand.nextInt(4);\n\t\t}\n\t\t\t\t\n\t\t\t\t\tswitch (M) {\n\t\t\t\t\t//type of 1 shall limit the program to generating only addition problems\n\t\t case 1: System.out.println(\"Solve this addition problem:\\n\");\n\t\t\t\t\t\t\tSystem.out.println(\"How much is \" + X + \" plus \" + Y + \" equal\");\n\t\t\t\t\t\t\t M = X+Y;\n\t\t break;\n\t\t // type 2 shall limit the program to generating only multiplication problems.\n\t\t case 2: System.out.println(\"Solve this multiplication problem:\\n\");\n\t\t\t\t\t\t\tSystem.out.println(\"How much is \" + X + \" times \" + Y + \" equal\");\n\t\t\t\t\t\t\tM = X*Y;\n\t\t break;\n\t\t //type of 3 shall limit the program to generating only subtraction problems\n\t\t case 3: System.out.println(\"Solve this subtraction problem:\\n\");\n\t\t\t\t\t\t\tSystem.out.println(\"How much is \" + X + \" minus \" + Y + \" equal\");\n\t\t\t\t\t\t\tM = X-Y;\n\t\t break;\n\t\t // type of 4 shall limit the program to generating only division problems\n\t\t case 4: System.out.println(\"Solve this division problem:\\n\");\n\t\t\t\t\t\t\tSystem.out.println(\"How much is \" + X + \" divided by \" + Y + \" equal\");\n\t\t\t\t\t\t\tM = 0;\n\t\t break;}\n\t\t return M;\n\t\t\t\t}", "private Answer generateAnswer(int numberOfPossibleAnswers, int numberOfCorrectAnswers) {\n\t\tAnswer answer = new Answer();\n\t\t//check to make sure that an impossible value cannot be passed\n\t\tif(numberOfPossibleAnswers > 9) {\n\t\t\tnumberOfPossibleAnswers = 9;\n\t\t}\n\t\t//check to make sure that an impossible value cannot be passed\n\t\tif(numberOfCorrectAnswers > 9) {\n\t\t\tnumberOfCorrectAnswers = 9;\n\t\t}\n\t\tRandom random = new Random();\n\t\t//if the question can only have one correct answer the student will only choose one answer at random\n\t\tif(numberOfCorrectAnswers == 1) {\n\t\t\tanswer.setAnswer(random.nextInt(numberOfPossibleAnswers));\n\t\t}\n\t\telse if(numberOfCorrectAnswers > 1) {\n\t\t\t//randomly chooses how many answers to give for the question\n\t\t\tint numberOfAnswers = random.nextInt(numberOfPossibleAnswers) + 1;\n\t\t\t//chooses at random which answers to choose\n\t\t\tfor(int i = 0; i < numberOfAnswers; i++) { \n\t\t\t\tint answerId = random.nextInt(numberOfPossibleAnswers);\n\t\t\t\t//if the answer has already been given by the student, the student will choose \n\t\t\t\t//another random answer until it has not already been chosen\n\t\t\t\twhile(answer.getAnswer(answerId)) {\n\t\t\t\t\tanswerId = random.nextInt(numberOfPossibleAnswers);\n\t\t\t\t}\n\t\t\t\tanswer.setAnswer(answerId);\n\t\t\t}\n\t\t}\n\t\treturn answer;\n\t}", "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 }", "static void generateQuestions(int numQuestions, int selection, String fileName, String points) {\n String finalAnswers = \"\";\n switch (selection) {\n case 1:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += one(points);\n }\n break;\n case 2:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += two(points);\n }\n break;\n case 3:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += three(points);\n }\n break;\n case 4:\n for (int i = 0; i < numQuestions; i++) {\n finalAnswers += four(points);\n }\n break;\n default:\n System.out.println(\"Wrong selection. Please try again\");\n break;\n }\n writeAnswers(fileName, finalAnswers);\n }", "public static void questionnaire() {\n\t\tboolean flag = true;\n\t\tString a = null;\n\t\t//donor's username\n\t\tflag = true;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tusername = JOptionPane.showInputDialog(null,\"Enter your username: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tif (username.equals(\"null\")) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t }\n\t\t\t\tflag = false;\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a username.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t flag = true;\n\t\t\t}\t\n\t\t}while (flag);\n\t\ttry {\n\t\t\tResultSet rs = Messages.connect().executeQuery(\"SELECT * FROM Questionnaire \");\n\t\t\twhile (rs.next()) {\n\t\t\t\tint qid = rs.getInt(\"Q_id\");\n\t\t\t\tString r = rs.getString(\"Question\");\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (qid == 1) {\n\t\t\t\t\t\t\tflag = true;\n \t \t\t\t\t\tObject[] opt = {\"Male\", \"Female\"};\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tint g = JOptionPane.showOptionDialog(null,\"Choose your gender: \", \"SIGN UP\", JOptionPane.YES_NO_OPTION,\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, opt, null);\n\t\t\t\t\t\t\t\t\tif (g == 0) {\n\t\t\t\t\t\t\t\t\t\tgender = \"male\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else if (g == 1){\n\t\t\t\t\t\t\t\t\t\tgender = \"female\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (NullPointerException e1) {\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your gender\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}while (flag);\n\t\t\t\t\t\t\ta = gender;\n\t\t\t\t\t\t} else if (((qid >= 2) && (qid<=12)) || (qid == 14)) {\n\t\t\t\t\t\t\ta = JOptionPane.showInputDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\tif (a.equals(null)) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint p = JOptionPane.showConfirmDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\ta = String.valueOf(p);\n\t\t\t\t\t\t\tif (p == -1) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please insert your answer\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t}\n\t\t\t\t} while (flag);\n\t\t\t\tif (checkQuestion(qid, a) == false) {\n\t\t\t\t\t//delete data from data base\n\t\t\t\t\tint d = Messages.connect().executeUpdate(\"DELETE FROM Answers WHERE B_Username ='\" + username + \"'\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"We regret to inform you that you are not compatible as a blood donor.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} else {\n\t\t\t\t\tinsertAnswers(username, qid, a);\n\t\t\t\t}\n\t\t\t}\n\t\t\trs.close();\n\t\t\tMessages.connect().close();\n\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t}", "public void myresult(Admin admin, Teacher teacher) {\n\t\tsubject_list = admin.subject();\n\t\tmap = teacher.getStmarks();\n\t\tSystem.out.println(\" Enter your id:\");\n\n\t\ttry {\n\n\t\t\tid = student_input.nextInt(); // to get student id\n\n\t\t\tString value = map.get(id).toString(); /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t * to remove braces [] because it prints direct list object\n\t\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\tvalue = value.substring(1, value.length() - 1);\n\t\t\tSystem.out.println();\n\n\t\t\tfor (int i = 0; i < subject_list.size(); i++) {\n\n\t\t\t\tSystem.out.print(subject_list.get(i) + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(value); // prints the marks in different subjects\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"problem with student result..\" + e); // for runtime exception\n\t\t}\n\t}", "public static String getChoiceString(Scanner sc,String prompt,String s1,String s2)\r\n\t{\r\n\t\tboolean checkBooleanIsString = false; //Setting to False boolean variable\r\n \tString choice = null; //Initializing variable\r\n \t\r\n \twhile(checkBooleanIsString == false)\r\n \t{\r\n \t\tSystem.out.print(prompt);//will print method text that has been introduced\r\n\r\n \t\tchoice = sc.next(); // Reading from user using Scanner\r\n\t sc.nextLine(); // discard other data entered \r\n\t \r\n\t if(choice.equalsIgnoreCase(s1) || choice.equalsIgnoreCase(s2))//If statement that checks whether user has entered one of the string previously asked as data type\r\n\t {\r\n\t \tcheckBooleanIsString = true; //Change to true the condition to go out of the loop\r\n\t }\r\n\t else\r\n\t {\r\n\t \tSystem.out.println(\"\\nError! You have entered an invalid option, \\n\"\r\n\t \t\t\t+ \"must be '\"+s1+\"' or '\"+s2+\"'.Try again\\n\");\r\n\t }\r\n \t}\r\n return choice;\r\n\t}", "private int insertEditMenuAnswer()\n {\n boolean valid = false;\n String choice = \"\";\n Scanner content = new Scanner(System.in);\n \n while (!valid)\n {\n menu.editOptions();\n choice = content.nextLine().trim();\n valid = validation.integerValidation(choice, 1, 4);\n }\n \n int ans = Integer.parseInt(choice);\n \n return ans;\n }", "public Question(String text, String type, String crrAnswer)\n {\n this.type = type;\n this.text = text;\n this.textCrrAnswer = crrAnswer;\n\n this.mcCrrAnswer = -1;\n this.id = Utility.generateUUID();\n }", "public void reply(){\n ArrayList<String> potentialReceivers= messageController.replyOptionsForSpeaker(speaker);\n ArrayList<String> options = listBuilderWithIntegers(potentialReceivers.size());\n speakerMessageScreen.replyOptions(messageController.replyOptionsForSpeakerInString(speaker));\n if(messageController.replyOptionsForSpeakerInString(speaker).size() != 0) {\n String answerInString = scanner.nextLine();\n while(!options.contains(answerInString)){\n speakerMessageScreen.invalidInput(answerInString);\n answerInString = scanner.nextLine();\n }\n\n // now answer is valid\n\n int answerInInteger = Integer.parseInt(answerInString);\n String receiver = potentialReceivers.get(answerInInteger - 1);\n\n speakerMessageScreen.whatMessage();\n String messageContext = scanner.nextLine();\n messageController.sendMessage(speaker, receiver, messageContext);\n speakerMessageScreen.congratulations();\n }\n\n }", "private void setAnswerButtons(ArrayList<String> options) {\n ((RadioButton) findViewById(R.id.Ans1)).setText(options.get(0));\r\n ((RadioButton) findViewById(R.id.Ans2)).setText(options.get(1));\r\n ((RadioButton) findViewById(R.id.Ans3)).setText(options.get(2));\r\n ((RadioButton) findViewById(R.id.Ans4)).setText(options.get(3));\r\n }", "private void adminMenuSelection(int choice) throws Exception {\n switch (choice) {\n case 1:\n System.out.println(\"Selection 1. Set Student Access Period\");\n this.setStudAccPeriod();\n break;\n\n case 2:\n System.out.println(\"Selection 2. Update Student Access Period\");\n this.updStudAccPeriod();\n break;\n\n case 3:\n System.out.println(\"Selection 3. Add A Student\");\n this.addStudentParticulars();\n break;\n\n case 4:\n System.out.println(\"Selection 4. Update A Student\");\n this.updStudentParticulars();\n break;\n\n case 5:\n System.out.println(\"Selection 5. Add A Course\");\n this.addCourse();\n break;\n\n case 6:\n System.out.println(\"Selection 6. Update A Course\");\n this.updCourse();\n break;\n\n case 7:\n System.out.println(\"Selection 7. Check Available Slot For an index number\");\n this.checkVacancy();\n break;\n\n case 8:\n System.out.println(\"Selection 8. Print student list by index \");\n this.printStudListByIndex();\n break;\n\n case 9:\n System.out.println(\"Selection 9. Print student list by course \");\n this.printStudListByCourse();\n break;\n\n default:\n System.out.println(\"\\nHang on a moment while we sign you out.\");\n System.out.println(\"......\");\n TimeUnit.SECONDS.sleep(1);\n System.out.println(\"See you next time! Bye bye ;)\\n\");\n System.exit(0);\n }\n }" ]
[ "0.62750334", "0.5961571", "0.59058887", "0.5896361", "0.5760636", "0.5759492", "0.5752546", "0.5742335", "0.571526", "0.5714647", "0.57080877", "0.5626595", "0.5616708", "0.5613145", "0.55826706", "0.5578646", "0.5561509", "0.5558452", "0.5553965", "0.5548481", "0.5539", "0.55110097", "0.5509958", "0.54969484", "0.5482762", "0.5475364", "0.547016", "0.545712", "0.54390067", "0.541911", "0.5396872", "0.5394783", "0.53888917", "0.5387792", "0.5370249", "0.53671837", "0.5365175", "0.53299576", "0.5329609", "0.5324855", "0.5317351", "0.53146356", "0.5308336", "0.5301679", "0.5301437", "0.52932376", "0.52912956", "0.5286971", "0.52836514", "0.52595407", "0.5259523", "0.52522165", "0.5240108", "0.5239376", "0.52388614", "0.52382445", "0.52319276", "0.5228765", "0.5211817", "0.52081716", "0.5202138", "0.5193121", "0.5175378", "0.5175272", "0.51629835", "0.5156807", "0.5147016", "0.51348877", "0.5127984", "0.5127288", "0.5125075", "0.5124152", "0.5121593", "0.51181704", "0.5116746", "0.5113624", "0.5111779", "0.51041746", "0.5102841", "0.51010406", "0.5095161", "0.5087185", "0.50863993", "0.5083892", "0.50772023", "0.5075519", "0.5075401", "0.5073931", "0.507066", "0.5050918", "0.5049353", "0.50477594", "0.5042849", "0.50406927", "0.50379145", "0.503581", "0.5026581", "0.50131756", "0.50019366", "0.49970144" ]
0.6028801
1
Constructor creates an instance to be used for fill operations.
Type5ShadingContext(PDShadingType5 shading, ColorModel cm, AffineTransform xform, Matrix matrix, Rectangle deviceBounds) throws IOException { super(shading, cm, xform, matrix); LOG.debug("Type5ShadingContext"); setTriangleList(collectTriangles(shading, xform, matrix)); createPixelTable(deviceBounds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Fill() { }", "public FillDate() {\n }", "public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }", "public XL() {\n Reporter.log(\"New XL ctor\", true);\n }", "public Stack() {\r\n this(20);\r\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public Card() { this(12, 3); }", "public Data() {}", "public Celula() {\n this(null);\n }", "public Cell(){}", "public DS_My() {\n // Set field variables\n this.CAPACITY = 500;\n this.ls = new Pair[CAPACITY];\n this.size = 0;\n }", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "private Instantiation(){}", "@SuppressWarnings(\"unused\")\n private Flight() {\n this(null, null, null, null, null, null, null, null, null, null, null);\n }", "public Data() {\n }", "public Data() {\n }", "public InitialData(){}", "public Data() {\n \n }", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }", "public Rectangle() {\n this(50, 40);\n }", "public Property() {\n this(0, 0, 0, 0);\n }", "public Requisition() {\n\n }", "public SensorData() {\n\n\t}", "public Valvula(){}", "public Block( ) {\r\n _offSetRow = 0;\r\n _offSetCol = 0;\r\n _noOfRows = 0;\r\n _noOfCols = 0;\r\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}", "Constructor() {\r\n\t\t \r\n\t }", "public CommAreaRecord() {\n\t}", "public TradeData() {\r\n\r\n\t}", "Reproducible newInstance();", "public Cell()\n\t{\n\t}", "public DataCell() {\n super();\n }", "public DataSet() {\r\n \r\n }", "public AirField() {\n\n\t}", "public Account() {\n this(null, 0);\n }", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\tV = 0;\r\n\t}", "public PersonalBoard(){\n this(0);\n }", "public DesastreData() { //\r\n\t}", "protected Tile() {\n super();\n }", "public SPIEL() \n {\n this( 800 , 600 , false , false , false );\n }", "public RngObject() {\n\t\t\n\t}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }", "public SmallFishData() {\n cPosition = generatePosition();\n cDestination = generatePosition();\n }", "protected Settlement() {\n // empty constructor\n }", "public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public Instance() {\n }", "protected IRFunctional() {\n _name = null;\n _params = null;\n _args = null;\n _fds = null;\n _vds = null;\n _body = null;\n }", "public Humidity4Builder() {\r\n humidity4 = new Humidity4();\r\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "@Test\n public void testConstructor(){\n new RowGen(ROW_INDEX, spaces);\n }", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public Fahrzeug() {\r\n this(0, null, null, null, null, 0, 0);\r\n }", "public Schedule() {\n this(DataManager.readAll());\n }", "public Builder() {\n\t\t}", "public FundingDetails() {\n super();\n }", "public Item(){}", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "public Instance(Instance inst){\r\n\t\tthis.isTrain = inst.isTrain;\r\n\t\tthis.numInputAttributes = inst.numInputAttributes;\r\n\t\tthis.numOutputAttributes = inst.numOutputAttributes;\r\n\t\tthis.numUndefinedAttributes = inst.numUndefinedAttributes;\r\n\r\n\t\tthis.anyMissingValue = Arrays.copyOf(inst.anyMissingValue, inst.anyMissingValue.length);\r\n\r\n\t\tthis.nominalValues = new String[inst.nominalValues.length][];\r\n\t\tfor(int i=0;i<nominalValues.length;i++){\r\n\t\t\tthis.nominalValues[i] = Arrays.copyOf(inst.nominalValues[i],inst.nominalValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.intNominalValues = new int[inst.intNominalValues.length][];\r\n\t\tfor(int i=0;i<nominalValues.length;i++){\r\n\t\t\tthis.intNominalValues[i] = Arrays.copyOf(inst.intNominalValues[i],inst.intNominalValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.realValues = new double[inst.realValues.length][];\r\n\t\tfor(int i=0;i<realValues.length;i++){\r\n\t\t\tthis.realValues[i] = Arrays.copyOf(inst.realValues[i],inst.realValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.missingValues = new boolean[inst.missingValues.length][];\r\n\t\tfor(int i=0;i<missingValues.length;i++){\r\n\t\t\tthis.missingValues[i] = Arrays.copyOf(inst.missingValues[i],inst.missingValues[i].length);\r\n\t\t}\r\n\t}", "public Grid() {\n }", "protected abstract D createData();", "private Builder() {\n super(edu.pa.Rat.SCHEMA$);\n }", "public DABeneficios() {\n }", "public Factory() {\n this(getInternalClient());\n }", "@Test\n public void billCustomConstructor_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill(billId,userId,accountId,billName,billAmount,dueDate,occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "public Factory() {\n\t\tsuper();\n\t}", "public Scania() {\n\n super(2, 600, Color.white, \"Scania\", 13000);\n truckBed = new Ramp();\n }", "public DataFactoryImpl() {\n\t\tsuper();\n\t}", "public CLElenco() {\n /** rimanda al costruttore di questa classe */\n this(null);\n }", "public Allocation() {\n initComponents();\n }", "public PassPinDataItem() {\n }", "public Entry()\n {\n this(null, null, true);\n }", "public Memory() {\n this(false);\n }", "public Storage() {\n this(null, DEFAULT_MAX, DEFAULT_MAX_SIZE);\n }", "public void construct(){\n\t\tbuilder.buildPart1();\n\t\tbuilder.buildPart2();\n\t\tbuilder.retrieveResult();\n\t}", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "public Stack() {\r\n\t\tthis(capacity);\r\n\t}", "public Constructor(){\n\t\t\n\t}", "public BadgeCard() {\n this(null, null, null, 0);\n }", "@Override\n\tpublic void fillData() {\n\t}", "protected MoneyFactory() {\n\t}", "protected GeometricObject(String color, boolean filled) \n\t{\n\t\tdateCreated = new java.util.Date();\n\t\tthis.color = color;\n\t\tthis.filled = filled;\n\t}", "public DataAdapter() {\n }", "private void fillData()\n {\n\n }", "protected Ship(int length) {\n this.length = length;\n size = 0;\n cells = new Cell[length];\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "public Boleto() {\n this(3.0);\n }", "public Sudoku() {\n\t\tgrid = new Variable[ROWS][COLUMNS];\n\t}", "private Row() {\n }", "private Retorno( )\r\n {\r\n val = null;\r\n izq = null;\r\n der = null;\r\n\r\n }", "private SimpleData(Builder builder) {\n super(builder);\n }", "public Account() {\n // special case of the word \"this\"\n this(\"01234\", 0.00, \"Default Name\", \"Default Email\", \"Default Phone\");\n System.out.println(\"Empty constructor called\"); // only called once when instantiated.\n }", "public FruitStand() {}" ]
[ "0.6984276", "0.5987963", "0.59243804", "0.5921409", "0.58962524", "0.5873488", "0.5869387", "0.5836736", "0.5802117", "0.57867026", "0.5777277", "0.57633406", "0.5762792", "0.57375526", "0.57242656", "0.57242656", "0.57197356", "0.57020587", "0.5693396", "0.5689907", "0.56887436", "0.5680927", "0.56721735", "0.5658015", "0.56579256", "0.56536573", "0.56519014", "0.5626788", "0.5623581", "0.5617418", "0.56018203", "0.5592515", "0.5569839", "0.5568577", "0.5563927", "0.5561382", "0.55610347", "0.5558284", "0.55550164", "0.55501986", "0.55359185", "0.5532689", "0.5531708", "0.55281615", "0.5527895", "0.55238974", "0.5515896", "0.55143964", "0.55118895", "0.5498026", "0.54938656", "0.54938656", "0.54938656", "0.5493652", "0.54907", "0.54901", "0.5480015", "0.54778075", "0.5475974", "0.5468626", "0.5465114", "0.54631317", "0.5458336", "0.5455206", "0.5452467", "0.54514307", "0.5446401", "0.5439736", "0.5436493", "0.5430646", "0.5428809", "0.5427729", "0.5425856", "0.5420458", "0.54177403", "0.5415158", "0.54139817", "0.5413186", "0.5409587", "0.5408812", "0.5407986", "0.5405248", "0.5405016", "0.5400442", "0.5399173", "0.5398218", "0.5396011", "0.53959554", "0.5395413", "0.5395009", "0.5393303", "0.5393061", "0.538678", "0.5386744", "0.5386516", "0.5381058", "0.537695", "0.5374684", "0.53739524", "0.53729516", "0.53723687" ]
0.0
-1
WebDriverWait wait = new WebDriverWait(driver, 10); wait.until(ExpectedConditions.elementToBeClickable(regSearch));
public void search(String plateNumber) { regSearch.sendKeys(plateNumber); btnContinue.click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setWaitSelenium() throws InterruptedException {\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://google.com\");\n\n WebElement input = driver.findElement(By.xpath(\"//input[@name=\\\"q\\\"]\"));\n input.sendKeys(\"Abcd\");\n Thread.sleep(10000);\n driver.findElement(By.name(\"btnK\")).click();\n //driver.findElement(By.name(\"btnK\")).sendKeys(Keys.RETURN);\n\n // Fluent wait\n // Waiting 30s for an element to be present on the page,\n // for its presence once every 2s\n Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n .withTimeout(60, TimeUnit.SECONDS)\n .pollingEvery(2, TimeUnit.SECONDS)\n .ignoring(NoSuchElementException.class);\n\n WebElement clickseleniumlink = wait.until(new Function<WebDriver, WebElement>(){\n\n public WebElement apply(WebDriver driver ) {\n WebElement link = driver.findElement(By.xpath(\"/html[1]/body[1]/div[7]/div[3]/div[10]/div[1]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]\"));\n if(link.isEnabled()){\n System.out.println(\"Element found\");\n }\n return link;\n }\n });\n //click on the selenium link\n clickseleniumlink.click();\n\n driver.close();\n driver.quit();\n }", "public void Wait_ExplictWait() {\r\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\chromedriver.exe\");\r\n\t WebDriver driver=new ChromeDriver(); \r\n\t \r\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t \t\t\tdriver.get(\"https://contentstack.built.io\");\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t\t\t\t\t\tWebDriverWait wait=new WebDriverWait(driver, 15);\r\n\t\t\t\t\r\n\t\t\t\t\t\tdriver.findElement(By.id(\"email\")).sendKeys(\"kannan\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tWebElement link;\r\n\t\t\t\t\t\tlink= wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText(\"kForgot password?\")));\r\n\t\t\t\t\t\tlink.click();\r\n driver.quit();\r\n}", "@Override\n protected void waitThePageToLoad() {\n WaitUtils.waitUntil(driver, ExpectedConditions.visibilityOf(driver\n .findElement(By.xpath(SEARCH_XPATH))));\n }", "public void clickSearchButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- SearchButton should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"BybtnSearch\"));\r\n\t\t\tclick(locator_split(\"BybtnSearch\"));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"SearchButton is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- SearchButton is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- SearchButton is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BybtnSearch\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void enterTextInSearchField() {\n WebDriverWait wait = new WebDriverWait(driver, 5);\n\n // Afterwards, we need to inform WebDriver to wait until an expected condition is met\n // The ExpectedConditions class supplies many methods for dealing with scenarios that may occur before\n // executing the next Test Step\n }", "@Test\n public void EmplicitWaitTest() {\n\n Driver.getDriver().get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n\n //click on enable\n Driver.getDriver().findElement(By.xpath(\"//form[@id='input-example']//button\")).click();\n\n\n // this is a class used to emplicit wait\n WebDriverWait wait = new WebDriverWait(Driver.getDriver(), 10);//creating object\n //this is when wait happens\n // we are waiting for certain element this xpath is clicable\n wait.until(//waiting\n ExpectedConditions.elementToBeClickable(//to click\n By.xpath(\"//input[@type='text']\")));//clicking by the xpath\n\n\n\n //eneter text\n\n Driver.getDriver().findElement(By.xpath(\"//input[@type='text']\")).sendKeys(\"Hello World\");\n\n\n }", "public void waitForElementPresent(By locator){\n \tWebDriverWait wait=new WebDriverWait(driver,20);\n \twait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }", "public void waitForElementClickable(String locator) {\n waitForElementVisibility(locator);\n wait.until(ExpectedConditions.elementToBeClickable(By.xpath(locator)));\n }", "public void waitForElementToBeClickable(WebElement element) {\n wait.until(ExpectedConditions.visibilityOf(element));\n wait.until(ExpectedConditions.elementToBeClickable(element));\n }", "public static void waitUntilElementIsClickable(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.elementToBeClickable(element));\n }", "public void clickSearch() {\n\t\twaitForDocumentReady(5);\n\t\tlog.debug(\"Clicking on search button\");\n\t\tclickOn(search_button, 20);\n\t\tlog.info(\"Clicked on search button\");\n\t\tlogger.log(Status.INFO, \"Search for cruise completed\");\n\t\t\n\t}", "public static void waitForRegistrationButton(){\n DriverManager.waitForElement(Constans.REGISTRATION_BUTTON_LOCATOR);\n }", "private void waitForElement(WebDriver driver, int timeToWaitInSeconds, By ElementLocater) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeToWaitInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(ElementLocater));\n\n\t}", "public void clickOnSearchButton() {\n elementControl.clickElement(searchButton);\n }", "protected void click(By locator) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\n \t element.click();\n }", "public SearchPage searchBtnClick(String cityName ) throws InterruptedException, IOException\t{\n\t\n\t//WebDriverWait wait =new WebDriverWait(driver,30);\n\t \n\tWebElement myDynamicElement = (new WebDriverWait(driver, 60).until(ExpectedConditions.presenceOfElementLocated(searchBtn)));\n\t\n\t\n\t\n\tmyDynamicElement.click();\n\t\n\tThread.sleep(4000);\n\t\t\n\t\n\t/*\n\t * Melchi Search Page navigation\n\t * \n\t * \n\t */\n\t\n\t/*driver.get(\"https://www.indiaproperty.com/searchresults.php?q=\");\n\t \n\t Actions act =new Actions(driver);\n\t\n\tact.sendKeys(Keys.ENTER);*/\n\t\n\t\n\n\t/*\n\t * Existing Search Page navigation\n\t * \n\t * \n\t */\n\t\n\t\n\tdriver.get(\"https://www.indiaproperty.com/searchs/ci=alangudi&pt=allresidential&litype=sale&vm=ltrboqViZ6ufnNrKl%5E~%5ETrxOKkmtfecaWPm9bYydegldPppt7MmK6ni96io7GpWuHSp67qxt6XV%5E~%5ETimLKeX6ejnJ5rXaasYKagX6OrkaRn&frm=15&srchtype=quick-search&f=srch&withapi=2&view=grid\");\n\t\n\t\n\tActions act =new Actions(driver);\n\t\n\tact.sendKeys(Keys.ENTER);\n\treturn new SearchPage(driver,cityName);\n\t\n\n\t\n}", "public static void waitForClickability(WebElement element){\n getWait().until(ExpectedConditions.elementToBeClickable(element));\n }", "protected WebElement waitForElementToBeClickable(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n return element;\n }", "public void clickSubmitSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnSearchSubmit\"));\r\n\t\t\tclick(locator_split(\"btnSearchSubmit\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Sarch icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnSearchSubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "private void waitforvisibleelement(WebDriver driver2, WebElement signoutimg2) {\n\t\r\n}", "@Test\n public void testSearchBoxCategoriesList() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Go to Search Box in Header \" );\n log.info(\"Write urn \" );\n Actions builder = new Actions(driver);\n WebElement searchBox = driver.findElement(By.id(\"SearchInputs\")).findElement(By.tagName(\"input\"));\n searchBox.click();\n searchBox.sendKeys(\"urn\");\n WebElement categoryResults = driver.findElement(By.partialLinkText(\"category results\"));\n List<WebElement> categoryResultsList = driver.findElement(By.className(\"categories\")).findElements(By.tagName(\"a\"));\n WebDriverWait wait = new WebDriverWait(driver, 1000);\n wait.until(ExpectedConditions.elementToBeClickable(categoryResults));\n log.info(\"Click on first result from category suggestion list\" );\n categoryResultsList.get(0).click();\n log.info(\"Confirm that the link oppened contains searched term (urn in this case ) related results.\");\n assertTrue(driver.getCurrentUrl().contains(\"urn\"));\n }", "public void Search()\r\n {\r\n WaitTime(2000);\r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Logged in account!');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n \r\n driver.findElement(By.cssSelector(\"#searchData\")).sendKeys(\"samsung\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"a.searchBtn\")).click(); \r\n \r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Loaded Search Page');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n\r\n }", "static void test(WebDriver driver, String usrnm, String pwd) {\n\t\tWebElement usernameBox = driver.findElement(By.xpath(\"//input[@id='name']\"));\r\n\t\tWebElement passwordBox = driver.findElement(By.xpath(\"//input[@id='password']\"));\r\n\t\tWebElement loginButton = driver.findElement(By.xpath(\"//input[@type='submit']\"));\r\n\t\t\t\r\n\t\t// Send values to input boxes\t\t\r\n\t\tusernameBox.sendKeys(usrnm);\r\n\t\tpasswordBox.sendKeys(pwd);\r\n\t\tloginButton.click();\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\r\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"/html/body/div[4]/div[2]/div/div/div[1]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/div/div/div/div[2]/div[2]/div[2]/div/div/div/div[2]/div/table/tbody/tr[5]/td[2]/div/div\")));\r\n}", "public static void goTo() {\n\tBrowser.instance.findElement(maintenanceMenu).click();\r\n\tWebElement element = Browser.instance.findElement(By.linkText(\"Tender and Bag Maintenance\"));\r\n Actions action = new Actions(Browser.instance);\r\n action.moveToElement(element).build().perform(); \r\n Browser.instance.findElement(By.linkText(\"Bag Types\")).click();\r\n // WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n//\tBrowser.instance.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n}", "public void clickSearchButton() {\n\t\tsearchButton.click();\n\t}", "WebElement getSearchButton();", "public void handlingWaitToElement(By locator){\n WebDriverWait wait = new WebDriverWait(appiumDriver, 60);\n wait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }", "@Test\n\tpublic void HandleAjaxMethod(){\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"c:\\\\chromedriver.exe\");\n \tWebDriver driver = new ChromeDriver(); //launching the browser\n \tdriver.get(\"http://www.google.com\");\n \tdriver.manage().window().maximize(); //maximize\n \tdriver.findElement(By.name(\"q\")).sendKeys(\"kea\");\n \tWebDriverWait wait = new WebDriverWait(driver,30);\n \ttry{\n \t\t//need to wait for list of suggestions to appear after keying in\n \t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//*[@role='listbox']/li[1]\")));\n \t\tList <WebElement> list = driver.findElements(By.xpath(\"//*[@role='listbox']/li\"));\n \t\tfor(WebElement element : list){\n \t\t\tif(element.getText().equals(\"keanu reeves\")){\n \t\t\t\telement.click();\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}catch(NoSuchElementException e){\n \t\tSystem.out.println(\"No Such ELement Found\");\n }\n}", "public void searchProduct() throws InterruptedException {\n\n Thread.sleep(2000);\n\n if(isDisplayed(popup_suscriber)){\n click(popup_suscriber_btn);\n }\n\n if(isDisplayed(search_box) && isDisplayed(search_btn)){\n type(\"Remera\", search_box);\n click(search_btn);\n Thread.sleep(2000);\n click(first_product_gallery);\n Thread.sleep(2000);\n }else{\n System.out.println(\"Search box was not found!\");\n }\n\n }", "@Test\n public void testUserSearch() {\n try {\n //Navigate to users search page (faster this way)\n driver.get(\"http://stackoverflow.com/users\");\n \n wait(3);\n \n //Get user-search box; auto-polling by javascript; no submit() needed\n driver.findElement(By.id(\"userfilter\")).sendKeys(\"fojallupigi-4562\");\n \n wait(4);\n \n //determine if my username is the only result\n String username = driver.findElement(By.cssSelector(\".user-details > a:nth-child(1)\")).getText();\n assertEquals(\"fojallupigi-4562\", username);\n }\n catch(NoSuchElementException nsee) {\n fail();\n }\n }", "public void waitForElement(WebElement element) {\r\n\t\ttry {\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, timeout);\r\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.info(element.toString() + \" is not present on page or not clickable\");\r\n\t\t}\r\n\r\n\t}", "public WebElement waitForClickable(By locator, int timeOut)\n\t{\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\t\tWebDriverWait wait=new WebDriverWait(driver,timeOut);\n\t\treturn wait.until(ExpectedConditions.refreshed(ExpectedConditions.elementToBeClickable(locator)));\n\t}", "public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }", "public void waitForElementToBeClickable(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(webElement));\r\n\t}", "public void waitElementToBeClickable(WebElement webElement) {\n wait.until(ExpectedConditions.elementToBeClickable(webElement));\n }", "@When(\"^user clicks on search button$\")\n\tpublic void user_clicks_on_search_button() throws Throwable {\n\t\thomepage.waitForPageToLoad(\"Google\");\n\t\thomepage.waitForElementToBeClickable(homepage.searchButton);\n\t\thomepage.clickOnElementUsingJs(homepage.searchButton);\n\t}", "@Test\n\tpublic void testSearch() {\n driver.get(\"http://www.google.com\");\n // Alternatively the same thing can be done like this\n // driver.navigate().to(\"http://www.google.com\");\n\n driver.manage().window().maximize();\n // Find the text input element by its name\n WebElement element = driver.findElement(By.name(\"q\"));\n\n // Enter something to search for\n element.sendKeys(\"Cheese!\");\n\n // Now submit the form. WebDriver will find the form for us from the element\n element.submit();\n\n // Check the title of the page\n System.out.println(\"Page title is: \" + driver.getTitle());\n \n // Google's search is rendered dynamically with JavaScript.\n // Wait for the page to load, timeout after 10 seconds\n (new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {\n public Boolean apply(WebDriver d) {\n return d.getTitle().toLowerCase().startsWith(\"cheese!\");\n }\n });\n\n // Should see: \"cheese! - Google Search\"\n System.out.println(\"Page title is: \" + driver.getTitle());\n \n\t}", "@Test\n public void buscarProyectoConOrdenInvalida(){\n WebDriverWait wait = new WebDriverWait(driver, 30);\n ingenieria.completarProyecto(0,0);\n ingenieria.buscarProyecto();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"growlError_container\")));\n Assert.assertEquals(\"No existen datos en CRM para los datos ingresados\", driver.findElement(By.id(\"growlError_container\")).getText());\n //helper.captura(\"buscarProyectoConOrdenInvalida\");\n //driver.findElement(By.xpath(\"//a[text()='Salir']\")).click();\n }", "public boolean explixitWait(WebDriver driver, String xpath) \r\n\t{\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, Constants.WEB_DRIVER_WAIT);\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(getValue(xpath))));\r\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(By.xpath(getValue(xpath))));\r\n\t\t} \r\n\t\tcatch (Exception e) \r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@When(\"I click on the search button\")\n\tpublic void i_click_on_search_button() {\n\t\tdriver.findElement(By.xpath(searchbtn)).click();\n\t}", "@Test(enabled = true)\n public void searchForFlight() throws InterruptedException {\n driver.findElement(By.xpath(\"//*[@id='uitk-tabs-button-container']/li[2]\")).click();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//button[contains(@aria-label,'Going to')]\")).sendKeys(Keys.ARROW_DOWN);\n Thread.sleep(15000);\n\n //d1-btn\n\n }", "public static void waitForClickable(By by, int time)\n {\n WebDriverWait wait = new WebDriverWait(driver,time);\n wait.until(ExpectedConditions.elementToBeClickable(by));\n }", "public static void waitForelementClickable(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.elementToBeClickable(by));\n }", "@Test(priority = 1)\n\n public void test_Search_Appear_WikiLink() {\n\n resultsPage.clickWikiResult();\n\n // Go the next page\n// wikiPage = new WikiPage(driver);\n\n //Wait until QA Wikipedia page is loaded\n WebDriverWait wait = new WebDriverWait(driver, 10);\n wait.until(ExpectedConditions.elementToBeClickable(By.className(\"noprint\")));\n\n //Verify the URL is wiki URL\n String URL = driver.getCurrentUrl();\n Assert.assertEquals(URL, \"https://en.wikipedia.org/wiki/Quality_assurance\" );\n\n }", "public void clickIfExists() {\n try {\n\n waitTillElementVisible(5000);\n mouse.click(driver, locator);\n\n } catch (Exception e) {\n log.error(\"exception :\", e);\n }\n }", "public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Test\n public void searchingItem() throws InterruptedException {\n ChromeDriver driver = openChromeDriver();\n driver.get(\"https://www.knjizare-vulkan.rs/\");\n WebElement cookieConsent = driver.findElement(By.xpath(\"//button[@class='cookie-agree 3'][.//span[contains(text(), 'Slažem se')]]\"));\n WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(3));\n\n wait.until(ExpectedConditions.visibilityOf(cookieConsent));\n cookieConsent.click();\n\n WebElement searchLocator = driver.findElement(By.xpath(\"//div[@data-content='Pretraži sajt']\"));\n searchLocator.click();\n\n\n WebElement searchField = driver.findElement(By.id(\"search-text\"));\n Thread.sleep(2000);\n\n\n searchField.click();\n searchField.clear();\n searchField.sendKeys(\"Prokleta avlija\");\n searchField.sendKeys(Keys.ENTER);\n\n WebElement numberOfProducts = driver.findElement(By.xpath(\"//div[@class='products-found']\"));\n if (numberOfProducts != null) {\n System.out.println(\"The book with title Prokleta avlija is found. \");\n } else{\n System.out.println(\"Product is not found. \");\n }\n\n\n\n\n\n\n }", "public void navigateTo(){\n this.driver.get(\"xyz.com\");\n this.wait.until(ExpectedConditions.visibilityOf(firstName));\n }", "public void clickSalvar (){driver.findElement(botaoSalvar).click();}", "public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}", "@Test //Test to see you are able to buy policy and confirmation page is displayed\n public void policyConfirmationTest() throws InterruptedException {\n \t WebElement submitPolicy=driver.findElement(By.xpath(\"/html/body/center/form/center[3]/pre/input[3]\"));\n \t submitPolicy.click();\n \t assertTrue(driver.findElement(By.xpath(\"/html/body/center[2]/h3\")).isDisplayed()); \n\t Thread.sleep(3000);\n\t driver.close();\n\n}", "void letterWait(String path) {\n WebDriverWait newsWait = new WebDriverWait(chrome, 3);\n try {\n newsWait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(path)));\n chrome.findElement(By.xpath(path)).click();\n\n } catch (Throwable e) {\n// e.printStackTrace();\n }\n }", "public void waitForInvisibilityOfWebElement(By locator){\r\n\t\twait.until(ExpectedConditions.invisibilityOfElementLocated(locator));\r\n\t}", "@Test\n public void testAdvancedSearchResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.className(\"btn-standard\"));\n searchCassette.click();\n searchCassette.clear();\n log.info(\"Click in Search Casetter and introduce search term sculpture\" );\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Confirm Adavanced Search Page by keywords=sculpture is displayed in browser\" );\n assertTrue(driver.getCurrentUrl().contains(\"keywords=sculpture\"));\n }", "@Test(priority=14)\n\tpublic void verifySearchFieldDisplayedAlongWithPlaceHolderTextAndCrossIconByClickingSeachIcon() throws Exception {\n\t\tOverviewTradusPROPage overviewPage = new OverviewTradusPROPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver, overviewPage.SearchIconOnHeader);\n\t\tclick(overviewPage.SearchIconOnHeader);\n\t\twaitTill(2000);\n\t\tAssert.assertTrue(verifyElementPresent(overviewPage.SearchFieldOnHeader),\n\t\t\t\t\"Search field is not displaying upon clicking search icon on header\");\n\t\tAssert.assertTrue(getText(overviewPage.SearchFieldOnHeader).equals(\"Search...\"),\n\t\t\t\t\"Place holder text is not displaying on search field by clicking on search icon\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewPage.crossIconOnSearchField),\n\t\t\t\t\"Cross icon is not displaying on search field upon clicking search icon on header\");\n\n\t}", "@Test\n public void testAdvancedSearchPage() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n log.info(\"Confirm Adavanced Search Page is displayed in browser\" );\n assertTrue(driver.getCurrentUrl().contains(\"search-advanced\"));\n }", "@Test\n public void buscarProyectoSinCompletarOrden(){\n WebDriverWait wait = new WebDriverWait(driver, 30);\n ingenieria.buscarProyecto();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"growlError_container\")));\n Assert.assertEquals(\"Debe ingresar al menos un campo de busqueda.\", driver.findElement(By.id(\"growlError_container\")).getText());\n //helper.captura(\"buscarProyectoSinCompletarOrden\");\n }", "private void waitForNextNews(final WebDriver webDriver) {\r\n\t\tfinal WebDriverWait wait = new WebDriverWait(webDriver, WAIT_SECONDS);\r\n\t\twait.until(\r\n\t\t\tExpectedConditions.elementToBeClickable(By.className(\"tbutton\"))\r\n\t\t);\r\n\t}", "protected void waitForElementToDisplay(By locator, int timeInSeconds) {\n\t\twait = new WebDriverWait(driver, timeInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t}", "public void waitForElementVisibility(String locator) {\n \t WebDriverWait wait = new WebDriverWait(driver, 10);\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(autoLocator(locator)));\n }", "@Test(enabled = true)\n public void registraionPage() throws InterruptedException {\n driver.findElement(By.xpath(\"//a[contains(.,'Sign up, it’s free')]\")).click();\n Thread.sleep(2000);\n\n\n String expected = \"Show us your human side...\";\n String actual = driver.findElement(By.xpath(\"//h1[contains(.,'Show us your human side')]\")).getText();\n\n Assert.assertEquals(actual, expected, \"Test Failed. Registration page could not be reached.\");\n\n\n }", "@Then(\"^click on search button to list the buses$\")\n\tpublic void click_on_search_button_to_list_the_buses() throws Throwable {\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.xpath(\"//button[text()='Search Buses']\")).sendKeys(Keys.ENTER);\n\t\tThread.sleep(7000);\n//\t WebElement click = driver.findElementByXPath(\"//button[text()='Search Buses']\");\n//\t\tActions obj = new Actions(driver);\n//\t\tobj.moveToElement(click).perform();\n\t \n\t\t//closeDriver();\n\t\t//quitDriver();\n\t\t\n\t\t\n\t}", "public void ClickSearch() {\r\n\t\tsearch.click();\r\n\t\t\tLog(\"Clicked the \\\"Search\\\" button on the GIS Locator page\");\r\n\t}", "public void clickWhenReady(final By by, int timeoutInSeconds)\n {\n WebDriverWait myWait = new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS);\n ExpectedCondition<Boolean> conditionToCheck = new ExpectedCondition<Boolean>()\n {\n public Boolean apply(final WebDriver input)\n {\n try\n {\n driver.findElement(by).click();\n return true;\n }\n catch (ElementNotFoundAfterTimeoutError e)\n {\n return false;\n }\n }\n };\n myWait.ignoring(StaleElementReferenceException.class).until(conditionToCheck);\n }", "@Test\n\tpublic void testSearchButtonExists() {\n\t\telement = driver.findElement(By.name(\"submit_search\"));\n\n\t\t// Asserts that the element isn't null\n\t\tAssert.assertNotNull(element);\n\t}", "void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}", "@Then(\"^Flight Search Screen is displayed$\")\n\tpublic void verify_flight_search_screen() throws InterruptedException, IOException {\n\t\tdriver.findElement(By.id(\"option-0-1-0\")).click();\n\n\t}", "@Test\n public void explicitWait() {\n WebDriverWait wait = new WebDriverWait(driver, 10);\n driver.get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n WebElement removeButton = driver.findElement(By.xpath(\"//button[@type='button']\"));\n removeButton.click();\n //WebElement goneMessage=driver.findElement(By.id(\"message\"));\n WebElement goneMessage = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"message\")));\n String expectedMessage = \"It's gone!\";\n Assert.assertEquals(goneMessage.getText(), expectedMessage);\n\n }", "public void waitForElementVisibility(WebDriver driver, WebElement element)\n\t\t{\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,20);\n\t\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t\t}", "public static void waitForClickable(WebElement element, int timer, WebDriver driver) {\n\n\t\t// Wait for the static element to appear\n\t\tWait<WebDriver> exists = new WebDriverWait(driver, timer).withMessage(\"Element not clickable\");\n\n\t\texists.until(ExpectedConditions.refreshed(ExpectedConditions.elementToBeClickable(element)));\n\n\t}", "@Test\r\n\tpublic void test_3and4_Search() {\n\t\tdriver.findElement(By.id(\"twotabsearchtextbox\")).sendKeys(searchKey);\r\n\t\t// click on search button\r\n\t\tdriver.findElement(By.id(\"nav-search-submit-text\")).click();\r\n\t\t// use JavaScriptExecutor to scroll on page\r\n\t\t// cast driver to JavaScriptExecutor\r\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\r\n\t\t// try to get \"results for\" text on web page \r\n\t\t// if it is found then search is successful \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='s-result-count']\"));\r\n\t\tString resultFound = element.getText();\r\n\t\tAssert.assertTrue(resultFound.contains(\"results for\"));\r\n\t\tSystem.out.println(\"Search for Samsung is passed\");\r\n\t}", "public void searchCriteria(WebDriver driver) throws InterruptedException\r\n\t {\r\n\t\t try\r\n\t\t {\r\n\t\t\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \r\n\t\t\t driver.findElement(By.id(\"filter_purchaserEmail\")).clear();\r\n\t driver.findElement(By.id(\"filter_purchaserEmail\")).sendKeys(purchaserEmail);\r\n\t \r\n\t driver.findElement(By.id(\"filter_code\")).clear();\r\n\t driver.findElement(By.id(\"filter_code\")).sendKeys(code);\r\n\t \r\n\t driver.findElement(By.id(\"search\")).click();\r\n\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t\t \r\n\t redeemerEmail = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[3]\")).getText();\r\n\t System.out.println(\"redeemerEmail:\"+redeemerEmail);\r\n\t \r\n\t creditsOnGifts = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[6]\")).getText();\r\n\t System.out.println(\"creditsOnGifts:\"+creditsOnGifts);\r\n\t \r\n\t codeActive = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[7]\")).getText();\r\n\t System.out.println(\"codeActive:\"+codeActive);\r\n\t \r\n\t Thread.sleep(10000);\r\n\t //driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t refunded = driver.findElement(By.xpath(\"//tr[td[contains(text(),'\"+purchaserEmail+\"')]]/td[8]/span\")).getText();\r\n\t System.out.println(\"refunded:\"+refunded);\r\n\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \r\n\t //Condition to check view more details\r\n\t if(redeemerEmail.equalsIgnoreCase(TestConstants.NOT_REDEEMED) && codeActive.equalsIgnoreCase(TestConstants.STATUS_YES) && refunded.equalsIgnoreCase(TestConstants.STATUS_NO))\r\n\t {\r\n\t \t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t \t System.out.println(\"Before View More Detail\");\r\n\t \t driver.findElement(By.xpath(\"//a[contains(text(),'View More Detail')]\")).click();\r\n\t \t System.out.println(\"After View More Detail\");\r\n\t \t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t }\r\n\t \r\n\t System.out.println(\"Try block\");\r\n\t }catch(NoSuchElementException e)\r\n\t\t {\r\n\t \t e.printStackTrace();\r\n\t \t System.out.println(\"Catch block\");\r\n\t\t }\r\n\t}", "public void clickMyServices() {\n driver.findElement(myServices).click();\n }", "@When(\"^Click on Register Button$\")\npublic void click_on_Register_Button() throws Throwable {\n\tdriver.findElement(By.id(\"registration_submit\")).click();\n\tSystem.out.println(\"Successfuly completed the regitration process\");\n \n}", "public static void waitForElement(WebDriver driver, WebElement element) throws Exception {\n\t\tWebDriverWait wait = new WebDriverWait(driver, 80);\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t\tThread.sleep(1000);\n\t}", "public static void waitForClick(AndroidDriver<AndroidElement> androidDriver, By element){\r\n\t\tWebDriverWait wait= new WebDriverWait(androidDriver, 30);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n\t}", "@Test\r\npublic void testGoogleSearch() throws Exception {\ndriver.get(\"https://igartc01.swg.usma.ibm.com/jazz/web/projects/IGA%20Rational%20Core%20Account%20Team#action=com.ibm.team.dashboard.viewDashboard\");\r\nThread.sleep(5000);\r\nWebElement username = driver.findElement(By.xpath(\"//input[@name='j_username' and @id='jazz_app_internal_LoginWidget_0_userId']\"));\r\nusername.click();\r\nusername.clear();\r\nusername.sendKeys(\"sumukhej@in.ibm.com\");\r\nThread.sleep(2000);\r\n\r\n//enter the password\r\nWebElement pwd = driver.findElement(By.xpath(\"//input[@name='j_password' and @id='jazz_app_internal_LoginWidget_0_password']\"));\r\npwd.click();\r\npwd.sendKeys(\"Pappisong14\");\r\nThread.sleep(2000);\r\n\r\n//button click\r\nWebElement btn = driver.findElement(By.xpath(\"//button[@type='submit']\"));\r\nbtn.click();\r\nThread.sleep(10000);\r\n\r\nif(driver.getPageSource().contains(\"Rational Account A\")){\r\n\tSystem.out.println(\"Verified.. This is the Dashboard Page\");\r\n}\r\nelse{\r\n\tSystem.out.println(\"Wrong page!!!\");\r\n}\r\n\r\n}", "private void waitForElementToBeLoad(String string) {\n\t\n}", "@Given(\"^User enters the URL$\")\r\npublic void user_enters_the_URL() throws Throwable {\r\n\tdriver.get(prop.getProperty(\"url\"));Thread.sleep(4000);\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n\t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n}", "private static boolean isElementClickable(WebDriver driver, By by) {\n\t\tWebElement element;\n\t\ttry {\n\t\t\telement = driver.findElement(by);\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public void ImplicitlyWait_PageLoadTimeout() throws InterruptedException {\r\n\t//declaration of chrome driver\r\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\chromedriver.exe\");\r\n\t WebDriver driver=new ChromeDriver(); \r\n\t \r\n\t\t\tdriver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);\r\n\t\t\t\r\n\t //Navigated to the webpage\r\n\tdriver.get(\"https://contentstack.built.io\");\r\n \tdriver.findElement(By.linkText(\"Forgot password?\")).click();\r\n \t\r\n //driver.quit();\r\n}", "public void clickbtnFilter() {\n\t\twaitForElementClickable(10,btnFilter);\n\t\tclickByJavaScript(btnFilter);\n\t\tsleep(3);\n\t}", "public void doLogin() // @Test(priority = 1, enabled = false)\r\n\t {\r\n\t //do some stuff to trigger a login\r\n\t // assertEquals(\"My Logged In Page\", driver.getTitle());\r\n\t\t //AssertJUnit.assertEquals(driver.getTitle(),\"Selenium Easy - Best Demo website to practice Selenium Webdriver Online\");\r\n\t\t \r\n\t\t\r\n\t\t//driver.navigate().to(baseURL_LC); //driver.navigate().to(\"http://seleniumsimplified.com\");\r\n\t\t\r\n\t\t//boolean bbbc = driver.getTitle().startsWith(\"Selenium Simplified - Automated Browser Testing\");\t\t\r\n\t\tString bbbd = driver.getTitle(); System.out.println(bbbd);\r\n\t\t\r\n\t\twaiting(1000);\r\n\t\r\n\t\tString agreementHeading = driver.findElement(By.className(\"tb-license-heading\")).getText();\r\n\t\tSystem.out.println(\"Heading: \"+ agreementHeading ); \r\n\t\t\t\t\t\t\r\n\t\t\r\n\t\tString agreementTEXT = driver.findElement(By.className(\"tb-agreementText\")).getText(); // tb-agreementText\r\n\t\t// stop printing agreement System.out.println(\"Heading: \"+ agreementTEXT );\r\n\t\tthis.waiting(1500); \t\t\t//\tdriver.findElement(By.className(\"tb-agreementText\")).click();\r\n\t\t\r\n\t\t\r\n\t\tString agreementClearfix = driver.findElement(By.className(\"modal-footer-custom\")).getText(); // tb-agreementText\r\n\t\tSystem.out.println(\"Accept Text : \" + agreementClearfix ); //driver.findElement(By.className(\"modal-footer-custom\")).sendKeys(Keys.ENTER);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"tb_accpt_lic_agrmnt_txt\")).click();\r\n\t\tdriver.findElement(By.xpath(\"//b[contains(text(),'Continue')]\")).click();\r\n\t\t\r\n\t\t\r\n\t}", "public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}", "public WebElement elementToBeClickable(By by) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.elementToBeClickable(by));\n }", "public WebElement waitForElementToBeClickable(final WebElement webElement)\n {\n // waits for the save to be registered before performing next action.\n System.out.println(\"Wait for clickable \" + webElement);\n return new WebDriverWait(driver,\n DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS).ignoring(\n WebDriverException.class).ignoring(StaleElementReferenceException.class).\n until(ExpectedConditions.elementToBeClickable(webElement));\n }", "public void clickOnFindlocations() {\n\t\tsFunName = \"clickOnFindlocations\";\n\t\tLogger.info(\"Inside : clickOnFindlocations\");\n\t\tLogger.info(sFunName + \" : Verify and Click on Find Locations link\");\n\t\tbStatus = util.explicitlyWaitUntilElementIsPresent(findLlocationsLink);\n\t\tAssert.assertTrue(bStatus, \"Service Search Text field not Found\");\n\t\tfindLlocationsLink.click();\n\t}", "public void searchProduct(String product){\n driver.findElement(By.id(\"search_query_top\")).sendKeys(product);\n List<WebElement> options = driver.findElements(By.className(\"ac_results\"));\n for(WebElement option:options){\n if(option.getText().equalsIgnoreCase(\"printed dress\")){\n option.click();\n break;\n }\n }\n driver.findElement(By.name(\"submit_search\")).click();\n }", "@Given(\"^User navigates to the URL$\")\r\npublic void user_navigates_to_the_URL() throws Throwable {\r\n\tdriver.get(prop.getProperty(\"url\"));Thread.sleep(4000);\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n\t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n}", "public void waitForElementsPresent(By by,int time){\n WebDriverWait wait = new WebDriverWait(driver,time);\n wait.until(ExpectedConditions.presenceOfElementLocated(by));\n }", "public static void waitUntilElementIsVisible(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.visibilityOf(element));\n }", "public boolean waitforelement(int timeout,By by){\n\t\twhile(timeout>0){\n\t\t\tsleep(1);\n\t\t\tList<WebElement> list = driver.findElements(by);\n\t\t\tif(list.size()!=0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ttimeout--;\n\t\t}\n\t\tSystem.out.println(\"waiting timeout.... Element not found \" +by.toString());\n\t\treturn false;\n\t}", "@Test\n @Then(\"Name of first item is entered in search field\")\n public void s14_SearchByName(){\n searchByNameHP = driver.findElementById(\"header-search\");\n searchByNameHP.sendKeys(checkFirstHP);\n System.out.println(\"Step14 PASSED\");\n }", "protected WebElement waitForElementToBeVisible(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.visibilityOf(element));\n return element;\n }", "public void waitForVisibilityOfElement(WebElement element) {\n\t\twait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t}", "public void waitAndClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\telement.click();\r\n\t}", "public Result clickSearch() {\n\t\tthis.searchButton.click();\r\n\t\treturn new Result(driver);\r\n\t}", "public static void WebDriverExplicitWait(WebDriver driver, int timeoutInSeconds, String by, String locator) {\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeoutInSeconds);\r\n\t\tif (by.equalsIgnoreCase(\"id\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.id(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"name\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.name(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"tagName\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.tagName(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"className\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"linkText\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"partialLinkText\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"cssSelector\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"xpath\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locator)));\r\n\t}", "public void BuscarTarea () throws IOException, InterruptedException {\n sleep(1000);\n waitVisibilityOfElement(Searchtask);\n Searchtask.sendKeys(\"Tarea Zeus Automatizar_TesZai\");\n //driver.findElement(By.xpath(\"//*[@text='Tarea Automatización Zeus']\")).click();\n }", "public static void searchInvalidProduct() throws InterruptedException {\n// 4- test case: search for in search box\n//********************************** step 1 open browser and navigate to url***************************\n // Open Browser and Navigate to URL\n browseSetUp(chromeDriver, chromeDriverPath, url);\n//****************************************<step 2- enter keyword in search box>**********************\n Thread.sleep(2000);\n driver.findElement(By.xpath(\"//*[@id=\\\"headerSearch\\\"]\")).sendKeys(\"milk \");\n Thread.sleep(3000);\n//*******************************************<step 3- click on the search button>**********************************\n driver.findElement(By.cssSelector(\".SearchBox__buttonIcon\")).click();\n//*******************************************<step 4- select the item>**********************************\n driver.findElement(By.cssSelector(\"#products > div > div.js-pod.js-pod-0.plp-pod.plp-pod--default.pod-item--0 > div > div.plp-pod__info > div.pod-plp__description.js-podclick-analytics > a\")).click();\n Thread.sleep(5000);\n//*******************************************<step 5- click to add the item to the cart>**********************************\n driver.findElement(By.xpath(\"//*[@id=\\\"atc_pickItUp\\\"]/span\")).click();\n Thread.sleep(6000);\n driver.close();\n\n\n }", "private void clickInvite(){\n WebDriverHelper.clickElement(inviteButton);\n }" ]
[ "0.7491771", "0.7258762", "0.71828693", "0.71279705", "0.70871633", "0.70541275", "0.70013624", "0.6963946", "0.693628", "0.6892744", "0.6873637", "0.685801", "0.68000436", "0.67727304", "0.6772009", "0.67667043", "0.67470706", "0.67241704", "0.6720532", "0.67154944", "0.6695933", "0.66912156", "0.6680887", "0.66774213", "0.66554946", "0.6631837", "0.66171134", "0.66090935", "0.66053516", "0.6601191", "0.65908563", "0.65849864", "0.6546128", "0.6536826", "0.6530204", "0.65289587", "0.6524488", "0.6512279", "0.6483041", "0.6462352", "0.6461277", "0.64516675", "0.64460325", "0.6410316", "0.640676", "0.6383955", "0.6358308", "0.635741", "0.6356315", "0.63356197", "0.63254166", "0.6324799", "0.63114494", "0.6309472", "0.63069016", "0.6305024", "0.63032734", "0.62826216", "0.62768406", "0.6263035", "0.62459683", "0.6245637", "0.62440985", "0.6244004", "0.62408423", "0.62245315", "0.6224127", "0.62144876", "0.6206463", "0.6189531", "0.61844575", "0.6183709", "0.6183324", "0.61823666", "0.6177372", "0.61726224", "0.6170066", "0.6167146", "0.61642694", "0.6158608", "0.61543447", "0.6154324", "0.61509174", "0.6150713", "0.61427325", "0.61309963", "0.6127224", "0.61229074", "0.61101496", "0.610737", "0.60986364", "0.6097088", "0.609577", "0.60955596", "0.60939586", "0.60927826", "0.6081022", "0.60716724", "0.6065755", "0.6063714", "0.60603535" ]
0.0
-1
stop if not rendered
public void process(FacesContext faces, PhaseId phase) { if (!isRendered()) return; // validate attributes _validateAttributes(); // clear datamodel _resetDataModel(); // reset index _captureOrigValue(); _setIndex(-1); try { // has children if (getChildCount() > 0) { int i = getOffset(); int end = getSize(); int step = getStep(); end = (end >= 0) ? i + end : Integer.MAX_VALUE - 1; // grab renderer String rendererType = getRendererType(); Renderer renderer = null; if (rendererType != null) { renderer = getRenderer(faces); } _count = 0; _setIndex(i); while (i <= end && _isIndexAvailable()) { if (PhaseId.RENDER_RESPONSE.equals(phase) && renderer != null) { renderer.encodeChildren(faces, this); } else { for (UIComponent child : getChildren()) { if (PhaseId.APPLY_REQUEST_VALUES.equals(phase)) { child.processDecodes(faces); } else if (PhaseId.PROCESS_VALIDATIONS.equals(phase)) { child.processValidators(faces); } else if (PhaseId.UPDATE_MODEL_VALUES.equals(phase)) { child.processUpdates(faces); } else if (PhaseId.RENDER_RESPONSE.equals(phase)) { child.encodeAll(faces); } } } ++_count; i += step; _setIndex(i); } } } catch (IOException e) { throw new FacesException(e); } finally { _setIndex(-1); _restoreOrigValue(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void render() {\n if (renderInterrupted) {\n log.debug(\"render()\");\n renderInterrupted = false;\n }\n\n }", "public void render() {\n\t\t// do nothing... as we should\n\t}", "@Override\n public boolean isToBeRendered()\n {\n return true;\n }", "public void unRender() {\n\t\tif (this.isPlaying) {\n\t\t\ttry {\n\t\t\t\tthis.mMediaPlayer.stop();\n\t\t\t\tLog.w(\"AUDIO PLAYER\", \"should have just stopped\");\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void terminateAnimation() {\n doRun = false;\n }", "@Override\n protected boolean isFinished() \n {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n\tpublic void render() {\n\t\t// only render it when visible is true\n\t\tif (visible == false) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tsuper.render();\n\t\t}\n\t}", "public abstract boolean isRendered();", "@Override\n public void resume() {\n log.debug(\"resume()\");\n // set renderInterrupted to true\n renderInterrupted = true;\n\n }", "@Override\n public void run() {\n webView.getEngine().load(null);\n frame.setVisible(false);\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "@Override\n protected boolean isFinished()\n {\n return false;\n }", "@Override\n\tpublic void stop() {\n\t\tif (view != null)\n\t\t\tview.stop();\n\t}", "@Override\n\tpublic void stop() {\n\t\tsetAccelerate(false);\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n public boolean isRendered() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n if (!context.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE)) {\r\n Integer index = getView().getActiveRowIndex();\r\n return super.isRendered() && index != null && index > -1;\r\n }\r\n return super.isRendered();\r\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n public void stop() {\n f.setVisible(false);\n }", "@Override\n boolean isFinished() {\n return false;\n }", "@Override\n public boolean shouldStop() {\n return this.stop;\n }", "@Override\n public void pause() {\n log.debug(\"pause()\");\n // reset renderInterrupted\n renderInterrupted = true;\n\n }", "@Override\n public void setToBeRendered(boolean arg0)\n {\n \n }", "public void stop(){\n return;\n }", "@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\r\n\treturn false;\r\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "public void run() {\n if (mStopping)\n return;\n if (mFailed) {\n // render didn't complete (probably got cancelled)\n // remove from the view (but we may still get cached)\n removeFromViews();\n }\n // the views may be null/empty if we were removed from it while\n // queued by the handler\n if (mViews != null && !mViews.isEmpty()) {\n try {\n for (View view : mViews) {\n // we are safe to update this view,\n // if another task had been started on the view\n // the view would have already have been removed from\n // our set\n update(view, mRender, mPass - 1);\n }\n } finally {\n if (mPass < mPasses) {\n // reschedule again if we need to perform more passes\n enqueue();\n } else {\n // we're done, remove us from all our views\n // we lose the ability to avoid doing the same rendering\n // for the same view (very rare)\n // but this is worth it, so that we can re-use the\n // render from the cache (much more likely)\n removeFromViews();\n }\n }\n }\n // try putting us into the cache\n encache();\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "public void stop() {\n\n\t\tif (!started.compareAndSet(true, false)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Stopping panel rendering and closing attached webcam\");\n\n\t\tupdater.stop();\n\t\tupdater = null;\n\n\t\timage = null;\n\n\t\ttry {\n\t\t\terrored = !webcam.close();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n public boolean step() {\n return false;\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}", "boolean shouldStop();", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }" ]
[ "0.68499184", "0.646098", "0.64540404", "0.64429414", "0.62296057", "0.61776507", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.6158329", "0.615757", "0.61491233", "0.61425143", "0.61373144", "0.6128264", "0.6124588", "0.6124588", "0.6122758", "0.6094621", "0.60828906", "0.606022", "0.6052107", "0.6052107", "0.60156053", "0.59904236", "0.59904236", "0.5989863", "0.5974602", "0.596684", "0.59629637", "0.59446895", "0.5904376", "0.5901228", "0.5885837", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.58792", "0.5878063", "0.5869158", "0.5869158", "0.5869158", "0.5869158", "0.5869158", "0.5869158", "0.5869158", "0.5869158", "0.5869158", "0.5845904", "0.58390677", "0.58390677", "0.58390677", "0.58390677", "0.58390677", "0.5833922", "0.58123803", "0.58123803", "0.58117294", "0.5795852", "0.57951504", "0.57797706", "0.57685506", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749", "0.5764749" ]
0.0
-1
call this to create a new eatery by reading in the filepath
public ArrayList<Dish> ReadInEatery(String filepath, String name) { _dishes = new ArrayList<Dish>(); try{ int sucess = readMeals(name, filepath); if (sucess == -1) { JOptionPane.showMessageDialog(null, "Failure to find, create, or parse text file of nutrition information in /tmp directory"); return null; } else if (sucess == 0) { return null; } else { return _dishes; } }catch(Exception e){ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Data() throws IOException {\n // Initialise new default path from scratch\n path = Path.of(\"src/main/data/duke.txt\");\n new File(\"src/main/data\").mkdirs();\n new File(path.toString()).createNewFile();\n }", "public Data(String path) throws IOException {\n this.path = Paths.get(\"src/main/data/duke.txt\").toAbsolutePath();\n if (Files.notExists(this.path)) {\n new File(String.valueOf(path)).createNewFile();\n }\n }", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "@SuppressWarnings(\"unused\")\r\n\tprivate static File createFile(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile currentFile = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// check if it is a valid file\r\n\t\tif (currentFile == null) {\r\n\t\t\tSystem.out.println(\"Could not create the file\");\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\r\n\t\t// hopefully things went perfect\r\n\t\treturn currentFile;\r\n\r\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "public static void init(){\n Path path = FileDirectoryUtil.getPath(\"src\", \"fileIO\", \"test.txt\");\n FileDirectoryUtil.tryCreateDirectory(path);\n\n // Try to create the file\n path = Paths.get(path.toAbsolutePath().toString(), \"test.txt\");\n FileDirectoryUtil.tryCreateFile(path);\n\n // Print out the final location of the file\n System.out.println(path.toAbsolutePath());\n\n // Try to write to the file\n IOUtil.tryWriteToFile(getContent(), path);\n\n // Try to print the content of the file\n IOUtil.tryPrintContents(path);\n\n }", "App () throws Exception {\n timelines = new LinkedList<>();\n deleteElements = new LinkedList<>();\n file.createNewFile();\n }", "public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }", "public TweetParser(Path path) {\t\t\t\t\t\n\t\t\n\t}", "public Duke(String filePath) {\n ui = new Ui();\n storage = new Storage();\n taskList = new TaskList();\n parser = new Parser(taskList);\n\n try {\n storage.loadFromFile(filePath + \"/duke.txt\", taskList);\n } catch (FileNotFoundException e) {\n ui.printHorizontalLine();\n ui.printFileCreatedMessage(filePath);\n }\n }", "@Override\n public void construct() throws IOException {\n \n }", "private File loadFile() throws IOException {\r\n File file = new File(filePath);\r\n if (!file.exists()) {\r\n File dir = new File(fileDirectory);\r\n dir.mkdir();\r\n File newFile = new File(filePath);\r\n newFile.createNewFile();\r\n return newFile;\r\n } else {\r\n return file;\r\n }\r\n }", "Storage(String filepath) {\n this.filepath = filepath;\n tasks = new ArrayList<>();\n parser = new Parser();\n }", "public Storage(String filePath) {\n file = new File(filePath);\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n System.err.println(\"Unable to create file\");\n }\n }", "public ActionScriptBuilder createFile(String filecontents, String filepath){\n\t\treturn createFile(filecontents,filepath,true);\n\t}", "public Board createBoard(String inputFileName) {\nList<String> ants = new ArrayList<>();\n\nint rows = 0;\nrows = getMatrixSize(inputFileName);\n\nBoard b = new Board(rows, rows);\n\nants = findAnts(inputFileName);\nfor (int k = 0; k < ants.size(); k++) {\nString firstAnt = ants.get(k);\nString[] firstAntSplitted = firstAnt.split(\" \");\nString name = \"\";\nint posX = 0;\nint posY = 0;\n\nname = firstAntSplitted[2];\nposX = Integer.parseInt(firstAntSplitted[0]);\nposY = Integer.parseInt(firstAntSplitted[1]);\n\nAnt a = new Ant(name);\n\n\nb.placeAnt(posX, posY, a);\n}\nreturn b;\n}", "public static void createOrOpenTasksFile() {\n try {\r\n File tasksFile = new File(\"tasks.txt\");\r\n if (tasksFile.createNewFile()) {\r\n System.out.println(\"\\nFiles \" + tasksFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + tasksFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "private void createRecipeFromFile() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers,\n // it would be \"*/*\".\n intent.setType(\"*/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public static void createFile(String path) {\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the file name :\");\n String filepath = path+\"/\"+scanner.next();\n File newFile = new File(filepath);\n newFile.createNewFile();\n System.out.println(\"File is Created Successfully\");\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "public Iris(String filePath) {\n STORAGE = new Storage(filePath);\n try {\n STORAGE.readTasks(TASKS);\n } catch (IrisException exception) {\n System.out.printf(\"An error has occurred: %s%n\", exception.toString());\n }\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tFile f = new File(\"c:\\\\Ranjan\", \"ranjan1.txt\");\n\t\tf.createNewFile();\n\t\t\n\t\tSystem.out.println(f.getPath());\n\t\tSystem.out.println(f);\n\t}", "public FilePartReader() {\n filePath = \"/home/cc/Desktop/OopModule/testing/filepartreader-testing-with-junit-grzechu31/text.txt\";\n fromLine = 1;\n toLine = 10;\n }", "@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }", "public Plain(String inputFileName) throws FileNotFoundException {\n File fileReader = new File(inputFileName);\n Scanner fileScanner = new Scanner(fileReader);\n while (fileScanner.hasNextLine()) {\n width++;\n fileScanner.nextLine();\n }\n fileScanner.close();\n Scanner scanner = new Scanner(fileReader);\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n System.out.println(\"... reading ...\");\n while (scanner.hasNext()) {\n for (int j = 1; j < grid.length - 1; j++) {\n for (int k = 1; k < grid[j].length - 1; k++) {\n String nextFileObj = scanner.next();\n char firstLetter = nextFileObj.charAt(0);\n int animalAge = 0;\n if (nextFileObj.length() == 2) {\n animalAge = Character.getNumericValue(nextFileObj.charAt(1));\n }\n switch (firstLetter) {\n case 'B':\n grid[j][k] = new Badger(plain, j, k, animalAge);\n break;\n case 'E':\n grid[j][k] = new Empty(plain, j, k);\n break;\n case 'F':\n grid[j][k] = new Fox(plain, j, k, animalAge);\n break;\n case 'G':\n grid[j][k] = new Grass(plain, j, k);\n break;\n case 'R':\n grid[j][k] = new Rabbit(plain, j, k, animalAge);\n break;\n default:\n grid[j][k] = null;\n break;\n }\n }\n }\n }\n scanner.close();\n System.out.println(\" reading complete \");\n }", "public void createStorageFile() throws IoDukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "void initializeFile(MyCalendar cal, File file) {\n\n\t\tString path = System.getProperty(\"user.dir\");\n\t\tString fName = path+\"/events.txt\";\n\t\ttry {\n\t\t\tFile events = file;\n\t\t\tif(file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line = br.readLine(); \n\n\t\t\t\tString name = null;\n\t\t\t\tString second = null;\n\t\t\t\tif(line != null) {\n\t\t\t\t\twhile(line!=null) {\n\t\t\t\t\t\tname = line;\n\t\t\t\t\t\tsecond = br.readLine();\n\t\t\t\t\t\tString[] arr = null;\n\t\t\t\t\t\tif(!br.equals(\"\")) {\n\t\t\t\t\t\t\tarr = second.split(\" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(arr.length == 5) {\n\t\t\t\t\t\t\tcal.createRecurringFromFile(name, arr);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(arr.length == 3) {\n\t\t\t\t\t\t\tcal.createEventFromFile(name, arr);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//initializeFile(file);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t}\n\t\tcatch(Exception x){\n\t\t\tx.printStackTrace();\n\t\t}\n\t}", "public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}", "public Duke(String filePath) {\n this.ui = new Ui();\n this.storage = new Storage(filePath);\n try {\n tasks = new TaskList(storage.load());\n } catch (DukeException | IOException e) {\n tasks = new TaskList();\n e.printStackTrace();\n }\n }", "public GridFSInputFile createFile(File f) throws IOException {\n\treturn createFile(new FileInputStream(f), f.getName(), true);\n }", "public Duke(String filePath) {\n this.parser = new Parser();\n try {\n this.storage = new Storage(filePath);\n } catch (DukeException e) {\n this.storage = new Storage();\n }\n\n try {\n this.tasks = new TaskList(this.storage.loadDefaultFile());\n } catch (DukeException e) {\n this.tasks = new TaskList();\n }\n }", "public InventarioFile(){\r\n \r\n }", "private Node createFromSpeciesFile(String[] line, String alias1, Node parent, int cnt, double bl){\n\t\t String name = line[1];\n\t\t String[] names = name.split(\"\\\\|\");\n\t\t \n\t\t if(names.length>3 && names[3].startsWith(\"NC\")) name = names[3];\n\t\t Node n = new SimpleNode(name,bl);\n\t\t Identifier id = n.getIdentifier();\n\t\t Identifier pid = parent.getIdentifier();\n\t\t String prefix = ((String)pid.getAttribute(\"prefix\"));\n\t\t if(parent.isRoot()) prefix = prefix+\"+-\";\n\t\t id.setAttribute(\"level\",((Integer) pid.getAttribute(\"level\"))+2);\n\t\t id.setAttribute(\"prefix\", \" | \"+prefix);\n\t\t id.setAttribute(\"alias\", line[0]);\n\t\t id.setAttribute(\"alias1\", alias1);\n\t\t id.setAttribute(\"speciesIndex\", cnt);\n\t\t String css =(String) pid.getAttribute(\"css\");\n\t\t if(css!=null){\n\t\t\t id.setAttribute(\"css\", css);\n\t\t }\n\t\t parent.addChild(n);\n\t\t this.putSlug(n);\n\t\t return n;\n\t }", "public Manager(String filePath){\n\t\tthis.filePath = filePath;\n\t}", "private void init(String filename){\n // create product cateogries \n // hard coded key-value for this project \n productCategory.addProduct(\"book\", \"books\");\n productCategory.addProduct(\"books\", \"books\");\n productCategory.addProduct(\"chocolate\", \"food\");\n productCategory.addProduct(\"chocolates\", \"food\");\n productCategory.addProduct(\"pills\", \"medical\");\n \n // read input\n parser.readInput(filename);\n \n // addProducts\n try {\n this.addProducts(parser.getRawData());\n } catch (Exception e) {\n System.out.println(\"Check input integrity\");\n }\n \n this.generateReceipt();\n\n }", "private void createDeck() {\n FileReader reader = null;\n try {\n try {\n reader = new FileReader(deckInputFile);\n Scanner in = new Scanner(reader);\n \n // read the top line column names of the file\n // e.g. description, size, speed etc.\n String categories = in.nextLine();\n\n // loop through the file line by line, creating a card and adding to the deck\n while (in.hasNextLine()) {\n String values = in.nextLine();\n Card newCard = new Card(categories, values);\n deck.add(newCard);\n }\n } finally {\n if (reader != null) {\n reader.close();\n }\n }\n } catch (IOException e) {\n System.out.print(\"error\");\n }\n }", "public ActionScriptBuilder createFile(String filecontents,String filepath,boolean overwrite,String delimeter){\n\t\tline(\"createfile until \"+delimeter);\n\t\tlines(Arrays.asList(filecontents.split(\"\\n\")));\n\t\tline(delimeter);\n\t\tmove(\"__createfile\",filepath,overwrite);\n\t\treturn this;\n\t}", "public Mappa(String _filePath) {\n\t\tfilePath = _filePath;\n\n\t\tgeneraMappa();\n\n\t\tint stop = 0;\n\t}", "public void createFile(String fname) {\n\t\tprintMsg(\"running createFiles() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\t\n\t\t// Check if the scratch directory exists, create it if it doesn't\n\t\tPath rootpath = Paths.get(theRootPath);\n\t\tcreateScratchDirectory(rootpath);\n\n\t\t// Check if the file name is null or empty, if it is, use default name\n\t\tPath filepath = null;\n\t\tif(fname == null || fname.isEmpty()) {\n\t\t\tfilepath = Paths.get(rootpath + System.getProperty(\"file.separator\") + theFilename);\n\t\t} else {\n\t\t\tfilepath = Paths.get(rootpath + System.getProperty(\"file.separator\") + fname);\n\t\t}\n\t\t\n\t\t// Create file\n\t\ttry {\n\t\t\t// If file exists already, don't override it.\n\t\t\tif(!Files.exists(filepath)) {\n\t\t\t\tFiles.createFile(filepath);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "myFile(String Name){\n\t this.FileName = Name + \".txt\"\t;\n\t System.out.println(FileName);\n\t try {\n\t\treadFile() ;\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\tSystem.out.println(\"No,This File Please run again\"); \n\t}\n\t}", "public void newDemo() {\r\n \t\t\r\n \t\tString date = new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\").format(new Date());\r\n \t\tthis.fileName = this.demoFolder + this.map.replace(\".xml\", \"\") + \"_\" + date + \".r2d\";\r\n \t\ttry {\r\n \t\t\tthis.fos = (FileOutputStream)this.fileIO.writeFile(this.fileName);\r\n \t\t} catch (IOException e) {\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\tthis.demoParts.put(this.map + \"/\");\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \t}", "@FXML\n void readFromFile(ActionEvent event)throws FileNotFoundException {\n BoxSetting bx = new BoxSetting(devTempBox,devHumBox,presDevBox,maxTempDevBox,minTempDevBox,measTxt,presChart,humidChart,tempChart,tempBox,humidBox,presBox,maxTempBox,minTempBox,meanTempBox,meanHumidBox,meanPresBox,meanMaxTempBox,meanMinTempBox,meanTempBox,meanHumidBox,meanPresBox);\n cityBox.setText(readNameBox.getText());\n bx.fromFileDisp(tc.fromFile(readNameBox.getText()));\n }", "static void initContacts(){\n String directory = \"contacts\";\n String filename = \"contacts.txt\";\n Path contactsDirectory= Paths.get(directory);\n Path contactsFile = Paths.get(directory, filename);\n try {\n if (Files.notExists(contactsDirectory)) {\n Files.createDirectories((contactsDirectory));\n System.out.println(\"Created directory\");\n }\n if (!Files.exists(contactsFile)) {\n Files.createFile(contactsFile);\n System.out.println(\"Created file\");\n }\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n }", "public ObjReader(String filename){\n file = filename;\n }", "public Config createConfig(String filename);", "public static File MakeNewFile(String hint) throws IOException {\n File file = new File(hint);\n String name = GetFileNameWithoutExt(hint);\n String ext = GetFileExtension(hint);\n int i = 0;\n while (file.exists()) {\n file = new File(name + i + \".\" + ext);\n ++i;\n }\n\n file.createNewFile();\n\n return file;\n }", "abstract public Config createConfig(String path);", "private void createAmazonRainforest (BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n \n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec (tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()),\n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new AmazonRainforest(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()),\n Boolean.parseBoolean(in.readLine()), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()),\n Integer.parseInt(in.readLine())); \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++;\n }", "public FileOnDisk(String filepath) throws StyxException\n {\n this(new File(filepath));\n }", "Points(String filepath){\n readPointsFile(filepath); //dengan file points.txt\n }", "private void createArctic(BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int maxStaff = Integer.parseInt(in.readLine());\n int numStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n for (int i = 0; i < numStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int maxAnimals = Integer.parseInt(in.readLine());\n int numAnimals = Integer.parseInt(in.readLine());\n \n Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals;\n for (int i = 0; i < numAnimals; i++) {\n animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), \n Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine()));\n //constructor call \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++; //updates the global field numRegions\n }", "public static void main(String[] args) {\n\n\t\tFile fi = new File(\"C:/test_io\");\n\t\tif(fi.exists()) {\n\t\t\t\n\t\t\tSystem.out.println(\"exists!\");\n\t\t}else {\n\t\t\tSystem.out.println(\"new\");\n\t\t\tfi.mkdir();\n\t\t}\n\t\t\n\t\tFile fic1 = new File(fi, \"AA\");\n\t\tfic1.mkdir();\n\t\t\n\t\tFile fic2 = new File(\"C:/test_io\", \"BB\");\n\t\tfic2.mkdir();\n\t\t\n\t\tFile fitxt = new File(fic1,\"a.txt\");\n\t\t\n\t\ttry {//checked exception\n\t\t\tfitxt.createNewFile();\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}", "public void readFromFile() {\n\n\t}", "public static void main (String[] args) {\n \n //initilialize Scanner, pass file input in same directory, pass to boyGirl function\n Scanner input = new Scanner(new File('tas.txt'));\n boyGirl(input);\n }", "public Auditorium(String filename) throws FileNotFoundException {\r\n\t\t//node variables\r\n\t\tint row;\r\n\t\tchar seat; \r\n\t\tboolean reserved; \r\n\t\tchar ticketType;\r\n\t\tTheaterSeat up = null;\r\n\t\tTheaterSeat down = null;\r\n\t\tTheaterSeat left = null;\r\n\t\tTheaterSeat right = null;\r\n\t\t\r\n\t\t//read from the file passed to the constructor\r\n\t\t//and fill the grid with that data\r\n\t\tFile seatingFile = new File(filename);\r\n\t\tScanner seatScanner = new Scanner(new FileInputStream(seatingFile));\r\n\t\tString firstLine = seatScanner.nextLine();\r\n\t\tnumRows = 1;\r\n\t\tnumCols = firstLine.length();\r\n\t\tString fullInput = firstLine;\r\n\t\t\r\n\t\twhile (seatScanner.hasNext()) {\r\n\t\t\tfullInput += seatScanner.nextLine();\r\n\t\t\tnumRows++;\r\n\t\t}\r\n\t\tseatScanner.close();\r\n\t\t\r\n\t\tTheaterSeat previous = null;\r\n\t\trow = 0;\r\n\t\tseat = 'A';\r\n\t\tticketType = fullInput.charAt(0);\r\n\t\tif (ticketType == '.') {\r\n\t\t\treserved = false;\r\n\t\t} else {\r\n\t\t\treserved = true;\r\n\t\t}\r\n\t\tfirst = new TheaterSeat(row, seat, reserved, ticketType, up, down, left, right);\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tint sIndex = 0;\r\n\t\tint rIndex = 0;\r\n\t\tint location = 0;\r\n\t\tfor (rIndex = 0; rIndex < numRows - 1; rIndex++) { //iterate through grid\r\n\t\t\trow = rIndex;\r\n\t\t\tfor (sIndex = 0; sIndex < numCols - 1; sIndex++) {\r\n\t\t\t\t\r\n\t\t\t\t//preserve previous node\r\n\t\t\t\tprevious = current;\r\n\t\t\t\t\r\n\t\t\t\tseat = (char) (sIndex + 65);\r\n\t\t\t\tlocation = (1+rIndex)*(numCols) + sIndex;\r\n\t\t\t\tticketType = fullInput.charAt(location);\r\n\t\t\t\tif (ticketType == '.') {\r\n\t\t\t\t\treserved = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treserved = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcurrent = new TheaterSeat(row + 1, seat, reserved, ticketType, up, down, left, right);\r\n\t\t\t\t//create up-down link\r\n\t\t\t\tprevious.setDown(current);\r\n\t\t\t\tcurrent.setUp(previous);\r\n\t\t\t\t\r\n\t\t\t\tseat = (char) (sIndex + 66);\r\n\t\t\t\tlocation = rIndex*numCols + sIndex + 1;\r\n\t\t\t\tticketType = fullInput.charAt(location);\r\n\t\t\t\tif (ticketType == '.') {\r\n\t\t\t\t\treserved = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treserved = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcurrent = new TheaterSeat(row, seat, reserved, ticketType, up, down, left, right);\r\n\t\t\t\t//create right-left link\r\n\t\t\t\tcurrent.setLeft(previous);\r\n\t\t\t\tprevious.setRight(current);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprevious = current;\r\n\t\t\t\r\n\t\t\tseat = (char) (sIndex + 66);\r\n\t\t\tlocation = (1 + rIndex)*numCols + sIndex;\r\n\t\t\tif (ticketType == '.') {\r\n\t\t\t\treserved = false;\r\n\t\t\t} else {\r\n\t\t\t\treserved = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = new TheaterSeat(row, seat, reserved, ticketType, up, down, left, right);\r\n\t\t\t//create up-down link\r\n\t\t\tprevious.setDown(current);\r\n\t\t\tcurrent.setUp(previous);\r\n\t\t\t\r\n\t\t\tcurrent = previous;\r\n\t\t\tfor (int index = 0; index < numCols - 1; index++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcurrent = current.getDown();\r\n\t\t} //end of for loop\r\n\t\t\r\n\t\tfor (sIndex = 0; sIndex < numCols - 1; sIndex++) {\r\n\t\tprevious = current;\r\n\t\tseat = (char) (sIndex + 66);\r\n\t\tlocation = (numRows - 1)*numCols + sIndex + 1;\r\n\t\tticketType = fullInput.charAt(location);\r\n\t\tif (ticketType == '.') {\r\n\t\t\treserved = false;\r\n\t\t} else {\r\n\t\t\treserved = true;\r\n\t\t}\r\n\t\t\r\n\t\tcurrent = new TheaterSeat(numRows - 1, seat, reserved, ticketType, up, down, left, right);\r\n\t\t//create right-left link\r\n\t\tcurrent.setLeft(previous);\r\n\t\tprevious.setRight(current);\r\n\t\t}\r\n\t}", "public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }", "public static void main(String[] args) {\n\t\tFile file = new File(\"test/a.txt\");\r\n\t\tFileUtil.createFile(file);\r\n\t\t/*if(! file.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t}", "@SuppressWarnings(\"ResultOfMethodCallIgnored\")\r\n public static void readFromFile() throws IOException {\r\n File file = new File(filePath);\r\n if (file.exists()) {\r\n readFromFile(file.getPath());\r\n } else {\r\n file.createNewFile();\r\n }\r\n }", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }", "public abstract void createSprites() throws FileNotFoundException;", "public Unscrambler(String file) throws FileNotFoundException\n {\n newFile = new File(file);\n\n }", "public GeppettoRecordingCreator(String name)\n\t{\n\t\t_fileName = name;\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public Music createMusic(String file);", "public void Leer() throws FileNotFoundException\n {\n // se crea una nueva ruta en donde se va a ir a leer el archivo\n String ruta = new File(\"datos.txt\").getAbsolutePath(); \n archivo=new File(ruta); \n }", "FileInfo create(FileInfo fileInfo);", "public static DBMaker openFile(String file){\n DBMaker m = new DBMaker();\n m.location = file;\n return m;\n }", "public void loadFile()\n {\n\n FileDialog fd = null; //no value\n fd = new FileDialog(fd , \"Pick up a bubble file: \" , FileDialog.LOAD); //create popup menu \n fd.setVisible(true); // make visible manu\n String directory = fd.getDirectory(); // give the location of file\n String name = fd.getFile(); // give us what file is it\n String fullName = directory + name; //put together in one sting \n \n File rideNameFile = new File(fullName); //open new file with above directory and name\n \n Scanner nameReader = null;\n //when I try to pick up it read as scanner what I choose\n try\n {\n nameReader = new Scanner(rideNameFile);\n }\n catch (FileNotFoundException fnfe)//if dont find return this message below\n {\n return; // immedaitely exit from here\n }\n \n //if load button pressed, it remove all ride lines in the world\n if(load.getFound()){\n removeAllLines();\n } \n \n //read until is no more stings inside of file and until fullfill max rides\n while(nameReader.hasNextLine()&&currentRide<MAX_RIDES)\n {\n \n String rd= nameReader.nextLine();//hold and read string with name of ride\n RideLines nova =new RideLines(rd);\n rides[currentRide]=nova;\n \n //Create a RideLine with string given from file\n addObject(rides[currentRide++], 650, 20 + 40*currentRide);\n }\n \n //when is no more strings inside it close reader\n nameReader.close();\n }", "public abstract T create(T file, boolean doPersist) throws IOException;", "public DataInput( String filepath)\r\n {\r\n this.filepath = filepath;\r\n }", "public void createFile (String filePath){\n try{\n File newFile = new File(filePath);\n if(newFile.createNewFile()){\n System.out.println(\"File created: \"+newFile.getName());\n } else {\n System.out.println(\"File already exists.\");\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }", "@Override\r\n\tpublic void createBoardWithFile(Board board) {\n\t\t\r\n\t}", "public void init() {\n File file = new File(FILE);\n if (!file.exists()) {\n File file2 = new File(file.getParent());\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n if (this.accessFile == null) {\n try {\n this.accessFile = new RandomAccessFile(FILE, \"rw\");\n } catch (FileNotFoundException unused) {\n }\n }\n }", "public void createGraphFromFile() {\n\t\t//如果图未初始化\n\t\tif(graph==null)\n\t\t{\n\t\t\tFileGetter fileGetter= new FileGetter();\n\t\t\ttry(BufferedReader bufferedReader=new BufferedReader(new FileReader(fileGetter.readFileFromClasspath())))\n\t\t\t{\n\t\t\t\tString line = null;\n\t\t\t\twhile((line=bufferedReader.readLine())!=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\t//create the graph from file\n\t\t\t\tgraph = new Graph();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public File createFile(final String path) {\n return new com.good.gd.file.File(path);\n }", "public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }", "public Duke(String filePath) {\n assert filePath.contains(\".txt\") : \"The storage path must contains a valid .txt file\";\n\n ui = new Ui();\n storage = new Storage(filePath);\n\n TaskList tasks = new TaskList();\n try {\n tasks = storage.load();\n } catch (DukeException e) {\n ui.showLoadingError();\n }\n\n agent = new CommandAgent(tasks);\n }", "private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}", "public void setup() {\n\t\tif (!new File(plugin.getDataFolder() + path).exists())\r\n\t\t\tnew File(plugin.getDataFolder() + path).mkdir();\r\n\r\n\t\tif (!new File(plugin.getDataFolder() + path, name + \".yml\").exists())\r\n\t\t\ttry {\r\n\t\t\t\tnew File(plugin.getDataFolder() + path, name + \".yml\").createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tplugin.getLogger().log(Level.SEVERE, \"Could not generate \" + name + \".yml\");\r\n\t\t\t}\r\n\t}", "public InstanceReader(String filename) throws FileNotFoundException{\n this.reader = new FileReader(filename);\n }", "void createNode(String path);", "public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }", "public void handleLoad() throws IOException {\n File file = new File(this.path);\n\n // creates data directory if it does not exist\n file.getParentFile().mkdirs();\n\n // creates tasks.txt if it does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n\n Scanner sc = new Scanner(file);\n\n while (sc.hasNext()) {\n String longCommand = sc.nextLine();\n String[] keywords = longCommand.split(\" \\\\|\\\\| \");\n Task cur = null;\n switch (keywords[1]) {\n case \"todo\":\n cur = new Todo(keywords[2]);\n break;\n case \"deadline\":\n cur = new Deadline(keywords[2], keywords[3]);\n break;\n case \"event\":\n cur = new Event(keywords[2], keywords[3]);\n break;\n default:\n System.out.println(\"error\");\n break;\n }\n if (keywords[0].equals(\"1\")) {\n cur.markAsDone();\n }\n TaskList.getTaskLists().add(cur);\n }\n sc.close();\n }", "public Storage(String path) throws IOException {\n assert path != null : \"Path for file storage cannot be null.\";\n file = new File(path);\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdir();\n file.createNewFile();\n }\n }", "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "public static void main(String[] args) {\n File file = new File (\"tesEt.txt\");\n // Path file = Paths.get(\"test.txt\");\n // System.out.println(file.get);\n System.out.println(file.getAbsoluteFile());\n System.out.println(file.isAbsolute());\n System.out.println(file.exists());\n \n // try {\n // // File.createTempFile(\"prefix\", \"suffix\");\n // sy\n // } catch (IOException e) {\n // // TODO Auto-generated catch block\n // e.printStackTrace();\n // }finally\n // {\n // System.out.println(\"hehehehe\");\n // }\n // file.\n\n }", "@SuppressWarnings(\"deprecation\")\n private int readMeals(String eateryname, String filePath) {\n Dish curdish;\n Meal curmeal = null;\n Calendar curdate = Calendar.getInstance();\n curdate.set(0, 0, 0); // Initialize date to 0.\n boolean newdate = false;\n boolean nutrerror = false;\n try {\n _stream = new FileInputStream(filePath);\n\n _instream = new DataInputStream(_stream);\n _bufread = new BufferedReader(new InputStreamReader(_instream));\n\n TextParser parser = new TextParser();\n String line;\n boolean ingrediants;\n\n while (true) { //loop until we break\n nutrerror = false; //this is if the PDF leaves out necessary information in the nutrition facts section\n //initially set this to false at the start of reading each dish (each loop)\n\n //Read in the line that starts a new dish, and create a dish with the string in this line\n if ((line = _bufread.readLine()) != null) {\n //read in the dish name and create a new dish\n if (line.charAt(0) == '\f') { //check for and delete this weird character the PDF to text sometimes gives.\n line = line.substring(1);\n }\n\n //create a new dish of this name\n curdish = new Dish(line);\n curdish.setLocation(new Location(eateryname));\n } else {\n break;\n }\n\n //Read in the line under the name. It should be the ingrediants\n if ((line = _bufread.readLine()) != null) {\n ingrediants = parser.SetIngrediants(curdish, line);\n\n } else {\n break;\n }\n if (ingrediants) { //if ingrediants did not have an issue then read the empty line\n //and then read in the ingrediants header\n // otherwise you don't want to do this as there were no ingrediants\n //and the line you thought was ingrediants is really the nutrition facts header\n\n //Read in the empty line seperator\n if ((line = _bufread.readLine()) != null) { //read in an empty line\n\n } else {\n break;\n }\n //Read in the next line and make sure it is the nutrition facts header\n if ((line = _bufread.readLine()) != null) {\n if (line.compareTo(\"Nutrition Facts\") != 0) {\n //this means things are not formatted as expected\n }\n } else {\n break;\n }\n }\n //Under the nutrition facts header is the list of nutrition facts\n if ((line = _bufread.readLine()) != null) {\n nutrerror = parser.setNutritionFacts(curdish, line);\n } else {\n break;\n }\n\n //read in empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n\n //read in the location line\n if ((line = _bufread.readLine()) != null) {\n } else {\n break;\n }\n\n //read in the empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n\n //read in the line that should have the date\n //use result to check for error and set newdate\n if ((line = _bufread.readLine()) != null) { //this line should have the date\n Calendar d = parser.setDate(curdish, line, curdate);\n if (d.equals(curdate)) //if the date returned is the same date, then there was no changed\n {\n newdate = false;\n } else { //if the date returned is different, then there is a newdate and curdate should be updated\n newdate = true;\n curdate = d;\n }\n } else {\n break;\n }\n\n //read in the empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n\n //this line says Breakfast, Lunch, Dinner.... etc\n //check this line and the newdate variable to see if the dish should be added to the current meal\n //or if we need a whole new meal\n if ((line = _bufread.readLine()) != null) {\n //if this is the first dish, so there is no meal create a meal and add the dish && set the date\n if (curmeal == null) {\n curmeal = new Meal(line.toLowerCase());\n curdish.setDate(curdate);\n curdish.setMeal(curmeal);\n _dishes.add(curdish);\n } else if (curmeal.getMeal().equals(line) == false || newdate == true) {\n //this is the beginning of a new meal, add the cur meal to eatery and create a new one with the most recent date\n curmeal = new Meal(line.toLowerCase());\n curdish.setMeal(curmeal);\n curdish.setDate(curdate);\n } else { //this is just part of the current meal, add it and move on to the next one\n curdish.setMeal(curmeal);\n curdish.setDate(curdate);\n }\n } else {\n break;\n }\n\n //read in the empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n _dishes.add(curdish);\n //move on to the next dish in the text file\n }\n \n } catch (FileNotFoundException e) {\n return -1;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n } finally {\n if (_instream != null) {\n try {\n _instream.close();\n } catch (IOException e) {\n\n }\n }\n\n if (_bufread != null) {\n try {\n _bufread.close();\n } catch (IOException e) {\n\n }\n }\n\n if (_stream != null) {\n try {\n _stream.close();\n } catch (IOException e) {\n\n }\n }\n }\n return 1;\n }", "public static FileData CreateFromFile(String pathWithFileName) throws Exception\n {\n FileData fileData = new FileData();\n fileData.ReadFrom(pathWithFileName);\n return fileData;\n }", "public Generator(File world_path) throws FileNotFoundException, URISyntaxException{\n\t\tif(root_dir == null){\n\t\t\troot_dir = new File(Generator.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();\n\t\t\tSystem.out.println(root_dir.getPath());\n\t\t\tfirst_name_files = new File(root_dir.getPath()+\"/Data/name/first/\").listFiles();\n\t\t\t//System.out.println(first_name_files.getPath());\n\t\t\tlast_name_files = new File(root_dir.getPath()+\"/Data/name/last/\").listFiles();\n\t\t\t//System.out.println(last_name_files.getPath());\n\t\t\ttrait_files = new File(root_dir.getPath()+\"/Data/trait/\").listFiles();\n\t\t\t//System.out.println(root_dir.getPath());\n\t\t}\n\t\tScanner world_file = new Scanner(world_path);\n\t\tString temp = \"\";\n\t\t/*\n\t\t * Load Name files\n\t\t */\n\t\twhile(true){\n\t\t\ttemp = world_file.nextLine();\n\t\t\tString[] curr_line = temp.split(\"\\t+\");\n\t\t\tif(curr_line[0].equals(\"TRAITS:\")) break;\n\t\t\tcurr_line[0]+=\".txt\";\n\t\t\tint prob = curr_line.length > 1 ? Integer.parseInt(curr_line[1]) : 1;\n\t\t\tfor(File i : first_name_files){\n\t\t\t\tif (i.getName().equals(curr_line[0])){\n\t\t\t\t\tFile first = i;\n\t\t\t\t\tFile second = null;\n\t\t\t\t\tfor(File j : last_name_files)\n\t\t\t\t\t\tif(j.getName().equals(curr_line[0])){\n\t\t\t\t\t\t\tsecond = j;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\tnames.addReader(new FileReader.NameReader(first, second), prob);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tattributes.add(\"Name\");\n\t\tattributes.add(\"Gender\");\n\t\tattributes.add(\"Ethnicity\");\n\t\t/*\n\t\t * Load Trait files \n\t\t */\n\t\twhile(world_file.hasNext()){\n\t\t\ttemp =world_file.next();\n\t\t\tattributes.add(temp);\n\t\t\ttemp+=\".txt\";\n\t\t\tfor(File i : trait_files){\n\t\t\t\tif(i.getName().equals(temp)){\n\t\t\t\t\ttraits.add(new FileReader.TraitReader(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public TextFile(String filepath) {\n try {\n toFile = new File(filepath);\n if(toFile == null) {\n System.err.println(filepath + \" could not be created\");\n return;\n }\n writer = new BufferedWriter(new FileWriter(toFile));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n }", "@Test\n public void CreateFile() throws Exception {\n createFile(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\",\n readTemplateXLSX(\"src\\\\TestSuite\\\\SampleFiles\\\\template_supervisor.xlsx\"));\n File file = new File(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\");\n Assert.assertTrue(file.exists());\n }", "private void handleInit() {\n\t\ttry {\n String filePath = \"/app/FOOD_DATA.txt\";\n String line = null;\n FileReader fileReader = new FileReader(filePath);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n while ((line = bufferedReader.readLine()) != null) {\n System.out.println(line);\n\n String[] foodData = line.split(\"\\\\^\");\n \t\tfor (int i = 2; i < foodData.length; i++) {\n \t\t\tif (foodData[i].equals(\"\")) {\n \t\t\t\tfoodData[i] = \"-1\";\n \t\t\t}\n \t\t}\n String foodName = foodData[0];\n String category = foodData[1];\n double calories = Double.parseDouble(foodData[2]);\n double sodium = Double.parseDouble(foodData[3]);\n double fat = Double.parseDouble(foodData[4]);\n double protein = Double.parseDouble(foodData[5]);\n double carbohydrate = Double.parseDouble(foodData[6]);\n Food food = new Food();\n food.setName(foodName);\n food.setCategory(category);\n food.setCalories(calories);\n food.setSodium(sodium);\n food.setSaturatedFat(fat);\n food.setProtein(protein);\n food.setCarbohydrate(carbohydrate);\n foodRepository.save(food);\n }\n bufferedReader.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n \tcategories = Categories.MAIN_MENU;\n }\n\t}", "@Override\n\tpublic boolean readFile(String filename) {\n\t\ttry {\n\t\t\tScanner input = new Scanner(new File(filename));\n\t\t\tString row = input.nextLine();\n\t\t\tString[] sarr = row.split(\",\");\n\t\t\tString ingredientsWatch = \"\";\n\t\t\t// Gets the String type of ingredients to watch\n\t\t\t// Identify the gender and create the Female or Male object\n\t\t\tif (sarr[0].equals(\"Female\")) {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\t\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\tFemale female=new Female(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=female;\n\t\t\t}else {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\t\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\t// Creates the object using its constructor\n\t\t\t\tMale male=new Male(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=male;\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\n\t}", "public Parser(String fileHandle) {\n\t\tmainFile = fileHandle;\n\t}", "private void loadEnvironment(String filename){\n // Code here to read from the file and set up the environment\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n String line;\n while((line = br.readLine()) != null) {\n String[] values = line.split(\",\");\n String type = values[0].replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n double x = Double.parseDouble(values[1]);\n double y = Double.parseDouble(values[2]);\n switch (type) {\n case \"Zombie\":\n Zombie zombie = new Zombie(x, y);\n this.zombies.put(zombie.getPosition(), zombie);\n break;\n case \"Sandwich\":\n Sandwich sandwich = new Sandwich(x, y);\n this.sandwiches.put(sandwich.getPosition(), sandwich);\n break;\n case \"Player\":\n this.player = new Player(x, y, Integer.parseInt(values[3]));\n break;\n case \"Treasure\":\n this.treasure = new Treasure(x, y);\n break;\n default:\n throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }" ]
[ "0.58917326", "0.58761835", "0.58246636", "0.5764867", "0.5682264", "0.56766677", "0.5658317", "0.5629735", "0.560833", "0.5608131", "0.56048703", "0.5559633", "0.5557066", "0.5555745", "0.55530655", "0.55518967", "0.5531576", "0.5520782", "0.5481159", "0.54761004", "0.54706436", "0.54455477", "0.5432113", "0.54248613", "0.54092", "0.54052794", "0.53910196", "0.53907794", "0.5364255", "0.5360781", "0.53372556", "0.5335117", "0.5317119", "0.531571", "0.5310574", "0.5309169", "0.52992654", "0.52984476", "0.52928054", "0.5285481", "0.5284652", "0.52776307", "0.5276137", "0.5259572", "0.5254964", "0.52519697", "0.52368724", "0.5230557", "0.522852", "0.52279407", "0.5214627", "0.521332", "0.5208566", "0.52072644", "0.5205083", "0.5199111", "0.5194532", "0.5188174", "0.51832944", "0.51818085", "0.51799697", "0.51783484", "0.5176126", "0.5166372", "0.5153019", "0.5149282", "0.51478785", "0.51423377", "0.5134458", "0.51330745", "0.51320875", "0.5130777", "0.5129234", "0.5121946", "0.51205164", "0.5120462", "0.51181734", "0.51160437", "0.5114727", "0.5111463", "0.5100911", "0.509853", "0.5090558", "0.50844836", "0.5075031", "0.50671214", "0.50667083", "0.5062099", "0.5058731", "0.5057272", "0.5049314", "0.5048875", "0.5045617", "0.50451666", "0.5041135", "0.5038395", "0.5035976", "0.5035518", "0.5035469", "0.503315" ]
0.5736729
4
called by neweatery to parse a text file
@SuppressWarnings("deprecation") private int readMeals(String eateryname, String filePath) { Dish curdish; Meal curmeal = null; Calendar curdate = Calendar.getInstance(); curdate.set(0, 0, 0); // Initialize date to 0. boolean newdate = false; boolean nutrerror = false; try { _stream = new FileInputStream(filePath); _instream = new DataInputStream(_stream); _bufread = new BufferedReader(new InputStreamReader(_instream)); TextParser parser = new TextParser(); String line; boolean ingrediants; while (true) { //loop until we break nutrerror = false; //this is if the PDF leaves out necessary information in the nutrition facts section //initially set this to false at the start of reading each dish (each loop) //Read in the line that starts a new dish, and create a dish with the string in this line if ((line = _bufread.readLine()) != null) { //read in the dish name and create a new dish if (line.charAt(0) == ' ') { //check for and delete this weird character the PDF to text sometimes gives. line = line.substring(1); } //create a new dish of this name curdish = new Dish(line); curdish.setLocation(new Location(eateryname)); } else { break; } //Read in the line under the name. It should be the ingrediants if ((line = _bufread.readLine()) != null) { ingrediants = parser.SetIngrediants(curdish, line); } else { break; } if (ingrediants) { //if ingrediants did not have an issue then read the empty line //and then read in the ingrediants header // otherwise you don't want to do this as there were no ingrediants //and the line you thought was ingrediants is really the nutrition facts header //Read in the empty line seperator if ((line = _bufread.readLine()) != null) { //read in an empty line } else { break; } //Read in the next line and make sure it is the nutrition facts header if ((line = _bufread.readLine()) != null) { if (line.compareTo("Nutrition Facts") != 0) { //this means things are not formatted as expected } } else { break; } } //Under the nutrition facts header is the list of nutrition facts if ((line = _bufread.readLine()) != null) { nutrerror = parser.setNutritionFacts(curdish, line); } else { break; } //read in empty line separator if ((line = _bufread.readLine()) != null) { } else { break; } //read in the location line if ((line = _bufread.readLine()) != null) { } else { break; } //read in the empty line separator if ((line = _bufread.readLine()) != null) { } else { break; } //read in the line that should have the date //use result to check for error and set newdate if ((line = _bufread.readLine()) != null) { //this line should have the date Calendar d = parser.setDate(curdish, line, curdate); if (d.equals(curdate)) //if the date returned is the same date, then there was no changed { newdate = false; } else { //if the date returned is different, then there is a newdate and curdate should be updated newdate = true; curdate = d; } } else { break; } //read in the empty line separator if ((line = _bufread.readLine()) != null) { } else { break; } //this line says Breakfast, Lunch, Dinner.... etc //check this line and the newdate variable to see if the dish should be added to the current meal //or if we need a whole new meal if ((line = _bufread.readLine()) != null) { //if this is the first dish, so there is no meal create a meal and add the dish && set the date if (curmeal == null) { curmeal = new Meal(line.toLowerCase()); curdish.setDate(curdate); curdish.setMeal(curmeal); _dishes.add(curdish); } else if (curmeal.getMeal().equals(line) == false || newdate == true) { //this is the beginning of a new meal, add the cur meal to eatery and create a new one with the most recent date curmeal = new Meal(line.toLowerCase()); curdish.setMeal(curmeal); curdish.setDate(curdate); } else { //this is just part of the current meal, add it and move on to the next one curdish.setMeal(curmeal); curdish.setDate(curdate); } } else { break; } //read in the empty line separator if ((line = _bufread.readLine()) != null) { } else { break; } _dishes.add(curdish); //move on to the next dish in the text file } } catch (FileNotFoundException e) { return -1; } catch (IOException e) { e.printStackTrace(); return 0; } finally { if (_instream != null) { try { _instream.close(); } catch (IOException e) { } } if (_bufread != null) { try { _bufread.close(); } catch (IOException e) { } } if (_stream != null) { try { _stream.close(); } catch (IOException e) { } } } return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String parse(File file);", "public void parse(String filename);", "protected abstract void parseFile(File f) throws IOException;", "public void parse(String fileName) throws Exception;", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}", "private SourceFile _parseString(String txt) throws ParseException {\n ACParser p = new ACParser(txt);\n return p.SourceFile();\n }", "protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }", "private void parseRawText() {\n\t\t//1-new lines\n\t\t//2-pageObjects\n\t\t//3-sections\n\t\t//Clear any residual data.\n\t\tlinePositions.clear();\n\t\tsections.clear();\n\t\tpageObjects.clear();\n\t\tcategories.clear();\n\t\tinterwikis.clear();\n\t\t\n\t\t//Generate data.\n\t\tparsePageForNewLines();\n\t\tparsePageForPageObjects();\n\t\tparsePageForSections();\n\t}", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void parse(String s) throws MalformedFileException {\n\t\t\n\t}", "@Test\n\tpublic void testReadTxtFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readTxtFile(\"test.txt\");\n\t\tassertEquals(\"This is a test file\", parsedLines.get(0));\n\t\tassertEquals(\"University of Virginia\", parsedLines.get(1));\n\n\t\tArrayList<String> parsedWords = fp.readTxtFile(\"test1.txt\");\n\t\tassertEquals(\"test\", parsedWords.get(0));\n\t\tassertEquals(\"file\", parsedWords.get(1));\n\t}", "protected abstract void parse(String line);", "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }", "public abstract void parse() throws IOException;", "@Override\n public void parse() throws ParseException {\n\n /* parse file */\n try {\n\n Scanner scanner = new Scanner(file, CHARSET_UTF_8);\n\n MowerConfig mowerConfig = null;\n\n int lineNumber = 1;\n\n do {\n\n boolean even = lineNumber % 2 == 0;\n String line = scanner.nextLine();\n\n /* if nothing in the file */\n if ((line == null || line.isEmpty()) && lineNumber == 1) {\n\n throw new ParseException(\"Nothing found in the file: \" + file);\n\n /* first line: lawn top right position */\n } else if(lineNumber == 1) {\n\n Position lawnTopRight = Position.parsePosition(line);\n config.setLawnTopRightCorner(lawnTopRight);\n\n /* even line: mower init */\n } else if (even) {\n\n int lastWhitespace = line.lastIndexOf(' ');\n Position p = Position.parsePosition(line.substring(0, lastWhitespace));\n Orientation o = Orientation.parseOrientation(line.substring(lastWhitespace).trim());\n\n mowerConfig = new MowerConfig();\n mowerConfig.setInitialPosition(p);\n mowerConfig.setInitialOrientation(o);\n\n /* odd line: mower commands */\n } else {\n\n mowerConfig.setCommands(MowerCommand.parseCommands(line));\n config.addMowerConfig(mowerConfig);\n }\n\n lineNumber++;\n\n } while(scanner.hasNextLine());\n\n\n } catch (Exception e) {\n throw new ParseException(\"Exception: \" + e.getMessage());\n }\n\n }", "public LinkedList<Sequence> parseFile() \n\t{\n\t\tString currstr = null;\n\t\t\n\t\t//moves onto first line of file\n\t\ttry {\n\t\t\tcurrstr = input.readLine();\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\tSystem.err.println(\"ERROR encountered reading in line, exiting\");\n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t//Main read-in loop\n\t\tString tempstr = new String();\n\t\tboolean finished = false;\n\t\tString descrip = currstr.substring(1);\n\t\twhile(!finished) {\n\t\t\t//moves onto next line of input file\n\t\t\ttry {\n\t\t\t\tcurrstr = input.readLine();\n\t\t\t}\n\t\t\tcatch(IOException ioe) {\n\t\t\t\tSystem.err.println(\"ERROR encountered reading in line, exiting\");\n\t\t\t\tioe.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t//checks to see if string is empty, if so, end of file, add tempstr to sequences, break\n\t\t\tif(currstr == null) {\n\t\t\t\tSequence seq = new Sequence(tempstr,descrip);\n\t\t\t\tsequences.addLast(seq);\n\t\t\t\tfinished = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//if first character is '>', add tempstr to sequences list, wipe tempstr, then break loop\n\t\t\tif(currstr.charAt(0) == '>') {\n\t\t\t\tSequence seq = new Sequence(tempstr,descrip);\n\t\t\t\tsequences.addLast(seq);\n\t\t\t\tdescrip = currstr.substring(1);\n\t\t\t\ttempstr = new String();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//attach currstr input string to end of tempstr\n\t\t\ttempstr += removeSpace(currstr.toUpperCase()); //FA convention\n\t\t}\n\t\treturn sequences;\n\t}", "public void parse(){\n\t\t//Read next line in content; timestamp++\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(instructionfile))) {\n\t\t String line;\n\t\t while ((line = br.readLine()) != null) {\n\t\t \t//divide the line by semicolons\n\t\t \tString[] lineParts = line.split(\";\");\n\t\t \tfor(String aPart: lineParts){\n\t\t\t \tSystem.out.println(\"Parser:\"+aPart);\n\n\t\t\t \t// process the partial line.\n\t\t\t \tString[] commands = parseNextInstruction(aPart);\n\t\t\t \tif(commands!=null){\n\t\t\t\t\t\t\n\t\t\t \t\t//For each instruction in line: TransactionManager.processOperation()\n\t\t\t \t\ttm.processOperation(commands, currentTimestamp);\n\t\t\t \t}\n\t\t \t}\n\t\t \t//Every new line, time stamp increases\n\t \t\tcurrentTimestamp++;\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }", "private void parseFile(IFile file) throws CoreException, IOException {\r\n \t\tBufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));\r\n \t\tString nxt = \"\";\r\n \t\tStringBuilder builder = new StringBuilder();\r\n \t\tbuilder.append(reader.readLine());\r\n \t\twhile (nxt!=null) {\r\n \t\t\tnxt = reader.readLine();\r\n \t\t\tif (nxt!=null) {\r\n \t\t\t\tbuilder.append(\"\\n\");\r\n \t\t\t\tbuilder.append(nxt);\r\n \t\t\t}\r\n \t\t}\r\n \t\t// QUESTION: does this trigger the reconcilers?\r\n \t\tset(builder.toString());\r\n \t}", "public TextMetaData parse(IFileHandler file) {\n\n\t\tTextMetaData metaData = new TextMetaData();\n\t\tStringBuilder bldWord = new StringBuilder();\n\n\t\t// the caret position holds the current position in the text stream\n\t\t// and is used to store the position of the words that have been found\n\t\t// which is useful information to highlight the words later on\n\t\tlong caretPosition = 0;\n\t\t\n\t\twhile (file.hasNext()) {\n\n\t\t\t// we iterate over the file content (which is obviously text based)\n\t\t\tString filePart = file.next();\n\t\t\t\n\t\t\tfor (int i = 0; i < filePart.length(); ++i) {\n\n\t\t\t\tchar c = filePart.charAt(i);\n\t\t\t\tboolean isWordFinisihed = false;\n\n\t\t\t\tint type = Character.getType(c);\n\n\t\t\t\t// check for a punctuation character\n\t\t\t\tswitch (type) {\n\t\t\t\t\n\t\t\t\tcase Character.START_PUNCTUATION:\n\t\t\t\tcase Character.INITIAL_QUOTE_PUNCTUATION:\n\t\t\t\tcase Character.FINAL_QUOTE_PUNCTUATION:\n\t\t\t\tcase Character.END_PUNCTUATION:\n\t\t\t\tcase Character.DASH_PUNCTUATION:\n\t\t\t\tcase Character.CONNECTOR_PUNCTUATION:\n\t\t\t\tcase Character.SPACE_SEPARATOR:\n\t\t\t\tcase Character.LINE_SEPARATOR:\n\t\t\t\tcase Character.PARAGRAPH_SEPARATOR:\n\t\t\t\tcase Character.CONTROL:\n\t\t\t\t\t\n\t\t\t\t\tisWordFinisihed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase Character.OTHER_PUNCTUATION:\n\n\t\t\t\t\t// if we found a punctuation between a letter or digit\n\t\t\t\t\t// aka 1.2.3 or V.1.2 or something like this\n\t\t\t\t\t// we will see this as a single word\n\t\t\t\t\tif ((i > 0)\n\t\t\t\t\t\t\t&& (i != filePart.length() - 1)\n\t\t\t\t\t\t\t&& Character\n\t\t\t\t\t\t\t\t\t.isLetterOrDigit(filePart.charAt(i - 1))\n\t\t\t\t\t\t\t&& Character\n\t\t\t\t\t\t\t\t\t.isLetterOrDigit(filePart.charAt(i + 1))) {\n\n\t\t\t\t\t\tisWordFinisihed = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tisWordFinisihed = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tisWordFinisihed = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// if we figured out that we have finished one word\n\t\t\t\tif (isWordFinisihed) {\n\n\t\t\t\t\tif (bldWord.length() > 0) {\n\n\t\t\t\t\t\t// we have to store this information in the meta data\n\t\t\t\t\t\tString newWord = bldWord.toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\tWordPosition pos = new WordPosition(caretPosition + i - newWord.length(), newWord);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmetaData.addWord(newWord, pos);\n\n\t\t\t\t\t\t// and inform the UI about the process update\n\t\t\t\t\t\tint percentage = (int) (pos.getEndPosition() * 100 / file.getFileLength());\n\t\t\t\t\t\t\n\t\t\t\t\t\tString message = String.format(\"Wort \\\"%s\\\" gefunden\",\n\t\t\t\t\t\t\t\tnewWord);\n\n\t\t\t\t\t\tnotifyTextProcessStatusUpdate(new TextProcessStatusEvent(\n\t\t\t\t\t\t\t\tthis, percentage, message));\n\n\t\t\t\t\t\tbldWord = new StringBuilder();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// when the word is finished, we have examined a valid punctuation character before\n\t\t\t\t\t// which is the signal to the text processing strategy that the word is finished\n\t\t\t\t\tmetaData.addPunctuation(c);\n\t\t\t\t\t\n\t\t\t\t} else {\n\n\t\t\t\t\t// otherwise we are still in-between the word and have to build it \n\t\t\t\t\t// char-by-char\n\t\t\t\t\tbldWord.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcaretPosition += filePart.length();\n\t\t}\n\n\t\t// notify that we will have to sort the list of examined words\n\t\t// based on their frequency, which might take a while\n\t\tnotifyTextProcessStatusUpdate(new TextProcessStatusEvent(this, -1,\n\t\t\t\t\"Sortiere Wortliste...\"));\n\n\t\tmetaData.sortWordsByFrequency();\n\n\t\t// after all the process is finished, so refresh the UI here\n\t\tnotifyTextProcessStatusFinish(new TextProcessFinishEvent(this,\n\t\t\t\tfile.getPlainText(), metaData));\n\t\t\n\t\treturn metaData;\n\t}", "private String parse(String fileText) throws InvalidFileContentsException {\n if (!validFileText(fileText)) {\n throw new InvalidFileContentsException(\"Invalid text found in file.\");\n }\n\n return fileText.substring(fileText.indexOf(\"{\") + 1, fileText.indexOf(\"}\"));\n }", "@Override\n\tpublic void parse() throws IOException {\n\t}", "public void readFile() {\r\n\t\tBufferedReader br = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString currentLine;\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\r\n\t\t\twhile ((currentLine = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (!currentLine.equals(\"\")) {\r\n\t\t\t\t\tString[] paragraphs = currentLine.split(\"\\\\n\\\\n\");\r\n\r\n\t\t\t\t\tfor (String paragraphEntry : paragraphs) {\r\n\t\t\t\t\t\t//process(paragraphEntry);\r\n\t\t\t\t\t\t//System.out.println(\"Para:\"+paragraphEntry);\r\n\t\t\t\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\t\t\t\tparagraph.process(paragraphEntry);\r\n\t\t\t\t\t\tthis.paragraphs.add(paragraph);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)br.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "void parse();", "public void parseInputFile(String filename) throws BadInputFormatException {\r\n\t\tString line;\r\n\r\n\t\ttry {\r\n\t\t\tInputStream fis = new FileInputStream(filename);\r\n\t\t\tInputStreamReader isr = new InputStreamReader(fis);\r\n\t\t\tBufferedReader br = new BufferedReader(isr);\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tparseMessage(line);\r\n\t\t\t}\r\n\t\t\tbr.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 void posRead() throws IOException {\n\t\tFile file = new File(fullFileName());\n\t\tString line;\n\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\tStringBuffer fileText = new StringBuffer();\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\twhile (st.hasMoreTokens()) {\n \t\tString tokenAndPos = st.nextToken();\n \t\tint slashIndex = tokenAndPos.lastIndexOf('/');\n \t\tif (slashIndex <= 0) throw new IOException(\"invalid data\");\n \t\tString token = tokenAndPos.substring(0,slashIndex);\n \t\tString pos = tokenAndPos.substring(1+slashIndex).intern();\n \t\tint start = this.length();\n \t\tthis.append(token);\n \t\tif (st.hasMoreTokens())\n \t\t\tthis.append(\" \");\n \t\telse\n \t\t\tthis.append(\" \\n\");\n \t\tint end = this.length();\n \t\tSpan span = new Span(start,end);\n \t\tthis.annotate(\"token\", span, new FeatureSet());\n \t\tthis.annotate(\"constit\", span, new FeatureSet(\"cat\", pos));\n \t}\n\t\t}\n\t}", "public static ArrayList<String> parseFile(String f) throws Exception {\n\t\tArrayList<CommandNode> cmdNode = new ArrayList<CommandNode>();\n\t\tArrayList<MemoryNode> memNode = new ArrayList<MemoryNode>();\n\t\tparseFile(f,cmdNode,memNode);\n\t\treturn preCompile(cmdNode, memNode);\n\t}", "private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }", "public REparser (String input) throws IOException {\n fileIn = new FileReader(input);\n cout.printf(\"%nEchoing File: %s%n\", input);\n echoFile();\n fileIn = new FileReader(input);\n pbIn = new PushbackReader(fileIn);\n temp = new FileReader(input);\n currentLine = new BufferedReader(temp);\n curr_line = \"\";\n curr_line = currentLine.readLine();\n AbstractNode root;\n while(curr_line != null) {\n getToken();\n root = parse_re(0);\n printTree(root);\n curr_line = currentLine.readLine();\n }\n }", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "private static void ReadText(String path) {\n\t\t//reads the file, throws an error if there is no file to open\n\t\ttry {\n\t\t\tinput = new Scanner(new File(path));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error opening file...\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString line; //stores the string of text from the .txt file\n\t\tString parsedWord; //Stores the word of the parsed word\n\t\tint wordLength; //Stores the length of the word\n\t\tint lineNum = 1; //Stores the number of line\n\t\ttry {\n\t\t\t//loops while there is still a new line in the .txt file\n\t\t\twhile ((line = input.nextLine()) != null) {\n\t\t\t\t//separates the lines by words\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t//loops while there are still more words in the line\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tparsedWord = st.nextToken();\n\t\t\t\t\twordLength = parsedWord.length();\n\t\t\t\t\t//Regex gets rid of all punctuation\n\t\t\t\t\tif (parsedWord.matches(\".*\\\\p{Punct}\")) {\n\t\t\t\t\t\tparsedWord = parsedWord.substring(0, wordLength - 1);\n\t\t\t\t\t}\n\t\t\t\t\t//add the word to the list\n\t\t\t\t\twordList.add(parsedWord);\n\t\t\t\t\tlineList.add(lineNum);\n\t\t\t\t}\n\t\t\t\tlineNum++;\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Do nothing\n\t\t}\n\t\tinput.close();\n\t}", "public void parse() {\n }", "public void Parse()\n {\n String prepend = \"urn:cerner:mid:core.personnel:c232:\";\n try{\n\n BufferedReader br = new BufferedReader(new FileReader(new File(path)));\n\n String line;\n\n while ((line = br.readLine()) != null)\n {\n line = line.trim();\n String[] lines = line.split(\",\");\n for (String entry : lines)\n {\n entry = entry.trim();\n entry = entry.replace(prepend, replace);\n System.out.println(entry+\",\");\n }\n\n }\n \n br.close();\n }catch(IOException IO)\n {\n System.out.println(IO.getStackTrace());\n } \n \n }", "public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }", "@Override\n\tpublic void run() {\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] record = line.trim().split(\"@\");\n\t\t\t\tif (record.length != 2)\n\t\t\t\t\tcontinue;\n\t\t\t\tparse(record[0], record[1]);\n\n\t\t\t}\n\t\t\t// close buffer reader\n\t\t\tbr.close();\n\t\t\t// Debug catch An exception\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was read, each line is one of the elements of the file_read_lines list\n //line 0 is keyword \"TELL\"\n //line 1 is the knowledge base\n //line 2 is the keyword \"ASK\"\n //line 3 is the query\n file_read_lines.add(spaceEscaped);\n }\n\n //generate list of Horn clauses (raw) from the KB raw sentence\n //replace \\/ by |\n String kbLine = file_read_lines.get(1).replace(\"\\\\/\", \"|\");\n rawClauses = Arrays.asList(kbLine.split(\";\"));\n //query - a propositional symbol\n query = file_read_lines.get(3);\n } catch (IOException e) {\n //Return error if file cannot be opened\n error = true;\n System.out.println(source_file.toString() + \" is not found!\");\n }\n }", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public static void main(String[] args) {\n try {\n readHouseTxt();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n\n\n\n }", "@Override\n public void readDataFromTxtFile()\n throws NumberFormatException, DepartmentCreationException, EmployeeCreationException {\n\n }", "public void processInput(String theFile){processInput(new File(theFile));}", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "void Parse(Source source);", "public void readAndTxt(File f) { \r\n //read android txt\r\n String str = new String();\r\n try {\r\n BufferedReader br = new BufferedReader(new FileReader(f.getAbsolutePath()));\r\n while((str = br.readLine()) != null){\r\n String info[] = str.split(\" \");\r\n AndroidRec ar = new AndroidRec(info[0], info[1], info[2], info[3], info[4], info[5], info[6], info[7]);\r\n andrec.add(ar);\r\n }\r\n br.close(); \r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read Android text file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "protected void postParse(T fileParsed) {\n\t}", "public void parse(FileReader inputFile, LexemAnalizator lexemAnalizator, SyntaxisAnalizator syntaxisAnalizator){\n // TODO: Write realization of parsing (Maybe, chain of responsibilities will be ok for this case)\n }", "@Override\n public void parseFile(String id, Reader reader) throws Exception {\n lineNr = 0;\n BufferedReader fin = null;\n if (reader instanceof BufferedReader) {\n fin = (BufferedReader) reader;\n } else {\n fin = new BufferedReader(reader);\n }\n try {\n while (fin.ready()) {\n String sStr = nextLine(fin);\n if (sStr == null) {\n return;\n }\n if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+data;\\\\s*$\") || sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+characters;\\\\s*$\")) {\n m_alignment = parseDataBlock(fin);\n m_alignment.setID(id);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+calibration;\\\\s*$\")) {\n traitSet = parseCalibrationsBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+assumptions;\\\\s*$\") ||\n sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+sets;\\\\s*$\") ||\n sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+mrbayes;\\\\s*$\")) {\n parseAssumptionsBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+taxa;\\\\s*$\")) {\n parseSATaxaBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+trees;\\\\s*$\")) {\n parseSATreesBlock(fin);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new Exception(\"Around line \" + lineNr + \"\\n\" + e.getMessage());\n }\n }", "public void readFromFile() {\n\n\t}", "@Override\n\tprotected List<String> performScanning(String inputFilePath) {\n\t\tList<String> resultList = App.fileParser(inputFilePath);\n\t\treturn resultList;\n\t}", "private void parseFile(Project p, File f, ImportSettings settings, int pass)\n throws ImportException {\n\n\n try {\n BufferedInputStream bs = new BufferedInputStream(new FileInputStream(f));\n Lexer l = new Lexer(bs, f.getAbsolutePath());\n TokenCollection toks = l.lex();\n Parser px = new Parser();\n CompilationUnitNode cu = px.parse(toks, l.StringLiterals);\n parsedElements.add(cu);\n } catch (FeatureNotSupportedException e) {\n //throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n } catch (Exception e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n// throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath());\n }\n\n }", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "public static ArrayList<Task> parse(String toParse) {\n ArrayList<Task> result = new ArrayList<>();\n Scanner ps = new Scanner(toParse); // passes whole file into the scanner\n while (ps.hasNextLine()) {\n String nLine = ps.nextLine(); // parse one line at a time\n int ref = 3; // reference point\n char taskType = nLine.charAt(ref);\n switch (taskType) {\n case 'T':\n parseTodo(ref, nLine, result);\n break;\n case 'D':\n parseDeadline(ref, nLine, result);\n break;\n case 'E':\n parseEvent(ref, nLine, result);\n break;\n default:\n System.out.println(\"Unknown input\");\n break;\n }\n }\n return result;\n }", "public void parseFile(File file) throws IOException {\r\n if (file.isDirectory()) {\r\n for (File subFile : file.listFiles()) {\r\n if (subFile.isDirectory() || subFile.getName().endsWith(\".java\")) {\r\n parseFile(subFile);\r\n }\r\n }\r\n } else {\r\n parseSourceCode(new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8));\r\n }\r\n }", "private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}", "public Collection<FastqSequence> parse(File file)throws IOException{\n\t\tCollection<FastqSequence> rtrn=new ArrayList<FastqSequence>();\n\t\tString nextLine;\n while ((nextLine = reader.readLine()) != null && (nextLine.trim().length() > 0)) {\n \tif(nextLine.startsWith(\"@\")){\n \t\tString firstLine=nextLine;\n \t\tString secondLine=reader.readLine();\n \t\tString thirdLine=reader.readLine();\n \t\tString fourthLine=reader.readLine();\n \t\t\n \t\tFastqSequence seq=new FastqSequence(firstLine, secondLine,thirdLine, fourthLine);\n \t\t\t\n \t\trtrn.add(seq);\n \t}\n \t\n \t\n }\n return rtrn;\n\t}", "public static boolean parse(File fi){\n\t\ttry {\n\t\t\tScanner sc = new Scanner(fi);\n\n\t\t\tsc.next();\n\t\t\tsc.next();\n\t\t\tname = sc.next();\n\t\t\tsc.next();\n\t\t\tsc.next();\n\t\t\tprepositionLength = sc.nextLong();\n\t\t\tsc.next();\n\t\t\tsc.next();\n\t\t\tprepositionDelay = sc.nextLong();\n\t\t\tsc.next();\n\t\t\tsc.next();\n\t\t\tsetOfStrings = new MekString[sc.nextInt()];\n\t\t\tfor(int i = 0; i < setOfStrings.length; i++){\n\t\t\t\tsc.next();\n\t\t\t\tsc.next();\n\t\t\t\tint low = sc.nextInt();\n\t\t\t\tsc.next();\n\t\t\t\tsc.next();\n\t\t\t\tint high = sc.nextInt();\n\t\t\t\tlong[] time = new long[(high - low)];\n\t\t\t\tsc.nextLine();\n\t\t\t\tString[] values = sc.nextLine().split(\",\");\n\t\t\t\tfor(int j = 0; j < values.length-1; j++){\n\t\t\t\t\ttime[j] = Long.parseLong(values[j].trim());\n\t\t\t\t}\n\t\t\t\tsetOfStrings[i] = new MekString(low, high, time);\n\t\t\t\tmekStringCursor++;\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public void parseFile(String fileName) {\n\t\tparseFile(Values.StorySequences, fileName + \".seq\");\n\t}", "static RobotProgramNode parseFile(File code){\r\n\tScanner scan = null;\r\n\ttry {\r\n\t scan = new Scanner(code);\r\n\r\n\t // the only time tokens can be next to each other is\r\n\t // when one of them is one of (){},;\r\n\t scan.useDelimiter(\"\\\\s+|(?=[{}(),;])|(?<=[{}(),;])\");\r\n\r\n\t RobotProgramNode n = parseProgram(scan); // You need to implement this!!!\r\n\r\n\t scan.close();\r\n\t return n;\r\n\t} catch (FileNotFoundException e) {\r\n\t System.out.println(\"Robot program source file not found\");\r\n\t} catch (ParserFailureException e) {\r\n\t System.out.println(\"Parser error:\");\r\n\t System.out.println(e.getMessage());\r\n\t scan.close();\r\n\t}\r\n\treturn null;\r\n }", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "static public void main(String argv[]) {\n String archivo_a_parsear = \"/home/maldad/repos/automatas/semantico/EjemploA/src/ejemploa/test.txt\";\n try {\n parser p = new parser(new Lexer(new FileReader(archivo_a_parsear)));\n Object result = p.parse().value; \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public void parseFile() throws IOException {\r\n\t\tFileInputStream inputStream = new FileInputStream(FILE_PATH);\r\n\t\tScanner sc = new Scanner(inputStream, \"UTF-8\");\r\n\r\n\t\tString line = \"\";\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tif(line.indexOf(comment_char)==0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(header == true) {\r\n//\t\t\tline = sc.nextLine();\r\n\t\t\tString[] linee = line.split(delimiter);\r\n\t\t\tthis.fieldNames = linee;\r\n\t\t\tfor(int i = 0; i < linee.length; i++) {\r\n\t\t\t\tcolumnMapping.put(linee[i], i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tdf.add(line.split(delimiter, -1));\r\n//\t\t\tif(df.get(df.size()-1).length != this.fieldNames.length) {\r\n//\t\t\t\tSystem.out.println(this.FILE_PATH);\r\n//\t\t\t\tSystem.out.println(String.join(\" \", df.get(df.size()-1)));\r\n//\t\t\t}\r\n\t\t\tfor(int i = 0; i < df.get(df.size()-1).length; i++) {\r\n\t\t\t\tif(df.get(df.size()-1)[i].equals(\"\")) {\r\n\t\t\t\t\tdf.get(df.size()-1)[i] = \"0\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tinputStream.close();\r\n\t\tsc.close();\t\r\n\t}", "private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }", "public void readText(String filename) throws IOException{\n\t\t\n\t\tif(sentences == null){\n\t\t\tsentences = new ArrayList<Sentence>();\n\t\t}\n\t\t\n\t\t//read from file\n\t\tFileInputStream inputStream = new FileInputStream(filename);\n\t\tDataInputStream stream = new DataInputStream(inputStream);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line;\n\t\twhile((line = reader.readLine()) != null){\n\t\t\tsentences.add(new Sentence(line));\n\t\t}\n\t\treader.close();\n\t\tstream.close();\n\t\tinputStream.close();\n\t\t\n\t\t\n\t}", "public void parse() throws Exception {\r\n\t\tToken token;\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\ttry {\r\n\t\t\t// Loop over each token until the end of file.\r\n\t\t\twhile (!((token = nextToken()) instanceof EofToken)) {\r\n\t\t\t\tTokenType tokenType = token.getType();\r\n\t\t\t\tif (tokenType != ERROR) {\r\n\t\t\t\t\t// Format each token.\r\n\t\t\t\t\tsendMessage(new Message(TOKEN, new Object[] {\r\n\t\t\t\t\t\t\ttoken.getLineNumber(), token.getPosition(),\r\n\t\t\t\t\t\t\ttokenType, token.getText(), token.getValue() }));\r\n\t\t\t\t} else {\r\n\t\t\t\t\terrorHandler.flag(token,\r\n\t\t\t\t\t\t\t(OracleErrorCode) token.getValue(), this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Send the parser summary message.\r\n\t\t\tfloat elapsedTime = (System.currentTimeMillis() - startTime) / 1000f;\r\n\t\t\tsendMessage(new Message(PARSER_SUMMARY, new Number[] {\r\n\t\t\t\t\ttoken.getLineNumber(), getErrorCount(), elapsedTime }));\r\n\t\t} catch (java.io.IOException ex) {\r\n\t\t\terrorHandler.abortTranslation(IO_ERROR, this);\r\n\t\t}\r\n\t}", "public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;", "private void parseFile(String fileName) {\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line;\n\t\t\tint counter = 0;\n\t\t\tString lastMethod = null;\n\t\t\t\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t// Logic for method consolidation\n\t\t\t\tif (line.contains(\"Method Call\")) {\n\t\t\t\t\tlastMethod = line.substring(line.indexOf(\"target=\")+7);\n\t\t\t\t\tlastMethod = lastMethod.substring(lastMethod.indexOf('#')+1).replace(\"\\\"\",\"\").trim();\n\t\t\t\t\tlastMethod = lastMethod + \":\" + counter++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (line.contains(\"Field Write\")) {\n\t\t\t\t\tString[] tokens = line.split(\",\");\n\t\t\t\t\t\n\t\t\t\t\tString object = tokens[4].substring(tokens[4].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString field = tokens[5].substring(0, tokens[5].indexOf(\"=\")).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString value = tokens[5].substring(tokens[5].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString fld = object.replace(\"/\", \".\") + \".\" + field;\n\t\t\t\t\tevents.add(new Event(fld, value, lastMethod));\n\t\t\t\t\t\n\t\t\t\t\tallFields.add(fld);\n\t\t\t\t}\n//\t\t\t\tif (line.contains(\"Method Returned\")) {\n//\t\t\t\t\t//operations for this method ended\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}", "@Override\r\n\tpublic void handleFile(String inFilename, String outFilename) \r\n\t{\n\r\n\r\n\t\tString s = slurpFile(inFilename);\r\n\t\tDocument teiDocument = parsePlainText(s);\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintStream pout = new PrintStream(new FileOutputStream(outFilename));\r\n\t\t\tpout.print(XML.documentToString(teiDocument));\r\n\t\t\tpout.close();\r\n\t\t} catch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace\r\n\t\t\t();\r\n\r\n\t\t}\t\r\n\t}", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "public ImportCommand parseFile(File file) throws ParseException {\n\n FileReader fr;\n\n try {\n fr = new FileReader(file);\n } catch (FileNotFoundException fnfe) {\n throw new ParseException(\"File not found\");\n }\n\n BufferedReader br = new BufferedReader(fr);\n return parseLinesFromFile(br);\n }", "private void parseInputFile(String inputFile) throws IOException {\n List<String> lines = Files.readAllLines(FileSystems.getDefault().getPath(inputFile), Charset.defaultCharset());\n for (int i = 1; i < lines.size(); ++i) {\n ParsedRecord record = new ParsedRecord(lines.get(i));\n if (!this.parsedRecords.containsKey(record.docName)) {\n this.parsedRecords.put(record.docName, new ArrayList<ParsedRecord>());\n }\n this.parsedRecords.get(record.docName).add(record);\n\n if (!this.docToMaxPosition.containsKey(record.docName) ||\n this.docToMaxPosition.containsKey(record.docName) && this.docToMaxPosition.get(record.docName) < record.position) {\n this.docToMaxPosition.put(record.docName, record.position);\n }\n }\n }", "protected abstract List<O> parseFileForObservations(Scanner scn);", "public PragyanXmlParser(InputStream file) {\r\n\t\tfileToParse = file;\r\n\t\tcharWriter = new CharArrayWriter();\r\n\t\tdateWriter = new CharArrayWriter();\r\n\t\tformat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\"); \r\n\t\t\r\n\t}", "public interface Parser {\n\t\n\t/**\n\t * A method to parse the file\n\t * @param file the file\n\t * @return the content\n\t */\n\tpublic String parse(File file);\n\t\n}", "private void readFile(File fp)throws IOException{\n Scanner in=new Scanner(fp);\n String line,s[];\n while(in.hasNext()){\n line=in.nextLine();\n s=line.split(\"[ ]+\");\n if(s.length<3){\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0])));\n }\n else{\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0],s[2].charAt(0),s[4].charAt(0),\n Integer.parseInt(s[3]),Double.parseDouble(s[5]))));\n }\n }\n }", "public void readFile(File file){\n try{\n scan = new Scanner(file);\n while(scan.hasNextLine()){\n String line = scan.nextLine();\n if(line.startsWith(\"//\")){\n continue;\n }\n process(line);\n }\n }catch(IOException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n }catch(NullPointerException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n \n }\n }", "public void newst()\r\n\t{\r\n\t\ttry {\r\n\t\t\tst = new StringTokenizer(file.readLine());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "public boolean parseFile(String fileName) {\n\n\t\t// This will reference one line at a time\n\t\tString line = \"\";\n\n\t\ttry {\n\t\t\t// FileReader reads text files in the default encoding.\n\t\t\tFileReader fileReader = new FileReader(fileName);\n\n\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\n\t\t\t\tif (line.startsWith(\"//\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tparseLine(line, true);\n\t\t\t}\n\n\t\t\t// Always close files.\n\t\t\tbufferedReader.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}", "public Parser(File file) {\n \t\t\ttry {\n \t\t\t\tload(new FileInputStream(file));\n \t\t\t} catch (Exception e) {\n \t\t\t\t// continue ... actual parsing will report errors\n \t\t\t}\n \t\t}", "public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }", "private void ReadFile(String filePath) throws IOException{\n File file = new File(filePath);\n BufferedReader b = new BufferedReader(new FileReader(file));\n int lineNumber = 1;\n String line = \"\";\n line = b.readLine();\n while (line != null) {\n // analyze the line only when it is not empty and it is not a comment\n String trimLine = line.toString().trim();\n if(trimLine.length() != 0 && !trimLine.substring(0, 1).equals(\"/\") && !trimLine.substring(0, 1).equals(\"#\")){\n // line.toString().trim(): eliminate heading and tailing whitespaces\n // but add one whitespace to the end of the string to facilitate token manipulation\n // under the circumstances that there is only one token on one line, e.g. main\n AnalyzeByLine(line.toString().trim() + \" \", lineNumber);\n }\n lineNumber++;\n line = b.readLine();\n }\n arrL.add(new Token(\"end of file\", 255, lineNumber));\n// for(int i = 0; i < arrL.size(); i++){\n// System.out.println(arrL.get(i).getCharacters() + \" \" + arrL.get(i).getValue() + \" \" + arrL.get(i).getLineNum());\n// }\n }", "public void visit(TreeBuilder tree){\n\t\tString line;\n\t\twhile ((line = file.readLine(true)) != null)\n\t {\t\t \n \t\tString[] words = line.split(\" \");\n \t\tfor(String word : words){\n \t\t\tif(!word.equals(\"\")){\n \t\t\t\ttree.insertNode(word);\n \t\t\t}\n \t\t}\n \t}\n\t}", "private void parseData() {\n\t\t\r\n\t}", "public void parse() throws IOException, StopDataMissingException, JSONException{\n DataProvider dataProvider = new FileDataProvider(filename);\n\n parseStops(dataProvider.dataSourceToString());\n }", "ReleaseFile parse( InputStream is ) throws IOException;", "public FilePartReader() {\n filePath = \"/home/cc/Desktop/OopModule/testing/filepartreader-testing-with-junit-grzechu31/text.txt\";\n fromLine = 1;\n toLine = 10;\n }", "public TweetsFileReader(String textFileName){\n\t\tReadFile(textFileName);\n\t}", "public void parseAndDisplay(File inputFile) throws IOException, FileParseException {\n\t\tinfile = inputFile;\n\t\tDisplayData data = null;\n\n\t\tdata = parse(inputFile);\n\n\t\tinfile = null;\n\t\tsunfishParent.displayData(data, data.getFileName());\n\t}", "public void readFile()\n {\n try {\n fileName = JOptionPane.showInputDialog(null,\n \"Please enter the file you'd like to access.\"\n + \"\\nHint: You want to access 'catalog.txt'!\");\n \n File aFile = new File(fileName);\n Scanner myFile = new Scanner(aFile);\n \n String artist, albumName; \n while(myFile.hasNext())\n { //first we scan the document\n String line = myFile.nextLine(); //for the next line. then we\n Scanner myLine = new Scanner(line); //scan that line for our info.\n \n artist = myLine.next();\n albumName = myLine.next();\n ArrayList<Track> tracks = new ArrayList<>();\n \n while(myLine.hasNext()) //to make sure we get all the tracks\n { //that are on the line.\n Track song = new Track(myLine.next());\n tracks.add(song);\n }\n myLine.close();\n Collections.sort(tracks); //sort the list of tracks as soon as we\n //get all of them included in the album.\n Album anAlbum = new Album(artist, albumName, tracks);\n catalog.add(anAlbum);\n }\n myFile.close();\n }\n catch (NullPointerException e) {\n System.err.println(\"You failed to enter a file name!\");\n System.exit(1);\n }\n catch (FileNotFoundException e) {\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n }", "public Parser(String fileHandle) {\n\t\tmainFile = fileHandle;\n\t}", "public TextfileReader() throws IOException {\n getText();\n }", "private static List<Message> parse(File f, String sourceUrlString) {\n \t\treturn null;\n \t}", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "public Document parse(File aFile)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\t/**\n\t\t * @todo Fix/implement this later\n\t\t */\n\t\tthrow new SAXException(\"Not supported\");\n\t}", "private void parse() throws IOException {\r\n\t\tClassLoader cl = getClass().getClassLoader();\r\n\t\tFile file = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t\tFile file2 = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t FileReader fr = new FileReader(file);\r\n\t FileReader fr2 = new FileReader(file2);\r\n\t\tin=new BufferedReader(fr);\r\n\t\tin2=new BufferedReader(fr2);\r\n\t\tString line;\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) parseTerm();\r\n\t\t}\r\n\t\tin.close();\r\n\t\tfr.close();\r\n\t\t\r\n\t\t//terms.printTerms();\r\n\t\tbuffer=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) createEdges();\r\n\t\t}\r\n\t\tin2.close();\r\n\t\tfr2.close();\r\n\t\tLOGGER.info(\"Finished Building DAGs!\");\r\n\t\t\r\n\t}", "@Override\n\tprotected IStrategoTerm doParse(String input, String filename)\n\t\t\tthrows TokenExpectedException, BadTokenException, SGLRException, IOException {\n\t\t\n\t\tif (parseTable.isDynamic()) {\n\t\t\tparseTable.initialize(new File(filename));\n\t\t\tresetState();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tDebug.startTimer();\n\t\t\tIStrategoTerm result;\n\t\t\ttry {\n\t\t\t\t//TODO: completionMode true or false depends on whether this method is called via CompletionParser\n\t\t\t\t// true means all completion productions are enabled\n\t\t\t\t// false means that only wellformed productions are enabled\n\t\t\t\t// Idee: mark wellformed productions as {completion, recover} and treat them as completion\n\t\t\t\tresult = (IStrategoTerm) parser.parse(input, filename, getStartSymbol(), true, cursorLocation);\n\t\t\t} finally {\n\t\t\t\tDebug.stopTimer(\"File parsed: \" + new File(filename).getName());\n\t\t\t}\n\n\t\t\t// UNDONE: disabled incremental parser for now\n\t\t\t// testIncrementalParser(input, filename, result);\n\t\t\treturn result;\n\t\t} catch (FilterException e) {\n\t\t\tif (e.getCause() == null && parser.getDisambiguator().getFilterPriorities()) {\n\t\t\t\tEnvironment.logException(\"Parse filter failure - disabling priority filters and trying again\", e);\n\t\t\t\tgetDisambiguator().setFilterPriorities(false);\n\t\t\t\ttry {\n\t\t\t\t\tIStrategoTerm result = (IStrategoTerm) parser.parse(input, filename, getStartSymbol());\n\t\t\t\t\treturn result;\n\t\t\t\t} finally {\n\t\t\t\t\tgetDisambiguator().setFilterPriorities(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new FilterException(e.getParser(), e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t}", "static void parseIt() {\n try {\n long start = System.nanoTime();\n int[] modes = {DET_MODE, SUM_MODE, DOUBLES_MODE};\n String[] filePaths = {\"\\\\catalogue_products.xml\", \"\\\\products_to_categories.xml\", \"\\\\doubles.xml\"};\n HashMap<String, String[]> update = buildUpdateMap(remainderFile);\n window.putLog(\"-------------------------------------\\n\" + updateNodes(offerNodes, update) +\n \"\\nФайлы для загрузки:\");\n for (int i = 0; i < filePaths.length; i++) {\n // Define location for output file\n File outputFile = new File(workingDirectory.getParent() + filePaths[i]);\n pushDocumentToFile(outputFile, modes[i]);\n printFileInfo(outputFile);\n }\n window.putLog(\"-------------------------------------\\nВсего обработано уникальных записей: \" +\n offerNodes.size());\n long time = (System.nanoTime() - start) / 1000000;\n window.putLog(\"Завершено без ошибок за \" + time + \" мс.\");\n offerNodes = null;\n //window.workshop.setParseButtonDisabled();\n } catch (TransformerException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \" (\" + e.getException() + \")\\n\\t\" + e.getMessageAndLocation()));\n } catch (ParserConfigurationException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getLocalizedMessage()));\n } catch (SAXException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(\"SAXexception: \" + e.getMessage()));\n\n } catch (IOException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getMessage() + \". \" + e.getStackTrace()[0]));\n }\n }", "public RuleParser() {\n this.fileName = \"\";\n }" ]
[ "0.74240863", "0.7360559", "0.7301968", "0.7275342", "0.6990775", "0.6892991", "0.68272614", "0.67858595", "0.6751431", "0.66272", "0.6609371", "0.65920013", "0.65734047", "0.65694505", "0.6515939", "0.6493148", "0.64924335", "0.6464106", "0.63721174", "0.63593614", "0.6344151", "0.63413286", "0.63321507", "0.6325706", "0.6294599", "0.62854266", "0.6280834", "0.6279103", "0.6250572", "0.6240447", "0.62214476", "0.62090296", "0.619513", "0.6172711", "0.6161657", "0.6161388", "0.61408293", "0.61379856", "0.613112", "0.6118699", "0.6111694", "0.6111076", "0.6094978", "0.6086224", "0.6048237", "0.60471946", "0.60455066", "0.60448533", "0.6023", "0.6019555", "0.60060567", "0.60053366", "0.5970428", "0.5964519", "0.59610367", "0.5954397", "0.5938055", "0.59367067", "0.59365296", "0.59337205", "0.5932305", "0.59252656", "0.5921957", "0.59203625", "0.5904583", "0.59009624", "0.5892183", "0.5886759", "0.5881967", "0.58715075", "0.5864833", "0.5858487", "0.58471453", "0.58446455", "0.58373094", "0.58321583", "0.58100176", "0.5803467", "0.5802072", "0.5799532", "0.57959545", "0.5792011", "0.5791406", "0.57881194", "0.5785662", "0.5782451", "0.5773973", "0.5769249", "0.5761689", "0.5758195", "0.5754473", "0.57510155", "0.57483995", "0.57436544", "0.5743563", "0.5729717", "0.57211494", "0.5716445", "0.5714953", "0.571487", "0.571274" ]
0.0
-1
Coerce to "null" if null.
public void append(String toAppend) { if (toAppend == null) { toAppend = "null"; } int appendLength = toAppend.length(); if (appendLength > 0) { stringArray[arrayLen++] = toAppend; stringLength += appendLength; /* * If we hit 1k elements, let's do a join to reduce the array size. This * number was arrived at experimentally through benchmarking. */ if (arrayLen > 1024) { toString(); // Preallocate the next 1024 (faster on FF). setLength(stringArray, 1024); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T getNullRepresentation();", "protected abstract Object convertNonNull(Object o);", "public static String formatNull() {\n\t\treturn \"null\";\n\t}", "public static String nullConv(String value){\r\n\t\tif(value==null){\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "String getDefaultNull();", "@Deprecated\n public static Object stripNULL(Object obj)\n {\n if (obj == null) {\n throw new NullPointerException();\n }\n if (Null.getInstance().equals(obj)) {\n return null;\n }\n return obj;\n }", "T getNullValue();", "public static String convertNULLtoString(Object object) {\n return object == null ? EMPTY : object.toString();\n }", "private String getNullValueText() {\n return getNull();\n }", "public static String null2String(Object obj) {\n\t\treturn obj == null ? \"\" : obj.toString();\n\t}", "public static Value makeNull() {\n return theNull;\n }", "@Deprecated\n @InlineMe(replacement = \"null\")\n @Override\n public final Object getValue(final String arg0) {\n return null;\n }", "@Override\n public String asText() {\n return null;\n }", "@Override\n\tpublic Object revert(Object o) {\n\t\tif(o != null) {\n\t\t\treturn new String((char[])o);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Object valueOf(String arg0) {\n\t\treturn null;\n\t}", "@Override\n public String visit(NullLiteralExpr n, Object arg) {\n return null;\n }", "final protected String valueOf(Object obj) {\r\n if (obj == null) {\r\n return null;\r\n }\r\n return String.valueOf(obj);\r\n }", "@Override\n public void setNull() {\n\n }", "private static String valueOf(Object str3Sg) {\n\t\treturn null;\r\n\t}", "NullValue createNullValue();", "NullValue createNullValue();", "public T caseNullLiteral(NullLiteral object)\n {\n return null;\n }", "private static String null2unknown(String in) {\r\n\t\tif (in == null || in.length() == 0) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\treturn in;\r\n\t\t}\r\n\t}", "public static String nullToEmpty ( final String n )\n {\n return null == n ? \"\" : n;\n }", "private static String getValue(Object o) {\n if (o != null) {\n return o.toString();\n }\n return \"null\";\n }", "public static String nullToBlank(Object texto) {\n try {\n if (texto == null) {\n return \"\";\n }\n if (texto.toString().trim().equals(\"null\")) {\n return \"\";\n }\n return texto.toString().trim();\n } catch (Exception e) {\n return \"\";\n }\n\n }", "public String NullSave()\n {\n return \"null\";\n }", "@Override\n\tpublic Object convert(Object o) {\n\t\tif(o != null) {\n\t\t\treturn ((String)o).toCharArray();\n\t\t}\n\t\treturn null;\n\t}", "public static String toString(Object value) {\n if (value != null)\n return value.toString();\n else\n return null;\n }", "private String notNull(String value) {\n return value != null ? value : \"\";\n }", "public String getNullAttribute();", "private String getStringOrNull (String value) {\n if (value == null || value.isEmpty()) value = null;\n return value;\n }", "@Override\n public String visit(CastExpr n, Object arg) {\n return null;\n }", "@Override\r\n\t@JsonIgnore\r\n\tpublic String asText() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "String nullStrToSpc(Object obj) {\n String spcStr = \"\";\n\n if (obj == null) {\n return spcStr;\n } else {\n return obj.toString();\n }\n }", "@Override\r\n\t\t\tpublic String toExibir() {\n\t\t\t\treturn null;\r\n\t\t\t}", "@Impure\n public abstract void encodeNull(int typeCode) throws DatabaseException;", "public static String toString(Object obj, String nullStr) {\n return obj == null ? nullStr : obj.toString();\n }", "public String toSimpleString() {\n\t\treturn null;\n\t}", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "public static String removeNull(Object value) {\r\n String valueToReturn = EMPTY_STRING_INDICATOR;\r\n\r\n if(value instanceof String) {\r\n valueToReturn = removeNullString((String) value);\r\n } else if(value instanceof Integer) {\r\n valueToReturn = removeNullInteger((Integer) value);\r\n } else if(value instanceof Date) {\r\n valueToReturn = removeNullDate((Date) value);\r\n } else if(value instanceof Boolean) {\r\n valueToReturn = removeNullBoolean((Boolean) value);\r\n } else if(value instanceof BigDecimal) {\r\n valueToReturn = removeNullBigDecimal((BigDecimal) value);\r\n } else if(value instanceof Long) {\r\n valueToReturn = removeNullLong((Long) value);\r\n }\r\n\r\n return valueToReturn;\r\n }", "protected <T> T emptyToNull(T obj) {\r\n if (isEmpty(obj)) {\r\n return null;\r\n } else {\r\n return obj;\r\n }\r\n }", "public static String convertNullToBlank(String s) {\n \tif(s==null) return \"\";\n \treturn s;\n }", "public boolean supportsEqualNullSyntax() {\n return true;\n }", "@Override\n\tpublic String readScalarString() throws IOException {\n\t\treturn null;\n\t}", "public String checkNull(String result) {\r\n\t\tif (result == null || result.equals(\"null\")) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}", "public static String trimAndConvertEmptyToNull(String str) {\n\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString newStr = str.trim();\n\n\t\tif (newStr.length() < 1) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn newStr;\n\t}", "@Test\n\tpublic void testNullToTerm() {\n\t\tassertTrue(JAVA_NULL.termEquals(jpc.toTerm(null)));\n\t}", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion2(){\n MonetaryConversions.getConversion((String)null);\n }", "public M csrtTypeNameNull(){if(this.get(\"csrtTypeNameNot\")==null)this.put(\"csrtTypeNameNot\", \"\");this.put(\"csrtTypeName\", null);return this;}", "private String getString() {\n\t\treturn null;\n\t}", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion4(){\n MonetaryConversions.getConversion((String)null, ConversionContext.of());\n }", "public static String fromNullToEmtpyString(String a) {\r\n\t\tif (a == null) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}", "public void testConvertStringLocaleNull() {\n Object result = null;\n try {\n result = LocaleConvertUtils.convert(\"123\", Integer.class, null, \"#,###\");\n } catch (final Exception e) {\n e.printStackTrace();\n fail(\"Threw: \" + e);\n }\n assertNotNull(\"Null Result\", result);\n assertEquals(\"Integer Type\", Integer.class, result.getClass());\n assertEquals(\"Integer Value\", Integer.valueOf(123), result);\n }", "public T caseNullLiteralExpCS(NullLiteralExpCS object) {\r\n return null;\r\n }", "@Nullable\n public\n Object\n foo () {\n return null;\n }", "@Override\n\tpublic String toXMLString(Object arg0) {\n\t\treturn null;\n\t}", "@Test(timeout = 4000)\n public void test039() throws Throwable {\n String string0 = JSONObject.valueToString((Object) null);\n assertEquals(\"null\", string0);\n }", "public static String checkNullObject(Object val) {\n\n if (val != null) {\n if (\"\".equals(val.toString().trim())) {\n return \"\";\n }\n return val.toString();\n } else {\n return \"\";\n }\n }", "@Override\n\tpublic String display() {\n\t\treturn \"null\";\n\t}", "public THING orElseNull() {\n return directlyGetOrElse(null);\n }", "public static String mapEmptyToNull(String strIn)\r\n {\r\n if (strIn == null || strIn.trim().equals(\"\"))\r\n {\r\n return null;\r\n }\r\n return strIn;\r\n }", "@Override\n\tpublic String objectToSQLString(Object arg0) {\n\t\treturn null;\n\t}", "public T caseNullDirective(NullDirective object)\n\t{\n\t\treturn null;\n\t}", "@Override\n public Optional<?> getNullValue(DeserializationContext ctxt) throws JsonMappingException {\n return Optional.ofNullable(_valueDeserializer.getNullValue(ctxt));\n }", "public static String nullifyNullOrEmptyString(final String targetString) {\n\t\tString outputString = null;\n\n\t\tif (targetString != null) {\n\t\t\tString targetStringTrim = targetString.trim();\n\t\t\tif ((!\"null\".equalsIgnoreCase(targetStringTrim)) && (targetStringTrim.length() > 0)) {\n\t\t\t\toutputString = targetStringTrim;\n\t\t\t}\n\t\t}\n\n\t\treturn outputString;\n\t}", "default V getOrThrow() {\n return getOrThrow(\"null\");\n }", "@Override\r\n\tpublic String encode() {\n\t\treturn null;\r\n\t}", "public boolean allowsNull() {\n return this.allowsNullValue;\n }", "@Override\n\tpublic String toString() {\n\t\treturn getValue() != null ? getValue().toString() : \"null\";\n\t}", "@Override\n public String visit(UnionType n, Object arg) {\n return null;\n }", "public java.lang.String getNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private String setNullIfEmpty(String in) {\n if (in != null && in.trim().length() == 0) {\n return null;\n }\n return in;\n }", "ExprNull createExprNull();", "@Override\n\tprotected Object doGetValue(Object source) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}", "public String replaceMissingWithNull(String value);", "public static String nullToEmpty(String string)\r\n {\r\n return (string == null)?\"\":string;\r\n }", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}", "@Override\n\tpublic String getAsText() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String toSource(String arg0) throws Exception {\n\t\treturn null;\n\t}", "public boolean canProcessNull() {\n return false;\n }", "@Test\n\tpublic void retrieve_literal_null_value() throws Exception {\n\t\tif (configuration.startsWith(\"derby\")) return;\n\t\t\n\t\t\n\t\tjdbcExecutor_test_null(Long.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Integer.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Short.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Byte.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Double.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Float.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Boolean.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(String.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Character.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Date.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Time.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Timestamp.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(java.util.Date.class, \"select null from jdbc_test\");\n\t\t\n\t\tjdbcExecutor_test_null(byte[].class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Clob.class, \"select null from jdbc_test\");\n\t\tjdbcExecutor_test_null(Blob.class, \"select null from jdbc_test\");\n\t\n\t}", "private static String toString(Object obj) {\n return (obj == null ? null : obj.toString());\n }", "public static String nullSafeToString(Object obj) {\r\n if (obj == null) {\r\n return NULL_STRING;\r\n }\r\n if (obj instanceof String) {\r\n return (String) obj;\r\n }\r\n if (obj instanceof Object[]) {\r\n return nullSafeToString((Object[]) obj);\r\n }\r\n if (obj instanceof boolean[]) {\r\n return nullSafeToString((boolean[]) obj);\r\n }\r\n if (obj instanceof byte[]) {\r\n return nullSafeToString((byte[]) obj);\r\n }\r\n if (obj instanceof char[]) {\r\n return nullSafeToString((char[]) obj);\r\n }\r\n if (obj instanceof double[]) {\r\n return nullSafeToString((double[]) obj);\r\n }\r\n if (obj instanceof float[]) {\r\n return nullSafeToString((float[]) obj);\r\n }\r\n if (obj instanceof int[]) {\r\n return nullSafeToString((int[]) obj);\r\n }\r\n if (obj instanceof long[]) {\r\n return nullSafeToString((long[]) obj);\r\n }\r\n if (obj instanceof short[]) {\r\n return nullSafeToString((short[]) obj);\r\n }\r\n String str = obj.toString();\r\n return (str != null ? str : EMPTY_STRING);\r\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}", "public M csrtMoneyTypeNull(){if(this.get(\"csrtMoneyTypeNot\")==null)this.put(\"csrtMoneyTypeNot\", \"\");this.put(\"csrtMoneyType\", null);return this;}", "default T handleNull() {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "public final String nullSafeGetString(final JSONObject data, final String key) {\n if ( data.get(key) != null ) {\n return data.get(key).toString();\n } else {\n return \"null\";\n }\n }", "@Override\n\tpublic T get(String obj) {\n\t\treturn null;\n\t}", "public static String emptyToNull(String string)\r\n {\r\n return TextUtil.isEmpty(string)?null:string;\r\n }", "@Override public Type make_nil(byte nil) { return make(nil,_any); }", "private String replaceNull(Time s) {\n\t\treturn s == null ? \"--\" : s.toString();\n\t}", "private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }" ]
[ "0.6956343", "0.6892623", "0.68070745", "0.67583704", "0.6676108", "0.66310763", "0.66174376", "0.65642035", "0.652197", "0.6456118", "0.6354277", "0.6335654", "0.62983865", "0.6251683", "0.6245123", "0.62242544", "0.6099665", "0.6072607", "0.6069041", "0.60574776", "0.60574776", "0.60437995", "0.5976482", "0.59630954", "0.59510785", "0.59453607", "0.59375614", "0.59362036", "0.59290886", "0.58981323", "0.5872543", "0.58533764", "0.5847656", "0.5842852", "0.5835455", "0.5822953", "0.58227146", "0.58204275", "0.58150756", "0.5814441", "0.5814239", "0.58053404", "0.57981694", "0.5793008", "0.578528", "0.57381934", "0.5721208", "0.57107615", "0.5707246", "0.5702064", "0.5701427", "0.5691514", "0.5678693", "0.56689525", "0.56681716", "0.56678295", "0.56621516", "0.5659465", "0.56168306", "0.5613851", "0.55977374", "0.559193", "0.5580292", "0.55632675", "0.5561823", "0.5551563", "0.55464095", "0.55382156", "0.5533154", "0.55132127", "0.5511422", "0.5508638", "0.55086195", "0.55082", "0.55074275", "0.5489212", "0.54844326", "0.548255", "0.5468182", "0.54543406", "0.5453453", "0.5449846", "0.5443652", "0.54424316", "0.5441781", "0.5438571", "0.5436008", "0.5428692", "0.5423193", "0.5421635", "0.5421384", "0.5421384", "0.5421384", "0.5418744", "0.5409943", "0.5407391", "0.54049367", "0.5394297", "0.5394238", "0.53912437", "0.5385118" ]
0.0
-1
Get the joined string.
public void replace(int start, int end, String toInsert) { String s = toString(); // Build a new buffer in pieces (will throw exceptions). stringArray = new String[] { s.substring(0, start), toInsert, s.substring(end)}; arrayLen = 3; // Calculate the new string length. stringLength += toInsert.length() - (end - start); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String join() {\n\t\t// A stringbuilder is an efficient way to create a new string in Java, since += makes copies.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (Node<T> current = start; current != null; current = current.next) {\n\t\t\tif (current != start) {\n\t\t\t\tsb.append(' ');\n\t\t\t}\n\t\t\tsb.append(current.value);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String join() {\n String result = \"\";\n\n for(int i = 0; i < list.size(); i++) {\n result += list.get(i);\n if (i < list.size() - 1) {\n result += \", \";\n }\n }\n\n return result;\n }", "@Override\n public String toString() {\n if (arrayLen != 1) {\n setLength(stringArray, arrayLen);\n String s = join(stringArray);\n // Create a new array to allow everything to get GC'd.\n stringArray = new String[] {s};\n arrayLen = 1;\n }\n return stringArray[0];\n }", "public static String join(Collection<String> collection, String join) {\n\t\tString r = \"\";\n\t\tboolean first = true;\n\t\t\n\t\tfor (String e : collection) {\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t\tr = e;\n\t\t\t} else {\n\t\t\t\tr += join + e;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn r;\n\t}", "public String toString(){\n String combinedStr = this.string1 + \" \" + this.string2 + \" \" + this.string3;\n return combinedStr;\n }", "public static String join(Collection<String> collection) {\n\t\treturn join(collection, \"\");\n\t}", "public String getStringRepresentation() {\n StringJoiner joiner = new StringJoiner(STRING_FORMAT_DELIMITER);\n\n joiner.add(this.getCaller())\n .add(this.getCallee())\n .add(SIMPLE_DATE_FORMAT.format(startTime))\n .add(SIMPLE_DATE_FORMAT.format(endTime));\n\n return joiner.toString();\n }", "private static String join(String prefix, String delimiter, Iterable<?> items) {\n if (items == null) return (\"\");\n if (prefix == null) prefix = \"\";\n\n StringBuilder sb = new StringBuilder();\n int i = 0;\n for (Object x : items) {\n if (!prefix.isEmpty()) sb.append(prefix);\n sb.append(x != null ? x.toString() : x).append(delimiter);\n i++;\n }\n if (i == 0) return \"\";\n sb.delete(sb.length() - delimiter.length(), sb.length());\n\n return sb.toString();\n }", "public String concatenate() {\n\t\t// loop over each node in the list and \n\t\t// concatenate into a single string\n\t\tString concatenate = \"\";\n\t\tNode nodref = head;\n\t\twhile (nodref != null){\n\t\t\tString temp = nodref.data;\n\t\t\tconcatenate += temp;\n\t\t\tnodref = nodref.next;\n\t\t}\n\t\treturn concatenate;\n\t}", "public static void stringsJoining() {\n\n StringJoiner joiner = new StringJoiner(\" \", \"{\", \"}\");\n String result = joiner.add(\"Dorota\").add(\"is\").add(\"ill\").add(\"and\").add(\"stays\").add(\"home\").toString();\n System.out.println(result);\n }", "public static String stringJoin(CharSequence delimiter, CharSequence... args) {\n StringBuilder builder = new StringBuilder();\n boolean first = true;\n for (CharSequence cs : args) {\n if (first) {\n first = false;\n } else {\n builder.append(delimiter);\n }\n builder.append(cs);\n }\n return builder.toString();\n }", "static String join(CharSequence separator, String[] strings) {\n\t\t// Ideally we don't have to duplicate the code here if array is\n\t\t// iterable.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean first = true;\n\t\tfor (String s : strings) {\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t} else {\n\t\t\t\tsb.append(separator);\n\t\t\t}\n\t\t\tsb.append(s);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String joinStrings(String[] a){\n String js=\"\";\n for (int i=0;i<a.length;i++){\n if (i==0){\n js = a[i];\n } else{\n js = js + \" \" + a[i];\n }\n }\n return js;\n }", "public static String join(String[] array)\n {\n if( array.length == 0 ) return Constants.BLANK;\n StringBuilder sb = new StringBuilder();\n for( String s : array )\n sb.append(s);\n return sb.toString();\n }", "@Override\n public String toString() {\n return ArrayHelper.join(this.toArray(new Part[0]), \"/\");\n }", "public String makeCombinedName() {\n return sortDao.getBoats().stream()\n .map(Boat::toString)\n .sorted()\n .collect(Collectors.joining(\", \"));\n }", "public String join(String conjunction, Iterator<String> iterator) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean first = true;\n\t\twhile (iterator.hasNext()) {\n\t\t\tString item = iterator.next();\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t} else {\n\t\t\t\tsb.append(conjunction);\n\t\t\t}\n\t\t\tsb.append(item);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String join(String glue, String... strings) {\n StringBuilder sb = new StringBuilder();\n for (String string : strings) {\n if (sb.length() > 0 && !string.isEmpty()) {\n sb.append(glue);\n }\n sb.append(string);\n }\n return sb.toString();\n }", "public static String join(char delim, Iterable<?> parts) {\n StringBuilder sb = new StringBuilder();\n for (Iterator<?> iter = parts.iterator(); iter.hasNext();) {\n sb.append(iter.next());\n if (iter.hasNext()) {\n sb.append(delim);\n }\n }\n return sb.toString();\n }", "public String getTo(){\r\n\t\tString output = \"\";\r\n\t\tfor(int i = 0; i < to.size(); i++){\r\n\t\t\tif(i > 0){\r\n\t\t\t\toutput += \";\";\r\n\t\t\t}\r\n\t\t\toutput += to.get(i);\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "public static String join(String delim, Iterable<?> parts) {\n StringBuilder sb = new StringBuilder();\n for (Iterator<?> iter = parts.iterator(); iter.hasNext();) {\n sb.append(iter.next());\n if (iter.hasNext()) {\n sb.append(delim);\n }\n }\n return sb.toString();\n }", "public static String join(String[] theParam, String separator) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < theParam.length; i++) {\n if (i > 0)\n sb.append(separator);\n sb.append(theParam[i]);\n }\n return sb.toString();\n }", "public static String join(@NonNull CharSequence delimiter, @NonNull Iterable tokens) {\n final Iterator<?> it = tokens.iterator();\n if (!it.hasNext()) {\n return \"\";\n }\n final StringBuilder sb = new StringBuilder();\n sb.append(it.next());\n while (it.hasNext()) {\n sb.append(delimiter);\n sb.append(it.next());\n }\n return sb.toString();\n }", "public static String join(List elements, String separator)\n {\n switch (elements.size())\n {\n case 0:\n return \"\";\n \n case 1:\n return String.valueOf(elements.get(0));\n \n default:\n \n StringBuilder buffer = new StringBuilder();\n boolean first = true;\n \n for (Object o : elements)\n {\n if (!first)\n buffer.append(separator);\n \n String string = String.valueOf(o);\n \n if (string.equals(\"\"))\n string = \"(blank)\";\n \n buffer.append(string);\n \n first = false;\n }\n \n return buffer.toString();\n }\n }", "public static final String join(final String delimiter,\n\t\t\tfinal Object... value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tif (value.length == 0) {\n\t\t\treturn EMPTY_STRING;\n\t\t}\n\n\t\tfinal String del = (delimiter == null) ? EMPTY_STRING : delimiter;\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = 0; i < value.length; ++i) {\n\t\t\tbuilder.append((value[i] == null) ? EMPTY_STRING : value[i]\n\t\t\t\t\t.toString());\n\t\t\tif (i == value.length - 1)\n\t\t\t\treturn builder.toString();\n\t\t\tbuilder.append(del);\n\t\t}\n\n\t\treturn builder.toString();\n\t}", "private static <T> String join(final Collection<T> s, final String delimiter) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tIterator<T> iter = s.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tbuilder.append(iter.next());\n\t\t\tif (!iter.hasNext()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbuilder.append(delimiter);\n\t\t}\n\t\treturn builder.toString();\n\t}", "public static <E> String concatElements(Collection<E> collection, String joinText) {\n return concatElements(collection, Object::toString, joinText);\n }", "public static String join(String[] input)\n {\n StringBuilder sb = new StringBuilder();\n for(String value : input)\n {\n sb.append(value);\n sb.append(\" \");\n }\n return sb.toString();\n }", "public static String join(String separator, String... fragments)\n\t{\n\t\tif (fragments.length < 1)\n\t\t{\n\t\t\t// no elements\n\t\t\treturn \"\";\n\t\t}\n\t\telse if (fragments.length < 2)\n\t\t{\n\t\t\t// single element\n\t\t\treturn fragments[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// two or more elements\n\n\t\t\tStringBuilder buff = new StringBuilder(128);\n\t\t\tbuff.append(fragments[0]);\n\t\t\tfor (int i = 1; i < fragments.length; i++)\n\t\t\t{\n\t\t\t\tboolean lhsClosed = fragments[i - 1].endsWith(separator);\n\t\t\t\tboolean rhsClosed = fragments[i].startsWith(separator);\n\t\t\t\tif (lhsClosed && rhsClosed)\n\t\t\t\t{\n\t\t\t\t\tbuff.append(fragments[i].substring(1));\n\t\t\t\t}\n\t\t\t\telse if (!lhsClosed && !rhsClosed)\n\t\t\t\t{\n\t\t\t\t\tbuff.append(separator).append(fragments[i]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbuff.append(fragments[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn buff.toString();\n\t\t}\n\t}", "public String toString() {\n\t\treturn String.format(\"Append \" + result.length() + \" chars to String\\n\" + \"final string length = \" + result.length());\n\t}", "public static CharSequence join(char delim, CharSequence... parts) {\n AppendableCharSequence seq = new AppendableCharSequence();\n for (int i = 0; i < parts.length; i++) {\n seq.append(parts[i]);\n if (i != parts.length - 1) {\n seq.append(delim);\n }\n }\n return seq;\n }", "public String stringJoin(Collection<? extends CharSequence> strings) {\n return EasonString.join(strings);\n }", "public static String buildString(String[] split, String splitChar, int begin, int end) {\n StringBuilder combined = new StringBuilder();\n while (begin <= end && begin < split.length) {\n if (combined.length() > 0) {\n combined.append(splitChar);\n }\n combined.append(split[begin]);\n begin++;\n }\n return combined.toString();\n }", "public static String join(String delimiter, Collection<String> elements) {\n\t\tif (delimiter == null)\n\t\t\tthrow new NullPointerException(\"No delimiter given.\");\n\t\tif (elements == null)\n\t\t\tthrow new NullPointerException(\"No elements given.\");\n\n\t\tboolean first = true;\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tfor (String element : elements) {\n\t\t\tif (!first)\n\t\t\t\tbuilder.append(delimiter);\n\t\t\tbuilder.append(element);\n\t\t\tfirst = false;\n\t\t}\n\n\t\treturn builder.toString();\n\t}", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic static String join(CharSequence delimiter, Iterable tokens) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tboolean firstTime = true;\r\n\t\tfor (Object token : tokens) {\r\n\t\t\tif (firstTime) {\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(delimiter);\r\n\t\t\t}\r\n\t\t\tsb.append(token);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public static String implode ( final String glue, final String[] pieces )\n {\n final StringBuilder sb;\n\n if (null == glue || null == pieces) return null;\n if (pieces.length == 0) return \"\";\n\n sb = new StringBuilder();\n for (final String s : pieces) sb.append(s).append(glue);\n return sb.toString().substring(0, sb.length() - glue.length());\n }", "public static String joinPath(String... parts) {\n StringBuilder sb = new StringBuilder();\n if (parts.length > 0) {\n sb.append(parts[0]);\n }\n for (int i = 1; i < parts.length; i++) {\n String part = parts[i];\n if (part.isEmpty() || (part.length() == 1 && part.charAt(0) == '/')) {\n continue;\n }\n boolean gotTrailingSlash = sb.length() == 0 ? false : sb.charAt(sb.length() - 1) == '/';\n boolean gotLeadingSlash = part.charAt(0) == '/';\n if (gotTrailingSlash != !gotLeadingSlash) {\n sb.append(part);\n } else {\n if (!gotTrailingSlash) {\n sb.append('/');\n } else {\n sb.append(part.substring(1));\n }\n }\n }\n return sb.toString();\n }", "public String toString() {\n\t\t\tif (lastAppendNewLine) {\n\t\t\t\tmBuilder.deleteCharAt(mBuilder.length() - 1);\n\t\t\t}\n\t\t\treturn mBuilder.toString();\n\t\t}", "public static String join(Collection<?> s, String delimiter) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tIterator<?> iter = s.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tbuffer.append(iter.next());\n\t\t\tif (iter.hasNext())\n\t\t\t\tbuffer.append(delimiter);\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n public String toString() {\n StringBuilder retVal = new StringBuilder();\n int phraseCount = this.phrases.size();\n if (phraseCount > 0) {\n // We are non-empty. Start with the prefix.\n retVal.append(this.prefix);\n retVal.append(' ');\n switch (phraseCount) {\n case 2:\n // Two phrases are joined with \" and \".\n retVal.append(this.phrases.get(0));\n retVal.append(\" and \");\n retVal.append(this.phrases.get(1));\n break;\n case 1:\n // A single phrase is unadorned.\n retVal.append(this.phrases.get(0));\n break;\n default:\n // Three or more requires an Oxford comma.\n retVal.append(this.phrases.get(0));\n int lastPhrase = phraseCount - 1;\n for (int i = 1; i < lastPhrase; i++) {\n retVal.append(\", \");\n retVal.append(this.phrases.get(i));\n }\n retVal.append(\", and \");\n retVal.append(this.phrases.get(lastPhrase));\n }\n }\n retVal.append(this.suffix);\n return retVal.toString();\n }", "private String joinLines() {\n StringBuilder S = new StringBuilder();\n for (String L : testLines) {\n S.append(L);\n S.append(NL);\n }\n return S.toString();\n }", "public static String join(CharSequence delimiter, Object[] tokens) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tboolean firstTime = true;\r\n\t\tfor (Object token : tokens) {\r\n\t\t\tif (firstTime) {\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(delimiter);\r\n\t\t\t}\r\n\t\t\tsb.append(token);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public PropertyValue<String> getLineJoin() {\n return (PropertyValue<String>) new PropertyValue(nativeGetLineJoin());\n }", "public String generateString() {\n List<Trip<String, String, String>> sequence = super.generateSequence(startTrip, endTrip);\n sequence = sequence.subList(1, sequence.size()-1);\n String generated = \"\";\n for (int i = 0; i<sequence.size()-2; i++) generated += sequence.get(i).getThird() + \" \";\n return generated.substring(0, generated.length()-1);\n }", "public static String join(String delimiter, String... elements) {\n\t\tif (delimiter == null)\n\t\t\tthrow new NullPointerException(\"No delimiter given.\");\n\t\tif (elements == null)\n\t\t\tthrow new NullPointerException(\"No elements given.\");\n\n\t\tboolean first = true;\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tfor (String element : elements) {\n\t\t\tif (!first)\n\t\t\t\tbuilder.append(delimiter);\n\t\t\tbuilder.append(element);\n\t\t\tfirst = false;\n\t\t}\n\n\t\treturn builder.toString();\n\t}", "public static <T> String join(char delim, Iterable<T> parts, Function<T, String> stringConvert) {\n StringBuilder sb = new StringBuilder(256);\n for (Iterator<T> it = parts.iterator(); it.hasNext();) {\n String sv = stringConvert.apply(it.next());\n if (sv != null && !sv.isEmpty()) {\n if (sb.length() > 0) {\n sb.append(delim);\n }\n sb.append(sv);\n }\n }\n return sb.toString();\n }", "public static String join(List elements)\n {\n return InternalCommonsUtils.join(elements, \", \");\n }", "public static String join( Object[] col, String sep ) {\n StringBuffer sb = new StringBuffer();\n if ( col.length >= 1 ) {\n sb.append( getString_(col[0]) );\n }\n for ( int i = 1; i < col.length; i++ ) {\n sb.append( sep );\n sb.append( getString_(col[i]) );\n }\n return sb.toString();\n }", "public String toString() {\n\n\t\treturn Utilities.cutHeadAtLast(this.getClass().getName(), '.');\n\t}", "public static String myConcatenator(String str1, String str2)\r\n {\r\n str1 += str2;\r\n return str1;\r\n }", "public static String join(Iterable<String> strings) {\n StringBuilder builder = new StringBuilder();\n for (String s : strings) {\n builder.append(s).append(\", \");\n }\n String result = builder.toString();\n return result.substring(1, result.length() - 2);\n }", "public ILoString append(String that) {\n return new ConsLoString(this.first, this.rest.append(that)); \n }", "public String toString() {\r\n\t\t\r\n\t\tif(this.counter <= 20) {\r\n\t\t\tcounter++;\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tString fromLink = null, fromData = null;\r\n\t\t\r\n\t\tif (this.link != null) {\r\n\t\t\tfromLink = link.toString();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.data != null) {\r\n\t\t\tfromData = data.toString();\r\n\t\t}\r\n\t\t\r\n\t\tString concat = String.format(\"\\nData: %s\\n\" + \"Link: %s\", fromData, fromLink);\r\n\t\treturn concat;\r\n\t}", "public static String join(CharSequence delimiter, Iterable tokens) {\n StringBuilder sb = new StringBuilder();\n Iterator<?> it = tokens.iterator();\n if (it.hasNext()) {\n sb.append(it.next());\n while (it.hasNext()) {\n sb.append(delimiter);\n sb.append(it.next());\n }\n }\n return sb.toString();\n }", "public static String getFullString(String divider, String... strings) {\n String finalString = \"\";\n for (String str : strings) {\n if (!isNullOrEmpty(str)) {\n if (finalString.isEmpty()) {\n finalString += str;\n } else {\n finalString += divider + str;\n }\n }\n }\n\n return finalString;\n }", "public static String join(char delim, String... parts) {\n return join(delim, Arrays.asList(parts));\n }", "@Override\n public String str() {\n return \"append\";\n }", "public static String join(String[] array, String separator) {\n int len = array.length;\n if (len == 0) return \"\";\n\n StringBuilder out = new StringBuilder();\n out.append(array[0]);\n for (int i = 1; i < len; i++) {\n out.append(separator).append(array[i]);\n }\n return out.toString();\n }", "public String toString() {\n return String.join(\" \", words);\n }", "public String toString () {\n\t\tString resumen = \"\";\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tresumen = resumen + this.get(i).toString();\n\t\t}\n\t\treturn resumen;\n\t}", "public String concate(String x, String y)\n\t{\n\t\treturn x.concat(y);\n\t}", "public static String join(List<String> s, String delimiter) {\n if (s.isEmpty()) return \"\";\n Iterator<String> iter = s.iterator();\n StringBuffer buffer = new StringBuffer(iter.next());\n while (iter.hasNext())\n buffer.append(delimiter).append(iter.next());\n return buffer.toString();\n }", "Mono<String> join() {\n return null;\n }", "public static String join(String[] strings, String separator) {\n StringBuffer sb = new StringBuffer();\n int max = strings.length;\n for (int i = 0; i < max; i++) {\n if (i != 0)\n sb.append(separator);\n sb.append(strings[i]);\n }\n return sb.toString();\n }", "private String joinNameList(List<String> names) {\n String bldr;\n\n if ( names != null ) {\n bldr = uniquifyNames(names)\n .stream()\n .collect(Collectors.joining(\"','\"));\n }\n else {\n throw new IllegalArgumentException( \"Null name list not allowed.\" );\n }\n\n return bldr;\n }", "public static String joinList(List<String> list) {\r\n //could use String.join or Stream but I found this approach to consistantly be 150-500ns faster\r\n StringBuilder sb = new StringBuilder(list.size());\r\n for (int z = 0; z < list.size() - 1; z++) {\r\n sb.append(list.get(z));\r\n sb.append(',').append(' ');\r\n }\r\n sb.append(list.get(list.size() - 1));\r\n return sb.toString();\r\n }", "public static String join(Collection<?> col, CharSequence delim) {\n return UtilValidate.isEmpty(col)\n ? null\n : col.stream().map(Object::toString).collect(Collectors.joining(delim));\n }", "public String getPathAsString() {\n if (list.isEmpty()) {\n return \"\";\n }\n StringBuilder buf = new StringBuilder();\n\n for (String dir : list) {\n buf.append(dir);\n buf.append(pathSeparator());\n }\n return buf.substring(0, buf.length() - 1); // remove the trailing pathSeparator...\n }", "public static String join(Object[] list, String sep)\r\n {\r\n if (list == null)\r\n return null;\r\n \r\n if (sep == null)\r\n sep = \"\";\r\n \r\n StringBuffer buf = new StringBuffer();\r\n if (list.length > 0)\r\n buf.append(list[0]);\r\n \r\n for (int n = 1; n < list.length; n++)\r\n buf.append(sep).append(list[n]);\r\n \r\n return buf.toString();\r\n }", "public static String buildString(List<String> strings, String splitChar, String finalSplitChar) {\n StringBuilder combined = new StringBuilder();\n //Length of the list of strings\n int nrOfStrings = strings.size();\n //Loop through strings\n for (int i = 0; i < nrOfStrings; i++) {\n if (i == (nrOfStrings - 1) && i != 0) { //Last one, add the finalSplitChar\n combined.append(finalSplitChar);\n } else if (i > 0) { //If not the first nor the last, add the splitChar\n combined.append(splitChar);\n }\n combined.append(strings.get(i)); //Add the String\n }\n return combined.toString();\n }", "@Override\n\tpublic String concatnames() {\n\t\tString name1=stu.stream().map(emp->emp.getStuName()).collect(Collectors.joining(\"\"));\n\t\treturn name1;\n\t}", "public String contactToString() {\r\n\t\tString toReturn = new String();\r\n\t\tif (contacts.size() > 0) {\r\n\t\t\tfor (int i = 0; i < contacts.size(); i++) {\r\n\t\t\t\ttoReturn += \",\" + contacts.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn toReturn;\r\n\t}", "public String join(String conjunction, Iterable<String> list) {\n\t\treturn join(conjunction, list.iterator());\n\t}", "ILoString append(String that);", "public String stringJoin(Collection<? extends CharSequence> strings, CharSequence delimiter) {\n return EasonString.join(strings, delimiter);\n }", "private static String getUniqueString() {\n char[] buf = new char[NUM_CHARS];\n\n carry(lastString, buf.length - 1);\n for (int i = 0; i < buf.length; i++) {\n buf[i] = CHARS.charAt(lastString[i]);\n }\n return new String(buf);\n }", "public String devolver_campos_concatenados(){\n String dato_concatenado=\"\";\n campos_concaenados=\" \";\n for (int j=0;j<numero_campos;j++){\n if(j==numero_campos-1){\n dato_concatenado=campos[j];\n }else{\n dato_concatenado=campos[j]+\", \";\n }\n campos_concaenados=campos_concaenados+dato_concatenado;\n }\n \n return campos_concaenados;\n }", "public static String buildString(Collection<String> strings, String splitChar) {\n StringBuilder combined = new StringBuilder();\n for (String s : strings) {\n if (combined.length() > 0) {\n combined.append(splitChar);\n }\n combined.append(s);\n }\n return combined.toString();\n }", "public String toString(){\n String r = \"\";\n for(String cs : words){\n r += cs + \" \"; \n }\n r = r.substring(0, r.length()-1);\n return r;\n }", "public String toString() {\n\n format();\n \n if (string == null) {\n switch (statementList.size()) {\n case 0:\n string = \"\";\n break;\n case 1:\n string = statementList.get(0);\n break;\n default:\n int len = statementList.size() * 2;\n for (int i = 0; i < statementList.size(); i++) {\n len += statementList.get(i).length();\n }\n StringBuilder sb = new StringBuilder(len);\n sb.append(statementList.get(0));\n for (int i = 1; i < statementList.size(); i++) {\n sb.append(\"; \");\n sb.append(statementList.get(i));\n }\n string = sb.toString();\n }\n }\n \n return string;\n }", "public String toString() {\n StringBuilder string = new StringBuilder();\n Iterator<E> i = iterator();\n if (!this.isEmpty()) {\n while (i.hasNext()) {\n string.append(i.next());\n if (i.hasNext()) {\n string.append(\", \");\n }\n }\n }\n return string.toString();\n }", "public static String implode(Collection<? extends Object> parts, String separator) {\r\n\t\t\tStringBuilder builder = new StringBuilder();\r\n\t\t\tfor (Object part : parts) {\r\n\t\t\t\tbuilder.append(separator + part);\r\n\t\t\t}\r\n\r\n\t\t\tif (builder.length() > separator.length()) {\r\n\t\t\t\treturn builder.substring(separator.length());\r\n\t\t\t}\r\n\r\n\t\t\treturn builder.toString();\r\n\t\t}", "public static String join(String[] array, String sep) {\n if (array == null || array.length == 0) {\n return \"\";\n }\n int len = array.length;\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < (len - 1); i++) {\n sb.append(array[i]).append(sep);\n }\n sb.append(array[len - 1]);\n return sb.toString();\n }", "public static String join(String pattern, String... string) {\n\t\tcheckNullArg(pattern, string);\n\t\treturn String.join(pattern, string);// a:b:c\n\t}", "public String toAnticipatedString() {\n\t\treturn this.toMatchedString() + this.anticipatedSuffix;\n\t}", "private String constructAuthorsString (List<Author> authors) {\n \tif (authors == null || authors.isEmpty()) {\n \t\treturn \"\";\n \t}\n \t\n \tStringBuilder builder = new StringBuilder();\n \tif (authors.size() > 1) {\n \t\tfor (int i = 0; i < authors.size() - 1; i++) {\n \t\tbuilder.append(authors.get(i).getName());\n \t\tbuilder.append(STRING_SEPARATOR);\n \t}\n \t}\n\t\tbuilder.append(authors.get(authors.size() - 1).getName());\n \treturn builder.toString();\n }", "public String toString()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\t\tString finalName = \"\";\t//The result of the data that isnt null.\n\n\t\t/*******************************************************************************/\n\n\t\t//If the prefix isnt null.\n\t\tif(prefix != null)\n\t\t{\n\t\t\tfinalName += prefix+\" \";\n\t\t}\n\n\t\t//If the firstName isnt null.\n\t\tif(firstName != null)\n\t\t{\n\t\t\tfinalName += firstName+\" \";\n\t\t}\n\n\t\t//If the middleName isnt null.\n\t\tif(middleName!= null)\n\t\t{\n\t\t\tfinalName += middleName+\" \";\n\t\t}\n\n\t\t//If the lastName isnt null.\n\t\tif(lastName != null)\n\t\t{\n\t\t\tfinalName += lastName;\n\t\t}\n\n\t\t//Return the finalName String.\n\t\treturn finalName;\n\n\t}", "public static <T> String joinArrayItems(T[] array, String delimiter)\n\t{\n\t\tif (array.length == 0)\n\t\t\treturn \"\";\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tfor (T item : array)\n\t\t{\n\t\t\tbuilder.append(item);\n\t\t\tbuilder.append(delimiter);\n\t\t}\n\t\t\n\t\tString result = builder.toString();\n\t\t\n\t\treturn \n\t\t\tresult.substring(0, result.length() - delimiter.length());\t\n\t}", "public String getFullName() {\n this.fullName = firstName + \" \" + secondName + \" \" + middleName + \" \" + lastName;\n return fullName;\n }", "public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "public static String join(List<String> strings) {\n\t\tString result = \"\";\n\n\t\tboolean first = true;\n\t\tfor (String s : strings) {\n\t\t\tif (!first)\n\t\t\t\tresult += \", \";\n\n\t\t\tresult += s;\n\t\t\tfirst = false;\n\t\t}\n\n\t\treturn result;\n\t}", "public static <E> String concatElementsSkipNulls(Collection<E> collection, String joinText) {\n return concatElementsSkipNulls(collection, Object::toString, joinText);\n }", "public String toString()\r\n\t\t{\n\t\t\treturn MessageFormat.format(\"<{1}{0}>\", tagName, isEnding? \"/\" : \"\" );\r\n\t\t}", "public String toString()\n {\n // create a counter called count\n int count = 0;\n // create empty string for concatenation purposes\n String retString = \"\";\n while(count < size)\n {\n // appending to retString\n retString += arr[count] + \" \";\n // increment count\n count++;\n }\n return retString;\n }", "public static String join(String[] tokens, String delimiter) {\n\t\treturn join(tokens, delimiter, (tokens == null ? 0 : tokens.length));\n\t}", "public String toString() { return new String(b,0,i_end); }", "public String toDetailedString() {\n \t\tStringJoiner joiner = new StringJoiner(\"\\r\\n\");\n \t\tfor (MethodInfo method : methods) {\n \t\t\tjoiner.add(method.toString());\n \t\t}\n \t\treturn joiner.toString();\n \t}", "public static final String join(final String delimiter, final List<?> value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tIterator<?> it = value.iterator();\n\t\tif (!it.hasNext()) {\n\t\t\treturn EMPTY_STRING;\n\t\t}\n\n\t\tfinal String del = (delimiter == null) ? EMPTY_STRING : delimiter;\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (;;) {\n\t\t\tObject val = it.next();\n\t\t\tbuilder.append(val == null ? EMPTY_STRING : val.toString());\n\t\t\tif (!it.hasNext())\n\t\t\t\treturn builder.toString();\n\t\t\tbuilder.append(del);\n\t\t}\n\t}", "public String getFullName() {\n if (!Strings.isNullOrEmpty(givenName)) {\n if (!Strings.isNullOrEmpty(surname)) {\n return givenName + \" \" + surname;\n } else {\n return givenName;\n }\n }\n\n return Strings.nullToEmpty(surname);\n }", "public static String build_GOT_Email (String first, String last){\n // String email = first.charAt(0) + last + \"@NightWatch.com\";\n // return email ;\n // another way to print i can say this is the simplest way\n return first.charAt(0) + last + \"@NightWatch.com\";\n\n }", "public static <E> String concatElements(Elements<E> elements, String joinText) {\n return concatElements(elements.asList(), Object::toString, joinText);\n }" ]
[ "0.6975277", "0.6846796", "0.6440159", "0.63072824", "0.6242049", "0.61099505", "0.60707974", "0.60654557", "0.60541", "0.60329366", "0.5993613", "0.5928717", "0.58992916", "0.5871011", "0.5811683", "0.57863253", "0.5770443", "0.5760734", "0.57541203", "0.5739219", "0.5732675", "0.5710183", "0.5658044", "0.5652352", "0.56504744", "0.5649216", "0.56341416", "0.5622652", "0.5616593", "0.5597141", "0.5576965", "0.5575833", "0.5559512", "0.5555202", "0.55531085", "0.55513406", "0.55437416", "0.55437016", "0.5536194", "0.55322975", "0.5524926", "0.55084807", "0.54926056", "0.54903287", "0.5485257", "0.5474224", "0.5473431", "0.5473067", "0.5456194", "0.54535156", "0.54444385", "0.5442931", "0.54354644", "0.5430422", "0.5428575", "0.5417442", "0.54115826", "0.5401492", "0.5396551", "0.5396392", "0.53930396", "0.53928846", "0.5363862", "0.5355273", "0.53515303", "0.533665", "0.5320466", "0.53182685", "0.53068256", "0.5306096", "0.53052497", "0.529055", "0.52886254", "0.5286774", "0.528635", "0.5283292", "0.5274204", "0.5274116", "0.52707535", "0.5270089", "0.5267125", "0.52643895", "0.5261375", "0.5259981", "0.52570474", "0.5253453", "0.52368575", "0.52321965", "0.5232119", "0.5230173", "0.5217677", "0.5203948", "0.5200526", "0.51991683", "0.51940405", "0.51905715", "0.5189406", "0.51869977", "0.5176095", "0.51718444", "0.51664877" ]
0.0
-1
/ Normalize the array to exactly one element (even if it's completely empty), so we can unconditionally grab the first element.
@Override public String toString() { if (arrayLen != 1) { setLength(stringArray, arrayLen); String s = join(stringArray); // Create a new array to allow everything to get GC'd. stringArray = new String[] {s}; arrayLen = 1; } return stringArray[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "@Nullable\n public T firstOrNull() {\n return Query.firstOrNull(iterable);\n }", "@Override\n public Persona First() {\n return array.get(0);\n }", "public U removeFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on first\r\n\t \treturn remove(0);\r\n\t }", "public Object firstElement();", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static int findSingle(int[] array) {\n Set<Integer> set = new HashSet<>();\n for (int item : array) {\n if (!set.remove(item)) {\n set.add(item);\n }\n }\n assert set.size() == 1;\n System.out.println(set.iterator().next());\n return set.iterator().next();\n }", "public double findFirstNumber(double[] arr) {\n return 0;\n }", "public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }", "public T getMin()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn array[0];\n\t}", "@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public static <T> T getFirstElement(final Iterable<T> elements) {\n\t\treturn elements.iterator().next();\n\t}", "public static void main(String[] args){\n\n LearnArray objarray=new LearnArray();\n\n int[]d={1,2,3};\n int[]e={7,8,9};\n int []c=objarray.arrayFirstElement(d,e);\n System.out.print(Arrays.toString(c));\n\n\n\n\n\n\n\n }", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "@SafeVarargs // can only be applied to final methods\n public final <T> T[] replaceFirstValueInArray(T value, T... array) {\n array[0] = value; // promise not to mess it up; but messing it up anyway\n return array;\n }", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "public Double peek() {\n\t\tif (arr.length > 0) {\n\t\t\treturn arr[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public static <T> T getFirstOrNull(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return null;\n }\n if (collection instanceof List) {\n return ((List<T>) collection).get(0);\n } else {\n return collection.iterator().next();\n }\n }", "String first(String collection);", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public static <T> T getFirstNotNullValue(final Collection<T> collection) {\n\n if (isNotEmpty(collection)) {\n for (T element : collection) {\n if (element != null) {\n return element;\n }\n }\n }\n return null;\n }", "private String[] trimFirstArg(String[] args) {\n return Arrays.copyOfRange(args, 1, args.length);\n }", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "@Override\n\tpublic T findMin(T[] ob) {\n\t\treturn null;\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public T removeFirst() throws EmptyCollectionException;", "protected T getFirstValue(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public static int[] removeFirstElement(int[] myArray) {\n\t\tint[] rst = new int[myArray.length - 1];\n\n\t\tfor (int i = 1; i < myArray.length; i++) {\n\t\t\trst[i - 1] = myArray[i];\n\t\t}\n\n\t\treturn rst;\n\t}", "public static <T> T getSingleElement(Collection<T> collection) {\n\t\tif (collection.size() != 1)\n\t\t\tthrow new IndexOutOfBoundsException(String.format(\n\t\t\t\t\t\"Expected collection to contain a single element, but observed %d elements: %s\", collection.size(),\n\t\t\t\t\tcollection.toString()));\n\t\treturn collection.iterator().next();\n\t}", "public char FirstAppearingOnce()\n {\n for(int i = 0;i < arr.length;i++) {\n if(arr[i] == 1) {\n return (char)i;\n }\n }\n return '#';\n }", "@Test\n public void testSingleNestArray()\n {\n Object[] array = new Object[]{1, 2, new Object[]{3}, 4};\n testList = ArrayFlattener.flattenArray(array);\n assertArrayEquals(testList.toArray(new Integer[testList.size()]), flat);\n }", "public Object getFirst(){\n return pattern[0];\n }", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public static double min(double[] array) {\n\t\tif (array.length==0) return Double.POSITIVE_INFINITY;\n\t\tdouble re = array[0];\n\t\tfor (int i=1; i<array.length; i++)\n\t\t\tre = Math.min(re, array[i]);\n\t\treturn re;\n\t}", "public E getFirst();", "@SafeVarargs\n private static <T> T getFirstObject(final T... objects) {\n T result = null;\n\n if ((objects != null) && (objects.length == 1)) {\n result = objects[0];\n }\n\n return result;\n }", "public Double element() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\treturn arr[0];\n\t\t} else {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t}", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public Set<String>[] getFirst();", "public T getFirst();", "public T getFirst();", "public boolean isArrOne() {\n\t\treturn isArrOne;\n\t}", "public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}", "public int getFirst() {\n if (size > 0)\n return 0;\n else\n return NO_ELEMENT;\n }", "public static <T> T getSingleElement(Iterable<T> iterable) {\n\t\tList<T> list = createList(iterable.iterator());\n\t\treturn getSingleElement(list);\n\t}", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "public int firstMissing(int[] array) {\n if (array == null || array.length == 0) {\n return 1;\n }\n int sum = 0;\n for (int i : array) {\n if (sum < i - 1) {\n return i - 1;\n }\n sum += i;\n }\n return sum + 1;\n }", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "String getFirstElementOfArrayList( ArrayList arrayList ) {\n\n \tString firstElement = new String(\"\");\n \tfor ( Object e : arrayList ) {\n \t\tfirstElement = (String) e;\n \t\tbreak;\n \t}\n \treturn firstElement;\n }", "public AnyType findMin() {\n if (isEmpty())\n throw new UnderflowException();\n return root.element;\n }", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public boolean getKeepFirstElements()\n\t{\n\t\treturn this.keepFirstElements;\n\t}", "public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }", "public E getFirst() {\n return peek();\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public void lastToFirst(String[] array) {\n System.out.println(\"\" + Arrays.deepToString(array));\n String temp = array[array.length - 1];\n for (int i = array.length - 1; i > 0; i--) {\n array[i] = array[i - 1];\n }\n array[0] = temp;\n System.out.println(\"\" + Arrays.deepToString(array));\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public E getFirst()// you finish (part of HW#4)\n\t{\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasLeftChild())\n\t\t\titeratorNode = iteratorNode.getLeftChild();\n\t\treturn iteratorNode.getData();\n\t}", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public Object firstElement() {\n return _queue.firstElement();\n }", "public static double getMin(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i])\r\n\t\t\t\tmin = array[i];\r\n\t\treturn min;\r\n\t}", "private byte[] normalize(byte [] bytes)\n {\n if (bytes == null)\n return new byte[0];\n else\n return bytes;\n }", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}", "public T deleteFirst() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[0]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[0]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1\n newElements[i] = elements[i + 1]; // copy elements in temporary array\n }\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return value of element that will be deleted\n }", "public Position getFirst() {\n return positions[0];\n }", "public static void findSingleElement(int[] arr) {\n int distinct = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = 0; j < arr.length; j++) {\n if (arr[i] == arr[j] )\n distinct++;\n }\n if(distinct==1)\n System.out.println(\"Element which appears only once in array is : \"+arr[i]);\n distinct = 0;\n }\n }", "public Item getFirst();", "private static int getFirst( final Comparable[] c ) {\n\t\tfor ( int i = c.length - 2; i >= 0; --i )\n\t\t\tif ( c[ i ].compareTo( c[ i + 1 ] ) < 0 )\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}", "private boolean checkEmpty() {\n\t\treturn this.array[0] == null;\n\t}", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "@Test\n public void testNullArray()\n {\n assertNull(ArrayFlattener.flattenArray(null));\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public AnyType findMin() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMin(root).element;\r\n\t}", "public Double remove() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\tDouble temp = arr[0];\n\t\t\tarr = Arrays.copyOfRange(arr, 1, arr.length);\n\t\t\treturn temp;\n\t\t}\n\t\tthrow new NoSuchElementException();\n\t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\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 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 static double min(double[]array){\n \n if(array == null){\n \n throw new IllegalArgumentException(\"Array cannot be null\");\n }\n else if(array.length==0){\n throw new IllegalArgumentException(\"Array cannot be empty\");\n }\n \n double min = array[0];\n \n for(int i = 1; i < array.length; i++){\n \n if(Double.isNaN(array[i])){\n return Double.NaN;\n }\n if(array[i] < min){\n min = array[i];\n }\n }\n return min;\n }", "public String getFirst () {\n lengthMutex.lock ();\n try\n {\n while (length == 0)\n empty.await ();\n }\n catch (Exception e)\n {}\n finally\n {\n lengthMutex.unlock ();\n }\n\n String result = null;\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].pollFirst ();\n qLock[i].unlock ();\n if (result != null)\n {\n length--;\n break;\n }\n }\n if (result == null)\n {\n // System.out.println (\"pooop\");\n System.exit (1);\n }\n\n lengthMutex.lock ();\n full.signal ();\n lengthMutex.unlock ();\n\n return result;\n }", "public static Object naturalCast(Object[] array) {\r\n Class clazz = array[0].getClass();\r\n Object[] newArray = (Object[]) Array.newInstance(clazz, array.length);\r\n for (int i = 0; i < newArray.length; i++) {\r\n newArray[i] = array[i];\r\n }\r\n return newArray;\r\n }" ]
[ "0.6791994", "0.6496228", "0.63032794", "0.626048", "0.6188306", "0.61882573", "0.61707264", "0.61707264", "0.60777", "0.6049677", "0.5952235", "0.59459645", "0.59239584", "0.5851419", "0.5805691", "0.5794287", "0.5776634", "0.576834", "0.5759543", "0.5706683", "0.56825477", "0.5676485", "0.5649772", "0.56456894", "0.56403697", "0.5629109", "0.5627817", "0.56049484", "0.55899185", "0.55798006", "0.5576302", "0.5559047", "0.55390644", "0.5503197", "0.5491575", "0.5491575", "0.5489502", "0.5488166", "0.5487255", "0.5465228", "0.5459881", "0.5458814", "0.54525435", "0.54500276", "0.5449027", "0.5445074", "0.54397917", "0.54369813", "0.5436078", "0.5421958", "0.54205996", "0.5407505", "0.5407505", "0.5403381", "0.5390577", "0.5384718", "0.53789586", "0.5368277", "0.5365368", "0.53647506", "0.53610593", "0.5353148", "0.534751", "0.5332608", "0.53253514", "0.5322333", "0.53210855", "0.53151006", "0.5311048", "0.5309105", "0.5305241", "0.5296785", "0.5296744", "0.5294983", "0.52893096", "0.5287918", "0.5287495", "0.5282589", "0.5280801", "0.5276428", "0.52736557", "0.52724415", "0.52663946", "0.5252211", "0.5251168", "0.52449435", "0.5243604", "0.52401394", "0.5234205", "0.52226996", "0.5214772", "0.52068204", "0.5201066", "0.5187504", "0.51845115", "0.51666474", "0.51637083", "0.51617074", "0.5154964", "0.5149802", "0.51495117" ]
0.0
-1
Assemble from command line
public static void main(String argv[]) throws UnsupportedEncodingException, ExecutionException, FileNotFoundException { // Check arguments if(argv.length <= 0) { System.err.println("Usage: <filename>"); return; } // Start the machine Main.traceStream = System.out; Machine.powerOn(); // Assemble the file Assembler assembler = new Assembler(); InputStream stream = new FileInputStream(argv[0]); try { assembler.Assemble(stream); } catch(InvalidInstructionException e) { System.err.println(e.getMessage()); return; } catch(LabelNotResolvedException e) { System.err.println(e.getMessage()); return; } catch(ProgramSizeException e) { System.err.println(e.getMessage()); return; } // Run the code Machine.setPC((short) 0); Machine.setMSP((short) assembler.getSize()); Machine.setMLP((short) (Machine.memorySize - 1)); Machine.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setup(CommandLine cmd);", "void main(CommandLine cmd);", "public static void main(String[] args) {\n\t\t\n\t\tnew MyAssembler();\n\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tif (args.length == 0) {\r\n\t\t\tlog.error(\"Specification and assembly filenames not given.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length == 1) {\r\n\t\t\tlog.error(\"Assembly file not given.\");\r\n\t\t\tlog.error(\"Specification file: \" + args[0]);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length > 2) {\r\n\t\t\tlog.error(\"Too many arguments provided.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tif (!args[0].endsWith(\".yaml\") || !args[1].endsWith(\".asm\")) {\r\n\t\t\tlog.error(\"Input is limited to two files.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tvar file = new FileParser(args[0], args[1]);\r\n\t\t\tvar data = file.getData();\r\n\t\t\tvar asm = new Assembler(data);\r\n\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", asm.getObjectCode());\r\n\t\t} catch (FileParserException e) {\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", Lists.newArrayList(e.getMessage()));\r\n\t\t\tAssembler.writeLinesToFile(\"spec_error_report.txt\", e.getErrorReport());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (AssemblerException | IOException e) {\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\r\n// new ZuluCLI().LoadCLIargs4j(args);\r\n System.out.println(\"-g AAA -l 32 -d commit --author=PIPKA --amend a.java b.java b.java\");\r\n new ZuluCLI().LoadFishjcommander(args);\r\n }", "static public void main(String argv[]) {\n for (String s : argv) {\n if (s.equals(\"-a\")) {\n SHOW_TREE = true;\n }\n else if (s.equals(\"-s\")) {\n SHOW_SYM_TABLES = true;\n }\n else if (s.equals(\"-c\")) {\n GENERATE_CODE = true;\n }\n //Check if the string ends with '.cm'\n else if (s.length() > 3 && s.substring(s.length()-3).equals(\".cm\")) { \n // If it does, make that the input file\n INPUT_FILE = s;\n }\n }\n\n if (INPUT_FILE == null) {\n System.out.println(\"No input file provided or incorrect file extension (must be .cm). Exiting...\");\n System.exit(-1);\n }\n\n // Retrieve the actual file name from between the path and the extension\n // E.g. tests/sort.cm gives a result of 'sort'\n int nameStartIndex = INPUT_FILE.lastIndexOf('/');\n int nameEndIndex = INPUT_FILE.lastIndexOf('.');\n FILE_NAME = INPUT_FILE.substring(nameStartIndex + 1, nameEndIndex);\n \n /* Start the parser */\n try {\n // Save original stdout to switch back to it as needed\n PrintStream console = System.out;\n\n if (!SHOW_SYM_TABLES && !SHOW_TREE && !GENERATE_CODE) {\n System.out.println(\"Showing errors only.\");\n System.out.println(\"Use [-a] flag to print the abstract syntax tree\" + \"\\n\" \n + \"Use [-s] flag to print the symbol table\" + \"\\n\"\n + \"Use [-c] to generate assembly code (.tm)\"); \n } \n\n parser p = new parser(new Lexer(new FileReader(INPUT_FILE)));\n // implement \"-a\", \"-s\", \"-c\" options\n Absyn result = (Absyn)(p.parse().value); \n \n if (result != null) {\n \n // If the '-a' flag is set, print the abstract syntax tree to a .abs file\n if (SHOW_TREE) {\n System.out.println(\"Abstract syntax tree written to '\" + FILE_NAME + \".abs'\");\n\n //Redirect stdout\n File absFile = new File(FILE_NAME + \".abs\");\n FileOutputStream absFos = new FileOutputStream(absFile);\n PrintStream absPS = new PrintStream(absFos);\n System.setOut(absPS);\n\n // Print abstract syntax tree to FILE_NAME.abs in current directory\n ShowTreeVisitor visitor = new ShowTreeVisitor();\n result.accept(visitor, 0, false); \n\n //Reset stdout\n System.setOut(console);\n }\n if (SHOW_SYM_TABLES) {\n //Redirect stdout to a .sym file \n File symFile = new File(FILE_NAME + \".sym\");\n FileOutputStream symFos = new FileOutputStream(symFile);\n PrintStream symPS = new PrintStream(symFos);\n System.setOut(symPS);\n } \n else {\n //Toss stdout output into the void while doing semantic analysis\n System.setOut(new PrintStream(OutputStream.nullOutputStream()));\n } \n\n // Perform semantic analysis\n SemanticAnalyzer analyzerVisitor = new SemanticAnalyzer();\n result.accept(analyzerVisitor, 0, false);\n\n //Restore stdout\n System.setOut(console);\n\n if (SHOW_SYM_TABLES) {\n //Print after having reported any errors\n System.out.println(\"Symbol table written to '\" + FILE_NAME + \".sym'\");\n }\n\n //Only generate code if the flag is set\n if (GENERATE_CODE) {\n\n //First, confirm that there are no syntax or semantic errors\n //HAS_ERRORS is true if there are any syntax errors or semantic errors, and false if both are error free\n HAS_ERRORS = (p.errorFound || analyzerVisitor.errorFound);\n\n if (HAS_ERRORS) {\n System.out.println(\"Cannot generate code while there are errors. Exiting...\");\n }\n else {\n //No syntax or semantic errors, proceed with code generation\n System.out.println(\"Assembly code written to '\" + FILE_NAME + \".tm'\");\n\n //Redirect stdout to .tm file\n File tmFile = new File(FILE_NAME + \".tm\");\n FileOutputStream tmFos = new FileOutputStream(tmFile);\n PrintStream tmPS = new PrintStream(tmFos);\n System.setOut(tmPS);\n\n //Perform code generation\n CodeGenerator generatorVisitor = new CodeGenerator();\n //result.accept(generatorVisitor, 0, false);\n generatorVisitor.visit(result, FILE_NAME + \".tm\");\n \n } \n }\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not find file '\" + INPUT_FILE + \"'. Check your spelling, and ensure it exists. Exiting...\");\n System.exit(-1); \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tBuilderHelp builders = new BuilderHelp();\n\t\tbuilders.getBaoMaModel().run();\n\t\tbuilders.getBenciModel().run();\n\t}", "public static void main(String[] args){\n cmd = args;\r\n init(cmd);\r\n }", "public static void main(String[] astrCommandLine) {\n\t\tStep1ConstructorsAndOverloading();\n\t\tStep2InheritanceAndSuper();\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBeanBuilder.Building();\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}", "public static void main(String[] args) {\n String names[] = { \"orange\", \"banana\", \"kiwi\" };\n NameRepository fruits = new NameRepository.Builder().names(names).build();\n Juice triple = new Juice.Builder().fruit(fruits).sugar(40).water(100).build();\n // Juice is ready to drink :)\n System.out.println(triple);\n }", "public static void main(String[] args)throws Exception {\n\t\tnew recipes().run();\r\n\t}", "public static void main(String args[]) {\n if (args.length < 1) {\n System.out.println(\"usage: pgen <project name> <args>\");\n } else {\n Arguments arguments = parseArgs(args);\n File projectDir = new File(System.getProperty(\"user.dir\"), arguments.getFileName());\n GenRun run = null;\n switch (arguments.getMode()) {\n case KATTIS:\n run = new KattisRun(arguments.getFileTemplate(), projectDir, arguments.getFileName());\n break;\n default:\n run = new LocalRun(arguments.getFileTemplate(), projectDir, arguments.getFileName(), arguments.getExampleSize());\n }\n run.run();\n }\n }", "public static void main(String[] args) {\n\n\t\t\n\t}", "public static void main(String... args) throws IOException {\n if (args[0].equals(\"init\")) {\n Init initialize = new Init();\n initialize.init();\n } else if (args[0].equals(\"commit\")) {\n Commit c = new Commit(args[1], false);\n c.commit(false);\n } else if (args[0].equals(\"add\")) {\n (new Stage()).add(new File(args[1]));\n } else if (args[0].equals(\"rm\")) {\n (new Stage()).rm(new File(args[1]));\n } else if (args[0].equals(\"branch\")) {\n Branch.branch(args[1]);\n } else if (args[0].equals(\"rm-branch\")) {\n Branch.rmBranch(args[1]);\n } else if (args[0].equals(\"status\")) {\n (new Stage()).status();\n } else if (args[0].equals(\"log\")) {\n (new Logging()).log();\n } else if (args[0].equals(\"global-log\")) {\n (new Logging()).globalLog();\n } else if (args[0].equals(\"find\")) {\n (new Find()).find(args[1]);\n } else if (args[0].equals(\"checkout\")) {\n if (args[1].equals(\"--\")) {\n (new Checkout()).checkout(args[2]);\n } else if (args.length > 2) {\n if (args[2].equals(\"--\")) {\n (new Checkout()).checkout(args[1], args[3]);\n } else {\n System.out.println(\"Incorrect operands.\");\n }\n } else {\n (new Checkout()).checkoutBranch(args[1]);\n }\n } else if (args[0].equals(\"reset\")) {\n (new Reset()).reset(args[1]);\n } else if (args[0].equals(\"merge\")) {\n (new Merge()).merge(args[1]);\n }\n\n }", "public static void main(String[] args) {\n\t\tBaker baker = new Baker();\n\t\tBread bread = baker.bake();\n\n\t}", "public static void main(String[] args) {\n switch (args[0]) {\r\n case \"-createUser\" -> createUser(args);\r\n case \"-showAllUsers\" -> showAllUsers();\r\n case \"-addTask\" -> addTask(args);\r\n case \"-showTasks\" -> showTasks();\r\n default -> {\r\n try {\r\n throw new IncorrectCommandFormatException();\r\n } catch (IncorrectCommandFormatException exception) {\r\n exception.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "public static void main(String[] args)\r\n {\r\n \tnew BioMorph();\r\n }", "private void cli (String[] args)\n {\n if (args.length != 2) {\n System.out.println(\"Usage: <analyzer> input-file output-file\");\n return;\n }\n dataFilename = args[1];\n super.cli(args[0], this);\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n List<String> inputs = new InputsReader().read(scanner);\n\n List<Command> commands = new CommandsFactory().build(inputs);\n\n new CommandsProcessor().execute(commands);\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String... argv) throws IOException {\n String[] lines = new String[0];\n lines = Files.lines(Paths.get(argv[0])).collect(Collectors.toList()).toArray(lines);\n Main main = new Main(lines);\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\tSPECCompressCountingStarter sccs = new SPECCompressCountingStarter();\r\n\t\tsccs.runAll();\r\n\t}", "public static void main(String[] argv) {\r\n LOGGER.log(Level.INFO, \"OoxmlUtil usage:\\nSubmit pairs of space-delimited parameters, the ooxml file path followed by the number of chunks to produce.\\n\"\r\n + \"example: \\\"resources/test.pptx\\\" 4\");\r\n for (int a = 0; a < argv.length; a += 2) {\r\n try {\r\n String ooxmlFilePath = argv[a];\r\n int chunkCount = Integer.parseInt(argv[a + 1]);\r\n try {\r\n List<Path> chunkPaths = OoxmlChunkUtils.chunkImages(Paths.get(ooxmlFilePath), chunkCount);\r\n OoxmlChunkUtils.reassembleImages(chunkPaths.get(0), 1, chunkPaths.get(1), 2, 4, null);\r\n OoxmlChunkUtils.reassembleImages(chunkPaths.get(0), 1, chunkPaths.get(2), 3, 4, new int[]{1, 2});\r\n OoxmlChunkUtils.reassembleImages(chunkPaths.get(0), 1, chunkPaths.get(3), 4, 4, new int[]{1, 2, 3});\r\n } catch (IOException e) {\r\n LOGGER.log(Level.WARNING, \"error chunking image \" + ooxmlFilePath + \"x\" + chunkCount, e);\r\n }\r\n } catch (NumberFormatException e) {\r\n LOGGER.log(Level.WARNING, \"bad chunk count parameter: \" + argv[a + 1], e);\r\n }\r\n }\r\n }", "public static void main(String arg[]) {\n\t\ttry {\n\t\t\tArrayList<String> arglist = new ArrayList<String>();\n\t\t\tCompositeInstanceContext.Selector selector = new CompositeInstanceContext.Selector(arg,arglist);\n\t\t\tif (arg.length == arglist.size()) {\n\t\t\t\tselector.patient = true;\t// no selector arguments found\n\t\t\t}\n\t\t\t\n\t\t\tif (arglist.size() == 2) {\n\t\t\t\tMessageLogger logger = new PrintStreamMessageLogger(System.err);\n\t\t\t\tnew MergeCompositeContextForOneEntitySelectively(selector,arglist.get(0),arglist.get(1),logger);\n\t\t\t}\n\t\t\telse if (arglist.size() > 2) {\n\t\t\t\tMessageLogger logger = new PrintStreamMessageLogger(System.err);\n\t\t\t\tint nSrcs = arglist.size()-1;\n\t\t\t\tString dst = arglist.get(nSrcs);\n\t\t\t\targlist.remove(nSrcs);\n\t\t\t\tString[] srcs = new String[nSrcs];\n\t\t\t\tsrcs = arglist.toArray(srcs);\n\t\t\t\tnew MergeCompositeContextForOneEntitySelectively(selector,srcs,dst,logger);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.err.println(\"Usage: java -cp ./pixelmed.jar com.pixelmed.apps.MergeCompositeContextForOneEntitySelectively [-patient|-study|-equipment|-frameofreference|-series|-instance|srdocumentgeneral]* srcdir|DICOMDIR [srcdir|DICOMDIR]* dstdir\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tslf4jlogger.error(\"\",e);\t// use SLF4J since may be invoked from script\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String[] args) {\n int arg = 0;\n int seedNum = 100;\n int trainNum = 0;\n int testNum = 0;\n boolean treeFlag = false;\n boolean textFlag = false;\n //handle options\n while (args[arg].startsWith(\"-\")) {\n switch(args[arg]) {\n case (\"-tree\"):\n treeFlag = true;\n break;\n case (\"-text\"):\n textFlag = true;\n break;\n case (\"-seednum\"):\n arg++;\n seedNum = Integer.parseInt(args[arg]);\n break;\n case (\"-trainnum\"):\n arg++;\n trainNum = Integer.parseInt(args[arg]);\n break;\n case (\"-testnum\"):\n arg++;\n testNum = Integer.parseInt(args[arg]);\n break;\n case (\"-trainall\"):\n trainNum = Integer.MAX_VALUE;\n break;\n case (\"-testall\"):\n testNum = Integer.MAX_VALUE;\n break;\n default:\n throw new IllegalArgumentException(\"Unrecognized command: \" + args[arg]);\n }\n arg++;\n }\n File sourceDirectory = new File(args[arg]);\n arg++;\n File destinationDirectory = new File(args[arg]);\n\n if(treeFlag && textFlag) {\n System.err.println(\"Both text and tree flags detected, which one do you want?\");\n System.exit(2);\n }\n\n if (trainNum == Integer.MAX_VALUE && testNum == Integer.MAX_VALUE) {\n System.err.println(\"Can't max both train and test values!\");\n System.exit(3);\n }\n\n if (!sourceDirectory.isDirectory()) {\n System.err.println(\"ERROR: \" + sourceDirectory.getName() + \"is not a directory!\");\n System.exit(4);\n }\n if (!destinationDirectory.exists()) {\n destinationDirectory.mkdirs();\n } else if (!destinationDirectory.isDirectory()) {\n System.err.println(\"ERROR: \" + destinationDirectory.getName() + \"is not a directory!\");\n System.exit(5);\n }\n\n if (treeFlag) {\n createSeededFiles(\"tree\", seedNum, trainNum, testNum, sourceDirectory, destinationDirectory);\n } else if (textFlag) {\n createSeededFiles(\"text\", seedNum, trainNum, testNum, sourceDirectory, destinationDirectory);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public static void main(String[] args) {\n new Merge().readAndWrite();\n }", "public static void main(String[] args) {\r\n MemoryManager memory = new MemoryManager(Integer.parseInt(args[0]));\r\n HashTable hasher = new HashTable(Integer.parseInt(args[1]), memory);\r\n if (args[2] != null) {\r\n File commands = new File(args[2]);\r\n Processor processor = new Processor(commands, hasher);\r\n processor.process();\r\n }\r\n //System.exit(0);\r\n \r\n }", "public static void main(String[] args) {\n if (args.length != 2 && args.length != 3) {\n System.out.println(\"wrong args\");\n return;\n }\n try {\n String name, filename;\n if (args.length == 3) {\n if (!\"-jar\".equals(args[0])) {\n System.out.println(\"wrong flag\");\n return;\n }\n\n name = args[1];\n filename = args[2].substring(0, args[2].indexOf(\".jar\"));\n } else {\n name = args[0];\n filename = args[1];\n }\n File root = new File(filename);\n Class<?> token = Class.forName(name);\n Implementor implementor = new Implementor();\n if (args.length == 3) {\n implementor.implementJar(token, new File(args[2]));\n } else {\n implementor.implement(token, root);\n }\n } catch (ClassNotFoundException e) {\n System.out.println(\"Class not found:(\");\n } catch (ImplerException e) {\n System.out.println(\"An error occured\");\n } catch (Exception e) {\n System.out.println(\"Something wrong\");\n }\n }", "public static void main (String[]args) throws IOException {\n }", "public static void main(String[] args) {\r\n\t\tnew CreateDataModelForFile(PROJECT_NAME, RELATIVE_FILE_PATH).execute();\r\n\t}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public static void main(String arg[]) {\n\t\tRebuildDatabaseFromInstanceFiles ourselves = new RebuildDatabaseFromInstanceFiles();\n\t\tif (arg.length >= 3) {\n\t\t\tString databaseModelClassName = arg[0];\n\t\t\tString databaseFileName = arg[1];\n\t\t\n\t\t\tif (databaseModelClassName.indexOf('.') == -1) {\t\t\t\t\t// not already fully qualified\n\t\t\t\tdatabaseModelClassName=\"com.pixelmed.database.\"+databaseModelClassName;\n\t\t\t}\n//System.err.println(\"Class name = \"+databaseModelClassName);\t// no need to use SLF4J since command line utility/test\n\n\t\t\t//DatabaseInformationModel databaseInformationModel = new PatientStudySeriesConcatenationInstanceModel(makePathToFileInUsersHomeDirectory(dataBaseFileName));\n\t\t\tDatabaseInformationModel databaseInformationModel = null;\n\t\t\ttry {\n\t\t\t\tClass classToUse = Thread.currentThread().getContextClassLoader().loadClass(databaseModelClassName);\n\t\t\t\tClass[] parameterTypes = { databaseFileName.getClass() };\n\t\t\t\tConstructor constructorToUse = classToUse.getConstructor(parameterTypes);\n\t\t\t\tObject[] args = { databaseFileName };\n\t\t\t\tdatabaseInformationModel = (DatabaseInformationModel)(constructorToUse.newInstance(args));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tslf4jlogger.error(\"\",e);\t// use SLF4J since may be invoked from script\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\tlong startOfRebuild=System.currentTimeMillis();\n\t\t\tfilesProcessed=0;\n\t\t\tint i = 2;\t\t// start with 3rd argument\n\t\t\twhile (i<arg.length) {\n\t\t\t\tString name = arg[i++];\n\t\t\t\tFile file = new File(name);\n\t\t\t\tprocessFileOrDirectory(databaseInformationModel,file);\n\t\t\t}\n\t\t\tlong durationOfRebuild = System.currentTimeMillis() - startOfRebuild;\n\t\t\tdouble rate = ((double)filesProcessed)/(((double)durationOfRebuild)/1000);\n\t\t\tslf4jlogger.info(\"Processed {} files in {} ms, {} files/s\",filesProcessed,durationOfRebuild,rate);\t// use SLF4J since may be invoked from script\n\t\t\t\n\t\t\tdatabaseInformationModel.close();\t// this is really important ... will not persist everything unless we do this\n\t\t}\n\t\telse {\n\t\t\tSystem.err.println(\"Usage: java com.pixelmed.database.RebuildDatabaseFromInstanceFiles databaseModelClassName databaseFileName path(s)\");\n\t\t}\n\t}", "static public void main(String[] argv)\n {\n\tboolean bFirstAdded = false;\n\tHashtable master = new Hashtable();\n\tif (argv.length < 2)\n\t {\n\t System.out.println(\n \"Usage: DetailGenerator <xmlfilename> <langFileDirectory> [trace] [parseonly]\");\n\t System.exit(0);\n\t }\n\t\n\tI18NTextSource source = new I18NTextSource(\"en\",argv[1],\"%\");\n\ttry \n\t {\n\t DetailGenerator generator = new DetailGenerator(argv[0],null,\n\t\t\t\t\t\t source,\n\t\t\t\t\t\t null);\n\t if ((argv.length > 2) && (argv[2].compareTo(\"trace\") == 0))\n\t\tgenerator.setTracing(true);\n\n\t if ((argv.length > 3) && (argv[3].compareTo(\"parseonly\") == 0))\n\t\tgenerator.setParseOnly(true);\n\n\t generator.parse();\n\t if (generator.getPanelCount() > 0)\n\t generator.generateDetailHtml(null);\n\t }\n\tcatch (Exception e)\n\t {\n\t e.printStackTrace();\n\t }\n\t}", "public static void main(String[] args) throws IOException {\n GenerateSoyUtilsEscapingDirectiveCode generator = new GenerateSoyUtilsEscapingDirectiveCode();\n generator.configure(args);\n generator.execute();\n }", "public static void main(String[] args) throws IOException {\n VerbSCModifier vscm = new VerbSCModifier();\n GeneratorMethod(false, false, false, false, false, true);\n }", "public static void main(String[] args) {\n SpecifyHouseBuilder specifyHouseBuilder = new SpecifyHouseBuilder();\n\n //Directer\n BuildDirectory buildDirectory = new BuildDirectory(specifyHouseBuilder);\n BuildDirectorMachel buildDirectorMachel = new BuildDirectorMachel(specifyHouseBuilder);\n\n\n House house = buildDirectory.constructHouse();\n House house1 = buildDirectorMachel.constructHouse();\n }", "public static void main(String[] args) {\n\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\r\n\t\tSnippet snippet = new Snippet();\r\n\t\tsnippet.load();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\tgenera();\r\n\r\n\t}", "public void main(String[] args) {\n\t}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n new MakingCandies().makeCandies(scan);\n }", "public static void main(String[] args) throws Exception{\n\t\tParseTree tree = new ParseTree(new Information(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\", \"Commands\"));\n\t\tFile f = new File(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\");\n\t\tClass[] parameterTypes = new Class[]{URL.class};\n\t\tURL url = (f.toURI()).toURL();\n\t\tURLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n\t\tClass<?> sysclass = URLClassLoader.class;\n\t\tMethod method = sysclass.getDeclaredMethod(\"addURL\", parameterTypes);\n\t\tmethod.setAccessible(true);\n\t\tmethod.invoke(sysloader, new Object[]{ url });\n\t\t\n\t\tClass<?> c = Class.forName(\"Commands\");\n\t\tMethod[] methods = c.getDeclaredMethods();\n\t\t\n\t\tInformation test = new Information(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\", \"Commands\");\n\t\tList<Integer[]> testList = test.properArguments(\"add\");\n\t\t\n\t\tSystem.out.println(testList);\n\t\t\n\t\t\n\t\tTreeEvaluator e = new TreeEvaluator(test);\n\t\t\n\t\ttree.grow(\"add\",1);\n\t\ttree.grow(\"5\",0);\n\t\ttree.grow(\"5\",0);\n\t\ttree.addReturnTypes();\n\t\tSystem.out.println(tree.isComplete());\n\t\tSystem.out.print(e.evaluate(tree.getRoot()));\n\t}", "public static void main(String[] args)\n throws CmdLineExceptions, FileNotFoundException {\n CommandLineProcessor clp = new CommandLineProcessor(args);\n HashMap<String, ArrayList<String>> allTasks = clp.argumentSeparator(); // package neatly all flags and args into a list of HashMap\n\n Model digitalEntryDatabase = new Model(allTasks.get(CSV_ARG).get(INPUT_FILE_INDEX)); // create data model\n Controller program = new Controller(digitalEntryDatabase, allTasks); // ingest package\n\n program.executeTask(); // execute all tasks, modify data model, write to backup CSV\n Map<Integer, DigitalEntry> toDisplay = program.display(); // output final TreeMap, primary key is ID\n\n View finalView = new View(toDisplay); // Front end focus, still render on errors\n finalView.printAllEntries();\n }", "public static void main(String[] args) throws Exception {\r\n\t\tint res = ToolRunner.run(new Configuration(), new AnnotateClueRunWithURLs(), args);\r\n\t\tSystem.exit(res);\r\n\t}", "public static void main(String[] args) {\n\t\textractedMain(JarFolders.SRC_FOLDER);\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) throws ParseException {\n // first load the configurations from command line and config files\n Config config = ResourceAllocator.loadConfig(new HashMap<>());\n\n Options options = new Options();\n options.addOption(Constants.ARGS_PARALLELISM, true, \"parallelism\");\n options.addOption(Constants.ARGS_SIZE, true, \"Size\");\n options.addOption(Constants.ARGS_ITR, true, \"Iteration\");\n options.addOption(Utils.createOption(Constants.ARGS_OPERATION, true, \"Operation\", true));\n options.addOption(Constants.ARGS_STREAM, false, \"Stream\");\n options.addOption(Utils.createOption(Constants.ARGS_TASK_STAGES, true, \"Throughput mode\", true));\n options.addOption(Utils.createOption(Constants.ARGS_GAP, true, \"Gap\", false));\n options.addOption(Utils.createOption(Constants.ARGS_FNAME, true, \"File name\", false));\n options.addOption(Utils.createOption(Constants.ARGS_APP_NAME, true, \"App Name\", false));\n options.addOption(Utils.createOption(Constants.ARGS_OUTSTANDING, true, \"Throughput no of messages\", false));\n options.addOption(Utils.createOption(Constants.ARGS_THREADS, true, \"Threads\", false));\n options.addOption(Utils.createOption(Constants.ARGS_PRINT_INTERVAL, true, \"Threads\", false));\n options.addOption(Utils.createOption(Constants.ARGS_DATA_TYPE, true, \"Data\", false));\n options.addOption(Utils.createOption(Constants.ARGS_KEYED, true, \"Operation Type , ex : keyed\", false));\n options.addOption(Utils.createOption(Constants.ARGS_INIT_ITERATIONS, true, \"Data\", false));\n options.addOption(Constants.ARGS_VERIFY, false, \"verify\");\n options.addOption(Constants.ARGS_COMMS, false, \"comms\");\n options.addOption(Constants.ARGS_TASK_EXEC, false, \"taske\");\n options.addOption(Constants.ARGS_APP, false, \"app\");\n\n CommandLineParser commandLineParser = new DefaultParser();\n CommandLine cmd = commandLineParser.parse(options, args);\n int parallelism = Integer.parseInt(cmd.getOptionValue(Constants.ARGS_PARALLELISM));\n int size = Integer.parseInt(cmd.getOptionValue(Constants.ARGS_SIZE));\n int itr = Integer.parseInt(cmd.getOptionValue(Constants.ARGS_ITR));\n String operation = cmd.getOptionValue(Constants.ARGS_OPERATION);\n boolean stream = cmd.hasOption(Constants.ARGS_STREAM);\n boolean verify = cmd.hasOption(Constants.ARGS_VERIFY);\n boolean keyed = cmd.hasOption(Constants.ARGS_KEYED);\n boolean taskExec = cmd.hasOption(Constants.ARGS_TASK_EXEC);\n boolean app = cmd.hasOption(Constants.ARGS_APP);\n boolean comms = cmd.hasOption(Constants.ARGS_COMMS);\n\n String threads = \"true\";\n if (cmd.hasOption(Constants.ARGS_THREADS)) {\n threads = cmd.getOptionValue(Constants.ARGS_THREADS);\n }\n\n String taskStages = cmd.getOptionValue(Constants.ARGS_TASK_STAGES);\n String gap = \"0\";\n if (cmd.hasOption(Constants.ARGS_GAP)) {\n gap = cmd.getOptionValue(Constants.ARGS_GAP);\n }\n\n String fName = \"\";\n if (cmd.hasOption(Constants.ARGS_FNAME)) {\n fName = cmd.getOptionValue(Constants.ARGS_FNAME);\n }\n\n String outstanding = \"0\";\n if (cmd.hasOption(Constants.ARGS_OUTSTANDING)) {\n outstanding = cmd.getOptionValue(Constants.ARGS_OUTSTANDING);\n }\n\n String printInt = \"1\";\n if (cmd.hasOption(Constants.ARGS_PRINT_INTERVAL)) {\n printInt = cmd.getOptionValue(Constants.ARGS_PRINT_INTERVAL);\n }\n\n String dataType = \"default\";\n if (cmd.hasOption(Constants.ARGS_DATA_TYPE)) {\n dataType = cmd.getOptionValue(Constants.ARGS_DATA_TYPE);\n }\n String intItr = \"0\";\n if (cmd.hasOption(Constants.ARGS_INIT_ITERATIONS)) {\n intItr = cmd.getOptionValue(Constants.ARGS_INIT_ITERATIONS);\n }\n\n // build JobConfig\n JobConfig jobConfig = new JobConfig();\n jobConfig.put(Constants.ARGS_ITR, Integer.toString(itr));\n jobConfig.put(Constants.ARGS_OPERATION, operation);\n jobConfig.put(Constants.ARGS_SIZE, Integer.toString(size));\n jobConfig.put(Constants.ARGS_PARALLELISM, Integer.toString(parallelism));\n jobConfig.put(Constants.ARGS_TASK_STAGES, taskStages);\n jobConfig.put(Constants.ARGS_GAP, gap);\n jobConfig.put(Constants.ARGS_FNAME, fName);\n jobConfig.put(Constants.ARGS_OUTSTANDING, outstanding);\n jobConfig.put(Constants.ARGS_THREADS, threads);\n jobConfig.put(Constants.ARGS_PRINT_INTERVAL, printInt);\n jobConfig.put(Constants.ARGS_DATA_TYPE, dataType);\n jobConfig.put(Constants.ARGS_INIT_ITERATIONS, intItr);\n jobConfig.put(Constants.ARGS_VERIFY, verify);\n jobConfig.put(Constants.ARGS_STREAM, stream);\n jobConfig.put(Constants.ARGS_KEYED, keyed);\n jobConfig.put(Constants.ARGS_TASK_EXEC, taskExec);\n jobConfig.put(Constants.ARGS_STREAM, app);\n jobConfig.put(Constants.ARGS_COMMS, comms);\n\n // build the job\n if (!app) {\n switch (operation) {\n\n }\n\n } else {\n\n }\n\n\n if (comms) {\n System.out.println(\"==========Comms Example Running===========\");\n CommsRunner commsRunner = new CommsRunner(config, jobConfig, stream, operation, parallelism, keyed);\n commsRunner.run();\n }\n\n\n if (!keyed) {\n if (taskExec) {\n\n }\n }\n\n switch (operation) {\n case \"keyedreduce\":\n\n }\n\n\n }", "public static void main( String[] args )\n\t{\n\t\tResourceBundle rbm = ResourceBundle.getBundle( rbmFile );\n\t\tCommandLine userInput = prepCli( prepCliParser(), args, rbm );\n\t\tBerCli doesStuff = prepDoer( userInput );\n\t\tdoesStuff.setSessionConfig( prepConfig( userInput, rbm ) );\n\t\tdoesStuff.satisfySession();\n\t}", "public static void main(String argv[]) {\n\n\n\n\t}", "public static void main(String[] args) throws IOException{\n\t\tSystem.exit((new BitCompresser()).run(args));\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(final String[] args) {\n final Generator g = new Generator();\n // g.populateStudentAndFaculty();\n // g.populateShelf();\n // g.populateBooks();\n // g.populateCopies();\n // g.populateAuthors();\n // g.populateKeywords();\n g.populateIssuesAndEtc();\n // 8 are currently checked out\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args)\n {\n // form option String if there are arguments\n Option io = Option.GetOptonByArgs(args);\n // define the system option flag & argument\n norm normObj = new norm();\n Out out = new Out();\n // execute command according to option & argument\n if(SystemOption.CheckSyntax(io, normObj.GetOption(), false, true) == true)\n {\n // decode input option to form options\n normObj.ExecuteCommands(io, normObj.GetOption(), out);\n // get config file from environment variable\n normObj.GetConfig();\n // Init vars by config\n normObj.InitByConfig(normObj, out);\n }\n else\n {\n NormHelp.NormHelp(normObj.GetOutWriter(), \n normObj.GetFileOutput(), out);\n }\n // close files & database\n normObj.Close();\n }", "public static void main(String[] _args) {\n \r\n IPmodel IP = new IPmodel(\"XeonIPcore\", false,true,3,2);\r\n IP.add(new Axi4LiteModule(16, 17,true));\r\n IP.add(new Axi4StreamAdaptModuleIn(0, 1, 2, 3));\r\n IP.add(new Axi4StreamAdaptModuleIn(1, 4, 5, 6));\r\n IP.add(new Axi4StreamAdaptModuleIn(2, 7, 8, 9));\r\n\r\n IP.add(new Axi4StreamAdaptModuleOut(0, 1, 2, 3));\r\n IP.add(new Axi4StreamAdaptModuleOut(1, 4, 5, 6));\r\n \r\n System.out.println(IP);\r\n }", "public static void main(String[] args){\n Api api = Factory.createApi(1);\n api.operation(\"using factory now\");\n\n System.out.println(\"--------------using configuration file to get api--------------\");\n Api api2 = Factory.configToCreateApi();\n api2.operation(\"just a test!\");\n }", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public abstract void configure(String[] args);", "public static void main(String [] argv) {\n runClassifier(new NNge(), argv);\n }", "public static void main(String[] args)\r\n {\r\n CommandParser parser = new CommandParser(args[0]);\r\n parser.parseFile();\r\n }", "public static void main(String [] args)\n{\n DpinMain dm = new DpinMain(args);\n dm.process();\n}", "public static void main(String[] args) throws IOException {\n CommandLineParser parser = new DefaultParser();\n Options options = new Options();\n\n Option optModel = OptionBuilder.withArgName(\"model\")\n .hasArg()\n .withDescription(\"model used for simulation: \\n\\nmistransmission\\n constraint\\n constraintWithMistransmission\\n prior\\n priorWithMistransmission (default)\")\n .create(\"model\");\n options.addOption(optModel);\n \n options.addOption(\"stochastic\", false, \"sample from previous generation's distributions\"); \n \n options.addOption(\"superspeakers\", false, \"20% of speakers in grouped distance model connect to other group\"); \n\n Option optLogging = OptionBuilder.withArgName(\"logging\")\n .hasArg()\n .withDescription(\"logging level: \\nnone \\nsome \\nall \\ntabular \\ntroubleshooting\")\n .create(\"logging\");\n options.addOption(optLogging); \n\n Option optFreqNoun = OptionBuilder.withArgName(\"freqNoun\")\n .hasArg()\n .withDescription(\"noun frequency of the target word\")\n .create(\"freqNoun\");\n options.addOption(optFreqNoun); \n \n Option optFreqVerb = OptionBuilder.withArgName(\"freqVerb\")\n .hasArg()\n .withDescription(\"verb frequency of the target word\")\n .create(\"freqVerb\");\n options.addOption(optFreqVerb); \n \n Option optMisProbP = OptionBuilder.withArgName(\"misProbNoun\")\n .hasArg()\n .withDescription(\"mistransmission probability for nouns\")\n .create(\"misProbP\");\n options.addOption(optMisProbP); \n \n Option optMisProbQ = OptionBuilder.withArgName(\"misProbVerb\")\n .hasArg()\n .withDescription(\"mistransmission probability for verbs\")\n .create(\"misProbQ\");\n options.addOption(optMisProbQ); \n \n Option optLambda11 = OptionBuilder.withArgName(\"prior11General\")\n .hasArg()\n .withDescription(\"general prior probability for {1,1} stress pattern\")\n .create(\"prior11General\");\n options.addOption(optLambda11); \n \n Option optLambda22 = OptionBuilder.withArgName(\"prior22General\")\n .hasArg()\n .withDescription(\"general prior probability for {2,2} stress pattern\")\n .create(\"prior22General\");\n options.addOption(optLambda22); \n \n Option optTargetLambda11 = OptionBuilder.withArgName(\"prior11Target\")\n .hasArg()\n .withDescription(\"prior probability for {1,1} stress pattern in the target word prefix class\")\n .create(\"prior11Target\");\n options.addOption(optTargetLambda11); \n \n Option optTargetLambda22 = OptionBuilder.withArgName(\"prior22Target\")\n .hasArg()\n .withDescription(\"prior probability for {2,2} stress pattern in the target word prefix class\")\n .create(\"prior22Target\");\n options.addOption(optTargetLambda22); \n \n Option optDistModel = OptionBuilder.withArgName(\"distModel\")\n .hasArg()\n .withDescription(\"distance model:\\n none\\n absolute\\n probabilistic\\n random\\n lattice\\n grouped (default)\")\n .create(\"distModel\");\n options.addOption(optDistModel); \n \n options.addOption(\"priorClass\", false, \"use word pair prefixes as a class for sharing prior probabilities\"); \n \n Option optNumSpeakers = OptionBuilder.withArgName(\"numSpeakers\")\n .hasArg()\n .withDescription(\"number of speakers\")\n .create(\"numSpeakers\");\n options.addOption(optNumSpeakers); \n \n Option optTargetWord = OptionBuilder.withArgName(\"targetWord\")\n .hasArg()\n .withDescription(\"target word for logging\")\n .create(\"targetWord\");\n options.addOption(optTargetWord); \n \n options.addOption(\"help\", false, \"print this message\"); \n\n try { // parse the command line arguments\n CommandLine line = parser.parse(options, args);\n if(line.hasOption(\"model\")) {\n model = line.getOptionValue(\"model\");\n }\n if(line.hasOption(\"stochastic\")) { \n stochastic = true;\n } else {\n stochastic = false;\n }\n if(line.hasOption(\"superspeakers\")) { \n superspeakers = true;\n } else {\n superspeakers = false;\n }\n if(line.hasOption(\"logging\")) {\n logging = line.getOptionValue(\"logging\");\n }\n if(line.hasOption(\"freqNoun\")) {\n freqNoun = Integer.parseInt(line.getOptionValue(\"freqNoun\"));\n }\n if(line.hasOption(\"freqVerb\")) {\n freqVerb = Integer.parseInt(line.getOptionValue(\"freqVerb\"));\n }\n if(line.hasOption(\"misProbP\")) {\n misProbP = Integer.parseInt(line.getOptionValue(\"misProbP\"));\n }\n if(line.hasOption(\"misProbQ\")) {\n misProbQ = Integer.parseInt(line.getOptionValue(\"misProbQ\"));\n }\n if(line.hasOption(\"targetWord\")) {\n targetWord = line.getOptionValue(\"targetWord\");\n }\n if(line.hasOption(\"prior11General\")) {\n lambda11 = Integer.parseInt(line.getOptionValue(\"prior11General\"));\n }\n if(line.hasOption(\"prior22General\")) {\n lambda22 = Integer.parseInt(line.getOptionValue(\"prior22General\"));\n }\n if(line.hasOption(\"prior11Target\")) {\n targetClassLambda11 = Integer.parseInt(line.getOptionValue(\"prior11Target\"));\n }\n if(line.hasOption(\"prior22Target\")) {\n targetClassLambda22 = Integer.parseInt(line.getOptionValue(\"prior22Target\"));\n }\n if(line.hasOption(\"distModel\")) {\n distModel = line.getOptionValue(\"distModel\");\n }\n if(line.hasOption(\"priorClass\")) {\n priorClass = true;\n } else {\n priorClass = false;\n }\n if(line.hasOption(\"numSpeakers\")) {\n numSpeakers = Integer.parseInt(line.getOptionValue(\"numSpeakers\"));\n }\n if(line.hasOption(\"help\")) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"StressChange\", options );\n }\n } catch ( ParseException exp) {\n System.out.println(\"Unexpected exception: \" + exp.getMessage());\n }\n\n if (StressChange.logging.equals(\"tabular\")){\n System.out.println(\"Iteration,Speaker,Group,Word,Prefix,Noun prob,Verb prob\");\n }\n else if (!StressChange.logging.equals(\"none\")) {\n System.out.println(\"Simulating \" + model + \" model with \" + distModel + \" distance model, showing \" + logging + \" words\");\n System.out.println(\"N1 (target word noun frequency): \" + freqNoun);\n System.out.println(\"N2 (target word verb frequency): \" + freqVerb);\n }\n \n initialStress = new ReadPairs(System.getProperty(\"user.dir\") + \"/src/initialStressSmoothed.txt\").OpenFile(); // read in initial pairs\n\n SimState state = new StressChange(System.currentTimeMillis());\n state.start();\n \n do {\n convos.removeAllEdges();\n if (! StressChange.logging.equals(\"none\") && !StressChange.logging.equals(\"tabular\")){ System.out.println(\"\"); }\n //if (! StressChange.logging.equals(\"none\")){ System.out.println(\"Generation at year \" + (1500 + (state.schedule.getSteps()) * 25)); } // 25-year generations \n if (! StressChange.logging.equals(\"none\") && !StressChange.logging.equals(\"tabular\")){ System.out.println(\"==== ITERATION \" + (state.schedule.getSteps() + 1) + \" ====\"); }\n if (!state.schedule.step(state)) {\n break;\n }\n step++;\n } while (state.schedule.getSteps() < 49); // maximum 50 iterations\n state.finish();\n\n System.exit(0);\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tMMNEAT.main(new String[]{\"runNumber:0\",\"randomSeed:1\",\"bigInteractiveButtons:false\",\"LodeRunnerGANModel:LodeRunnerAllGround20LevelsEpoch20000_10_7.pth\",\"lodeRunnerDistinguishesSolidAndDiggableGround:false\",\"GANInputSize:10\",\"showKLOptions:false\",\"trials:1\",\"mu:16\",\"maxGens:500\",\"io:false\",\"netio:false\",\"mating:true\",\"fs:false\",\"task:edu.southwestern.tasks.interactive.loderunner.LodeRunnerGANLevelBreederTask\",\"watch:true\",\"cleanFrequency:-1\",\"genotype:edu.southwestern.evolution.genotypes.BoundedRealValuedGenotype\",\"simplifiedInteractiveInterface:false\",\"saveAllChampions:false\",\"ea:edu.southwestern.evolution.selectiveBreeding.SelectiveBreedingEA\",\"imageWidth:2000\",\"imageHeight:2000\",\"imageSize:200\"});\n\t\t} catch (FileNotFoundException | NoSuchMethodException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String args[]) {\n Person prsn=new Person.PersonBuilder(\"chenni\", \"chennai\", \"hyderabad\").lastName(\"achary\").createPerson();\n System.out.println(prsn);\n }", "public static void main(String args[]) {\n Initializer init = new Initializer();\r\n Migrate when = new Migrate(init);\r\n }", "public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\tString outputDirectory;\r\n\t\tString parsedFileName;\r\n\t\tString normalizedFileName;\r\n\r\n\t\t// build acquis\r\n\t\toutputDirectory = Config.get().outputDirectory + \"brown/\";\r\n\t\tparsedFileName = \"parsed.txt\";\r\n\t\tnormalizedFileName = \"normalized.txt\";\r\n\t\tString[] languages = Config.get().acquisLanguages.split(\",\");\r\n\t\tnew File(outputDirectory).mkdirs();\r\n\r\n\t\tfor (String language : languages) {\r\n\t\t\tString outputPath = outputDirectory + language + \"/\";\r\n\t\t\tnew File(outputPath).mkdirs();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tAcquisMain.run(Config.get().acquisInputDirectory, outputPath\r\n\t\t\t\t\t\t+ parsedFileName, outputPath + normalizedFileName,\r\n\t\t\t\t\t\tlanguage);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// // build acquis\r\n\t\t// outputDirectory = Config.get().outputDirectory + \"acquis/\";\r\n\t\t// parsedFileName = \"parsed.txt\";\r\n\t\t// normalizedFileName = \"normalized.txt\";\r\n\t\t// String[] languages = Config.get().acquisLanguages.split(\",\");\r\n\t\t// new File(outputDirectory).mkdirs();\r\n\t\t//\r\n\t\t// for (String language : languages) {\r\n\t\t// String outputPath = outputDirectory + language + \"/\";\r\n\t\t// new File(outputPath).mkdirs();\r\n\t\t//\r\n\t\t// try {\r\n\t\t// AcquisMain.run(Config.get().acquisInputDirectory,\r\n\t\t// outputPath + parsedFileName, outputPath\r\n\t\t// + normalizedFileName, language);\r\n\t\t// } catch (IOException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t// }\r\n\r\n\t\t// // build enron\r\n\t\t// outputDirectory = Config.get().outputDirectory + \"enron/en/\";\r\n\t\t// parsedFileName = \"parsed.txt\";\r\n\t\t// normalizedFileName = \"normalized.txt\";\r\n\t\t// new File(outputDirectory).mkdirs();\r\n\t\t//\r\n\t\t// try {\r\n\t\t// EnronMain.run(Config.get().enronInputDirectory, outputDirectory\r\n\t\t// + parsedFileName, outputDirectory + normalizedFileName);\r\n\t\t// } catch (IOException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t//\r\n\t\t// // build reuters\r\n\t\t// outputDirectory = Config.get().outputDirectory + \"reuters/en/\";\r\n\t\t// parsedFileName = \"parsed.txt\";\r\n\t\t// normalizedFileName = \"normalized.txt\";\r\n\t\t// new File(outputDirectory).mkdirs();\r\n\t\t//\r\n\t\t// try {\r\n\t\t// ReutersMain.run(Config.get().reutersInputDirectory,\r\n\t\t// outputDirectory + parsedFileName, outputDirectory\r\n\t\t// + normalizedFileName);\r\n\t\t// } catch (IOException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t}", "public static void main( String args[] ) {\n\n parseInput(args);\n }", "public static void main(String[] args) {\n\t\tVehicle v2=new Vehicle(\"benz\",\"red\");\r\n\t\tv2.run();\r\n\t\t\r\n\t\tCar c1=new Car(2);\r\n\t\tc1.setBrand(\"benz\");\r\n\t\tc1.setColor(\"red\");\r\n\t\tc1.setLoader(2);\r\n\t\tc1.run();\r\n\r\n\t}", "public static void main(String[] args) {\n XmlToHtmlConverter x = new XmlToHtmlConverter();\n x.populateForApi();\n x.generateToc();\n x.generateIndividualCommandPages();\n }", "public static void main(String[] argv){\n\t}", "public static void main(String[] args) {\n String trainedFile = args[0];\n String testFile = args[1];\n \n Bagging inital = new Bagging(trainedFile,testFile);\n inital.run();\n }", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\r\n JkInit.instanceOf(CoreBuild.class, args).doDefault();\r\n }", "public static void main(String[] args) {\n\t\tCake cake = new Cake.Builder().sugar(2).butter(0.5).eggs(2).vanila(2).flour(2.5).bakingpowder(2).milk(2)\r\n\t\t\t\t.cherry(5).build();\r\n\t\tSystem.out.println(cake);\r\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main(String[] args) {\t\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n \n CreateInstance createInstance = new CreateInstance();\n\n try {\n createInstance.init(args);\n Flavor flavor = createInstance.getFlavor();\n createInstance.createInstance(flavor);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n createInstance.close();\n }\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\r\n\t}" ]
[ "0.68048984", "0.66685486", "0.6645993", "0.6437172", "0.62235206", "0.6184132", "0.61826485", "0.61690927", "0.61608225", "0.6124719", "0.61085486", "0.6103812", "0.608016", "0.60472476", "0.60407263", "0.6039012", "0.6031797", "0.60199565", "0.6015112", "0.6009849", "0.6007727", "0.6004344", "0.5995795", "0.59949183", "0.59868777", "0.5985374", "0.5983595", "0.59834045", "0.5975449", "0.5959205", "0.5956207", "0.59542316", "0.5940398", "0.5939985", "0.59374577", "0.59232837", "0.5923195", "0.5917596", "0.5917596", "0.5917596", "0.5912845", "0.590801", "0.5906015", "0.59045595", "0.59038526", "0.59032124", "0.58969533", "0.5894511", "0.5893663", "0.5886384", "0.5885765", "0.58841217", "0.5881321", "0.58766896", "0.5876158", "0.5874685", "0.58725023", "0.58725023", "0.5871623", "0.58686686", "0.5858951", "0.58585286", "0.5858493", "0.585038", "0.585038", "0.585038", "0.585038", "0.585038", "0.585038", "0.585038", "0.58435494", "0.5840358", "0.58323336", "0.5827051", "0.58242697", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.5822309", "0.5821633", "0.5820058", "0.58187544", "0.58175415", "0.5813918", "0.58133215", "0.5811448", "0.58099", "0.58078724", "0.58067566", "0.5805911", "0.5805709", "0.58051264", "0.58034533", "0.58026785", "0.5801418", "0.57992214", "0.5798565", "0.5797123", "0.5794758", "0.57916456" ]
0.0
-1
Assembler life cycle Instantiate an assembler
public Assembler() { // Instantiate internals instructionMap = new HashMap<String, Method>(); instructionSpec = new HashMap<String, Processor>(); codeSectionList = new LinkedList<Section>(); // Regular expressions patternInstruction = Pattern.compile("\\s*(?:(\\w+):)?\\s*(?:(\\w+)(?:\\s+(.*))?)?"); patternSection = Pattern.compile("\\s*SECTION\\s+(\\.\\w+)\\s*", Pattern.CASE_INSENSITIVE); patternOpBoolean = Pattern.compile("\\$true|\\$false", Pattern.CASE_INSENSITIVE); patternOpString = Pattern.compile("\"[^\"]*\""); patternOpLabel = Pattern.compile("[a-zA-Z_]\\w*"); // Instantiate the code emitter codeEmitter = new AssemblerIREmitter(); // Populate instruction processors populateProcessors(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "void getAssembled(TmxElementAssembler assembler) throws TmxInvalidAssembly;", "public void assemble1() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tnew MyAssembler();\n\n\t}", "public void assemble2() {\n\t\t\r\n\t}", "interface AssemblerContext {\n\n /**\n * Creates new DTO assembler.\n *\n * @param dto dto class\n * @param entity entity class\n *\n * @return new assmbler instance\n */\n Assembler newAssembler(final Class< ? > dto, final Class< ? > entity);\n\n /**\n * Return method synthesizer used for this Assembler graph.\n *\n * @return method synthesizer\n */\n MethodSynthesizer getMethodSynthesizer();\n\n /**\n * Returns DSL registry used for this Assembler graph.\n *\n * @return DSL registry\n */\n Registry getDslRegistry();\n\n /**\n * Class loader used for this Assembler graph.\n *\n * @return class loader\n *\n * @throws GeDARuntimeException SoftReferences are used to keep GC tidy, so\n * this may throw a GeDARuntimeException.\n */\n ClassLoader getClassLoader() throws GeDARuntimeException;\n\n}", "@Override\n public void onMachineAssembled()\n {\n \n }", "JsrInstruction() {}", "Instruction createInstruction();", "public Instructions() {\n\n\t\t// String code = codeIn.trim();\n\t\t// code = code.replaceAll(\"\\\\s+\", \"\");\n\t\t// System.out.println(\"Code In:\\n\" + code);\n\t\t//\n\t\t// int len = code.length();\n\t\t// int chunkLength = 2; // the length of each chunk of code\n\t\t// int i = 0;\n\n\t\t// Create new Memory Array\n\t\tMA = new MemoryArray();\n\n\t\t// traverse entered code and split into 2 digit chunks\n\t\t// for (i = 0; i < len; i += chunkLength) {\n\t\t//\n\t\t// String chunk = code.substring(i, Math.min(len, i + chunkLength));\n\t\t// System.out.println(\"code chunk no. \" + (i / 2) + \" \" + chunk);\n\t\t//\n\t\t// opCode(chunk); // TODO - need to call this from the memory class I\n\t\t// think\n\n\t\tmem = new Memory();\n\n\t\tmemDispalyString();\n\n\t\tproc = new ProcessorLoop();\n\n\t\t// set the memory address and OpCode\n\t\t// mem.setAddress(addr);\n\t\t// // convert to decimal\n\t\t// mem.setOpCode(Integer.parseInt(chunk, 16));\n\t\t// System.out.println(\"oc = \" + (Integer.parseInt(chunk, 16)));\n\t\t//\n\t\t// // add the memory object to the memory array\n\t\t// MA.addMemoryObjects(addr, mem);\n\t\t// System.out.println(\"New memory = \" + mem.getAddress() + \" \"\n\t\t// + mem.getOpCode());\n\t\t// addr++;\n\t\t// }\n\n\t}", "public Parser(AsmCoder coder) {\n this.coder = coder;\n loadStatArithmeticMap(coder);\n loadDynArithmeticMap(coder);\n loadArgumentCommandToAsm(coder);\n loadStatControlMap(coder);\n }", "public void translateInstantiation( MethodTranslator method, New newInsn );", "public Programa(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new ProgramaTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }", "public BusSystem(){\n\t\tmar = new MAR((short)0, this);\n\t\tmdr = new MDR((short)0, this);\n\t\tpc = new PC((short)0);\n\t\tA = new Register((short)0);\n\t\tB = new Register((short)0);\n\t\tstack = new MemStack();\n\t\tprogramMemory = new Memory();\n\t\tMemory.setMemSize((short)1024);\n\t}", "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "public BdsVm compile() {\n\t\tif (bdsvm != null) throw new RuntimeException(\"Code already compiled!\");\n\n\t\t// Initialize\n\t\tbdsvm = new BdsVm();\n\t\tcode = new ArrayList<>();\n\t\tbdsvm.setDebug(debug);\n\t\tbdsvm.setVerbose(verbose);\n\t\tinit();\n\n\t\t// Read file and parse each line\n\t\tlineNum = 1;\n\t\tfor (String line : code().split(\"\\n\")) {\n\t\t\t// Remove comments and labels\n\t\t\tif (isCommentLine(line)) continue;\n\n\t\t\t// Parse label, if any.Keep the rest of the line\n\t\t\tline = label(line);\n\t\t\tif (line.isEmpty()) continue;\n\n\t\t\t// Decode instruction\n\t\t\tOpCode opcode = opcode(line);\n\t\t\tString param = null;\n\t\t\tif (opcode.hasParam()) param = param(line);\n\t\t\t// Add instruction\n\t\t\taddInstruction(opcode, param);\n\t\t\tlineNum++;\n\t\t}\n\n\t\tbdsvm.setCode(code);\n\t\tif (debug) System.err.println(\"# Assembly: Start\\n\" + bdsvm.toAsm() + \"\\n# Assembly: End\\n\");\n\t\treturn bdsvm;\n\t}", "Instruction asInstruction();", "public interface InitializerDef extends CodeDef, MemberDef\n{\n InitializerInstance asInstance();\n}", "public static sdemigration.proxies.CIAssembly initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)\r\n\t{\r\n\t\treturn new sdemigration.proxies.CIAssembly(context, mendixObject);\r\n\t}", "public A86Writer(String filename) {\n\t\tinputFile = filename;\n\t\toutputFile = filename.substring(0, filename.length()-2) + \"asm\";\n\t}", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public Programa(ProgramaTokenManager tm) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }", "public static void main(String[] args) \n\t{\n\t\tif (args.length != 0) \n\t\t{\n\t\t\tnew Assembler(args[0]);\n\t\t\treturn;\n\t\t}\n\n\t\t// Otherwise, pop-up a JFileChooser to allow the user to use a GUI\n\t\t// to select the ASM file.\n\n\t\t//Schedule a job for the event dispatch thread:\n\t\t//creating and showing the assembler's JFileChooser.\n\t\tSwingUtilities.invokeLater(new Runnable() \n\t\t{\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\t//Turn off metal's use of bold fonts\n\t\t\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n\t\t\t\tJFileChooser fc = new JFileChooser();\n\t\t\t\t// Only allow the selection of files with an extension of .asm.\n\t\t\t\tfc.setFileFilter(new FileNameExtensionFilter(\"ASM files\", \"asm\"));\n\t\t\t\t// Uncomment the following to allow the selection of files and\n\t\t\t\t// directories. The default behavior is to allow only the selection\n\t\t\t\t// of files.\n\t\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\t\t\t\tif (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\tnew Assembler(fc.getSelectedFile().getPath());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"No file selected; terminating.\");\n\t\t\t}\n\t\t});\n\t}", "public AISDecoder() {\n initComponents();\n }", "Assembler newAssembler(final Class< ? > dto, final Class< ? > entity);", "public static void main(String[] args) {\n\t\t\t\t\n\t\tMain t = new Main();\n\t\t\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tUniversidad Nacional del Centro de la Provincia de Buenos Aires \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \t\tCátedra : Diseño de Compiladores \");\n\t\tSystem.out.println(\" \t\tExtensión del compilador : incorporación del operador '++' a identificadores tipo long \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tProf: Mg. Ing. Marcela Ridado \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tSr: Marcelo Rodríguez -- mrodriguez@alumnos.unicen.edu.ar\");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio del archivo assembler generado [3] directorio para guardar la salida \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\t\n\t\tif (args.length!=3){\n\t\t\tSystem.out.println(\" Error - Faltan argumentos \");\n\t\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio de archivos assembler [3] directorio para guardar la salida \");\n\t\t\t//return;\n\t\t}\n\t\t\n\t\tString programa=args[0];\n\t\tString asmDir=args[1];\n\t\tString outputDir=args[2];\n\t\t\n\t\t\t\t\n\t\tFile asm = new File(asmDir);\n\t\t\n\t\t\n\t\tif (!asm.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \tasm.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos assembler creado.\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\tFile output=new File(outputDir);\n\t\t\n\t\tif (!output.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \toutput.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos de salida creado\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\t\n\t\tFile file = null;\n\t\t\n\t\t\n\t\tfile = new File(programa);\n\n\t\tif (!file.exists()){\n\t\t\tSystem.out.println(\" No hay programa para compilar .\");\n\t\t\treturn;\n\t\t}\n\t\t\n\n\t\t\n\t\tt.setUp(file,asmDir,outputDir);\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void assemble(){\n\t\tsuper.assemble();//This calls the assemble() defined in decorator\n\t\tSystem.out.print(\" Now , Adding features of Sports Car.\");\n\t}", "public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }", "public CourseRegInstance newInstance(String edma_name, SchoolInfo schoolInfo) throws IOException;", "private void loadAssembly () {\r\n Factory assemblyFactory = new AssemblyFactory(mySimulation);\r\n int response = INPUT_CHOOSER.showDialog(null, \"Assembly file\");\r\n if (response == JFileChooser.APPROVE_OPTION) {\r\n assemblyFactory.loadFile(INPUT_CHOOSER.getSelectedFile());\r\n }\r\n }", "public SimpleRuntimeMachine(String fileName) {\n\t\tram = new int[RAM_CAPACITY];\n\t\tprogramStack = new Stack<String>();\n\t\tprocessCommands(fileName);\n\t}", "public BlogEntryResourceAsm()\r\n\t {\r\n\t super(BlogEntryController.class, BlogEntryResource.class);\r\n\t }", "public interface IFctAsm<RS> extends IFctApp {\n\n /**\n * <p>Gets main factory for setting configuration parameters.</p>\n * @return Object - requested bean\n */\n FctBlc<RS> getFctBlc();\n\n /**\n * <p>Initializes factory.</p>\n * @param pRvs request scoped vars\n * @param pCtxAttrs context attributes\n * @throws Exception - an exception\n */\n void init(Map<String, Object> pRvs, IAttrs pCtxAttrs) throws Exception;\n}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public CInstructions(CProcessor cprocessor) { this.m_cprocessor = cprocessor; }", "Reproducible newInstance();", "public Subassembly(String description) {\r\n\t\tsuper(description);\r\n\t}", "private CodeRef() {\n }", "private DMarlinRenderingEngine() {\n }", "public WASMRI() {\n Debugger.debug(0,\"Creating RAPInterface\");\n }", "public L1Compiler(L1Machine machine)\n {\n // Keep the machine to compile into.\n this.machine = machine;\n }", "protected abstract void construct();", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "public static Compile instance() {\n\tif (__instance == null) {\n\t synchronized (Compile.class) {\n\t\tif (__instance == null) {\n\t\t __instance = new Compile();\n\t\t}/* if (__instance == null) */\n\t }/* synchronized (Compile.class) */\n\t}/* if (__instance == null) */\n\n\treturn __instance;\n }", "public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}", "public MonHoc() {\n }", "public static void main(String[ ] args) {\r\n Machine m1 = new Machine() {\r\n @Override public void start() {\r\n System.out.println(\"Wooooo\");\r\n }\r\n };\r\n Machine m2 = new Machine();\r\n m2.start();\r\n m2.end();\r\n }", "public void translateInstanceOf( MethodTranslator method, InstanceOf instOfInsn );", "public MicroCodeMachine(Function<Number, Addr> toAddr, Number pcRegister, Alu alu, MicroCodeDecoder decoder) {\n this.toAddr = toAddr;\n this.pcRegister = toAddr.apply(pcRegister);\n this.alu = alu;\n this.decoder = decoder;\n\n program = new HashMap<>();\n decodedInstructions = new HashMap<>();\n temporaryStorage = new TemporaryStorage();\n\n // No current instruction yet\n currentAddr = null;\n\n // By default, start address is 0\n nextAddr = toAddr(0);\n\n this.currentDelaySlot = 0;\n // this.delaySlotJump = null;\n this.jump = null;\n\n // this.preloadedImm = null;\n // this.imm = null;\n }", "public Process() {\n PC.MakeProcess();\n\n }", "private HSBC() {\n\t\t\n\t\t\n\t}", "public interface SearchAssembler extends Assembler<UserState, SearchDto>{\n}", "public UnknownAsm(int dac, int fi) {\r\n super(dac, fi);\r\n }", "public Activator() {\r\n\t}", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "Idiom createIdiom();", "@Override\n public void enterMainClass(MiniJavaParser.MainClassContext ctx) {\n Klass mainKlass = klasses.get(ctx.Identifier(0).getText());\n String mainKlassName = mainKlass.getScopeName();\n\n cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(V1_1, ACC_PUBLIC, mainKlassName, null, \"java/lang/Object\", null);\n\n mg = new GeneratorAdapter(ACC_PUBLIC, INIT(), null, null, cw);\n mg.loadThis();\n mg.invokeConstructor(Type.getType(Object.class), INIT());\n mg.returnValue();\n mg.endMethod();\n mg = new GeneratorAdapter(ACC_PUBLIC + ACC_STATIC, org.objectweb.asm.commons.Method.getMethod(\"void main (String[])\"), null, null, cw);\n }", "public Instruction getInstruction(String label) {\n int s1; // Possible operands of the instruction\n int s2;\n String s3;\n int r;\n int x;\n\n if (line.equals(\"\"))\n return null;\n\n //Get the first word as a string\n String ins = scan();\n\n // Generate the instruction classname that corresponds with the label\n String instructionName = ins.substring(0, 1).toUpperCase() + ins.substring(1).toLowerCase() + \"Instruction\" ;\n\n //System.out.println(\"The scanned label is: \" + ins);\n //System.out.println(\"Use instruction class: \" + instructionName);\n\n // Make a list of the remaining words\n List<String> wordList = new ArrayList<>();\n List<Class> paramTypes = new ArrayList<>();\n\n //The first constructor param is always the label string\n wordList.add(label);\n paramTypes.add(String.class);\n\n String nextWord;\n\n /*\n if (!nextWord.equals(\"\")){\n wordList.add(nextWord);\n paramTypes.add(nextWord.getClass());\n }\n */\n\n while (!(nextWord = scan()).equals(\"\")){\n wordList.add(nextWord);\n }\n\n //System.out.println(\"The next word is: \" + instructionName);\n\n Object wordArray [] = wordList.toArray();\n Class<?> paramArray [] = new Class<?> [wordArray.length];\n\n try {\n for (int i = 0; i < wordArray.length; i++){\n String str = wordArray[i].toString();\n\n if (Pattern.matches((\"-?[0-9]+\"), str)){\n paramArray [i] = Integer.TYPE;\n wordArray [i] = Integer.parseInt((String) wordArray[i]);\n } else {\n paramArray [i] = String.class;\n\n }\n }\n\n //System.out.println(\"My word array contains: \" + Arrays.asList(wordArray));\n //System.out.println(\"My parameter array contains: \" + Arrays.asList(paramArray));\n //System.out.println(\"Instruction name is: \" + instructionName);\n\n //Reflect class\n Class reflectionClass = Class.forName(\"sml.\" + instructionName);\n\n //System.out.println(\"My reflection is: \" + reflectionClass);\n\n Constructor con = reflectionClass.getConstructor(paramArray);\n\n // Cast return back to an Instruction\n return ((Instruction)con.newInstance(wordArray));\n\n } catch (ClassNotFoundException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (NoSuchMethodException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (InvocationTargetException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (InstantiationException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n } catch (IllegalAccessException e) {\n //e.printStackTrace();\n System.err.println(\"Error\");\n }\n\n/*\n // Commented out switch statement\n\n switch (ins) {\n case \"add\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new AddInstruction(label, r, s1, s2);\n case \"lin\":\n r = scanInt();\n s1 = scanInt();\n return new LinInstruction(label, r, s1);\n case \"out\":\n r = scanInt();\n return new OutInstruction(label, r);\n case \"sub\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new SubInstruction(label, r, s1, s2);\n case \"mul\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new MulInstruction(label, r, s1, s2);\n case \"div\":\n r = scanInt();\n s1 = scanInt();\n s2 = scanInt();\n return new DivInstruction(label, r, s1, s2);\n case \"bnz\":\n r = scanInt();\n s3 = scan();\n return new BnzInstruction(label, r, s3);\n }\n\n // You will have to write code here for the other instructions.\n*/\n\n return null;\n }", "public Fg(Nasm nasm){\n\tthis.nasm = nasm;\n\tthis.inst2Node = new HashMap< NasmInst, Node>();\n\tthis.node2Inst = new HashMap< Node, NasmInst>();\n\tthis.label2Inst = new HashMap< String, NasmInst>();\n\tthis.graph = new Graph();\n\n initializeNodes();\n for (NasmInst inst : nasm.listeInst)\n inst.accept(this);\n }", "public Demo()\n {\n machine = new Machine();\n }", "public Instruction(byte c) {\n code = c;\n next = null;\n branches = false;\n calls = false;\n returns = false;\n }", "protected DiagClassVisitor() {\n super(ASM5);\n }", "public Scriptable construct(Context cx, Scriptable scope, Object[] args);", "protected void sequence_Compilation_initial(ISerializationContext context, Compilation_initial semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public ScControl()\n {\n register();\n install();\n }", "public static void main(String argv[]) throws UnsupportedEncodingException, ExecutionException, FileNotFoundException {\r\n // Check arguments\r\n if(argv.length <= 0) { System.err.println(\"Usage: <filename>\"); return; }\r\n\r\n // Start the machine\r\n Main.traceStream = System.out;\r\n Machine.powerOn();\r\n\r\n // Assemble the file\r\n Assembler assembler = new Assembler();\r\n InputStream stream = new FileInputStream(argv[0]);\r\n try { assembler.Assemble(stream); }\r\n catch(InvalidInstructionException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(LabelNotResolvedException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(ProgramSizeException e)\r\n { System.err.println(e.getMessage()); return; }\r\n\r\n // Run the code\r\n Machine.setPC((short) 0);\r\n Machine.setMSP((short) assembler.getSize());\r\n Machine.setMLP((short) (Machine.memorySize - 1));\r\n Machine.run();\r\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "private void addStaticInitAndConstructors() {\n MethodNode mn = new MethodNode(ASM5, ACC_STATIC, \"<clinit>\", \"()V\", null, null);\n InsnList il = mn.instructions;\n il.add(new MethodInsnNode(INVOKESTATIC, \n \"org/apache/uima/type_system/impl/TypeSystemImpl\", \n \"getTypeImplBeingLoaded\", \n \"()Lorg/apache/uima/type_system/impl/TypeImpl;\", \n false));\n il.add(new FieldInsnNode(PUTSTATIC, \n \"pkg/sample/name/SeeSample\", \n \"_typeImpl\", \n \"Lorg/apache/uima/type_system/impl/TypeImpl;\"));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 1;\n mn.maxLocals = 0;\n cn.methods.add(mn);\n \n // instance constructors method\n \n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(ILorg/apache/uima/jcas/cas/TOP_Type;)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 1));\n il.add(new VarInsnNode(ALOAD, 2));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(ILorg/apache/uima/jcas/cas/TOP_Type;)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 3;\n mn.maxLocals = 3;\n cn.methods.add(mn);\n \n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ALOAD, 1));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 2;\n mn.maxLocals = 2;\n cn.methods.add(mn);\n \n // constructor for annotation\n if (type.isAnnotation) {\n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(Lorg/apache/uima/jcas/JCas;II)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ALOAD, 1));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", false));\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 2));\n il.add(new MethodInsnNode(INVOKEVIRTUAL, \"org/apache/uima/tutorial/RoomNumberv3\", \"setBegin\", \"(I)V\", false));\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 3));\n il.add(new MethodInsnNode(INVOKEVIRTUAL, \"org/apache/uima/tutorial/RoomNumberv3\", \"setEnd\", \"(I)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 2;\n mn.maxLocals = 4;\n cn.methods.add(mn);\n }\n }", "public IRDecoder(CPU cpu) {\n\t\tthis.cpu = cpu;\n\t\tcontext = Context.getInstance();\n\t}", "public void assemble(String filePath) throws Exception {\n\n System.out.println(\"Starting\");\n System.out.println(\"Loading Parser . . .\");\n File inputFile= new File(filePath);\n Parser parser = new Parser(inputFile);\n\n System.out.println(\"Loading SymbolTable . . . \");\n SymbolTable symbolTable = new SymbolTable();\n\n System.out.println(\"Parser first pass . . . \");\n parser.firstPass(symbolTable);\n System.out.println(\"Parser second pass . . . \");\n parser.secondPass(symbolTable);\n\n System.out.println(\"Complete\");\n\n }", "public Climber(){\n\t\tinst = this;\n\t}", "private void load() {\n\t\ttry {\r\n\t\t\tA a = new A();\r\n\t\t\ta.action();\r\n\t\t\tSystem.out.println(\"********下面为静态*********\");\r\n\t\t\tString name = a.getClass().getName();\r\n//\t\t\tClass aClass = Class.forName(\"com.guonl.dynamic.A\");\r\n\t\t\tClass<?> aClass = Class.forName(name);\r\n\t\t\tIC ic = (IC)aClass.newInstance();\r\n\t\t\tic.action();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "CodegenFactory getCodegenFactory();", "public War()\n {\n start();\n }", "public static void main(String[] args) {\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tASM window = new ASM();\r\n\t\t\t\t\twindow.frmAsmAssembler.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} // try\r\n\t\t\t}// run\r\n\t\t});\r\n\t}", "public Code() {\n\t}", "public\n /* Constructor */\n AVRProgrammer(Handler _handler) {\n handler = _handler;\n }", "StatePac build();", "public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public final LLVMParser.assembly_expr_return assembly_expr() throws RecognitionException {\r\n LLVMParser.assembly_expr_return retval = new LLVMParser.assembly_expr_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1080:15: ( 'asm' ( 'sideeffect' )? ( 'alignstack' )? STRING ',' STRING )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1080:17: 'asm' ( 'sideeffect' )? ( 'alignstack' )? STRING ',' STRING\r\n {\r\n match(input,54,FOLLOW_54_in_assembly_expr8123); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1080:23: ( 'sideeffect' )?\r\n int alt269=2;\r\n int LA269_0 = input.LA(1);\r\n\r\n if ( (LA269_0==81) ) {\r\n alt269=1;\r\n }\r\n switch (alt269) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1080:23: 'sideeffect'\r\n {\r\n match(input,81,FOLLOW_81_in_assembly_expr8125); \r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1080:37: ( 'alignstack' )?\r\n int alt270=2;\r\n int LA270_0 = input.LA(1);\r\n\r\n if ( (LA270_0==52) ) {\r\n alt270=1;\r\n }\r\n switch (alt270) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1080:37: 'alignstack'\r\n {\r\n match(input,52,FOLLOW_52_in_assembly_expr8128); \r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,STRING,FOLLOW_STRING_in_assembly_expr8131); \r\n\r\n match(input,44,FOLLOW_44_in_assembly_expr8133); \r\n\r\n match(input,STRING,FOLLOW_STRING_in_assembly_expr8135); \r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "@Override\r\n\tpublic void translateToAsm(PrintWriter writer, Memory stack) {\n\t\t\r\n\t}", "private Instantiation(){}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public EnigmaMachine()\n\t{\n\t\t//Instantiating a plugboard inside the enigma\n\t\tplugboard = new Plugboard();\n\t\t//Instantiating the three rotors of the enigma\n\t\trotors = new BasicRotor[3];\n\t}", "public static void main(String[] args) {\n\t\tnew Actions();\r\n\t\t//call constructor\r\n\t}", "public PacketAssembler()\n {\n \tthis.theTreeMaps = new TreeMap<Integer, TreeMap<Integer,String>>();\n \tthis.countPerMessage = new TreeMap<Integer,Integer>();\n }", "public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}", "public FormatterStateMachine() {\n }", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "public void Assemble(InputStream input) throws InvalidInstructionException, LabelNotResolvedException, ProgramSizeException {\r\n // Reset internal state\r\n codeSection = null;\r\n codeSectionList.clear();\r\n codeLine = 0;\r\n codeInstruction = new String();\r\n Emitter emitter = new Emitter();\r\n codeEmitter.setEmitter(emitter);\r\n // Instantiate the text reader\r\n reader = new TextReader(input);\r\n\r\n // REGEX matcher\r\n Matcher m = null;\r\n\r\n // Pass 1: instantiate list of instructions\r\n for(codeLine = 1;; codeLine++) {\r\n // Read single line from stream\r\n try { codeInstruction = reader.readLine(); }\r\n // RuntimeException at EOF\r\n catch(RuntimeException e) { break; }\r\n\r\n // Remove any comments\r\n int comment = codeInstruction.indexOf(COMMENT_CHAR);\r\n if(comment >= 0) codeInstruction = codeInstruction.substring(0, comment);\r\n\r\n // Try parsing it as a section\r\n m = patternSection.matcher(codeInstruction);\r\n if(m.matches()) { enterSection(m.group(1)); continue; }\r\n\r\n // Try parsing it as an instruction\r\n m = patternInstruction.matcher(codeInstruction);\r\n if(m.matches()) {\r\n // If there is no section bail out\r\n if(currentSection() == null && (m.group(1) != null || m.group(2) != null))\r\n invalidInstruction(\"Instruction and/or label outside of a section!\");\r\n\r\n // See if there is a label\r\n if(m.group(1) != null) addLabel(m.group(1));\r\n // See if there is an instruction\r\n if(m.group(2) != null) addInstruction(m.group(2), parseOperands(m.group(3)));\r\n }\r\n }\r\n\r\n // Add section for text constants\r\n Section textConst = enterSection(\".textconst\");\r\n emitter.setDataSection(textConst);\r\n\r\n // Pass 2: layout sections\r\n int baseAddress = 0;\r\n for(Section section : codeSectionList) {\r\n section.setAddress(baseAddress);\r\n baseAddress += section.getSize();\r\n }\r\n\r\n // Pass 3: resolve label operands\r\n for(Section section : codeSectionList)\r\n for(Instruction instr : section.getInstructions())\r\n for(Operand op : instr.getOperands())\r\n if(op instanceof LabelOperand) {\r\n LabelOperand lop = (LabelOperand) op;\r\n Integer addr = getLabel(lop.getLabel());\r\n if(addr != null) lop.setAddress(addr);\r\n }\r\n\r\n // Pass 4: generate machine code\r\n for(Section section : codeSectionList)\r\n for(Instruction instr : section.getInstructions())\r\n processInstruction(instr);\r\n\r\n // Check final program size, we need at least one byte for the stack\r\n if(getSize() > Machine.memorySize - 1)\r\n throw new ProgramSizeException(\"size of program, \" + getSize() + \" words, exceeds machine maximum of \" + (Machine.memorySize - 1));\r\n }", "public void init(int index,JJITInstruction[] instructions,KRegister[] constants,KProcess process) throws Exception {\n c_repo = process.getClassRepository();\n // *********[9] DUP\n // *********[10] ALOAD(2)\n // *********[11] ALOAD(1)\n c_next = instructions[(index + 1)];\n }", "@SuppressWarnings(\"unchecked\")\n public AnimationSystem(){\n super(Family.all(TextureComponent.class).get());\n\n tm = ComponentMapper.getFor(TextureComponent.class);\n// am = ComponentMapper.getFor(AnimationComponent.class);\n// sm = ComponentMapper.getFor(StateComponent.class);\n }", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "public Arm() {\n initializeLogger();\n initializeCurrentLimiting();\n setBrakeMode();\n encoder.setDistancePerPulse(1.0/256.0);\n lastTimeStep = Timer.getFPGATimestamp();\n }", "Instance createInstance();" ]
[ "0.64915353", "0.6183013", "0.61332035", "0.6021324", "0.60015047", "0.5941969", "0.56514406", "0.556181", "0.5503795", "0.5492456", "0.5461027", "0.5422342", "0.53907865", "0.5371258", "0.5310299", "0.5276279", "0.52654094", "0.524604", "0.5198952", "0.5180886", "0.5161781", "0.5129077", "0.51234394", "0.51224977", "0.51124096", "0.5056902", "0.504817", "0.5038756", "0.5032735", "0.5032441", "0.50284034", "0.5014282", "0.501066", "0.50048184", "0.50048184", "0.50048184", "0.49753046", "0.4966814", "0.49224085", "0.4916608", "0.49033642", "0.48980626", "0.48963895", "0.48953947", "0.48951763", "0.488702", "0.48869517", "0.48827982", "0.48797035", "0.48740396", "0.48739538", "0.4860337", "0.4839833", "0.4839564", "0.4833981", "0.48258978", "0.4823958", "0.48220155", "0.48199996", "0.48107788", "0.4806255", "0.48038945", "0.48024312", "0.47955534", "0.47907892", "0.47877294", "0.47834432", "0.4783318", "0.47820044", "0.47779503", "0.4777408", "0.47727045", "0.4767893", "0.47673273", "0.47669262", "0.47645923", "0.476217", "0.47596517", "0.47589943", "0.47588506", "0.47545907", "0.47501528", "0.4747173", "0.4732335", "0.47039422", "0.4689866", "0.4689866", "0.4689866", "0.46885702", "0.46876413", "0.46861792", "0.46844074", "0.46641853", "0.46614286", "0.4657251", "0.46532077", "0.46530423", "0.46514758", "0.46510088", "0.46478704" ]
0.70998275
0
Assemble an IR program
public void Assemble(InputStream input) throws InvalidInstructionException, LabelNotResolvedException, ProgramSizeException { // Reset internal state codeSection = null; codeSectionList.clear(); codeLine = 0; codeInstruction = new String(); Emitter emitter = new Emitter(); codeEmitter.setEmitter(emitter); // Instantiate the text reader reader = new TextReader(input); // REGEX matcher Matcher m = null; // Pass 1: instantiate list of instructions for(codeLine = 1;; codeLine++) { // Read single line from stream try { codeInstruction = reader.readLine(); } // RuntimeException at EOF catch(RuntimeException e) { break; } // Remove any comments int comment = codeInstruction.indexOf(COMMENT_CHAR); if(comment >= 0) codeInstruction = codeInstruction.substring(0, comment); // Try parsing it as a section m = patternSection.matcher(codeInstruction); if(m.matches()) { enterSection(m.group(1)); continue; } // Try parsing it as an instruction m = patternInstruction.matcher(codeInstruction); if(m.matches()) { // If there is no section bail out if(currentSection() == null && (m.group(1) != null || m.group(2) != null)) invalidInstruction("Instruction and/or label outside of a section!"); // See if there is a label if(m.group(1) != null) addLabel(m.group(1)); // See if there is an instruction if(m.group(2) != null) addInstruction(m.group(2), parseOperands(m.group(3))); } } // Add section for text constants Section textConst = enterSection(".textconst"); emitter.setDataSection(textConst); // Pass 2: layout sections int baseAddress = 0; for(Section section : codeSectionList) { section.setAddress(baseAddress); baseAddress += section.getSize(); } // Pass 3: resolve label operands for(Section section : codeSectionList) for(Instruction instr : section.getInstructions()) for(Operand op : instr.getOperands()) if(op instanceof LabelOperand) { LabelOperand lop = (LabelOperand) op; Integer addr = getLabel(lop.getLabel()); if(addr != null) lop.setAddress(addr); } // Pass 4: generate machine code for(Section section : codeSectionList) for(Instruction instr : section.getInstructions()) processInstruction(instr); // Check final program size, we need at least one byte for the stack if(getSize() > Machine.memorySize - 1) throw new ProgramSizeException("size of program, " + getSize() + " words, exceeds machine maximum of " + (Machine.memorySize - 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Program createProgram();", "Program createProgram();", "Program createProgram();", "RoverProgram createRoverProgram();", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "public static void main(String[] args) {\n String filePath=args[0];\n Parser parser = new Parser(filePath);\n Code code = new Code();\n SymbolTable symbol = new SymbolTable();\n initSymbol(filePath, parser, symbol);\n String fileOutputPath=filePath.replace(\".asm\",\".hack\");\n Parser parser1 = new Parser(filePath);\n\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileOutputPath ,true));\n PrintWriter emptyFile = new PrintWriter(fileOutputPath);\n emptyFile.print(\"\");\n emptyFile.close();\n\n //count the num of var in the program\n int numVariables = 16;\n while (parser1.hasMoreCommands()) {\n parser1.advance();\n String type = parser1.commandType();\n StringBuilder binCommand=new StringBuilder();\n switch (type) {\n case \"A_COMMAND\":\n //get the symbol\n String commandSymbol= parser1.symbol();\n Integer address=0;\n if(isNumeric(commandSymbol)){\n address=Integer.parseInt(commandSymbol);\n }\n //check if the symbol don't exist in the symbol Table and add it\n else if (!symbol.contain(commandSymbol)) {\n symbol.addEntry(commandSymbol, numVariables);\n address=symbol.getAddress(commandSymbol);\n numVariables++;\n }\n //get the symbol value from the symbol table\n else if(symbol.contain((commandSymbol))){\n address=symbol.getAddress(commandSymbol);\n }\n\n binCommand.append(Integer.toBinaryString(address));\n int j=binCommand.length();\n for (int i = 0; i < 16 - j; i++) {\n binCommand.insert(0, \"0\");\n }\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n case \"C_COMMAND\":\n //write the c command\n binCommand.append(\"111\");\n binCommand.append(code.comp(parser1.comp()));\n binCommand.append(code.dest(parser1.dest()));\n binCommand.append(code.jump(parser1.jump()));\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n }\n }\n\n writer.close();\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "public void assemblePrograms(CRun run)\r\n {\r\n CEventGroup evgPtr;\r\n CEvent evtPtr;\r\n CParam evpPtr;\r\n\r\n short o, oo;\r\n short oi, oi1, oi2;\r\n short type;\r\n int nOi, i, n, num;\r\n short d, evgF, evgM, q, d1, d2;\r\n int code;\r\n short fWrap;\r\n short evtAlways, evtAlwaysPos;\r\n int aTimers, ss;\r\n boolean bOrBefore;\r\n int cndOR;\r\n CObjInfo oilPtr;\r\n CObject hoPtr;\r\n\r\n rhPtr = run;\r\n\r\n rh2ActionCount = 0; \t\t\t\t// Force le compte des actions a 0\r\n\r\n // Nettoie la curFrame.m_oiList : enleve les blancs, compte les objets\r\n int oiMax = 0;\r\n for (nOi = 0 , n=0; n < rhPtr.rhMaxOI; n++)\r\n {\r\n if (rhPtr.rhOiList[n].oilOi != -1)\r\n {\r\n rhPtr.rhOiList[n].oilActionCount = -1;\r\n rhPtr.rhOiList[n].oilLimitFlags = 0;\r\n rhPtr.rhOiList[n].oilLimitList = -1;\r\n nOi++;\r\n if (rhPtr.rhOiList[n].oilOi + 1 > oiMax)\r\n {\r\n oiMax = rhPtr.rhOiList[n].oilOi + 1;\r\n }\r\n }\r\n }\r\n\r\n // Fabrique la liste des oi pour chaque qualifier\r\n qualToOiList = null;\r\n int oil;\r\n if (nQualifiers > 0)\r\n {\r\n short count[] = new short[nQualifiers];\r\n for (q = 0; q < nQualifiers; q++)\r\n {\r\n oi = (short) ((qualifiers[q].qOi) & 0x7FFF);\r\n count[q] = 0;\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n if (rhPtr.rhOiList[oil].oilType == qualifiers[q].qType)\r\n {\r\n for (n = 0; n < 8 && rhPtr.rhOiList[oil].oilQualifiers[n] != -1; n++) // MAX_QUALIFIERS\r\n {\r\n if (oi == rhPtr.rhOiList[oil].oilQualifiers[n])\r\n {\r\n count[q]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n qualToOiList = new CQualToOiList[nQualifiers];\r\n for (q = 0; q < nQualifiers; q++)\r\n {\r\n qualToOiList[q] = new CQualToOiList();\r\n\r\n if (count[q] != 0)\r\n {\r\n qualToOiList[q].qoiList = new short[count[q] * 2];\r\n }\r\n\r\n i = 0;\r\n oi = (short) ((qualifiers[q].qOi) & 0x7FFF);\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n if (rhPtr.rhOiList[oil].oilType == qualifiers[q].qType)\r\n {\r\n for (n = 0; n < 8 && rhPtr.rhOiList[oil].oilQualifiers[n] != -1; n++)\r\n {\r\n if (oi == rhPtr.rhOiList[oil].oilQualifiers[n])\r\n {\r\n qualToOiList[q].qoiList[i * 2] = rhPtr.rhOiList[oil].oilOi;\r\n qualToOiList[q].qoiList[i * 2 + 1] = (short) oil;\r\n i++;\r\n }\r\n }\r\n }\r\n }\r\n qualToOiList[q].qoiActionCount = -1;\r\n }\r\n }\r\n\r\n // Poke les offsets des oi dans le programme, prepare les parametres / cree les tables de limitations\r\n // Marque les evenements a traiter dans la boucle\r\n // --------------------------------------------------------------------------------------------------\r\n\r\n // 100 actions STOP par objet... \t// YVES: nOi -> nOi+1 pour eviter erreurs si pas d'objet actif\r\n colBuffer = new short[oiMax * 100 * 2 + 1];\r\n int colList = 0;\r\n\r\n // Boucle d'exploration du programme\r\n int evg, evt, evp;\r\n for (evg = 0; evg < events.length; evg++)\r\n {\r\n evgPtr = events[evg];\r\n\r\n // Initialisation des parametres / pointeurs sur oilists/qoioilist\r\n // -------------------------------------------------------------\r\n for (evt = 0; evt < evgPtr.evgNAct + evgPtr.evgNCond; evt++)\r\n {\r\n evtPtr = evgPtr.evgEvents[evt];\r\n\r\n // Pas de flag BAD\r\n evtPtr.evtFlags &= ~CEvent.EVFLAGS_BADOBJECT;\r\n\r\n // Si evenement pour un objet reel, met l'adresse de l'curFrame.m_oiList\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n if (EVTTYPE(evtPtr.evtCode) >= 0)\r\n {\r\n evtPtr.evtOiList = get_OiListOffset(evtPtr.evtOi, EVTTYPE(evtPtr.evtCode));\r\n }\r\n\r\n // Exploration des parametres\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n if (evtPtr.evtNParams > 0)\r\n {\r\n for (evp = 0; evp < evtPtr.evtNParams; evp++)\r\n {\r\n evpPtr = evtPtr.evtParams[evp];\r\n switch (evpPtr.code)\r\n {\r\n // Met un parametre buffer 4 a zero\r\n case 25: // PARAM_BUFFER4:\r\n ((PARAM_INT) evpPtr).value = 0;\r\n break;\r\n\r\n // Trouve le levobj de creation\r\n case 21: // PARAM_SYSCREATE:\r\n if ((evtPtr.evtOi & COI.OIFLAG_QUALIFIER) == 0)\r\n {\r\n CLO loPtr;\r\n for (loPtr = rhPtr.rhFrame.LOList.first_LevObj(); loPtr != null; loPtr = rhPtr.rhFrame.LOList.next_LevObj())\r\n {\r\n if (evtPtr.evtOi == loPtr.loOiHandle)\r\n {\r\n ((CCreate) evpPtr).cdpHFII = loPtr.loHandle;\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n ((CCreate) evpPtr).cdpHFII = -1;\r\n }\r\n // Met l'adresse du levObj pour create object\r\n case 9: // PARAM_CREATE:\r\n case 18: // PARAM_SHOOT:\r\n case 16: // PARAM_POSITION:\r\n oi = ((CPosition) evpPtr).posOINUMParent;\r\n if (oi != -1)\r\n {\r\n ((CPosition) evpPtr).posOiList = get_OiListOffset(oi, ((CPosition) evpPtr).posTypeParent);\r\n }\r\n break;\r\n\r\n // Poke l'adresse de l'objet dans l'curFrame.m_oiList\r\n case 1: // PARAM_OBJECT:\r\n ((PARAM_OBJECT) evpPtr).oiList = get_OiListOffset(((PARAM_OBJECT) evpPtr).oi, ((PARAM_OBJECT) evpPtr).type);\r\n break;\r\n\r\n // Expression : poke l'adresse de l'curFrame.m_oiList dans les parametres objets\r\n case 15: // PARAM_SPEED:\r\n case 27: // PARAM_SAMLOOP:\r\n case 28: // PARAM_MUSLOOP:\r\n case 45: // PARAM_EXPSTRING:\r\n case 46: // PARAM_CMPSTRING:\r\n case 22: // PARAM_EXPRESSION:\r\n case 23: // PARAM_COMPARAISON:\r\n case 52: // PARAM_VARGLOBAL_EXP:\r\n case 59: // PARAM_STRINGGLOBAL_EXP:\r\n case 53: // PARAM_ALTVALUE_EXP:\r\n case 54: // PARAM_FLAG_EXP:\r\n CParamExpression expPtr = (CParamExpression) evpPtr;\r\n for (n = 0; n < expPtr.tokens.length; n++)\r\n {\r\n // Un objet avec OI?\r\n if (EVTTYPE(expPtr.tokens[n].code) > 0)\r\n {\r\n CExpOi expOi = (CExpOi) expPtr.tokens[n];\r\n expOi.oiList = get_OiListOffset(expOi.oi, EVTTYPE(expOi.code));\r\n }\r\n }\r\n ;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Flags par defaut / Listes de limitation\r\n // ---------------------------------------\r\n evgF = 0;\r\n evgM = CEventGroup.EVGFLAGS_ONCE | CEventGroup.EVGFLAGS_LIMITED | CEventGroup.EVGFLAGS_STOPINGROUP;\r\n for (evt = 0; evt < evgPtr.evgNCond + evgPtr.evgNAct; evt++)\r\n {\r\n evtPtr = evgPtr.evgEvents[evt];\r\n\r\n type = EVTTYPE(evtPtr.evtCode);\r\n code = evtPtr.evtCode;\r\n n = 0;\r\n d1 = 0;\r\n d2 = 0;\r\n evpPtr = null;\r\n if (type >= COI.OBJ_SPR)\r\n {\r\n switch (getEventCode(code))\r\n {\r\n case (4 << 16): // ACTL_EXTSTOP:\r\n case (9 << 16): // ACTL_EXTBOUNCE:\r\n\r\n evgF |= CEventGroup.EVGFLAGS_STOPINGROUP;\r\n\r\n // Recherche dans le groupe, la cause du STOP-> limitList\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n oi = evtPtr.evtOi;\r\n if ((oi & COI.OIFLAG_QUALIFIER) != 0)\r\n {\r\n for (o = qual_GetFirstOiList2(evtPtr.evtOiList); o != -1; o = qual_GetNextOiList2())\r\n {\r\n colList = make_ColList1(evgPtr, colList, rhPtr.rhOiList[o].oilOi);\r\n }\r\n }\r\n else\r\n {\r\n colList = make_ColList1(evgPtr, colList, oi);\r\n }\r\n break;\r\n case (25 << 16): // ACTL_EXTSHUFFLE:\r\n evgF |= CEventGroup.EVGFLAGS_SHUFFLE;\r\n break;\r\n case (-14 << 16): // CNDL_EXTCOLLISION:\r\n case (-4 << 16): // CNDL_EXTISCOLLIDING:\r\n // L'objet 1 est-il un sprite?\r\n short type1 = EVTTYPE(evtPtr.evtCode);\r\n if (isTypeRealSprite(type1))\r\n {\r\n d2 = CObjInfo.OILIMITFLAGS_QUICKCOL;\r\n }\r\n else\r\n {\r\n d2 = CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKEXT;\r\n }\r\n\r\n // L'objet 2 est-il un sprite?\r\n evpPtr = evtPtr.evtParams[0];\r\n short type2 = ((PARAM_OBJECT) evtPtr.evtParams[0]).type;\r\n if (isTypeRealSprite(type2))\r\n {\r\n d1 = CObjInfo.OILIMITFLAGS_QUICKCOL;\r\n }\r\n else\r\n {\r\n d1 = CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKEXT;\r\n }\r\n n = 3;\r\n break;\r\n case (-11 << 16): // CNDL_EXTINPLAYFIELD:\r\n case (-12 << 16): // CNDL_EXTOUTPLAYFIELD:\r\n d1 = CObjInfo.OILIMITFLAGS_QUICKBORDER;\r\n n = 1;\r\n break;\r\n case (-13 << 16): // CNDL_EXTCOLBACK:\r\n d1 = CObjInfo.OILIMITFLAGS_QUICKBACK;\r\n n = 1;\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n switch (code)\r\n {\r\n case ((-6 << 16) | 65535): // CNDL_ONCE\r\n evgM &= ~CEventGroup.EVGFLAGS_ONCE;\r\n break;\r\n case ((-7 << 16) | 65535): // CNDL_NOTALWAYS:\r\n evgM |= CEventGroup.EVGFLAGS_NOMORE;\r\n break;\r\n case ((-5 << 16) | 65535): // CNDL_REPEAT:\r\n evgM |= CEventGroup.EVGFLAGS_NOMORE;\r\n break;\r\n case ((-4 << 16) | 65535): // CNDL_NOMORE:\r\n evgM |= CEventGroup.EVGFLAGS_NOTALWAYS + CEventGroup.EVGFLAGS_REPEAT;\r\n break;\r\n case ((-4 << 16) | 0xFFFA): // CNDL_MONOBJECT:\r\n d2 = CObjInfo.OILIMITFLAGS_QUICKCOL;\r\n evpPtr = evtPtr.evtParams[0];\r\n n = 2;\r\n break;\r\n case ((-7 << 16) | 0xFFFA): // CNDL_MCLICKONOBJECT:\r\n d2 = CObjInfo.OILIMITFLAGS_QUICKCOL;\r\n evpPtr = evtPtr.evtParams[1];\r\n n = 2;\r\n break;\r\n }\r\n }\r\n // Poke les flags collision\r\n if ((n & 1) != 0)\r\n {\r\n for (o = qual_GetFirstOiList(evtPtr.evtOiList); o != -1; o = qual_GetNextOiList())\r\n {\r\n rhPtr.rhOiList[o].oilLimitFlags |= d1;\r\n }\r\n }\r\n if ((n & 2) != 0)\r\n {\r\n for (o = qual_GetFirstOiList(((PARAM_OBJECT) evpPtr).oiList); o != -1; o = qual_GetNextOiList())\r\n {\r\n rhPtr.rhOiList[o].oilLimitFlags |= d2;\r\n }\r\n }\r\n }\r\n // Inhibe les anciens flags\r\n evgPtr.evgFlags &= ~evgM;\r\n evgPtr.evgFlags |= evgF;\r\n }\r\n colBuffer[colList] = -1;\r\n\r\n // Reserve le buffer des pointeurs sur listes d'events\r\n // ---------------------------------------------------\r\n int aListPointers[] = new int[COI.NUMBEROF_SYSTEMTYPES + oiMax + 1];\r\n\r\n // Rempli cette table avec les offsets en fonction des types\r\n ss = 0;\r\n int alp;\r\n for (alp = 0 , type = -COI.NUMBEROF_SYSTEMTYPES; type<0; type++, alp++)\r\n {\r\n aListPointers[alp] = ss;\r\n ss += nConditions[COI.NUMBEROF_SYSTEMTYPES + type];\r\n }\r\n // Continue avec les OI, la taille juste pour le type de l'oi\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++, alp++)\r\n {\r\n aListPointers[alp] = ss;\r\n if (rhPtr.rhOiList[oil].oilType < COI.KPX_BASE)\r\n {\r\n ss += nConditions[COI.NUMBEROF_SYSTEMTYPES + rhPtr.rhOiList[oil].oilType] + EVENTS_EXTBASE + 1;\r\n }\r\n else\r\n {\r\n ss += rhPtr.rhApp.extLoader.getNumberOfConditions(rhPtr.rhOiList[oil].oilType) + EVENTS_EXTBASE + 1;\r\n }\r\n }\r\n\r\n // Reserve le buffer des pointeurs\r\n int sListPointers = ss;\r\n listPointers = new int[sListPointers];\r\n for (n = 0; n < sListPointers; n++)\r\n {\r\n listPointers[n] = 0;\r\n }\r\n evtAlways = 0;\r\n\r\n // Explore le programme et repere les evenements\r\n short wBufNear[] = new short[rhPtr.rhFrame.maxObjects];\r\n int wPtrNear;\r\n for (evg = 0; evg < nEvents; evg++)\r\n {\r\n evgPtr = events[evg];\r\n evgPtr.evgFlags &= ~CEventGroup.EVGFLAGS_ORINGROUP;\r\n bOrBefore = true;\r\n cndOR = 0;\r\n for (evt = 0; evt < evgPtr.evgNCond; evt++)\r\n {\r\n evtPtr = evgPtr.evgEvents[evt];\r\n type = EVTTYPE(evtPtr.evtCode);\r\n code = evtPtr.evtCode;\r\n num = -EVTNUM(code);\r\n\r\n if (bOrBefore)\r\n {\r\n // Dans la liste des evenements ALWAYS\r\n if ((evtPtr.evtFlags & CEvent.EVFLAGS_ALWAYS) != 0)\r\n {\r\n evtAlways++;\r\n }\r\n\r\n // Dans la liste des evenements generaux si objet systeme\r\n if (type < 0)\r\n {\r\n listPointers[aListPointers[7 + type] + num]++;\r\n }\r\n else\r\n // Un objet normal / qualifier : relie aux objets\r\n {\r\n wPtrNear = 0;\r\n for (o = qual_GetFirstOiList(evtPtr.evtOiList); o != -1; o = qual_GetNextOiList())\r\n {\r\n listPointers[aListPointers[COI.NUMBEROF_SYSTEMTYPES + o] + num]++;\r\n wBufNear[wPtrNear++] = o;\r\n }\r\n wBufNear[wPtrNear] = -1;\r\n // Cas special pour les collisions de sprites : branche aux deux sprites (sauf si meme!)\r\n if (getEventCode(code) == (-14 << 16)) // CNDL_EXTCOLLISION\r\n {\r\n evpPtr = evtPtr.evtParams[0];\r\n for (oo = qual_GetFirstOiList(((PARAM_OBJECT) evpPtr).oiList); oo != -1; oo = qual_GetNextOiList())\r\n {\r\n for (wPtrNear = 0; wBufNear[wPtrNear] != oo && wBufNear[wPtrNear] != -1; wPtrNear++);\r\n if (wBufNear[wPtrNear] == -1)\r\n {\r\n listPointers[aListPointers[COI.NUMBEROF_SYSTEMTYPES + oo] + num]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n bOrBefore = false;\r\n if (evtPtr.evtCode == ((-24 << 16) | 65535) || evtPtr.evtCode == ((-25 << 16) | 65535)) // CNDL_OR - CNDL_ORLOGICAL\r\n {\r\n bOrBefore = true;\r\n evgPtr.evgFlags |= CEventGroup.EVGFLAGS_ORINGROUP;\r\n // Un seul type de OR dans un groupe\r\n if (cndOR == 0)\r\n {\r\n cndOR = evtPtr.evtCode;\r\n }\r\n else\r\n {\r\n evtPtr.evtCode = cndOR;\r\n }\r\n // Marque les OR Logical\r\n if (cndOR == ((-25 << 16) | 65535)) // CNDL_ORLOGICAL)\r\n {\r\n evgPtr.evgFlags |= CEventGroup.EVGFLAGS_ORLOGICAL;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Calcule les tailles necessaires, poke les pointeurs dans les listes\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n int sEventPointers = evtAlways + 1;\r\n int uil;\r\n for (uil = 0; uil < sListPointers; uil++)\r\n {\r\n if (listPointers[uil] != 0)\r\n {\r\n ss = listPointers[uil];\r\n listPointers[uil] = sEventPointers;\r\n sEventPointers += ss + 1;\r\n }\r\n }\r\n eventPointersGroup = new CEventGroup[sEventPointers];\r\n eventPointersCnd = new byte[sEventPointers];\r\n for (n = 0; n < sEventPointers; n++)\r\n {\r\n eventPointersGroup[n] = null;\r\n eventPointersCnd[n] = 0;\r\n }\r\n\r\n int lposBuffer[] = new int[sListPointers];\r\n for (n = 0; n < sListPointers; n++)\r\n {\r\n lposBuffer[n] = listPointers[n];\r\n }\r\n\r\n evtAlwaysPos = 0;\r\n evtAlways = 0;\r\n int lposPtr;\r\n for (evg = 0; evg < nEvents; evg++)\r\n {\r\n evgPtr = events[evg];\r\n bOrBefore = true;\r\n for (evt = 0; evt < evgPtr.evgNCond; evt++)\r\n {\r\n evtPtr = evgPtr.evgEvents[evt];\r\n type = EVTTYPE(evtPtr.evtCode);\r\n code = evtPtr.evtCode;\r\n num = -EVTNUM(code);\r\n\r\n if (bOrBefore)\r\n {\r\n // Dans la liste des evenements ALWAYS\r\n if ((evtPtr.evtFlags & CEvent.EVFLAGS_ALWAYS) != 0)\r\n {\r\n evtAlways++;\r\n eventPointersGroup[evtAlwaysPos] = evgPtr;\r\n eventPointersCnd[evtAlwaysPos] = (byte) evt;\r\n evtAlwaysPos++;\r\n }\r\n\r\n // Dans la liste des evenements generaux si objet systeme\r\n if (type < 0)\r\n {\r\n lposPtr = aListPointers[COI.NUMBEROF_SYSTEMTYPES + type] + num;\r\n eventPointersGroup[lposBuffer[lposPtr]] = evgPtr;\r\n eventPointersCnd[lposBuffer[lposPtr]] = (byte) evt;\r\n lposBuffer[lposPtr]++;\r\n }\r\n else\r\n // Un objet normal : relie a l'objet\r\n {\r\n wPtrNear = 0;\r\n for (o = qual_GetFirstOiList(evtPtr.evtOiList); o != -1; o = qual_GetNextOiList())\r\n {\r\n lposPtr = aListPointers[COI.NUMBEROF_SYSTEMTYPES + o] + num;\r\n eventPointersGroup[lposBuffer[lposPtr]] = evgPtr;\r\n eventPointersCnd[lposBuffer[lposPtr]] = (byte) evt;\r\n lposBuffer[lposPtr]++;\r\n wBufNear[wPtrNear++] = o;\r\n }\r\n wBufNear[wPtrNear] = -1;\r\n // Cas special pour les collisions de sprites : branche aux deux sprites (sauf si meme!)\r\n if (getEventCode(code) == (-14 << 16)) // CNDL_EXTCOLLISION\r\n {\r\n evpPtr = evtPtr.evtParams[0];\r\n for (oo = qual_GetFirstOiList(((PARAM_OBJECT) evpPtr).oiList); oo != -1; oo = qual_GetNextOiList())\r\n {\r\n for (wPtrNear = 0; wBufNear[wPtrNear] != oo && wBufNear[wPtrNear] != -1; wPtrNear++);\r\n if (wBufNear[wPtrNear] == -1)\r\n {\r\n lposPtr = aListPointers[COI.NUMBEROF_SYSTEMTYPES + oo] + num;\r\n eventPointersGroup[lposBuffer[lposPtr]] = evgPtr;\r\n eventPointersCnd[lposBuffer[lposPtr]] = (byte) evt;\r\n lposBuffer[lposPtr]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n bOrBefore = false;\r\n if (evtPtr.evtCode == ((-24 << 16) | 65535) || evtPtr.evtCode == ((-25 << 16) | 65535)) // CNDL_OR - CNDL_ORLOGICAL\r\n {\r\n bOrBefore = true;\r\n }\r\n }\r\n }\r\n ;\r\n\r\n // Adresse des conditions timer\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n uil = aListPointers[COI.NUMBEROF_SYSTEMTYPES + COI.OBJ_TIMER];\r\n aTimers = listPointers[uil - EVTNUM(((-3 << 16) | 0xFFFC))]; // CNDL_TIMER\r\n\r\n // Poke les adresses et les autres flags des pointeurs dans tous OI\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n limitBuffer = new short[oiMax + 1 + colList / 2];\r\n int limitListStart = 0;\r\n int limitPos, limitCur;\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n\r\n // Poke l'offset dans les events\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n uil = aListPointers[COI.NUMBEROF_SYSTEMTYPES + oil];\r\n oilPtr.oilEvents = uil;\r\n\r\n // Traitement des flags particuliers\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n int act;\r\n if ((oilPtr.oilOEFlags & CObjectCommon.OEFLAG_MOVEMENTS) != 0)\r\n {\r\n // Recherche les flags WRAP dans les messages OUT OF PLAYFIELD\r\n fWrap = 0;\r\n ss = listPointers[uil - EVTNUM(-12 << 16)]; // CNDL_EXTOUTPLAYFIELD\r\n if (ss != 0)\r\n {\r\n while (eventPointersGroup[ss] != null)\r\n {\r\n evgPtr = eventPointersGroup[ss];\r\n evtPtr = evgPtr.evgEvents[eventPointersCnd[ss]];\r\n d = ((PARAM_SHORT) evtPtr.evtParams[0]).value;\t// Prend la direction\r\n for (act = evg_FindAction(evgPtr, 0) , n=evgPtr.evgNAct; n>0; n--, act++)\r\n {\r\n evtPtr = evgPtr.evgEvents[act];\r\n if (evtPtr.evtCode == ((8 << 16) | (((int) oilPtr.oilType) & 0xFFFF))) // ACT_EXTWRAP\r\n {\r\n fWrap |= d;\r\n }\r\n }\r\n ss++;\r\n }\r\n }\r\n oilPtr.oilWrap = (byte) fWrap;\r\n\r\n // Fabrique la table de limitations des mouvements\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n oi1 = oilPtr.oilOi;\r\n for (colList = 0 , limitPos=0; colBuffer[colList] != -1; colList += 2)\r\n {\r\n if (colBuffer[colList] == oi1)\r\n {\r\n oi2 = colBuffer[colList + 1];\r\n if ((oi2 & 0x8000) != 0)\r\n {\r\n oilPtr.oilLimitFlags |= oi2;\r\n continue;\r\n }\r\n for (limitCur = 0; limitCur < limitPos && limitBuffer[limitListStart + limitCur] != oi2; limitCur++);\r\n if (limitCur == limitPos)\r\n {\r\n limitBuffer[limitListStart + limitPos++] = oi2;\r\n }\r\n }\r\n }\r\n // Marque la fin...\r\n if (limitPos > 0)\r\n {\r\n oilPtr.oilLimitList = limitListStart;\r\n limitBuffer[limitListStart + limitPos++] = -1;\r\n limitListStart += limitPos;\r\n }\r\n }\r\n }\r\n\r\n // Met les adresses des tables de pointeur systeme\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n rhEvents[0] = 0;\r\n for (n = 1; n <= COI.NUMBEROF_SYSTEMTYPES; n++)\r\n {\r\n rhEvents[n] = aListPointers[COI.NUMBEROF_SYSTEMTYPES - n];\r\n }\r\n\r\n // Poke les adresses et les autres flags des pointeurs dans tous les objets definis\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n\r\n // Explore tous les objets de meme OI dans le programme\r\n o = oilPtr.oilObject;\r\n if ((o & 0x8000) == 0)\r\n {\r\n do\r\n {\r\n // Met les oi dans les ro\r\n hoPtr = rhPtr.rhObjectList[o];\r\n hoPtr.hoEvents = oilPtr.oilEvents;\r\n hoPtr.hoOiList = oilPtr;\r\n hoPtr.hoLimitFlags = oilPtr.oilLimitFlags;\r\n // Flags Wrap pour les objets avec movement\r\n if ((hoPtr.hoOEFlags & CObjectCommon.OEFLAG_MOVEMENTS) != 0)\r\n {\r\n hoPtr.rom.rmWrapping = oilPtr.oilWrap;\r\n }\r\n // Si le sprite n'est pas implique dans les collisions -> le passe en neutre\r\n if ((hoPtr.hoOEFlags & CObjectCommon.OEFLAG_SPRITES) != 0 && (hoPtr.hoLimitFlags & CObjInfo.OILIMITFLAGS_QUICKCOL) == 0)\r\n {\r\n if (hoPtr.roc.rcSprite != null)\r\n {\r\n hoPtr.roc.rcSprite.setSpriteColFlag(0);\r\n }\r\n }\r\n // Sprite en mode inbitate?\r\n if ((hoPtr.hoOEFlags & CObjectCommon.OEFLAG_MANUALSLEEP) == 0)\r\n {\r\n // On detruit... sauf si...\r\n hoPtr.hoOEFlags &= ~CObjectCommon.OEFLAG_NEVERSLEEP;\r\n\r\n // On teste des collisions avec le decor?\r\n if ((hoPtr.hoLimitFlags & CObjInfo.OILIMITFLAGS_QUICKBACK) != 0)\r\n {\r\n // Si masque des collisions general\r\n if ((rhPtr.rhFrame.leFlags & CRunFrame.LEF_TOTALCOLMASK) != 0)\r\n {\r\n hoPtr.hoOEFlags |= CObjectCommon.OEFLAG_NEVERSLEEP;\r\n }\r\n }\r\n // Ou test des collisions normal\r\n if ((hoPtr.hoLimitFlags & (CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKBORDER)) != 0)\r\n {\r\n hoPtr.hoOEFlags |= CObjectCommon.OEFLAG_NEVERSLEEP;\r\n }\r\n }\r\n o = hoPtr.hoNumNext;\r\n } while ((o & 0x8000) == 0);\r\n }\r\n }\r\n // Les messages speciaux\r\n // ~~~~~~~~~~~~~~~~~~~~~\r\n if (evtAlways != 0)\r\n {\r\n rhEventAlways = true;\r\n }\r\n else\r\n {\r\n rhEventAlways = false;\r\n }\r\n // Messages Timer (a bulle!)\r\n if (aTimers != 0)\r\n {\r\n rh4TimerEventsBase = aTimers;\r\n }\r\n else\r\n {\r\n rh4TimerEventsBase = 0;\r\n }\r\n\r\n // Liberation\r\n colBuffer = null;\r\n bReady = true;\r\n }", "public static void loadProgram() throws Exception{\n\t\t\n\t\tInteger instructionNumber = 0; \n\t\t\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(new File(ramProgram));\n\t\t\twhile (scanner.hasNext()){\n\t\t\t\tString next = scanner.nextLine();\n\t\t\t\tnext = next.trim();\n\t\t\t\tString [] array = next.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t\tif (next.startsWith(\"#\") || next.isEmpty()){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (array[0].endsWith(\":\")){\n\t\t\t\t\t\ttagList.add(new Tag(array[0], instructionNumber));\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (array.length){\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la etiqueta:\" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[1], \"\", getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[1], array[2], getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la instrucción: \" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (array.length){\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[0], \"\", getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[0], array[1], getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la instrucción: \" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tinstructionNumber++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tscanner.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tLineOfCode[] inputProgram = new LineOfCode[32];\n\t\t// Initialize an array of type LineOfMachineCode\n\t\tLineOfMachineCode[] instructions = new LineOfMachineCode[32];\n\t\tString[] opcodes = {\"LDA\", \"ADD\", \"SUB\", \"STA\", \"MPY\", \"DIV\", \n\t\t\t\t\"INP\", \"OUT\", \"JMP\", \"JMI\" }; \n\t\tString[] tokens = new String[80];\n\t\tString line = \"\";\n\t\t\n\t\t// prepare to read program from file\n\t\tFile filename = new File(\"MysteryProgram_0.txt\");\n\t\tScanner filescan = new Scanner(filename);\n\t\tScanner input = new Scanner(System.in);\n\t\tint numOfLines = 0; \n\t\t\n\t\t// Read the file containing the program one line at a time.\n\t\t// instantiate a LineOfCode Object for each line read in\n\t\t// and assign line tokens to the fields of the new object.\n\t\twhile(filescan.hasNext()){\n\t\t\tline = filescan.nextLine();\n\t\t\tString comments = \" \";\n\t\t\t// instantiate a LineOfCode object with empty fields\n\t\t\tinputProgram[numOfLines] = new LineOfCode();\n\t\t\t\n\t\t\tif(!line.isEmpty()){\n\t\t\ttokens = line.split(\"\\\\s+\");\n\t\t\t\n\t\t\t// if comments exits, create a comments string to holed them\n\t\t\t// and assign the comments to the appropriate instance variable\n\t\t\t\tif(tokens.length > 3 ){\n\t\t\t\t\tfor(int i = 3; i < tokens.length; i++ )\t\t\t\t\t\t\n\t\t\t\t\tcomments += tokens[i] + \" \";\t\n\t\t\t\t}else{\n\t\t\t\t\tcomments = \" \"; \n\t\t\t\t}\n\t\t\tinputProgram[numOfLines].setComments(comments);\n\t\t\t\n\t\t\t// check each token from the line and assign it to \n\t\t\t// its appropriate instance variable\n\t\t\tif(tokens[1].equals(\"DC\")){\n\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[1]);\n\t\t\t\tinputProgram[numOfLines].setLabel(tokens[0]);\n\t\t\t\tinputProgram[numOfLines].setOperand(tokens[2]);\n\t\t\t}else if(tokens[1].equals(\"DL\")){\n\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[1]);\n\t\t\t\tinputProgram[numOfLines].setLabel(tokens[0]);\n\t\t\t}else{// Big Else\t\t\t\n\t\t\t\t\n\t\t\t\t\tfor(int x = 0;x < opcodes.length; x++){\n\t\t\t\t\t\tif(opcodes[x].equals(tokens[0])){\n\t\t\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[0]);\n\t\t\t\t\t\tinputProgram[numOfLines].setOperand(tokens[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(opcodes[x].equals(tokens[1])){\n\t\t\t\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[1]);\n\t\t\t\t\t\t\tinputProgram[numOfLines].setLabel(tokens[0]);\n\t\t\t\t\t\t\tinputProgram[numOfLines].setOperand(tokens[2]);\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t} //for loop\n\t\t\t\n\t\t\t} //Big Else\n\t\t\t\t\n\t\t\t\n\t\t\t\tnumOfLines++;\n\t\t\t} \t//Super If\t\n\t\t\t\n\t\t} // while, \n\t\t\n\t\t\n\t\t// finished reading the file\n\t\tfilescan.close();\n\t\t\n\t\t// Assemble machine code out of each LineOfCode object \n\t\t// from the inputProgram array. \n\t\tfor(int i = 0; i < numOfLines; i++){\n\t\t\tinstructions[i] = new LineOfMachineCode();\n\t\t\t// handle pseudo-opcodes if they are present in the line\n\t\t\tif(inputProgram[i].getOpcode().equals(\"DL\"))\n\t\t\t\tinstructions[i].setOperand(0);\n\t\t\telse if(inputProgram[i].getOpcode().equals(\"DC\"))\n\t\t\t\t\tinstructions[i].setOperand(Integer.parseInt(inputProgram[i].getOperand()));\n\t\t\telse{\n\t\t\t\t// helper variables \n\t\t\t\tint opc = 0;\n\t\t\t\tint op = 0;\n\t\t\t\tfor(int j = 0; j < opcodes.length;j++){\n\t\t\t\t\tif(inputProgram[i].getOpcode().equals(opcodes[j])){\n\t\t\t\t\t\t// assign opcode in program to correct index of opcode array\n\t\t\t\t\t\topc = j; \n\t\t\t\t\t\tinstructions[i].setOpcode(opc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < numOfLines; k++){\n\t\t\t\t\tif(inputProgram[k].getLabel().equals(inputProgram[i].getOperand()))\n\t\t\t\t\t{\n\t\t\t\t\t\t// assign memory location of label to operand\n\t\t\t\t\t\top = k; \n\t\t\t\t\t\tinstructions[i].setOperand(op);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if opcode == 0 which is LDA how to handle it\n\t\t\t\t// handle operand greater than 9 ex. 12\n\t\t\t\tif(opc == 0 && op > 9)\n\t\t\t\t\t//System.out.print(opc + \"\" + op );\n\t\t\t\t\tinstructions[i].setOpcode(opc);\n\t\t\t\t\n\t\t\t\t//else if(opc == 0 && op < 10)\n\t\t\t\t\t//System.out.print(opc + \"0\" + op + \"\\n\");\n\t\t\telse{\t\n\t\t\t\t//System.out.print( (opc * 100 + op) + \"\\n\");\n\t\t\t\tinstructions[i].setOpcode(opc);\n\t\t\t\tinstructions[i].setOperand(op);\n\t\t\t\t}\n\t\t\t} // Big else\n\t\t\t\n\t\t\t\n\t\t\t// At this point we have everything converted to machine code\n\t\t\t// Option I - have another for loop start here to begin execution of lineOfMachineCode\n\t\t}// outer for \n\t\t\n\t\t// Vars used during execution Execute the program\n\t\tint pc = 0; \t\t\t\t\n\t\tint store = 0; \n\t\tint opcode = 0;\t\t \n\t\tint value = 0; \n\t\tint accumulator = 0; \t\t\t\n\t\t// Program execution\n\t\twhile( pc < numOfLines){\n\n\t\t\t\topcode = instructions[pc].getOpcode();\n\t\t\t\n\t\t\t\tif(opcode == 8){\n\t\t\t\tpc = instructions[pc].getOperand();\n\t\t\t\topcode = instructions[pc].getOpcode();\n\t\t\t\t}else if(opcode == 9 && accumulator < 0 ){\n\t\t\t\t\tpc = instructions[pc].getOperand();\n\t\t\t\t\topcode = instructions[pc].getOpcode();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\tswitch(opcode){\n\t\t\tcase 0: // LDA \n\t\t\t\tif(inputProgram[pc].getOpcode().equals(\"DC\"))\n\t\t\t\taccumulator = instructions[pc].getOperand();\n\t\t\t\telse if(inputProgram[pc].getOpcode().equals(\"DL\"))\n\t\t\t\t\taccumulator = instructions[pc].getOperand();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: //ADD\n\t\t\t\t\taccumulator += value;\n\t\t\t\tbreak;\n\t\t\tcase 2: //SUB\n\t\t\t\t\taccumulator -= value;\n\t\t\t\tbreak;\n\t\t\tcase 3: // STA\n\t\t\t\tstore = accumulator; \n\t\t\t\tbreak;\n\t\t\tcase 4: // MPY\n\t\t\t\t\taccumulator *= value;\n\t\t\t\tbreak;\n\t\t\tcase 5: // DIV\n\t\t\t\t\taccumulator /= value;\n\t\t\t\tbreak;\n\t\t\tcase 6: //INP\n\t\t\t\tSystem.out.println(\"Enter an Integer\");\n\t\t\t\tvalue = input.nextInt();\n\t\t\t\tbreak;\n\t\t\tcase 7: // OUT\n\t\t\t\tSystem.out.println(store);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Invalid opcode\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tpc++;\n\t\t}// while\n\t\tSystem.out.println(\"Total Lines: \" + numOfLines);\n\t}", "public void generate(){\n\t// Write constants/static vars section\n\twriteln(\".data\");\n\tfor ( String global : globalVars ) {\n\t // Initialized to zero. Why not?\n\t writeln(global+\":\\t.word 0\");\n\t}\n\twriteln(\"nl:\\t.asciiz \\\"\\\\n\\\"\");\n writeln(\"\\t.align\\t4\");\n\n\t// Write the prefix\n\twriteln(\".text\");\n\twriteln(\"entry:\");\n writeln(\"\\tjal main\");\n writeln(\"\\tli $v0, 10\");\n writeln(\"\\tsyscall\");\n\twriteln(\"printint:\");\n writeln(\"\\tli $v0, 1\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tla $a0, nl\");\n writeln(\"\\tli $v0, 4\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tjr $ra\");\n\n\tString defun = \"\";\t// Holds the place of the current function\n\tint spDisplacement=0;\t// Stores any displacement we do with $sp\n\n\tfor ( int i=0; i<codeTable.size(); i++ ) {\n\t CodeEntry line = codeTable.get(i);\n\n\t if ( line instanceof Label ) {\n\t\tLabel label = (Label)line;\n\t\twriteln( line.toString() );\n\t\tif ( label.isFunction() )\n\t\t makeFrame( defun = label.name() );\n\t }\n\t else if ( line instanceof Tuple ) {\n\t\tTuple tuple = (Tuple)line;\n\t\t// \n\t\t// Pushing arguments onto the stack (op = \"pusharg\"|\"pushaddr\")\n\t\t// \n\t\tif ( tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") ) {\n\t\t ArrayList<Tuple> argLines = new ArrayList<Tuple>();\n\t\t ArrayList<String> lvOrAddr = new ArrayList<String>();\n\t\t while ( (tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") )\n\t\t\t && i < codeTable.size() ) {\n\t\t\targLines.add( tuple );\n\t\t\tlvOrAddr.add( tuple.op );\n\t\t\tline = codeTable.get( ++i );\n\t\t\tif ( line instanceof Tuple )\n\t\t\t tuple = (Tuple)line;\n\t\t }\n\t\t // Move the stack pointer to accomodate args\n\t\t writeInst(\"subi\t$sp, $sp, \"+(4*argLines.size()));\n\t\t spDisplacement = 4;\n\t\t for ( int j=0; j < argLines.size(); j++ ) {\n\t\t\tTuple argLine = argLines.get(j);\n\t\t\tString theOp = lvOrAddr.get(j);\n\t\t\t// Pass a copy of the argument\n\t\t\tif ( theOp.equals(\"pusharg\") ) {\n\t\t\t if ( isNumber(argLine.place) )\n\t\t\t\twriteInst(\"li\t$t0, \"+argLine.place);\n\t\t\t else\n\t\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, argLine.place ));\n\t\t\t}\n\t\t\t// Pass-by-reference\n\t\t\telse {\n\t\t\t writeInst(\"la\t$t0, \"+printOffset( defun, argLine.place));\n\t\t\t}\n\t\t\twriteInst(\"sw\t$t0, \"+spDisplacement+\"($sp)\");\n\t\t\tspDisplacement+=4;\n\t\t }\n\t\t spDisplacement-=4;\n\n\t\t // Reset counter, put back instruction we didn't use.\n\t\t i--;\n\t\t continue;\n\t\t}\n\t\t// \n\t\t// Calling a function\n\t\t// \n\t\telse if ( tuple.op.equals(\"jal\") ) {\n\t\t writeInst(\"jal\t\"+tuple.arg1);\n\t\t if ( ! tuple.place.equals(\"\") )\n\t\t\twriteInst(\"sw\t$v0, \"+printOffset( defun, tuple.place ));\n\t\t // Move back the $sp from all the \"pushargs\" we probably did\n\t\t if ( spDisplacement > 0 )\n\t\t\twriteInst(\"addi\t$sp, $sp, \"+spDisplacement);\n\t\t}\n\t\t//\n\t\t// Returning from a function (\"return\")\n\t\t//\n\t\telse if ( tuple.op.equals(\"return\") ) {\n\t\t if ( ! tuple.place.equals(\"\") ) {\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t\twriteInst(\"move\t$v0, $t0\");\n\t\t }\n\t\t writeInst(\"move\t$sp, $fp\");\n\t\t writeInst(\"lw\t$ra, -4($sp)\");\n\t\t writeInst(\"lw\t$fp, 0($fp)\");\n\t\t writeInst(\"jr\t$ra\");\n\t\t \n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring two registers for operands\n\t\t//\n\t\telse if ( tuple.op.equals(\"sub\") ||\n\t\t\t tuple.op.equals(\"mul\") ||\n\t\t\t tuple.op.equals(\"div\") ||\n\t\t\t tuple.op.equals(\"rem\") ) {\n\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t if ( tuple.op.equals(\"sub\") && isNumber(tuple.arg2) ) {\n\t\t\twriteInst(\"subi\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t2, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t// \n\t\t// Arithmetic operations that have a separate 'immediate' function,\n\t\t// and where we can reduce # of instructions\n\t\t//\n\t\telse if ( tuple.op.equals(\"add\") ||\n\t\t\t tuple.op.equals(\"and\") ||\n\t\t\t tuple.op.equals(\"or\") ) {\n\t\t if ( isNumber(tuple.arg2) ) {\n\t\t\tif ( isNumber(tuple.arg1) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg1);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else if ( isNumber(tuple.arg1) ) {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg1);\n\t\t }\n\t\t else {\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring only one register for an operand\n\t\t// \n\t\telse if ( tuple.op.equals(\"not\") ||\n\t\t\t tuple.op.equals(\"neg\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Immediate arithmetic expressions\n\t\t//\n\t\telse if ( tuple.op.equals(\"addi\") ||\n\t\t\t tuple.op.equals(\"subi\") ) {\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Assignment and other stuff that does '='\n\t\t//\n\t\telse if ( tuple.op.equals(\"copy\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t0, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"lw\") ) {\n\t\t // Find the location of the base address, put it in t0\n\t\t // writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays that are passed by reference\n\t\t//\n\t\telse if ( tuple.op.equals(\"la\") ) {\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Writing to arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"putarray\") || tuple.op.equals(\"putarrayref\") ) {\n\t\t // tuple.place = thing to be stored\n\t\t // tuple.arg1 = base address\n\t\t // tuple.arg2 = offset\n\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( tuple.op.equals(\"putarray\") )\n\t\t\twriteInst(\"la\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t writeInst(\"sub\t$t1, $t1, $t2\");\n\t\t writeInst(\"sw\t$t0, 0($t1)\");\n\t\t}\n\t\t//\n\t\t// Writing to pointers\n\t\t//\n\t\telse if ( tuple.op.equals(\"putpointer\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Performing conditional branches\n\t\t// \n\t\telse if ( tuple.op.equals(\"ble\") ||\n\t\t\t tuple.op.equals(\"bge\") ||\n\t\t\t tuple.op.equals(\"beq\") ||\n\t\t\t tuple.op.equals(\"bne\") ||\n\t\t\t tuple.op.equals(\"bgt\") ||\n\t\t\t tuple.op.equals(\"blt\") ||\n\t\t\t tuple.op.equals(\"beq\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t}\n\t\t//\n\t\t// Unconditional branch\n\t\t//\n\t\telse if ( tuple.op.equals(\"b\") ) {\n\t\t writeInst(\"b\t\"+tuple.place);\n\t\t}\n\t\t//\n\t\t// Branch equal to zero\n\t\t//\n\t\telse if ( tuple.op.equals(\"beqz\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"beqz\t$t0, \"+tuple.arg1);\n\t\t}\n\t\t//\n\t\t// Dereferences\n\t\t//\n\t\telse if ( tuple.op.equals(\"deref\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Address-of (&)\n\t\t//\n\t\telse if ( tuple.op.equals(\"addrof\") ) {\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t }\n\t}\n\n }", "public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }", "private static void startWork()\n {{\n String ftnTxt= null;\n FileToFtnParser parser= new FileToFtnParser( arg_ir_filename );\n String hashes39= \"#######################################\";\n\n while( true ) {\n\t ftnTxt= parser.parseFtn();\n\t if ( ftnTxt == null ) { break; }\n\t if ( arg_verbosity > 1 ) {\n\t System.out.println ( hashes39+ hashes39 );\n\t System.out.println ( \"found function: <<EOF \" );\n\t System.out.println ( ftnTxt );\n\t System.out.println ( \"EOF\" );\n\t }\n\n\t FtnParts ftnParts= new FtnParts( ftnTxt );\n\n\t if ( arg_verbosity > 0 ) {\n System.out.println( \"---\" );\n\t System.out.println( \"function: \" );\n\t System.out.println( ftnParts.toString() );\n\t }\n\n\t TestGenerator generator= new TestGenerator( ftnParts, arg_numCalls );\n\t String outFilename= arg_outDirname+ File.separator+ \n\t ftnParts.getNameWithoutSigil()+ \".ll\";\n\t generator.generate( outFilename );\n }\n\n }}", "public static void program(CommonTree ast, IRTree irt)\n {\n statements(ast, irt);\n }", "public void exec(OxProgram pgm) {\n }", "public static void main(String[] args) {\n\t\t\n\t\tnew MyAssembler();\n\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "public void run(String[] args) throws Exception {\n if (args.length < 1)\n Avrora.userError(\"isdl tool usage: avrora -action=isdl <arch.isdl>\");\n\n Architecture.INLINE = INLINE.get();\n\n String fname = args[0];\n Main.checkFileExists(fname);\n File archfile = new File(fname);\n FileInputStream fis = new FileInputStream(archfile);\n ISDLParser parser = new ISDLParser(fis);\n Status.begin(\"Parsing \"+fname);\n try {\n Architecture a = parser.Architecture();\n Status.success();\n\n SectionFile sf = createSectionFile(\"interpreter\", \"INTERPRETER GENERATOR\", INTERPRETER);\n if (sf != null) {\n // generate vanilla interpreter\n new InterpreterGenerator(a, np(sf)).generate();\n sf.close();\n Status.success();\n }\n\n sf = createSectionFile(\"Instr.* inner classes\", \"INSTR GENERATOR\", CLASSES);\n if ( sf != null) {\n // generate instruction classes\n new ClassGenerator(a, np(sf)).generate();\n sf.close();\n Status.success();\n }\n\n sf = createSectionFile(\"codemap\", \"CODEBUILDER GENERATOR\", CODEMAP);\n if (sf != null) {\n // generate instruction classes\n new CodemapGenerator(a, np(sf)).generate();\n sf.close();\n Status.success();\n }\n\n sf = createSectionFile(\"disassembler\", \"DISASSEM GENERATOR\", DISASSEM);\n if (sf != null) {\n // generate the disassembler\n new DisassemblerGenerator(a, np(sf)).generate();\n sf.close();\n Status.success();\n }\n\n String distest = DISTEST.get();\n if ( !\"\".equals(distest) ) {\n Status.begin(\"Generating disassembler tests to \" + distest);\n File f = new File(distest);\n new DisassemblerTestGenerator(a, f).generate();\n Status.success();\n }\n } catch ( Avrora.Error e) {\n Status.error(e);\n return;\n } catch ( Throwable t) {\n Status.error(t);\n return;\n }\n }", "public interface Program extends AstItem {\n}", "private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n executableFile.delete();\r\n if (executableFile.createNewFile()) {\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".asm\"), \"utf-8\")); //create an object to write into the lst file\r\n\r\n String [] hex = generate.split(\" \");\r\n\r\n for (int index = 0; index < hex.length; index++) {\r\n String hex1 = hex[index].trim();\r\n System.out.println(hex1);\r\n\r\n int i = Integer.parseInt(hex1, 16);\r\n String bin = Integer.toBinaryString(i);\r\n System.out.println(bin);\r\n\r\n writer.write(bin); // once the instruction is converted to binary it is written into the exe file\r\n }\r\n\r\n writer.close();\r\n\r\n }\r\n }", "public void parseIR(final Register IR) {\n\t\tString instruction_string;\n\t\tContext.InstructionClass instruction_class;\n\t\tBitSet opcode;\n\n\t\t// All instructions formats have the opcode in the first 6 bits\n\t\topcode = IR.get(InstructionBitFormats.OPCODE_START, InstructionBitFormats.OPCODE_END + 1);\n\t\tcpu.setReg(CPU.OPCODE, opcode, InstructionBitFormats.OPCODE_SIZE);\n\n\t\t// Get the instruction class for the current opcode\n\t\tinstruction_string = context.getOpCodeStrings().get(\n\t\t\t\tUtils.convertToUnsignedByte(opcode, InstructionBitFormats.OPCODE_SIZE));\n\t\tinstruction_class = context.getOpcodeClasses().get(instruction_string);\n\n\n\t\t/**\n\t\t * After determining the type of instruction format, break up the\n\t\t * instruction to the appropriate special-purpose registers.\n\t\t */\n\t\t// TODO Put all of the \"IR.get(...)\" into a setter method for the\n\t\t// different registers in the CPU.\n\t\tswitch (instruction_class) {\n\t\tcase HALT:\n\t\t\t// Halt instruction has a unique instruction format\n\t\t\t// IR.get(InstructionBitFormats.HALT_SUFFIX_START,\n\t\t\t// InstructionBitFormats.HALT_SUFFIX_END+1);\n\t\t\tbreak;\n\t\tcase TRAP:\n\t\t\t// Trap instruction has a unique instruction format\n\t\t\t// IR.get(InstructionBitFormats.TRAP_CODE_START,\n\t\t\t// InstructionBitFormats.TRAP_CODE_END+1);\n\t\t\tbreak;\n\n\t\tcase LD_STR:\n\t\tcase TRANS:\n\t\tcase ARITH:\n\t\t\tcpu.setReg(CPU.IX, IR.get(\n\t\t\t\t\tInstructionBitFormats.LD_STR_IX_START,\n\t\t\t\t\tInstructionBitFormats.LD_STR_IX_END + 1),\n\t\t\t\t\tInstructionBitFormats.LD_STR_IX_SIZE);\n\n\t\t\tcpu.setReg(CPU.R, IR.get(\n\t\t\t\t\tInstructionBitFormats.LD_STR_R_START,\n\t\t\t\t\tInstructionBitFormats.LD_STR_R_END + 1),\n\t\t\t\t\tInstructionBitFormats.LD_STR_R_SIZE);\n\n\t\t\tcpu.setReg(CPU.I, IR.get(\n\t\t\t\t\tInstructionBitFormats.LD_STR_I_START,\n\t\t\t\t\tInstructionBitFormats.LD_STR_I_END + 1),\n\t\t\t\t\tInstructionBitFormats.LD_STR_I_SIZE);\n\n\t\t\tcpu.setReg(CPU.ADDR, IR.get(\n\t\t\t\t\tInstructionBitFormats.LD_STR_ADDR_START,\n\t\t\t\t\tInstructionBitFormats.LD_STR_ADDR_END + 1),\n\t\t\t\t\tInstructionBitFormats.LD_STR_ADDR_SIZE);\n\t\t\tbreak;\n\n\t\tcase XY_ARITH_LOGIC:\n\t\t\tcpu.setReg(CPU.RX, IR.get(\n\t\t\t\t\tInstructionBitFormats.XY_ARITH_RX_START,\n\t\t\t\t\tInstructionBitFormats.XY_ARITH_RX_END+1),\n\t\t\t\t\tInstructionBitFormats.XY_ARITH_RX_SIZE);\n\t\t\t\n\t\t\tcpu.setReg(CPU.RY, IR.get(\n\t\t\t\t\tInstructionBitFormats.XY_ARITH_RY_START, \n\t\t\t\t\tInstructionBitFormats.XY_ARITH_RY_END+1),\n\t\t\t\t\tInstructionBitFormats.XY_ARITH_RY_SIZE);\n\t\t\tbreak;\n\t\t\t\n\t\tcase SHIFT:\n\t\t\tcpu.setReg(CPU.R, IR.get(\n\t\t\t\t\tInstructionBitFormats.SHIFT_R_START, \n\t\t\t\t\tInstructionBitFormats.SHIFT_R_END+1),\n\t\t\t\t\tInstructionBitFormats.SHIFT_R_SIZE);\n\t\t\t\n\t\t\tcpu.setReg(CPU.AL, IR.get(\n\t\t\t\t\tInstructionBitFormats.SHIFT_AL_START, \n\t\t\t\t\tInstructionBitFormats.SHIFT_AL_END+1),\n\t\t\t\t\tInstructionBitFormats.SHIFT_AL_SIZE);\n\t\t\t\n\t\t\tcpu.setReg(CPU.LR, IR.get(\n\t\t\t\t\tInstructionBitFormats.SHIFT_LR_START, \n\t\t\t\t\tInstructionBitFormats.SHIFT_LR_END+1),\n\t\t\t\t\tInstructionBitFormats.SHIFT_LR_SIZE);\n\t\t\t\n\t\t\tcpu.setReg(CPU.COUNT, IR.get(\n\t\t\t\t\tInstructionBitFormats.SHIFT_COUNT_START, \n\t\t\t\t\tInstructionBitFormats.SHIFT_COUNT_END+1),\n\t\t\t\t\tInstructionBitFormats.SHIFT_COUNT_SIZE);\n\t\t\tbreak;\n\t\tcase IO:\n\t\t\tcpu.setReg(CPU.R, IR.get(\n\t\t\t\t\tInstructionBitFormats.IO_R_START,\n\t\t\t\t\tInstructionBitFormats.IO_R_END+1),\n\t\t\t\t\tInstructionBitFormats.IO_R_SIZE);\n\t\t\tcpu.setReg(CPU.DEVID, IR.get(\n\t\t\t\t\tInstructionBitFormats.IO_DEVID_START,\n\t\t\t\t\tInstructionBitFormats.IO_DEVID_END+1),\n\t\t\t\t\tInstructionBitFormats.IO_DEVID_SIZE);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t\n\t\t\t/*\n\t\t\t * Illegal opcode has occurred\n\t\t\t * \n\t\t\t * Registers PC and MSR are saved to memory. Next, the fault error routine.\n\t\t\t */\n\t\t\t\n\t\t\tWord pc = Utils.registerToWord(cpu.getReg(CPU.PC), 12);\n\t\t\tcpu.writeToMemory(pc, 4);\n\t\t\tWord msr = Utils.registerToWord(cpu.getReg(CPU.PC), 18);\n\t\t\tcpu.writeToMemory(msr, 5);\n\t\t\t\n\t\t\t//Change PC to fault error routine\n\t\t\tWord faultRoutine = cpu.readFromMemory(1);\n\t\t\tcpu.setReg(CPU.PC, faultRoutine); //Is this ok...just truncate least important?\n\t\t\t\n\t\t\t//Execute fault error routine\n\t\t\tcpu.executeInstruction(\"continue\");\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}", "public static void main(String[] _args) {\n \r\n IPmodel IP = new IPmodel(\"XeonIPcore\", false,true,3,2);\r\n IP.add(new Axi4LiteModule(16, 17,true));\r\n IP.add(new Axi4StreamAdaptModuleIn(0, 1, 2, 3));\r\n IP.add(new Axi4StreamAdaptModuleIn(1, 4, 5, 6));\r\n IP.add(new Axi4StreamAdaptModuleIn(2, 7, 8, 9));\r\n\r\n IP.add(new Axi4StreamAdaptModuleOut(0, 1, 2, 3));\r\n IP.add(new Axi4StreamAdaptModuleOut(1, 4, 5, 6));\r\n \r\n System.out.println(IP);\r\n }", "static void main(String[] args) {\n int[] instructions = {0x0000,0x01FF,0xF025,0xFFFF};\n for (int i:instructions) {\n //holds the instruction\n int instr;\n //holds the first three bits after the opcode\n int f3Bits;\n //holsd the second three bits after the opcode\n int s3Bits;\n \n // String to hold the code disassembled into a string\n String instruction=\"\";\n\n //makes the instruction only the last 16 bits instead of int natural 32\n i = i&0x0000FFFF; \n\n //separates just the Opcode\n instr = 0xf000 &i;\n \n //Test for each instruction and adds the Call of that instruction to the\n //string\n if(i==0x0000){\n \tinstruction = \"NOP\";\n }\n else if(instr ==0x1000){\n instruction = \"ADD \";\n }\n else if(instr==0x5000){\n \tinstruction = \"AND \";\n }\n else if(instr==0x0000){\n \tinstruction = \"BR \";\n \t//Test for each part of the NZP\n int n = i & 0x0800;\n \tint z = i & 0x0400;\n \tint p = i & 0x0200;\n if(n == 0x0800)\n \tinstruction += \"n\";\n if(z == 0x0400)\n \tinstruction += \"z\";\n if(p == 0x0200)\n \tinstruction += \"p\";\n //Adds the offset to the string\n int offset9 = i & 0x01FF;\n instruction += \" \" + offset9;\n }\n else if(instr==0xC000){\n \tinstruction = \"JMP \";\n \tinstruction += \"R\"+(i&0x01C0);\n }\n else if(instr==0x4000){\n \tinstruction += \"JSR\";\n \tif((i&0x0800) == 0x0800) {\n \t\tinstruction += \" \"+(i&0x07FF);\n \t}\n \telse {\n \t\tinstruction += \"R R\"+(i&0x01C0);\n \t}\n }\n else if(instr==0x2000){\n \tinstruction = \"LD \";\n }\n else if(instr==0xA000){\n instruction = \"LDI \";\n }\n else if(instr==0x6000){\n \tinstruction = \"LDR \";\n }\n else if(instr==0xE000){\n \tinstruction = \"LEA \";\n }\n else if(instr==0x9000){\n \tinstruction = \"NOT \";\n }\n else if(instr==0x3000){\n \tinstruction =\"ST \";\n }\n else if(instr==0xB000){\n \tinstruction = \"STI \";\n }\n else if(instr==0x7000){\n \tinstruction = \"STR \";\n }\n else if(i==0xF025){\n \tinstruction = \"HALT\";\n }\n else {\n \tinstruction = \"ERROR\";\n }\n\n //Grabs the first Register either SR or DR if it is not \n // NOP RET JSR JSRR\n if(instr !=0x0000 || instr != 0xC000 || instr != 0x4000) {\n f3Bits = i & 0x0E00;\n f3Bits= f3Bits >> 9;\n\n // Does the first two Registers for ADD AND LDR STR and NOT\n if(instr==0x1000 || instr==0x5000 || instr==0x6000 || instr==0x9000 || instr==0x7000){\n instruction = instruction + \"R\"+f3Bits+\" \";\n s3Bits = i & 0x01C0;\n s3Bits = s3Bits >> 6;\n instruction = instruction + \"R\"+s3Bits+\" \";\n }\n // Does teh First register and the Offset for LD, LDI, RET, ST, STI\n else if(instr==0x2000 || instr==0xA000 || instr==0xC000 || instr==0x3000 || instr=0xB000){\n instruction = instruction +\"R\"+f3Bits+\" \";\n System.out.printf(\"%x\",i);\n int offset9 = i & 0x01FF;\n instruction = instruction + offset9;\n }\n // DOes the logic for IMM5 or the 3rd REG for ADD and AND\n if(instr==0x1000 || instr==0x5000) {\n int bit4 = i & 0x0020;\n if(bit4 == 0x0020){\n int imm5 = i & 0x001F;\n instruction = instruction + imm5;\n }\n else {\n \t instr = i &0x0007;\n \t instruction = instruction + \"R\" + instr;\n }\n }\n //Computes the Offset for LDR and STR\n else if(instr==0x6000 || instr == 0x7000) {\n int offset6 = i & 0x003F;\n instruction = instruction + offset6;\n }\n }\n System.out.println(instruction);\n }\n }", "public static void main(String[] args) throws Exception {\n \t\n \tbyte[] fileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/main/re/bytecode/obfuscat/pass/vm/VMRefImpl.class\").toURI()));\n \tDSLParser p = new DSLParser();\n \tMap<String, Function> functions = p.processFile(fileData);\n \tFunction refF = MergedFunction.mergeFunctions(functions, \"process\"); // functions.get(\"process\");\n \t\n \t\n \t\n \tfileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/test/re/bytecode/obfuscat/samples/Sample8.class\").toURI()));\n \tp = new DSLParser();\n functions = p.processFile(fileData);\n \n \tFunction f = MergedFunction.mergeFunctions(functions, \"entry\");\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//Function f = Obfuscat.buildFunction(\"Test\", map);\n \t\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//map.put(\"data\", new byte[] { 1, 2, 3, 4 });\n\t\t//Function f = Obfuscat.buildFunction(\"KeyBuilder\", map );\n\t\n \tf = Obfuscat.applyPass(f, \"Flatten\");\n\t\tf = Obfuscat.applyPass(f, \"OperationEncode\");\n\t\t\n\t\tint[] gen = new VMCodeGenerator(new Context(System.currentTimeMillis()), f).generate();\n\n\t\tbyte[] vmcode = new byte[gen.length];\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < gen.length; i++) {\n\t\t\tsb.append(String.format(\"%02X\", gen[i] & 0xFF));\n\t\t\tvmcode[i] = (byte) gen[i];\n\t\t}\n\n\t\tSystem.out.println(sb.toString());\n\n\t\tSystem.out.println(\"=========================================\");\n\n\t\t\n\t\tSystem.out.println(f.getBlocks().get(0));\n\t\t\n\t\tEmulateFunction eFB = new EmulateFunction(f);\n\t\tbyte[] arr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Original => \"+eFB.run(-1, arr));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Java Reference => \"+VMRefImpl.process(vmcode, f.getData() ,new Object[]{0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\n\t\t\n\t\tEmulateFunction eFRef = new EmulateFunction(refF);\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulated Reference => \"+eFRef.run(-1, gen, f.getData(), new Object[] {0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tEmulateFunction eFPass = new EmulateFunction(Obfuscat.applyPass(f, \"Virtualize\"));\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Pass VM => \"+eFPass.run(-1, arr ));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\n }", "public static void main(String argv[]) throws UnsupportedEncodingException, ExecutionException, FileNotFoundException {\r\n // Check arguments\r\n if(argv.length <= 0) { System.err.println(\"Usage: <filename>\"); return; }\r\n\r\n // Start the machine\r\n Main.traceStream = System.out;\r\n Machine.powerOn();\r\n\r\n // Assemble the file\r\n Assembler assembler = new Assembler();\r\n InputStream stream = new FileInputStream(argv[0]);\r\n try { assembler.Assemble(stream); }\r\n catch(InvalidInstructionException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(LabelNotResolvedException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(ProgramSizeException e)\r\n { System.err.println(e.getMessage()); return; }\r\n\r\n // Run the code\r\n Machine.setPC((short) 0);\r\n Machine.setMSP((short) assembler.getSize());\r\n Machine.setMLP((short) (Machine.memorySize - 1));\r\n Machine.run();\r\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "public void dumpIR () {\n\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n for (SootClass sclass : classes) {\n File jFile = new File(\"tmp/\" + sclass.getName() + \".J\");\n File bFile = new File(\"tmp/\" + sclass.getName() + \".B\");\n try {\n FileWriter jfw = new FileWriter(jFile);\n FileWriter bfw = new FileWriter(bFile);\n BufferedWriter jbw = new BufferedWriter(jfw);\n BufferedWriter bbw = new BufferedWriter(bfw);\n for (SootMethod sm : sclass.getMethods()) {\n jbw.write(\"\\n\" + sm.getSubSignature() + \" { \\n\");\n bbw.write(\"\\n\" + sm.getSubSignature() + \" { \\n\");\n JimpleBody jbody = (JimpleBody) sm.retrieveActiveBody();\n PatchingChain<Unit> units = jbody.getUnits();\n for (Unit u : units) {\n jbw.write(\"\\t\" + u + \" || \" + u.getClass().getName() + \"\\n\");\n if ( u instanceof JAssignStmt) {\n JAssignStmt as = (JAssignStmt) u;\n String a = as.getLeftOp().getType().toString();\n }\n }\n PatchingChain<Unit> bunits = (new BafBody(jbody, null)).getUnits();\n for (Unit u : bunits) {\n bbw.write(\"\\t\" + u + \" || \" + u.getClass().getName() + \"\\n\");\n }\n }\n jbw.close();\n bbw.close();\n jfw.close();\n bfw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static void main(String[] args) {\n String filename = \"\";\n Node root,standard_root;\n CseElement result;\n HashMap<Integer,ArrayList<CseElement>> control_structures;\n //Initialize variable DEBUG. True when debugging.\n boolean DEBUG = false;\n ArrayList<Node> outputs;\n //Get the filename from argument\n if(DEBUG == false & args.length ==0){\n System.out.println(\"Filename expected!..\");\n }\n else{\n filename = args[0];\n \n \n //Create the AST tree from user input file\n outputs = IOEditor.getList(filename);\n root = Tree.createTree(outputs);\n if(DEBUG == true){\n //Print and check the AST when debugging\n Tree.print(root);\n System.out.println(\"\\n\"); \n }\n //Get the Standaraize tree.\n standard_root = Tree.getST(root);\n if(DEBUG == true){\n //Print and check the standarize tree when debugging\n Tree.print(standard_root);\n }\n //Create the control structures for rpal code\n control_structures = Tree.preOrderTraversal(root);\n if(DEBUG == true){\n //Print and check the control structures when debugging\n System.out.println(control_structures);\n System.out.println(\"\");\n }\n // Evaluate the RPAL code using CSE machine\n CseMachine cm = new CseMachine(control_structures);\n try {\n //Get the resulted output\n result = cm.apply(DEBUG);\n if(result == null){\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(\"Final Result:- No return value\");\n }\n }\n else if(\"env\".equals(result.type)){\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(\"Final Result:- No return value\");\n }\n }\n else{\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(result.type +\" \"+result.value);\n }\n }\n } catch (Exception ex) {\n System.out.println(\"\\n\\n\"+ex+\"\\n\\n\");\n Logger.getLogger(Rpal.class.getName()).log(Level.SEVERE, null, ex);\n }\n } \n }", "public static void main(String[] args) {\n\t\t\t\t\n\t\tMain t = new Main();\n\t\t\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tUniversidad Nacional del Centro de la Provincia de Buenos Aires \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \t\tCátedra : Diseño de Compiladores \");\n\t\tSystem.out.println(\" \t\tExtensión del compilador : incorporación del operador '++' a identificadores tipo long \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tProf: Mg. Ing. Marcela Ridado \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tSr: Marcelo Rodríguez -- mrodriguez@alumnos.unicen.edu.ar\");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio del archivo assembler generado [3] directorio para guardar la salida \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\t\n\t\tif (args.length!=3){\n\t\t\tSystem.out.println(\" Error - Faltan argumentos \");\n\t\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio de archivos assembler [3] directorio para guardar la salida \");\n\t\t\t//return;\n\t\t}\n\t\t\n\t\tString programa=args[0];\n\t\tString asmDir=args[1];\n\t\tString outputDir=args[2];\n\t\t\n\t\t\t\t\n\t\tFile asm = new File(asmDir);\n\t\t\n\t\t\n\t\tif (!asm.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \tasm.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos assembler creado.\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\tFile output=new File(outputDir);\n\t\t\n\t\tif (!output.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \toutput.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos de salida creado\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\t\n\t\tFile file = null;\n\t\t\n\t\t\n\t\tfile = new File(programa);\n\n\t\tif (!file.exists()){\n\t\t\tSystem.out.println(\" No hay programa para compilar .\");\n\t\t\treturn;\n\t\t}\n\t\t\n\n\t\t\n\t\tt.setUp(file,asmDir,outputDir);\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }", "Instruction createInstruction();", "@CompilerDirectives.TruffleBoundary\n public void initializeBuiltinsIr(FreshNameSupply freshNameSupply, Passes passes) {\n try {\n var builtinsModuleBytes =\n Objects.requireNonNull(\n getClass().getClassLoader().getResourceAsStream(Builtins.SOURCE_NAME))\n .readAllBytes();\n String source = new String(builtinsModuleBytes, StandardCharsets.UTF_8);\n module.setLiteralSource(source);\n BuiltinsIrBuilder.build(module, freshNameSupply, passes);\n } catch (IOException e) {\n throw new CompilerError(\"Fatal, unable to read Builtins source file.\");\n }\n }", "public static void main( String args[] )\n {{\n final int EXPECTED_NUM_ARGS= 4;\n\n /* ..............................................................\n\t set up command line arguments\n */\n\n if ( args.length != EXPECTED_NUM_ARGS ) {\n System.err.print( \"expected \"+ EXPECTED_NUM_ARGS+ \n\t\t\t \" arguments, but found \"+ args.length+ \".\\n\" );\n\t System.exit( -1 );\n }\n\n arg_verbosity= Integer.parseInt( args[0] );\n arg_ir_filename= args[1];\n arg_outDirname= args[2];\n arg_numCalls= Integer.parseInt( args[3] );\n\n /* ..............................................................\n\t set up globals\n */\n IRTxtLib.programName= PROGRAM_NAME;\n IRTxtLib.arg_verbosity= arg_verbosity;\n\n /* ..............................................................\n */\n checkArgsAndSetUp();\n startWork();\n }}", "public static void generateCode()\n {\n \n }", "public String program();", "public static void main(String[] args) {\n\t\t\r\n\t\tLanguage l = new AnimalScript(\"QR\", \"Dan Le\", 1920, 1080);\r\n\t\tQR gN = new QR(l);\r\n\t\tgN.setProperties();\r\n\t\tgN.printSourceCode();\r\n\t\tint n= 4;\r\n\t\tgN.start(getDefaultMatrix(),n,null,null);\r\n\t\tSystem.out.println(l);\r\n\t}", "public Assembler() {\r\n // Instantiate internals\r\n instructionMap = new HashMap<String, Method>();\r\n instructionSpec = new HashMap<String, Processor>();\r\n codeSectionList = new LinkedList<Section>();\r\n // Regular expressions\r\n patternInstruction = Pattern.compile(\"\\\\s*(?:(\\\\w+):)?\\\\s*(?:(\\\\w+)(?:\\\\s+(.*))?)?\");\r\n patternSection = Pattern.compile(\"\\\\s*SECTION\\\\s+(\\\\.\\\\w+)\\\\s*\", Pattern.CASE_INSENSITIVE);\r\n patternOpBoolean = Pattern.compile(\"\\\\$true|\\\\$false\", Pattern.CASE_INSENSITIVE);\r\n patternOpString = Pattern.compile(\"\\\"[^\\\"]*\\\"\");\r\n patternOpLabel = Pattern.compile(\"[a-zA-Z_]\\\\w*\");\r\n // Instantiate the code emitter\r\n codeEmitter = new AssemblerIREmitter();\r\n // Populate instruction processors\r\n populateProcessors();\r\n }", "public void generateByteCode(Optimizer opt) {}", "public static void main(String[] args) {\n\t\t\n\t\tRBI r=new ICICI();\n\t\t\n\t\tString icici=r.getinterestrate();\n\t\t\n\t\tSystem.out.println(icici);\n\t\t\n\t\t\n\t\tRBI r1=new SBI();\n\t\t\n\t\tString sbi=r1.getinterestrate();\n\t\t\n\t\tSystem.out.println(sbi);\n\t\t\n\t\t\n\n\t}", "public void generateCode() {\n\t\tfor (int i = 0; i < AsmGen.codes.size(); i++) generateFunctionASMCode(AsmGen.codes.get(i));\n\t\tgenerateMMIXMainBootstrap();\n\t\tfile.printf(\"\\n\");\n\t}", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public interface IProgram {\n\n\t/**\n\t * Returns filename of the program. This is name of file that was\n\t * initially added to the database.\n\t * @return filename of the program.\n\t */\n\tpublic String getFilename();\n\n\t/**\n\t * Returns a sequence of bytes that forms source file in UTF-8 encoding. \n\t * @return a sequence of bytes that forms source file in UTF-8 encoding. \n\t */\n\tpublic byte[] getSource();\n\n\t/**\n\t * Returns list of tokens (unmodifiable).\n\t * \n\t * @return list of tokens (unmodifiable).\n\t */\n\tpublic List<IToken> getTokens();\n\n\t/**\n\t * Returns author of the program.\n\t * \n\t * @return author of the program.\n\t */\n\tpublic IAuthor getAuthor();\n\n}", "public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;", "@Override\n\tpublic void run() {\n\t\tfileName = \"out_\" + Program.getProgram().getFileName() + \"_\";\n\t\tint numAddStop = 0;\n\t\t//fileName = \"out_themida_\";\n\n\t\t//fileState.clearContentFile();\n\t\t//bkFile.clearContentFile();\n\t\toverallStartTime = System.currentTimeMillis();\n\t\tlong overallStartTemp = overallStartTime;\n\t\t// BE-PUM algorithm\n\t\tSystem.out.println(\"Starting On-the-fly Model Generation algorithm.\");\n\t\tprogram.getResultFileTemp().appendInLine('\\n' + program.getFileName() + '\\t');\n\t\t\n\t\t// Set up initial context\n\t\tX86TransitionRule rule = new X86TransitionRule();\n\t\tBPCFG cfg = Program.getProgram().getBPCFG();\n\t\tEnvironment env = new Environment();\n\t\t//env.getMemory().resetImportTable(program);\n\t\tAbsoluteAddress location = Program.getProgram().getEntryPoint();\n\t\tInstruction inst = Program.getProgram().getInstruction(location, env);\n\t\tList<BPPath> pathList = new ArrayList<BPPath>();\n\t\t\n\t\t// Insert start node\n\t\tBPVertex startNode = null;\n\t\tstartNode = new BPVertex(location, inst);\n\t\tstartNode.setType(0);\n\t\tcfg.insertVertex(startNode);\n\n\t\tBPState curState = null;\n\t\tBPPath path = null;\n\t\tcurState = new BPState(env, location, inst);\n\t\tpath = new BPPath(curState, new PathList(), new Formulas());\n\t\tpath.setCurrentState(curState);\n\t\tpathList.add(path);\n\n\t\t/*if (Program.getProgram().getFileName().equals(\"api_test_v2.3_lvl1.exe\") \n\t\t\t\t&& isRestored) {\n\t\t\tSystem.out.println(\"Restore State from File.\");\n\t\t\tFileProcess reFile = new FileProcess(\"data/data/restoreState.txt\");\n\t\t\tpathList = restoreState(reFile);\n\t\t\t// bkFile.clearContentFile();\n\t\t\tSystem.out.println(\"Finished restoring state!\");\n\t\t}*/\n\n\t\t// Update at first -----------------------------\n\t\tTIB.setBeUpdated(true);\n\t\tTIB.updateTIB(curState);\n\t\t// ---------------------------------------------\n\n\t\t// PHONG - 20150801 /////////////////////////////\n\t\t// Packer Detection via Header\n\t\tSystem.out.println(\"================PACKER DETECTION VIA HEADER ======================\");\n\t\tif (OTFModelGeneration.detectPacker)\n\t\t{\n\t\t\tprogram.getDetection().detectViaHeader(program);\n\t\t\tprogram.getDetection().setToLogFirst(program);\n\t\t}\n\t\tSystem.out.println(\"==================================================================\");\n\t\t/////////////////////////////////////////////////\n\t\t\n\t\tsynchronized (OTFThreadManager.getInstance()) {\n\t\t\ttry {\n\t\t\t\tOTFThreadManager.getInstance().check(this, pathList);\n\t\t\t\tOTFThreadManager.getInstance().wait();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// PHONG - 20150724\n\t\tSystem.out.println(\"================PACKER DETECTION VIA OTF======================\");\n\t\tprogram.getDetection().packedByTechniques();\n\t\tprogram.getDetection().packedByTechniquesFrequency();\n\t\tSystem.out.println(\"==============================================================\");\n\t}", "String generateRuntimeInitialization();", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "public static void main(String[] args) {\n\t\tILog log = new OutputStreamLog(System.out);\n\t\tlibrary.Library l=new library.Library();\n\t\tOcl4Java.InitModel(\"library\", new OutputStreamLog(System.out));\n\n\t\t// Init population\n\t\tinitPopulation();\n\t\t\n\t\t// Invoke generated code and output the results\t\t\n\t\ttry {\n\t\t\t// Open output file\n\t\t\tFileWriter fout = new FileWriter(\"src/test/scripts/invariants_result.txt\");\n\t\t\tPrintWriter out = new PrintWriter(fout,true);\n\t\t\n\t\t\t// Use the generated code\n\t\t\tList values = test.scripts.Invariants.Library.evaluateAll(lib);\n\t\t\tIterator i = values.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tObject obj = i.next();\n\t\t\t\tout.println(\"[\"+obj+\"]\");\n\t\t\t\tSystem.out.println(\"[\"+obj+\"]\");\n\t\t\t}\n\t\t\t\n\t\t\tfout.close();\n\t\t} catch (Exception e) {\n\t\t\tif (Ocl4Java.processor.getDebug().booleanValue()) e.printStackTrace();\n\t\t}\n\t}", "public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }", "public void assemble1() {\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString Data=\"khalid laaroussi20@1222347\";\r\n\t\tString ImageName=\"Test\";\r\n\t\t/*\r\n\t\t * It Take Two Parameter \r\n\t\t * Parameter 1 Is Data\r\n\t\t * Parameter 2 iS Name Image\r\n\t\t */\r\n\t\tQrCodeGenerator.QrCodeGenerat(Data, ImageName);\r\n\t\t\r\n\t}", "public interface InstructionCodes {\n\n int NOP = 0;\n int ICONST = 2;\n int FCONST = 3;\n int SCONST = 4;\n int ICONST_0 = 5;\n int ICONST_1 = 6;\n int ICONST_2 = 7;\n int ICONST_3 = 8;\n int ICONST_4 = 9;\n int ICONST_5 = 10;\n int FCONST_0 = 11;\n int FCONST_1 = 12;\n int FCONST_2 = 13;\n int FCONST_3 = 14;\n int FCONST_4 = 15;\n int FCONST_5 = 16;\n int BCONST_0 = 17;\n int BCONST_1 = 18;\n int RCONST_NULL = 19;\n int BICONST = 20;\n int DCONST = 21;\n\n int IMOVE = 22;\n int FMOVE = 23;\n int SMOVE = 24;\n int BMOVE = 25;\n int RMOVE = 26;\n int BIALOAD = 27;\n int IALOAD = 28;\n int FALOAD = 29;\n int SALOAD = 30;\n int BALOAD = 31;\n int RALOAD = 32;\n int JSONALOAD = 33;\n\n int IGLOAD = 34;\n int FGLOAD = 35;\n int SGLOAD = 36;\n int BGLOAD = 37;\n int RGLOAD = 38;\n\n int CHNRECEIVE = 39;\n int CHNSEND = 40;\n\n int MAPLOAD = 41;\n int JSONLOAD = 42;\n\n int COMPENSATE = 43;\n\n int BIASTORE = 44;\n int IASTORE = 45;\n int FASTORE = 46;\n int SASTORE = 47;\n int BASTORE = 48;\n int RASTORE = 49;\n int JSONASTORE = 50;\n\n int BIAND = 51;\n int IAND = 52;\n int BIOR = 53;\n int IOR = 54;\n\n int IGSTORE = 55;\n int FGSTORE = 56;\n int SGSTORE = 57;\n int BGSTORE = 58;\n int RGSTORE = 59;\n\n int IS_LIKE = 60;\n\n int STAMP = 62;\n\n int FREEZE = 63;\n int IS_FROZEN = 64;\n\n int ERROR = 65;\n int PANIC = 66;\n int REASON = 67;\n int DETAIL = 68;\n\n int MAPSTORE = 69;\n int JSONSTORE = 70;\n\n int IADD = 71;\n int FADD = 72;\n int SADD = 73;\n int DADD = 74;\n\n int SCOPE_END = 75;\n int LOOP_COMPENSATE = 76;\n\n int XMLADD = 77;\n int ISUB = 78;\n int FSUB = 79;\n int DSUB = 80;\n int IMUL = 81;\n int FMUL = 82;\n int DMUL = 83;\n int IDIV = 84;\n int FDIV = 85;\n int DDIV = 86;\n int IMOD = 87;\n int FMOD = 88;\n int DMOD = 89;\n int INEG = 90;\n int FNEG = 91;\n int DNEG = 92;\n int BNOT = 93;\n\n int IEQ = 94;\n int FEQ = 95;\n int SEQ = 96;\n int BEQ = 97;\n int DEQ = 98;\n int REQ = 99;\n int REF_EQ = 100;\n\n int INE = 101;\n int FNE = 102;\n int SNE = 103;\n int BNE = 104;\n int DNE = 105;\n int RNE = 106;\n int REF_NEQ = 107;\n\n int IGT = 108;\n int FGT = 109;\n int DGT = 110;\n\n int IGE = 111;\n int FGE = 112;\n int DGE = 113;\n\n int ILT = 114;\n int FLT = 115;\n int DLT = 116;\n\n int ILE = 117;\n int FLE = 118;\n int DLE = 119;\n\n int REQ_NULL = 120;\n int RNE_NULL = 121;\n\n int BR_TRUE = 122;\n int BR_FALSE = 123;\n\n int GOTO = 124;\n int HALT = 125;\n int TR_RETRY = 126;\n int CALL = 127;\n int VCALL = 128;\n int FPCALL = 129;\n int FPLOAD = 130;\n int VFPLOAD = 131;\n\n // Type Conversion related instructions\n int I2F = 132;\n int I2S = 133;\n int I2B = 134;\n int I2D = 135;\n int F2I = 136;\n int F2S = 137;\n int F2B = 138;\n int F2D = 139;\n int S2I = 140;\n int S2F = 141;\n int S2B = 142;\n int S2D = 143;\n int B2I = 144;\n int B2F = 145;\n int B2S = 146;\n int B2D = 147;\n int D2I = 148;\n int D2F = 149;\n int D2S = 150;\n int D2B = 151;\n int DT2JSON = 152;\n int DT2XML = 153;\n int T2MAP = 154;\n int T2JSON = 155;\n int MAP2T = 156;\n int JSON2T = 157;\n int XML2S = 158;\n\n int BILSHIFT = 159;\n int BIRSHIFT = 160;\n int ILSHIFT = 161;\n int IRSHIFT = 162;\n\n // Type cast\n int I2ANY = 163;\n int F2ANY = 164;\n int S2ANY = 165;\n int B2ANY = 166;\n\n int TYPE_ASSERTION = 167;\n\n int ANY2I = 168;\n int ANY2F = 169;\n int ANY2S = 170;\n int ANY2B = 171;\n int ANY2D = 172;\n int ANY2JSON = 173;\n int ANY2XML = 174;\n int ANY2MAP = 175;\n int ANY2STM = 176;\n int ANY2DT = 177;\n int ANY2SCONV = 178;\n int ANY2BI = 179;\n int BI2ANY = 180;\n int ANY2E = 181;\n int ANY2T = 182;\n int ANY2C = 183;\n int CHECKCAST = 184;\n\n int ANY2TYPE = 185;\n\n int LOCK = 186;\n int UNLOCK = 187;\n\n // Transactions\n int TR_BEGIN = 188;\n int TR_END = 189;\n\n int WRKSEND = 190;\n int WRKRECEIVE = 191;\n\n int WORKERSYNCSEND = 192;\n int WAIT = 193;\n\n int MAP2JSON = 194;\n int JSON2MAP = 195;\n\n int IS_ASSIGNABLE = 196;\n int O2JSON = 197;\n\n int ARRAY2JSON = 198;\n int JSON2ARRAY = 199;\n\n int BINEWARRAY = 200;\n int INEWARRAY = 201;\n int FNEWARRAY = 202;\n int SNEWARRAY = 203;\n int BNEWARRAY = 204;\n int RNEWARRAY = 205;\n\n int CLONE = 206;\n\n int FLUSH = 207;\n\n int LENGTHOF = 208;\n int WAITALL = 209;\n\n int NEWSTRUCT = 210;\n int NEWMAP = 212;\n int NEWTABLE = 215;\n int NEWSTREAM = 217;\n \n int CONVERT = 218;\n\n int ITR_NEW = 219;\n int ITR_NEXT = 221;\n int INT_RANGE = 222;\n\n int I2BI = 223;\n int BI2I = 224;\n int BIXOR = 225;\n int IXOR = 226;\n int BACONST = 227;\n int IURSHIFT = 228;\n\n int IRET = 229;\n int FRET = 230;\n int SRET = 231;\n int BRET = 232;\n int DRET = 233;\n int RRET = 234;\n int RET = 235;\n\n int XML2XMLATTRS = 236;\n int XMLATTRS2MAP = 237;\n int XMLATTRLOAD = 238;\n int XMLATTRSTORE = 239;\n int S2QNAME = 240;\n int NEWQNAME = 241;\n int NEWXMLELEMENT = 242;\n int NEWXMLCOMMENT = 243;\n int NEWXMLTEXT = 244;\n int NEWXMLPI = 245;\n int XMLSEQSTORE = 246;\n int XMLSEQLOAD = 247;\n int XMLLOAD = 248;\n int XMLLOADALL = 249;\n int NEWXMLSEQ = 250;\n\n int TYPE_TEST = 251;\n int TYPELOAD = 252;\n\n int TEQ = 253;\n int TNE = 254;\n\n int INSTRUCTION_CODE_COUNT = 255;\n}", "public static void main(String[] args) {\n IntegerRegFile reg = new IntegerRegFile();\n reg.WriteToRegFile(\"R1\", 1000);\n reg.WriteToRegFile(\"R2\", 1000);\n System.out.println(reg);\n }", "public static void main(String args[]) throws IOException{\n\t\tscan = new BufferedReader(new InputStreamReader(System.in));\n\t\tregisters = new HashMap<Character,String>();\n\t\tmemory = new HashMap<Integer , String>();//Memory location 0 will remain unused\n\t\tlabels = new HashMap<String , Integer>();\n\t\thexa = \"0123456789ABCDEF\".toCharArray();\n\t\tpossible_codes = \"HLT RST MOV MVI LXI LDA STA LHLD SHLD LDAX STAX XCHG ADD ADC ADI ACI DAD SUB SBB SUI INR DCR INX DCX ANA ANI ORA ORI XRA XRI CMA CMC STC CMP CPI RLC RRC RAL RAR JMP JZ JNZ JC JNC JP JM JPE JPO CALL CZ CNZ CC CNC CP CM CPE CPO RET RZ RNZ RC RNC RP RM RPE RPO PCHL IN OUT PUSH POP XTHL SPHL\".split(\" \");\n\t\tgeneral_registers = new HashSet<Character>();\n\t\tAC=CS=Z=P=S=false;\n\t\tSP = 65536;\n\t\tPC = 0;\n\t\tmodified = false;\n\t\tadd_the_general_registers();\n\n\t\tSystem.out.println(\"SIMULATOR FOR 8085 MICROPROCESSOR\\n\");\n\t\t//Take the input of code\n\t\tSystem.out.println(\"ENTER THE CODE :-\\n\");\n\t\ttake_the_input();\n\t\t//Take the input of memory values\n\t\tSystem.out.println(\"ENTER THE MEMORY VALUES :-\");\n\t\tSystem.out.println(\"IF NO VALUE HAS TO BE ENTERED PRESS N ELSE WRITE THE ADDRESS.\\n\");\n\t\ttake_memory_values();\n\t\t//Execution starts\n\t\tSystem.out.println(\"\\nNOW EXECUTION WILL BEGIN...\");\n\t\texecute();\n\t\t//Providing the output to the user\n\t\tSystem.out.println(\"\\nENTER THE MEMORY LOCATIONS AND REGISTER VALUES YOU WANT TO CHECK : \");\n\t\tSystem.out.println(\"(WHEN YOU ARE DONE CHECKING TYPE N)\\n\");\n\t\toutput_process();\n\t}", "public static void main(String args[]) throws DuplicateNMRRequestException {\n\n // Constants...\n final String vendor = \"xilinx\";\n final String family = \"virtex2\";\n final String part = \"XC2V8000FF1517\";\n // *** Comment out the above name and\n // use the following part if you want the SSRA to run\n // out of resources...\n\n // Load EDIF\n // note: expecting arg0 to be the name of an edif file\n // note: the -L arg is needed if there are child edif files\n EdifCell topCell = XilinxMergeParser.parseAndMergeXilinx(args);\n\n // Flatten the cell...\n System.out.println(\"Flattening the cell...\");\n try {\n topCell = new FlattenedEdifCell(topCell);\n } catch (EdifNameConflictException e5) {\n e5.toRuntime();\n } catch (InvalidEdifNameException e5) {\n e5.toRuntime();\n }\n\n // Create a TMR architecture object for the part\n // specified in the \"constants\" section of this function \n System.out.println(\"Creating new TMR architecture object for part \" + part + \" of family \" + family\n + \" from vendor \" + vendor);\n NMRArchitecture tmrArch = new XilinxNMRArchitecture();\n\n // Create an instance connectivity object\n System.out.println(\"Creating a connectivity object...\");\n EdifCellInstanceGraph ecic = new EdifCellInstanceGraph(topCell);\n\n // Create groups based on bad cuts\n System.out.println(\"Grouping the cell based on bad cuts...\");\n EdifCellBadCutGroupings ecbcg = new EdifCellBadCutGroupings(topCell, tmrArch, ecic);\n\n // Create a group connectivity object\n // this isn't needed for this example, but this is how you\n // would create one...\n //EdifCellInstanceCollectionGraph ecigc = new EdifCellInstanceCollectionGraph(ecic, ecbcg);\n\n // // Create a resource limits object for the given device\n // System.out.println (\"Creating a resource limit information object for part \"+part+\" of family \" + family + \" from vendor \"+vendor);\n // //DeviceUtilization normalResourceCount = DeviceUtilization.createDeviceUtilizationObject(vendor, family, part);\n // DeviceUtilization normalResourceCount = new XilinxVirtexDeviceUtilization(part);\n // System.out.println (\"Static utilization (should be null)...\");\n // System.out.println (normalResourceCount);\n\n // Get the resource utilization of the device for the cell\n // note: this is without TMR\n // note: the utilization is calculated at object creation time\n System.out.println(\"Calculating normal resource utilization of cell \" + topCell);\n DeviceUtilizationTracker duTracker = null;\n try {\n duTracker = DeviceParser.createXilinxDeviceUtilizationTracker(topCell, family, part);\n } catch (OverutilizationException e) {\n throw new EdifRuntimeException(\"ERROR: Initial contents of cell \" + topCell + \" do not fit into part \"\n + part);\n }\n System.out.println(\"Normal utilization for cell \" + topCell);\n System.out.println(duTracker);\n\n // Get a collection of all the bad cut groups in the cell...\n System.out.println(\"Getting a reference to all of the bad cut groups in the cell...\");\n Collection groups = ecbcg.getInstanceGroups();\n\n // Iterate over all of the groups and try to add each one\n // to the resource tracker\n System.out.println(\"Iterating over each bad cut group and trying to add each to the TMR resource tracker...\");\n for (Iterator i = groups.iterator(); i.hasNext();) {\n Collection group = (Collection) i.next();\n try {\n duTracker.nmrInstancesAtomic(group, _replicationFactor);\n } catch (OverutilizationEstimatedStopException e1) {\n System.out\n .println(\"WARNING: Group of instances not added to resource tracker due to estimated resource constraints. \"\n + e1);\n // The following could be a \"continue\" or \"break\" \n // depending on how you want to proceed...\n // presumably you want to believe the resource tracker\n // meaning that it correctly is predicting\n // that you are out of resources\n break;\n } catch (OverutilizationHardStopException e2) {\n System.out.println(\"WARNING: Group of instances not added to resource tracker.\");\n System.out.println(e2);\n // This call adds everything else in the group\n // except those instances which cause hard stops\n try {\n duTracker.nmrInstancesAsManyAsPossible(group, _replicationFactor, null);\n } catch (OverutilizationEstimatedStopException e3) {\n System.out\n .println(\"WARNING: Group of instances not added to resource tracker due to estimated resource constraints. \"\n + e3);\n // The following could be a \"continue\" or \"break\" \n // depending on how you want to proceed...\n // presumably you want to believe the resource tracker\n // meaning that it correctly is predicting\n // that you are out of resources\n break;\n } catch (OverutilizationHardStopException e4) {\n // !!! Shouldn't get here because we called tmrInstances\n // with the flag set to skip hard stops\n throw new EdifRuntimeException(\"ERROR: Shouldn't get here! \" + e4);\n }\n }\n }\n\n System.out.println(\"Utilization for cell \" + topCell + \" after TMR...\");\n System.out.println(duTracker);\n\n }", "public Node program() {\r\n\r\n this.CheckError(\"PROGRAM\");\r\n\r\n\r\n Node n_program = new Node(\"program\");\r\n n_program.setParent(null);\r\n System.out.println(\"read node from app: \"+n_program.getData());\r\n System.out.println(\" :parent: \"+n_program.getParent());\r\n\r\n Node n_declarations = n_program.setChildren(\"decl list\");\r\n System.out.println(\"read node from app :data: \"+n_declarations.getData());\r\n System.out.println(\" :parent: \"+n_declarations.getParent().getData());\r\n\r\n this.declaration(n_declarations);\r\n\r\n this.CheckError(\"BEGIN\");\r\n\r\n Node n_statementSequence = n_program.setChildren(\"stmt list\");\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.CheckError(\"END\");\r\n\r\n System.out.println(\":::: Parsing Successful Hamid ::::\");\r\n\r\n return n_program;\r\n //////////////////////////////////////////// writeout PROGRAM treee -----------------\r\n //////////////////////////////////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////////////////////////////\r\n ///////////output test generator\r\n /////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\n /*Node iteration = n_program;\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\"|\");\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n iteration = n_program.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\" \");\r\n iteration = n_program.getChildren(1);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println(\"\");\r\n System.out.print(\" \");\r\n Node iteration0= iteration.getChildren(0);\r\n for (int i=0; i<iteration0.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration1= iteration.getChildren(1);\r\n for (int i=0; i<iteration1.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration2= iteration.getChildren(2);\r\n for (int i=0; i<iteration2.childrenSize();i++){\r\n System.out.print(\"| \"+iteration2.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration3= iteration.getChildren(3);\r\n for (int i=0; i<iteration3.childrenSize();i++){\r\n System.out.print(\"| \"+iteration3.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration4= iteration.getChildren(4);\r\n for (int i=0; i<iteration4.childrenSize();i++){\r\n System.out.print(\"| \"+iteration4.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" w\\n\");\r\n System.out.print(\" \");\r\n Node iteration0w= iteration2.getChildren(0);\r\n for (int i=0; i<iteration0w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n Node iteration1w= iteration2.getChildren(1);\r\n for (int i=0; i<iteration1w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n iteration= iteration0w.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }*/\r\n\r\n }", "void gen() {\n if (val != null) {\r\n\tX86.Operand r = val.gen_source_operand(true,X86.RAX); \r\n\tX86.emitMov(X86.Size.Q,r,X86.RAX);\r\n }\r\n // exit sequence\r\n // pop the frame\r\n if (frameSize != 0)\r\n\tX86.emit2(\"addq\",new X86.Imm(frameSize),X86.RSP);\r\n // restore any callee save registers\r\n for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) {\r\n\tX86.Reg r = X86.calleeSaveRegs[i]; \r\n\tif (env.containsValue(r))\r\n\t X86.emit1(\"popq\",r);\r\n }\r\n // and we're done\r\n X86.emit0(\"ret\");\r\n }", "@Override\r\n public void execute() throws BuildException { \r\n AbstractGenerator g;\r\n \r\n if (kind == null) {\r\n throw new BuildException(\"kind was not specified\");\r\n }\r\n final String k = kind.getValue();\r\n if (k.equals(INTERFACE)) {\r\n g = new InterfaceGen();\r\n }\r\n else if (k.equals(CRYSTAL)) {\r\n g = new CrystalGen();\r\n }\r\n else if (k.equals(OPERATOR)) {\r\n g = new OperatorGen();\r\n }\r\n else {\r\n throw new BuildException(\"Unknown kind was specified: \"+kind);\r\n }\r\n if (dest != null) {\r\n srcs.add(0, \"-out\");\r\n srcs.add(1, dest);\r\n }\r\n g.generate(srcs.toArray(new String[srcs.size()]));\r\n }", "public interface Program\n{\n // ----------------------------------------------------------\n /**\n * Represents a sequence of actions to carry out, one turn at a time.\n */\n public void myProgram();\n}", "abstract /*package*/ IValue executeRVMProgram(String moduleName, String uid_main, IValue[] posArgs, Map<String,IValue> kwArgs);", "static public void main(String[] args){\n IA ia = new UberComponent(); IA ia2 = (IA) ia; ia2.SayHello(\",\");\n //--------------------- Check For Symmetry\n IB ia3 = (IB) ia; ia2 = (IA) ia3; ia2.SayHello(\",\"); ia3.SayHello2(\",\");\n //----------- Check For Transitivity\n IC ia4 = (IC) ia3; IA ia5 = (IA) ia4; ia5.SayHello(\",\"); a4.SayHello3(\"m\");\n }", "Program program() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken progName = match(IDENTIFIER);\r\n\t\tBlock block = block();\r\n\t\treturn new Program (first, progName, block);\r\n\t}", "public interface Program {\n\n static EvalResult newEvalResult(Val val, EvalDetails evalDetails) {\n return new EvalResult(val, evalDetails);\n }\n\n /**\n * Eval returns the result of an evaluation of the Ast and environment against the input vars.\n *\n * <p>The vars value may either be an `interpreter.Activation` or a `map[string]interface{}`.\n *\n * <p>If the `OptTrackState` or `OptExhaustiveEval` flags are used, the `details` response will be\n * non-nil. Given this caveat on `details`, the return state from evaluation will be:\n *\n * <ul>\n * <li>`val`, `details`, `nil` - Successful evaluation of a non-error result.\n * <li>`val`, `details`, `err` - Successful evaluation to an error result.\n * <li>`nil`, `details`, `err` - Unsuccessful evaluation.\n * </ul>\n *\n * <p>An unsuccessful evaluation is typically the result of a series of incompatible `EnvOption`\n * or `ProgramOption` values used in the creation of the evaluation environment or executable\n * program.\n */\n EvalResult eval(Object vars);\n\n final class EvalResult {\n private final Val val;\n private final EvalDetails evalDetails;\n\n private EvalResult(Val val, EvalDetails evalDetails) {\n this.val = val;\n this.evalDetails = evalDetails;\n }\n\n public Val getVal() {\n return val;\n }\n\n public EvalDetails getEvalDetails() {\n return evalDetails;\n }\n }\n}", "public static void main(String[] args) {\r\n\r\n\t\tif (args.length == 0) {\r\n\t\t\tlog.error(\"Specification and assembly filenames not given.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length == 1) {\r\n\t\t\tlog.error(\"Assembly file not given.\");\r\n\t\t\tlog.error(\"Specification file: \" + args[0]);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length > 2) {\r\n\t\t\tlog.error(\"Too many arguments provided.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tif (!args[0].endsWith(\".yaml\") || !args[1].endsWith(\".asm\")) {\r\n\t\t\tlog.error(\"Input is limited to two files.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tvar file = new FileParser(args[0], args[1]);\r\n\t\t\tvar data = file.getData();\r\n\t\t\tvar asm = new Assembler(data);\r\n\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", asm.getObjectCode());\r\n\t\t} catch (FileParserException e) {\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", Lists.newArrayList(e.getMessage()));\r\n\t\t\tAssembler.writeLinesToFile(\"spec_error_report.txt\", e.getErrorReport());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (AssemblerException | IOException e) {\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public interface Code {\r\n \r\n /**\r\n * Called to execute the \"next\" line of code in this\r\n * virtual hardware component.\r\n * \r\n * This can be any action (or sequence of actions) as desired by\r\n * the implementation to simulate hardware functions.\r\n * \r\n * @return true when this \"process\" wants to exit.\r\n */\r\n public boolean executeNext();\r\n \r\n /**\r\n * Called when this instruction set should terminate execution permanently.\r\n * This method SHOULD NOT modify the process Identifier or CPU. It should\r\n * only shut down any processing needs and reset internal data if this\r\n * process is executed again.\r\n */\r\n public void shutdown();\r\n\r\n /**\r\n * Get the program name.\r\n */\r\n public String getName();\r\n \r\n // </editor-fold>\r\n }", "@Override\n public String codeGen() {\n\n\tString labelFun = \"labelFun\" + MiniFunLib.getLabIndex();\n\tString popParSequence = \"\";\n\tString popLocalVariable = \"\";\n\tString localVariableCodeGen = \"\";\n\n\tfor (int i = 0; i < funParams.size(); i++) {\n\t NodeType nt = this.funParams.get(i).getType().getNodeType();\n\n\t if (nt == NodeType.ARROWTYPE_NODE)\n\t\tpopParSequence += VMCommands.POP + \"\\n\" + VMCommands.POP + \"\\n\";\n\t else\n\t\tpopParSequence += VMCommands.POP + \"\\n\";\n\t}\n\n\tfor (int i = 0; i < funLocalVariables.size(); i++) {\n\t localVariableCodeGen += funLocalVariables.get(i).codeGen();\n\t popLocalVariable += VMCommands.POP + \"\\n\";\n\t}\n\n\tString code = labelFun + \" :\\n\" +\n\t// Preparo parte bassa dell'activation Record\n\n\t\t// Il registro FP punterà al nuovo Activation Record\n\t\tVMCommands.CFP + \"\\n\"\n\n\t\t// PUSH dei dati Locali\n\t\t+ localVariableCodeGen +\n\n\t\t// PUSH return address del chiamante\n\t\tVMCommands.LRA + \"\\n\"\n\n\t\t// Corpo della funzione\n\t\t+ funBody.codeGen() +\n\n\t\t// POP RV e salvo nel registro\n\t\tVMCommands.SRV + \"\\n\" +\n\n\t\t// POP RA e salvo nel registro\n\t\tVMCommands.SRA + \"\\n\" +\n\n\t\t// Rimuovo variabili locali\n\t\tpopLocalVariable +\n\t\t// Rimuovo Access Link\n\t\tVMCommands.POP + \"\\n\" +\n\t\t// Rimuovo Pametri\n\t\tpopParSequence +\n\n\t\t// Ripristino il Registro FP che punterà all'Activation Record\n\t\t// del chiamante\n\t\tVMCommands.SFP + \"\\n\" +\n\n\t\t// PUSH valore di ritorno\n\t\tVMCommands.LRV + \"\\n\" +\n\t\t// PUSH indirizzo di ritorno\n\t\tVMCommands.LRA + \"\\n\" +\n\n\t\t// Salto al Chiamante\n\t\tVMCommands.JS + \"\\n\";\n\n\tMiniFunLib.addFunctionCode(code);\n\n\treturn VMCommands.PUSH + \" \" + labelFun + \"\\n\";\n }", "private String doInit(int i, String[] args) throws SoarException\r\n {\n smem.smem_close();\r\n\r\n // production memory (automatic init-soar clears working memory as a result) \r\n //this->DoCommandInternal( \"excise --all\" );\r\n \r\n // Excise all just removes all rules and does init-soar\r\n final Agent agent = Adaptables.require(getClass(), context, Agent.class);\r\n for(Production p : new ArrayList<Production>(agent.getProductions().getProductions(null)))\r\n {\r\n agent.getProductions().exciseProduction(p, false);\r\n }\r\n agent.initialize();\r\n \r\n return \"\";\r\n }", "public static void main (String[] args) {import java.util.*;%>\n//&&&staticSymbol&&&<%import org.eclipse.emf.codegen.ecore.genmodel.*;%>\n//&&&staticSymbol&&&<%\n\n/**\n * Copyright (c) 2002-2010 IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * IBM - Initial API and implementation\n */\n\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nGenPackage genPackage = (GenPackage)((Object[])argument)[0]; GenModel genModel=genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nboolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nString publicStaticFinalFlag = isImplementation ? \"public static final \" : \"\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%include(\"../Header.javajetinc\");%>\n//&&&staticSymbol&&&<%\nif (isInterface || genModel.isSuppressInterfaces()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&package <%\n//&&&staticSymbol&&&=genPackage.getReflectionPackageName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&package <%\n//&&&staticSymbol&&&=genPackage.getClassPackageName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addPseudoImport(\"org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addPseudoImport(\"org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container.Dynamic\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addImport(\"org.eclipse.emf.ecore.EClass\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addImport(\"org.eclipse.emf.ecore.EObject\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + \".*\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.markImportLocation(stringBuffer);\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (isInterface) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&/**\n//&&&staticSymbol&&& * <!-- begin-user-doc -->\n//&&&staticSymbol&&& * The <b>Factory</b> for the model.\n//&&&staticSymbol&&& * It provides a create method for each non-abstract class of the model.\n//&&&staticSymbol&&& * <!-- end-user-doc -->\n//&&&staticSymbol&&&<%\nif (!genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& * @see <%\n//&&&staticSymbol&&&=genPackage.getQualifiedPackageInterfaceName()\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& * @generated\n//&&&staticSymbol&&& */\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&/**\n//&&&staticSymbol&&& * <!-- begin-user-doc -->\n//&&&staticSymbol&&& * An implementation of the model <b>Factory</b>.\n//&&&staticSymbol&&& * <!-- end-user-doc -->\n//&&&staticSymbol&&& * @generated\n//&&&staticSymbol&&& */\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&public class <%\n//&&&staticSymbol&&&=genPackage.getFactoryClassName()\n//&&&staticSymbol&&&%> extends <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.impl.EFactoryImpl\")\n//&&&staticSymbol&&&%><%\nif (!genModel.isSuppressInterfaces()) {\n//&&&staticSymbol&&&%> implements <%\n//&&&staticSymbol&&&=genPackage.getImportedFactoryInterfaceName()\n//&&&staticSymbol&&&%><%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&public interface <%\n//&&&staticSymbol&&&=genPackage.getFactoryInterfaceName()\n//&&&staticSymbol&&&%><%\nif (!genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%> extends <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EFactory\")\n//&&&staticSymbol&&&%><%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&{\n//&&&staticSymbol&&&<%\nif (genModel.hasCopyrightField()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.String\")\n//&&&staticSymbol&&&%> copyright = <%\n//&&&staticSymbol&&&=genModel.getCopyrightFieldLiteral()\n//&&&staticSymbol&&&%>;<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isImplementation && (genModel.isSuppressEMFMetaData() || genModel.isSuppressInterfaces())) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * The singleton instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genPackage.getFactoryClassName()\n//&&&staticSymbol&&&%> eINSTANCE = init();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isInterface && genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * The singleton instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genPackage.getFactoryInterfaceName()\n//&&&staticSymbol&&&%> INSTANCE = <%\n//&&&staticSymbol&&&=genPackage.getQualifiedFactoryClassName()\n//&&&staticSymbol&&&%>.eINSTANCE;\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n} else if (isInterface && !genModel.isSuppressInterfaces()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * The singleton instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genPackage.getFactoryInterfaceName()\n//&&&staticSymbol&&&%> eINSTANCE = <%\n//&&&staticSymbol&&&=genPackage.getQualifiedFactoryClassName()\n//&&&staticSymbol&&&%>.init();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Creates the default factory implementation.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&<%\nString factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic static <%\n//&&&staticSymbol&&&=factoryType\n//&&&staticSymbol&&&%> init()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\t<%\n//&&&staticSymbol&&&=factoryType\n//&&&staticSymbol&&&%> the<%\n//&&&staticSymbol&&&=genPackage.getFactoryName()\n//&&&staticSymbol&&&%> = (<%\n//&&&staticSymbol&&&=factoryType\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EPackage\")\n//&&&staticSymbol&&&%>.Registry.INSTANCE.getEFactory(<%\n//&&&staticSymbol&&&=genPackage.getPackageInterfaceName()\n//&&&staticSymbol&&&%>.eNS_URI);\n//&&&staticSymbol&&&\t\t\tif (the<%\n//&&&staticSymbol&&&=genPackage.getFactoryName()\n//&&&staticSymbol&&&%> != null)\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\treturn the<%\n//&&&staticSymbol&&&=genPackage.getFactoryName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (Exception exception)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.plugin.EcorePlugin\")\n//&&&staticSymbol&&&%>.INSTANCE.log(exception);\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genPackage.getImportedFactoryClassName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Creates an instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genPackage.getFactoryClassName()\n//&&&staticSymbol&&&%>()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tsuper();\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Override\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic EObject create(EClass eClass)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tswitch (eClass.getClassifierID())\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&<%\nfor (GenClass genClass : genPackage.getGenClasses()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (!genClass.isAbstract()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tcase <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genClass.getClassifierID()\n//&&&staticSymbol&&&%>: return <%\n//&&&staticSymbol&&&*%%storeSymbol%%*0\n//&&&staticSymbol&&&%>create<%\n//&&&staticSymbol&&&=genClass.getName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tdefault:\n//&&&staticSymbol&&&\t\t\t\tthrow new IllegalArgumentException(\"The class '\" + eClass.getName() + \"' is not a valid classifier\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (!genPackage.getAllGenDataTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Override\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic Object createFromString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, String initialValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tswitch (eDataType.getClassifierID())\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&<%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tcase <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genDataType.getClassifierID()\n//&&&staticSymbol&&&%>:\n//&&&staticSymbol&&&\t\t\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>FromString(eDataType, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tdefault:\n//&&&staticSymbol&&&\t\t\t\tthrow new IllegalArgumentException(\"The datatype '\" + eDataType.getName() + \"' is not a valid classifier\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Override\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic String convertToString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, Object instanceValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tswitch (eDataType.getClassifierID())\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&<%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tcase <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genDataType.getClassifierID()\n//&&&staticSymbol&&&%>:\n//&&&staticSymbol&&&\t\t\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>ToString(eDataType, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tdefault:\n//&&&staticSymbol&&&\t\t\t\tthrow new IllegalArgumentException(\"The datatype '\" + eDataType.getName() + \"' is not a valid classifier\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nfor (GenClass genClass : genPackage.getGenClasses()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (!genClass.isAbstract()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genClass.getTypeParameters()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getImportedInterfaceName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getInterfaceTypeArguments()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genClass.getName()\n//&&&staticSymbol&&&%>()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genClass.isDynamic()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genClass.getImportedInterfaceName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getInterfaceTypeArguments()\n//&&&staticSymbol&&&%> <%\n//&&&staticSymbol&&&=genClass.getSafeUncapName()\n//&&&staticSymbol&&&%> = <%\n//&&&staticSymbol&&&=genClass.getCastFromEObject()\n//&&&staticSymbol&&&%>super.create(<%\n//&&&staticSymbol&&&=genClass.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genClass.getImportedClassName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getClassTypeArguments()\n//&&&staticSymbol&&&%> <%\n//&&&staticSymbol&&&=genClass.getSafeUncapName()\n//&&&staticSymbol&&&%> = new <%\n//&&&staticSymbol&&&=genClass.getImportedClassName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getClassTypeArguments()\n//&&&staticSymbol&&&%>()<%\nif (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) {\n//&&&staticSymbol&&&%>{}<%\n}\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genClass.getSafeUncapName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) { String eDataType = genDataType.getQualifiedClassifierAccessor();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useGenerics() && genDataType.isUncheckedCast() && !genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@SuppressWarnings(\"unchecked\")\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedInstanceClassName()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>final <%\n}\n//&&&staticSymbol&&&%>String <%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>it<%\n} else {\n//&&&staticSymbol&&&%>literal<%\n}\n//&&&staticSymbol&&&%>)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getCreatorBody(genModel.getIndentation(stringBuffer))\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%> result = <%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%>.get(literal);\n//&&&staticSymbol&&&\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + literal + \"' is not a valid enumerator of '\" + <%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>.getName() + \"'\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(3)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (isPrimitiveConversion && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genBaseType.getGenPackage().isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (isPrimitiveConversion && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (literal == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedInstanceClassName()\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.ArrayList\")\n//&&&staticSymbol&&&%><%\nif (genModel.useGenerics()) {\n//&&&staticSymbol&&&%><<%=genItemType.getObjectType().getImportedParameterizedInstanceClassName()%>><%\n}\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%> stringTokenizer = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%>(literal); stringTokenizer.hasMoreTokens(); )\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (String item : split(literal))\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString item = stringTokenizer.nextToken();\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>(item));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>(item));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (literal == null) return <%\n//&&&staticSymbol&&&=genDataType.getStaticValue(null)\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%> result = <%\n//&&&staticSymbol&&&=genDataType.getStaticValue(null)\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t\tRuntimeException exception = null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = (<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = (<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tif (<%\nif (!genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>result != null && <%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.util.Diagnostician\")\n//&&&staticSymbol&&&%>.INSTANCE.validate(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, <%\nif (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(result)<%\n} else {\n//&&&staticSymbol&&&%>result<%\n}\n//&&&staticSymbol&&&%>, null, null))\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\treturn result;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (RuntimeException e)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\texception = e;\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (<%\nif (!genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>result != null || <%\n}\n//&&&staticSymbol&&&%>exception == null) return result;\n//&&&staticSymbol&&& \n//&&&staticSymbol&&&\t\tthrow exception;\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn (<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)super.createFromString(literal);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn ((<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)super.createFromString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, literal)).<%\n//&&&staticSymbol&&&=genDataType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>super.createFromString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (!genPackage.isDataTypeConverters() && genModel.useGenerics() && genDataType.isUncheckedCast() && !genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@SuppressWarnings(\"unchecked\")\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, String initialValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=((GenEnum)genDataType).getImportedInstanceClassName()\n//&&&staticSymbol&&&%> result = <%\n//&&&staticSymbol&&&=((GenEnum)genDataType).getImportedInstanceClassName()\n//&&&staticSymbol&&&%>.get(initialValue);\n//&&&staticSymbol&&&\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + eDataType.getName() + \"'\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(3)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.getObjectInstanceClassName().equals(genBaseType.getObjectInstanceClassName())) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (initialValue == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.ArrayList\")\n//&&&staticSymbol&&&%><%\nif (genModel.useGenerics()) {\n//&&&staticSymbol&&&%><<%=genItemType.getObjectType().getImportedParameterizedInstanceClassName()%>><%\n}\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%> stringTokenizer = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%>(initialValue); stringTokenizer.hasMoreTokens(); )\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (String item : split(initialValue))\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString item = stringTokenizer.nextToken();\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(<%\nif (!genItemType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genItemType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (initialValue == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%> result = null;\n//&&&staticSymbol&&&\t\tRuntimeException exception = null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = <%\nif (!genDataType.isObjectType() && !genDataType.getObjectInstanceClassName().equals(genMemberType.getObjectInstanceClassName())) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tif (result != null && <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.util.Diagnostician\")\n//&&&staticSymbol&&&%>.INSTANCE.validate(eDataType, result, null, null))\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\treturn result;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (RuntimeException e)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\texception = e;\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (result != null || exception == null) return result;\n//&&&staticSymbol&&& \n//&&&staticSymbol&&&\t\tthrow exception;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>super.createFromString(initialValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>super.createFromString(eDataType, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) { String eDataType = genDataType.getQualifiedClassifierAccessor();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic String convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>final <%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%> <%\nif (genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>it<%\n} else {\n//&&&staticSymbol&&&%>instanceValue<%\n}\n//&&&staticSymbol&&&%>)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getConverterBody(genModel.getIndentation(stringBuffer))\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : instanceValue.toString();\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (isPrimitiveConversion) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(instanceValue<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genBaseType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>()<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genBaseType.getGenPackage().isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedFactoryInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&&\t\tif (instanceValue.isEmpty()) return \"\";\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nString item; if (!genModel.useGenerics()) { item = \"i.next()\"; \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.Iterator\")\n//&&&staticSymbol&&&%> i = instanceValue.iterator(); i.hasNext(); )\n//&&&staticSymbol&&& <%\n} else { item = \"item\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.Object\")\n//&&&staticSymbol&&&%> item : instanceValue)\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genItemType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genItemType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(' ');\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result.substring(0, result.length() - 1);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (!genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>.isInstance(instanceValue))\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\ttry\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genMemberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else if (genMemberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(((<%\n//&&&staticSymbol&&&=genMemberType.getObjectType().getImportedInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue).<%\n//&&&staticSymbol&&&=genMemberType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>());\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genMemberType.getObjectType().getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage().isDataTypeConverters()) { genMemberType = genMemberType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genMemberType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tif (value != null) return value;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t\tcatch (Exception e)\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\t// Keep trying other member types until all have failed.\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>new <%\n//&&&staticSymbol&&&=genMemberType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(instanceValue)<%\n} else {\n//&&&staticSymbol&&&%>instanceValue<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage().isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>new <%\n//&&&staticSymbol&&&=genMemberType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(instanceValue)<%\n} else {\n//&&&staticSymbol&&&%>instanceValue<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tif (value != null) return value;\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (Exception e)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\t// Keep trying other member types until all have failed.\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :\"+<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>.getName());\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(instanceValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(instanceValue));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useGenerics() && (genDataType.getItemType() != null || genDataType.isUncheckedCast()) && (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody())) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@SuppressWarnings(\"unchecked\")\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic String convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, Object instanceValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : instanceValue.toString();\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n} else { final String singleWildcard = genModel.useGenerics() ? \"<?>\" : \"\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.List\")\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=singleWildcard\n//&&&staticSymbol&&&%> list = (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.List\")\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=singleWildcard\n//&&&staticSymbol&&&%>)instanceValue;\n//&&&staticSymbol&&&\t\tif (list.isEmpty()) return \"\";\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nString item; if (!genModel.useGenerics()) { item = \"i.next()\"; \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.Iterator\")\n//&&&staticSymbol&&&%> i = list.iterator(); i.hasNext(); )\n//&&&staticSymbol&&& <%\n} else { item = \"item\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.Object\")\n//&&&staticSymbol&&&%> item : list)\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(' ');\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result.substring(0, result.length() - 1);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(((<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue)<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genDataType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>()<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>.isInstance(instanceValue))\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\ttry\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tif (value != null) return value;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t\tcatch (Exception e)\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\t// Keep trying other member types until all have failed.\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :\"+eDataType.getName());\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>(<%\n}\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>).<%\n//&&&staticSymbol&&&=genDataType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>()<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(instanceValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(eDataType, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nfor (GenClass genClass : genPackage.getGenClasses()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genClass.hasFactoryInterfaceCreateMethod()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns a new object of class '<em><%\n//&&&staticSymbol&&&=genClass.getFormattedName()\n//&&&staticSymbol&&&%></em>'.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @return a new object of class '<em><%\n//&&&staticSymbol&&&=genClass.getFormattedName()\n//&&&staticSymbol&&&%></em>'.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=genClass.getTypeParameters()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getImportedInterfaceName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getInterfaceTypeArguments()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genClass.getName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns an instance of data type '<em><%\n//&&&staticSymbol&&&=genDataType.getFormattedName()\n//&&&staticSymbol&&&%></em>' corresponding the given literal.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @param literal a literal of the data type.\n//&&&staticSymbol&&&\t * @return a new instance value of the data type.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedInstanceClassName()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(String literal);\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns a literal representation of an instance of data type '<em><%\n//&&&staticSymbol&&&=genDataType.getFormattedName()\n//&&&staticSymbol&&&%></em>'.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @param instanceValue an instance value of the data type.\n//&&&staticSymbol&&&\t * @return a literal representation of the instance value.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tString convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%> instanceValue);\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (!isImplementation && !genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns the package supported by this factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @return the package supported by this factory.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=genPackage.getPackageInterfaceName()\n//&&&staticSymbol&&&%> get<%\n//&&&staticSymbol&&&=genPackage.getBasicPackageName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n} else if (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%> get<%\n//&&&staticSymbol&&&=genPackage.getBasicPackageName()\n//&&&staticSymbol&&&%>()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\treturn (<%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>)getEPackage();\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @deprecated\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Deprecated\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic static <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%> getPackage()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.eINSTANCE;\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&} //<%\n//&&&staticSymbol&&&*%%storeSymbol%%*1\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.emitSortedImports();\n//&&&staticSymbol&&&%>\n\n}", "private void newArrayInitialize(NewArrayIRTuple instr) throws IOException{\n\n String type = (String)instr.getArg0();\n ArgumentVariable arg1 = new ArgumentVariable(instr.getArg1());\n ArgumentVariable result = new ArgumentVariable(instr.getResult());\n\n //Store $ra on stack\n writer.write(\"addi $sp, $sp, -20\\n\");\n writer.write(\"sw $ra, 16($sp)\\n\");\n\n //Store $a0\n writer.write(\"sw $a0, 12($sp)\\n\");\n\n //Store $t0-$t1 on the stack\n for(int i = 0; i < 2; i++)\n {\n writer.write(\"sw $t\" + i + \", \" + (8 - (4*i)) + \"($sp)\\n\");\n }\n\n //Store $v0 on the stack\n writer.write(\"sw $v0, 0($sp)\\n\");\n\n if(arg1.type.equals(\"constant\"))\n writer.write(\"li $a0, \" + arg1.getValue(curAddTable) + \"\\n\");\n else\n writer.write(\"move $a0, \" + arg1.getValue(curAddTable) + \"\\n\");\n if(type.equals(\"int\"))\n writer.write(\"sll $a0, $a0, 2\\n\");\n\n //Call the function of \"_new_array\"\n writer.write(\"jal _new_array\\n\");\n writer.write(\"lw $t0, 8($sp)\\n\");\n writer.write(\"lw $t1, 4($sp)\\n\");\n\n writer.write(\"lw $a0, 12($sp)\\n\");\n writer.write(\"move \" + result.getValue(curAddTable) + \", $v0\\n\");\n\n writer.write(\"lw $v0, 0($sp)\\n\");\n writer.write(\"lw $ra, 16($sp)\\n\");\n writer.write(\"addi $sp, $sp, 20\\n\");\n\n }", "public Instructions() {\n\n\t\t// String code = codeIn.trim();\n\t\t// code = code.replaceAll(\"\\\\s+\", \"\");\n\t\t// System.out.println(\"Code In:\\n\" + code);\n\t\t//\n\t\t// int len = code.length();\n\t\t// int chunkLength = 2; // the length of each chunk of code\n\t\t// int i = 0;\n\n\t\t// Create new Memory Array\n\t\tMA = new MemoryArray();\n\n\t\t// traverse entered code and split into 2 digit chunks\n\t\t// for (i = 0; i < len; i += chunkLength) {\n\t\t//\n\t\t// String chunk = code.substring(i, Math.min(len, i + chunkLength));\n\t\t// System.out.println(\"code chunk no. \" + (i / 2) + \" \" + chunk);\n\t\t//\n\t\t// opCode(chunk); // TODO - need to call this from the memory class I\n\t\t// think\n\n\t\tmem = new Memory();\n\n\t\tmemDispalyString();\n\n\t\tproc = new ProcessorLoop();\n\n\t\t// set the memory address and OpCode\n\t\t// mem.setAddress(addr);\n\t\t// // convert to decimal\n\t\t// mem.setOpCode(Integer.parseInt(chunk, 16));\n\t\t// System.out.println(\"oc = \" + (Integer.parseInt(chunk, 16)));\n\t\t//\n\t\t// // add the memory object to the memory array\n\t\t// MA.addMemoryObjects(addr, mem);\n\t\t// System.out.println(\"New memory = \" + mem.getAddress() + \" \"\n\t\t// + mem.getOpCode());\n\t\t// addr++;\n\t\t// }\n\n\t}", "protected void program() {\n m_errorHandler.startNonT(NonT.PROGRAM);\n match(TokenCode.CLASS);\n match(TokenCode.IDENTIFIER);\n match(TokenCode.LBRACE);\n variableDeclarations();\n if (m_errorHandler.errorFree()) {\n m_generator.generate(TacCode.GOTO, null, null, new SymbolTableEntry(\"main\"));\n }\n methodDeclarations();\n match(TokenCode.RBRACE);\n m_errorHandler.stopNonT();\n if (m_errorHandler.errorFree()) {\n m_generator.print();\n }\n }", "private static void sample1() {\n\t\tIComputer computer = new Computer();\n\t\tcomputer.setProgram(\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0x71,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xc1,\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xff);\n\t\tTestContext context = new TestContext(\n\t\t (byte) 0xa1, (byte) 0x9b, (byte) 0x3c);\n\t\tcomputer.run(context);\n\t\tSystem.out.println(context.outputToString());\n\t}", "public static void main(String[] args) throws IOException {\n\r\n ParserMain Parse = new ParserMain(args);\r\n Node n_program = Parse.program();\r\n\tSystem.out.println(\"\\ninside parser: parsing end, pass tree ro type checking\\n\");\r\n CodeGener cg= new CodeGener(n_program,args[0]); ////////////////////////////////////////////////////////////////////////////////////kavita\r\n h_typeCheckingClass tp = new h_typeCheckingClass(n_program);\r\n Node result = tp.starttype(n_program);\r\n\tSystem.out.println(\"\\ninside parser: TYPE checking end, pass tree to WRITING AST\\n\");\r\n AST2word ast=new AST2word();\r\n ast.read(result, args);\r\n\r\n\r\n\r\n\r\n }", "public static void main(String[] args) throws Exception {\n\n long startTime = System.currentTimeMillis();\n String inputFilePath = FILE_PATH;\n HackAssembler assembler = new HackAssembler();\n assembler.assemble(inputFilePath);\n long endTime = System.currentTimeMillis();\n System.out.println(\"Total asembly time: \"+(endTime - startTime) +\" ms\");\n\n }", "public Program program() {\n\n if (lexer.token != Symbol.PROGRAM) {\n error.signal(\"Missing PROGRAM keyword\");\n }\n\n lexer.nextToken();\n\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Missing PROGRAM identifier\");\n }\n\n Ident id = new Ident(lexer.getStringValue());\n\n lexer.nextToken();\n\n if (lexer.token != Symbol.BEGIN) {\n error.signal(\"Missing BEGIN keyword to PROGRAM\");\n }\n\n lexer.nextToken();\n\n ProgramBody pgm = pgm_body(); \n \n if (lexer.token != Symbol.END) {\n error.signal(\"Missing END keyword to PROGRAM\");\n }\n\n if(symbolTable.getFunction(\"main\") == null)\n error.show(\"The program must have a main function\");\n \n lexer.nextToken();\n\n return new Program(id, pgm);\n }", "public ProgramParser(String[] args) throws InterpreterException {\n java.util.Scanner scanner;\n String text = \"\";\n try {\n scanner = new java.util.Scanner(new java.io.File(args[0]));\n text = scanner.useDelimiter(\"\\u005c\\u005cA\").next();\n scanner.close();\n ProgramParser.programCode = new java.io.StringReader(text);\n } catch (FileNotFoundException ex) {\n throw new InterpreterException(\"FileNotFoundException\", \"Check file path.\", ex.getMessage());\n }\n ProgramParser.stringInput = args[1];\n System.out.println(\"Program: \" + args[0] + \" - input: \" + stringInput);\n //System.out.println(\"code\\n\" + text + \"\\n---Done\");\n }", "public static void main(String... strings) {\n\t\t\n\t\tfinal MipsComputer comp = new MipsComputer();\n\t\t\n\t\tFile f = new File(filePath);\n\t\tif (f.exists() && !f.isDirectory()) {\n\t\t\tcomp.setFromMars(true);\n\t\t\treadInstructionsFromFile(f, comp);\n\t\t} else {\n\t\t\tcomp.setFromMars(false);\n\t\t\treadInstructionsFromArray(comp);\n\t\t}\n\t\t\n\t\tcomp.execute();\n\t\tcomp.print();\n\t}", "public abstract void compile();", "public static void printIRCode(){\n\t\tfor (int i=0; i < ircode.size(); i++){\n\t\t\tSystem.out.println(\";\"+ircode.get(i).printCode());\n\t\t}\n\t}", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }", "public static void generateProperIRAndPrintToStream(OutputStream out,\n\t\t\tSymbolTable rSymbolTable, \n\t\t\tGeneration g,\n\t\t\tICodeGenerator registerAllocator,\n\t\t\tICodeGenerator instructionSelector,\n\t\t\tObject ... extraArgs\n\t\t\t) throws IOException {\n\t\tString lineSep = System.getProperty(\"line.separator\");\n\n\t\tout.write((\"#Assembly generated by TIGGER on \"\n\t\t\t\t+ (new Date()).toString() + lineSep).getBytes());\n\n\t\t/* first, we need to output the proper data segment header */\n\t\tout.write((\".data\"+lineSep).getBytes());\n\n\t\t//write our special identifier ___linefeed which we will use to print\n\t\t//newlines.\n\t\tout.write((\"___linefeed:.asciiz \\\"\\n\\\"\" + lineSep).getBytes());\n\t\t\n\t\tIterable<VarEntry> toWrite = \n\t\t\t\tIterables.concat(rSymbolTable.getAllVarEntriesForThisAndKids(),\n\t\t\t\tg.getTempSymbolTable().getAllVarEntriesForThisAndKids());\n\t\t\n\t\tfor (VarEntry e : toWrite) {\n\t\t\tif (e.getTigerType().isArray()) {\n\t\t\t\t/* then let's output a .space instruction to make room */\n\t\t\t\tout.write((e.getUniqueVarId() + \":\\t\" \n\t\t\t\t\t\t+ \".align\\t 2\" + lineSep\n\t\t\t\t\t\t+ \".space\\t\"\n\t\t\t\t\t\t+ e.getTotalNumberOfElementsForArrayVar()*4 + lineSep)\n\t\t\t\t\t\t.getBytes());\n\t\t\t} else { // let's output a .word instruction to reserve one slot\n\t\t\t\tout.write((e.getUniqueVarId() + \":\\t\" + \".word\\t\" + \"0\" + lineSep)\n\t\t\t\t\t\t.getBytes());\n\t\t\t}\n\t\t}\n\t\n\t\t/* second, we need to output the proper code! */\n\t\tout.write((\".text\"+lineSep).getBytes());\n\t\tList<IRInstruction> irCode = g.getCodeList();\n\n\t\tList<IRInstruction> regInstrs = registerAllocator \n\t\t\t\t.generateCode(irCode, rSymbolTable, g, extraArgs);\n\n\t\tList<IRInstruction> codeInstrs = instructionSelector\n\t\t\t\t.generateCode(regInstrs, rSymbolTable, g);\n\n\t\tfor (IRInstruction c : codeInstrs) {\n\t\t\tout.write((c.toString() + lineSep).getBytes());\n\t\t}\n\t\t\n\t}", "public static void program(Map<Integer, String[]> codeValues){\n String currentByteCodeIn;\n for (int i = 1; i <= codeValues.size(); i++) {\n\n currentByteCodeIn = \"bytecode.\"+ CodeTable.getCode(codeValues.get(i)[0]);\n\n try {\n ByteCode newCode = (ByteCode) (Class.forName(currentByteCodeIn).getDeclaredConstructor().newInstance());\n\n byteCodeVector.add(newCode);\n if(currentByteCodeIn.equals(\"bytecode.LabelByteCode\")){\n newCode.setAddrs(i);\n }\n newCode.init(codeValues.get(i));\n programMap.put(i, codeValues.get(i));\n }catch(ClassNotFoundException e){\n System.err.println(\"Class \" + currentByteCodeIn+ \" not found.\");\n e.printStackTrace();\n }catch(InstantiationException e){\n System.err.println(\"Error creating \" + currentByteCodeIn+ \" instance.\");\n e.printStackTrace();\n }catch(IllegalAccessException e){\n System.err.println(\"Error accessing \" + currentByteCodeIn+ \" instance.\");\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n System.err.println(\"Method does not exist\");\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n addAddresses();\n\n }", "public BasicCode(String instruction) {\n\t\tsuper();\n\t\tthis.instruction = instruction;\n\t}", "public static void main(String[] args) throws Exception {\n Interpreter i = new Interpreter(readFile(\"yourFilePathGoesHERE\"));\n i.evalProgram();\n }", "void gen() {\n int argCount = args.length;\r\n assert (argCount <= X86.argRegs.length);\r\n // If indirect jump through a register, make\r\n // sure this is not an argument register that\r\n // we're about to overwrite!\r\n X86.Operand call_target = null;\r\n if (ind) {\r\n\tif (tgt instanceof Reg) {\r\n\t call_target = env.get(tgt);\r\n\t assert (call_target != null); // dead value surely isn't used as a source\r\n\t for (int i = 0; i < argCount; i++)\r\n\t if (call_target.equals(X86.argRegs[i])) {\r\n\t X86.emitMov(X86.Size.Q,call_target,tempReg2);\r\n\t call_target = tempReg2;\r\n\t break;\r\n\t }\r\n\t} else // tgt instanceof Global \r\n\t call_target = new X86.AddrName(((Global)tgt).toString());\r\n }\r\n // Move arguments into the argument regs.\r\n // First do parallel move of register sources.\r\n X86.Reg src[] = new X86.Reg[argCount];\r\n X86.Reg dst[] = new X86.Reg[argCount];\r\n boolean moved[] = new boolean[argCount]; // initialized to false\r\n int n = 0;\r\n for (int i = 0; i < argCount; i++) {\r\n\tIR.Src s = args[i];\r\n\tif (s instanceof Reg) {\r\n\t X86.Operand rand = env.get((Reg) s);\r\n\t if (rand instanceof X86.Reg) {\r\n\t src[n] = (X86.Reg) rand;\r\n\t dst[n] = X86.argRegs[i];\r\n\t n++;\r\n\t moved[i] = true; \r\n\t }\r\n\t}\r\n }\r\n new X86.ParallelMover(n,src,dst,tempReg1).move();\r\n // Now handle any immediate sources.\r\n for (int i = 0; i < argCount; i++) \r\n\tif (!moved[i]) {\r\n\t X86.Operand r = args[i].gen_source_operand(true,X86.argRegs[i]);\r\n\t X86.emitMov(X86.Size.Q,r,X86.argRegs[i]);\r\n\t}\r\n if (ind) {\r\n\tX86.emit1(\"call *\", call_target);\r\n } else\r\n\tX86.emit1(\"call\", new X86.GLabel((((Global)tgt).toString())));\r\n if (rdst != null) {\r\n\tX86.Reg r = rdst.gen_dest_operand();\r\n\tX86.emitMov(X86.Size.Q,X86.RAX,r);\r\n }\r\n }", "void genAst();", "public void compile(String[] args){\n CharStream stream;\n if(args.length == 1){\n try {\n stream = new ANTLRFileStream(args[0]);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler o ficheiro \\\"\" + args[0] + \"\\\".\");\n e.printStackTrace();\n return;\n }\n } else{\n try {\n stream = new ANTLRInputStream(System.in);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler do stdin.\");\n e.printStackTrace();\n return;\n }\n }\n\n System.out.println(stream.toString());\n\n LissLexer lexer = new LissLexer(stream);\n TokenStream token = new CommonTokenStream(lexer);\n LissParser parser = new LissParser(token);\n parser.liss(this.idt,this.errorTable,this.mips);\n }", "public CKRProgram(CKRKnowledgeBase inputCKR) {\n\t\tthis.inputCKR = inputCKR;\n\t\tthis.manager = inputCKR.getGlobalOntology().getOWLOntologyManager();\n\t\t\n\t\t//this.outputFilePath = DEFAULT_OUTPUT_FILENAME;\n\t\t//this.dlvPath = DEFAULT_DLV_PATH;\n\t\t\n\t\tthis.globalModelComputationTime = 0;\n\t\tthis.rewritingTime = 0;\n\t}", "public static void main(String[] args) {\n\t\tAbstractFactory tarrifFactory = FactoryProducer.getFactory(\"Tarrif\");\n\t\tAbstractFactory operatorFactory = FactoryProducer.getFactory(\"Operator\");\n\t\tTarrif tarrif = tarrifFactory.getMobileTarrif(\"Smart familly\");\n\t\tSystem.out.println(tarrif.toString());\n\t\tMobileOperator operator = operatorFactory.getMobileOperator(\"Life\");\n\t\tSystem.out.println(operator.toString());\n\n\t}", "private void initializeFile() {\n\t\twriter.println(\"name \\\"advcalc\\\"\");\n\t\twriter.println(\"org 100h\");\n\t\twriter.println(\"jmp start\");\n\t\tdeclareArray();\n\t\twriter.println(\"start:\");\n\t\twriter.println(\"lea si, \" + variables);\n\t}", "public void executeLDR(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tBitString offset6 = mIR.substring(10, 6);\n\n\t\tBitString wantedVal = mMemory[mRegisters[sourceBS.getValue()].getValue2sComp() + offset6.getValue2sComp()];\n\t\tmRegisters[destBS.getValue()] = wantedVal;\n\n\t\tsetConditionalCode(wantedVal);\n\t}", "private static void simpleRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tboolean testHardware = args[0].equals(\"-testCGRAVerilog\");\n\t\t\n\t\t\n\t\tboolean synthesis = false;\n\t\tif(args[0].equals(\"-testCGRAVerilog\") || args[3].equals(\"true\")){\n\t\t\tsynthesis = true;\n\t\t} else if (args[3].equals(\"false\")){\n\t\t\tsynthesis = false;\n\t\t} else{\n\t\t\tSystem.out.println(\"Synthesis parameter not set correctly: \" + args[3]+ \"\");\n\t\t\tSystem.out.println(\"Valid values are \\\"true\\\" and \\\"false\\\"\");\n\t\t\tSystem.out.println(\"Aborting...\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tConfMan configManager = new ConfMan(args[1], applicationPath, synthesis);\n\t\t\n\t\tTrace simpleRunTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tsimpleRunTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(simpleRunTrace);\n\t\t}\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#.000\", symbols);\n\t\t\n\t\tAmidarSimulationResult results = run(configManager, null, testHardware);\n\t\t\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tsimpleRunTrace.setPrefix(\"results\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Synthesis \"+(configManager.getSynthesis()?\"ON\":\"OFF\"));\n\t\t\tsimpleRunTrace.println(\"Ticks: \"+results.getTicks());\n\t\t\tsimpleRunTrace.println(\"Bytecodes: \"+results.getByteCodes());\n\t\t\tsimpleRunTrace.println(\"Energy consumption: \"+formater.format(results.getEnergy()));\n\t\t\tsimpleRunTrace.println(\"Execution Time: \"+results.getExecutionDuration()+\" ms\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresults.getProfiler().reportProfile(simpleRunTrace);\n\t\t\tsimpleRunTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresults.getKernelProfiler().reportProfile(simpleRunTrace, results.getTicks());\n\t\t}\n\t\t\n\t\tif(testHardware){\n\t\t\tsimpleRunTrace.setPrefix(\"CGRA verilog test\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Testing CGRA Verilog descrption\");\n\t\t\tAmidar core = results.getAmidarCore();\n\t\t\tCGRA myCGRA = (CGRA)core.functionalUnits[core.functionalUnits.length-1]; // CGRA is the last one\n\t\t\t\n\t\t VerilogGenerator gen = target.Processor.Instance.getGenerator();\n\t\t CgraModel model = myCGRA.getModel();\n\t\t model.finalizeCgra();\n\t\t simpleRunTrace.println(\"Generate Verilog...\");\n\t\t gen.printVerilogDescription(\"out\",model);\n\t\t TestbenchGeneratorAmidar tbgen = new TestbenchGeneratorAmidar((VerilogGeneratorAmidar) gen);\n\t\t StimulusAmidar[] stimuli = new StimulusAmidar[1];\n\t\t stimuli = myCGRA.getStimulus().toArray(stimuli);\n\t\t TestbenchContextGenerator tbcongen = new TestbenchContextGenerator(model);\n\t\t tbcongen.exportContext(myCGRA.getContextCopyPEs(), myCGRA.getContextCopyCBOX(), myCGRA.getContextCopyCCU());\n//\t\t for(Stimulus stim : stimuli){\n//\t\t \tSystem.out.println(stim);\n//\t\t }\n\t\t \n\t\t tbgen.exportAppAndPrintTestbench(stimuli);\n\t\t \n//\t\t tbgen.importAppAndPrintTestbench(\"SimpleTest.main\");\n\t\t TestbenchExecutor tbex = new TestbenchExecutor();\n\t\t \n\t\t if(tbex.runTestbench()){\n\t\t \tsimpleRunTrace.println(\"Run was successful - Cosimulation succeeded\");\n\t\t }\n\t\t else{\n\t\t \tConsistencyChecker sammi = new ConsistencyChecker();\n\t\t \tboolean mismatch = sammi.findRegfileMismatch();\n\t\t \tif(mismatch){\n\t\t \t\tsimpleRunTrace.println(\"Error(s) during Simulation. Something went wrong in the data path\");\n\t\t \t}\n\t\t \telse{\n\t\t \t\tsimpleRunTrace.println(\"Emulation / HDL missmatch. Maybe there's is something not equal concerning the communication or FSM.\");\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n int num = 400 ;\n _12_Integer_to_Roman integer_to_roman = new _12_Integer_to_Roman();\n String work = integer_to_roman.work(num);\n System.out.println(\"work is: \" + work) ;\n }", "public interface Interpreter {\n StringBuilder process(File file);\n}", "public static void main(String[] args) throws IOException {\n \n // set parameter set list\n ParameterSetListMaker maker = new ParameterSetListMaker(DefaultParameterRecipes.getDEFAULT_PARAMETER_RECIPES());\n List<ParameterSet> psList = maker.getParameterSetList();\n \n //Get sequenceDNA a singleton chromsomome II currently\n Path p1 = Paths.get(ParameterSet.FA_SEQ_FILE);\n seq = new SequenceDNA(p1, new SeqInterval(ParameterSet.SEQUENCE_START, ParameterSet.SEQUENCE_END));\n \n //Get PUExpt chromosome II - a singleton\n Path p = Paths.get(ParameterSet.BIN_COUNT_FILE);\n pu = new PuExperiment(p, new SeqBin(ParameterSet.PU_BIN_SIZE,0)); //the pu experiment under study - also sets bin size for analysis\n \n //Get genbank annotation file of chromosome II - a singleton\n Path p2 = Paths.get(ParameterSet.CHROMOSOME_II_GENBANK);\n annotation = new SequenceDNAAnnotationGenbank(p2);\n \n //get transcript list - a singleton\n transcriptList = annotation.getTranscriptsByType(type-> type == Transcript.TRANSCRIPT_TYPE.MRNA || type == Transcript.TRANSCRIPT_TYPE.SNRNA ||\n type == Transcript.TRANSCRIPT_TYPE.RRNA || type == Transcript.TRANSCRIPT_TYPE.SNORNA || type == Transcript.TRANSCRIPT_TYPE.TRNA);\n \n //get Rif1 list\n Path rif1p = Paths.get(ParameterSet.RIF1_INTERVAL_FILE);\n rif1List = new Rif1Sites(rif1p).getRif1IntervalList();\n \n \n //RUN PARAMETER SETS FOR DYNAMIC SIMULATION\n \n //Iterate over all parameter sets\n for (ParameterSet paramSet : psList) { \n\n //Create probability distribution based on transcript exclusion and AT content\n probDistribution = new ProbabilityDistribution2(seq.atFunction(paramSet.getInitiatorSiteLength()), paramSet, \n annotation.getTranscriptBlocks(transcriptList));\n\n //Replicate molecules\n population = new ReplicatingMoleculePopulation(probDistribution, paramSet, rif1List);\n\n //Create new model comparator to compare pu data with predicted right fork frequency distribution from population of replicating molecules\n modelComparator = new AtModelComparator(pu, ParameterSet.SEQUENCE_START / ParameterSet.PU_BIN_SIZE, population.getPopulationAveRtForkFreqInBins());\n \n //print list of interTranscripts with probabilities\n /*System.out.println(\"index\\tstart\\tend\\tAT Content\\tRif1 index\\tprob\"); \n InterTranscriptSites sites = new InterTranscriptSites(seq, annotation.getTranscriptBlocks(transcriptList), rif1List, probDistribution);\n sites.getInterTranscriptList().forEach(System.out::println);\n System.out.println(\"\");*/\n\n switch (task) {\n case PRINT_PARAMETER_SET:\n System.out.println(paramSet); \n break;\n case PRINT_SEQUENCE:\n System.out.println(seq.intervalToString(new SeqInterval(0, seq.getLength() - 1)));\n break;\n case PRINT_CDF:\n System.out.println(paramSet); \n System.out.println(\"MIDPOINT\\tCDF\");\n probDistribution.printCDf(ParameterSet.PU_BIN_SIZE);\n break;\n case PRINT_MEAN_SQUARED_DEVIATION_RIGHT_FORK_FREQUENCY:\n System.out.println(\"MSD\\tNumPreRCs\\tExpConst\\tAttenuator\\tInitLength\\tMaxRate\\tStdDevPredicted\\tStdDevObserved\");\n System.out.println(modelComparator.getMeanSquaredDifference() + \"\\t\" + paramSet.getNumberInitiators() + \"\\t\" + paramSet.getExponentialPowerFactor() + \"\\t\" + \n paramSet.getAttenuationFactor() + \"\\t\" + paramSet.getInitiatorSiteLength() \n + \"\\t\" + paramSet.getMaxFiringProbabilityPerMin() + \"\\t\" + modelComparator.getPredictedStdDeviation() + \"\\t\" + modelComparator.getObservedStdDeviation());\n break;\n case PRINT_PREDICTED_AND_OBSERVED_RIGHT_FORK_FREQUENCIES:\n printPredictedAndObservedRtForkFrequencies(paramSet);\n break;\n case PRINT_INITIATION_FREQUENCIES:\n printInitiationFrequencies(paramSet);\n break;\n case PRINT_TERMINATION_FREQUENCIES:\n printTerminationFrequencies(paramSet);\n break;\n case PRINT_MEDIAN_REPLICATION_TIMES_FOR_BINS_IN_GENOME:\n System.out.println(paramSet);\n System.out.println(\"Position\\tMedianTime\");\n List<Double> replicationTimes = population.getPopulationMedianTimeOfReplicationInBins(ParameterSet.PU_BIN_SIZE, ParameterSet.NUMBER_BINS);\n for (int i = 0; i < replicationTimes.size(); i++) {\n System.out.println(i * ParameterSet.PU_BIN_SIZE + ParameterSet.PU_BIN_SIZE / 2 + \"\\t\" + replicationTimes.get(i));\n }\n break;\n case PRINT_SPHASE_DURATION_FOR_MOLECULES_IN_POPULATION:\n System.out.println(paramSet);\n population.getElapsedTimeList().stream().forEach(f-> System.out.println(f));\n break;\n case PRINT_FRACTION_REPLICATED_OF_BINS_AT_GIVEN_TIME:\n System.out.println(paramSet);\n System.out.println(\"ELAPSED TIME: \" + timeOfReplication + \" min\");\n System.out.println(\"Position\\tFxReplicated\");\n List<Double> fxReplicated = population.getPopulationAveFxReplicatedInBins(timeOfReplication, ParameterSet.PU_BIN_SIZE, ParameterSet.NUMBER_BINS, paramSet.getMinPerCycle());\n for (int i = 0; i < fxReplicated.size(); i++) {\n System.out.println(i * ParameterSet.PU_BIN_SIZE + ParameterSet.PU_BIN_SIZE / 2 + \"\\t\" + fxReplicated.get(i));\n }\n break;\n case PRINT_REPLICATION_TIME_OF_BIN_FOR_MOLECULES_IN_POPULATION:\n System.out.println(paramSet);\n System.out.println(\"BIN NUMBER: \" + binNumber);\n for (int i = 0; i < paramSet.getNumberCells(); i++) {\n System.out.println(population.getPopulationTimesOfReplicationOfBin(binNumber)[i]);\n }\n break;\n case PRINT_RF_DELTA_LIST:\n PrintDeltaAtContentAndNumberTranscribedPositionsOfBins();\n }\n } \n }", "public static void main(String args[]) throws Exception{\r\n java.io.BufferedReader in;\r\n Yylex sc;\r\n parser p;\r\n java_cup.runtime.Symbol sroot;\r\n boolean error=false;\r\n\r\n //El primer parametro es el nombre del fichero con el programa\r\n if (args.length != 2) {\r\n System.out.println(\r\n \"Uso: java Main <nombre_fichero> <fichero_generado>\");\r\n error=true;\r\n }\r\n\r\n //Analisis lexico y sintactico\r\n\r\n if (!error) {\r\n \ttry {\r\n \t in = new java.io.BufferedReader(new java.io.FileReader(args[0]));\r\n \t sc = new Yylex(in);\r\n \t p = new parser(sc);\r\n \t sroot = p.parse();\r\n \t System.out.println(\"Análisis léxico y sintáctico correctos\");\r\n\r\n /* Codigo para el analisis semantico, empieza a computar desde el nodo raiz */\r\n S root = (S) sroot.value;\r\n root.computeAH1();\r\n System.out.println(\"Análisis semántico correcto\");\r\n /* Fin codigo analisis semantico */\r\n\r\n /* Codigo para generar codigo Java */\r\n codeGenerator(args[1], root);\r\n /* Fin codigo para generar codigo Java */\r\n \t} catch(IOException e) {\r\n \t System.out.println(\"Error abriendo fichero: \" + args[0]);\r\n \t error= true;\r\n \t}\r\n }\r\n }", "public static void main(String args[]) {\n if (args.length < 1) {\n System.out.println(\"usage: pgen <project name> <args>\");\n } else {\n Arguments arguments = parseArgs(args);\n File projectDir = new File(System.getProperty(\"user.dir\"), arguments.getFileName());\n GenRun run = null;\n switch (arguments.getMode()) {\n case KATTIS:\n run = new KattisRun(arguments.getFileTemplate(), projectDir, arguments.getFileName());\n break;\n default:\n run = new LocalRun(arguments.getFileTemplate(), projectDir, arguments.getFileName(), arguments.getExampleSize());\n }\n run.run();\n }\n }", "@Override protected void execute () throws InvalidInstructionException, MachineHaltException, RegisterSet.InvalidRegisterNumberException, MainMemory.InvalidAddressException\n {\n switch (insOpCode.get()) {\n case 0x0: // ld $i, d .............. 0d-- iiii iiii\n reg.set (insOp0.get(), insOpExt.get());\n break;\n case 0x1: // ld o(rs), rd .......... 1psd (p = o / 4)\n // TODO\n break;\n case 0x2: // ld (rs, ri, 4), rd .... 2sid\n // TODO\n break;\n case 0x3: // st rs, o(rd) .......... 3spd (p = o / 4)\n // TODO\n break;\n case 0x4: // st rs, (rd, ri, 4) .... 4sdi\n // TODO\n break;\n case 0x6: // ALU ................... 6-sd\n\tswitch (insOp0.get()) {\n\t case 0x0: // mov rs, rd ........ 60sd\n // TODO\n\t break;\n\t case 0x1: // add rs, rd ........ 61sd\n // TODO\n\t break;\n\t case 0x2: // and rs, rd ........ 62sd\n // TODO\n\t break;\n\t case 0x3: // inc rr ............ 63-r\n // TODO\n\t break;\n\t case 0x4: // inca rr ........... 64-r\n // TODO\n\t break;\n\t case 0x5: // dec rr ............ 65-r\n // TODO\n\t break;\n\t case 0x6: // deca rr ........... 66-r\n // TODO\n\t break;\n\t case 0x7: // not ............... 67-r\n // TODO\n\t break;\n\t default:\n\t throw new InvalidInstructionException();\n\t}\n\tbreak;\n case 0x7: // sh? $i,rd ............. 7dii\n // TODO\n break;\n case 0xf: // halt or nop ............. f?--\n\tif (insOp0.get() == 0)\n\t // halt .......................... f0--\n\t throw new MachineHaltException();\n\telse if (insOp0.getUnsigned() == 0xf)\n\t // nop ........................... ff--\n\t break;\n break;\n default:\n throw new InvalidInstructionException();\n }\n }", "public void run() {\n\t // Create the ouput directories\n\t interfDir = new File(outDirName+\"/\"+modelName);\n\t interfDir.mkdirs();\n\t implDir = new File(outDirName+\"/\"+modelName);\n\t implDir.mkdirs();\n\t // Create the parseAll visitor interface\n\t createParseAllVisitorInterface(interfDir);\n\t // Create the parseAll visitor implementation\n\t createParseAllVisitorImplementation(implDir);\n\t // Create the evaluateAll visitor interface\n\t createEvaluateAllVisitorInterface(interfDir);\n\t // Create the evaluateAll visitor implementation\n\t createEvaluateAllVisitorImplementation(implDir);\n\t}", "public void assemble(String filePath) throws Exception {\n\n System.out.println(\"Starting\");\n System.out.println(\"Loading Parser . . .\");\n File inputFile= new File(filePath);\n Parser parser = new Parser(inputFile);\n\n System.out.println(\"Loading SymbolTable . . . \");\n SymbolTable symbolTable = new SymbolTable();\n\n System.out.println(\"Parser first pass . . . \");\n parser.firstPass(symbolTable);\n System.out.println(\"Parser second pass . . . \");\n parser.secondPass(symbolTable);\n\n System.out.println(\"Complete\");\n\n }", "public void runIRL(String pathToEpisodes) {\n\n //create reward function features to use\n LocationFeatures features = new LocationFeatures(11 * 11);\n\n //create a reward function that is linear with respect to those features and has small random\n //parameter values to start\n LinearStateDifferentiableRF rf = new LinearStateDifferentiableRF(features, 11 * 11);\n for (int i = 0; i < rf.numParameters(); i++) {\n rf.setParameter(i, RandomFactory.getMapped(0).nextDouble() * 0.2 - 0.1);\n }\n\n //load our saved demonstrations from disk\n List<Episode> episodes = Episode.readEpisodes(pathToEpisodes);\n\n //use either DifferentiableVI or DifferentiableSparseSampling for planning. The latter enables receding horizon IRL,\n //but you will probably want to use a fairly large horizon for this kind of reward function.\n double beta = 10;\n //DifferentiableVI dplanner = new DifferentiableVI(this.domain, rf, 0.99, beta, new SimpleHashableStateFactory(), 0.01, 100);\n DifferentiableSparseSampling dplanner = new DifferentiableSparseSampling(this.domain, rf, 0.99, hashingFactory, 10, -1, beta);\n\n dplanner.toggleDebugPrinting(false);\n\n //define the IRL problem\n MLIRLRequest request = new MLIRLRequest(domain, dplanner, episodes, rf);\n request.setBoltzmannBeta(beta);\n\n //run MLIRL on it\n MLIRL irl = new MLIRL(request, 0.1, 0.1, 10);\n irl.performIRL();\n\n manualValueFunctionVis(new RewardValueProjection(rf),\n new GreedyQPolicy((QProvider) request.getPlanner()));\n\n }", "public static void main(String[] args) \n\t{\n\t\tif (args.length != 0) \n\t\t{\n\t\t\tnew Assembler(args[0]);\n\t\t\treturn;\n\t\t}\n\n\t\t// Otherwise, pop-up a JFileChooser to allow the user to use a GUI\n\t\t// to select the ASM file.\n\n\t\t//Schedule a job for the event dispatch thread:\n\t\t//creating and showing the assembler's JFileChooser.\n\t\tSwingUtilities.invokeLater(new Runnable() \n\t\t{\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\t//Turn off metal's use of bold fonts\n\t\t\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n\t\t\t\tJFileChooser fc = new JFileChooser();\n\t\t\t\t// Only allow the selection of files with an extension of .asm.\n\t\t\t\tfc.setFileFilter(new FileNameExtensionFilter(\"ASM files\", \"asm\"));\n\t\t\t\t// Uncomment the following to allow the selection of files and\n\t\t\t\t// directories. The default behavior is to allow only the selection\n\t\t\t\t// of files.\n\t\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\t\t\t\tif (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\tnew Assembler(fc.getSelectedFile().getPath());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"No file selected; terminating.\");\n\t\t\t}\n\t\t});\n\t}" ]
[ "0.6587498", "0.6587498", "0.6587498", "0.6207523", "0.6105852", "0.607318", "0.5978887", "0.5970015", "0.59157723", "0.59112394", "0.5906302", "0.5861107", "0.5853755", "0.5784803", "0.57667273", "0.5729638", "0.5723397", "0.570497", "0.56625396", "0.5655023", "0.5646752", "0.56466854", "0.5609926", "0.5606962", "0.55799115", "0.55656874", "0.55472153", "0.55382353", "0.5533847", "0.5531615", "0.55170566", "0.55064046", "0.5503157", "0.5496426", "0.54935074", "0.54884624", "0.546859", "0.5463282", "0.5457558", "0.5445567", "0.54331523", "0.5427369", "0.5373593", "0.53677845", "0.53667384", "0.5361142", "0.5340492", "0.5339661", "0.5319263", "0.53188896", "0.5313968", "0.5311957", "0.5309839", "0.5304031", "0.52979696", "0.52976644", "0.52932966", "0.5292481", "0.52905524", "0.5288074", "0.5282752", "0.5264779", "0.5263409", "0.5262512", "0.52528036", "0.52420515", "0.52345353", "0.52325726", "0.52310973", "0.5225297", "0.5225009", "0.5221158", "0.52168643", "0.5212907", "0.52067137", "0.52002215", "0.51975477", "0.5196146", "0.5195745", "0.5192637", "0.5192069", "0.51902515", "0.51860857", "0.5184867", "0.5180862", "0.5177549", "0.51653904", "0.51580596", "0.5157201", "0.51528883", "0.51524323", "0.5152397", "0.5149177", "0.5148262", "0.5148118", "0.5147806", "0.5143963", "0.51430124", "0.51301235", "0.5127102" ]
0.58306277
13
Method which is called when screen is shown. In this method create references to variables.
@Override public void show() { stage = new Stage(new FitViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT), batch); Gdx.input.setInputProcessor(stage); background = game.getAssetManager().get("startscreen.png"); bgViewPort = new StretchViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT); fonts = new Fonts(); fonts.createSmallestFont(); fonts.createSmallFont(); fonts.createMediumFont(); fonts.createLargeFont(); fonts.createTitleFont(); createButtons(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeVariables() {\n\t\ttvTimeShow= (TextView) findViewById(R.id.tvTimeTracker);\r\n\t}", "private void setupVariables() {\n mCalendarView = findViewById(R.id.calendarView);\n mTextView = findViewById(R.id.eventsView);\n }", "private void instantiateVariables() {\n paint = new Paint();\n fightActivity = (FightActivity) context;\n Typeface tf = Typeface.create(\"Arial\", Typeface.BOLD);\n paint.setTypeface(tf);\n }", "private void initialScreen() {\r\n\t\t// Clear the screen\r\n\t\tclear();\r\n\r\n\t\t// Place four asteroids\r\n\t\tplaceAsteroids();\r\n\r\n\t\t// Place the ship\r\n\t\tplaceShip();\r\n\r\n\t\t// Reset statistics\r\n\t\tlives = 3;\r\n\t\tdisplay.setLives(lives);\r\n\t\tnumLevel = 1;\r\n\t\tdisplay.setLevel(numLevel);\r\n\t\tdisplay.setScore(0);\r\n\t\tspeed = 3;\r\n\r\n\t\t// Start listening to events\r\n\t\tdisplay.removeKeyListener(this);\r\n\t\tdisplay.addKeyListener(this);\r\n\r\n\t\t// Give focus to the game screen\r\n\t\tdisplay.requestFocusInWindow();\r\n\t}", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "private void setVariables() {\n vb = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n linBoardGame = (LinearLayout) ((Activity) context).findViewById(boardID);\n gridContainer = (RelativeLayout) ((Activity) context).findViewById(R.id.gridContainer);\n shipTV = (TextView) ((Activity) context).findViewById(R.id.shipTV);\n linBoardGame.setOnTouchListener(this);\n sizeOfCell = Math.round(ScreenWidth() / (maxN + (1)));\n occupiedCells = new ArrayList<>();\n playerAttacks = new ArrayList<>();\n hit = false;\n gridID = R.drawable.grid;\n if (!player ) lockGrid = true;\n ships = new ArrayList<>();\n }", "private void initVars(){\n this.sOut = new StringBuilder();\n this.curPos = this.frameCount = 0;\n this.heldKeys = new int[257];\n this.showCursor = false;\n this.fontId = DAGGER40;\n Arrays.fill(this.heldKeys,-1);\n }", "private void initializeVariable() {\n\n\t\tlearn = (Button) findViewById(R.id.learnButton);\n\t\tlearn.setOnClickListener(this);\n\t\tplay = (Button) findViewById(R.id.playButton);\n\t\tplay.setOnClickListener(this);\n\t\tmode = (Button) findViewById(R.id.b_mode);\n\t\tmode.setOnClickListener(this);\n\t\tmode.setText(Global.currentMode + \" MODE\");\n\t\tclassID_SD = \"com.example.northamericanwildlifesounds.SOUNDDISPLAY\";\n\t\tsetUpAnimalData();\n\t}", "public void show(){\n initializeTouchpad();\n initializeButtons();\n initializeShieldBar();\n }", "public Screen() {\n\t\tobjects = new ArrayList<>();\n\t\tsetVisible(false);\n\t}", "private void initVars() {\r\n\t\tapplicationFrame = new JFrame(BPCC_Util.getApplicationTitle());\r\n\t\tBPCC_Util.setHubFrame(applicationFrame);\r\n\t}", "public void initialize(){\n\t screens.put(ScreenType.Game, new GameScreen(this));\n screens.put(ScreenType.Menu, new MenuScreen(this));\n }", "private void show(){\n mStartupNameTextView.setText(startup.getmStartupName());\n mStartupDomainTextView.setText(startup.getmDomain());\n mStartupFondTextView.setText(startup.getmFond());\n mStartupChiffreTextView.setText(startup.getmChiffre());\n mStartupNeedTextView.setText(startup.getmNeed());\n mStartupJuridiqueTextView.setText(startup.getmJuridiqueSatatus());\n mStartupCreateDateTextView.setText(startup.getmCreationDate());\n mStartupNumberEmployees.setText(startup.getmNumberEmployees());\n }", "public void onDisplay() {\n\n\t}", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "private void startingScreen() {\n screenWithGivenValues(-1,-2,1,2,3,-1,0);\n }", "private void initializeFields() {\r\n myFrame = new JFrame();\r\n myBoard = new Board();\r\n myBoard.addObserver(this);\r\n myTimer = new Timer(DEFAULT_TIMER_SPEED, new TimerListener(myBoard));\r\n myGamePanel = new TetrisPanel(myBoard);\r\n myNextPiecePanel = new NextPiecePanel(myBoard);\r\n myScorePanel = new ScorePanel(myBoard, myTimer, DEFAULT_TIMER_SPEED);\r\n myInfoPanel = new InfoPanel();\r\n myGamePaused = false;\r\n myGameOver = false;\r\n myPlayer = null;\r\n\r\n final MyKeyAdapter handler = new MyKeyAdapter();\r\n myFrame.addKeyListener(handler);\r\n }", "private void prepare()\r\n {\r\n MenuButton menubutton = new MenuButton();\r\n addObject(menubutton, 268, 406);\r\n Tittle tittle2 = new Tittle();\r\n addObject(tittle2, 544, 422);\r\n Exit exit2 = new Exit();\r\n addObject(exit2, 863, 427);\r\n tittle2.setLocation(545, 401);\r\n exit2.setLocation(848, 414);\r\n tittle2.setLocation(545, 411);\r\n }", "private void initializeVariables() {\n\t\tseekBar = (SeekBar) findViewById(R.id.seekBar1);\n\t\ttextView = (TextView) findViewById(R.id.finishText);\n\t\tspinner = (Spinner) findViewById(R.id.algorithm);\n\t\tsetSeekBarListener();\n\t\taddListenerOnAlgorithmSelection();\n\t}", "@Override protected void startup() {\n show(new MIDLetParamsView(this));\n }", "private void inIt() {\n\t\t\t\t\t\n\t\t\t\t\tLV_MoView = (ListView)findViewById(R.id.LV_Movie);\n\t\t\t\t\tTV_All = (TextView)findViewById(R.id.TV_All);\n\t\t\t\t\tTV_Collect = (TextView)findViewById(R.id.TV_Collect);\n\t\t\t\t\tTV_History = (TextView)findViewById(R.id.TV_History);\t\n\t\t\t\t}", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "private void initVariables() {\n ivBack.setVisibility(View.VISIBLE);\n tvTitle.setVisibility(View.VISIBLE);\n tvTitle.setText(getString(R.string.change_language));\n\n gifProgress.setImageResource(R.drawable.shopholic_loader);\n progressBar.setVisibility(View.GONE);\n String currentLang = AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.CURRENT_LANGUAGE);\n setLanguage(currentLang);\n }", "private void prepareAndShowHomeScreen() {\n\t\tFraHeader header = FraHeader.newInstance(true);\n\t\theader.showBackButton(false);\n\t\tFraHomeContent homeContent = FraHomeContent.newInstance();\n\t\tFraFooter footer = FraFooter.newInstance(FooterIcons.TOP10);\n\t\tFraSearch search = FraSearch.newInstance();\n\t\tFraFont font = FraFont.newInstance();\n\t\tFraShare share = FraShare.newInstance();\n\n\t\treplaceScreenWithNavBarContentAndMenu(header, FraHeader.TAG,\n\t\t\t\thomeContent, FraHomeContent.TAG, footer, FraFooter.TAG,\n\t\t\t\tFraMenu.newInstance(), FraMenu.TAG, search, FraSearch.TAG,\n\t\t\t\tfont, FraFont.TAG, share, FraShare.TAG, false);\n\t\tprepareAndShowHomeScreen(false);\n\t\t/*\n\t\t * replaceScreenWithNavBarContentAndFooter(homeContent,\n\t\t * FraHomeContent.TAG, footer, FraFooter.TAG, false);\n\t\t */\n\t}", "void init() {\n setVisible(true);\n\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "protected void setupUI()\n {\n showLetter = (TextView) findViewById(R.id.showHelpLetter);\n myLetters = (ListView)findViewById(R.id.letterList);\n myLetters.setClickable(true);\n }", "public void initScreen() {\n mScrollview = (ScrollView) findViewById(R.id.ScrollView01);\n \t\n \t// Handle on Header getting from Quote Server\n mHeader = (TextView) findViewById(R.id.header);\n \n // Handle on Quote TextView\n mQuoteTxt = (TextView) findViewById(R.id.quote);\n \n // Set Header to default\n if (mHeaderStr == null)\n \tmHeaderStr = getResources().getString(R.string.default_header_text);\n \n // Handle on ImageSwitcher\n mQuoteImage = (ImageSwitcher) findViewById(R.id.ImageSwitcher01);\n mQuoteImage.setFactory(new MyImageSwitcherFactory());\n \n // Handles on buttons\n\t\tView writeButton = findViewById(R.id.write_button);\n writeButton.setOnClickListener(this); \n View lessonsButton = findViewById(R.id.lessons_button);\n lessonsButton.setOnClickListener(this);\n View websiteButton = findViewById(R.id.website_button);\n websiteButton.setOnClickListener(this);\n View exitButton = findViewById(R.id.exit_button);\n exitButton.setOnClickListener(this);\n \n }", "public StageScreen() {\n initComponents();\n hp_1.setValue(0);\n hp_2.setValue(0);\n \n // new animationAndRepainting().setVisible(true);\n }", "private void setViews() {\n\n TextView currentApixu = findViewById(R.id.currentApixu);\n TextView currentOwm = findViewById(R.id.currentOwm);\n TextView currentWu = findViewById(R.id.currentWu);\n\n currentApixu.setText(feedValues[0]);\n currentOwm.setText(feedValues[1]);\n currentWu.setText(feedValues[2]);\n }", "private void initViews() {\n /* Intent get data handler */\n fullScreenSnap = (ImageView) findViewById(R.id.fullScreenSnap);\n mToolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbar);\n getSupportActionBar().setTitle(AppConstants.imageName);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n mToolbar.setNavigationIcon(R.drawable.back_button);\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "@Override\n public void show() {\n batch = new SpriteBatch();\n stage = createStage();\n\n // create overlays\n hud = new GigagalHUD();\n victoryOverlay = new VictoryOverlay();\n gameoverOverlay = new GameOverOverlay();\n\n // determine input processor\n useOnScreenControl = (Gdx.app.getType() == Application.ApplicationType.Android // on mobile\n || Configs.instance.isDebugOnScreenControlEnabled() // or debugging\n );\n\n if (useOnScreenControl) {\n onscreenControl = new OnscreenControl();\n gameInputProcessor = new TouchProcessor(onscreenControl);\n } else {\n gameInputProcessor = new KeyPressProcessor();\n }\n\n Gdx.input.setInputProcessor(gameInputProcessor);\n\n // load new level\n startNewLevel();\n }", "private void getViewReferences() {\n now_playing_album_cover = findViewById(R.id.now_playing_album_cover);\n now_playing_progress_bar = findViewById(R.id.now_playing_progress_bar);\n now_playing_song_current_length = findViewById(R.id.now_playing_song_current_length);\n now_playing_song_total_length = findViewById(R.id.now_playing_song_total_length);\n now_playing_song_title = findViewById(R.id.now_playing_song_title);\n now_playing_artist_name = findViewById(R.id.now_playing_artist_name);\n now_playing_album_title = findViewById(R.id.now_playing_album_title);\n now_playing_previous_button = findViewById(R.id.now_playing_previous_button);\n now_playing_play_button = findViewById(R.id.now_playing_play_button);\n now_playing_next_button = findViewById(R.id.now_playing_next_button);\n }", "private void getComponents() {\n drawerLayout = binding.activityMainDrawerLayout;\n navigationView = binding.navigationView;\n floatingActionButton = binding.flAddPet;\n shareAppButton = binding.flShareApp;\n }", "public static void populate() {\n HomeView homeView = new HomeView();\n homeView.setOnKeyPressed(keyEvent -> {\n WorldView worldView = WorldController.getWorld();\n worldView.getChildren().add(new Player(homeView.getNameText()));\n scene = new Scene(worldView,600,900);\n primaryStage.setTitle(\"Frogger Arcade\");\n primaryStage.setScene(scene);\n });\n primaryStage.setTitle(\"Frogger Home\");\n primaryStage.setScene(new Scene(homeView));\n primaryStage.show();\n }", "@Override\n\tpublic void show() {\n\t\tworld = new Worlds();\n\t\trenderer = new WorldRenderer(world, false);\n\t\tcontroller = new WorldController(world);\n\t\tGdx.input.setInputProcessor(this);\n\t}", "abstract void onShown();", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public void createObservers() {\n\n\t\t// Airport screens\n\n\t\tAirportScreen airportScreen1 = new AirportScreen(airport, \"AIRPORT (1)\", airportScreen1Dialog);\n\t\tAirportScreen airportScreen2 = new AirportScreen(airport, \"AIRPORT (2)\", airportScreen2Dialog);\n\t\tairport.attach(airportScreen1);\n\t\tairport.attach(airportScreen2);\n\n\t\t// Terminal screens (three each)\n\n\t\tTerminalScreen termAScreen1 = new TerminalScreen(termA, \"TERMINAL A (1)\", termAScreen1Dialog);\n\t\tTerminalScreen termAScreen2 = new TerminalScreen(termA, \"TERMINAL A (2)\", termAScreen2Dialog);\n\t\tTerminalScreen termAScreen3 = new TerminalScreen(termA, \"TERMINAL A (3)\", termAScreen3Dialog);\n\t\ttermA.attach(termAScreen1);\n\t\ttermA.attach(termAScreen2);\n\t\ttermA.attach(termAScreen3);\n\n\t\tTerminalScreen termBScreen1 = new TerminalScreen(termB, \"TERMINAL B (1)\", termBScreen1Dialog);\n\t\tTerminalScreen termBScreen2 = new TerminalScreen(termB, \"TERMINAL B (2)\", termBScreen2Dialog);\n\t\tTerminalScreen termBScreen3 = new TerminalScreen(termB, \"TERMINAL B (3)\", termBScreen3Dialog);\n\t\ttermB.attach(termBScreen1);\n\t\ttermB.attach(termBScreen2);\n\t\ttermB.attach(termBScreen3);\n\n\t\tTerminalScreen termCScreen1 = new TerminalScreen(termC, \"TERMINAL C (1)\", termCScreen1Dialog);\n\t\tTerminalScreen termCScreen2 = new TerminalScreen(termC, \"TERMINAL C (2)\", termCScreen2Dialog);\n\t\tTerminalScreen termCScreen3 = new TerminalScreen(termC, \"TERMINAL C (3)\", termCScreen3Dialog);\n\t\ttermC.attach(termCScreen1);\n\t\ttermC.attach(termCScreen2);\n\t\ttermC.attach(termCScreen3);\n\n\t\t// Gates and gate screens\n\n\t\t// Terminal A\n\t\tfor (int i = 0; i < gatesA.length; ++i) {\n\t\t\tgatesA[i] = new Gate(\"A-\" + (i + 1));\n\t\t\tgatesA[i].attach(new GateScreen(gatesA[i], gatesADialogs[i]));\n\t\t}\n\n\t\t// Terminal B\n\t\tfor (int i = 0; i < gatesB.length; ++i) {\n\t\t\tgatesB[i] = new Gate(\"B-\" + (i + 1));\n\t\t\tgatesB[i].attach(new GateScreen(gatesB[i], gatesBDialogs[i]));\n\t\t}\n\n\t\t// Terminal C\n\t\tfor (int i = 0; i < gatesC.length; ++i) {\n\t\t\tgatesC[i] = new Gate(\"C-\" + (i + 1));\n\t\t\tgatesC[i].attach(new GateScreen(gatesC[i], gatesCDialogs[i]));\n\t\t}\n\t}", "public void InitializeComponents(){\n\n\n screen = new JPanel();\n screen.setLayout(null);\n screen.setBackground(Color.BLUE);\n this.getContentPane().add(screen);\n ScreenComps();\n\n }", "@Override protected void startup() {\n show(new FFTView(this));\n }", "private void InitView() {\n\n\t\tframe_element = new Frame_element();// 初始化保存框架元素的类\n\n\t\tframe_element\n\t\t\t\t.setRel_body_content((RelativeLayout) findViewById(R.id.rel_body_content));// 保存中间内容框架\n\t\tframe_element\n\t\t\t\t.setRel_top_bar((RelativeLayout) findViewById(R.id.rel_top_bar));// 保存顶部BAR框架\n\n\t\tframe_element\n\t\t\t\t.setRel_frist_bar((RelativeLayout) findViewById(R.id.rel_frist_bar));// 保存顶部首页BAR\n\t\t// 顶部右侧‘更多’按钮点击事件\n\t\timagebtn_more = (ImageButton) findViewById(R.id.imagebtn_more);\n\t\timagebtn_userhead_icon = (ImageButton) findViewById(R.id.imagebtn_userhead_icon);\n\t\timagebtn_more.setOnClickListener(this);\n\t\timagebtn_userhead_icon.setOnClickListener(this);\n\n\t}", "public void showQuestsToPickScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/QuestsToPickScreen.fxml\"));\n mainScreenController.getSecondaryScreen().getChildren().clear();\n mainScreenController.getSecondaryScreen().getChildren().add((AnchorPane) loader.load());\n \n QuestsToPickScreenController controller = loader.getController();\n controller.setGame(this);\n }catch(IOException e){\n }\n }", "public StartScreen() {\n initComponents();\n }", "@Override\n\tpublic void show() {\n\t worldRenderer = new WorldRenderer(game);\n\t\tGdx.input.setCatchBackKey(true);\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n\tpublic void setUpScreenElements() {\n\t\t\n\t}", "private void initialisers() {\n\t\tgear= (ImageView)findViewById(R.id.launchgear);\n\t}", "public void initialScreen() {\n PortfolioStocksVOImpl vo = getPortfolioStocksVO();\n //Number numb = (Number)2;\n Number num = new Number(2);\n vo.setBindPortfolioID(2);\n vo.executeQuery();\n //System.out.println(\"\\n\\n\\n End initial screen method \\n\\n\");\n }", "private void setupDisplay() {\n sizeFirstField_.setText(Double.toString(af_.SIZE_FIRST));\n numFirstField_.setText(Double.toString(af_.NUM_FIRST));\n sizeSecondField_.setText(Double.toString(af_.SIZE_SECOND));\n numSecondField_.setText(Double.toString(af_.NUM_SECOND));\n cropSizeField_.setText(Double.toString(af_.CROP_SIZE));\n thresField_.setText(Double.toString(af_.THRES));\n channelField1_.setText(af_.CHANNEL1);\n channelField2_.setText(af_.CHANNEL2);\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}", "public MainScreen() {\n initComponents();\n \n }", "public void Init(){\n\t\trequestFocus();\n\t\tBufferedImageLoader loader = new BufferedImageLoader();\t\t// Class to load images\n\t\ttry {\n\t\t\tBackGround = loader.loadImage(\"/Scroll Small.png\");\t\t// Load background\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t\n\t\ttext = new Text(this);\n\t\tren = new Render(screenHeight, screenWidth);\n\t\titems = ItemManager.getInstance();\n\t\tmon = MonsterManager.getInstance(this, text);\n\t\trooms = RoomManager.getInstance(items, mon);\n\t\trep = new Reponses(this, text, rooms);\n\t\tthis.addKeyListener(new KeyInput(this, mon));\t\t\t\t// Keyboard input\n\t\tthis.addMouseListener(new MouseInput(this, text, screenHeight, screenWidth)); // Mouse input\n\t\t\n\t\troom = rooms.x2y3;\t\t\t\t// Set starting location\n\t\t\n\t\trender(); render(); render();\t// Render screen\n\t}", "private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}", "public void updateScreen(){}", "public void showView(){\n this.addObserver(GameView.GameViewNewGame(this));\n }", "void intialize_variables() {\n rolls=\"\";\n down_angle=0;\n up_angle=0;\n angle_with_ground=0;\n human_length = 162;\n seek_human_length=(SeekBar) findViewById(R.id.seekBar);\n seek_human_length.setProgress(160);\n text_sek=(TextView)findViewById(R.id.text_seek);\n touch_ground_switch =(Switch)findViewById(R.id.switch1);\n cross_h = (ImageView) findViewById(R.id.crosshair);\n dm = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(dm);\n cross_h.getLayoutParams().width = (dm.widthPixels * 15 / 100);\n cross_h.getLayoutParams().height = (dm.widthPixels * 15 / 100);\n\n }", "public void accuse()\n {\n //show the accusation window\n accusationScreen = new AccusationScreen(this, false, null);\n accusationScreen.setVisible(true);\n }", "private void m24192d(ah ahVar) {\n Object obj = new int[2];\n ahVar.f995b.getLocationOnScreen(obj);\n ahVar.f994a.put(\"android:slide:screenPosition\", obj);\n }", "@Override\n protected void onResume() {\n super.onResume();\n init();\n decideScreen();\n }", "public void onDisplay() {\n }", "@Override\n\tpublic void show() {\n\t\tsetUpGame();\n\t}", "private void storeInitialLook() {\r\n\t\tthis.initialFont = this.control.getFont();\r\n\t\tthis.initialBackgroundColor = this.control.getBackground();\r\n\t\tthis.initialForegroundColor = this.control.getForeground();\r\n\t}", "private void initData() {\n\t\tSetTopBarTitle(getString(R.string.os_jsh_wdj_add_ldss));\r\n\t\tregFliter();\r\n\t}", "public FrontScreen() {\n\t\tsetLayout(null);\n\t\tsetBounds(0, 0, 1024, 768);\n\n\n\t\tController mycontroller = new Controller();\n\t\tbtnCalendar.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/calendarbtn.png\")));\n\t\tbtnCalendar.setBounds(342, 74, 153, 41);\n\t\tadd(btnCalendar);\n\t\tbtnEventlist.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/eventbtn.png\")));\n\t\tbtnEventlist.setBounds(550, 74, 153, 41);\n\t\tadd(btnEventlist);\n\t\tbtnLogOut.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/Logout.png\")));\n\t\tbtnLogOut.setBounds(10, 22, 153, 41);\n\t\tadd(btnLogOut);\n\t\tbtnExit.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/exit.png\")));\n\t\tbtnExit.setBounds(10, 74, 153, 41);\n\t\tadd(btnExit);\n\t\tlblgetUserName.setBounds(821, 59, 76, 14);\n\t\tSystem.out.println();\n\n\t\tadd(lblgetUserName);\n\t\tlblQotd.setFont(new Font(\"Snap ITC\", Font.PLAIN, 18));\n\t\tlblQotd.setBounds(342, 138, 415, 50);\n\n\t\tadd(lblQotd);\n\n\t\tBorder border = BorderFactory.createLineBorder(Color.BLUE, 3);\n\t\tlblWeatherInfo.setBounds(10, 420, 985, 247);\n\n\t\tString forecast = mycontroller.userControls(\"getWeather\");\n\t\tforecast = forecast.replace(\"},\", \"<br/>\");\n\t\tforecast = forecast.replace(\"[\", \"\");\n\t\tforecast = forecast.replace(\"{date='\", \" Date: \");\n\t\tforecast = forecast.replace(\"12:00:00 CET\", \"\");\n\t\tforecast = forecast.replace(\", desc=\", \" Description: \");\n\t\tforecast = forecast.replace(\"Forecast{date=\", \"\");\n\t\tforecast = forecast.replace(\", celsius='\", \" Temperature: \");\n\n\n\t\tlblWeatherInfo.setText(\"<html><body><p>\" + forecast + \"</body></p></html>\");\n\t\tlblWeatherInfo.setBorder(border);\n\t\tadd(lblWeatherInfo);\n\n\n\t\tlblWeather.setFont(new Font(\"Snap ITC\", Font.PLAIN, 18));\n\t\tlblWeather.setBounds(328, 379, 294, 50);\n\n\t\tadd(lblWeather);\n\n\n\n\t\tString qotd = mycontroller.userControls(\"qotd\");\n\t\tString[] qotdparts = qotd.split(\":\");\n\t\tString quotedontuse = qotdparts[0]; \n\t\tString quote = qotdparts[1];\n\t\tString author = qotdparts[2]; \n\t\tString topic = qotdparts[3];\n\n\t\t// Trying to remove {}:\n\t\tString quoteF = quote;\n\t\tquoteF = quoteF.replace(\"{\", \"\");\n\t\tquoteF = quoteF.replace(\"quote\", \"\");\n\t\tquoteF = quoteF.replace(\"author\", \"\");\n\n\t\tString authorF = author;\n\t\tauthorF = authorF.replace(\"{\", \"\");\n\t\tauthorF = authorF.replace(\"topic\", \"\");\n\n\t\tString topicF = topic;\n\t\ttopicF = topicF.replace(\"{\", \"\");\n\t\ttopicF = topicF.replace(\"}\", \"\");\n\n\n\n\n\t\tlblQuote.setBounds(81, 248, 914, 41);\n\n\n\t\tlblQuote.setText(quoteF);\n\n\t\tadd(lblQuote);\n\t\tlblAuthor.setBounds(81, 300, 816, 20);\n\t\tlblAuthor.setText(authorF);\n\n\t\tadd(lblAuthor);\n\t\tlblgetQotd.setBounds(10, 187, 985, 203);\n\n\t\tlblgetQotd.setBorder(border);\n\n\t\tadd(lblgetQotd);\n\t\tlblCategory.setBounds(81, 336, 816, 14);\n\n\t\tlblCategory.setText(topicF);\n\n\t\tadd(lblCategory);\n\t\tlblIconAuthor.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/author.png\")));\n\t\tlblIconAuthor.setBounds(26, 295, 32, 32);\n\n\t\tadd(lblIconAuthor);\n\t\tlblIconQuote.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/quote.png\")));\n\t\tlblIconQuote.setBounds(26, 258, 32, 32);\n\n\t\tadd(lblIconQuote);\n\t\tlblIconCategory.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/Nuvola_apps_bookcase.png\")));\n\t\tlblIconCategory.setBounds(27, 338, 32, 32);\n\n\t\tadd(lblIconCategory);\n\n\n\t\tlblBackground.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/login-mainframe.jpg\")));\n\t\tlblBackground.setBounds(0, 0, 1024, 768);\n\n\t\tadd(lblBackground);\n\n\t}", "protected void onScreenActivate() {\r\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\tGdx.input.setInputProcessor(multiplexer);\n\t\tsetProcessorAfterDismissingLoading(multiplexer);\n\t\tif (firstCreated) {\n\t\t\tinitAudio();\n\t\t\tinitTextures();\n\t\t\tinitInterface();\n\t\t\tfirstCreated = false;\n\t\t} \n\t\t\n\t\tgGame.iFunctions.hideAdView();\n\t}", "public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }", "private void initializeUi() {\n scanner = findViewById(R.id.surfaceView);\n cameraPreview = findViewById(R.id.surfaceView);\n bt_cross = findViewById(R.id.bt_cross);\n cargando = cargando();\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void setControllerVariables() {\n\t\tcontrollerVars.setAudioManager((AudioManager) act.getSystemService(Context.AUDIO_SERVICE));\n\t\tcontrollerVars.setActVolume((float) controllerVars.getAudioManager().getStreamVolume(AudioManager.STREAM_MUSIC));\n\t\tcontrollerVars.setMaxVolume((float) controllerVars.getAudioManager().getStreamMaxVolume(AudioManager.STREAM_MUSIC));\n\t\tcontrollerVars.setVolume(controllerVars.getActVolume() / controllerVars.getMaxVolume());\n\n\t\t//Hardware buttons setting to adjust the media sound\n\t\tact.setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\t// the counter will help us recognize the stream id of the sound played now\n\t\tcontrollerVars.setCounter(0);\n\n\t\t// Load the sounds\n\t\tcontrollerVars.setSoundPool(new SoundPool(20, AudioManager.STREAM_MUSIC, 0));\n\t\tcontrollerVars.getSoundPool().setOnLoadCompleteListener(new OnLoadCompleteListener() {\n\t\t @Override\n\t\t public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {\n\t\t \tcontrollerVars.setLoaded(true);\n\t\t }\n\t\t});\t\t\n\t}", "public void setup() {\n\t\t//This throws an exception and causes us to reenter once \"frame\" exists\n\t\tsize(VIEW_WIDTH,VIEW_HEIGHT,P2D);\n\t\ttxt = createFont(\"Vera.ttf\",90,true);\n\t\tframeRate(60);\n\t\tif (!frame.isResizable()){\n\t\t\tframe.setResizable(true);\n\t\t}\n\t}", "public home() {\n initComponents();\n int xx;\n int xy;\n }", "public SetupScreen() \r\n { \r\n _userLabel = new LabelField(Ipoki._resources.getString(LBL_USER), DrawStyle.ELLIPSIS);\r\n add(_userLabel);\r\n _userEdit = new EditField(\"\", Ipoki._user, 20, Field.EDITABLE);\r\n add(_userEdit);\r\n _passLabel = new LabelField(Ipoki._resources.getString(LBL_PASSWORD), DrawStyle.ELLIPSIS);\r\n add(_passLabel);\r\n _passEdit = new PasswordEditField(\"\", Ipoki._pass, 20, Field.EDITABLE);\r\n add(_passEdit);\r\n _freqLabel = new LabelField(Ipoki._resources.getString(LBL_FREQ), DrawStyle.ELLIPSIS);\r\n add(_freqLabel);\r\n _freqEdit = new EditField(\"\", String.valueOf(Ipoki._freq), 20, Field.EDITABLE | EditField.FILTER_INTEGER);\r\n add(_freqEdit);\r\n }", "protected void init(){\n\t\n\t\tsetBounds(getControllerScreenPosition());\n\t\taddComponentListener(new ComponentListener(){\n\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t//AppLogger.debug2(arg0.toString());\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tint w = arg0.getComponent().getWidth();\n\t\t\t\tint h = arg0.getComponent().getHeight();\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \tProperties props = getAppSettings();\t\n\t\t\t \tprops.setProperty(PREFIX+DSC_WIN_W, String.valueOf(w));\n\t\t\t \tprops.setProperty(PREFIX+DSC_WIN_H, String.valueOf(h));\t \t\t\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t//AppLogger.debug2(arg0.toString());\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tint x = arg0.getComponent().getX();\n\t\t\t\tint y = arg0.getComponent().getY();\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \tProperties props = getAppSettings();\t\t\t\t \t\n\t\t\t \tprops.setProperty(PREFIX+DSC_WIN_X, String.valueOf(x));\n\t\t\t \tprops.setProperty(PREFIX+DSC_WIN_Y, String.valueOf(y));\t \t\t\n\t\t\t}\n\n\t\t\tpublic void componentShown(ComponentEvent arg0) {}\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {}\n\t\t\t\n\t\t});\n\t\t\n\t\tthis.addWindowListener(new WindowAdapter(){\n\t\t\n\t\t\tpublic void windowClosing(WindowEvent evt){\n\t\t\t\tstoreAppSettings();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void InitViews() {\n setBackgroundResource(R.drawable.can_rh7_bg02);\n addButton(50, 107, R.drawable.can_rh7_jia_up, R.drawable.can_rh7_jia_dn, 0);\n addButton(50, 304, R.drawable.can_rh7_jian_up, R.drawable.can_rh7_jian_dn, 1);\n this.mLeftTemp = addText(53, 218, 92, 61);\n addButton(188, 107, R.drawable.can_rh7_fsb_up, R.drawable.can_rh7_fsb_dn, 4);\n addButton(188, 304, R.drawable.can_rh7_fss_up, R.drawable.can_rh7_fss_dn, 5);\n addImage(191, 218, R.drawable.can_rh7_signal_up);\n for (int i = 0; i < mWindIcons.length; i++) {\n mWindIcons[i] = addImage(191, 218, mIcons[i]);\n }\n mACMode[0] = addButton(305, 98, R.drawable.can_rh7_icon01_up, R.drawable.can_rh7_icon01_dn, 6);\n mACMode[1] = addButton(305, 175, R.drawable.can_rh7_icon02_up, R.drawable.can_rh7_icon02_dn, 7);\n mACMode[2] = addButton(305, Can.CAN_FLAT_RZC, R.drawable.can_rh7_icon03_up, R.drawable.can_rh7_icon03_dn, 8);\n mACMode[3] = addButton(305, KeyDef.RKEY_MEDIA_10, R.drawable.can_rh7_icon04_up, R.drawable.can_rh7_icon04_dn, 9);\n this.mStatusWindow = addButton(CanCameraUI.BTN_LANDWIND_3D_LEFT_DOWN, 98, R.drawable.can_rh7_window_up, R.drawable.can_rh7_window_dn, 11);\n this.mStatusWindowRear = addButton(CanCameraUI.BTN_LANDWIND_3D_LEFT_DOWN, KeyDef.RKEY_MEDIA_10, R.drawable.can_rh7_window02_up, R.drawable.can_rh7_window02_dn, 18);\n this.mStatusOutLoop = addButton(CanCameraUI.BTN_LANDWIND_3D_LEFT_DOWN, 210, R.drawable.can_rh7_wxh_up, R.drawable.can_rh7_wxh_dn, 13);\n this.mStatusAuto = addButton(757, 210, R.drawable.can_rh7_auto_up, R.drawable.can_rh7_auto_dn, 14);\n this.mStatusAc = addButton(757, 98, R.drawable.can_rh7_ac_up, R.drawable.can_rh7_ac_dn, 16);\n this.mStatusClosed = addButton(751, KeyDef.RKEY_OPEN, R.drawable.can_rh7_del_up, R.drawable.can_rh7_del_dn, 17);\n }", "private void initializeGUIComponents() {\n\t\tmyScene = new Scene(myRoot);\n ButtonConditionManager.getInstance().beginListeningToScene(myScene);\n\t\tmyStage.setTitle(\"MY PLAYER VIEW\");\n\t\tmyStage.setScene(myScene);\n\t\tmyStage.show();\n\t\tmyCanvas = new GameCanvas();\n\t\tmyRoot.getChildren().add(myCanvas.getNode());\n\t\tmyCanvas.getNode().toBack();\n\t}", "public void showProperties() {\n \t\tmainFrame.showProperties();\n \t}", "public Main() {\n\t\tsuper();\n\t\tInitScreen screen = new InitScreen();\n\t\tpushScreen(screen);\n\t\tUiApplication.getUiApplication().repaint();\n\t}", "protected void initVars() {}", "private void setup() {\n\t\tcanWrite = (TextView)findViewById(R.id.tvCanWrite);\n\t\tcanRead = (TextView)findViewById(R.id.tvCanRead);\n\t\t\n\t\t\n\t}", "public void displayResultScreen() {\n displayScreenAdminView = new Result();\n\n\n }", "private void initializePresentation() {\r\n viewRankingAttemptFX = new ViewRankingAttemptFX(this);\r\n viewRankingPlayerFX = new ViewRankingPlayerFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewProblemListFX = new ViewProblemListFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewMenuFX = new ViewMenuFX(this);\r\n viewSettingsFX = new ViewSettingsFX(this);\r\n viewGenerateFX = new ViewGenerateFX(this);\r\n viewAttemptFX = new ViewAttemptFX(this);\r\n viewAttemptListFX = new ViewAttemptListFX(this);\r\n\r\n viewsFX.add(viewLoginFX);\r\n viewsFX.add(viewRankingAttemptFX);\r\n viewsFX.add(viewRankingPlayerFX);\r\n viewsFX.add(viewRegisterFX);\r\n viewsFX.add(viewProblemListFX);\r\n viewsFX.add(viewMenuFX);\r\n viewsFX.add(viewSettingsFX);\r\n viewsFX.add(viewGenerateFX);\r\n viewsFX.add(viewAttemptFX);\r\n viewsFX.add(viewAttemptListFX);\r\n\r\n }", "private void init() {\n\t\tback=(ImageView)this.findViewById(R.id.back);\n\t\taddUser=(ImageView)this.findViewById(R.id.adduser);\n\t\tgrid=(GridView)this.findViewById(R.id.gridview);\n\t}", "@Override\n public void onResume() {\n super.onResume();\n setUpScreen();\n }", "@Override protected void startup() {\n BlaiseGraphicsTestFrameView view = new BlaiseGraphicsTestFrameView(this);\n canvas1 = view.canvas1;\n root1 = view.canvas1.getGraphicRoot();\n canvas1.setSelectionEnabled(true);\n show(view);\n }", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "@Override\n\tpublic void onShow (int screenWidth, int screenHeight) {\n\n\t}", "public SnakeUI() {\r\n setFrame(); \r\n setKeyListener();\r\n setTimer();\r\n startGame();\r\n this.setVisible(true);\r\n }", "public GameScreen(String seed){\n\t\tthis.mazeSession = new MazeSession(seed);\n\t\tthis.mazeDrawer = new DrawMaze(this.mazeSession);\n\t\tgsPcs = new PropertyChangeSupport(this);\n\t\tshowContent();\n\t}", "public void InitUI() {\n this.mSetData = new CanDataInfo.CAN_Msg();\n this.mDoorInfo = new CanDataInfo.CAN_DoorInfo();\n setBackgroundResource(R.drawable.can_vw_carinfo_bg);\n this.mDoorIcons = new CustomImgView[6];\n if (MainSet.GetScreenType() == 5) {\n InitUI_1280x480();\n } else {\n InitUI_1024x600();\n }\n this.mOilItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mTempItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mElctricItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mTrunkUpItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mParkingItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mXhlcItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mRPMItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mSpeedItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mDistanceItem.setText(TXZResourceManager.STYLE_DEFAULT);\n this.mLqywdItemTxt.setText(TXZResourceManager.STYLE_DEFAULT);\n }", "@Override\r\n\tpublic void onShow() {\n\t\t\r\n\t}", "public void setScreen(GameScreen screen);", "public void launchSetupScreen() {\n\t\tnew SetUpScreen(this);\n\t}", "private void initializeObjects() {\r\n mName = view.findViewById(R.id.name);\r\n mEmail = view.findViewById(R.id.email);\r\n mPassword = view.findViewById(R.id.password);\r\n Button mRegister = view.findViewById(R.id.register);\r\n\r\n mRegister.setOnClickListener(this);\r\n }", "private static void initAndShowGUI() {\n }", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(Background);\n\t\tprogram.add(lvl1);\n\t\tprogram.add(lvl2);\n\t\tprogram.add(lvl3);\n\t\tprogram.add(Back);\n\n\t}", "private void initControlsPage()\r\n {\n \tString keyTitleString = \"KEYBOARD\";\r\n \tkeyTitleText = new OText(25, 200, 300, keyTitleString);\r\n \tkeyTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the keyboard movement text\r\n \tString keyMoveString = \"Move Optimus with the WASD keys \"\r\n \t\t\t + \" <br> \"\r\n \t\t\t + \"as if they were the arrow keys.\";\r\n \tkeyMoveText = new OText(25, 225, 300, keyMoveString);\r\n \tkeyMoveText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t\r\n \t//Initialize the mouse title text\r\n \tString mouseTitleString = \"MOUSE\";\r\n \tmouseTitleText = new OText(375, 200, 300, mouseTitleString);\r\n \tmouseTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the mouse text\r\n \tString mouseMoveString = \"Aim by moving the mouse and shoot bullets from Optimus in the direction of the cursor using both clicks. \";\r\n \tmouseText = new OText(375, 225, 300, mouseMoveString);\r\n \tmouseText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n }", "private void init() {\n\t\t\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\t\n\t\t//Adding the mouseManager to the canvas reduces glitches\n\t\tdisplay.getCanvas().addMouseListener(mouseManager); \n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\t\n\t\t\n\t\tVisuals.init();\n\n\t\tManager.init(this); // Setting up our manager singleton\n\n\t\tgameCamera = new GameCamera(0, 0);\n\t\tgameTimer = new GameTimer();\n\n\t\tgameState = new GameState();\n\t\t//We want to initialise the states we may switch to for easy access\n\t\t//The main menu state\n\t\tState menuState = new MenuState();\n\t\t//The state for the settings menu\n\t\tState settingState = new SettingState();\n\t\t\n\t\tState.setState(gameState); //This sets the state of the program to our game\n\t\t\n\t}", "public GameScreen() {\n\n\t\tint midPointY = (int) (Const.GAME_HEIGHT / 2);\n\n\t\tworld = new GameWorld(midPointY);\n\t\trenderer = new GameRenderer(world);\n\n\t\tGdx.input.setInputProcessor(new InputHandler(world.getVentilatorUp(), world.getVentilatorDown()));\n\t\t// Gdx.input.setInputProcessor(new\n\t\t// InputHandler(world.getVentilatorTwo()));\n\t}" ]
[ "0.68283844", "0.6745601", "0.66995275", "0.6438328", "0.6406116", "0.6385672", "0.63040125", "0.62366927", "0.62267566", "0.6157283", "0.6134231", "0.61210394", "0.6120638", "0.60762846", "0.6061752", "0.6058773", "0.6038489", "0.60357726", "0.60294974", "0.6019124", "0.6017925", "0.60114706", "0.60107684", "0.6010223", "0.6005261", "0.59982353", "0.5996937", "0.59921527", "0.5977601", "0.5977261", "0.5970428", "0.5966896", "0.5959711", "0.59579736", "0.5950012", "0.59384304", "0.59312105", "0.5928843", "0.59264374", "0.5924526", "0.5916843", "0.58971643", "0.58927315", "0.58840877", "0.58833164", "0.5881355", "0.5880536", "0.58771634", "0.5867158", "0.58628374", "0.58493793", "0.5848866", "0.5846192", "0.58423203", "0.5838614", "0.58340424", "0.5833767", "0.58333373", "0.5831974", "0.5827302", "0.58207566", "0.5818294", "0.5817835", "0.58114547", "0.580843", "0.58014756", "0.57926995", "0.5791566", "0.5786193", "0.5784959", "0.5783308", "0.57820576", "0.577434", "0.5770683", "0.57672524", "0.57528454", "0.57524526", "0.574737", "0.5746403", "0.5746347", "0.57459486", "0.57386434", "0.57374865", "0.5733746", "0.5733631", "0.5729639", "0.5727919", "0.5725188", "0.5724299", "0.57241744", "0.5723692", "0.57229346", "0.5718477", "0.5716836", "0.5714988", "0.57145554", "0.5708458", "0.5706695", "0.57013893", "0.57003814" ]
0.5759694
75
Method which is called everytime frame is rendered.
@Override public void render(float delta) { Gdx.gl.glClearColor(0.8f, 0.3f, 0.3f, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); bgViewPort.apply(); batch.setProjectionMatrix(bgViewPort.getCamera().combined); batch.begin(); batch.draw(background,0,0); batch.end(); stage.getViewport().apply(); stage.draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void calledDuringRender() {\n calledEveryFrame();\n numFrames++;\n }", "@Override\n\tpublic void render(float deltaTime) {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\trenderer.render(this);\n\t}", "@Override\n\tpublic void render(float delta) {\n\t}", "@Override\n\tpublic void render(float delta) {\n\n\t}", "public void render() {\r\n\r\n }", "public void render()\r\n\t{\n\t}", "public void render() {\n }", "public void onRenderTick() {\n updateLang();\n updateRenderEngine();\n }", "@Override\r\n\tpublic void render() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void beforeRender(float dt) {\n\r\n\t}", "@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void render() {\n\r\n\t}", "public void render() {\n this.canvas.repaint();\n }", "@Override\n public void render(float delta) {\n if(counter>1000) counter = 1;\n super.render(delta);\n myCamera.update();\n myCamera.setCamera(renderer, batch);\n batch.begin();\n backgroundSprite.draw(batch, calculateAlpha()/2);\n batch.end();\n drawCurve();\n drawFlights();\n drawFavouritesAndLegend();\n ab.render();\n clicked = false;\n counter++;\n }", "public void render() {\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null) { //if the buffer strategy doesnt get created, then you create it\n\t\t\tcreateBufferStrategy(3); //the number 3 means it creates triple buffering\n\t\t\treturn;\t\t\t\t\t//, so when you backup frame gets displayed (2) it will also have a backup\t\n\t\t}\n\t\t\n\t\t//apply data to the buffer \"bs\"\n\t\t//this is creating a link to graphics to drawing graphics to the screen.\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t/**\n\t\t * You input all of your graphics inbetween the g object and g.dispose();\n\t\t */\n\t\t//###################\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\t//###################\n\t\tg.dispose(); //this dispose of all the graphics\n\t\tbs.show(); //this will make the next available buffer visible\n\t}", "public void render(){\n//\t\tsetCards();\n//\t\tsetMurderInfo();\n\t}", "@Override\n\tpublic void render() {\n\t\t\n\t}", "public void render(){\n\t\tBufferStrategy bs = frame.getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tframe.createBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\trenderGraphics(bs);\n\t}", "@Override\n public void render() {\n super.render();\n }", "@Override\n public void render() {\n super.render();\n }", "@Override\n\tpublic void render() {\n\t\tScreen.render();\n\t}", "@Override\n\tpublic void render () {\n\n\t}", "void renderFrame(){\n if(getPlayer().isChoosingFile()) return; // don't render while filechooser is active\n \n if(canvasFileWriter.writingMovieEnabled) chipCanvas.grabNextImage();\n chipCanvas.paintFrame(); // actively paint frame now, either with OpenGL or Java2D, depending on switch\n \n if(canvasFileWriter.writingMovieEnabled){\n canvasFileWriter.writeMovieFrame();\n }\n }", "@Override\n\tpublic void render () {\n super.render();\n\t}", "public void render(){\n //this block is pre-loading 2 frames in\n BufferStrategy bs = this.getBufferStrategy();\n if(bs == null){\n this.createBufferStrategy(2);\n return;\n }\n\n Graphics g = bs.getDrawGraphics();\n Graphics2D g2d = (Graphics2D) g;\n ///////////////////////////\n //Draw things below here!\n g.setColor(Color.white);\n g.fillRect(0, 0, 800, 800);\n\n g2d.translate(-camera.getX(), -camera.getY());\n\n g.setColor(Color.gray);\n g.fillRect(0, 0, 500, 500);\n //render all the objects\n handler.render(g);\n\n //g2d.translate(camera.getX(), camera.getY());\n //Draw things above here!\n ///////////////////////////\n g.dispose();\n bs.show();\n }", "@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tLibNative.render();\n\t}", "@Override\n public void render() { super.render(); }", "public void startRendering() {\n if (!justRendered) {\n justRendered = true;\n \n if (Flags.wireFrame) p.render_wireFrame();\n else p.render();\n }\n }", "@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tif (!mIsActive)\n\t\t\treturn;\n\n\t\t// Call our function to render content from ArVuforiaAppRenderer class\n\t\tmRenderer.render();\n\t}", "private void draw() {\n frames++;\n MainFrame.singleton().draw();\n }", "private void renderHook(){\n\t\thook.setPosition(world.hook.position.x, world.hook.position.y);\n\t\thook.setRotation(world.hook.rotation);\n\t\thook.draw(batch);\n\t}", "public void render() {\n\t\t// do nothing... as we should\n\t}", "@Override\r\n\tpublic void render(){\n\t\tGdx.gl.glClearColor( 0f, 1f, 0f, 1f );\r\n\t\tGdx.gl.glClear( GL20.GL_COLOR_BUFFER_BIT );\r\n\r\n\t\t// output the current FPS\r\n\t\tfpsLogger.log();\r\n\t}", "@Override\n public void prerender() {\n }", "@Override\r\n\tpublic void onDrawFrame(GL10 gl) {\n\r\n\t\tLog.d(TAG, \"onDrawFrame\"\t);\r\n\t\t\tsetGL(gl);\r\n\t\t\tDrawObjects(gl);\r\n\t\t\tunSetGl(gl);\r\n\t}", "@Override\n\tpublic void render(float delta) {\n\t\tupdate(delta);\n\t\tdraw(delta);\n\t}", "@Override\n public void render() {\n if (renderInterrupted) {\n log.debug(\"render()\");\n renderInterrupted = false;\n }\n\n }", "protected void onComponentRendered()\n\t{\n\t}", "public void prerender() {\n }", "public void prerender() {\n }", "private void render() {\n\n StateManager.getState().render();\n }", "@Override\n\tpublic void Draw(float delta) {\n\t\t\n\t}", "@Override\n public void beforeRender()\n {\n\n }", "public void render();", "@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}", "public void render() {\n\t\tscreen.background(255);\n\t\thandler.render();\n\t}", "public abstract void renderFrame(Window window, float musicTime);", "public void render() {\r\n\t\t\r\n\t\tif (page >= 0 && page < pages.length) {\r\n\t\t\tTextures.renderQuad(pages[page][(updates / 90) % pages[page].length], 32, 32, 1024, 512);\r\n\t\t}\r\n\t}", "private void render() {\n\t\tBufferStrategy buffStrat = display.getCanvas().getBufferStrategy();\n\t\tif(buffStrat == null) {\n\t\t\tdisplay.getCanvas().createBufferStrategy(3); //We will have 3 buffered screens for the game\n\t\t\treturn;\n\t\t}\n\n\t\t//A bufferstrategy prevents flickering since it preloads elements onto the display.\n\t\t//A graphics object is a paintbrush style object\n\t\tGraphics g = buffStrat.getDrawGraphics();\n\t\t//Clear the screen\n\t\tg.clearRect(0, 0, width, height); //Clear for further rendering\n\t\t\n\t\tif(State.getState() !=null) {\n\t\t\tState.getState().render(g);\n\t\t}\n\t\t//Drawings to be done in this space\n\t\t\n\t\t\n\t\t\n\t\tbuffStrat.show();\n\t\tg.dispose();\n\t}", "private void render() {\n\n if (state == STATE.PAUSE) {\n\n return;\n }\n\n\n if (state == STATE.MENU) {\n\n menu.draw();\n arrow.render();\n return;\n\n }\n\n if (state == STATE.INSTRUCTIONS) {\n instructions.draw();\n return;\n }\n\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).render();\n }\n\n\n for (Enemy enemy : enemies) {\n enemy.render();\n }\n\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).render();\n }\n\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).render();\n }\n\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).render();\n }\n\n topBar.render();\n bottomBar.render();\n fps.render();\n score.render();\n\n\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "protected void preRender()\n {\n // subclass\n }", "@Override\n public void draw()\n {\n }", "private void render() {\n\t\tBufferStrategy bs = this.getBufferStrategy();\r\n\t\tif (bs == null) {\r\n\t\t\tcreateBufferStrategy(3);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//Initiates Graphics class using bufferStrategy\r\n\t\tGraphics g = bs.getDrawGraphics();\r\n\t\t\r\n\t\t//displays img on screen\r\n\t\tg.drawImage(img, 0, 0, null);\r\n\t\t\r\n\t\tg.setColor(Color.CYAN);\r\n\t\tg.drawString(fps + \" FPS\", 10, 10);\r\n\t\tg.setFont(new Font(\"Arial\", 0, 45));\r\n\r\n\t\tg.dispose();//clears graphics\r\n\t\tbs.show();//shows graphics\r\n\t}", "void update() {\n rectToBeDrawn = new Rect((frameNumber * frameSize.x)-1, 0,(frameNumber * frameSize.x + frameSize.x) - 1, frameSize.x);\n\n //now the next frame\n frameNumber++;\n\n //don't try and draw frames that don't exist\n if(frameNumber == numFrames){\n frameNumber = 0;//back to the first frame\n }\n }", "private void render() {\n if (game.isEnded()) {\n if (endGui == null) {\n drawEndScreen();\n }\n\n return;\n }\n\n drawScore();\n drawSnake();\n drawFood();\n }", "@Override\n public void render(float delta) {\n // Faire clignoter le texte\n if (frame_count == 0) {\n sign = 1;\n } else if (frame_count == 60) {\n sign = -1;\n }\n frame_count += sign;\n layout.setText(font, \"Appuyez sur une touche pour commencer !\", new Color(1f, 1f, 1f, frame_count / 60f), layout.width, 0, false);\n\n batch.begin();\n // J'affiche le background\n batch.draw(background, 0, 0, background_width, background_height);\n //batch.end();\n\n // J'affiche soit le texte d'accueil, soit les boutons\n if (!triggered) {\n // J'affiche le texte centré\n font.draw(batch, layout, background_width * 0.5f - layout.width * 0.5f, 100);\n batch.end();\n }\n else {\n batch.end();\n // J'affiche la table de boutons\n //stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));\n stage.draw();\n\n }\n\n }", "@Override\r\n public void draw() {\n }", "public void render () \n\t{ \n\t\trenderWorld(batch);\n\t\trenderGui(batch);\n\t}", "@Override\n public void draw() {\n }", "private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n } else {\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n g.setColor(Color.white);\n g.drawLine(0, 500, 595, 500);\n player.render(g);\n for (int i = 0; i < aliens.size(); i++) {\n Alien al = aliens.get(i);\n al.render(g);\n }\n if (shotVisible) {\n shot.render(g);\n }\n\n if(gameOver==false)\n {\n gameOver();\n }\n for(Alien alien: aliens){\n Bomb b = alien.getBomb();\n b.render(g);\n }\n g.setColor(Color.red);\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\n g.setFont(small);\n g.drawString(\"G - Guardar\", 10, 50);\n g.drawString(\"C - Cargar\", 10, 70);\n g.drawString(\"P - Pausa\", 10, 90);\n\n if(keyManager.pause)\n {\n g.drawString(\"PAUSA\", 250, 300);\n }\n \n bs.show();\n g.dispose();\n }\n\n }", "@Override\r\n public void draw()\r\n {\n\r\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "protected void render(){}", "public void fullRenderRefresh() {\n gameChanged = true;\n visionChanged = true;\n backgroundChanged = true;\n selectionChanged = true;\n movementChanged = true;\n }", "@Override\n\tprotected void controlRender(RenderManager rm, ViewPort vp) {\n\t\t\n\t}", "protected void render() {\n\t\tString accion = Thread.currentThread().getStackTrace()[2].getMethodName();\n\t\trender(accion);\n\t}", "@Override\n public void onFrameAvailable(SurfaceTexture st) {\n mGLView.requestRender();\n }", "@Override\r\n public void render() {\n \r\n stage.act();\r\n stage.draw();\r\n }", "public void render()\n\t{\n\t\tBufferStrategy bs = this.getBufferStrategy();\n\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t//////////////////////////////\n\n\t\tg.setColor(Color.DARK_GRAY);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\tif (display != null && GeneticSimulator.updateRendering)\n\t\t{\n\t\t\tg.drawImage(display, 0, 0, getWidth(), getHeight(), this);\n\t\t}\n\n\t\tWorld world = GeneticSimulator.world();\n\n\t\tworld.draw((Graphics2D) g, view);\n\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawString(String.format(\"view: [%2.1f, %2.1f, %2.1f, %2.1f, %2.2f]\", view.x, view.y, view.width, view.height, view.PxToWorldScale), (int) 10, (int) 15);\n\n\t\tg.drawString(String.format(\"world: [time: %2.2f pop: %d]\", world.getTime() / 100f, World.popCount), 10, 30);\n\n\t\tg.drawRect(view.pixelX, view.pixelY, view.pixelWidth, view.pixelHeight);\n//\t\tp.render(g);\n//\t\tc.render(g);\n\n\n\t\t//g.drawImage(player,100,100,this);\n\n\t\t//////////////////////////////\n\t\tg.dispose();\n\t\tbs.show();\n\t}", "@Override\n\tpublic void render(SpriteBatch batch) {\n\t}", "private void render()\n\t{\n\t\ttheta = (float) (velocity.heading() + Math.toRadians(90.0));\n\n\t\t// se baser sur le temps écoulé depuis le lancement\n\t\tf = parent.frameCount / 4;\n\t\tint fi = f + 1;\n\t\tfloat x = fi % DIM * W;\n\t\tfloat y = fi / DIM % DIM * H;\n\n\t\tparent.pushMatrix();\n\t\tparent.translate(location.x, location.y);\n\t\tparent.rotate(theta);\n\t\tparent.beginShape();\n\t\tparent.texture(spritesheet);\n\t\tparent.vertex(0, 0, x, y);\n\t\tparent.vertex(100, 0, x + W, y);\n\t\tparent.vertex(100, 100, x + W, y + H);\n\t\tparent.vertex(0, 100, x, y + H);\n\t\tparent.endShape();\n\t\tparent.popMatrix();\n\t}", "@Override\r\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "private void updateAndRender(long deltaMillis) {\n currentState.update(deltaMillis / 1000f); \r\n //Double Buffering (reduce tearing)\r\n prepareGameImage();\r\n currentState.render(gameImage.getGraphics(), this.getWidth(), this.getHeight());\r\n renderGameImage(getGraphics());\r\n }", "@Override\n public void render() {\n GUI.clearScreen();\n if (assetManager.update()) {\n switch (gameState) {\n case MENU:\n GUI.menuLoop();\n break;\n case PAUSE:\n case GAME:\n gameLoop();\n break;\n case LOAD:\n World.load();\n gameState = GameState.GAME;\n break;\n }\n } else {\n GUI.splashScreen(assetManager.getProgress());\n }\n DrawManager.end();\n }", "private void onModuleUpdate() {\n //!\n //! Calculate the initial time of the frame.\n //!\n mTime = GLFW.glfwGetTime();\n\n do {\n //!\n //! Render until the display is not active.\n //!\n onModuleRender(GLFW.glfwGetTime());\n } while (mDisplay.isActive());\n }", "private void render() {\n\n\tbs=display.getCanvas().getBufferStrategy();\t\n\t\n\tif(bs==null) \n\t {\t\n\t\tdisplay.getCanvas().createBufferStrategy(3);\n\t\treturn ;\n\t }\n\t\n\tg=bs.getDrawGraphics();\n\n\t//Clear Screen\n\tg.clearRect(0, 0, width, height);\n\t\n\tif(State.getState()!=null )\n\t\tState.getState().render(g);\n\t\n\t//End Drawing!\n\tbs.show();\n\tg.dispose();\n\t\n\t}", "@Override\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "@Override\n public void onNewFrame(HeadTransform headTransform) {\n float[] mtx = new float[16];\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n surface.updateTexImage();\n surface.getTransformMatrix(mtx);\n }", "public void render() {\n backGraphics.drawImage(background, backgroundX, backgroundY, null);\n\n GameObject.renderAll(backGraphics);\n\n //2. Call repaint\n repaint();\n }", "void renderLoop(RenderLoopCallback renderLoop);", "@Override\n public void renderStatic(GC gc, ViewPort vp) {\n\n }", "public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}", "@Override\n\tpublic void render(Graphics g)\n\t{\n\t}", "@Override\n public void render() {\n if (!gameOver && !youWin) this.update();\n\n //Dibujamos\n this.draw();\n }", "@Override\n\tpublic void draw() {\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void render()\n\t{\n\t\t//double buffering is cool\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(2);\n\t\t\tbs = getBufferStrategy();\n\t\t}\n\t\t\t\n\t\tGraphics2D g2 = (Graphics2D)bs.getDrawGraphics();\n\t\n\t\t\n\t\t\n\t\tif (true)\t\n\t\t{\n\t\t\tif (level != 0)\n\t\t\t{\n\t\t\t\tg2.setColor(Color.black);\n\t\t\t\tg2.fillRect(0, 0, width, height);\t\t\t\n\t\t\t}\n\t\t\tgameObjectHandler.render(g2,false);\n\t\t}\n\t\tif(currTransition != null)\n\t\t{\n\t\t\tcurrTransition.render(g2);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tbs.show();\n\t\tg2.dispose();\n\t\n\t}", "public void beforeDraw()\n {\n INDirector.setProjection(ProjectionFormat.DirectorProjection2D);\n this.grabber.beforeRender();\n }", "@Override\n\tpublic void update(float deltaTime) {\n\t}", "public void render() {\n renderHud();\n }", "@Override\r\n\tpublic void renderBackground() {\n\r\n\t}", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1);\n\t\tGdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tcontroller.update(delta, elapsedTime);\n\t\trenderer.render();\n\t\telapsedTime += 1; // count elapsedTime for further control\n\t}" ]
[ "0.8119881", "0.76139265", "0.73948514", "0.7322849", "0.72662413", "0.7247137", "0.7234647", "0.71363527", "0.7130017", "0.7062893", "0.70519274", "0.70474476", "0.7047021", "0.7006388", "0.7003277", "0.69944763", "0.69929904", "0.6988686", "0.69284266", "0.6910669", "0.6910669", "0.6874979", "0.6865359", "0.6857211", "0.6855288", "0.68501264", "0.6846077", "0.68194985", "0.679984", "0.6784898", "0.6771808", "0.6767174", "0.67615396", "0.6750856", "0.6749434", "0.67455095", "0.6743245", "0.6720175", "0.6714708", "0.67106175", "0.67106175", "0.6708121", "0.67034924", "0.6665528", "0.6663396", "0.66548914", "0.6650803", "0.6640751", "0.66406935", "0.6627709", "0.6624866", "0.6611618", "0.6611618", "0.6603153", "0.6597368", "0.65789527", "0.6575446", "0.6566385", "0.6559824", "0.65584147", "0.65543544", "0.65483946", "0.65452397", "0.65432423", "0.6542138", "0.65399736", "0.653905", "0.65306866", "0.65300167", "0.65071255", "0.6500288", "0.64998007", "0.6493974", "0.64865184", "0.6481739", "0.647574", "0.64722383", "0.6462495", "0.6453734", "0.64469606", "0.6421525", "0.6420338", "0.64178807", "0.6415805", "0.6414055", "0.6412517", "0.6412463", "0.64049506", "0.6404788", "0.6404788", "0.63905644", "0.638871", "0.63858443", "0.63844055", "0.6383987", "0.638109", "0.637183", "0.637183", "0.63712746", "0.63712746", "0.6353555" ]
0.0
-1
Method that is called when screen is resized. Updates different viewports.
@Override public void resize(int width, int height) { bgViewPort.update(width, height, true); stage.getViewport().update(width, height, true); fonts.getFontViewport().update(width, height, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void resize(int width, int height) {game.screenPort.update(width, height, true);}", "public void recalculateViewport() {\r\n glViewport(0, 0, getWidth(), getHeight());\r\n spriteBatch.recalculateViewport(getWidth(), getHeight());\r\n EventManager.getEventManager().fireEvent(new WindowResizedEvent(getWidth(), getHeight()));\r\n }", "@Override\n protected void onSizeChanged (int w, int h, int oldw, int oldh) {\n mXSize = w;\n mYSize = h;\n\n mZBoundOut = new RectF(w/2-w/2.5f, h/2-w/2.5f, w/2+w/2.5f, h/2+w/2.5f);\n mZBoundOut2 = new RectF(\n w/2-w/2.5f-ZRING_CURSOR_ADD, h/2-w/2.5f-ZRING_CURSOR_ADD,\n w/2+w/2.5f+ZRING_CURSOR_ADD, h/2+w/2.5f+ZRING_CURSOR_ADD);\n mZBoundIn = new RectF(\n w/2-w/2.5f+ZRING_WIDTH, h/2-w/2.5f+ZRING_WIDTH,\n w/2+w/2.5f-ZRING_WIDTH, h/2+w/2.5f-ZRING_WIDTH);\n mZBoundIn2 = new RectF(\n w/2-w/2.5f+ZRING_WIDTH+ZRING_CURSOR_ADD, h/2-w/2.5f+ZRING_WIDTH+ZRING_CURSOR_ADD,\n w/2+w/2.5f-ZRING_WIDTH-ZRING_CURSOR_ADD, h/2+w/2.5f-ZRING_WIDTH-ZRING_CURSOR_ADD);\n\n if (LOCAL_LOGV) Log.v(TAG, \"New view size = (\"+w+\", \"+h+\")\");\n }", "public abstract void windowResized();", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\n\t\t// save device height width, we use it a lot of places\n\t\tmViewHeight = h;\n\t\tmViewWidth = w;\n\n\t\t// fix up the image\n\t\tsetInitialImageBounds();\n\t}", "@Override\n public void resize(int w, int h) {\n mainStage.getViewport().update(w, h, true);\n userInterface.getViewport().update(w, h, true);\n }", "@Override\n public void resize(int width, int height) {\n viewport.update(width, height);\n }", "@Override\n public void resize(int width, int height) {\n viewport.update(width, height);\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tGdx.app.log(\"GameScreen\", \"resizing\");\n\t}", "@Override\n\tpublic void resize(int arg0, int arg1) {\n\t\t\n\t\t\n\t\t\n\t\tif (getScreen() == null)\n\t\t{\n\t\t\tSCREEN_WIDTH = arg0;\n\t \tSCREEN_HEIGHT = arg1;\n\t \t\n\t \tfloat w = 800, h = 550;\n\t \tif (SCREEN_WIDTH * h < SCREEN_HEIGHT * w)\n\t \t\tRATIO = (float)SCREEN_WIDTH / (float)w;\n\t \telse\n\t \t\tRATIO = (float)SCREEN_HEIGHT / (float)h;\n\t \t\n\t \tGdx.app.log(\"RATIO\", \"\"+RATIO);\n\t\t\tsetScreen(getLoadingScreen(DESTINATION.START,DESTINATION.NO));\n\t \t//setScreen(getStartScreen());\n\t\t}\n\t\telse\n\t\t\tthis.getScreen().resize(arg0, arg1);\n\t}", "@Override\n public void resize(int x, int y) {\n viewport.update(x, y, true);\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n viewMatrix = null;\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tGdx.app.log(\"GameScreen\", \"Resizing\");\n\t}", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n mId = w / 2;\n mId = mId - mViewsCount * 9;\n }", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "protected abstract void onResize(int width, int height);", "@Override public void resize (int width, int height) {\n\t\tviewport.update(width, height, true);\n\t\tstage.getViewport().update(width, height, true);\n\t}", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}", "@Override\r\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\r\n }", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.w = w;\n this.h = h;\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tui.setViewport(width, height);\n\t\tcamera.setToOrtho(false);\n\t}", "@Override\n\tpublic void resize(int width, int height) {\n\t stage.getViewport().update(width, height, true);\n\t}", "@Override\r\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) \r\n\t{\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\r\n\t\tSystem.out.println(\"Screen Mesure: \"+getMeasuredWidth()+\" \"+getMeasuredHeight());\r\n\t\twindowW = getMeasuredWidth();\r\n\t\twindowH = getMeasuredHeight();\r\n\t \r\n\t \r\n\t}", "@Override\r\n\tpublic void onSizeChanged(int w, int h, int oldW, int oldH) {\r\n\t\t// Set the movement bounds for the ball\r\n\t\txMax = w - 1;\r\n\t\tyMax = h - 1;\r\n\t}", "public void resize( int width, int height ) {\n uiViewport.update( width, height );\n uiCamera.update();\n }", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n }", "@Override\n public void resize(int width, int height) {\n camera.viewportWidth = width/25;\n camera.viewportHeight = height/25;\n camera.update();\n }", "public void onResized(Integer width,Integer height);", "public void resize_screen(){\r\n \tstop_scn_updates();\r\n \tscn_font_size = min_font_size+1;\r\n \twhile (scn_font_size < max_font_size){\r\n \t\tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \t\tcalc_screen_size();\r\n \t\tif (scn_image.getWidth() < main_panel_width\r\n \t\t\t&& scn_image.getHeight() < main_panel_height){\r\n \t\t\tscn_font_size++;\r\n \t\t} else {\r\n \t\t scn_font_size--;\r\n \t\t break;\r\n \t\t}\r\n \t} \t\r\n \tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \tcalc_screen_size();\r\n start_scn_updates();\r\n }", "public void onWindowResized(int width, int height) {\n this.setHeight(\"\" + (height - TopPanel.HEIGHT));\n }", "private void updateViewport(int width, int height)\n\t{\n\t\tviewportWidth = width;\n\t\tviewportHeight = height;\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n setGameCards();\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tviewCamera.viewportWidth = width;\n\t\tviewCamera.viewportHeight = height;\n\t\tviewCamera.position.set(0, 0, 0);\n\t\tviewCamera.update();\n\n\t\tVector3 min = MIN_BOUND.cpy();\n\t\tVector3 max = new Vector3(MAX_BOUND.x - width, MAX_BOUND.y - height, 0);\n\t\tviewCamera.project(min, 0, 0, width, height);\n\t\tviewCamera.project(max, 0, 0, width, height);\n\t\tbounds = new BoundingBox(min, max);\n\t\t// do a pan to reset camera position\n\t\tpan(min);\n\t}", "public void onSizeChanged(int w, int h, int oldw, int oldh) {\r\n super.onSizeChanged(w, h, oldw, oldh);\r\n returnDefualt();\r\n this.startWidth = (float)getWidth()/4;\r\n this.endWidth = (float)getWidth()-((float)getWidth()/4);\r\n this.startHeight = (float)getHeight()/12;\r\n this.endHeight = getHeight()-((float)getHeight()/12);\r\n this.oval = new RectF(this.startWidth,this.startHeight , this.endWidth, this.endHeight);\r\n }", "void onResized(int width, int height);", "@Override\n\tpublic void resize(int width, int height) {\n\t\tgamePort.update(width,height);\n\n\t}", "public void onSizeChanged(int w, int h, int oldW, int oldH) {\n super.onSizeChanged(w, h, oldW, oldH);\n this.beginWid = (float)getWidth()/8;\n this.endWid = (float)getWidth()-((float)getWidth()/8);\n this.beginHei = (float)getHeight()/8;\n this.endHei = getHeight()-((float)getHeight()/8);\n this.oval = new RectF(this.beginWid,this.beginHei, this.endWid, this.endHei);\n returnDefault();\n }", "public void resize(Dimension oldScreenSize, Dimension screenSize) {\n for (Ghost ghost: ghostList) {\n ghost.setSize((int)((double)Config.GHOST_SIZE_X/(double)Config.WINDOW_SIZE_X * screenSize.width), (int)((double)Config.GHOST_SIZE_Y/(double)Config.WINDOW_SIZE_Y * screenSize.height));\n ghost.set_posX(ghost.get_posX() / (double)oldScreenSize.width * (double)screenSize.width);\n ghost.set_posY(ghost.get_posY() / (double)oldScreenSize.height * (double)screenSize.height);\n ghost.set_movementSpeedX( Config.GHOST_MOVEMENT_SPEED_X );\n ghost.set_movementSpeedY( Config.GHOST_MOVEMENT_SPEED_Y );\n }\n }", "protected void windowSizeMaybeChanged(int newWidth, int newHeight) {\n boolean changed = false;\n if (width != newWidth) {\n width = newWidth;\n changed = true;\n VConsole.log(\"New window width: \" + width);\n }\n if (height != newHeight) {\n height = newHeight;\n changed = true;\n VConsole.log(\"New window height: \" + height);\n }\n if (changed) {\n VConsole.log(\"Running layout functions due to window resize\");\n connection.runDescendentsLayout(VView.this);\n Util.runWebkitOverflowAutoFix(getElement());\n \n sendClientResized();\n }\n }", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ball\n displayArea.setDisp(w-1, h-1);\n if (!isInitBackground) {\n isInitBackground = true;\n backgCalculating = new BackCalculating(0, 0, displayArea.xMax, displayArea.yMax, Color.BLACK, Color.YELLOW);\n }\n }", "@Override\n public void resize(int width, int height) {\n float camWidth = tileMap.tileWidth * 10.0f * cameraDistance;\n\n //for the height, we just maintain the aspect ratio\n float camHeight = camWidth * ((float)height / (float)width);\n\n cam.setToOrtho(false, camWidth, camHeight);\n uiCam.setToOrtho(false, 10,6);\n cam.position.set(cameraPosition);\n\n uiCam.update();\n cam.update();\n }", "@Override public void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n // Release the buffer, if any and it will be reallocated on the next draw\n mBuffer = null;\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldW, int oldH) {\n super.onSizeChanged(w, h, oldW, oldH);\n\n canvasWidth = w;\n canvasHeight = h;\n updatePolygonSize();\n\n if (Math.min(canvasWidth, canvasHeight) != Math.min(oldW, oldH)) {\n refreshImage();\n }\n }", "@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n if (height == 0) height = 1; // To prevent divide by zero\n float aspect = (float)width / height;\n \n // Set the viewport (display area) to cover the entire window\n gl.glViewport(0, 0, width, height);\n \n // Setup perspective projection, with aspect ratio matches viewport\n gl.glMatrixMode(GL10.GL_PROJECTION); // Select projection matrix\n gl.glLoadIdentity(); // Reset projection matrix\n // Use perspective projection\n GLU.gluPerspective(gl, 45, aspect, 0.1f, 100.f);\n \n gl.glMatrixMode(GL10.GL_MODELVIEW); // Select model-view matrix\n gl.glLoadIdentity(); // Reset\n \n // You OpenGL|ES display re-sizing code here\n // ......\n }", "@Override\n protected final void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.invalidate();\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n w -= getPaddingRight() + getPaddingLeft();\n h -= getPaddingTop() + getPaddingBottom();\n\n int right = w;\n int bottom = h;\n int top = 0;\n int left = 0;\n\n if (mElement != null) {\n // Maintain aspect ratio. Certain kinds of animated drawables\n // get very confused otherwise.\n final int intrinsicWidth = mElement.getIntrinsicWidth();\n final int intrinsicHeight = mElement.getIntrinsicHeight();\n final float intrinsicAspect = (float) intrinsicWidth / intrinsicHeight;\n final float boundAspect = (float) w / h;\n if (intrinsicAspect != boundAspect) {\n if (boundAspect > intrinsicAspect) {\n // New width is larger. Make it smaller to match height.\n final int width = (int) (h * intrinsicAspect);\n left = (w - width) / 2;\n right = left + width;\n } else {\n // New height is larger. Make it smaller to match width.\n final int height = (int) (w * (1 / intrinsicAspect));\n top = (h - height) / 2;\n bottom = top + height;\n }\n }\n mElement.setBounds(left, top, right, bottom);\n }\n\n super.onSizeChanged(w, h, oldw, oldh);\n }", "@Override\n\tpublic void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {\n\t\tscreenWidth = getWidth();\n\t\tscreenHeight = getHeight();\n\t}", "@Override\r\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\t\tLog.d(TAG, \"onSurfacechanged\");\r\n\t\tif (height == 0) height = 1; // To prevent divide by zero\r\n\t float aspect = (float)width / height;\r\n\t \r\n\t // Set the viewport (display area) to cover the entire window\r\n\t gl.glViewport(0, 0, width, height);\r\n\t \r\n\t // Setup perspective projection, with aspect ratio matches viewport\r\n\t gl.glMatrixMode(GL10.GL_PROJECTION); // Select projection matrix\r\n\t gl.glLoadIdentity(); // Reset projection matrix\r\n\t // Use perspective projection\r\n\t GLU.gluPerspective(gl, 45, aspect, 0.1f, 100.f);\r\n\t \r\n\t gl.glMatrixMode(GL10.GL_MODELVIEW); // Select model-view matrix\r\n\t gl.glLoadIdentity(); // Reset\r\n\t \r\n\t // You OpenGL|ES display re-sizing code here\r\n\t // ......\r\n\t}", "@Override\n\tpublic void appSizeChanged(int appWidth, int appHeight) {\n\t\tP.out(\"New app size!\", \"[appSizeWatcher]\", appWidth + \", \" + appHeight);\n\t\tif(p.width != 800 || p.height != 600) {\n\t\t\tchangedFlash.setTarget(0).setCurrent(1);\n\t\t\tAppUtil.setSize(p, 800, 600);\n\t\t\tAppUtil.setLocation(p, 0, 0);\n\t\t}\n\t}", "@Override\r\n\tpublic void resize(GL10 gl, int w, int h) {\n\t\t if (h == 0) \r\n\t\t\t h = 1;\r\n\r\n\t gl.glViewport(0, 0, w, h); // Reset The Current Viewport And Perspective Transformation\r\n\t gl.glMatrixMode(GL10.GL_PROJECTION); // Select The Projection Matrix\r\n\t gl.glLoadIdentity(); // Reset The Projection Matrix\r\n\t GLU.gluPerspective(gl, 45.0f, (float) w / (float) h, 0.1f, 100.0f); // Calculate The Aspect Ratio Of The Window\r\n\t GLU.gluLookAt(gl, 0, 0, -5, 0, 0, 0, 0, 1, 0);\r\n\t gl.glMatrixMode(GL10.GL_MODELVIEW); // Select The Modelview Matrix\r\n\t gl.glLoadIdentity(); // Reset The ModalView Matrix\r\n\t}", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n stage.mapImg.setHeight(Gdx.graphics.getHeight());\n stage.mapImg.setWidth(Gdx.graphics.getWidth());\n stage.gameUI.show();\n }", "@Override\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\t\tLibNative.resize(width, height);\n\t}", "public void updateDisplayBounds() {\n if (display_.getDataSource().getBounds() != null) {\n int[] newBounds = display_.getDataSource().getBounds();\n int[] oldBounds = display_.getDisplayModel().getBounds();\n double xResize = (oldBounds[2] - oldBounds[0]) / (double) (newBounds[2] - newBounds[0]);\n double yResize = (oldBounds[3] - oldBounds[1]) / (double) (newBounds[3] - newBounds[1]);\n setImageBounds(newBounds);\n if (xResize < 1 || yResize < 1) {\n zoom(1 / Math.min(xResize, yResize), null);\n }\n }\n }", "@Override\n public void surfaceChanged(\n SurfaceHolder holder, int format, int width, int height) {\n if (LOGGING) Log.d(LOG_TAG, \"surfaceChanged(\" + width + \", \" + height + \")\");\n mRenderCallback.onResized(width, height);\n }", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n\n float ratio = (float) width / height;\n\n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n\n }", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n \n float ratio = (float) width / height;\n /*\n mWidth = width;\n mHeight = height;\n */\n \n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n /*\n Near / far clipping planes, in terms of units away from the camera\n Cannot be negative or 0, should not be close to 0\n */\n //Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 0.5f, 21);\n \n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tfloat xPad = getPaddingLeft() + getPaddingRight();\r\n\t\tfloat yPad = getPaddingTop() + getPaddingBottom();\r\n\t\tdimension = Math.min(w - xPad, (h - yPad) * 2);\r\n\t\tradius = 60;\r\n\t\tinsideLeft = w / 2 - radius;\r\n\t\tinsideRight = w / 2 + radius;\r\n\t\tinsideTop = dimension - getPaddingBottom() - radius;\r\n\t\tinsideBottom = dimension - getPaddingBottom();\r\n\t\t\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension - getPaddingBottom());\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension/2);\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension, dimension);\r\n\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), w-getPaddingRight(), h-getPaddingBottom());\r\n\t\tfloat insideRectDownH = dimension-getPaddingBottom()-getPaddingTop()+150;\r\n//\t\tinsideRect = new RectF(50, 300, 320, insideRectDownH);\r\n\t\tinsideRect = new RectF(w/2-radius, dimension-radius, w/2+radius, dimension+radius);\r\n\t}", "@Override\n\tpublic void onResize(int width, int height) {\n\t}", "protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n\n //create Bitmap of certain w,h\n bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n\n //apply bitmap to graphic to start drawing.\n canvas = new Canvas(bitmap);\n }", "public final void windowResizedOp(int newWidth, int newHeight) {\n super.defaultWindowResizedOp(newWidth, newHeight);\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n if (w == 0 || h == 0) return;\n createGame();\n }", "@Override\n public void resize(int width, int height) {\n Gdx.app.log(TAG, \"Resized to width = \" + width + \" height = \" + height);\n }", "@Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n if (LOGGING) Log.d(LOG_TAG, \"surfaceChanged(\" + width + \", \" + height + \")\");\n mRenderCallback.onResized(width, height);\n }", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "@Override\n protected void onMeasure(int w, int h) {\n w = MeasureSpec.getSize(w);\n h = MeasureSpec.getSize(h);\n// Log.d(\"surfMeasure\", w + \" \" + h);\n\n int oldH = h, oldW = w;\n\n if (w >= 0 && h >= 0) {\n\n if (h == 0 || !fullScreenDisplay || w / ((double) h) <= 16 / 9.0) {\n h = (int) (w * 9 / 16.0);\n } else {\n w = (int) (h * 16 / 9.0);\n }\n if (fullScreen) {\n setX((oldW - w) / 2);\n setY((oldH - h) / 2);\n }\n// Display.this.setLayoutParams(new LinearLayout.LayoutParams(w, h));\n }\n\n updateSizes(w, h);\n\n// Log.d(\"si\", w + \" \" + h);\n\n\n setMeasuredDimension(w, h);\n Display.this.setMeasuredDimension(w, h);\n\n// super.onMeasure(w, h);\n// ViewGroup.LayoutParams lp = getLayoutParams();\n// lp.width = w;\n// lp.height = h;\n// this.setLayoutParams(lp);\n// setMinimumWidth(w);\n// setMinimumHeight(h);\n\n }", "void update(){\r\n\t\twindowHeight = this.getHeight();\r\n\t}", "void windowResized(ResizeEvent e);", "protected void updateScales() {\n hscale = 1f;\n vscale = 1f;\n viewData.setHscale(hscale);\n viewData.setVscale(vscale);\n }", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h)\n {\n thread.onWindowResize(w, h);\n }", "private void controlResized() {\n disposeBackBuffer();\n initializeBackBuffer();\n\n redraw();\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t\tif( mr > 0.1f*h ) {\n\t\t\tmr=0.1f*h;\n\t\t\tif( m != null ) {\n\t\t\t\t((CircleObjectKE)m).setR(mr);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\tif (w > 0 && h > 0) {\r\n\t\t\tcontainerWidth = w;\r\n\t\t\tcontainerHeight = h;\r\n\t\t}\r\n\t}", "@Override\n public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n glViewport(0, 0, width, height);\n\n this.width = width;\n this.height = height;\n setPerspectiveView();\n \n }", "protected void sendSizeChange(int oldw, int oldh) {\n if (oldw != this.getWidth() || oldh != this.getHeight())\n this.m_eventSender.sendEvent(RESIZED_EVENT, this, new SizeData(oldw,oldh));\n }", "@Override\r\n public void resize(int width, int height)\r\n {\r\n vistaJuego.update(width, height); // Esta por su parte permite actualizar las dimensiones de la camara y asi se ajuste el juego a la pantalla del dispositivo movil\r\n camara.update(); // De igual modo se actualiza la camara\r\n }", "public void resize() {\n\t\tsp.doLayout();\n\t}", "@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}", "@Override\n\tpublic void resize(float width, float height) {\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n drawCanvas = new Canvas(canvasBitmap);\n }", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ballParent\n box.set(0, 0, w, h);\n }", "@Override\n\t\t\tpublic void onGlobalLayout() {\n\t\t\t\tint [] location = new int[2];\n\t\t\t\tgetLocationOnScreen(location);\n\t\t\t\tif (mWindowMgrParams.y == location[1]) {\n\t\t\t\t\t// is full screen\n\t\t\t\t\tisNotFullScreen = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tisNotFullScreen = true;\n\t\t\t\t}\n\n\t\t\t\t//detect screen orientation change\n\t\t\t\tPoint tempDimension = ScreenUtils.getScreenDimen((Activity) mContext);\n\t\t\t\tif (screendimension.x == tempDimension.y) {\n\t\t\t\t\t//now is in landscape\n\t\t\t\t\tif (currentdimension.x == screendimension.x) {\n\t\t\t\t\t\t// this is the first time that detect screen orientation\n\t\t\t\t\t\t// is changed to landscape\n\t\t\t\t\t\tcurrentdimension = tempDimension;\n\t\t\t\t\t\tonOrientationChanged(ScreenStateListener.ORIENTATION_LANDSCAPE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//now is in portrait\n\t\t\t\t\tif (currentdimension.x != screendimension.x) {\n\t\t\t\t\t\t// this is the first time that screen orientation\n\t\t\t\t\t\t// is recovered from landscape for the first time\n\t\t\t\t\t\tcurrentdimension = tempDimension;\n\t\t\t\t\t\tonOrientationChanged(ScreenStateListener.ORIENTATION_PORTRAIT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void resize (int width, int height) \n\t{ \n\t\tcamera.viewportWidth = (Constants.VIEWPORT_HEIGHT / height) *\n\t\t\twidth;\n\t\tcamera.update();\n\t\tcameraGUI.viewportHeight = Constants.VIEWPORT_GUI_HEIGHT;\n\t\tcameraGUI.viewportWidth = (Constants.VIEWPORT_GUI_HEIGHT\n\t\t\t\t/ (float)height) * (float)width;\n\t\tcameraGUI.position.set(cameraGUI.viewportWidth / 2,\n\t\t\t\tcameraGUI.viewportHeight / 2, 0);\n\t\tcameraGUI.update();\n\t}", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n\n int frameWidth = getWidth();\n int frameHeight = getHeight();\n int horizontalPadding = mPreviewHMarging;\n int verticalPadding = mPreviewVMarging;\n// FrameLayout f = mFrame;\n\n // Ignore the vertical paddings, so that we won't draw the frame on the\n // top and bottom sides\n int previewHeight = frameHeight - verticalPadding;\n int previewWidth = frameWidth - horizontalPadding;\n\n // resize frame and preview for aspect ratio\n if (previewHeight > previewWidth * mAspectRatio) {\n previewHeight = (int) (previewWidth * mAspectRatio + .5);\n } else {\n previewWidth = (int) (previewHeight / mAspectRatio + .5);\n }\n // limit the previewWidth large than minimalWidth\n if (previewWidth < mPreviewMinWidth){\n previewWidth = mPreviewMinWidth;\n previewHeight = (int)(previewWidth * mAspectRatio + .5);\n }\n\n frameWidth = previewWidth + mPreviewHMarging;\n frameHeight = previewHeight + mPreviewVMarging;\n\n int hSpace = ((r - l) - frameWidth) / 2;\n int vSpace = ((b - t) - frameHeight);\n\n // calc the tPads\n int tPads = 0;\n\n if (vSpace > 0) {\n // calc the bottom control bar width for special density\n int bottomHeight = 0;\n switch (mMetrics.densityDpi){\n case DisplayMetrics.DENSITY_HIGH:\n bottomHeight = mHdpiBottomHeight;\n break;\n case DisplayMetrics.DENSITY_MEDIUM:\n bottomHeight = mMdpiBottomHeight;\n break;\n case DisplayMetrics.DENSITY_LOW:\n bottomHeight = mMdpiBottomHeight * DisplayMetrics.DENSITY_LOW / DisplayMetrics.DENSITY_MEDIUM;\n break;\n case DisplayMetrics.DENSITY_XHIGH:\n bottomHeight = mHdpiBottomHeight * DisplayMetrics.DENSITY_XHIGH / DisplayMetrics.DENSITY_HIGH;\n break;\n default:\n bottomHeight = mHdpiBottomHeight * mMetrics.densityDpi / DisplayMetrics.DENSITY_HIGH;\n break;\n }\n\n int tmp = vSpace - bottomHeight;\n if (tmp > 0) {\n /*int cameraId = ((CameraActivity)mActivity).mCameraId;\n if (Compatible.instance().mIsIriverMX100 && cameraId == Const.CAMERA_FRONT){\n tPads = vSpace/2;\n }\n else if (!RotationUtil.calcNeedRevert(cameraId)) {\n //large-screen preview align with the up edge of control bar\n tPads = tmp;\n }\n else {*///small-screen preview vertical center the screen\n tPads = vSpace/2;\n //}\n }else {\n tPads = 0;\n }\n }\n if (mIsGifMode) { // GIF mode preview size is specified\n int width = (int) (mMetrics.widthPixels * 0.9);//(int)getResources().getDimension(R.dimen.gif_mode_preview_width);\n /*\n * FIX BUG: 5484\n * FIX COMMENT: some devices the width is larger than height,so these devices's ratio value is width divided height\n * DATE: 2013-12-05\n */\n double ratio = mAspectRatio;\n if(ratio < 1) {\n ratio = 1 / ratio;\n }\n int height = (int) (width * ratio);//(int)getResources().getDimension(R.dimen.gif_mode_preview_height);\n int frontPaddingTop = (int)getResources().getDimension(R.dimen.gif_mode_preview_padding_top);\n int backPaddingLeft = (mMetrics.widthPixels - width)/2;\n int backPaddingTop = frontPaddingTop - (height - width)/2;\n mFrame.measure(\n MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),\n MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));\n if (!mGifModeFrontCamera) {\n mFrame.layout(backPaddingLeft, backPaddingTop, width+backPaddingLeft, height+backPaddingTop);\n }else {\n mFrame.layout(0, frontPaddingTop, height, frontPaddingTop+width);\n }\n } else {\n mFrame.measure(\n MeasureSpec.makeMeasureSpec(frameWidth, MeasureSpec.EXACTLY),\n MeasureSpec.makeMeasureSpec(frameHeight, MeasureSpec.EXACTLY));\n mFrame.layout(l + hSpace, t + tPads, r - hSpace, b - vSpace + tPads);\n int[] layoutPars = new int[4];\n layoutPars[0] = l + hSpace;\n layoutPars[1] = t + tPads;\n layoutPars[2] = r - hSpace;\n layoutPars[3] = b - vSpace + tPads;\n setmFrameLayoutParas(layoutPars);\n }\n\n\n /*if (mFocus != null) {\n int size = mFocus.getWidth()/2;\n int x = mFocus.getTouchIndexX();\n int y = mFocus.getTouchIndexY();\n if ((x >= 0)&&( y >= 0)){\n // touchafaec mode\n mFocus.layout(x - size, y - size,x + size,y + size);\n }else{\n mFocus.setPosition(frameWidth/2, frameHeight/2);\n }\n }*/\n\n if (mSizeListener != null) {\n mSizeListener.onSizeChanged();\n }\n\n if (mIsRatioChanged) {/*\n mIsRatioChanged = false;\n if (mActivity instanceof CameraActivity){\n Handler handler = ((CameraActivity)mActivity).getHandler();\n// handler.sendEmptyMessage(Camera.MULTI_PIC_INITIALIZE);\n handler.sendEmptyMessage(Camera.UPDATE_SPLITE_LINE);\n if (Camera.mCurrentCameraMode == Camera.CAMERA_MODE_MAGIC_LENS\n || Camera.mCurrentCameraMode == Camera.CAMERA_MODE_PIP) {\n handler.sendEmptyMessage(Camera.RESTART_PREVIEW);\n }\n *//**\n * FIX BUG: 1348\n * FIX COMMENT: let layout adaptive.\n * DATE: 2012-07-30\n *//*\n Message message = new Message();\n message.what = Camera.UPDATE_REVIEW_EDIT_BAR_SIZE;\n message.arg1 = tPads;\n handler.handleMessage(message);\n }\n */}\n /*\n View view = mActivity.findViewById(R.id.top_menu_root);\n int topviewHeight = (view != null)?view.getHeight():0;\n // initialize the original top bar height\n if ((mInitTopBarHeight == 0) && (topviewHeight > 0)){\n mInitTopBarHeight = topviewHeight;\n }\n\n if (mInitTopBarHeight != 0) {\n // reset the height of top bar view\n\n int nHeight = 0;\n if (tPads > mInitTopBarHeight){\n nHeight = tPads;\n }\n else{\n nHeight = mInitTopBarHeight;\n }\n\n if (mActivity instanceof CameraActivity){\n Handler handler = ((CameraActivity)mActivity).getHandler();\n Message m = handler.obtainMessage(VideoCamera.RELAYOUT_TOP_BAR, nHeight, 0, null);\n handler.sendMessage(m);\n }else{\n ViewGroup.LayoutParams layoutParams = view.getLayoutParams();\n layoutParams.width = LayoutParams.FILL_PARENT;\n layoutParams.height = nHeight;\n view.setLayoutParams(layoutParams);\n }\n }\n */\n }", "default void onVideoSizeChanged(int oldWidth, int oldHeight, int width, int height) {\n }", "public void SetResolution() {\r\n DisplayMetrics displayMetrics = new DisplayMetrics();\r\n WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);\r\n wm.getDefaultDisplay().getMetrics(displayMetrics);\r\n this.ScreenWidth = displayMetrics.widthPixels;\r\n this.ScreenHeight = displayMetrics.heightPixels;\r\n }", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}", "void updateVisualizationSize(\n\t\tint visualizationWidth,\n\t\tint visualizationHeight)\n\t{\n\t\tthis.visualizationWidth = visualizationWidth;\n\t\tthis.visualizationHeight = visualizationHeight;\n\t}", "@Override\n\tpublic void resize(int width, int height) {\n\t\trenderer.setSize(width, height);\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "public void updateRenderRect() {\n int i = 0;\n if (this.mTargetRatio == 2) {\n this.mTx = this.mRenderWidth == 0 ? 0 : (this.mRenderOffsetX * this.mSurfaceWidth) / this.mRenderWidth;\n int i2 = (this.mSurfaceHeight - this.mSurfaceWidth) / 2;\n if (this.mRenderHeight != 0) {\n i = (this.mRenderOffsetY * this.mSurfaceHeight) / this.mRenderHeight;\n }\n this.mTy = i2 + i;\n this.mTwidth = this.mSurfaceWidth;\n this.mTheight = this.mSurfaceWidth;\n this.mRenderLayoutRect.set(this.mRenderOffsetX, ((this.mRenderHeight - this.mRenderWidth) / 2) + this.mRenderOffsetY, this.mRenderWidth + this.mRenderOffsetX, ((this.mRenderHeight - this.mRenderWidth) / 2) + this.mRenderOffsetY + this.mRenderWidth);\n return;\n }\n this.mTx = this.mRenderWidth == 0 ? 0 : (this.mRenderOffsetX * this.mSurfaceWidth) / this.mRenderWidth;\n this.mTy = this.mRenderHeight == 0 ? 0 : (this.mRenderOffsetY * this.mSurfaceHeight) / this.mRenderHeight;\n this.mTwidth = this.mSurfaceWidth;\n this.mTheight = this.mSurfaceHeight;\n this.mRenderLayoutRect.set(0, 0, this.mRenderWidth, this.mRenderHeight);\n }", "private void onResize() {\n /*\n * IE (pre IE9 at least) will give us some false resize events due to\n * problems with scrollbars. Firefox 3 might also produce some extra\n * events. We postpone both the re-layouting and the server side event\n * for a while to deal with these issues.\n * \n * We may also postpone these events to avoid slowness when resizing the\n * browser window. Constantly recalculating the layout causes the resize\n * operation to be really slow with complex layouts.\n */\n boolean lazy = resizeLazy\n || (BrowserInfo.get().isIE() && BrowserInfo.get()\n .getIEVersion() <= 8) || BrowserInfo.get().isFF3();\n \n if (lazy) {\n delayedResizeExecutor.trigger();\n } else {\n windowSizeMaybeChanged(Window.getClientWidth(),\n Window.getClientHeight());\n }\n }", "protected abstract void resize();", "private void onWindowSizeChange() {\n resizeAnchorPane();\n synchronized (notifiers) {\n for (int i = 0; i < notifiers.size(); i++) { //can't be in for each loop as notifiers might be changed in another thread\n Notifier notifier = notifiers.get(i);\n notifier.notify(scrollPane.getViewportBounds().getWidth(), scrollPane.getViewportBounds().getHeight());\n }\n }\n }", "public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n\t\tGLES20.glViewport(0, 0, width, height);\n\t\tLog.d(\"ShelXle.Droid Screen Size\", width + \" \" + height);\n\t\tpixh = height;\n\t\tpixw = width;\n\t\tfpsscal = 350.0f / Math.min(width, height);\n\t\tfpsMat[0] = -fpsscal;\n\t\tfpsMat[12] = 1.0f - fpsscal;\n\t\tfpsMat3[0] = -fpsscal*1.24f;\n\t\tfpsMat3[12] = 1.0f - fpsscal*1.24f;\n\n\t\tfpsMat4[0] = -fpsscal*1.26f;\n\t\tfpsMat4[12] = 1.0f - fpsscal*1.26f;\n\t\tfpsMat2[0] = -0.25f * fpsscal;\n\t\tLog.d(\"ShelXle.Droid FPS text scaling \", fpsscal + \" \");\n\t\tfloat ratio = (float) width / height;\n\t\tfloat fh = (float) Math.tan(29.0 / 360.0 * 3.14159265358979) * 5.0f;\n\t\tfloat fw = fh * ratio;\n\t\tMatrix.frustumM(proj, 0, -fw, fw, -fh, fh, 5.0f, 800.0f);\n\t\tMatrix.setLookAtM(mv, 0, 0.0f, 200f, 0f, 0f, 0.0f, 0.0f, 0.0f, 00f, 1f);\n\t\tMatrix.multiplyMM(pmv1, 0, proj, 0, mv, 0);\n\t\tSystem.arraycopy(pmv1, 0, proj, 0, 16);\n\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t/*\n\t\t * if (f!=null){ f.write(proj); f.write(proj);\n\t\t * \n\t\t * }\n\t\t */\n\t\t// Matrix.setIdentityM(proj,0);\n\t\t// Matrix.perspectiveM(proj, 0, 29.0f,ratio,5.0f,800.0f);\n\n\t}", "public void updateBounds() {\n\t\tswitch (this.species){\n\t\tcase HOGCHOKER:\n\t\tcase SILVERSIDE:\n\t\tcase FLOUNDER:\n\t\t\tthis.topYBound = frameHeight / 3 * 2;\n\t\t\tthis.bottomYBound = frameHeight - imageHeight - frameBarSize;\n\t\t\tbreak;\n\t\tcase PERCH: \n\t\tcase MINNOW: \n\t\tcase WEAKFISH:\n\t\t\tthis.topYBound = frameHeight / 3;\n\t\t\tthis.bottomYBound = frameHeight / 3 * 2 - imageHeight;\n\t\t\tbreak;\n\n\t\tcase MENHADEN:\n\t\tcase MUMMICHOG:\n\t\t\tthis.topYBound = 0;\n\t\t\tthis.bottomYBound = frameHeight / 3 - imageHeight;\n\t\t\tbreak;\n\t\tcase GOLD:\n\t\tdefault:\n\t\t\ttopYBound = 0;\n\t\t\tbottomYBound = frameHeight;\n\t\t}\n\t}", "private void updateSizeInfo() {\n RelativeLayout drawRegion = (RelativeLayout)findViewById(R.id.drawWindow);\r\n drawW = drawRegion.getWidth();\r\n drawH = drawRegion.getHeight();\r\n getImageFromStorage();\r\n LinearLayout parentWindow = (LinearLayout)findViewById(R.id.parentWindow);\r\n parentWindow.setPadding((drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2, (drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2);\r\n parentWindow.invalidate();\r\n }", "public void adjustSize() {\r\n /*\r\n * Calculate target width: max of header, adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetWidth = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(headerBar.getOffsetWidth(),\r\n contentWidget.getOffsetWidth(), getWidth()\r\n - TOTAL_BORDER_THICKNESS);\r\n /*\r\n * Calculate target height: max of adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetHeight = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(contentWidget.getOffsetHeight(), getHeight()\r\n - TOTAL_BORDER_THICKNESS - headerBar.getOffsetHeight());\r\n\r\n setPixelSize(targetWidth, targetHeight);\r\n }", "@Override\n\tpublic void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tmRequiredRadius = (int) (Math.sqrt(w * w + h * h) / 3);\n\t}" ]
[ "0.7627644", "0.73961073", "0.7387031", "0.71581143", "0.7140582", "0.70831245", "0.7049036", "0.7049036", "0.6946706", "0.6913368", "0.6900084", "0.6896235", "0.6879421", "0.6841104", "0.6798062", "0.6797122", "0.67622495", "0.67509437", "0.6729779", "0.6728399", "0.6715755", "0.66958654", "0.6689766", "0.66766214", "0.6652859", "0.6651665", "0.6645839", "0.66438997", "0.66236067", "0.66195565", "0.65985906", "0.6596293", "0.6593892", "0.65859306", "0.6585365", "0.6584824", "0.6575", "0.65732545", "0.65663135", "0.65650624", "0.6563587", "0.65619445", "0.6556963", "0.6549036", "0.65430266", "0.6537011", "0.6532793", "0.65146804", "0.6507071", "0.6488416", "0.64681643", "0.64393413", "0.64199847", "0.641045", "0.6402239", "0.6385602", "0.6372126", "0.63641083", "0.63573366", "0.6350987", "0.6349603", "0.6328128", "0.631588", "0.63046026", "0.6303927", "0.63012755", "0.62990797", "0.6263928", "0.6260583", "0.62537146", "0.62180907", "0.6189233", "0.6179857", "0.6174977", "0.6174792", "0.6170279", "0.61646616", "0.61630815", "0.6145451", "0.6145152", "0.6127545", "0.61271715", "0.6122575", "0.6121091", "0.61000335", "0.6089788", "0.6074682", "0.6074067", "0.6073266", "0.60678864", "0.60626054", "0.6056086", "0.6052", "0.6042842", "0.60275066", "0.6020859", "0.6006491", "0.59926015", "0.5989025", "0.59868824" ]
0.6881677
12
Method that is called when game is paused.
@Override public void pause() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void pause() {\n Gdx.app.log(TAG, \"Paused\");\n }", "@Override\n\tpublic void pause() \n\t{\n\t\tif (state_Game==GAME_READY) \n\t\t{\n\t\t\tstate_Game=GAME_PAUSED;\n\t\t}\n\t}", "public void onPause () {\n\t\t\n\t}", "@Override\n\tpublic void pause() {\n\t\tGdx.app.log(\"GameScreen\", \"pause called\");\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n\n //Execute the game view's pause method\n gameEngine.pause();\n }", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\t\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tmPaused=true;\n\t\tLog.d(\"onPause\", \"Paused\");\n\t\t\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tApplicationStatus.activityPaused();\n\t}", "public void onPause() {\n LOG.mo8825d(\"[onPause]\");\n super.onPause();\n }", "public void onPause();", "public void pause()\n {\n paused = true;\n }", "public void pause() {\n paused = true;\n }", "public void pause() {\n paused = true;\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n // Tell the gameView pause method to execute\n gameView.pause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n // Tell the gameView pause method to execute\n gameView.pause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n // Tell the gameView pause method to execute\n gameView.pause();\n }", "public void pause() {\r\n\t\tSystem.out.println(\"Paused game\");\r\n\t\tthis.timeline.pause();\r\n\t\tisPaused = true;\r\n\t\tpauseMenu.setVisible(true);\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tSalinlahiFour.getBgm().pause();\n\t}", "void pauseGame() {\n myGamePause = true;\n }", "@Override\n\tpublic void onPause() {\n\n\t}", "@Override\n\tprotected void onPause() {\n\t\tSystem.out.println(\"onPause\");\n\t}", "public void onPause() {\n }", "public void paused() {\n System.out.println(\"Paused\");\n }", "public void checkPaused()\n {\n paused = true;\n }", "@Override\r\n public void onPause() {\r\n NexLog.d(LOG_TAG, \"onPause called\");\r\n activityPaused = true;\r\n }", "public static void pauseGame() {\r\n\t\tif(paused) {\r\n\t\t\tgui.restoreMenu();\r\n\t\t}else {\r\n\t\t\tgui.setMenu(new PauseMenu(), false);\r\n\t\t}\r\n\t\tpaused = !paused;//flip state\r\n\t}", "void pauseGame() {\n myShouldPause = true;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "public synchronized void pause() {\r\n\r\n\t\tpaused = true;\r\n\t}", "public void pauseGame() {\n paused = true;\r\n cam.zoom = worldWidth/screenWidth;\r\n boundCamera();\r\n topHud.setPauseButtonCanDraw(false);\r\n gameHud.setCanPress(false);\r\n\r\n playButton.setDrawable(!(win || lose));\r\n homeButton.setDrawable(true);\r\n restartButton.setDrawable(true);\r\n\r\n playButton.setCanPress(true);\r\n homeButton.setCanPress(true);\r\n restartButton.setCanPress(true);\r\n\r\n bindInput(pauseProcessors);\r\n\r\n timeGap = centralTimer - timer;\r\n }", "protected void onPause ()\n\t{\n\t\tsuper.onPause ();\n\t}", "synchronized void pause() {\n\t\tpaused = true;\n\t}", "protected abstract void onPause();", "public void onPause()\n {\n\n }", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n pausePlayer();\n }", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void onPause() {\n super.onPause();\n isPaused = true;\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tonPause = true;\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.e(TAG, \"onpause\");\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.e(TAG, \"onpause\");\r\n\t}", "@Override\r\n\tpublic void onPause() {\r\n\t\tsuper.onPause();\r\n\t\ttry {\r\n\t\t\tSaveGameHandler.saveGame(this, new SaveGame(controller, status),\r\n\t\t\t\t\t\"test.game\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void onPause() {\n\t\tdouble maxBlur = Game.SIZE/20d;\n\t\tdouble maxBrighnessChange = -.4;\n\t\tdouble maxSaturationChange = -.3;\n\t\tif(!Game.instance().getEngine().isPaused()) {\n\t\t\tSystem.out.println(\"Paused!\");\n\t\t\tGame.instance().getEngine().setPaused(true);\n\t\t\t\n\t\t\tblur.setInput(ca);\n\t\t\tmapPane.setEffect(blur);\n\t\t\tsliding.fromDown(pauseOverlay, new Extra() {\n\t\t\t\t@Override\n\t\t\t\tpublic void interpolate(double frac) {\n\t\t\t\t\tblur.setRadius(maxBlur*frac);\n\t\t\t\t\tca.setBrightness(maxBrighnessChange*frac);\n\t\t\t\t\tca.setSaturation(maxSaturationChange*frac);\n\t\t\t\t}\n\t\t\t\t@Override public void onFinish() {}\n\t\t\t});\n\t\t}else {\n\t\t\tSystem.out.println(\"Unpaused!\");\n\t\t\tGame.instance().getEngine().setPaused(false);\n\t\t\tsliding.fromUp(Game.instance().getGameHud(), new Extra() {\n\t\t\t\t@Override\n\t\t\t\tpublic void interpolate(double frac) {\n\t\t\t\t\tfrac = 1-frac;\n\t\t\t\t\tblur.setRadius(maxBlur*frac);\n\t\t\t\t\tca.setBrightness(maxBrighnessChange*frac);\n\t\t\t\t\tca.setSaturation(maxSaturationChange*frac);\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void onFinish() {\n\t\t\t\t\tmapPane.setEffect(null);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}\n\t}", "protected void onPause(Bundle savedInstanceState) {\r\n\t\t\r\n\t}", "public void onPause() {\n super.onPause();\r\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t\n\t}", "@Override\n\t\tprotected void onPause() {\n\t\t\tsuper.onPause();\n\t\t}", "@Override\r\n public void pause() {\r\n\r\n }", "@Override\r\n public void pause() {\r\n\r\n }", "@Override\n protected void onPause() {\n super.onPause();\n MobclickAgent.onPause(this);\n // JPushInterface.onPause(this);\n isForeground = false;\n\n }", "public void pause() {\n isPaused = true;\n System.out.println(\"pausing\");\n timeline.stop();\n }", "public void onPause() {\n super.onPause();\n this.pushManager.e();\n if (this.isLiving) {\n this.isPushInBackground = true;\n this.isNoNetEvent = false;\n startPausedTimer();\n }\n if (this.mLivePusherInfoView != null) {\n this.mLivePusherInfoView.onPause();\n }\n }", "@Override\n public void pause() {\n // Not used\n }", "@Override\n public void pause() {\n \n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}", "@Override\n public void pause() {\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n protected void onPause() {\n Log.i(\"G53MDP\", \"Main onPause\");\n super.onPause();\n }", "@Override\r\n\tprotected void onPause() {\r\n\t\tsuper.onPause();\r\n\t\t\r\n\t\t\t\t\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tisFlag = false;\n\t}", "@Override\r\n public void pause() {}", "@Override\n\tpublic void pause()\n\t{\n\n\t}", "@Override\n\tpublic void pause() \n\t{\n\n\t}", "public void pause() {\r\n\t\tsetState(PAUSED);\r\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tLog.d(TAG,\"onPause\");\n\t\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tLog.i(TAG, module + \" Entra por onPause\");\n\t}", "@Override\n protected void onPause() {\n prefs.saveHighestScore(score.getScore());\n prefs.seState(currentQuestionIndex);\n super.onPause();\n }", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\t// getnewtime();\r\n\t\tLog.e(TAG, \"onpause\");\r\n\t}" ]
[ "0.81089675", "0.8088588", "0.79547346", "0.7920894", "0.7873194", "0.7869518", "0.7869518", "0.7869518", "0.7869518", "0.78513473", "0.7840865", "0.78339684", "0.7811039", "0.7800286", "0.77865803", "0.7757436", "0.7757436", "0.77521867", "0.77521867", "0.77521867", "0.7749028", "0.7741091", "0.7727624", "0.76995665", "0.76503587", "0.7647954", "0.7647925", "0.76442844", "0.7630139", "0.76062363", "0.7600898", "0.7600898", "0.76000047", "0.75962573", "0.7588467", "0.7579574", "0.7575228", "0.75717676", "0.75444245", "0.75444245", "0.75444245", "0.7540748", "0.75258857", "0.7524613", "0.7523665", "0.7523665", "0.7515457", "0.751445", "0.7512665", "0.7498389", "0.7489313", "0.7489313", "0.7489313", "0.7489313", "0.7489313", "0.74880475", "0.74880475", "0.747585", "0.7472229", "0.7472229", "0.7468701", "0.7459", "0.7459", "0.7458473", "0.7457889", "0.7439251", "0.7433319", "0.74329317", "0.7426447", "0.7426447", "0.7426447", "0.7426447", "0.7426447", "0.7424647", "0.7424647", "0.7424647", "0.7424647", "0.7424647", "0.7424647", "0.7424647", "0.7424647", "0.7424647", "0.7421121", "0.74193853", "0.74193853", "0.74193853", "0.74193853", "0.74193853", "0.74193853", "0.74193853", "0.7418104", "0.74110454", "0.7409687", "0.74063075", "0.7404942", "0.7402967", "0.7400397", "0.7397999", "0.7396288", "0.7394907", "0.7392642" ]
0.0
-1
Method that is called when game is resumed.
@Override public void resume() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void resume() {\n\t\tGdx.app.log(\"GameScreen\", \"Resumed\");\n\n\t}", "@Override\n public void resume() {\n Gdx.app.log(TAG, \"Resumed\");\n }", "@Override\n\tpublic void resume() {\n\t\tGdx.app.log(\"GameScreen\", \"resume called\"); \n\t}", "public void resume() {\r\n\t\tSystem.out.println(\"Resumed Game\");\r\n\t\tthis.timeline.play();\r\n\t\tisPaused = false;\r\n\t\tpauseMenu.setVisible(false);\r\n\t}", "public void resumeGame() {\n\t\t\tif (extended)\n\t\t\t\textendTimer.start();//restart timer if thats relevant\n\t\t\tpause=false;//turn off all flags for pause/stop\n\t\t\tstopped = false;\n\t\t}", "@Override\n protected void onResume() {\n super.onResume();\n\n //Execute the game view's resume method\n gameEngine.resume();\n }", "void gameResumed();", "@Override\n public void Resume() {\n\n }", "@Override\n public void Resume() {\n\n }", "@Override\n public void Resume() {\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n // Tell the gameView resume method to execute\n gameView.resume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n // Tell the gameView resume method to execute\n gameView.resume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume\");\n\n game();\n }", "protected void onResume(){\n super.onResume();\n hideSystemUI();\n if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus\n coreView.resume();\n }", "private void resume()\r\n {\r\n player.resume();\r\n }", "public final void \n onResume() {\n \t\n \tthis.isPaused = false;\n \tthis.isResumed = true;\n \tthis.mLastTextureId = 0;\n \tsuper.onResume();\n }", "public void resumed() {\n System.out.println(\"Resumed\");\n }", "@Override\r\n public void resume() {\r\n\r\n }", "protected abstract void onResume();", "private void resume() { player.resume();}", "public void resume()\n\t{\n\t\tisPaused = false;\n\t}", "@Override\n public void resume() {\n \n }", "public void resume() {}", "synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }", "synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n public void resume() {\n }", "@Override\n\tpublic void resume() {\n\t\tAction(Director.ACTION_RESUME);\n\t}", "private void resumeGame() {\n\n gameCountDownTimer = getGameTimer();\n gameCountDownTimer.start();\n if(globalAnimatorMap != null && !globalAnimatorMap.isEmpty() && globalAnimatorMap.size() > 0) {\n for (Map.Entry<Integer, AnimatorSet> entry : globalAnimatorMap.entrySet()) {\n AnimatorSet animatorSet = entry.getValue();\n if (animatorSet != null) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n if (animatorSet.isPaused()) {\n animatorSet.resume();\n }\n } else {\n animatorSet.start();\n }\n }\n }\n }else{\n animateBalloonView(balloon1,false);\n animateBalloonView(balloon2,false);\n animateBalloonView(balloon3,false);\n animateBalloonView(balloon4,false);\n animateBalloonView(balloon5,false);\n }\n String controlButtonTitle = getResources().getString(R.string.pause_btn);\n conttroler.setText(controlButtonTitle);\n currentScreenGameState = GameState.PLAYING;\n setCurrentScreenCover();\n invalidateOptionsMenu();\n }", "@Override\n public void resume() {\n // Not used\n }", "void onResume();", "public void resume() {\n }", "@Override\n protected void onResume() {\n super.onResume();\n justAfterPause = false;\n }", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "synchronized void resumeGame() {\n myGamePause = false;\n this.notify();\n }", "@Override\n public void resume() {\n }", "@Override\n public void resume() {\n }", "@Override\n public void resume() {\n }", "@Override\r\n\tpublic void resume() {\n\t\tthis.suspended = false;\r\n\t}", "public void resume() {\n\t\t// TODO Auto-generated method stub\n\t}", "public void resume() {\n this.suspended = false;\n }", "protected abstract void postResume();", "@Override\n\tpublic void resume() \n\t{\n\n\t}", "public void onResume();", "public void resume() {\n paused = false;\n }", "@Override\n public void resume() { }", "@Override\n public void resume() {\n }", "@Override\n protected void onResume() {\n super.onResume();\n //admobView.resume();\n gameView.onResume();\n }", "public void resume() {\n m_suspended = false;\n }", "@Override\n public void resume() {\n \n }", "public void resume();", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\t\r\n\t}", "@Override\n\tpublic void resume()\n\t{\n\n\t}", "@Override\r\n public void onResume() {\r\n NexLog.d(LOG_TAG, \"onResume called\");\r\n activityPaused = false;\r\n }", "void notifyGameRestored();", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}" ]
[ "0.8089238", "0.8042653", "0.78766143", "0.7807589", "0.7724126", "0.7644304", "0.75973094", "0.7594377", "0.7594377", "0.7587533", "0.751305", "0.751305", "0.74801105", "0.74792534", "0.7460266", "0.74180436", "0.7405952", "0.73826176", "0.7341589", "0.73400563", "0.7331686", "0.73158073", "0.7303126", "0.7284845", "0.7284845", "0.7263496", "0.7263496", "0.7263496", "0.7250472", "0.7249782", "0.7230231", "0.72274256", "0.7226491", "0.7225082", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7222659", "0.7205936", "0.7202208", "0.7202208", "0.7202208", "0.719666", "0.7191577", "0.71887183", "0.718531", "0.7183939", "0.71838576", "0.7179928", "0.71793914", "0.71789455", "0.71758425", "0.7174124", "0.71666646", "0.7157257", "0.7155068", "0.7155068", "0.7155068", "0.7155068", "0.7147715", "0.7145363", "0.71427023", "0.7117917", "0.7115146", "0.7115146", "0.7115146", "0.7115146", "0.7115146", "0.7115146", "0.7115146", "0.7114183", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947", "0.7109947" ]
0.722792
33
Method that is called when game is hidden.
@Override public void hide() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"GameScreen\", \"Hidden\");\n\n\t}", "@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"GameScreen\", \"hide called\"); \n\t}", "@Override\n public void hide() {\n if (!unit.player.isPlayerDead) {\n MyPreference.setIsNewGame(false);\n saves.Save();\n }\n GameController.allFalse();\n dispose();\n }", "abstract void onHidden();", "@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }", "@Override\n\tpublic void onHide (ScreenState mode) {\n\n\t}", "@Override\n\tpublic void onHide (ScreenState mode) {\n\n\t}", "@Override\n public void wasHidden() {\n hide();\n }", "@Override\n\tpublic void onInvisible() {\n\n\t}", "@Override\n\tpublic void onHideScene() {\n\t\t\n\t}", "@Override\n public void makeHidden(Player viewer) {\n \n }", "@Override\n\tpublic void onHide() {\n\n\t}", "public void hide() {\n\t\thidden = true;\n\t}", "@Override\n public void hide() {\n mHandler.post(mHide);\n }", "public void hide() {\n hidden = true;\n }", "public void hideScreen() {\n\t}", "private void hide() {\n\t}", "@Override\r\n public void onGameEnded() {\r\n this.setVisible(true);\r\n }", "protected abstract void onHideRuntime();", "public void hide() {\n\t\t// Useless if called in outside animation loop\n\t\tactive = false;\n\t}", "@Override\r\n public void hide() {\r\n\r\n }", "@Override\n\tpublic void hide() {\n\t\thits.remove();\n\t\ttimeLeft.remove();\n\t\tdarken.remove();\n\t\tcontainer.remove();\n\t\ttimer = null;\n\t\ttrainingBag = null;\n\t}", "@Override\r\n\tpublic void aboutToBeHidden() {\n\t\tsuper.aboutToBeHidden();\r\n\t}", "@Override\n\tpublic void hide()\n\t{\n\n\t}", "@Override\n\tpublic void hide()\n\t{\n\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}", "public void hide() {\n }", "void hide();", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "@Override\n\tpublic void hide() {\n\t\t\n\t}", "public void hide() {\n\t\t\n\t\tfor(CustomScoreboardEntry entry : entries)\n\t\t\tentry.hide();\n\t\t\n\t\tthis.board.clearSlot(DisplaySlot.SIDEBAR);\n\t\t\n\t\tshown = false;\n\t}", "public void hide() {\n energy = 0;\n redBull = 1;\n gun = 0;\n target = 1;\n }", "@Override\r\n public void hide() {\n }", "@Override\n public void adHidden(Ad ad) {\n\n }", "@Override\n public void adHidden(Ad ad) {\n\n }", "public native boolean isHidden(GInfoWindow self)/*-{\r\n\t\treturn self.isHidden();\r\n\t}-*/;", "@Override\n\tpublic void hideContents() {\n\t\tprogram.remove(Play);\n\t\tprogram.remove(Settings);\n\t\tprogram.remove(Credits);\n\t\tprogram.remove(Exit);\n\t\tprogram.remove(tank);\n\t\tprogram.remove(barrel);\n\t\tprogram.remove(explosion);\n\t\tprogram.remove(title);\n\t\tshootCounter = 0;\n\t\tdelayCounter = 0;\n\t\tbarrel = new GameImage(\"../media/TanksPNGS/large_greenTank_cannon.png\");\n\t\tbarrel.setLocation(15, 475);\n\t\tp = false;\n\t\ts= false;\n\t\tc = false;\n\t\tq = false;\n\t}", "@Override\n public void hide() {\n \n }", "public void hide() {\n visible=false;\n }", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\n\tpublic void hide() {\n\n\t}", "@Override\r\n\tpublic void hide() {\n\r\n\t}", "@Override\r\n\tpublic void hide() {\n\r\n\t}", "@Override\r\n\tpublic void hide() {\n\r\n\t}", "@Override\r\n\tpublic void hide() {\n\r\n\t}", "@Override\n\tpublic void hide() {\n\t}", "@Override\n\tpublic void hide() {\n\t}", "@Override\n\tpublic void hide() {\n\t}", "@Override\n\tpublic void hide() {\n\t}", "public void hide() {\r\n\t\tif (item != null) { \r\n\t ShowCaseStandalone.slog(Level.FINEST, \"Hiding showcase: \" + getSHA1());\r\n\t item.remove();\r\n\t \r\n\t int\t\tx\t= getSpawnLocation().getBlockX();\r\n\t int \ty \t= 0;\r\n\t int \tz\t= getSpawnLocation().getBlockZ();\r\n\t World\tw\t= getSpawnLocation().getWorld();\r\n\t \r\n\t item.teleport(new Location(w, x, y, z));\r\n\t\t\titem \t= null;\r\n\t\t}\r\n\t\tisVisible\t= false;\r\n\t}", "@Override\n public final void onGuiClosed() {\n\t\tKeyboard.enableRepeatEvents(false);\n\t\t\n\t\tif(behindScreen != null) {\n\t\t\tTaleCraft.proxy.asClient().sheduleClientTickTask(new Runnable() {\n\t\t\t\t@Override public void run() {\n\t\t\t\t\tmc.displayGuiScreen(behindScreen);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n }", "private void anullerAction()\r\n\t{\r\n\t\tthis.hide();\r\n\t}", "public native void hide(GInfoWindow self)/*-{\r\n\t\tself.hide();\r\n\t}-*/;", "@Override\n public void adHidden(Ad ad) {\n\n }", "public boolean isHidden() {\n return false;\n }", "@Override\r\n public void hide() {\r\n bgMusic.pause();\r\n }", "public void willBeHidden() {\n\t\tif (fragmentContainer != null) {\n\t\t\tAnimation fadeOut = AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out);\n\t\t\tfragmentContainer.startAnimation(fadeOut);\n\t\t}\n\t}", "public void setHide()\n\t{\n\t\tMainController.getInstance().setVisible(name, false);\n\t}", "public void onCustomViewHidden() {\n mTimer.cancel();\n mTimer = null;\n if (mVideoView.isPlaying()) {\n mVideoView.stopPlayback();\n }\n if (isVideoSelfEnded)\n mCurrentProxy.dispatchOnEnded();\n else\n mCurrentProxy.dispatchOnPaused();\n\n // Re enable plugin views.\n mCurrentProxy.getWebView().getViewManager().showAll();\n\n isVideoSelfEnded = false;\n mCurrentProxy = null;\n mLayout.removeView(mVideoView);\n mVideoView = null;\n if (mProgressView != null) {\n mLayout.removeView(mProgressView);\n mProgressView = null;\n }\n mLayout = null;\n }", "public void hide() {\n super.hide();\n }", "@Override\n public void hide() {\n Gdx.input.setOnscreenKeyboardVisible(false);\n super.hide();\n }", "@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }", "@Override\r\n\tpublic void hide() {\n\t\tthis.dispose();\r\n\t\t\r\n\t}" ]
[ "0.81285465", "0.8073981", "0.79528683", "0.76339144", "0.75606865", "0.74141926", "0.74141926", "0.7393891", "0.73494714", "0.73399025", "0.73397225", "0.72095317", "0.7178108", "0.717414", "0.71399826", "0.7124446", "0.7006094", "0.6961025", "0.695165", "0.69308305", "0.69040406", "0.6902493", "0.68850183", "0.68666685", "0.68666685", "0.6863469", "0.6863469", "0.6863469", "0.6863469", "0.6863469", "0.6863469", "0.6863469", "0.6863469", "0.685057", "0.68297595", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6822485", "0.6817235", "0.6806407", "0.6801897", "0.6799527", "0.6799527", "0.6784781", "0.67844516", "0.67761457", "0.67699915", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6757056", "0.6756541", "0.6756541", "0.6756541", "0.6756541", "0.67297226", "0.67297226", "0.67297226", "0.67297226", "0.6721907", "0.67089987", "0.66686356", "0.666492", "0.66620684", "0.6661479", "0.6645283", "0.6626279", "0.66198915", "0.66186917", "0.6568225", "0.6568072", "0.65482616", "0.6547477" ]
0.67560285
82
Creates the 3 buttons for the different screens depending on language.
private void createButtons() { Texture playButtonIdle, playButtonPressed,settingsButtonIdle, settingsButtonPressed, creditsButtonIdle, creditsButtonPressed; if(game.getLocale().getCountry().equals("FI")){ playButtonIdle = game.getAssetManager().get("BUTTONS/button_startgame_FIN.png"); playButtonPressed = game.getAssetManager().get("BUTTONS/button_startgame_FIN_PRESSED.png"); settingsButtonIdle = game.getAssetManager().get("BUTTONS/button_startsettings_FIN.png"); settingsButtonPressed = game.getAssetManager().get("BUTTONS/button_startsettings_FIN_PRESSED.png"); creditsButtonIdle = game.getAssetManager().get("BUTTONS/button_credits_FIN.png"); creditsButtonPressed = game.getAssetManager().get("BUTTONS/button_credits_FIN_PRESSED.png"); }else{ playButtonIdle = game.getAssetManager().get("BUTTONS/button_startgame_ENG.png"); playButtonPressed = game.getAssetManager().get("BUTTONS/button_startgame_ENG_PRESSED.png"); settingsButtonIdle = game.getAssetManager().get("BUTTONS/button_startsettings_ENG.png"); settingsButtonPressed = game.getAssetManager().get("BUTTONS/button_startsettings_ENG_PRESSED.png"); creditsButtonIdle = game.getAssetManager().get("BUTTONS/button_credits_ENG.png"); creditsButtonPressed = game.getAssetManager().get("BUTTONS/button_credits_ENG_PRESSED.png"); } ImageButton playButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(playButtonIdle)), new TextureRegionDrawable(new TextureRegion(playButtonPressed))); playButton.setPosition(95, 12); stage.addActor(playButton); playButton.addListener(new ChangeListener() { // This method is called whenever the actor is clicked. We override its behavior here. @Override public void changed(ChangeEvent event, Actor actor) { game.setScreen(gameScreen); } }); ImageButton settingsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(settingsButtonIdle)), new TextureRegionDrawable(new TextureRegion(settingsButtonPressed))); settingsButton.setPosition(175, 12); stage.addActor(settingsButton); settingsButton.addListener(new ChangeListener() { // This method is called whenever the actor is clicked. We override its behavior here. @Override public void changed(ChangeEvent event, Actor actor) { game.setScreen(new OptionsScreen(game)); } }); ImageButton creditsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(creditsButtonIdle)), new TextureRegionDrawable(new TextureRegion(creditsButtonPressed))); creditsButton.setPosition(15, 12); stage.addActor(creditsButton); creditsButton.addListener(new ChangeListener() { // This method is called whenever the actor is clicked. We override its behavior here. @Override public void changed(ChangeEvent event, Actor actor) { game.setScreen(new CreditsScreen(game)); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }", "private void createButtons() {\n\tTexture startGameTex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_start.png\"));\n\tTexture plane_p1_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player1.png\"));\n\tTexture plane_p2_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player2.png\"));\n\n\tplayButton = new Button(\"\", font, 0, 0, new TextureRegion(startGameTex,\n\t\t0, 0, 161, 20), new TextureRegion(startGameTex, 0, 0, 161, 20),\n\t\tnew ScreenSwitchHandler(Screen.GAME));\n\tplaneButton_p1 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p1_tex, 0, 0, 161, 20), new TextureRegion(plane_p1_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P1));\n\tplaneButton_p2 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p2_tex, 0, 0, 161, 20), new TextureRegion(plane_p2_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P2));\n\toptionsButton = new Button(\"Options\", font, new ScreenSwitchHandler(\n\t\tScreen.OPTIONS));\n\texitButton = new Button(\"Exit\", font, new ButtonHandler() {\n\t @Override\n\t public void onClick() {\n\t\tGdx.app.exit();\n\t }\n\n\t @Override\n\t public void onRelease() {\n\t\t// TODO Auto-generated method stub\n\n\t }\n\t});\n }", "private Button[] createButtonsAndLMessage() {\n\t\t\n\t\t// local buttom\n\t\tButton launchLocal = new Button(\"Launch Local Game\");\n\t\tlaunchLocal.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchLocal.setAlignment(Pos.CENTER);\n\t\tlaunchLocal.autosize();\n\t\tlaunchLocal.setOnAction(e -> {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(checkingAllArguments()) {\n\t\t\t\t\tmenuMessage.setText(\"Game will start soon...\");\n\t\t\t\t\tlaunchLocal(new Stage());\n\t\t\t\t}\n\t\t\t } catch (Exception exception) { \n\t\t\t\t menuMessage.setText(\"Can't launch a local game : either a IP Address of a remote player is wrong or you didn't select 4 players\");\n\t\t\t } \n\t\t \n\t\t});\n\t\t\n\t\t// remote button\n\t\tButton launchRemote = new Button(\"Launch Remote Game\");\n\t\tlaunchRemote.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchRemote.setAlignment(Pos.CENTER);\n\t\tlaunchRemote.autosize();\n\t\tlaunchRemote.setOnAction(e -> { \n\t\t\t\n\t\t\ttry {\n\t\t\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\");\n\t\t\t\tlaunchRemote(new Stage());\n\t\t\t } catch (Exception exception) { \n\t\t\t\tmenuMessage.setText(\"Can't launch a remote game : Check your internet connection\");\n\t\t\t } \n\t\t}); \n\t\t\n\t\tButton[] toReturn = {launchLocal, launchRemote};\n\t\treturn toReturn;\n\t}", "private void initializeAttributes() {\n\t language.setMinWidth(200);//250\n\t language.setAlignment(Pos.CENTER);\n\t language.getStyleClass().clear();\n\t language.getStyleClass().add(\"menuButton\");\n\t \n\t // Set history button properties\n\t history.setMinWidth(200);//250\n\t history.setAlignment(Pos.CENTER);\n\t history.getStyleClass().clear();\n\t history.getStyleClass().add(\"menuButton\");\n\t \n\t // Set closing button button properties\n\t closingButton.getStyleClass().clear();\n\t closingButton.getStyleClass().add(\"menuButton\");\n\t \n\t // Set reducing button button properties\n\t reducingButton.getStyleClass().clear();\n\t reducingButton.getStyleClass().add(\"menuButton\");\n\t \n\t // Close window/application on click\n\t closingButton.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \tgameMainStage.close();\n }\n });\n\t \n\t // Reduce window/application on click\n\t reducingButton.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \tgameMainStage.setIconified(true);\n }\n });\n\t \n\t // Switch to the language part of the application on click\n\t language.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n if (currentTab == null || currentTab.equals(\"history\")) {\n \tcurrentTab = \"language\";\n \tupdateTabButtons();\n \twindowMainPane.setCenter(new Language());\n }\n }\n });\n\t \n\t\t// Switch to the history part of the application on click\n\t history.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \tif (currentTab == null || currentTab.equals(\"language\")) {\n \t\tcurrentTab = \"history\";\n \t\tupdateTabButtons();\n \t\twindowMainPane.setCenter(new History(0));\n \t}\n }\n });\n\t}", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "public void createGameButtons() {\n \tcreateGameButton(myResources.getString(\"startcommand\"), 1, GAME_BUTTON_XLOCATION, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"stopcommand\"), 0, GAME_BUTTON_XLOCATION * 3, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"speedup\"), SPEED_INCREASE, GAME_BUTTON_XLOCATION*5, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"slowdown\"), 1/SPEED_INCREASE, GAME_BUTTON_XLOCATION*7, GAME_BUTTON_YLOCATION);\n }", "public SimulationViewButton(String words, String language) {\n myResources = ResourceBundle.getBundle(DEFAULT_RESOURCE_PACKAGE + \"English\");\n font = myResources.getString(\"FontStylePath\");\n setText(words);\n setButtonTextFont();\n setPrefHeight(BUTTON_HEIGHT);//45\n setPrefWidth(BUTTON_WIDTH);//190\n setStyle(font);\n mouseUpdateListener();\n }", "private void initButtons() {\r\n\t\texitGameButton\t\t= game.screenHelper.createTextButton(BUTTON_EXIT_GAME_TEXT, BUTTON_EXIT_GAME_MOUSEOVER_TEXT, menuText);\r\n\t\tcancelExitButton\t= game.screenHelper.createTextButton(BUTTON_CANCEL_EXIT_TEXT, BUTTON_CANCEL_EXIT_MOUSEOVER_TEXT, menuText);\r\n\t\tcancelExitButton.addListener(new ChangeScreenInputListener(new MenuScreenChangeCommand()));\r\n\t\t// Event Listeners \r\n\t\t// TODO: clean up this giant piece of shitty code.\r\n\t\t\r\n\t\texitGameButton.addListener(new InputListener() {\r\n\t\t\tpublic boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {\r\n\t\t\t\texitGame();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "private void createButtons() {\n\t\tfor (int x = 0; x < buttons.length; x++)\n\t\t\tfor (int y = 0; y < buttons[x].length; y++) {\n\t\t\t\tif ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\n\t\t\t\t\tbuttons[x][y] = new DarkButton();\n\t\t\t\telse\n\t\t\t\t\tbuttons[x][y] = new LightButton();\n\n\t\t\t\tbuttonListener(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tinitButtonIcons();\n\t}", "public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_fs_lang);\n this.mStrLang = getResources().getStringArray(R.array.fs_languages);\n topBtnInit(R.string.str_fsmain_lang);\n this.mManager = new RelativeLayoutManager(this, R.id.fs_lang_layout);\n this.mBtnLang = new ParamButton[this.mStrLang.length];\n int numPerRow = getResources().getInteger(R.integer.fs_lang_num_per_row);\n for (int i = 0; i < this.mBtnLang.length; i++) {\n this.mBtnLang[i] = this.mManager.AddButton(((i % numPerRow) * Can.CAN_ZH_WC) + 50, ((i / numPerRow) * 100) + 86);\n this.mBtnLang[i].setTag(Integer.valueOf(i));\n this.mBtnLang[i].setOnClickListener(this);\n SetCommBtn(this.mBtnLang[i], this.mStrLang[i]);\n }\n }", "private void setLanguageScreen(){\n\t\t\n\t\tscreenUI.clearScreen();\n\t\tscreenUI.drawText(2, 1, \"Choose a language/Wybierz język:\");\n\t\tscreenUI.drawText(1, 3, \"[a]: English\");\n\t\tscreenUI.drawText(1, 4, \"[b]: Polski\");\n\t}", "void Comunicasiones() { \t\r\n /* Comunicacion */\r\n Button dComunicacion01 = new Button();\r\n dComunicacion01.setWidth(\"73px\");\r\n dComunicacion01.setHeight(\"47px\");\r\n dComunicacion01.setIcon(ByosImagenes.icon[133]);\r\n dComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(dComunicacion01, \"left: 661px; top: 403px;\"); \r\n\r\n /* Comunicacion */\r\n Button iComunicacion01 = new Button();\r\n iComunicacion01.setWidth(\"73px\");\r\n iComunicacion01.setHeight(\"47px\");\r\n iComunicacion01.setIcon(ByosImagenes.icon[132]);\r\n iComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(iComunicacion01, \"left: 287px; top: 403px;\"); \r\n \r\n }", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "private void init() {\n\t\t\n\t\t// Buttons\n\t\tendButton = new JButton(\"Spiel beenden\");\n\t\tendButton.setBackground(Color.white);\n\t\tendButton.setForeground(Color.black);\n\t\tendButton.setFont(endButton.getFont().deriveFont(20.0f));\n\t\tendButton.setBorder(BorderFactory.createStrokeBorder(new BasicStroke(1.5f), Color.black));\n\t\t\n\t\tanleitungButton = new JButton(\"Anleitung\");\n\t\tanleitungButton.setBackground(endButton.getBackground());\n\t\tanleitungButton.setForeground(endButton.getForeground());\n\t\tanleitungButton.setFont(endButton.getFont());\n\t\tanleitungButton.setBorder(endButton.getBorder());\n\t\t\n\t\tbackButton = new JButton(\"zurück\");\n\t\tbackButton.setBackground(endButton.getBackground());\n\t\tbackButton.setForeground(endButton.getForeground());\n\t\tbackButton.setFont(endButton.getFont());\n\t\tbackButton.setBorder(endButton.getBorder());\n\t\t\n\t\tbuttonPanel = new JPanel(new GridLayout(3, 1, 0, 50));\n\t\tbuttonPanel.add(endButton);\n\t\tbuttonPanel.add(anleitungButton);\n\t\tbuttonPanel.add(backButton);\n\t\tbuttonPanel.setBackground(Color.red.darker());\n\t\t\n\t\tgetContentPane().setLayout(new BorderLayout(40, 40));\n\t\tgetContentPane().add(buttonPanel, BorderLayout.CENTER);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.NORTH);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.SOUTH);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.WEST);\n\t\tgetContentPane().add(new JLabel(), BorderLayout.EAST);\n\t\tgetContentPane().setBackground(buttonPanel.getBackground());\n\t\t\n\t\t// ACTIONLISTENER\n\t\tendButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t\tcancelGameandGoBackToHome(e);\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tanleitungButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\topenAnleitung(e);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbackButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tbackToGame(e);\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void initialiseButtons() {\n resumeButton = new Button(buttonLeft, resumeButtonTop, buttonRight, resumeButtonBottom, Assets.resume);\n restartButton = new Button(buttonLeft, restartButtonTop, buttonRight, restartButtonBottom, Assets.restart);\n instructionsButton = new Button(buttonLeft, instructionsButtonTop, buttonRight, instructionsButtonBottom, Assets.instructions);\n quitButton = new Button(buttonLeft, quitButtonTop, buttonRight, quitButtonBottom, Assets.quit);\n backArrowButton = new Button(-8,-10,120,100, Assets.backArrowButton);\n saveGameButton = new Button(buttonLeft,saveGameButtonTop,buttonRight,saveGameButtonBottom,Assets.saveGame);\n }", "private void makeFrontGUIButtons(){\n Dimension preferred = getPreferredSize();\n\n optionsButton = new JButton();\n makeFrontButton(optionsButton, \"optionsIcon\", \"showOptions\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() * 0.98), 39, 37));\n makeSearchButton();\n\n zoomInButton = new JButton();\n makeFrontButton(zoomInButton, \"plusIcon\", \"zoomIn\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) preferred.getHeight() / 3 * 2, 39, 37));\n\n zoomOutButton = new JButton();\n makeFrontButton(zoomOutButton, \"minusIcon\", \"zoomOut\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() / 3 * 2 + 45), 39, 37));\n\n makeShowRoutePanelButton();\n\n fullscreenButton = new JButton();\n makeFrontButton(fullscreenButton, \"fullscreenIcon\", \"fullscreen\", new Rectangle((int) preferred.getWidth() - 60, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 + 100), 39, 37));\n\n mapTypeButton = new JButton();\n makeFrontButton(mapTypeButton, \"layerIcon\", \"mapType\", new Rectangle((int) preferred.getWidth() - 49, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 - 45), 39, 37));\n makeCloseDirectionListPanel();\n }", "public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "private void createBeginningButtons() {\n\t createStartButtons(myResources.getString(\"game1\"), 0, 0);\n\t\tcreateStartButtons(myResources.getString(\"game2\"), 0, 1);\n\t\tcreateStartButtons(myResources.getString(\"game3\"), 0, 2);\n\t\tcreateStartButtons(myResources.getString(\"game4\"), 0, 3);\n\t\tcreateStartButtons(myResources.getString(\"game5\"), 0, 4);\n\t\tcreateInstructionButton();\n\t\tcreateStartingLabel();\n\t\tcreateGridSizeButton();\n }", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "@Override\n public void updateLanguage() {\n if (isEnglish) {\n languageButton.setText(R.string.alien_painter_language_chinese);\n exitButton.setText(R.string.alien_painter_exit);\n retryButton.setText(R.string.alien_painter_retry);\n scoreboardButton.setText(R.string.alien_painter_scoreboard_button);\n painterTextViewInstructions.setText(R.string.alien_painter_instructions);\n replayButton.setText(R.string.alien_painter_replay);\n } else {\n languageButton.setText(R.string.alien_painter_language_english);\n exitButton.setText(R.string.alien_painter_exit_chinese);\n retryButton.setText(R.string.alien_painter_retry_chinese);\n scoreboardButton.setText(R.string.alien_painter_scoreboard_button_chinese);\n painterTextViewInstructions.setText(R.string.alien_painter_instructions_chinese);\n replayButton.setText(R.string.alien_painter_replay_chinese);\n }\n }", "public void updateLanguage() {\n buttonPlay.setText(GameConfiguration.getText(\"playButton\"));\n buttonSettings.setText(GameConfiguration.getText(\"settingsButton\"));\n buttonHighScores.setText(GameConfiguration.getText(\"highScores\"));\n }", "private void createMainMenuMiddleComposite() {\n\t\tString imgSlipUI = null;\n\t\tString imgJackpotBtn = null;\n\t\tString imgVoucherBtn = null;\n\t\tif(Util.isSmallerResolution()) {\n\t\t\timgSlipUI = ImageConstants.S_SLIPS_UI_BUTTON_IMG;\n\t\t\timgJackpotBtn = ImageConstants.S_JACKPOT_UI_BUTTON_IMG;\n\t\t\timgVoucherBtn = ImageConstants.S_VOUCHER_UI_BUTTON_IMG;\n\t\t}\n\t\telse {\n\t\t\timgSlipUI = ImageConstants.SLIPS_UI_BUTTON_IMG;\n\t\t\timgJackpotBtn = ImageConstants.JACKPOT_UI_BUTTON_IMG;\n\t\t\timgVoucherBtn = ImageConstants.VOUCHER_UI_BUTTON_IMG;\n\t\t}\n\t\t\n\t\tGridData gridData11 = new GridData();\n\t\tgridData11.horizontalAlignment = GridData.CENTER;\n\t\tgridData11.grabExcessHorizontalSpace = true;\n\t\tgridData11.grabExcessVerticalSpace = true;\n\t\tgridData11.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData10 = new GridData();\n\t\tgridData10.horizontalAlignment = GridData.CENTER;\n\t\tgridData10.grabExcessHorizontalSpace = true;\n\t\tgridData10.grabExcessVerticalSpace = true;\n\t\tgridData10.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData9 = new GridData();\n\t\tgridData9.horizontalAlignment = GridData.CENTER;\n\t\tgridData9.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData6 = new GridData();\n\t\tgridData6.heightHint = 100;\n\t\t// gridData6.heightHint = 70;\n\t\tgridData6.widthHint = 100;\n\t\t// gridData6.widthHint = 90;\n\t\tgridData6.grabExcessHorizontalSpace = true;\n\t\tgridData6.grabExcessVerticalSpace = true;\n\t\tgridData6.horizontalAlignment = GridData.CENTER;\n\t\tgridData6.verticalAlignment = GridData.END;\n\n\t\tGridLayout gridLayout3 = new GridLayout();\n\t\tgridLayout3.horizontalSpacing = 20;\n\t\tgridLayout3.numColumns = 3;\n\t\tGridData gridData5 = new GridData();\n\t\tgridData5.grabExcessHorizontalSpace = true;\n\t\tgridData5.verticalAlignment = GridData.FILL;\n\t\tgridData5.heightHint = 100;\n\t\tgridData5.grabExcessVerticalSpace = true;\n\t\tgridData5.horizontalAlignment = GridData.FILL;\n\t\tmainMenuMiddleComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuMiddleComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t171, 209, 255));\n\t\tmainMenuMiddleComposite.setLayout(gridLayout3);\n\t\tmainMenuMiddleComposite.setLayoutData(gridData5);\n\n\t\tGridData gridData3 = new GridData();\n\t\tgridData3.grabExcessVerticalSpace = true;\n\t\tgridData3.horizontalAlignment = GridData.CENTER;\n\t\tgridData3.verticalAlignment = GridData.END;\n\t\tgridData3.heightHint = 100;\n\t\tgridData3.widthHint = 100;\n\t\tgridData3.grabExcessHorizontalSpace = true;\n\n\t\tGridData gridData1 = new GridData();\n\t\tgridData1.grabExcessVerticalSpace = true;\n\t\tgridData1.horizontalAlignment = GridData.CENTER;\n\t\tgridData1.verticalAlignment = GridData.END;\n\t\tgridData1.heightHint = 100;\n\t\tgridData1.widthHint = 100;\n\t\tgridData1.grabExcessHorizontalSpace = true;\n\n\t\tbtnSlipUI = new CbctlButton(mainMenuMiddleComposite, SWT.FLAT, \"\",\n\t\t\t\tLabelKeyConstants.SLIPS_UI_BUTTON);\n\t\tbtnSlipUI\n\t\t\t\t.setFont(new Font(Display.getDefault(), \"Arial\", 12, SWT.BOLD));\n\t\t\n\t\tbtnSlipUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgSlipUI)));\n\t\tbtnSlipUI.setLayoutData(gridData1);\n\n\t\tbtnJackpotUI = new CbctlButton(mainMenuMiddleComposite, SWT.NONE, \"\",\n\t\t\t\tLabelKeyConstants.JACKPOT_UI_BUTTON);\n\t\tbtnJackpotUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tbtnJackpotUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgJackpotBtn)));\n\t\tbtnJackpotUI.setLayoutData(gridData3);\n\n\t\tbtnVoucherUI = new CbctlButton(mainMenuMiddleComposite, SWT.NONE, \"\",\n\t\t\t\tLabelLoader.getLabelValue(LabelKeyConstants.VOUCHER_UI_BUTTON));\n\t\tbtnVoucherUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgVoucherBtn)));\n\t\tbtnVoucherUI.setLayoutData(gridData6);\n\n\t\tlblSlipUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblSlipUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.SLIPS_UI_BUTTON));\n\t\tlblSlipUI.setBackground(new Color(Display.getCurrent(), 171, 209, 255));\n\t\tlblSlipUI\n\t\t\t\t.setFont(new Font(Display.getDefault(), \"Arial\", 12, SWT.BOLD));\n\t\tlblSlipUI.setLayoutData(gridData9);\n\n\t\tlblJackpotUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblJackpotUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.JACKPOT_UI_BUTTON));\n\t\tlblJackpotUI.setBackground(new Color(Display.getCurrent(), 171, 209,\n\t\t\t\t255));\n\t\tlblJackpotUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tlblJackpotUI.setLayoutData(gridData10);\n\n\t\tlblVoucherUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblVoucherUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.VOUCHER_UI_BUTTON));\n\t\tlblVoucherUI.setBackground(new Color(Display.getCurrent(), 171, 209,\n\t\t\t\t255));\n\t\tlblVoucherUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tlblVoucherUI.setLayoutData(gridData11);\n\n\t}", "public void setupWindowButtons(){\n focusPropertyButton(btnExitProgramPlannerPlanPane);\n focusPropertyButton(btnExitProgramPlannerShoppingListPane);\n focusPropertyButton(btnExitProgramPlannerCupboardPane);\n focusPropertyButton(btnMinimiseProgramPlannerPlanPlane);\n focusPropertyButton(btnMinimiseProgramPlannerShoppingListPane);\n focusPropertyButton(btnMinimiseProgramPlannerCupboardPane);\n focusPropertyButton(btnExitProgramMealsBrowsePane);\n focusPropertyButton(btnMinimiseProgramMealsBrowsePane);\n focusPropertyButton(btnExitProgramMealsAddPane);\n focusPropertyButton(btnMinimiseProgramMealsAddPane);\n focusPropertyButton(btnExitProgramIngredBrowse);\n focusPropertyButton(btnMinimiseProgramIngredBrowse);\n focusPropertyButton(btnExitProgramIngredAdd);\n focusPropertyButton(btnMinimiseProgramIngredAdd);\n\n }", "private void addDemoButtons(int p_73972_1_, int p_73972_2_)\r\n\t{\r\n\t\tthis.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format(\"menu.playdemo\")));\r\n\t\tthis.buttonResetDemo = this.addButton(new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format(\"menu.resetdemo\")));\r\n\t\tISaveFormat isaveformat = this.mc.getSaveLoader();\r\n\t\tWorldInfo worldinfo = isaveformat.getWorldInfo(\"Demo_World\");\r\n\r\n\t\tif (worldinfo == null)\r\n\t\t{\r\n\t\t\tthis.buttonResetDemo.enabled = false;\r\n\t\t}\r\n\t}", "@Override\n\tprotected void loadButtons() {\n\t\tList<Button> buttons = new ArrayList<>();\n\t\tfinal int square_size = 100;\n\t\tfinal int seperator_size = 20;\n\t\tfinal int numButtons = 2;\n\t\tint y = (getHeight() - 100) / 2;\n\t\tint x = (getWidth() - (square_size * numButtons) - (seperator_size * (numButtons - 1))) / 2;\n\t\tint sep = square_size + seperator_size;\n\t\t// Paint button.\n\t\ttry {\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_paint), \"Toggle paint\", x, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tsetUsingTextures(!isUsingTextures());\n\t\t\t\t\t\t\trepaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_fullscreen), \"Toggle full-screen\", x + sep, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tgetFrame().toggleArrangeSide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetButtons(buttons);\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "public void initConstantDisplay(){\n\t\t\n\t\t\n\t\t// Add colour buttons\n\t\tSprite blueSprite = new Sprite(Textures.blueSplash);\n\t\tSprite orangeSprite = new Sprite(Textures.orangeSplash);\n\t\tSprite purpleSprite = new Sprite(Textures.purpleSplash);\n\t\tSprite redSprite = new Sprite(Textures.redSplash);\n\t\t\n\t\tblueSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+7), MARGIN_TOP_BUTTONS);\n\t\torangeSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(7*2)+Textures.blueSplash.getSize().y), MARGIN_TOP_BUTTONS);\n\t\tpurpleSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(7*3)+Textures.blueSplash.getSize().y*2), MARGIN_TOP_BUTTONS);\n\t\tredSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(7*4)+Textures.blueSplash.getSize().y*3), MARGIN_TOP_BUTTONS);\n\t\t\n\t\tblueSplash = new Button(blueSprite, null, null);\n\t\torangeSplash = new Button(orangeSprite, null, null);\n\t\tpurpleSplash = new Button(purpleSprite, null, null);\n\t\tredSplash = new Button(redSprite, null, null);\n\t\t\n\t\t// Add lightable button and teleport button\n\t\tSprite teleportSprite = new Sprite(Textures.teleportButtonTextureRelief);\n\t\tSprite lightSprite = new Sprite(Textures.lightButtonTextureRelief);\n\t\tteleportSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(135/3)), MARGIN_TOP_BUTTONS+85);\n\t\tlightSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(135/3)*2+Textures.lightButtonTextureRelief.getSize().y), MARGIN_TOP_BUTTONS+85);\n\t\t\n\t\tteleportButton = new Button(teleportSprite, Textures.teleportButtonTexture, Textures.teleportButtonTextureRelief);\n\t\tlightButton = new Button(lightSprite, Textures.lightButtonTexture, Textures.lightButtonTextureRelief);\n\t\t\n\t\t// Add save button\n\t\tSprite saveSprite = new Sprite(Textures.saveButtonTextureRelief);\n\t\tSprite loadSprite = new Sprite(Textures.loadButtonTextureRelief);\n\t\tsaveSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(135/3)), MARGIN_TOP_BUTTONS+170);\n\t\tloadSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(135/3)*2+Textures.loadButtonTextureRelief.getSize().y), MARGIN_TOP_BUTTONS+170);\n\t\t\n\t\tsaveButton = new Button(saveSprite, Textures.saveButtonTexture, Textures.saveButtonTextureRelief);\n\t\tloadButton = new Button(loadSprite, Textures.loadButtonTexture, Textures.loadButtonTextureRelief);\n\t\t\n\t\t// Robot button\n\t\tSprite robotSprite = new Sprite(Textures.robotButtonTextureRelief);\n\t\trobotSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+(185/2)), MARGIN_TOP_BUTTONS+255);\n\t\t\n\t\trobotButton = new Button(robotSprite, Textures.robotButtonTexture, Textures.robotButtonTextureRelief);\n\t\t\n\t\t\n\t\t// Button for the robot's rotation\n\t\tSprite turnRobotLeftSprite = new Sprite(Textures.rotationRobotL);\n\t\tSprite turnRobotRightSprite = new Sprite(Textures.rotationRobotR);\n\t\tturnRobotLeftSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+((235-2*Textures.rotationRobotR.getSize().x)/3)), MARGIN_TOP_BUTTONS+340);\n\t\tturnRobotRightSprite.setPosition((float)(GRID_DISPLAY_SIZE+MARGIN_LEFT+((235-2*Textures.rotationRobotR.getSize().x)/3)*2+Textures.rotationRobotR.getSize().y), MARGIN_TOP_BUTTONS+340);\n\t\t\n\t\tturnRobotLeft = new Button(turnRobotLeftSprite, null, null);\n\t\tturnRobotRight = new Button(turnRobotRightSprite, null, null);\n\t\t\n\t\t// Button for grid rotation\n\t\tSprite turnLeftSprite = new Sprite(Textures.rotateLeft);\n\t\tturnLeftSprite.setPosition(MARGIN_LEFT+35, (WINDOW_HEIGHT-MARGIN_LEFT-30-Textures.rotateLeft.getSize().y));\n\t\t\n\t\tSprite turnRightSprite = new Sprite(Textures.rotateRight);\n\t\tturnRightSprite.setPosition((GRID_DISPLAY_SIZE+MARGIN_LEFT-35-Textures.rotateRight.getSize().y), (WINDOW_HEIGHT-MARGIN_LEFT-30-Textures.rotateRight.getSize().y));\n\t\t\n\t\tturnLeftButton = new Button(turnLeftSprite, null, null);\n\t\tturnRightButton = new Button(turnRightSprite, null, null);\n\t\t\n\t\tSprite homeSprite = new Sprite(Textures.homeButtonTextureRelief);\n\t\thomeSprite.setPosition(MARGIN_LEFT, MARGIN_LEFT);\n\t\t\n\t\thomeButton = new Button(homeSprite, null, null);\n\t\t\n\t\ttoDisplay.add(new Sprite(Textures.backgroundTexture));\n\t\tcanva.initCanva();\n\t\ttoDisplay.addAll(canva.getCanva());\n\t\ttoDisplay.add(turnLeftSprite);\n\t\ttoDisplay.add(turnRightSprite);\n\t\t\n\t\tint id = toDisplay.size();\n\t\t\n\t\ttoDisplay.add(blueSprite);\n\t\ttoDisplay.add(orangeSprite);\n\t\ttoDisplay.add(purpleSprite);\n\t\ttoDisplay.add(redSprite);\n\t\t\n\t\ttoDisplay.add(teleportSprite);\n\t\ttoDisplay.add(lightSprite);\n\t\t\n\t\ttoDisplay.add(saveSprite);\n\t\ttoDisplay.add(loadSprite);\n\t\ttoDisplay.add(robotSprite);\n\t\t\n\t\ttoDisplay.add(homeSprite);\n\t\t\n\t\ttoDisplay.add(turnRobotLeftSprite);\n\t\ttoDisplay.add(turnRobotRightSprite);\n\t\t\n\t\tblueSplash.setId(id);\n\t\torangeSplash.setId(id+1);\n\t\tpurpleSplash.setId(id+2);\n\t\tredSplash.setId(id+3);\n\t\t\n\t\tteleportButton.setId(id+4);\n\t\tlightButton.setId(id+5);\n\t\tsaveButton.setId(id+6);\n\t\tloadButton.setId(id+7);\n\t\trobotButton.setId(id+8);\n\t\t\n\t\thomeButton.setId(id+9);\n\t\t\n\t\tturnRobotLeft.setId(id+10);\n\t\tturnRobotRight.setId(id+11);\n\t\t\n\t\tif(!LightCore.soundButton.getSprite().getPosition().equals(new Vector2f(15, 65))){\n\t\t\tSprite soundSprite = LightCore.soundButton.getSprite();\n\t\t\tsoundSprite.setPosition(15, 65);\n\t\t\tLightCore.soundButton.setSprite(soundSprite);\n\t\t}\n\t\ttoDisplay.add(LightCore.soundButton.getSprite());\n\t\tLightCore.soundButton.setId(id+12);\n\t}", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "private void initTextsI18n()\n {\n // Remember the different indentations to integrate better in different OS's\n String notMacLargeIndentation = (!OSUtil.IS_MAC ? \" \" : \"\");\n String notMacSmallIndentation = (!OSUtil.IS_MAC ? \" \" : \"\");\n String linuxLargeIndentation = (OSUtil.IS_LINUX ? \" \" : \"\");\n String linuxSmallIndentation = (OSUtil.IS_LINUX ? \" \" : \"\");\n \n this.setLocale(Locale.FRANCE);\n // this.setLocale(Locale.UK);\n I18nUtil.getInstance().setLocale(this.getLocale().getLanguage(), this.getLocale().getCountry());\n this.buttonAutoManual.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Manual\"));\n this.buttonLaunchPause.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Pause\"));\n this.labelAuthMode.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelAuthMode.Auto\"));\n this.labelAutoConnectState.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelAutoConnectState.Launched\"));\n this.labelConnectionState.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelConnectionState.Disconnected\"));\n this.labelNotifications.setText(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelNotifications\"));\n this.labelProfile.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelProfile.Color\")));\n this.labelGroupSeparator.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelGroupSeparator.Color\")));\n this.labelConnectionState.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.labelConnectionState.Color\")));\n this.menuFile.setText(notMacLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile\") + notMacSmallIndentation);\n this.menuProfiles.setText(notMacSmallIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuProfiles\") + notMacSmallIndentation);\n this.menuHelp.setText(notMacSmallIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp\") + notMacSmallIndentation);\n this.menuFile_Parameters.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Parameters\"));\n this.menuFile_Quit.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Quit\"));\n this.menuHelp_Update.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Update\"));\n this.menuHelp_Doc.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Doc\"));\n this.menuHelp_FAQ.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_FAQ\"));\n this.menuHelp_About.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_About\"));\n this.popupMenu_ShowApp.setLabel(linuxSmallIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_ShowApp\"));\n this.popupMenu_PauseStart.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Pause\"));\n this.popupMenu_Profiles.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Profiles\"));\n this.popupMenu_Logs.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Logs\"));\n this.popupMenu_Parameters.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Parameters\"));\n this.popupMenu_Quit.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Quit\"));\n this.setMenuBarMnemonics();\n }", "public void initializeButtons(){\n\t\t\tplay.setBounds(40,90,280,30);\n\t\t\tadd(play);\n\t\t\tplay.addActionListener(new PlayGame());\n\t\t\tplay.setVisible(true);\n\t\t\t\n\t\t\tenterquestion.setBounds(40,140,280,30);\n\t\t\tadd(enterquestion);\n\t\t\tenterquestion.addActionListener(new EnterQuestion());\n\t\t\tenterquestion.setVisible(true);\n\t\t\t\n\t\t\tdirections.setBounds(40,190,280,30);\n\t\t\tadd(directions);\n\t\t\tdirections.addActionListener(new Instructor());\n\t\t\tdirections.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t}", "private void initControlsPage()\r\n {\n \tString keyTitleString = \"KEYBOARD\";\r\n \tkeyTitleText = new OText(25, 200, 300, keyTitleString);\r\n \tkeyTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the keyboard movement text\r\n \tString keyMoveString = \"Move Optimus with the WASD keys \"\r\n \t\t\t + \" <br> \"\r\n \t\t\t + \"as if they were the arrow keys.\";\r\n \tkeyMoveText = new OText(25, 225, 300, keyMoveString);\r\n \tkeyMoveText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t\r\n \t//Initialize the mouse title text\r\n \tString mouseTitleString = \"MOUSE\";\r\n \tmouseTitleText = new OText(375, 200, 300, mouseTitleString);\r\n \tmouseTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the mouse text\r\n \tString mouseMoveString = \"Aim by moving the mouse and shoot bullets from Optimus in the direction of the cursor using both clicks. \";\r\n \tmouseText = new OText(375, 225, 300, mouseMoveString);\r\n \tmouseText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void addSingleplayerMultiplayerButtons() {\n\t\tthis.buttonList.add(new GuiButton(1, 4, 3, 60, 20, I18n.format(\"menu.singleplayer\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(2, 70, 3, 50, 20, I18n.format(\"menu.multiplayer\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(14, 126, 3, 60, 20, \"§bResilient§r\"));\n\n\t}", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n botonNuevo();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON EDITAR\r\n */\r\n im_tool2.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEditar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON GUARDAR\r\n */\r\n im_tool3.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonGuardar();\r\n }\r\n }\r\n }); \r\n /**\r\n * BOTON ELIMINAR\r\n */\r\n im_tool4.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEliminar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON IMPRIMIR\r\n */\r\n im_tool5.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){ \r\n botonImprimir();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON REGRESAR\r\n */\r\n im_tool6.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON POR ASIGNAR\r\n */\r\n im_tool7.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON NOTAS DE CREDITO\r\n */\r\n im_tool8.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON DEVOLUCION\r\n */\r\n im_tool9.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON BUSCAR\r\n */\r\n im_tool12.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n switch (mouseEvent.getClickCount()){\r\n case 1:\r\n botonInicio();\r\n botonBuscar();\r\n break;\r\n case 2:\r\n Datos.setIdButton(2003041);\r\n Gui.getInstance().showBusqueda(\"Busqueda\"); \r\n break;\r\n }\r\n }\r\n });\r\n /**\r\n * SELECCION EN LA TABLA\r\n */\r\n tb_guias.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n if ((tb_guias.getItems() != null) && (!tb_guias.getItems().isEmpty()))\r\n selectedRowGuide();\r\n }\r\n }\r\n }); \r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nroguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nroguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_rela_caja(tf_nroguia.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_nroguia.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de \" + ScreenName + \" NO existe!\", \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nrorguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nrorguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n boolean booa = true; \r\n if(booa){\r\n boolean booc = Ln.getInstance().check_log_CGuias_caja(tf_nrorguia.getText()); \r\n if(booc){\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n else{\r\n for (int i = 0; i < log_guide_guia.size(); i++) {\r\n if(tf_nrorguia.getText().equals(tb_guias.getItems().get(i).getGuias())){\r\n booa = false;\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n break;\r\n }\r\n } \r\n if(booa){\r\n log_Guide_rel_inv guide_carga = new log_Guide_rel_inv();\r\n\r\n List<Fxp_Archguid_gfc> data = \r\n Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(tf_nrorguia.getText()));\r\n\r\n if (data.get(0).getStat_guia().equals(\"X\")\r\n || data.get(0).getStat_guia().equals(\"C\")){\r\n guide_carga.setNumorden(String.valueOf((log_guide_guia.size() + 1)));\r\n guide_carga.setGuias(tf_nrorguia.getText());\r\n guide_carga.setNumfact(data.get(0).getNumfact());\r\n guide_carga.setNumclie(data.get(0).getNumclie());\r\n\r\n if (data.get(0).getStat_guia().equals(\"A\")){\r\n if (tipoOperacion == 1)\r\n guide_carga.setStat_guia(null);\r\n else\r\n guide_carga.setStat_guia(data.get(0).getStat_guia());\r\n }\r\n else{\r\n guide_carga.setStat_guia(null);\r\n }\r\n \r\n \r\n log_guide_guia.add(guide_carga);\r\n\r\n loadTableGuide_guias();\r\n change_im_val(200, im_checkg); \r\n\r\n numFactCarga = numFactCarga + data.get(0).getNumfact();\r\n numClieCarga = numClieCarga + data.get(0).getNumclie();\r\n\r\n tf_nrorguia.setText(\"\");\r\n }else{\r\n if (data.get(0).getStat_guia().equals(\"\")){\r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO tiene relación de Guia de Carga!\", \"A\");\r\n }\r\n else{\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n }\r\n tf_nrorguia.requestFocus();\r\n }\r\n \r\n }\r\n }\r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO existe!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n }", "private void createYourMusicContent() {\n\t\t/**Creates all images we will use for the buttons*/\n\t\tImageIcon image1 = new ImageIcon(sURLFB1);\n\t\tImageIcon image2 = new ImageIcon(sURLFB2);\n\t\tImageIcon image3 = new ImageIcon(sURLFB3);\n\t\tImageIcon image4 = new ImageIcon(sURLFBS1);\n\t\tImageIcon image5 = new ImageIcon(sURLFBS2);\n\t\tImageIcon image6 = new ImageIcon(sURLFBS3);\n\t\tImageIcon image7 = new ImageIcon(sURLFBPL1);\n\t\tImageIcon image8 = new ImageIcon(sURLFBPL2);\n\t\tImageIcon image9 = new ImageIcon(sURLFBPL3);\n\t\n\t\t/**Creates the button of Favourites and configures it*/\n\t\tjbFavorites = new JButton(\"Favorites\");\n\t\tjbFavorites.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbFavorites.setForeground(new Color(150,100,100));\n\t\tjbFavorites.setIcon(image1);\n\t\tjbFavorites.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setRolloverIcon(image2);\n\t\tjbFavorites.setSelectedIcon(image3);\n\t\tjbFavorites.setContentAreaFilled(false);\n\t\tjbFavorites.setFocusable(false);\n\t\tjbFavorites.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of Songs and configures it*/\n\t\tjbSongs = new JButton(\"Songs\");\n\t\tjbSongs.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbSongs.setForeground(new Color(150,100,100));\n\t\tjbSongs.setIcon(image4);\n\t\tjbSongs.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setRolloverIcon(image5);\n\t\tjbSongs.setSelectedIcon(image6);\n\t\tjbSongs.setContentAreaFilled(false);\n\t\tjbSongs.setFocusable(false);\n\t\tjbSongs.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of PartyList and configures it*/\n\t\tjbPartyList = new JButton(\"PartyList\");\n\t\tjbPartyList.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbPartyList.setForeground(new Color(150,100,100));\n\t\tjbPartyList.setIcon(image7);\n\t\tjbPartyList.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setRolloverIcon(image8);\n\t\tjbPartyList.setSelectedIcon(image9);\t\n\t\tjbPartyList.setContentAreaFilled(false);\n\t\tjbPartyList.setFocusable(false);\n\t\tjbPartyList.setBorderPainted(false);\n\t\t\n\t\t/**Creates the panel where we will put all buttons*/\n\t\tjpPreLists = new JPanel(new BorderLayout());\n jpPreLists.setOpaque(false);\n\t\tjpPreLists.add(jbFavorites,BorderLayout.NORTH);\n\t\tjpPreLists.add(jbSongs,BorderLayout.CENTER);\n\t\tjpPreLists.add(jbPartyList,BorderLayout.SOUTH);\n\t}", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "@Override\n\tprotected void loadButton(Resources res) {\n\t\tif (which_menu_button == MB_SELECT_LEVEL) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.mb_select_level);\n\t\t\tlocation.x = screen_width*3/4 - image.getWidth()/2;\n\t\t\tlocation.y = screen_height*5/6 - image.getHeight()/2;\n\t\t} else if (which_menu_button == MB_CONTINUE) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.mb_continue);\n\t\t\tlocation.x = screen_width*1/2 - image.getWidth()/2;\n\t\t\tlocation.y = screen_height*5/6 - image.getHeight()/2;\n\t\t} else if (which_menu_button == MB_OPTIONS) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.mb_options);\n\t\t\tlocation.x = screen_width*1/4 - image.getWidth()/2;\n\t\t\tlocation.y = screen_height*5/6 - image.getHeight()/2;\n\t\t} else if (which_menu_button == MB_BACK) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.mb_back);\n\t\t\tlocation.x = screen_width*1/7 - image.getWidth()/2;\n\t\t\tlocation.y = screen_height*7/8 - image.getHeight()/2;\n\t\t} else if (which_menu_button == PAUSE_RESUME) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.pause_resume);\n\t\t\tlocation.x = screen_width/2 - image.getWidth()/2;\n\t\t\tlocation.y = screen_height*1/3 - image.getHeight()/2;\n\t\t} else if (which_menu_button == PAUSE_SAVE_QUIT) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.pause_save_quit);\n\t\t\tlocation.x = screen_width/2 - image.getWidth()/2;\n\t\t\tlocation.y = screen_height*2/3 - image.getHeight()/2;\t\t\n\t\t} else if (which_menu_button == PAUSE_QUIT) {\n\t\t\timage = BitmapFactory.decodeResource(res,R.drawable.pause_quit);\n\t\t\tlocation.x = 10;\n\t\t\tlocation.y = screen_height - image.getHeight() - 10;;\t\n\t\t}\n\t}", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: wtrocki@gmail.com\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "private void initCommandButtons(char[] levelLetters) {\n\t\tthis.btnTopFirst = (Button) findViewById(R.id.buttonTopFirst);\n\t\tthis.btnTopSecond = (Button) findViewById(R.id.buttonTopSecond);\n\t\tthis.btnTopThird = (Button) findViewById(R.id.buttonTopThird);\n\t\tthis.btnTopFourth = (Button) findViewById(R.id.buttonTopFourth);\n\n\t\tthis.btnBotFirst = (Button) findViewById(R.id.buttonBotFirst);\n\t\tthis.btnBotSecond = (Button) findViewById(R.id.buttonBotSecond);\n\t\tthis.btnBotThird = (Button) findViewById(R.id.buttonBotThird);\n\t\tthis.btnBotFourth = (Button) findViewById(R.id.buttonBotFourth);\n\t\tthis.letterButtons = new Button[] { btnBotFirst, btnBotSecond,\n\t\t\t\tbtnBotThird, btnBotFourth, btnTopFirst, btnTopSecond,\n\t\t\t\tbtnTopThird, btnTopFourth };\n\t\tthis.btnEndWord = (Button) findViewById(R.id.btnEndWord);\n\n\t\t// End word should be disabled by default\n\t\tthis.btnEndWord.setEnabled(false);\n\n\t\t// Populate level letters\n\t\tint index = 0;\n\t\tfor (Button btn : this.letterButtons) {\n\t\t\tbtn.setText(\"\" + levelLetters[index]);\n\t\t\tindex++;\n\t\t}\n\t}", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildLayoutButtons() {\n\t\tlayoutButtons = new HorizontalLayout();\n\t\tlayoutButtons.setImmediate(false);\n\t\tlayoutButtons.setWidth(\"-1px\");\n\t\tlayoutButtons.setHeight(\"-1px\");\n\t\tlayoutButtons.setMargin(false);\n\t\t\n\t\t// btnSave\n\t\tbtnSave = new Button();\n\t\tbtnSave.setCaption(\"Salvar\");\n\t\tbtnSave.setImmediate(true);\n\t\tbtnSave.setWidth(\"-1px\");\n\t\tbtnSave.setHeight(\"-1px\");\n\t\tlayoutButtons.addComponent(btnSave);\n\t\t\n\t\t// btnCancel\n\t\tbtnCancel = new Button();\n\t\tbtnCancel.setCaption(\"Cancelar\");\n\t\tbtnCancel.setImmediate(true);\n\t\tbtnCancel.setWidth(\"-1px\");\n\t\tbtnCancel.setHeight(\"-1px\");\n\t\tlayoutButtons.addComponent(btnCancel);\n\t\t\n\t\treturn layoutButtons;\n\t}", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "private void buttonInit(){\n for(int i=0; i < 3; i++){\n choice[i] = new JButton();\n\n }\n choice[0].setText(\"10x10 / 8 bombs\");\n choice[0].setBackground(new Color(86, 160, 189));\n\n\n choice[0].addActionListener(l-> makeGamePanel(10, 8));\n\n choice[1].setText(\"15x15 / 30 bombs\");\n choice[1].setBackground(new Color(238, 160, 160));\n\n\n choice[1].addActionListener(l-> makeGamePanel(15,30));\n\n choice[2].setText(\"24x24 / 70 bombs\");\n choice[2].setBackground(new Color(253, 230, 122));\n choice[2].setFont(new Font(Font.MONOSPACED, Font.BOLD, 30));\n choice[2].setForeground(new Color(45, 68, 73));\n\n choice[2].addActionListener(l-> makeGamePanel(24,70));\n\n this.add(choice[0], BorderLayout.LINE_START); this.add(choice[1], BorderLayout.LINE_END); this.add(choice[2], BorderLayout.CENTER);\n }", "private void setButtons(){\n cancelButton = findViewById(R.id.memory_theme_cancel);\n saveButton = findViewById(R.id.memory_theme_save);\n\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setSound.startButtonNoise(MemoryThemeActivity.this);\n finish();\n }\n });\n\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n final SharedPreferences.Editor editor = sp.edit();\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setSound.startButtonNoise(MemoryThemeActivity.this);\n editor.putInt(PreferenceKeys.MEMORY_THEME, saveTheme);\n editor.putInt(PreferenceKeys.MEMORY_THEME_COLOR, color);\n editor.putInt(PreferenceKeys.MEMORY_THEME_BOARDER, boarder);\n editor.putInt(PreferenceKeys.MEMORY_THEME_STYE, style);\n editor.apply();\n Intent intent = new Intent(MemoryThemeActivity.this, MemoryActivity.class);\n startActivity(intent);\n }\n });\n }", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "private void createAdditionalButtonControls(Composite parent) {\r\n\t\tComposite btnComposite = new Composite(parent, SWT.NONE);\r\n\t\tbtnComposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tButton selAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tselAllBtn.setText(Messages.TOPOLOGY_BTN_SELECT_ALL_TXT);\r\n\t\tselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(true);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton deselAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tdeselAllBtn.setText(Messages.TOPOLOGY_BTN_DESELECT_ALL_TXT);\r\n\t\tdeselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(false);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initGUI(){\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n setLayout(new GridLayout(3,1));\r\n setSize(896,504);\r\n setLocation(150,80);\r\n\r\n\r\n\r\n //Setting background img\r\n try{\r\n backGroundImg = javax.imageio.ImageIO.read(new File(\"MenuBackGround.jpg\"));\r\n setContentPane(new JPanel(new GridLayout(3,1)){\r\n @Override public void paintComponent(Graphics graphics){\r\n graphics.drawImage(backGroundImg,0,0,getWidth(),getHeight(),null);\r\n }\r\n });\r\n }catch(IOException ioe){\r\n System.out.println(\"Background image not found!\");\r\n }\r\n\r\n //Setting logo img\r\n try{\r\n logoImg = javax.imageio.ImageIO.read(new File(\"QuizAppLogo.jpg\"));\r\n logoLabel = new JLabel(new ImageIcon(logoImg));\r\n }catch (IOException ioe){\r\n System.out.println(\"Logo img not found!\");\r\n }\r\n\r\n //Setting-up the buttons\r\n solve = new JButton(Language.SOLVE_BUTTON_TEXT);\r\n solve.addActionListener(new SolveAction(this));\r\n\r\n create = new JButton(Language.CREATE_BUTTON_TEXT);\r\n create.addActionListener(new CreateAction());\r\n\r\n options = new JButton(Language.OPTIONS_BUTTON_TEXT);\r\n options.setEnabled(false);\r\n\r\n\r\n //Joining them all together\r\n buttonsPanel = new JPanel(new GridLayout(3,1));\r\n buttonsPanel.setOpaque(false);\r\n buttonsPanel.add(solve);\r\n buttonsPanel.add(create);\r\n //buttonsPanel.add(options);\r\n\r\n topPanel = new JPanel(new GridLayout(1,3));\r\n topPanel.add(logoLabel);\r\n topPanel.add(Box.createHorizontalGlue());\r\n topPanel.add(buttonsPanel);\r\n topPanel.setOpaque(false);\r\n\r\n\r\n\r\n add(topPanel);\r\n add(Box.createVerticalGlue());\r\n add(Box.createVerticalGlue());\r\n setVisible(true);\r\n }", "public void initGui()\n {\n this.buttonList.clear();\n this.multilineMessage = this.fontRendererObj.listFormattedStringToWidth(this.message.getFormattedText(), this.width - 50);\n this.field_175353_i = this.multilineMessage.size() * this.fontRendererObj.FONT_HEIGHT;\n this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 2 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, I18n.format(\"gui.toMenu\", new Object[0])));\n if(!TabGUI.openTabGUI) return;\n this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Reconnect\"));\n this.buttonList.add(new GuiButton(2, this.width / 2, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Random Alt\"));\n }", "private JPanel createMediaButtons() {\n JPanel buttonPanel = new JPanel(new FlowLayout());\n\n showImageButton_ = new GradientButton(\"Image\");\n showImageButton_.addActionListener(this);\n showImageButton_.setEnabled(scene_.getImage() != null);\n\n playSoundButton_ = new GradientButton(\"Sound\");\n playSoundButton_.addActionListener(this);\n playSoundButton_.setEnabled(scene_.hasSound());\n\n buttonPanel.add(showImageButton_);\n buttonPanel.add(playSoundButton_);\n\n return buttonPanel;\n }", "private void addComponents() {\n\t\tthis.add(btn_pause);\n\t\tthis.add(btn_continue);\n\t\tthis.add(btn_restart);\n\t\tthis.add(btn_rank);\n\t\tif(Config.user.getUsername().equals(\"root\")) {\n\t\t\tthis.add(btn_admin);\n\t\t}\n\t\n\t\t\n\t}", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "private Classes.Button principalButtonsMenu(TextView buttonTitle, ImageView buttonImage){\n Classes.Button button;\n if(buttonIndex < (rows*(columns-1))) {\n button = buttons.get(buttonIndex);\n createPrincipalButtons(buttonTitle, button, buttonImage);\n }else if(buttonFunctionIndex < functionButtons.size()) {\n button = functionButtons.get(buttonFunctionIndex);\n createFuncionesButtons(buttonTitle, button, buttonImage);\n }else{\n button = new Classes.Button(0, \"\", \"\", \"\",\"\", \"\",\"\", \"\");\n }\n return button;\n }", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "public void InitViews() {\n setBackgroundResource(R.drawable.can_rh7_bg02);\n addButton(50, 107, R.drawable.can_rh7_jia_up, R.drawable.can_rh7_jia_dn, 0);\n addButton(50, 304, R.drawable.can_rh7_jian_up, R.drawable.can_rh7_jian_dn, 1);\n this.mLeftTemp = addText(53, 218, 92, 61);\n addButton(188, 107, R.drawable.can_rh7_fsb_up, R.drawable.can_rh7_fsb_dn, 4);\n addButton(188, 304, R.drawable.can_rh7_fss_up, R.drawable.can_rh7_fss_dn, 5);\n addImage(191, 218, R.drawable.can_rh7_signal_up);\n for (int i = 0; i < mWindIcons.length; i++) {\n mWindIcons[i] = addImage(191, 218, mIcons[i]);\n }\n mACMode[0] = addButton(305, 98, R.drawable.can_rh7_icon01_up, R.drawable.can_rh7_icon01_dn, 6);\n mACMode[1] = addButton(305, 175, R.drawable.can_rh7_icon02_up, R.drawable.can_rh7_icon02_dn, 7);\n mACMode[2] = addButton(305, Can.CAN_FLAT_RZC, R.drawable.can_rh7_icon03_up, R.drawable.can_rh7_icon03_dn, 8);\n mACMode[3] = addButton(305, KeyDef.RKEY_MEDIA_10, R.drawable.can_rh7_icon04_up, R.drawable.can_rh7_icon04_dn, 9);\n this.mStatusWindow = addButton(CanCameraUI.BTN_LANDWIND_3D_LEFT_DOWN, 98, R.drawable.can_rh7_window_up, R.drawable.can_rh7_window_dn, 11);\n this.mStatusWindowRear = addButton(CanCameraUI.BTN_LANDWIND_3D_LEFT_DOWN, KeyDef.RKEY_MEDIA_10, R.drawable.can_rh7_window02_up, R.drawable.can_rh7_window02_dn, 18);\n this.mStatusOutLoop = addButton(CanCameraUI.BTN_LANDWIND_3D_LEFT_DOWN, 210, R.drawable.can_rh7_wxh_up, R.drawable.can_rh7_wxh_dn, 13);\n this.mStatusAuto = addButton(757, 210, R.drawable.can_rh7_auto_up, R.drawable.can_rh7_auto_dn, 14);\n this.mStatusAc = addButton(757, 98, R.drawable.can_rh7_ac_up, R.drawable.can_rh7_ac_dn, 16);\n this.mStatusClosed = addButton(751, KeyDef.RKEY_OPEN, R.drawable.can_rh7_del_up, R.drawable.can_rh7_del_dn, 17);\n }", "public void Themes31()\n {\n theme3= new Label(\"Theme\");\n theme3.setPrefWidth(150);\n theme3.setFont(new Font(13));\n theme3.setPrefHeight(40);\n theme3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n dikoma3 = new Label(\"Dikoma\");\n dikoma3.setFont(new Font(13));\n dikoma3.setPrefWidth(150);\n dikoma3.setPrefHeight(40);\n dikoma3.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n diagelo3 = new Label(\"Diagelo\");\n diagelo3.setFont(new Font(13));\n diagelo3.setPrefWidth(150);\n diagelo3.setPrefHeight(40);\n diagelo3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n abuse3 = new Label(\"Woman & children abuse\");\n abuse3.setPrefWidth(150);\n abuse3.setFont(new Font(13));\n abuse3.setPrefHeight(40);\n abuse3.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n trafficking3 = new Label(\"Human trafficking\");\n trafficking3.setFont(new Font(13));\n trafficking3.setPrefWidth(150);\n trafficking3.setPrefHeight(40);\n trafficking3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n }", "private void createComponentForButtons(Composite section)\n {\n createRowForNewStyleButton(section);\n createRowForNewRegexButton(section);\n createRowForNewColumnButton(section);\n createRowForDeleteButton(section);\n createRowForDeleteAllButton(section);\n }", "public HomePageHelper writeTextOfButtons(){\n System.out.println (\"Quantity of elements: \" + languagesButtons.size());\n for(WebElement el : languagesButtons){\n System.out.println(\"Tag Name: \" + el.getTagName());\n System.out.println(\"attr: ng-click - \" + el.getAttribute(\"ng-click\"));\n }\n return this;\n }", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_)\r\n\t{\r\n\t\tthis.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format(\"menu.singleplayer\")));\r\n\t\tthis.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format(\"menu.multiplayer\")));\r\n\t\tthis.buttonList.add(modButton = new GuiButton(6, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format(\"fml.menu.mods\")));\r\n\t\tRandomTexture = (int) (Math.random() * 3 + 1);\r\n\r\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n btnCliente.setAlignment(Pos.CENTER_RIGHT);\r\n btnCompras.setAlignment(Pos.CENTER_RIGHT);\r\n btnInventario.setAlignment(Pos.CENTER_RIGHT);\r\n btnProveedores.setAlignment(Pos.CENTER_RIGHT);\r\n btnUsuarios.setAlignment(Pos.CENTER_RIGHT);\r\n btnVentas.setAlignment(Pos.CENTER_RIGHT);\r\n }", "private void setButtons(JPanel menuContent) {\r\n\t \t \r\n \tJButton button_start = new JButton(start);\r\n \tbutton_start.setText(\"button_start\");\r\n\t \tbutton_start.setLocation(450, 300);\r\n\t\tbutton_start.setSize(405, 50);\r\n\t\tbutton_start.setBorderPainted(false);\r\n\t\tbutton_start.setFocusPainted(false);\r\n\t\tbutton_start.setContentAreaFilled(false);\r\n\t\tbutton_start.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tbutton_start.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t \t \r\n\t \tJButton button_howto = new JButton(howto);\r\n\t \tbutton_howto.setText(\"button_howto\");\r\n\t \tbutton_howto.setLocation(450, 360);\r\n\t \tbutton_howto.setSize(405, 50);\r\n\t \tbutton_howto.setBorderPainted(false);\r\n\t \tbutton_howto.setFocusPainted(false);\r\n\t \tbutton_howto.setContentAreaFilled(false);\r\n\t \tbutton_howto.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_howto.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \tJButton button_options = new JButton(options);\r\n\t \tbutton_options.setText(\"button_options\");\r\n\t \tbutton_options.setLocation(450, 420);\r\n\t \tbutton_options.setSize(405, 50);\r\n\t \tbutton_options.setBorderPainted(false);\r\n\t \tbutton_options.setFocusPainted(false);\r\n\t \tbutton_options.setContentAreaFilled(false);\r\n\t \tbutton_options.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_options.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t \tJButton button_lboards = new JButton(lboards);\r\n\t \tbutton_lboards.setText(\"button_lboards\");\r\n\t \tbutton_lboards.setLocation(450, 480);\r\n\t \tbutton_lboards.setSize(405, 50);\r\n\t \tbutton_lboards.setBorderPainted(false);\r\n\t \tbutton_lboards.setFocusPainted(false);\r\n\t \tbutton_lboards.setContentAreaFilled(false);\r\n\t \tbutton_lboards.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_lboards.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \tJButton button_exit = new JButton(exit);\r\n\t \tbutton_exit.setText(\"button_exit\");\r\n\t \tbutton_exit.setLocation(450, 540);\r\n\t \tbutton_exit.setSize(405, 50);\r\n\t \tbutton_exit.setBorderPainted(false);\r\n\t \tbutton_exit.setFocusPainted(false);\r\n\t \tbutton_exit.setContentAreaFilled(false);\r\n\t \tbutton_exit.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_exit.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \t//adds the buttons to the JPanel\r\n\t menuContent.add(button_start);\r\n\t menuContent.add(button_howto);\r\n\t menuContent.add(button_options);\r\n\t menuContent.add(button_lboards);\r\n\t menuContent.add(button_exit);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void buttonClick(ClickEvent event) {\r\n\t\tString buttonId = event.getButton().getId();\r\n\t\t\r\n\t\tswitch(buttonId) {\r\n\t\t\r\n\t\t//opens the mainView if the user clicks the gefühlslage button\r\n\t\tcase \"gefuehlslage\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.MAIN_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the diaryView if the user clicks the diary button \r\n\t\tcase \"diary\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.DIARY_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the reportView if the user clicks the report button \r\n\t\tcase \"report\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.REPORT_VIEW);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t//opens the reminderView if the user clicks the reminder button\t\r\n\t\tcase \"reminder\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.REMINDER_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the medInfoView if the user clicks the medication information button \r\n\t\tcase \"medInfo\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.MEDICATION_INFORMATION_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the depErkView if the user clicks the definition depression button \r\n\t\tcase \"depErk\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.DEFINITION_DEPRESSION_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the settingsView if the user clicks the settings button \r\n\t\tcase \"settings\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.SETTINGS_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the sosView if the user clicks the sos button\r\n\t\tcase \"sos\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.SOS_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the chatView if the user clicks the chat button \r\n\t\tcase \"chat\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.CHAT_VIEW);\r\n\t\t break;\r\n\t\t}\r\n\t}", "public Lab2_InternationalizedWarehouse() {\n enLocale = new Locale(\"en\", \"US\");\n plLocale = new Locale(\"pl\", \"PL\");\n initComponents();\n initStorage();\n itemsList = new ItemsList();\n plLangRadioButton.doClick();\n loadButton.doClick();\n langButtonGroup.add(plLangRadioButton);\n langButtonGroup.add(enLangRadioButton);\n\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell(SWT.APPLICATION_MODAL|SWT.CLOSE);\r\n\t\tshell.setSize(800, 600);\r\n\t\tshell.setText(\"租借/归还车辆\");\r\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\r\n\r\n\t\t/**换肤功能已经实现*/\r\n\t\tString bgpath = ChangeSkin.getCurrSkin();\r\n\t\tInputStream bg = this.getClass().getResourceAsStream(bgpath);\r\n\t\t\r\n\t\tInputStream reimg = this.getClass().getResourceAsStream(\"/Img/icon1.png\");\r\n\t\tshell.setBackgroundImage(new Image(display,bg));\r\n\t\tshell.setImage(new Image(display, reimg));\r\n\t\t\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(52, 48, 168, 20);\r\n\t\tlabel.setText(\"\\u8BF7\\u60A8\\u8BA4\\u771F\\u586B\\u5199\\u79DF\\u8D41\\u4FE1\\u606F:\");\r\n\t\t\r\n\t\tLabel lblid = new Label(shell, SWT.NONE);\r\n\t\tlblid.setBounds(158, 180, 61, 20);\r\n\t\tlblid.setText(\"\\u8F66\\u8F86ID\");\r\n\t\t\r\n\t\tui_car_id = new Text(shell, SWT.BORDER);\r\n\t\tui_car_id.setBounds(225, 177, 129, 26);\r\n\t\t\r\n\t\tui_renter = new Text(shell, SWT.BORDER);\r\n\t\tui_renter.setBounds(225, 228, 129, 26);\r\n\t\t\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(159, 231, 61, 20);\r\n\t\tlabel_1.setText(\"\\u79DF\\u8D41\\u4EBA\");\r\n\t\t\r\n\t\tDateTime ui_start = new DateTime(shell, SWT.BORDER);\r\n\t\tui_start.setBounds(225, 271, 129, 28);\r\n\t\t\r\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setBounds(144, 271, 76, 20);\r\n\t\tlabel_2.setText(\"\\u5F00\\u59CB\\u65F6\\u95F4\");\r\n\t\t\r\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setBounds(144, 326, 76, 20);\r\n\t\tlabel_3.setText(\"\\u7ED3\\u675F\\u65F6\\u95F4\");\r\n\t\t\r\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setBounds(559, 97, 76, 20);\r\n\t\tlabel_4.setText(\"\\u5F53\\u524D\\u8D39\\u7528:\");\r\n\t\t\r\n\t\tLabel ui_count_price = new Label(shell, SWT.BORDER | SWT.CENTER);\r\n\t\tui_count_price.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 16, SWT.NORMAL));\r\n\t\tui_count_price.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\r\n\t\tui_count_price.setBounds(539, 205, 156, 77);\r\n\t\tui_count_price.setText(\"0.00\");\r\n\t\t\r\n\t\tDateTime ui_end = new DateTime(shell, SWT.BORDER);\r\n\t\tui_end.setBounds(225, 318, 129, 28);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tRentService rentser = new RentService();\r\n\t\t\t\tdouble day_pri = rentser.rentPrice(ui_car_id.getText());\r\n\t\t\t\t/*当前仅能计算一个月以内的租用情况\r\n\t\t\t\t * @Time 10/09/15.03\r\n\t\t\t\t * \r\n\t\t\t\t * **/\r\n\t\t\t\t//不管当月几天,都按照30天计算\r\n\t\t\t\tint month = ui_end.getMonth()-ui_start.getMonth();\r\n\t\t\t\tint day = (ui_end.getDay() - ui_start.getDay()) +\r\n\t\t\t\t\t\tmonth * 30\r\n\t\t\t\t\t\t;\r\n\t\t\t\tif(day_pri > 0) {\r\n\t\t\t\t\tui_count_price.setText(String.valueOf(day*day_pri));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tui_count_price.setText(\"数据非法\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(122, 393, 141, 30);\r\n\t\tbutton.setText(\"\\u4F30\\u7B97\\u5F53\\u524D\\u79DF\\u8D41\\u4EF7\\u683C\");\r\n\t\t\r\n\t\tButton button_1 = new Button(shell, SWT.NONE);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tRentService rentService = new RentService();\r\n\t\t\t\tString sdate = ui_start.getDay()+\"-\"+ui_start.getMonth()+\"月-\"+ui_start.getYear();\r\n\t\t\t\tString edate = ui_end.getDay()+\"-\"+ui_end.getMonth()+\"月-\"+ui_end.getYear();\r\n\t\t\t\t/**这个地方可能有问题*/\r\n\t\t\t\tboolean rentCar = rentService.rentCar(ui_car_id.getText(),sdate , edate, ui_count_price.getText());\r\n\t\t\t\tif(rentCar) {\r\n\t\t\t\t\tui_count_price.setText(\"租借成功!\");\r\n\t\t\t\t\t/**租借成功,就该让信息表中的数据减1**/\r\n\t\t\t\t\tCarService cars = new CarService();\r\n\t\t\t\t\tcars.minusCar(ui_car_id.getText());\r\n\t\t\t\t}else {\r\n\t\t\t\t\tui_count_price.setText(\"租借失败!\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setBounds(292, 393, 98, 30);\r\n\t\tbutton_1.setText(\"\\u79DF\\u501F\");\r\n\t\t\r\n\t\r\n\r\n\t}", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "private void setupActionButtons() {\n setupLikeActionButton();\n setupRepostActionButton();\n setupMoreActionButton();\n }", "public void init() {\n setLayout(new GridLayout(n-1, n));\n setFont(new Font(\"SansSerif\", Font.BOLD, 24));\n \n // Baris 1\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"Bksp\",Color.red));\n add(makeButton(\"CE\",Color.red));\n add(makeButton(\"X\",Color.red));\n \n // Baris 2\n add(makeButton(\"MC\",Color.red));\n add(new Button(\"7\"));\n add(new Button(\"8\"));\n add(new Button(\"9\"));\n add(new Button(\"/\"));\n add(new Button(\"sqrt\"));\n \n // Baris 3\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"4\"));\n add(new Button(\"5\"));\n add(new Button(\"6\"));\n add(new Button(\"x\"));\n add(new Button(\"%\"));\n \n // Baris 4\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"1\"));\n add(new Button(\"2\"));\n add(new Button(\"3\"));\n add(new Button(\"-\"));\n add(new Button(\"1/x\"));\n\n // Baris 5\n add(makeButton(\"M+\",Color.red));\n add(new Button(\"0\"));\n add(new Button(\"+/-\"));\n add(new Button(\".\"));\n add(new Button(\"+\"));\n add(new Button(\"=\"));\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n help.setOnAction(event -> System.exit(0));\n /**\n * Event für das Clicken auf eine Menueintrag\n */\n mvcexample.setOnAction(event -> Main.addContent(GameTypT.MVCexample,null));\n drehsafe.setOnAction(event -> Main.addContent(GameTypT.DrehSafe,null));\n sokoban.setOnAction(event -> Main.addContent(GameTypT.Sokoban,null));\n siebenspaltenprimzahlen.setOnAction(event -> Main.addContent(GameTypT.SiebenSpaltenPrimzahlen,null));\n regenbogen.setOnAction(event -> Main.addContent(GameTypT.Regenbogen,null));\n connect6.setOnAction(event -> Main.addContent(GameTypT.Connect6,null));\n gameoflife.setOnAction(event -> Main.addContent(GameTypT.GameOfLife,null));\n snake.setOnAction(event -> Main.addContent(GameTypT.Snake,null));\n carcassonne.setOnAction(event -> Main.addContent(GameTypT.Carcassonne, null));\n }", "private Map<Integer, Button> getButtons(){\r\n\t\tMap<Integer, Button> buttons = new HashMap<Integer, Button>();\r\n\r\n\t\tButton toLeftBt = new Button(\"&lt;\");\r\n\t\tbuttons.put(0, toLeftBt);\r\n\t\tButton toRightBt = new Button(\"&gt;\");\r\n\t\tbuttons.put(2, toRightBt);\r\n\t\tfinal Button playBt = new Button(\"||\");\r\n\t\tbuttons.put(1, playBt);\r\n\t\t\r\n\t\ttoRightBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttoLeftBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tdisplayPrevious();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tplayBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tif(isActive){\r\n\t\t\t\t\tstopSlideshow();\r\n\t\t\t\t\tplayBt.setText(\"Go\");\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstartSlideshow();\r\n\t\t\t\t\tplayBt.setText(\"||\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn buttons;\r\n\t}", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}", "private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(11, 3, new Insets(0, 0, 0, 0), -1, -1));\n bKillSession = new JButton();\n bKillSession.setText(\"Убить сессии\");\n rootPanel.add(bKillSession, new com.intellij.uiDesigner.core.GridConstraints(0, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bGetAll = new JButton();\n bGetAll.setText(\"Получить график\");\n rootPanel.add(bGetAll, new com.intellij.uiDesigner.core.GridConstraints(1, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bStartBS = new JButton();\n bStartBS.setText(\"Старт БС\");\n rootPanel.add(bStartBS, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bSetFreq = new JButton();\n bSetFreq.setText(\"Установить частоту\");\n rootPanel.add(bSetFreq, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n tfFreq = new JTextField();\n rootPanel.add(tfFreq, new com.intellij.uiDesigner.core.GridConstraints(2, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n cbDefaultBS = new JCheckBox();\n cbDefaultBS.setSelected(true);\n cbDefaultBS.setText(\"Использовать БС из конфига\");\n rootPanel.add(cbDefaultBS, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n rootPanel.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(7, 2, 4, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n cbListMethods = new JComboBox();\n rootPanel.add(cbListMethods, new com.intellij.uiDesigner.core.GridConstraints(5, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Запускаемый метод:\");\n rootPanel.add(label1, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n rootPanel.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(7, 0, 4, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n lblParams = new JLabel();\n lblParams.setText(\"Label\");\n rootPanel.add(lblParams, new com.intellij.uiDesigner.core.GridConstraints(6, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n bPause = new JButton();\n bPause.setText(\"Пауза\");\n panel1.add(bPause, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n bStart = new JButton();\n bStart.setText(\"Старт\");\n panel1.add(bStart, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n rootPanel.add(separator1, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 3, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "private void instanciarTextButtons(){\n for (int buttons : textIds) {\n TextView btn = findViewById(buttons);\n ComponentesAuxiliares.definirFonte(this, btn);\n }\n }", "private void createbuttons(){\n newPatient = (Button) findViewById(R.id.newButton);\n newPatient.setOnClickListener(buttonClick);\n\n registeredPatient = (Button) findViewById(R.id.registeredButton);\n registeredPatient.setOnClickListener(buttonClick);\n\n viewManagement = (Button) findViewById(R.id.viewStaffActivitiesButton);\n viewManagement.setOnClickListener(buttonClick);\n }", "private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}", "private JButton getSkuska3Button() {\n\t\tif (skuska3Button == null) {\n\t\t\tskuska3Button = new JButton();\n\t\t\tskuska3Button.setEnabled(false);\n\t\t\tskuska3Button.setSize(new Dimension(83, 25));\n\t\t\tskuska3Button.setLocation(new Point(227, 253));\n\t\t\tskuska3Button.setText(\"Skúška\");\n\t\t\tskuska3Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"3s\";\n\t\t\t\t\tucivoText.setText(\"úroveň 3: Ľubovoľné súzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Skúška\");\n\t\t\t\t\tsuzvukText.setText(\"súzvuk 1/10\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t// r = 2;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(\n\t\t\t\t\t\t\t\trand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(\n\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(\n\t\t\t\t\t\t\t\trand.nextInt(49) + 36, p[0], p[1],\n\t\t\t\t\t\t\t\tp[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\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\treturn skuska3Button;\n\t}", "private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}", "public static void OptionsComponents() {\n\t\tInterface.controls.setPreferredSize(Interface.dim);\n\t\tInterface.controls.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.controls.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.controls.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.controls.setForeground(Color.white);\n\t\t\n\t\tInterface.controls2.setPreferredSize(Interface.dim);\n\t\tInterface.controls2.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.controls2.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.controls2.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.controls2.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.sound.setPreferredSize(Interface.dim);\n\t\tInterface.sound.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.sound.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.sound.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.sound.setForeground(Color.white);\n\t\t\n\t\tInterface.soundOn.setPreferredSize(Interface.dim);\n\t\tInterface.soundOn.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.soundOn.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.soundOn.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.soundOn.setForeground(Color.white);\n\t\t\n\t\tInterface.soundOff.setPreferredSize(Interface.dim);\n\t\tInterface.soundOff.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.soundOff.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.soundOff.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.soundOff.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.backtomain.setPreferredSize(Interface.dim);\n\t\tInterface.backtomain.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtomain.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtomain.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtomain.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.save.setPreferredSize(Interface.dim);\n\t\tInterface.save.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.save.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.save.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.save.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.backtooptions.setPreferredSize(Interface.dim);\n\t\tInterface.backtooptions.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtooptions.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtooptions.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtooptions.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.player1.setForeground(Color.white);\n\t\tInterface.player2.setForeground(Color.white);\n\t\tInterface.up1.setForeground(Color.white);\n\t\tInterface.up2.setForeground(Color.white);\n\t\tInterface.down1.setForeground(Color.white);\n\t\tInterface.down2.setForeground(Color.white);\n\t\tInterface.right1.setForeground(Color.white);\n\t\tInterface.right2.setForeground(Color.white);\n\t\tInterface.left1.setForeground(Color.white);\n\t\tInterface.left2.setForeground(Color.white);\n\t\tInterface.bomb1.setForeground(Color.white);\n\t\tInterface.bomb2.setForeground(Color.white);\n\t\tInterface.boxNumber.setForeground(Color.white);\n\t\tInterface.getUp1.setEditable(false);\n\t\tInterface.getUp2.setEditable(false);\n\t\tInterface.getDown1.setEditable(false);\n\t\tInterface.getDown2.setEditable(false);\n\t\tInterface.getRight1.setEditable(false);\n\t\tInterface.getRight2.setEditable(false);\n\t\tInterface.getLeft1.setEditable(false);\n\t\tInterface.getLeft2.setEditable(false);\n\t\tInterface.getBomb1.setEditable(false);\n\t\tInterface.getBomb2.setEditable(false);\n\t}", "public void initializeButtons() {\n\n playGameButton = (Button) findViewById(R.id.playGameButton);\n freePlayButton = (Button) findViewById(R.id.freePlayButton);\n informationIcon = (ImageView) findViewById(R.id.informationAboutGame);\n }", "public void Themes21()\n {\n theme2= new Label(\"Theme\");\n theme2.setPrefWidth(150);\n theme2.setFont(new Font(13));\n theme2.setPrefHeight(40);\n theme2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n dikoma2 = new Label(\"Dikoma\");\n dikoma2.setFont(new Font(13));\n dikoma2.setPrefWidth(150);\n dikoma2.setPrefHeight(40);\n dikoma2.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n diagelo2 = new Label(\"Diagelo\");\n diagelo2.setFont(new Font(13));\n diagelo2.setPrefWidth(150);\n diagelo2.setPrefHeight(40);\n diagelo2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n abuse2 = new Label(\"Woman & children abuse\");\n abuse2.setPrefWidth(150);\n abuse2.setFont(new Font(13));\n abuse2.setPrefHeight(40);\n abuse2.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n trafficking2 = new Label(\"Human trafficking\");\n trafficking2.setFont(new Font(13));\n trafficking2.setPrefWidth(150);\n trafficking2.setPrefHeight(40);\n trafficking2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n languageGroup = new javax.swing.ButtonGroup();\n colorGroup = new javax.swing.ButtonGroup();\n pinkButton = new javax.swing.JRadioButton();\n grayButton = new javax.swing.JRadioButton();\n okButton = new javax.swing.JButton();\n languageLabel = new javax.swing.JLabel();\n engButton = new javax.swing.JRadioButton();\n indoButton = new javax.swing.JRadioButton();\n colorsLabel = new javax.swing.JLabel();\n backButton = new javax.swing.JButton();\n defaultButt = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setMaximumSize(new java.awt.Dimension(414, 150));\n setMinimumSize(new java.awt.Dimension(414, 150));\n setPreferredSize(new java.awt.Dimension(414, 150));\n setResizable(false);\n setSize(new java.awt.Dimension(414, 150));\n\n colorGroup.add(pinkButton);\n pinkButton.setText(\"Pink\");\n pinkButton.setPreferredSize(new java.awt.Dimension(60, 23));\n\n colorGroup.add(grayButton);\n grayButton.setText(\"Gray\");\n\n okButton.setText(\"Save\");\n okButton.setMaximumSize(new java.awt.Dimension(112, 29));\n okButton.setMinimumSize(new java.awt.Dimension(112, 29));\n okButton.setPreferredSize(new java.awt.Dimension(112, 29));\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n languageLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n languageLabel.setText(\"Language\");\n languageLabel.setToolTipText(\"\");\n languageLabel.setMaximumSize(new java.awt.Dimension(70, 15));\n languageLabel.setMinimumSize(new java.awt.Dimension(70, 15));\n languageLabel.setPreferredSize(new java.awt.Dimension(70, 15));\n\n languageGroup.add(engButton);\n engButton.setText(\"English\");\n engButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n engButtonActionPerformed(evt);\n }\n });\n\n languageGroup.add(indoButton);\n indoButton.setText(\"Indonesia\");\n indoButton.setAlignmentY(0.0F);\n indoButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n indoButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n indoButtonActionPerformed(evt);\n }\n });\n\n colorsLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n colorsLabel.setText(\"Color\");\n colorsLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n colorsLabel.setMaximumSize(new java.awt.Dimension(70, 15));\n colorsLabel.setMinimumSize(new java.awt.Dimension(70, 15));\n colorsLabel.setPreferredSize(new java.awt.Dimension(70, 15));\n\n backButton.setText(\"Main Menu\");\n backButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n backButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backButtonActionPerformed(evt);\n }\n });\n\n defaultButt.setText(\"Set Default\");\n defaultButt.setMaximumSize(new java.awt.Dimension(112, 29));\n defaultButt.setMinimumSize(new java.awt.Dimension(112, 29));\n defaultButt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n defaultButtActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(148, 148, 148)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(engButton, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pinkButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(grayButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(indoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(colorsLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(languageLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(backButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(defaultButt, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(14, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(languageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(engButton)\n .addComponent(indoButton))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(colorsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pinkButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(grayButton))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(backButton)\n .addComponent(defaultButt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(65, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void configureComponents() {\n save.setStyleName(ValoTheme.BUTTON_PRIMARY);\n save.setClickShortcut(ShortcutAction.KeyCode.ENTER);\n setVisible(false);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "private void initButtonIcons() {\n\t\t\n\t\tbuttons[0][0].setIcon(Icon.returnIcon(\"white_rook\"));\n\t\tbuttons[1][0].setIcon(Icon.returnIcon(\"white_knight\"));\n\t\tbuttons[2][0].setIcon(Icon.returnIcon(\"white_bishop\"));\n\t\tbuttons[3][0].setIcon(Icon.returnIcon(\"white_queen\"));\n\t\tbuttons[4][0].setIcon(Icon.returnIcon(\"white_king\"));\n\t\tbuttons[5][0].setIcon(Icon.returnIcon(\"white_bishop\"));\n\t\tbuttons[6][0].setIcon(Icon.returnIcon(\"white_knight\"));\n\t\tbuttons[7][0].setIcon(Icon.returnIcon(\"white_rook\"));\n\t\t\n\t\tfor (int x = 0; x <= 7; x++)\n\t\t\tfor (int y = 2; y < 6; y++)\n\t\t\t\tbuttons[x][y].setIcon(null);\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tbuttons[i][1].setIcon(Icon.returnIcon(\"white_pawn\"));\n\t\t\tbuttons[i][6].setIcon(Icon.returnIcon(\"black_pawn\"));\n\t\t}\n\t\t\n\t\tbuttons[0][7].setIcon(Icon.returnIcon(\"black_rook\"));\n\t\tbuttons[1][7].setIcon(Icon.returnIcon(\"black_knight\"));\n\t\tbuttons[2][7].setIcon(Icon.returnIcon(\"black_bishop\"));\n\t\tbuttons[3][7].setIcon(Icon.returnIcon(\"black_queen\"));\n\t\tbuttons[4][7].setIcon(Icon.returnIcon(\"black_king\"));\n\t\tbuttons[5][7].setIcon(Icon.returnIcon(\"black_bishop\"));\n\t\tbuttons[6][7].setIcon(Icon.returnIcon(\"black_knight\"));\n\t\tbuttons[7][7].setIcon(Icon.returnIcon(\"black_rook\"));\n\t}", "private void createButton(){\n addButton();\n addStartButton();\n }", "public void UpdateLang() {\n for (ParamButton selected : this.mBtnLang) {\n selected.setSelected(false);\n }\n int lang = FtSet.GetLangDef();\n if (lang < 0 || lang >= this.mBtnLang.length) {\n this.mBtnLang[0].setSelected(true);\n } else {\n this.mBtnLang[lang].setSelected(true);\n }\n }" ]
[ "0.7127082", "0.6809236", "0.6636714", "0.6547147", "0.65340114", "0.6533947", "0.6454493", "0.6412833", "0.64065814", "0.63081443", "0.6305244", "0.6280925", "0.6278932", "0.62766224", "0.6276056", "0.62747", "0.6269717", "0.6227492", "0.62160325", "0.6209564", "0.6195049", "0.6120944", "0.6115417", "0.611048", "0.6094565", "0.60703766", "0.6064874", "0.60613316", "0.6058298", "0.6045942", "0.60284126", "0.60214084", "0.6011084", "0.60083234", "0.60076004", "0.59913194", "0.59873813", "0.5962462", "0.5906614", "0.5903761", "0.59034956", "0.588839", "0.5871605", "0.5857864", "0.5848989", "0.58464646", "0.5829461", "0.58196104", "0.58189785", "0.5809475", "0.5781001", "0.57764", "0.57689965", "0.5763518", "0.576018", "0.5759264", "0.57532924", "0.57402563", "0.5723619", "0.57208604", "0.57144386", "0.5708688", "0.570841", "0.57040644", "0.5703419", "0.57025284", "0.5698648", "0.5698235", "0.5695899", "0.5694152", "0.56889164", "0.5683837", "0.5674432", "0.5670459", "0.56691056", "0.5658671", "0.56518084", "0.56514716", "0.5644963", "0.56423736", "0.56374234", "0.5637411", "0.56276256", "0.5626223", "0.56248426", "0.5622192", "0.56206447", "0.56201327", "0.5615546", "0.5612485", "0.56111956", "0.5607701", "0.56030923", "0.5599882", "0.55887336", "0.55848014", "0.5580284", "0.5579801", "0.55788857", "0.5576717" ]
0.67839336
2
This method is called whenever the actor is clicked. We override its behavior here.
@Override public void changed(ChangeEvent event, Actor actor) { game.setScreen(gameScreen); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void clicked(InputEvent e, float x, float y) {\n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\n\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t\t\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\r\n \r\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n \n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent event) {\n\n\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}" ]
[ "0.7696312", "0.7491921", "0.74882025", "0.7486997", "0.74793345", "0.74793345", "0.74793345", "0.7479283", "0.74791086", "0.74791086", "0.74791086", "0.7463329", "0.7463329", "0.7451242", "0.7450544", "0.74392396", "0.74392396", "0.74392396", "0.74392396", "0.74392396", "0.74392396", "0.74392396", "0.7434881", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7423378", "0.7415976", "0.7415976", "0.7377591", "0.7373981", "0.736763", "0.7351891", "0.73383796", "0.73383516", "0.73346686", "0.73346686", "0.73346686", "0.7329449", "0.73280483", "0.73280483", "0.7324675", "0.7324675", "0.7324675", "0.7324675", "0.7324675", "0.7324675", "0.7324675", "0.7324675", "0.73021126", "0.72932565", "0.72924674", "0.72882825", "0.72801197", "0.72801197", "0.72801197", "0.72801197", "0.72801197", "0.72801197", "0.72801197", "0.72801197", "0.72801197", "0.7279004", "0.72718495", "0.72698355", "0.7253113", "0.7252402", "0.7252402", "0.7252402", "0.724083", "0.7237094", "0.7237094", "0.723641", "0.7235807", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.72292525", "0.7218761", "0.72119194", "0.7202162", "0.71958137", "0.7194127", "0.7194127" ]
0.0
-1
This method is called whenever the actor is clicked. We override its behavior here.
@Override public void changed(ChangeEvent event, Actor actor) { game.setScreen(new OptionsScreen(game)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void clicked(InputEvent e, float x, float y) {\n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\n\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t\t\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\r\n \r\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n \n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent event) {\n\n\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}" ]
[ "0.7696756", "0.7493547", "0.7489404", "0.7488501", "0.7480897", "0.7480897", "0.7480897", "0.74807304", "0.74803346", "0.74803346", "0.74803346", "0.7464473", "0.7464473", "0.7452655", "0.7451625", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.74365646", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74174863", "0.74174863", "0.7377982", "0.73749965", "0.73691106", "0.73533237", "0.7339645", "0.73395747", "0.7335896", "0.7335896", "0.7335896", "0.73307145", "0.73289526", "0.73289526", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73037726", "0.72945637", "0.7293556", "0.72894627", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7280233", "0.72729903", "0.7270895", "0.7254504", "0.72536284", "0.72536284", "0.72536284", "0.72423476", "0.72381246", "0.72381246", "0.7237853", "0.72371846", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.7219733", "0.7213021", "0.7203461", "0.7196913", "0.7195084", "0.7195084" ]
0.0
-1
This method is called whenever the actor is clicked. We override its behavior here.
@Override public void changed(ChangeEvent event, Actor actor) { game.setScreen(new CreditsScreen(game)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void clicked(InputEvent e, float x, float y) {\n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\n\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t\t\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\r\n \r\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n \n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent event) {\n\n\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}" ]
[ "0.7696756", "0.7493547", "0.7489404", "0.7488501", "0.7480897", "0.7480897", "0.7480897", "0.74807304", "0.74803346", "0.74803346", "0.74803346", "0.7464473", "0.7464473", "0.7452655", "0.7451625", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.7440261", "0.74365646", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74248284", "0.74174863", "0.74174863", "0.7377982", "0.73749965", "0.73691106", "0.73533237", "0.7339645", "0.73395747", "0.7335896", "0.7335896", "0.7335896", "0.73307145", "0.73289526", "0.73289526", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73260295", "0.73037726", "0.72945637", "0.7293556", "0.72894627", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7281046", "0.7280233", "0.72729903", "0.7270895", "0.7254504", "0.72536284", "0.72536284", "0.72536284", "0.72423476", "0.72381246", "0.72381246", "0.7237853", "0.72371846", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.72305924", "0.7219733", "0.7213021", "0.7203461", "0.7196913", "0.7195084", "0.7195084" ]
0.0
-1
Created by yangchangpei on 17/8/17.
public interface TokenGenerator { String generate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n\n }", "@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 inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void interr() {\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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\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 void init() {\n }", "@Override\n public void init() {\n }", "public void mo4359a() {\n }", "private void kk12() {\n\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}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\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 }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "public void gored() {\n\t\t\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 protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public void init() {}", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@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 }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo55254a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public int describeContents() { return 0; }", "private void m50366E() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}" ]
[ "0.6046005", "0.59302473", "0.58801484", "0.5856419", "0.58373004", "0.58373004", "0.58288395", "0.5782431", "0.57558334", "0.5754118", "0.57401794", "0.5713094", "0.5696978", "0.56696063", "0.5663715", "0.5654007", "0.56471103", "0.5640112", "0.5640112", "0.5640112", "0.5640112", "0.5640112", "0.5637199", "0.5631086", "0.56300485", "0.56286174", "0.56164634", "0.56130624", "0.5612708", "0.56038487", "0.5584156", "0.5579894", "0.5574837", "0.5572984", "0.5562154", "0.5546174", "0.5546174", "0.5546174", "0.55422235", "0.55422235", "0.55422235", "0.5540943", "0.55394053", "0.5535971", "0.551988", "0.5512661", "0.5512661", "0.5512661", "0.5507669", "0.54975045", "0.54975045", "0.54870045", "0.54870045", "0.54870045", "0.54870045", "0.54870045", "0.54870045", "0.54870045", "0.5483782", "0.5472774", "0.54719067", "0.5467001", "0.54644", "0.5458487", "0.54574823", "0.5455002", "0.5455002", "0.545174", "0.54461867", "0.5440213", "0.5440213", "0.54397935", "0.5439233", "0.54391426", "0.54289526", "0.5407701", "0.5402692", "0.5402503", "0.5398777", "0.5398777", "0.5398777", "0.5398777", "0.5398777", "0.5398777", "0.539673", "0.53894764", "0.5385425", "0.5375292", "0.5375", "0.5374501", "0.53639024", "0.5362183", "0.5360265", "0.53529173", "0.5352188", "0.53477013", "0.53229594", "0.5321547", "0.53214675", "0.5311998", "0.5302855" ]
0.0
-1
TODO Autogenerated method stub
@Override public UserGuidePic getNextUserGuide(Integer sort) { return null; }
{ "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
Returns the "from" document type. This is the type of the reference origin documents.
public int getFromDocType () { return this.fromDocType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFromDocType (int fromDocType)\n {\n this.fromDocType = fromDocType;\n }", "public Report.LocationOuterClass.Location.FromType getFrom() {\n Report.LocationOuterClass.Location.FromType result = Report.LocationOuterClass.Location.FromType.valueOf(from_);\n return result == null ? Report.LocationOuterClass.Location.FromType.UNRECOGNIZED : result;\n }", "public Report.LocationOuterClass.Location.FromType getFrom() {\n Report.LocationOuterClass.Location.FromType result = Report.LocationOuterClass.Location.FromType.valueOf(from_);\n return result == null ? Report.LocationOuterClass.Location.FromType.UNRECOGNIZED : result;\n }", "public int getToDocType ()\n {\n return this.toDocType;\n }", "public String getFrom() {\n\n\t\treturn from;\n\n\t}", "public String getFrom() {\n\t\treturn from;\n\t}", "public String getFrom() {\r\n\t\treturn from;\r\n\t}", "public String getFrom() {\n return from;\n }", "public String getFrom() {\n return from;\n }", "public String getFrom() {\n return from;\n }", "public String getFrom(){\r\n\t\treturn from;\r\n\t}", "public long getFrom() {\n return from_;\n }", "public long getFrom() {\n return from_;\n }", "public String getFrom()\r\n {\r\n return from;\r\n }", "public int getFrom() {\n return from_;\n }", "Report.LocationOuterClass.Location.FromType getFrom();", "public int getFrom() {\n return from_;\n }", "public V getFrom()\n\t{\n\t\treturn from;\n\t}", "public String getFrom() {\n Object ref = from_;\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 from_ = s;\n return s;\n }\n }", "public String getFrom() {\n Object ref = from_;\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 from_ = s;\n return s;\n }\n }", "public String getDocumentType();", "public String getFrom() {\n Object ref = from_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n from_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getFrom() {\n Object ref = from_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n from_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public Node getFrom() {\n return from;\n }", "@Override\r\n public Class<Doc> getEntityType() {\n return Doc.class;\r\n }", "public int getFrom() {\n return from;\n }", "public int getFrom() {\n return (from);\n }", "@JsonProperty(\"from\")\n public String getFrom() {\n return from;\n }", "public Integer getFrom() {\n return from;\n }", "public String getDocumentType() {\n return this.documentType;\n }", "public DocumentType getDocumentType() {\n return documentType;\n }", "public String getDocumentTypeName() {\n return docTypeName;\n }", "public String getDocumentType() {\n return documentType;\n }", "public java.lang.String getDocumentType() {\n return documentType;\n }", "public MailboxList getFrom() {\n return getMailboxList(FieldName.FROM);\n }", "public java.lang.String getDocumentType() {\n return documentType;\n }", "public FromHeader getFrom() {\n return (FromHeader) fromHeader;\n }", "public String getOriginType() {\n return this.originType;\n }", "public int from() {\n return this.from;\n }", "public Builder setFrom(Report.LocationOuterClass.Location.FromType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n from_ = value.getNumber();\n onChanged();\n return this;\n }", "@JsonGetter(\"from\")\r\n public String getFrom() {\r\n return from;\r\n }", "public String getLBR_MDFeDocType();", "Object getFrom();", "public RefLimit getStartFrom() {\n\t\t\treturn startFrom;\n\t\t}", "public Integer getFromId() {\n return fromId;\n }", "public int from() {\n return from;\n }", "public void setFrom(String from) {\n this.from = from;\n }", "public int getC_DocTypeTarget_ID();", "public void setFrom(String from) {\r\n\t\tthis.from= from;\r\n\t}", "public RefLimit getStartFrom() {\n\t\treturn startFrom;\n\t}", "Type getSource();", "Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType();", "public String getSourceType() {\n return sourceType;\n }", "public void setDocumentType(String documentType);", "public Vertex<VV> getFrom()\r\n { return from; }", "public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType() {\n return documentType_;\n }", "public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType() {\n return documentType_;\n }", "protected Date getFromDate() {\n\t\treturn from;\n\t}", "public String getFromTag() {\n return fromHeader == null? null: fromHeader.getTag();\n }", "PSObject getTypeReference();", "public L getDocumentLocation();", "public void setFrom(Collection<Mailbox> from) {\n setMailboxList(FieldName.FROM, from);\n }", "public RefDocTypePair (int fromDocType, int toDocType)\n {\n this.fromDocType = fromDocType;\n this.toDocType = toDocType;\n }", "public Vertex getFrom() {\r\n\r\n return from;\r\n }", "public String getFromIndexName() {\n return fromIndexName;\n }", "public XPath getFrom()\n {\n return m_fromMatchPattern;\n }", "String getFrom();", "String getFrom();", "String getFrom();", "String getFrom();", "public String getFromJID() {\n\t\treturn fromJID;\n\t}", "@Override\n\tpublic VType getSource() {\n\t\t// TODO: Add your code here\n\t\treturn super.from;\n\t}", "public void setDocumentType (String DocumentType);", "public Node getCameFrom()\n\t{\n\t\treturn cameFrom;\n\t}", "@JsonProperty(\"from\")\n public void setFrom(String from) {\n this.from = from;\n }", "public TableReference getFromTable() {\r\n return fromTable;\r\n }", "public final void mT__15() throws RecognitionException {\n try {\n int _type = T__15;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:13:7: ( 'from' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:13:9: 'from'\n {\n match(\"from\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public SchemaDef getSourceSchema();", "public String getSourceType() {\n return this.sourceType;\n }", "public Date getFromDate() {\n\t\treturn fromDate;\n\t}", "public String getFromUser(){\r\n\t\treturn fromUser;\r\n\t}", "public Type type() {\n if (local() != null && local().squawkIndex() != -1) {\n return local().type();\n }\n else {\n return super.type();\n }\n }", "public DocumentType getDocumentType(long documentTypeId) throws ContestManagementException {\n return null;\r\n }", "public DocumentType getDocumentType(long documentTypeId) throws ContestManagementException {\n return null;\r\n }", "public void set_from(String from2) {\n\t\tthis.from=from2;\n\t}", "public void setFrom(Mailbox from) {\n setMailboxList(FieldName.FROM, from);\n }", "public Block getFrom() {\n\t\t\treturn Block.getBlockById(fromId);\n\t\t}", "public java.lang.String getFromDate() {\n java.lang.Object ref = fromDate_;\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 fromDate_ = s;\n return s;\n }\n }", "public Square getFrom() {\n return from;\n }", "public FromClause createFromClause()\n {\n return null;\n }", "@AutoEscape\n\tpublic String getDocumentType();", "public String getDerivedFrom()\n {\n return derivedFrom;\n }", "public int getC_DocTypeTarget_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_DocTypeTarget_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Type getType() {\n return referentType;\n }", "public List<BuyerDocumentTypeVO> retrieveDocTypesByBuyerId(Integer entityId,Integer source)throws DataServiceException {\r\n\t\treturn null;\r\n\t}", "public String toString ()\n {\n return \"RefDocTypePair(\" + this.fromDocType + \",\" + this.toDocType + \")\";\n }", "public JID getFromJID() {\n return fromJID;\n }", "public final void mT__85() throws RecognitionException {\n try {\n int _type = T__85;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalIotLuaXtext.g:85:7: ( 'from' )\n // InternalIotLuaXtext.g:85:9: 'from'\n {\n match(\"from\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public String getType(){\n\t\tif(source==null){\n\t\t\t//it's a domain predicate\n\t\t\treturn \"domain_predicate\";\n\t\t}\n\t\treturn source.getType();\n\t}" ]
[ "0.7226429", "0.6966787", "0.6947135", "0.6157876", "0.6144275", "0.60664624", "0.6052351", "0.6006924", "0.6000508", "0.59970534", "0.5979585", "0.5891465", "0.58766216", "0.58456945", "0.5779711", "0.5748308", "0.57248145", "0.57097113", "0.5685217", "0.5668222", "0.56387055", "0.56348413", "0.56348413", "0.56264985", "0.56133336", "0.5573229", "0.54225403", "0.5409667", "0.53937757", "0.5388082", "0.5388045", "0.5372424", "0.53695863", "0.5365894", "0.53552485", "0.53403014", "0.53384566", "0.533541", "0.53046346", "0.52751523", "0.5215919", "0.51897585", "0.51589644", "0.5120983", "0.5109031", "0.5092557", "0.5081999", "0.50794965", "0.5076251", "0.50684184", "0.50649273", "0.5061509", "0.50026476", "0.4922647", "0.49104422", "0.49029958", "0.48873657", "0.4867503", "0.48640904", "0.48606598", "0.48594615", "0.48547995", "0.48535734", "0.48527586", "0.48367453", "0.48219025", "0.4815326", "0.4815326", "0.4815326", "0.4815326", "0.4808126", "0.47832304", "0.47769383", "0.4770457", "0.4767616", "0.47595486", "0.4748335", "0.473764", "0.47255915", "0.47187063", "0.47108215", "0.4701057", "0.4696001", "0.4696001", "0.46872577", "0.46761766", "0.46636245", "0.4648785", "0.46456045", "0.46426615", "0.46334675", "0.46227112", "0.46153113", "0.4602963", "0.4598966", "0.45980805", "0.45961103", "0.4591462", "0.45828184" ]
0.7364767
1
Returns the "to" document type. This is the type of the reference target documents.
public int getToDocType () { return this.toDocType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDocumentType();", "public int getFromDocType ()\n {\n return this.fromDocType;\n }", "public int getFromDocType ()\n {\n return this.fromDocType;\n }", "public int getC_DocTypeTarget_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_DocTypeTarget_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getC_DocTypeTarget_ID();", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public DocumentType getDocumentType() {\n return documentType;\n }", "public java.lang.String getDocumentType() {\n return documentType;\n }", "public java.lang.String getDocumentType() {\n return documentType;\n }", "public RuleTargetType getTargetType() {\n\t\treturn targetType;\n\t}", "public String getDocumentType() {\n return this.documentType;\n }", "public String getDocumentType() {\n return documentType;\n }", "@Override\r\n public Class<Doc> getEntityType() {\n return Doc.class;\r\n }", "public String getTargetType() {\n return this.targetType;\n }", "public String getToRefid() {\n return targetid;\n }", "public String getTo() {\n Object ref = to_;\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 to_ = s;\n return s;\n }\n }", "public String getTo() {\n Object ref = to_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n to_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getDocumentTypeName() {\n return docTypeName;\n }", "public int getTargetType() {\n return targetType;\n }", "Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType();", "@Override\n\tpublic VType getTarget() {\n\t\t// TODO: Add your code here\n\t\treturn super.to;\n\t}", "com.nhcsys.webservices.getmessages.getmessagestypes.v1.MessageDestinationType getTo();", "public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType() {\n return documentType_;\n }", "public String toString ()\n {\n return \"RefDocTypePair(\" + this.fromDocType + \",\" + this.toDocType + \")\";\n }", "public Node getTo() {\n return to;\n }", "public Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedDocumentType getDocumentType() {\n return documentType_;\n }", "@AutoEscape\n\tpublic String getDocumentType();", "public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID);", "public String getTargetTypeAsString() {\n\t\tString type = null;\n\t\t\n\t\tswitch (targetType) {\n\t\tcase PROCEDURE:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tcase POLICY:\n\t\t\ttype = \"policy\";\n\t\t\tbreak;\n\t\tcase PROCESS:\n\t\t\ttype = \"process\";\n\t\t\tbreak;\n\t\tcase EXTERNAL:\n\t\t\ttype = \"external\";\n\t\t\tbreak;\n\t\tcase NOT_SET:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\t}\n\t\treturn type;\n\t}", "PSObject getTypeReference();", "public String getTo() {\n return to;\n }", "public RefDocTypePair (int fromDocType, int toDocType)\n {\n this.fromDocType = fromDocType;\n this.toDocType = toDocType;\n }", "public String getTo()\r\n {\r\n return to;\r\n }", "public String getRefType() {\n return refType;\n }", "public V getTo()\n\t{\n\t\treturn to;\n\t}", "public void setDocumentType(String documentType);", "@Override\r\n\tpublic PhraseType getType()\r\n\t{\r\n\t\t/* if the Property is just a reference,\r\n\t\t * return the type of the referent */\r\n\t\tif (referent != null) return referent.getType();\r\n\t\t\r\n\t\t/* otherwise, return PROPERTY */\r\n\t\treturn PhraseType.PROPERTY;\r\n\t}", "public java.lang.String getToId() {\n return toId;\n }", "public CreateDocumentRequest withTargetType(String targetType) {\n setTargetType(targetType);\n return this;\n }", "public Type toType() {\n return type;\n }", "public String getType() {\n return relationshipName;\n }", "public final Class<?> getTargetType(){\n return this.targetType;\n }", "public void setDocumentType (String DocumentType);", "public String getType(){\n\t\tif(source==null){\n\t\t\t//it's a domain predicate\n\t\t\treturn \"domain_predicate\";\n\t\t}\n\t\treturn source.getType();\n\t}", "public final void mT__17() throws RecognitionException {\n try {\n int _type = T__17;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalReqLNG.g:16:7: ( 'to' )\n // InternalReqLNG.g:16:9: 'to'\n {\n match(\"to\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public Class<T> getTargetType() {\n return this.targetType;\n }", "public long getTo() {\n return to_;\n }", "TAbstractType getTarget();", "public DocumentTypeDTO getSelectedDocument() {\n\t\treturn selectedDocument;\n\t}", "public long getTo() {\n return to_;\n }", "private int determineDocType(DocumentAccessBean argDocument) {\n\n\tint docType = DOCTYPES.NO_PROCESSING;\n\t\n\tif (argDocument != null) {\n\t\ttry {\n\t\t\tif (argDocument.getEJBRef() instanceof I13nAct)\n\t\t\t\tdocType = DOCTYPES.I13NACT;\n\t\t\telse if (argDocument.getEJBRef() instanceof ChangeAct)\n\t\t\t\tdocType = DOCTYPES.CHANGEACT;\n\t\t\telse if (argDocument.getEJBRef() instanceof InwayBill)\n\t\t\t\tdocType = DOCTYPES.EXT_IN;\n\t\t\telse if (argDocument.getEJBRef() instanceof OutWayBill)\n\t\t\t\tdocType = DOCTYPES.EXT_OUT;\n\t\t\telse if (argDocument.getEJBRef() instanceof InternalWayBill)\n\t\t\t\tdocType = DOCTYPES.INT_IN;\n\t\t\telse if (argDocument.getEJBRef() instanceof PayOffAct)\n\t\t\t\tdocType = DOCTYPES.PAYOFF;\n\t\t\telse if (argDocument.getEJBRef() instanceof SurplusAct)\n\t\t\t\tdocType = DOCTYPES.SURPLUS;\n\t\t\telse if (argDocument.getEJBRef() instanceof AssemblingAct) {\n\t\t\t\tAssemblingActAccessBean aact = new AssemblingActAccessBean(argDocument.getEJBRef());\n\t\t\t\tif (\"A\".equals(aact.getOperationType()))\n\t\t\t\t\tdocType = DOCTYPES.BLOK_IN;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"PLATINUM-SYNC: cannot determine document type\");\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t}\n\t\n\tlogIt(\"Determine document type, type=\" + docType);\n\treturn docType;\n}", "public BsonType getType() {\n return type;\n }", "public DNode getTo() { return targetnode; }", "public AddressList getTo() {\n return getAddressList(FieldName.TO);\n }", "public com.alcatel_lucent.www.wsp.ns._2008._03._26.ics.phonesetstaticstate.AlcForwardTargetType getTargetType() {\r\n return targetType;\r\n }", "public TypeLiteral<T> getTargetType(){\n return targetType;\n }", "public Integer getToId() {\n return toId;\n }", "public String getDocType() {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_docType == null)\n jcasType.jcas.throwFeatMissing(\"docType\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_docType);}", "public final void mT__18() throws RecognitionException {\n try {\n int _type = T__18;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:16:7: ( 'to' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:16:9: 'to'\n {\n match(\"to\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setFromDocType (int fromDocType)\n {\n this.fromDocType = fromDocType;\n }", "public int getIdTo() {\n return idTo;\n }", "TypeDec getTarget();", "public static RelatesToType getRelatesTo(String uri) {\n RelatesToType relatesTo =\n WSA_OBJECT_FACTORY.createRelatesToType();\n relatesTo.setValue(uri);\n return relatesTo;\n }", "final Class<T> targetType() {\n return this.targetType;\n }", "public int getTo() {\n return to_;\n }", "@ApiModelProperty(value = \"class type of target specification\")\n\n\n public String getType() {\n return type;\n }", "TypeReference getTypeReference();", "@JsonProperty(\"to\")\n public String getTo() {\n return to;\n }", "public Class<?> getTargetType()\n/* */ {\n/* 266 */ if (this.resolvedTargetType != null) {\n/* 267 */ return this.resolvedTargetType;\n/* */ }\n/* 269 */ return this.targetType != null ? this.targetType.resolve() : null;\n/* */ }", "public ModelObjectType getType() {\n return type;\n }", "public int getTo() {\n return to_;\n }", "public JTextField getTo() {\n\t\treturn to;\n\t}", "Ontology getTargetOntology();", "String getDest_typ();", "public String getLBR_MDFeDocType();", "public mx.com.actinver.negocio.bursanet.practicasventa.ws.carterasModelo.TipoOperacionTO getTipoOperacionTO() {\n return tipoOperacionTO;\n }", "public final void mT__16() throws RecognitionException {\n try {\n int _type = T__16;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalReqLNG.g:15:7: ( 'To' )\n // InternalReqLNG.g:15:9: 'To'\n {\n match(\"To\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "void setTo(\n com.nhcsys.webservices.getmessages.getmessagestypes.v1.MessageDestinationType to);", "public Vertex<VV> getTo()\r\n { return to; }", "public String getOntologyType(){\r\n\t\treturn null;\r\n\t}", "public ITransferObject getTo() {\r\n return getController().getTo();\r\n }", "@Override\n public long getSupportedEventTypes() {\n return EventType.GO_TO;\n }", "public int to() {\n return this.to;\n }", "@Override\n\tprotected UserTO getTo() {\n\t\treturn userTO;\n\t}", "public ClassReferenceMirror getType() {\n\t\treturn type;\n\t}", "public Type getType() {\n return referentType;\n }", "@Override\n public Class<TmRelationshipRecord> getRecordType() {\n return TmRelationshipRecord.class;\n }", "public ReferenceType getTargetElement();", "public int getToRequest() {\n return this.toRequest;\n }", "public int getC_DocType_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_DocType_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public static com.fasterxml.jackson.core.type.TypeReference<ReviewCreatedMessagePayload> typeReference() {\n return new com.fasterxml.jackson.core.type.TypeReference<ReviewCreatedMessagePayload>() {\n @Override\n public String toString() {\n return \"TypeReference<ReviewCreatedMessagePayload>\";\n }\n };\n }", "public Vertex getTo() {\r\n\r\n return to;\r\n }", "public OutMessage locationTypeMsg(InMessage msg) {\n\t\treturn null;\n\t}", "String getTo();", "public FeedType getType();", "public void setTo(String to) {\n this.to = to;\n }", "public String getType();" ]
[ "0.60489", "0.60124147", "0.60124147", "0.5935581", "0.5912342", "0.5907163", "0.5907163", "0.5907163", "0.5907163", "0.5890251", "0.58883524", "0.58706695", "0.5863439", "0.5851106", "0.583855", "0.5831635", "0.57371974", "0.5626494", "0.5615692", "0.5597899", "0.55912316", "0.55783355", "0.55502963", "0.55444366", "0.547703", "0.5469097", "0.54633904", "0.5456834", "0.5451555", "0.53650016", "0.5349171", "0.5333588", "0.53130275", "0.5293653", "0.52785265", "0.52725893", "0.5264606", "0.5225127", "0.5224245", "0.5221003", "0.52202344", "0.52142155", "0.5200433", "0.5184122", "0.51464164", "0.51283145", "0.51271516", "0.5112733", "0.5108717", "0.50666726", "0.50653744", "0.50588566", "0.5053228", "0.5051479", "0.5049041", "0.50421596", "0.5035043", "0.50348467", "0.5030203", "0.5019928", "0.49784043", "0.49655417", "0.49474624", "0.494349", "0.49353206", "0.493389", "0.4927949", "0.49268624", "0.49116784", "0.49088266", "0.4903983", "0.49030793", "0.4880976", "0.4879044", "0.4877476", "0.48741502", "0.48704427", "0.48691618", "0.48681027", "0.48671335", "0.48487854", "0.48449588", "0.48348328", "0.4833745", "0.48302087", "0.48240873", "0.48229727", "0.48214173", "0.48202467", "0.47934362", "0.47893253", "0.47881088", "0.47866476", "0.4779072", "0.4777858", "0.47773993", "0.47737914", "0.47662058", "0.47648537", "0.47603008" ]
0.78365195
0
Returns true if the specified object is a RefDocTypePair with the same "from" resp. "to" document types as this one.
public boolean equals (Object object) { return ( object instanceof RefDocTypePair && ((RefDocTypePair)object).getFromDocType() == this.fromDocType && ((RefDocTypePair)object).getToDocType() == this.toDocType ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean equals(Object obj) {\r\n\r\n if (obj instanceof DocumentPair) {\r\n DocumentPair other = (DocumentPair) obj;\r\n return ((this.doc1.equals(other.doc1) && this.doc2.equals(other.doc2))\r\n || (this.doc1.equals(other.doc2) && (this.doc2.equals(other.doc1))));\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "public RefDocTypePair (int fromDocType, int toDocType)\n {\n this.fromDocType = fromDocType;\n this.toDocType = toDocType;\n }", "public String toString ()\n {\n return \"RefDocTypePair(\" + this.fromDocType + \",\" + this.toDocType + \")\";\n }", "public boolean compareEqual(org.vcell.util.Matchable obj) {\r\n\tif (obj instanceof ReferenceDataMappingSpec){\r\n\t\tReferenceDataMappingSpec rdms = (ReferenceDataMappingSpec)obj;\r\n\r\n\t\tif (!org.vcell.util.Compare.isEqual(referenceDataColumnName,rdms.referenceDataColumnName)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ((fieldModelObject == null && rdms.fieldModelObject != null) ||\r\n\t\t\t(fieldModelObject != null && rdms.fieldModelObject == null)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// if both are null, everything is ok\r\n\t\t// if both are non-null, then check for equivalence.\r\n\t\t//\r\n\t\tif (fieldModelObject != null && rdms.fieldModelObject != null){\r\n\t\t\tif (fieldModelObject instanceof org.vcell.util.Matchable){\r\n\t\t\t\tif (rdms.fieldModelObject instanceof org.vcell.util.Matchable){\r\n\t\t\t\t\tif (!org.vcell.util.Compare.isEqualOrNull((org.vcell.util.Matchable)this.fieldModelObject,(org.vcell.util.Matchable)rdms.fieldModelObject)){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//\r\n\t\t\t\t// else compare symbol type, name, and nameScope name\r\n\t\t\t\t//\t\t\t\t\r\n\t\t\t\tif (!fieldModelObject.getClass().equals(rdms.fieldModelObject.getClass())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!fieldModelObject.getName().equals(rdms.fieldModelObject.getName())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!fieldModelObject.getNameScope().getName().equals(rdms.fieldModelObject.getNameScope().getName())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "@Override\n\tpublic boolean equals(Object o) {\n\t\tif (this == o) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Return false if the other object has the wrong type.\n\t\t// This type may be an interface depending on the interface's\n\t\t// specification.\n\t\tif (!(o instanceof NewDoc)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Cast to the appropriate type.\n\t\t// This will succeed because of the instanceof, and lets us access\n\t\t// private fields.\n\t\tNewDoc lhs = (NewDoc) o;\n\n\t\t// Check each field. Primitive fields, reference fields, and nullable\n\t\t// reference\n\t\t// fields are all treated differently.\n\t\treturn id.equals(lhs.getId());\n\t}", "public boolean typeConformsTo(PBmmSchema schema, String type1, String type2) {\n List<String> typeList1, typeList2;\n typeList1 = BmmDefinitions.typeNameAsFlatList(type1);\n typeList2 = BmmDefinitions.typeNameAsFlatList(type2);\n int index = 0;\n\n while (index < typeList1.size() && index < typeList2.size() &&\n schema.hasClassOrPrimitiveDefinition(typeList1.get(index)) &&\n schema.hasClassOrPrimitiveDefinition(typeList2.get(index))) {\n String typePart1 = typeList1.get(index);\n String typePart2 = typeList2.get(index);\n if (!(type1.equalsIgnoreCase(typePart2) || isAncestor(schema, typePart1, typePart2))) {\n return false;\n }\n index++;\n\n }\n return true;\n }", "boolean classifyAsRefType(String name, TypeImpl superType) {\n switch (name) {\n case CAS.TYPE_NAME_BOOLEAN:\n case CAS.TYPE_NAME_BYTE:\n case CAS.TYPE_NAME_SHORT:\n case CAS.TYPE_NAME_INTEGER:\n case CAS.TYPE_NAME_LONG:\n case CAS.TYPE_NAME_FLOAT:\n case CAS.TYPE_NAME_DOUBLE:\n case CAS.TYPE_NAME_STRING:\n // case CAS.TYPE_NAME_JAVA_OBJECT:\n // case CAS.TYPE_NAME_MAP:\n // case CAS.TYPE_NAME_LIST:\n return false;\n }\n // superType is null for TOP, which is a Ref type\n if (superType != null && superType.getName().equals(CAS.TYPE_NAME_STRING)) { // can't compare to\n // stringType - may\n // not be set yet\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof DocumentType)) {\n return false;\n }\n DocumentType other = (DocumentType) object;\n if ((this.documentTypeId == null && other.documentTypeId != null) || (this.documentTypeId != null && !this.documentTypeId.equals(other.documentTypeId))) {\n return false;\n }\n return true;\n }", "private boolean relationshipDefsMatch(AtlasTypesDef typesDef) {\n return compareLists(this.getRelationshipDefs(), typesDef.getRelationshipDefs());\n }", "boolean isDocument(Object object);", "public boolean equals(Document other){\n boolean something = true;\r\n\r\n if(other == null){ //make sure that the object we are comparing to isn't null\r\n something = false;\r\n }\r\n if(this.getClass() != other.getClass()){ //makes sure the object are of the same class\r\n something = false;\r\n }\r\n if(!this.name.equalsIgnoreCase(other.name) || other.name == null){ //compares if the documents have the same name ignoring uppercase\r\n something = false;\r\n }\r\n if(!this.owner.equalsIgnoreCase(other.owner) || other.owner == null){ //comapre if both documents have the same owner ignoring uppercase\r\n something = false;\r\n }\r\n if(!this.id.equals(other.id) || other.id == null){ //compare if both documents have the same id\r\n something = false;\r\n }\r\n return something; //if something return true, then both documents are the same otherwise they are different\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof DocumentBean)) {\n return false;\n }\n DocumentBean other = (DocumentBean) object;\n if ((this.documentid == null && other.documentid != null) || (this.documentid != null && !this.documentid.equals(other.documentid))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object objectToCompare)\n {\n if (this == objectToCompare)\n {\n return true;\n }\n if (objectToCompare == null || getClass() != objectToCompare.getClass())\n {\n return false;\n }\n TypeDefProperties that = (TypeDefProperties) objectToCompare;\n return Objects.equals(typeDefProperties, that.typeDefProperties);\n }", "public boolean isReference() {\n AnnotatedBase comp = m_item.getSchemaComponent();\n return comp instanceof IReference && ((IReference)comp).getRef() != null;\n }", "public boolean equals(Object paramObject) {\n/* 124 */ if (paramObject != null && paramObject instanceof BinaryRefAddr) {\n/* 125 */ BinaryRefAddr binaryRefAddr = (BinaryRefAddr)paramObject;\n/* 126 */ if (this.addrType.compareTo(binaryRefAddr.addrType) == 0) {\n/* 127 */ if (this.buf == null && binaryRefAddr.buf == null)\n/* 128 */ return true; \n/* 129 */ if (this.buf == null || binaryRefAddr.buf == null || this.buf.length != binaryRefAddr.buf.length)\n/* */ {\n/* 131 */ return false; } \n/* 132 */ for (byte b = 0; b < this.buf.length; b++) {\n/* 133 */ if (this.buf[b] != binaryRefAddr.buf[b])\n/* 134 */ return false; \n/* 135 */ } return true;\n/* */ } \n/* */ } \n/* 138 */ return false;\n/* */ }", "public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}", "boolean _is_equivalent(org.omg.CORBA.Object other);", "private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }", "private final boolean isObjectAccessible(Class from, Object to, int type) {\n if (to == null) {\n return false;\n }\n\n return isObjectAccessible(classes(), from, to, type);\n }", "@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n TypeReference other = (TypeReference) obj;\n if (typeArgs == null)\n {\n if (other.typeArgs != null)\n return false;\n } else if (!typeArgs.equals(other.typeArgs))\n return false;\n if (typeName == null)\n {\n if (other.typeName != null)\n return false;\n } else if (!typeName.equals(other.typeName))\n return false;\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if(object instanceof RangeReadWriteLock) {\n RangeReadWriteLock other = (RangeReadWriteLock) object;\n return token.equals(other.token)\n && readers.size() == other.readers.size()\n && writers.size() == other.writers.size();\n }\n else {\n return false;\n }\n }", "public boolean docIteratorHasMatch(RetrievalModel r) {\n\t\tif (r instanceof RetrievalModelIndri)\n\t\t\treturn this.docIteratorHasMatchMin(r);\n\t\telse\n\t\t\treturn this.docIteratorHasMatchAll(r);\n\t}", "@Override\n public final boolean isReferenceType() {\n return true;\n }", "public boolean equals(Object o) {\n if (!(o instanceof TupleDesc)) return false;\n TupleDesc other = (TupleDesc) o;\n\n if (other.numFields() != numfields) return false;\n for (int i = 0; i < numfields; i += 1) {\n if (other.getType(i) != types[i]) return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if ( !getClass().isInstance(object)) {\n return false;\n }\n\n DocumentBase other = (DocumentBase)object;\n if (this.getId() != other.getId() && (this.getId() == null || !this.getId().equals(other.getId()))) return false;\n return true;\n }", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "public boolean equals(Object obj)\n {\n TAPosition taPosition;\n if(obj instanceof TAPosition)\n {\n taPosition = (TAPosition)obj;\n return position.equals(taPosition.getPosition());\n }\n else\n return false;\n }", "private boolean areForeignKeysEqual(Schema schema1, DBVersion schema2)\n\t{\n\t\tIterator<foreignkeyshistory.ForeignKey> foreignKeyIterator = schema1.getForeignKeyIterator();\n\t\t\n\t\twhile (foreignKeyIterator.hasNext())\n\t\t{\n\t\t\tforeignkeyshistory.ForeignKey foreignKey = foreignKeyIterator.next();\n\t\t\t\n\t\t\tif (!foreignKeyExists(foreignKey.getSourceTable().getName(), foreignKey.getTargetTable().getName(), schema2)){ return false; }\n\t\t}\n\t\t\n\t\tfor (model.ForeignKey foreignKey : schema2.getVersionForeignKeys())\n\t\t{\n\t\t\tif (!foreignKeyExists(foreignKey.getSourceTable(), foreignKey.getTargetTable(), schema1)){ return false; }\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean equals(Object object) {\n return (object instanceof Synset) && ((Synset) object).getPOS().equals(getPOS()) && ((Synset) object).getOffset() == getOffset();\n }", "private boolean serializeReference(final Object object, final StringBuffer buffer)\n {\n Iterator<?> iterator;\n int index;\n boolean isReference;\n\n // Don't allow references for simple types because here PHP and\n // Java are VERY different and the best way it to simply disallow\n // References for these types\n if (object instanceof Number || object instanceof Boolean ||\n object instanceof String)\n {\n return false;\n }\n\n iterator = this.history.iterator();\n index = 0;\n isReference = false;\n while (iterator.hasNext())\n {\n if (iterator.next() == object)\n {\n buffer.append(\"R:\");\n buffer.append(index + 1);\n buffer.append(';');\n isReference = true;\n break;\n }\n index++;\n }\n return isReference;\n }", "public boolean equals(XObject obj2){\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.equals(this);\n if(null!=m_obj){\n return m_obj.equals(obj2.m_obj);\n }else{\n return obj2.m_obj==null;\n }\n }", "public boolean isEqual(Stack msg, Object obj) {\n if (!(obj instanceof ConstNameAndType)) {\n msg.push(\"obj/obj.getClass() = \"\n + (obj == null ? null : obj.getClass()));\n msg.push(\"this.getClass() = \"\n + this.getClass());\n return false;\n }\n ConstNameAndType other = (ConstNameAndType)obj;\n\n if (!super.isEqual(msg, other)) {\n return false;\n }\n\n if (!this.theName.isEqual(msg, other.theName)) {\n msg.push(String.valueOf(\"theName = \"\n + other.theName));\n msg.push(String.valueOf(\"theName = \"\n + this.theName));\n return false;\n }\n if (!this.typeSignature.isEqual(msg, other.typeSignature)) {\n msg.push(String.valueOf(\"typeSignature = \"\n + other.typeSignature));\n msg.push(String.valueOf(\"typeSignature = \"\n + this.typeSignature));\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (TkRefexAbstractMember.class.isAssignableFrom(obj.getClass())) {\n TkRefexAbstractMember<?> another = (TkRefexAbstractMember<?>) obj;\n\n // =========================================================\n // Compare properties of 'this' class to the 'another' class\n // =========================================================\n // Compare refsetUuid\n if (!this.refexUuid.equals(another.refexUuid)) {\n return false;\n }\n\n // Compare componentUuid\n if (!this.componentUuid.equals(another.componentUuid)) {\n return false;\n }\n\n // Compare their parents\n return super.equals(obj);\n }\n\n return false;\n }", "public boolean weakEquals(Object md) {\n if (!(md instanceof FieldDocImpl))\n return false;\n return name().equals(((FieldDocImpl) md).name());\n }", "@Override\r\n\tpublic boolean equals(Object object) {\r\n\t\tif (object instanceof Posting) {\r\n\t\t\tPosting posting = (Posting) object;\r\n\t\t\tif (object instanceof Posting && this.getDocId() != null\r\n\t\t\t\t\t&& this.getDocId().equals(posting.getDocId())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean equals(Object object)\n {\n if (!(object instanceof DocumentosTareasPK))\n {\n return false;\n }\n DocumentosTareasPK other = (DocumentosTareasPK) object;\n if (this.tareId != other.tareId)\n {\n return false;\n }\n if (this.docuId != other.docuId)\n {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o) {\n try {\n Pair p = (Pair) o;\n return (this.getSource().equals(p.source) && this.getDestination().equals(p.getDestination()));\n\n } catch (Exception ex) {\n return false;\n }\n }", "boolean hasIsEquivalent();", "@Override\n public boolean equals(final Object other) {\n if (other instanceof ConcatenatedConverter) {\n final ConcatenatedConverter o = (ConcatenatedConverter) other;\n return c1.equals(o.c1) && c2.equals(o.c2);\n }\n return false;\n }", "public abstract boolean ContainsContactObjects();", "public final boolean equals(Object o) {\r\n\r\n Object payload = getPayload();\r\n if (payload != null && payload.equals(o)) {\r\n return true;\r\n }\r\n\r\n if (o == null || !getClass().equals(o.getClass()))\r\n return false;\r\n\r\n SimpleType other = (SimpleType) o;\r\n if (isBlueprint()) {\r\n // the value is irrelevant. we have the same class, therefore\r\n // the objects are equal, i.e. they represent the same blueprint.\r\n return true;\r\n }\r\n\r\n\r\n Object thisPayload = getPayload();\r\n Object otherPayload = other.getPayload();\r\n\r\n if (thisPayload != null && otherPayload != null) {\r\n return thisPayload.equals(otherPayload);\r\n } else if (thisPayload != null && otherPayload == null) {\r\n return false;\r\n } else if (thisPayload == null && otherPayload != null) {\r\n return false;\r\n }\r\n // both are null!\r\n return true;\r\n }", "@Override\r\n protected boolean doEquals(Object obj) {\r\n if (obj instanceof BsWhiteEscapedJavaDoc) {\r\n BsWhiteEscapedJavaDoc other = (BsWhiteEscapedJavaDoc)obj;\r\n if (!xSV(_escapedJavaDocCode, other._escapedJavaDocCode)) { return false; }\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean equals(Object obj)\n {\n return obj instanceof ForeignDestination;\n }", "public boolean match(MindObject other){\n return other.isSubtypeOf(this) || isSubtypeOf(other);\n }", "public boolean isSameAs(Move comp){ \n return this.xFrom==comp.xFrom &&\n this.xTo==comp.xTo &&\n this.yFrom==comp.yFrom &&\n this.yTo==comp.yTo;\n }", "boolean hasRef();", "public boolean isObjectReference(Class<?> paramClass) {\n/* 196 */ if (paramClass == null) {\n/* 197 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 200 */ return (paramClass.isInterface() && Object.class\n/* 201 */ .isAssignableFrom(paramClass));\n/* */ }", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "public boolean compare(Object object) {\n if (object instanceof IBond) {\n Bond bond = (Bond) object;\n for (IAtom atom : atoms) {\n if (!bond.contains(atom)) {\n return false;\n }\n }\n\n // not important ??!!\n //if (order==bond.order)\n // return false;\n\n return true;\n }\n return false;\n }", "boolean isSetRef();", "public boolean equals(AMRStitchCellAttributes obj)\n {\n return ((CreateCellsOfType == obj.CreateCellsOfType));\n }", "protected boolean isObject() {\n long mark = 0;\n try {\n mark = this.createMark();\n boolean bl = this.getObject() != null;\n return bl;\n }\n catch (MathLinkException e) {\n this.clearError();\n boolean bl = false;\n return bl;\n }\n finally {\n if (mark != 0) {\n this.seekMark(mark);\n this.destroyMark(mark);\n }\n }\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj.getClass().equals(getClass())) {\n\t\t\tStemChange sc = (StemChange) obj;\n\t\t\treturn _new.equals(sc._new) && _old.equals(sc._old);\n\t\t}\n\t\treturn false;\n\t}", "private static boolean haveSameSkeleton(JsonObject object1, JsonObject object2){\n\t\tboolean res = (object1.entrySet().size() == object2.entrySet().size());\n\t\tSystem.err.println(res);\n\t\tif (res){\n\t\t\tfor(java.util.Map.Entry<String, JsonElement> entry : object1.entrySet()){\n\t\t\t\tif (!object2.has(entry.getKey())) return false;\n\t\t\t}\n\t\t\treturn true;\t\t\t\n\t\t}\n\t\telse return false;\n\t}", "public boolean isObjectDifferentiaField(CharField cf) {\n return false;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj != null){\n\t\t\tif(obj instanceof UDPLElem){\n\t\t\t\tUDPLElem elem = (UDPLElem)obj;\n\t\t\t\tif(this.refId == elem.refId){\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}", "@Override\r\n public boolean equals(final Object o) {\r\n if (o instanceof DomItemXml) {\r\n return this.getJsObject() == ((DomItemXml) o).getJsObject();\r\n }\r\n return false;\r\n }", "public boolean isCandidateForReferenceDataGeneration (Template template, GeneratorBean bean) {\n\t\tif (bean instanceof Column) {\n//\t\t\tColumn column = (Column)bean;\n\t\t\t//if (ColumnUtils.isUnique(column) && EnrichmentUtils.isToGenerateBasedOnTag(template, bean))\n\t\t\treturn EnrichmentUtils.isToGenerateBasedOnTag(template, bean);\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object obj) {\n StorePairGeneric<E> o = (StorePairGeneric<E>) obj;\n return this.first.equals(o.first);\n \n // or boolean ans = this.first(temp.first);\n // return ans;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Recibos)) {\n return false;\n }\n Recibos other = (Recibos) object;\n if ((this.codRecibo == null && other.codRecibo != null) || (this.codRecibo != null && !this.codRecibo.equals(other.codRecibo))) {\n return false;\n }\n return true;\n }", "public static boolean m9055a(Object obj, Object obj2) {\n return obj == null ? obj2 == null : obj.equals(obj2);\n }", "@Override\n public boolean equals(final Object obj) {\n if (obj instanceof FlowTriggerEvent) {\n FlowTriggerEvent te2 = (FlowTriggerEvent) obj;\n if (type == te2.type && name.equals(te2.name)\n && ((payload == null && te2.payload == null)\n || (payload != null && payload.equals(te2.payload)))) {\n return true;\n }\n }\n return false;\n }", "public boolean equals(Object t) {\n if (!(t instanceof ReferenceType)) return false;\n ReferenceType r = (ReferenceType) t;\n if (typeClass() != null) return typeClass().equals(r.typeClass());\n return name.equals(r.name);\n }", "public boolean equals(Object other) {\n return super.equals(other) &&\n requiredPrimitiveType == ((AtomicSequenceConverter)other).requiredPrimitiveType;\n }", "@Override\n public boolean equals (final Object o) {\n return\n (o instanceof Composition)\n &&\n super.equals(o)\n &&\n Arrays.equals(\n _reversedTerms, \n ((Composition) o)._reversedTerms); }", "public static boolean areSame(AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return t1.toString().equals(t2.toString());\n }", "public boolean isObject() {\n\t\t// Object is the class that has itself as superclass\n\t\treturn getSuperClass() == this;\n\t}", "boolean hasFrom();", "@Override\n public boolean equals(Object o) {\n if (!(o instanceof Arrow)) return false;\n\n Arrow a = (Arrow) o;\n return from.equals(a.from) && to.equals(a.to) && color.equals(a.color);\n }", "public boolean opposedTo(Object o);", "@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsMemberFollowing) {\n BsMemberFollowing other = (BsMemberFollowing)obj;\n if (!xSV(_memberFollowingId, other._memberFollowingId)) { return false; }\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic boolean equals(Object o){\n\t\tif(!(o instanceof AvroPortType)){\n\t\t\treturn false;\n\t\t}\n\t\tAvroPortType other = (AvroPortType) o;\n\t\treturn this.schema.equals(other.schema);\n\t}", "public final boolean isReference() {\n \treturn !isPrimitive();\n }", "private boolean isInvoiceBetween(ContractsGrantsInvoiceDocument invoice, Timestamp fromDate, Timestamp toDate) {\r\n if (ObjectUtils.isNotNull(fromDate)) {\r\n if (fromDate.after(new Timestamp(invoice.getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis()))) {\r\n return false;\r\n }\r\n }\r\n if (ObjectUtils.isNotNull(toDate)) {\r\n if (toDate.before(new Timestamp(invoice.getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis()))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof AgreementItemToTermMap)) {\r\n return false;\r\n }\r\n AgreementItemToTermMap other = (AgreementItemToTermMap) object;\r\n if ((this.agreementItemToTermMapPK == null && other.agreementItemToTermMapPK != null) || (this.agreementItemToTermMapPK != null && !this.agreementItemToTermMapPK.equals(other.agreementItemToTermMapPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof PathDocEle)) {\n return false;\n }\n PathDocEle other = (PathDocEle) object;\n if ((this.pdeId == null && other.pdeId != null) || (this.pdeId != null && !this.pdeId.equals(other.pdeId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o)\n {\n boolean returnValue = false;\n \n if (o instanceof Edge)\n {\n returnValue = (((Edge)o).getStart() == startAt) && (((Edge)o).getEnd() == lookingAt);\n }\n \n return returnValue;\n }", "@Override\n public boolean equals(Object object) {\n if (this == object)\n return true;\n if (object == null || !(object instanceof XmlDocumentDefinition))\n return false;\n\n XmlDocumentDefinition definition = (XmlDocumentDefinition) object;\n\n if (!(uuid instanceof String)) {\n uuid = UUID.randomUUID().toString();\n }\n\n return uuid.equals(definition.getUuid());\n }", "public static boolean m66061a(Object obj, Object obj2) {\n return obj == obj2 || (obj != null && obj.equals(obj2));\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Comprobanteislref)) {\r\n return false;\r\n }\r\n Comprobanteislref other = (Comprobanteislref) object;\r\n if ((this.idcomprobanteislref == null && other.idcomprobanteislref != null) || (this.idcomprobanteislref != null && !this.idcomprobanteislref.equals(other.idcomprobanteislref))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public static boolean compareObject(Object o1, Object o2)\n {\n if (o1 instanceof List<?> && o2 instanceof List<?>)\n {\n List l1 = (List<Object>) o1;\n List l2 = (List<Object>) o2;\n if(l1.size() != l2.size()) return false;\n return compareList(l1,l2);\n }\n else return EqualsBuilder.reflectionEquals(o1,o2);\n\n }", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "public boolean isSameNodeInfo(NodeInfo other) {\n if (!(other instanceof DocumentWrapper)) {\n return false;\n }\n return node == ((DocumentWrapper)other).node;\n }", "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "private static boolean m4280b(Object obj, Object obj2) {\n if (obj != obj2) {\n if (obj == null || obj.equals(obj2) == null) {\n return null;\n }\n }\n return true;\n }", "public boolean isSubclassOf(ClassReference other) {\n\t\t//TODO: Review this code thoroughly, it hasn't been looked at in a while\n\t\tif (this.equals(other) || this.equals(NULL) || other.equals(NULL)) {\n\t\t\treturn true;\n\t\t}\n\t\tboolean isPrimitive = (primitive != Primitive.REFERENCE && other.primitive != Primitive.REFERENCE);\n\t\tboolean isReference = (primitive == Primitive.REFERENCE && other.primitive == Primitive.REFERENCE);\n\t\tif (isPrimitive && isReference) {\n\t\t\treturn false;\n\t\t} else if (isPrimitive) {\n\t\t\tif (other.primitive == Primitive.INT && INT_TYPES.contains(primitive)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (isReference) {\n\t\t\tQueue<ClassReference> tests = new LinkedList<>();\n\t\t\ttests.add(this);\n\t\t\twhile (!tests.isEmpty()) {\n\t\t\t\tClassReference test = tests.poll();\n\t\t\t\tif (!test.equals(OBJECT)) {\n\t\t\t\t\tJavaClass testClass = ClassStore.findClass(test);\n\t\t\t\t\tif (testClass != null) {\n\t\t\t\t\t\tClassReference superType = testClass.superType;\n\t\t\t\t\t\tif (superType.equals(other)) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttests.add(superType);\n\t\t\t\t\t\tfor (ClassReference interfaceType : testClass.interfaces) {\n\t\t\t\t\t\t\tif (interfaceType.equals(other)) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttests.add(interfaceType);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean equals(Object obj) {\n\t\t// Check class of object\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (!(obj instanceof GJGeneralPath2D))\n\t\t\treturn false;\n\t\t\n\t\t// class cast\n\t\tGJGeneralPath2D that = (GJGeneralPath2D) obj;\n\t\t\n\t\t// Paths should have same number of segments\n\t\tif (this.segments.size() != that.segments.size())\n\t\t\treturn false;\n\t\t\n\t\tSegment seg1, seg2;\n\t\tGJPoint2D[] pts1, pts2;\n\t\t\n\t\tfor (int i = 0; i < this.segments.size(); i++) {\n\t\t\t// extract each segment\n\t\t\tseg1 = this.segments.get(i);\n\t\t\tseg2 = that.segments.get(i);\n\t\t\t\n\t\t\t// check segments have same type\n\t\t\tif (seg1.type() != seg2.type())\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t// extract control points\n\t\t\tpts1 = seg1.controlPoints();\n\t\t\tpts2 = seg2.controlPoints();\n\t\t\t\n\t\t\t// check size of control point arrays\n\t\t\tif (pts1.length != pts2.length)\n\t\t\t\tthrow new RuntimeException(\"Two path segments have type but different number of control points\");\n\t\t\t\n\t\t\t// check identity of control points\n\t\t\tfor (int j = 0; j < pts1.length; j++) {\n\t\t\t\tif (!pts1[j].equals(pts2[j]))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if no difference was found, then the paths are almost equal\n\t\treturn true;\t\t\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TmadjuntoPK)) {\n return false;\n }\n TmadjuntoPK other = (TmadjuntoPK) object;\n if (this.id != other.id) {\n return false;\n }\n if (this.tmDocumentoid != other.tmDocumentoid) {\n return false;\n }\n return true;\n }", "public boolean isConsistent()\n\t{\n\t\tfinal List<AbsoluteFeatureElement> checkedAbsolutes = new ArrayList<AbsoluteFeatureElement>();\n\t\tfinal List<RelativeFeatureElement> checkedRelatives = new ArrayList<RelativeFeatureElement>();\n\t\t\n\t\tfor (final FeatureElement element : featureElements)\n\t\t{\n\t\t\tif (element instanceof AbsoluteFeatureElement)\n\t\t\t{\n\t\t\t\tfinal AbsoluteFeatureElement abs = (AbsoluteFeatureElement) element;\n\t\t\t\t\n\t\t\t\tfor (final AbsoluteFeatureElement other : checkedAbsolutes)\n\t\t\t\t{\n\t\t\t\t\tif (abs.position() == other.position())\t// same positions, so need compatible elements\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!(abs.equals(other) || abs.isCompatibleWith(other) || abs.generalises(other) || other.generalises(abs)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\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\tcheckedAbsolutes.add(abs);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfinal RelativeFeatureElement rel = (RelativeFeatureElement) element;\n\t\t\t\t\n\t\t\t\tfor (final RelativeFeatureElement other : checkedRelatives)\n\t\t\t\t{\n\t\t\t\t\tif (rel.walk().equals(other.walk()))\t// equal Walks, so need compatible elements\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!(rel.equals(other) || rel.isCompatibleWith(other) || rel.generalises(other) || other.generalises(rel)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\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\tcheckedRelatives.add(rel);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean isConnectable (RoadInterface newObj) {\n boolean result = false;\n if (newObj instanceof Intersection) {\n result = true;\n }\n return (result);\n }", "@Override\n\tpublic boolean docIteratorHasMatch(RetrievalModel r) {\n\t\treturn this.docIteratorHasMatchAll (r);\n\t}", "@Override\r\n\tpublic boolean equals(Object fileBean){\r\n\t\tFileBean newBean = (FileBean)fileBean;\r\n\t\treturn newBean.toString().compareTo(this.toString()) == 0;\r\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Docentetrabajoanterior)) {\r\n return false;\r\n }\r\n Docentetrabajoanterior other = (Docentetrabajoanterior) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "boolean hasDocumentType();", "@Override\r\n\t public boolean equals(Object obj) {\n\t Interval inteval = (Interval)obj;\r\n\t return this.getStart().equals(inteval.getStart()) && this.getEnd().equals(inteval.getEnd()) ;\r\n\t }", "@Override\n public boolean equals(Object obj)\n {\n return this.Word().equals(((Word)obj).Word());\n }", "public boolean relationshipFromTyped(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return fm_typed; }", "public boolean mojeEquals(Obj o1, Obj o2) {\r\n\t\t//System.out.println(o1.getName() + \" \" + o2.getName());\r\n\t\tboolean sameRight = true; // 21.06.2020. provera prava pristupa\r\n\t\tboolean sameName = true;\t// 22.06.2020. ako nisu metode ne moraju da imaju isto ime\r\n\t\tboolean sameArrayType = true; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t\t\r\n\t\tif (o1.getKind() == Obj.Meth && o2.getKind() == Obj.Meth) {\r\n\t\t\tsameRight = o1.getFpPos() == o2.getFpPos()+10; \r\n\t\t\tsameName = o1.getName().equals(o2.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (o1.getType().getKind() == Struct.Array && o2.getType().getKind() == Struct.Array) {\r\n\t\t\t\tif (!(o1.getType().getElemType() == o2.getType().getElemType())) { // ZA KLASE MOZDA TREBA equals\r\n\t\t\t\t\tsameArrayType = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 16.08.2020.\r\n//\t\tif (o1.getType().getKind() == Struct.Class || o1.getType().getKind() == Struct.Interface)\r\n//\t\t\treturn true;\r\n\t\t\r\n\t\t\r\n\t\treturn o1.getKind() == o2.getKind() \r\n\t\t\t\t&& sameName\r\n\t\t\t\t&& o1.getType().equals(o2.getType())\r\n\t\t\t\t&& /*adr == other.adr*/ o1.getLevel() == o2.getLevel()\r\n\t\t\t\t&& equalsCompleteHash(o1.getLocalSymbols(), o2.getLocalSymbols())\r\n\t\t\t\t&& sameRight // 21.06.2020. provera prava pristupa\r\n\t\t\t\t&& sameArrayType; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof DocumentoPresentadoPK)) {\n return false;\n }\n DocumentoPresentadoPK other = (DocumentoPresentadoPK) object;\n if (this.codCia != other.codCia) {\n return false;\n }\n if (this.codDocumentoPres != other.codDocumentoPres) {\n return false;\n }\n if (this.codCandidato != other.codCandidato) {\n return false;\n }\n return true;\n }" ]
[ "0.6255016", "0.57614815", "0.5594353", "0.5472977", "0.54122293", "0.5399939", "0.53886944", "0.53487396", "0.52755135", "0.5217308", "0.50426805", "0.5037945", "0.50210726", "0.50138927", "0.5005086", "0.50009483", "0.4996519", "0.4981284", "0.49624687", "0.49370548", "0.49286166", "0.49211144", "0.49140197", "0.49139336", "0.49095517", "0.4902689", "0.49024275", "0.48944837", "0.48898104", "0.48887363", "0.48799443", "0.48737645", "0.48603326", "0.48555848", "0.48435408", "0.48395178", "0.4830687", "0.48246667", "0.48171663", "0.48145607", "0.4805171", "0.48044467", "0.47974557", "0.47925764", "0.47909474", "0.4782576", "0.47689003", "0.47669733", "0.4762141", "0.4753549", "0.474929", "0.47379234", "0.4736919", "0.47364855", "0.4736364", "0.47336185", "0.47332793", "0.47306815", "0.47143036", "0.47126454", "0.4702859", "0.47017816", "0.4696823", "0.46921778", "0.46858576", "0.4681152", "0.46794036", "0.46749437", "0.4674588", "0.46658677", "0.4665175", "0.4664757", "0.46619627", "0.46547383", "0.46498495", "0.46470785", "0.46464288", "0.46392107", "0.46392056", "0.46391374", "0.46362573", "0.46344906", "0.46321487", "0.46199173", "0.46151316", "0.46096593", "0.4602672", "0.45994094", "0.45966431", "0.45918104", "0.45899105", "0.4587994", "0.45843744", "0.4583592", "0.45828253", "0.45819756", "0.45789725", "0.4578416", "0.4577037", "0.45760316" ]
0.8602367
0
Returns a string representation of this RefDocTypePair.
public String toString () { return "RefDocTypePair(" + this.fromDocType + "," + this.toDocType + ")"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return type.toString();\n }", "@Override\n public String toString() {\n return value + symbol(this.type);\n }", "public String toString() {\n return type;\n }", "public String toString() {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < numfields; i += 1) {\n String item = \"\" + types[i];\n if (attrNames == null || attrNames[i] == null) {\n sb.append(item).append(\"()\");\n } else {\n sb.append(item).append(\"(\").append(attrNames[i]).append(\")\");\n }\n if (i < numfields-1) {\n sb.append(\",\");\n }\n }\n return sb.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s:%s\", type, value);\n\t}", "public String toString() {\n switch (m_type) {\n case OPENTAG:\n return \"OPEN-\" + m_value.toUpperCase();\n case CLOSETAG:\n return \"CLOSE-\" + m_value.toUpperCase();\n case WORD:\n return \"WORD(\" + m_value + \")\";\n case NUMBER:\n return \"NUMBER(\" + m_value + \")\";\n case APOSTROPHIZED:\n return \"APOSTROPHIZED(\" + m_value + \")\";\n case HYPHENATED:\n return \"HYPHENATED(\" + m_value + \")\";\n case PUNCTUATION:\n return \"PUNCTUATION(\" + m_value + \")\";\n default:\n return \"UNKNOWN(\" + m_value + \")\";\n }\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn type;\n\t\t}", "@Override\n\tpublic String toString() {\n\t\treturn type;\n\t}", "public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn name + \" \" + Arrays.toString(types);\r\n\t}", "public String toString() {\n return cords.toString() + type;\n }", "public String getRefType() {\n return refType;\n }", "@Override\n public String getType() {\n Object ref = type_;\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 type_ = s;\n return s;\n }\n }", "@Override\n public String getType() {\n Object ref = type_;\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 type_ = s;\n return s;\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getTypeArn() != null)\n sb.append(\"TypeArn: \").append(getTypeArn()).append(\",\");\n if (getConfiguration() != null)\n sb.append(\"Configuration: \").append(getConfiguration()).append(\",\");\n if (getConfigurationAlias() != null)\n sb.append(\"ConfigurationAlias: \").append(getConfigurationAlias()).append(\",\");\n if (getTypeName() != null)\n sb.append(\"TypeName: \").append(getTypeName()).append(\",\");\n if (getType() != null)\n sb.append(\"Type: \").append(getType());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\r\n public String toString() {\r\n StringBuilder buf = new StringBuilder();\r\n\r\n buf.append('[').append(getTokenName(type));\r\n if (line != -1) {\r\n buf.append('@').append(line);\r\n if (column != -1)\r\n buf.append(',').append(column);\r\n }\r\n buf.append(\"]:\");\r\n if (text != null)\r\n buf.append('\"').append(text).append('\"');\r\n else if (type > 3 && type < 256)\r\n buf.append((char) type);\r\n else\r\n buf.append('<').append(type).append('>');\r\n if (value != null)\r\n buf.append('=').append(value);\r\n return buf.toString();\r\n }", "String getTypeAsString();", "@Override\n public String toString() {\n String result = \"\";\n byte[] data = buffer.data;\n for (int i = 0; i < (buffer.end - buffer.start) / bytes; i++) {\n if (i > 0) result += \", \";\n result += get(i).toString();\n }\n return type + \"[\" + result + \"]\";\n }", "@Override\n public StringType asString() {\n return TypeFactory.getStringType(this.getValue());\n }", "public String toString() { return stringify(this, true); }", "public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }", "@Override\n public String toString() {\n String fieldStr = getTag() + \"=\" + getTagVal();\n return fieldStr;\n }", "public String toString() {\n\n\t\tfinal StringBuilder buffer = new StringBuilder();\n\n\t\tbuffer.append(\"tAttrDataTypeId=[\").append(tAttrDataTypeId).append(\"] \");\n\t\tbuffer.append(\"dataTypeName=[\").append(dataTypeName).append(\"] \");\n\t\tbuffer.append(\"dataTypeDesc=[\").append(dataTypeDesc).append(\"] \");\n\t\tbuffer.append(\"activeFlag=[\").append(activeFlag).append(\"] \");\n\n\t\treturn buffer.toString();\n\t}", "public String toString() {\n return new ToStringBuilder(this)\n .append(\"name\", this.name)\n .append(\"type\", this.type)\n .append(\"sqlTable\", this.sqlTable)\n .append(\"sqlColumn\", this.sqlColumn)\n .append(\"typeLinkId\", this.typeLinkId)\n .toString();\n }", "public String toString() {\r\n\t\tString result = \" \" + StunConstants.getAttributeName(type) \r\n\t\t\t+ \"=[\" + Conversion.hexString(type)\r\n\t\t\t+ \"] valueLen=[\" + length \r\n\t\t\t+ \"] value=[\" + Conversion.hexString(value) + \"] padding=[\" + padding + \"]\";\r\n\t\treturn result;\r\n\t}", "public java.lang.String getO() {\n java.lang.Object ref = o_;\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 o_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getReferenceType();", "public java.lang.String getType() {\n java.lang.Object ref = type_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getStringValue() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 if (typeCase_ == 5) {\n type_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 if (bs.isValidUtf8()) {\n type_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(this.getName());\n sb.append(\"\\n name=\").append(this.getName());\n sb.append(\"\\n type=\").append(this.getType());\n sb.append(\"\\n parentType=\").append(this.getParentType());\n sb.append(\"\\n resourceUrl=\").append(this.getResourceUrl());\n sb.append(\"\\n restUrl=\").append(this.getRestUrl());\n sb.append(\"\\n soapUrl=\").append(this.getSoapUrl());\n sb.append(\"\\n thumbnailUrl=\").append(this.getThumbnailUrl());\n sb.append(\"\\n capabilities=\").append(this.getCapabilities());\n sb.append(\"\\n creator=\").append(this.getCreator());\n sb.append(\"\\n description=\").append(this.getDescription());\n sb.append(\"\\n keywords=\").append(this.getKeywords());\n if (this.getEnvelope() != null) {\n if (this.getEnvelope() instanceof EnvelopeN) {\n EnvelopeN envn = (EnvelopeN) this.getEnvelope();\n sb.append(\"\\n envelope=\");\n sb.append(envn.getXMin()).append(\", \").append(envn.getYMin()).append(\", \");\n sb.append(envn.getXMax()).append(\", \").append(envn.getYMax());\n if (envn.getSpatialReference() != null) {\n sb.append(\" wkid=\").append(envn.getSpatialReference().getWKID());\n }\n }\n }\n return sb.toString();\n }", "public String toString() {\n\n String str = super.toString() + \"; descriptor for class: \";\n\n //-- add class name\n if (_class != null)\n str += _class.getName();\n else\n str += \"[null]\";\n\n //-- add xml name\n str += \"; xml name: \" + _xmlName;\n\n return str;\n }", "@Override\n public String toString() {\n Gson gson = new Gson();\n String s = gson.toJson(this);\n return s;\n\n// return \"Pair: (\" + key + \",\" + value + \")\";\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFkocs() {\n java.lang.Object ref = fkocs_;\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 fkocs_ = s;\n }\n return s;\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"TipoDocumento [codigoPais=\" + codigoPais + \", codigo=\" + codigo\n\t\t\t\t+ \", nombreEntidad=\" + nombreEntidad\n\t\t\t\t+ \", oidTipoDoc=\" + oidTipoDoc \n\t\t\t\t+ \", estado=\" + estado\n\t\t\t\t+ \", obligatorio=\" + obligatorio\n\t\t\t\t+ \", siglas=\" + siglas\n\t\t\t\t+ \", longitud=\" + longitud\n\t\t\t\t+ \", dni=\" + dni\n\t\t\t\t+ \", fiscal=\" + fiscal\n\t\t\t\t+ \", tipoDocu=\" + tipoDocu\n\t\t\t\t+ \", descripcion=\" + descripcion + \"]\";\n\t}", "private static String toString(final TopLevelPolicyElementType refPolicyType, final String policyRefId, final Optional<PolicyVersionPatterns> versionConstraints)\n {\n return refPolicyType + \"IdReference[Id=\" + policyRefId + \", \" + versionConstraints + \"]\";\n }", "public String toString() { return kind() + \":\"+ text() ; }", "public String getTypeText() {\r\n\t\t\r\n\t\treturn getTypeText(this.type);\r\n\r\n\t}", "public String getType() {\n Object ref = type_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n type_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "@Override\n\tpublic String toString() {\n\t\tswitch(type) {\n\t\tcase CLOSURE : return \"*\";\n\t\tcase CONCATENATION : return \"\";\n\t\tcase LPAREN : return \"(\";\n\t\tcase RPAREN : return \")\";\n\t\tcase UNION : return \"|\";\n\t\tdefault: return value;\n\t\t}\n\t}", "@Override\n public String toString ()\n {\n return \"type = \" + type;\n }", "@java.lang.Override\n public java.lang.String getO() {\n java.lang.Object ref = o_;\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 o_ = s;\n return s;\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getFileHeaderInfo() != null)\n sb.append(\"FileHeaderInfo: \").append(getFileHeaderInfo()).append(\",\");\n if (getComments() != null)\n sb.append(\"Comments: \").append(getComments()).append(\",\");\n if (getQuoteEscapeCharacter() != null)\n sb.append(\"QuoteEscapeCharacter: \").append(getQuoteEscapeCharacter()).append(\",\");\n if (getRecordDelimiter() != null)\n sb.append(\"RecordDelimiter: \").append(getRecordDelimiter()).append(\",\");\n if (getFieldDelimiter() != null)\n sb.append(\"FieldDelimiter: \").append(getFieldDelimiter()).append(\",\");\n if (getQuoteCharacter() != null)\n sb.append(\"QuoteCharacter: \").append(getQuoteCharacter());\n sb.append(\"}\");\n return sb.toString();\n }", "public String getType() {\n Object ref = type_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n type_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "private String getSignatureString(Type type)\r\n {\r\n if(type instanceof CompoundType)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n CompoundType cType = (CompoundType)type;\r\n //find key and value types\r\n String keyType = getSignatureString(cType.keyType);\r\n sb.append(\"Ljava/util/HashMap\");\r\n sb.append(\"<\");\r\n sb.append(keyType);\r\n sb.append(getSignatureString(cType.valType));\r\n sb.append(\">;\");\r\n return sb.toString();\r\n }\r\n else if(type instanceof SimpleType)\r\n {\r\n switch(((SimpleType)type).type)\r\n {\r\n case INT:\r\n return \"Ljava/lang/Integer;\";\r\n case BOOLEAN:\r\n return \"Ljava/lang/Boolean;\";\r\n case STRING:\r\n return \"Ljava/lang/String;\";\r\n }\r\n }\r\n return null;\r\n }", "public java.lang.String getFkocs() {\n java.lang.Object ref = fkocs_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n fkocs_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getRelationType()\n {\n String relationType = \"PSX\";\n Iterator i = m_keyNames.iterator();\n while (i.hasNext())\n {\n relationType += i.next().toString();\n }\n relationType += \"Relation\";\n\n return relationType;\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n }\n return s;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n }\n return s;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n }\n return s;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n }\n return s;\n }\n }", "public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }", "public String getType() {\n Object ref = type_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n type_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getType() {\n Object ref = type_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n type_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getContent() != null)\n sb.append(\"Content: \").append(getContent()).append(\",\");\n if (getRequires() != null)\n sb.append(\"Requires: \").append(getRequires()).append(\",\");\n if (getAttachments() != null)\n sb.append(\"Attachments: \").append(getAttachments()).append(\",\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getDisplayName() != null)\n sb.append(\"DisplayName: \").append(getDisplayName()).append(\",\");\n if (getVersionName() != null)\n sb.append(\"VersionName: \").append(getVersionName()).append(\",\");\n if (getDocumentType() != null)\n sb.append(\"DocumentType: \").append(getDocumentType()).append(\",\");\n if (getDocumentFormat() != null)\n sb.append(\"DocumentFormat: \").append(getDocumentFormat()).append(\",\");\n if (getTargetType() != null)\n sb.append(\"TargetType: \").append(getTargetType()).append(\",\");\n if (getTags() != null)\n sb.append(\"Tags: \").append(getTags());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toStr() {\r\n return value.toString();\r\n }", "public String getType() {\n Object ref = type_;\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 if (bs.isValidUtf8()) {\n type_ = s;\n }\n return s;\n }\n }", "public String getType() {\n Object ref = type_;\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 if (bs.isValidUtf8()) {\n type_ = s;\n }\n return s;\n }\n }", "public String toString() {\n\t\treturn \"\" + type + \",\" + (rempli ? \"p\" : \"v\") + \",\" +\n\t\t\t\tx + \",\" + y + \",\" + largeur + \",\" + hauteur + \",\"\n\t\t\t\t+ Integer.toHexString(couleur.getRGB() & 0xffffff);\n\t}", "public String toString()\n {\n int spaceLength = this.lengthToSecondCol - this.name.length();\n String space = \" \";\n String n = \" \";\n String s;\n if(showName)\n {\n n = this.name;\n while(spaceLength > 1)\n {\n spaceLength--;\n space += \" \";\n }\n }\n\n switch (this.type)\n {\n case Pwr.eType_Float32:\n case Pwr.eType_Float64:\n s = n + space + this.valueFloat;\n break;\n case Pwr.eType_UInt32:\n case Pwr.eType_UInt64:\n case Pwr.eType_Int32:\n case Pwr.eType_Int64:\n case Pwr.eType_Enum:\n case Pwr.eType_Mask:\n\n //s = n + space + this.valueInt;\n\ts = n + space + (new Integer( (this.valueInt & 65535) )).intValue();\n break;\n\n case Pwr.eType_UInt16:\n s = n + space + (new Integer( (this.valueInt & 65535) )).intValue();\n break;\n case Pwr.eType_Int8:\n case Pwr.eType_UInt8:\n s = n + space + (new Integer(this.valueInt)).byteValue();\n break;\n case Pwr.eType_Int16:\n s = n + space + (new Integer(this.valueInt)).shortValue();\n break;\n case Pwr.eType_Boolean:\n if(this.valueBoolean)\n {\n s = n + space + \"1\";\n }\n else\n {\n s = n + space + \"0\";\n }\n break;\n default:\n s = n + space + this.valueString;\n break;\n }\n return s;\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder buffer = new StringBuilder(128);\n\t\tIterator<Map.Entry<String, AbstractNode>> it = pairs.entrySet().iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tMap.Entry<String, AbstractNode> pair = it.next();\n\t\t\tbuffer.append(keyToString(pair.getKey()));\n\t\t\tbuffer.append(KEY_VALUE_SEPARATOR_CHAR);\n\t\t\tbuffer.append(' ');\n\t\t\tbuffer.append(pair.getValue());\n\t\t\tif (it.hasNext())\n\t\t\t{\n\t\t\t\tbuffer.append(PAIR_SEPARATOR_CHAR);\n\t\t\t\tbuffer.append(' ');\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getFieldLabelType() != null)\n sb.append(\"FieldLabelType: \").append(getFieldLabelType()).append(\",\");\n if (getDataPathLabelType() != null)\n sb.append(\"DataPathLabelType: \").append(getDataPathLabelType()).append(\",\");\n if (getRangeEndsLabelType() != null)\n sb.append(\"RangeEndsLabelType: \").append(getRangeEndsLabelType()).append(\",\");\n if (getMinimumLabelType() != null)\n sb.append(\"MinimumLabelType: \").append(getMinimumLabelType()).append(\",\");\n if (getMaximumLabelType() != null)\n sb.append(\"MaximumLabelType: \").append(getMaximumLabelType());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\n\t\treturn BlobUtil.string(buffer, offset, size);\n\t}", "public java.lang.String getStringValue() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 (typeCase_ == 5) {\n type_ = s;\n }\n return s;\n }\n }", "public String toString()\r\n\t{\r\n\t\tStringBuffer OutString = new StringBuffer();\r\n\t\t// Open tag\r\n\t\tOutString.append(\"<\");\r\n\t\t// Add the object's type\r\n\t\tOutString.append(getType());\r\n\t\t// attach the ID if required.\r\n\t\tif (DEBUG)\r\n\t\t\tOutString.append(getObjID());\r\n\t\t// add the class attribute if required; default: don't.\r\n\t\tif (getIncludeClassAttribute() == true)\r\n\t\t\tOutString.append(getClassAttribute());\r\n\t\t// Add any transformation information,\r\n\t\t// probably the minimum is the x and y values.\r\n\t\t// again this is new to Java 1.4;\r\n\t\t// this function returns a StringBuffer.\r\n\t\tOutString.append(getAttributes());\r\n\t\t// close the tag.\r\n\t\tOutString.append(\">\");\r\n\t\tOutString.append(\"&\"+entityReferenceName+\";\");\r\n\t\t// close tag\r\n\t\tOutString.append(\"</\");\r\n\t\tOutString.append(getType());\r\n\t\tOutString.append(\">\");\r\n\r\n\t\treturn OutString.toString();\r\n\t}", "public String tagAsString();", "@Override\n public final String toString()\n {\n StringBuilder sb = new StringBuilder(64);\n appendDesc(sb);\n return sb.toString();\n }", "@Override\n\tpublic String toString() {\n\t\tString str = labelTemplate.toString();\n\t\tswitch (type) {\n\t\tcase SET: str += \":=\"; break;\n\t\tcase DISCARD: str += \"!=\"; break;\n\t\tcase ADD: str += \"+=\"; break;\n\t\t}\n\t\tstr += valueTemplate.toString();\n\t\treturn str;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Object [name = \" + name.get() + \", typ = \" + typ.get() + \"]\";\n\t}", "@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }", "public String getType() {\n\t\t\n\t\tif(this instanceof Friend_Connection) {\n\t\t\treturn \"[FRIEND]\";\n\t\t\t\n\t\t}else if(this instanceof Couple_Connection){\n\t\t\treturn \"[COUPLE]\";\n\t\t\n\t\t}else if(this instanceof Parent_Connection) {\n\t\t\treturn \"[RELATIVE]\";\n\t\t\n\t\t}else if(this instanceof Colleagues_Connection) {\n\t\t\treturn \"[COLLEAGUE]\";\n\t\t\n\t\t}else if(this instanceof Classmates_Connection) {\n\t\t\treturn \"[CLASSMATE]\";\n\t\t}else {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t}", "@Override\n public String toString() {\n return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);\n }", "@Override\n public String toString() {\n return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);\n }", "static String toString(int kind, Class<?> defc, String name, MethodType type) {\n\t\treturn referenceKindToString(kind) + \" \" + defc.getName() + \".\" + name + \":\" + type; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t}", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}", "public String toString() {\n\t String outPut = \"byteValue(): \" + byteValue()\n\t \t\t+ \"\\nshortValue(): \" + shortValue()\n\t \t\t+ \"\\nintValue(): \" + intValue()\n\t \t\t+ \"\\nlongValue(): \" + longValue()\n\t \t\t+ \"\\nfloatValue(): \" + floatValue()\n\t \t\t+ \"\\ndoubleValue(): \" + doubleValue();\n\t \n\t return outPut;\n }", "public String toString() {\r\n\r\n StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8);\r\n return doc.toString();\r\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Refueling [OrderID=\" + OrderID + \", ownerID=\" + ownerID + \", CarNumber=\" + CarNumber + \", GasStation=\"\r\n\t\t\t\t+ GasStation + \", address=\" + address + \", GasType=\" + GasType + \", RateForLiter=\" + RateForLiter\r\n\t\t\t\t+ \", Qunatity=\" + Qunatity + \", Price=\" + Price + \", Date=\" + Date + \", pumpNumber=\" + pumpNumber\r\n\t\t\t\t+ \", service=\" + service + \", time=\" + time + \", saleID=\" + saleID + \"]\";\r\n\t}", "@Override\n public String toString() {\n return value();\n }", "public String toString() {\n\t\treturn geoCoordinate.toString() + \" | \" + name + \" | \" + description;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "@Override\n public String toString() {\n StringBuilder buff = new StringBuilder();\n\n buff.append(\" refex:\");\n buff.append(informAboutUuid(this.refexUuid));\n buff.append(\" component:\");\n buff.append(informAboutUuid(this.componentUuid));\n buff.append(\" \");\n buff.append(super.toString());\n\n return buff.toString();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn type+\"(\"+id+\",\"+\"(\"+value+\")\"+\")\";\r\n\t}", "public String toString() {\r\n return \"Type: Text\";\r\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n }\n }", "public java.lang.String getType() {\n java.lang.Object ref = type_;\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 type_ = s;\n return s;\n }\n }" ]
[ "0.6493406", "0.63671595", "0.61631715", "0.6129309", "0.61027426", "0.6100264", "0.60799354", "0.6064386", "0.60079557", "0.5965399", "0.59430724", "0.5917526", "0.5844787", "0.5844787", "0.5838492", "0.5828963", "0.5826101", "0.5787314", "0.57740784", "0.57315475", "0.57281953", "0.5716931", "0.56791884", "0.567036", "0.56513405", "0.5640501", "0.56268424", "0.56228894", "0.56228894", "0.56228894", "0.5619539", "0.55902904", "0.5584651", "0.5578976", "0.5575722", "0.55695057", "0.55695057", "0.55695057", "0.55695057", "0.55695057", "0.5548818", "0.5548406", "0.5535122", "0.55296504", "0.5527653", "0.55268824", "0.55197", "0.5518536", "0.5514045", "0.55136657", "0.551037", "0.55075556", "0.5502355", "0.5496789", "0.54748166", "0.5468586", "0.5468047", "0.5468047", "0.5468047", "0.5468047", "0.54662013", "0.5463716", "0.5463716", "0.5448513", "0.5431375", "0.542993", "0.542993", "0.54176825", "0.54147595", "0.5406227", "0.54061544", "0.54055434", "0.5389674", "0.53852534", "0.5382286", "0.53746295", "0.537346", "0.53692675", "0.53673214", "0.5364433", "0.536383", "0.536383", "0.5363749", "0.536132", "0.5359426", "0.5358617", "0.5355808", "0.53553283", "0.535498", "0.53545624", "0.53530604", "0.53530604", "0.53530544", "0.53530544", "0.5345734", "0.5330671", "0.53263885", "0.5321094", "0.5321094", "0.5321094" ]
0.82367337
0
Creates a new RefDocTypePair with the specified "from" and "to" document types.
public RefDocTypePair (int fromDocType, int toDocType) { this.fromDocType = fromDocType; this.toDocType = toDocType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString ()\n {\n return \"RefDocTypePair(\" + this.fromDocType + \",\" + this.toDocType + \")\";\n }", "public void setFromDocType (int fromDocType)\n {\n this.fromDocType = fromDocType;\n }", "public boolean equals (Object object)\n {\n return\n ( object instanceof RefDocTypePair &&\n ((RefDocTypePair)object).getFromDocType() == this.fromDocType &&\n ((RefDocTypePair)object).getToDocType() == this.toDocType );\n }", "public FromToPair getTranslatedTuple(String from, String to) throws SQLException, ClassNotFoundException {\n FromToPair pair = null;\n String dbpediaLanguagePrefix = ProjectConfiguration.dbpediaLanguagePrefix();\n String queryStr = \"\"\n + \"SELECT CONVERT(fromto_table.from USING utf8) AS fromPage, CONVERT(fromto_table.to USING utf8) AS toPage \"\n + \"FROM \" + ProjectConfiguration.fromToTable() + \" AS fromto_table\"\n + \" WHERE fromTrans = ? AND toTrans = ?\";\n WikipediaConnector.closeConnection();\n Connection conn = this.getConnection();\n PreparedStatement stmt = conn.prepareStatement(queryStr);\n stmt.setString(1, dbpediaLanguagePrefix + from);\n stmt.setString(2, dbpediaLanguagePrefix + to);\n ResultSet result = stmt.executeQuery();\n// if (result.next()) {\n// pair = new FromToPair(result.getString(\"fromPage\"), result.getString(\"toPage\"), ProjectConfiguration.languageCode());\n// }\n if (result.next()) {\n from = result.getString(\"fromPage\");\n to = result.getString(\"toPage\");\n String dbpediaPrefix = ProjectConfiguration.dbpediaPrefix();\n pair = new FromToPair(from.replace(dbpediaPrefix, \"\"), to.replace(dbpediaPrefix, \"\"), ProjectConfiguration.languageCode());\n }\n return pair;\n }", "protected void referencesToSAX (int toDocType,\n int refType,\n int useMode,\n ContentHandler contentHandler)\n throws SAXException\n {\n final String METHOD_NAME =\n \"referencesToSAX (\" + \n \"int toDocType, \" +\n \"int refType, \" +\n \"int useMode, \" +\n \"ContentHandler contentHandler)\";\n this.logDebug\n (METHOD_NAME + \" 1/2: Started.\" +\n \" toDocType = \" + toDocType +\n \", refType = \" + refType +\n \", useMode = \" + useMode +\n \", contentHandler = \" + contentHandler);\n ServiceSelector documentSelector = null;\n Document toDoc = null;\n try\n {\n documentSelector =\n (ServiceSelector) this.serviceManager.lookup(Document.ROLE + \"Selector\");\n toDoc = (Document) documentSelector.select(DocType.hintFor[toDocType]);\n toDoc.setUseMode(useMode);\n toDoc.setWithPath(this.withPath);\n String[] columns = toDoc.getDbColumns();\n this.ensureDbHelper();\n ResultSet resultSet = this.dbHelper.queryDataOfReferencedDocs\n (this.type, this.id, toDocType, refType, columns);\n if ( resultSet == null )\n {\n this.logDebug(METHOD_NAME + \" 2/2: Done. resultSet = null\");\n return;\n }\n while ( resultSet.next() )\n {\n toDoc.setId(resultSet.getInt(DbColumn.ID));\n toDoc.setLid(resultSet.getString(DbColumn.LID));\n toDoc.setRefId(resultSet.getInt(DbColumn.REF));\n toDoc.toSAX(resultSet, contentHandler, false);\n }\n }\n catch (Exception exception)\n {\n throw new SAXException(exception);\n }\n finally\n {\n if ( toDoc != null ) documentSelector.release(toDoc);\n if ( documentSelector != null ) this.serviceManager.release(documentSelector);\n }\n this.logDebug(METHOD_NAME + \" 2/2: Done\");\n }", "public Road(String name, Junction from, Junction to) {\n this.name = name;\n this.from = from;\n this.to = to;\n }", "MessageRefType createMessageRefType();", "public int getToDocType ()\n {\n return this.toDocType;\n }", "FieldRefType createFieldRefType();", "@Override\n\t\tpublic NewDoc createFromParcel(Parcel source) {\n\t\t\treturn new NewDoc(source);\n\t\t}", "public String createMapSchemaType(MapSchemaTypeProperties schemaTypeProperties,\n String mapFromSchemaTypeGUID,\n String mapToSchemaTypeGUID) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n if (apiManagerIsHome)\n {\n return apiManagerClient.createMapSchemaType(userId, apiManagerGUID, apiManagerName, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID);\n }\n else\n {\n return apiManagerClient.createMapSchemaType(userId, null, null, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID);\n }\n }", "TO fromObject(CONTEXT context, final FROM obj);", "public static void convertBookVOToBook() {\n\n\t}", "private VariantContext createVariantContext(final String chrom, final int pos, final int end, final String chr2,\n final Integer end2, final String ref, final String alt,\n final Integer svLen, final String strands, final String cpxType,\n final List<String> cpxIntervals) {\n final Map<String, Object> attributes = new HashMap<>();\n if (chr2 != null) {\n attributes.put(GATKSVVCFConstants.CONTIG2_ATTRIBUTE, chr2);\n }\n if (end2 != null) {\n attributes.put(GATKSVVCFConstants.END2_ATTRIBUTE, end2);\n }\n if (svLen != null) {\n attributes.put(GATKSVVCFConstants.SVLEN, svLen);\n }\n if (strands != null) {\n attributes.put(GATKSVVCFConstants.STRANDS_ATTRIBUTE, strands);\n }\n if (cpxType != null) {\n attributes.put(GATKSVVCFConstants.CPX_TYPE, cpxType);\n }\n if (cpxIntervals != null) {\n attributes.put(GATKSVVCFConstants.CPX_INTERVALS, cpxIntervals);\n }\n return new VariantContextBuilder()\n .source(\"source\")\n .id(\"id\")\n .chr(chrom)\n .start(pos)\n .stop(end)\n .alleles(Arrays.asList(ref != null ? Allele.create(ref, true) : Allele.REF_N,\n alt != null ? Allele.create(alt, false) : Allele.ALT_N))\n .attributes(attributes)\n .make();\n }", "public Link(Node from, Node to) {\n\t this.from = from;\n\t this.to = to;\n\t}", "For createFor();", "public static int betterConversion(TypeSpec from, final TypeSpec to1,\n final TypeSpec to2, Value fromValue) {\n if (to1.equals(to2)) {\n return 0;\n }\n\n if (from.equals(to1)) {\n return 1;\n }\n if (from.equals(to2)) {\n return -1;\n }\n\n // unwrap 'num' or 'any'\n if ((fromValue != null) && (fromValue.getValue() != null)) {\n if (from.isAny()) {\n fromValue = new Value(((Any) fromValue.getValue()).value);\n from = TypeSpec.typeOf(fromValue.getValue());\n } else if (from.isNum()) {\n fromValue = new Value(((Num) fromValue.getValue()).value);\n from = TypeSpec.typeOf(fromValue.getValue());\n }\n }\n\n if (from.equals(to1)) {\n return 1;\n }\n if (from.equals(to2)) {\n return -1;\n }\n\n final boolean implicitConversion1to2Exists = existsImplicitConversion(\n to1, to2, null);\n final boolean implicitConversion2to1Exists = existsImplicitConversion(\n to2, to1, null);\n\n if (implicitConversion1to2Exists && !implicitConversion2to1Exists) {\n return 1;\n }\n if (implicitConversion2to1Exists && !implicitConversion1to2Exists) {\n return -1;\n }\n\n return 0;\n }", "private MCTypeReference<? extends MCTypeSymbol> initTypeRefASTRanges(ASTPort node, StringBuilder typeName, ASTRanges astType) {\n typeName.append(\"SIUnitRangesType\");\n Log.debug(astType.toString(), \"Type:\");\n Log.debug(typeName.toString(), \"TypeName:\");\n\n SIUnitRangesSymbolReference ref = SIUnitRangesSymbolReference.constructSIUnitRangesSymbolReference(astType.getRanges());\n return ref;\n }", "RangeOfValuesType createRangeOfValuesType();", "public static RelatesToType getRelatesTo(String uri) {\n RelatesToType relatesTo =\n WSA_OBJECT_FACTORY.createRelatesToType();\n relatesTo.setValue(uri);\n return relatesTo;\n }", "public UndirectedEdge(VType from, VType to) {\n\t\t// TODO: Add your code here\n\t\tsuper(from,to);\n\t}", "public abstract Type createRangeType(ReferenceType bottom);", "public MergeFromRelationRequestContextBuilder fromKeys(RecordKeys keys) {\n this.fromKeys = keys;\n return self();\n }", "private MCTypeReference<? extends MCTypeSymbol> initTypeRefASTRange(ASTPort node, StringBuilder typeName, ASTRange astType) {\n typeName.append(\"SIUnitRangesType\");\n Log.debug(astType.toString(), \"Type:\");\n Log.debug(typeName.toString(), \"TypeName:\");\n\n SIUnitRangesSymbolReference ref = SIUnitRangesSymbolReference.constructSIUnitRangesSymbolReference(astType);\n return ref;\n }", "ObjectTypeDefinition createObjectTypeDefinition();", "public void addRelationship(String fm_field, String fm_symbol_str, boolean fm_typed,\n String to_field, String to_symbol_str, boolean to_typed, \n String style_str, boolean ignore_ns, boolean built_in, Bundles to_add) {\n String fm_pre = \"\", to_pre = \"\";\n\n // DEBUG\n // System.err.println(\"fm_field =\\\"\" + fm_field + \"\\\"\"); System.err.println(\"fm_symbol=\\\"\" + fm_symbol_str + \"\\\"\"); System.err.println(\"fm_typed =\\\"\" + fm_typed + \"\\\"\");\n // System.err.println(\"to_field =\\\"\" + to_field + \"\\\"\"); System.err.println(\"to_symbol=\\\"\" + to_symbol_str + \"\\\"\"); System.err.println(\"to_typed =\\\"\" + to_typed + \"\\\"\");\n\n if (fm_typed) fm_pre = fm_field + BundlesDT.DELIM;\n if (to_typed) to_pre = to_field + BundlesDT.DELIM;\n\n Utils.Symbol fm_symbol = Utils.parseSymbol(fm_symbol_str),\n to_symbol = Utils.parseSymbol(to_symbol_str);\n\n // Keep track of existing relationships, update the longer term ones\n String encoded_relationship_str = Utils.encToURL(fm_field) + BundlesDT.DELIM + Utils.encToURL(fm_symbol_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + fm_typed) + BundlesDT.DELIM +\n\t\t\t\t Utils.encToURL(to_field) + BundlesDT.DELIM + Utils.encToURL(to_symbol_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + to_typed) + BundlesDT.DELIM +\n\t\t\t\t Utils.encToURL(style_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + ignore_ns);\n if (active_relationships.contains(encoded_relationship_str) == false) active_relationships.add(encoded_relationship_str);\n if (built_in == false) updateRecentRelationships(encoded_relationship_str);\n // Is this an addition or from scratch?\n Bundles bundles; if (to_add == null) bundles = getRTParent().getRootBundles(); else bundles = to_add;\n BundlesG globals = bundles.getGlobals();\n // Go through the tablets\n Iterator<Tablet> it_tablet = bundles.tabletIterator();\n while (it_tablet.hasNext()) {\n Tablet tablet = it_tablet.next();\n\t// Check to see if this table will complete both blanks, if so, go through the bundles adding the edges to the graphs\n\tif (KeyMaker.tabletCompletesBlank(tablet,fm_field) && KeyMaker.tabletCompletesBlank(tablet,to_field)) {\n\t // Create the key makers\n\t KeyMaker fm_km = new KeyMaker(tablet,fm_field), to_km = new KeyMaker(tablet,to_field);\n\t // Go through the bundles\n\t Iterator<Bundle> it_bundle = tablet.bundleIterator();\n\t while (it_bundle.hasNext()) {\n\t Bundle bundle = it_bundle.next();\n\t // Create the combinator for the from and to keys\n\t String fm_keys[], to_keys[];\n // Transform the bundle to keys\n\t fm_keys = fm_km.stringKeys(bundle);\n\t to_keys = to_km.stringKeys(bundle);\n\t // Make the relationships\n if (fm_keys != null && fm_keys.length > 0 && to_keys != null && to_keys.length > 0) {\n for (int i=0;i<fm_keys.length;i++) for (int j=0;j<to_keys.length;j++) {\n\t // Check for not sets if the flag is specified\n if (ignore_ns && (fm_keys[i].equals(BundlesDT.NOTSET) || to_keys[j].equals(BundlesDT.NOTSET))) continue;\n\t\t// The key will be a combination of the header and the entity\n String fm_fin = fm_pre + fm_keys[i], to_fin = to_pre + to_keys[j];\n\t\t// If we're in retain mode only, make sure both nodes exist in the set\n\t\tif (retained_nodes != null && retained_nodes.size() > 0 && (retained_nodes.contains(fm_fin) == false || retained_nodes.contains(to_fin) == false)) continue;\n // Set the shape\n if (entity_to_shape.containsKey(fm_fin) == false) entity_to_shape.put(fm_fin, fm_symbol);\n\t\tif (entity_to_shape.containsKey(to_fin) == false) entity_to_shape.put(to_fin, to_symbol);\n // Create the initial world coordinate and transform as appropriate \n\t\tif (entity_to_wxy.containsKey(fm_fin) == false) { \n\t\t entity_to_wxy.put(fm_fin, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1));\n transform(fm_fin); }\n\t\tif (entity_to_wxy.containsKey(to_fin) == false) { \n\t\t entity_to_wxy.put(to_fin, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1));\n\t\t transform(to_fin); }\n // Add the reference back to this object\n graph.addNode(fm_fin); graph.addNode(to_fin);\n digraph.addNode(fm_fin); digraph.addNode(to_fin);\n // Set the weights equal to the number of bundles on the edge\n double previous_weight = graph.getConnectionWeight( graph.getEntityIndex(fm_fin), graph.getEntityIndex(to_fin)),\n di_previous_weight = digraph.getConnectionWeight(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin));\n // Check for infinite because the graph class returns infinite if two nodes are not connected\n if (Double.isInfinite( previous_weight)) previous_weight = 0.0;\n if (Double.isInfinite(di_previous_weight)) di_previous_weight = 0.0;\n // Finally, add them to both forms of the graphs\n\t \t graph.addNeighbor(fm_fin, to_fin, previous_weight + 1.0);\n graph.addNeighbor(to_fin, fm_fin, previous_weight + 1.0);\n\t\tdigraph.addNeighbor(fm_fin, to_fin, di_previous_weight + 1.0);\n // System.err.println(\"RTGraphPanel.addRelationship() : \\\"\" + fm_fin + \"\\\" => \\\"\" + to_fin + \"\\\": w=\" + (previous_weight+1.0) + \" | di_w=\" + (di_previous_weight+1.0));\n\t\t graph.addLinkReference( graph.getEntityIndex(fm_fin), graph.getEntityIndex(to_fin), bundle);\n\t\t graph.addLinkReference( graph.getEntityIndex(to_fin), graph.getEntityIndex(fm_fin), bundle);\n\t\tdigraph.addLinkReference(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin), bundle);\n // Keep track of the link style\n digraph.addLinkStyle(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin), style_str);\n\t }\n\t }\n }\n\t}\n }\n // Nullify the biconnected components\n graph_bcc = null;\n graph2p_bcc = null;\n cluster_cos = null;\n conductance = null;\n // Re-render\n getRTComponent().render();\n }", "public void addRelationship(String fm_field, String fm_symbol_str, boolean fm_typed,\n String to_field, String to_symbol_str, boolean to_typed, \n String style_str, boolean ignore_ns, boolean built_in) {\n addRelationship(fm_field, fm_symbol_str, fm_typed, to_field, to_symbol_str, to_typed, style_str, ignore_ns, built_in, null); }", "public RelatesToType createRelatesTo(List<GoalType> goalList, ActivityType activity) {\n\t\tRelatesToType relatesTo = mappingFactory.createRelatesToType();\n\t\tfor (GoalType goalType : goalList) {\n\t\t\trelatesTo.getGoal().add(goalType);\n\t\t}\t\t\n\t\trelatesTo.setActivity(activity);\n\t\treturn relatesTo;\n\t}", "public Relationship createRelationshipTo( Node otherNode, \n \t\tRelationshipType type );", "public static void createAggregatedRelationship (AbstractStructureElement from, AbstractStructureElement to, ArrayList<KDMRelationship> relations) {\n\t\tif (from.getAggregated().size() > 0) {\r\n\t\t\t//System.out.println(\"MAIOR QUE 1, TODO\");\r\n\r\n\t\t\t//Andre - pega os aggragated que ja estão no from\r\n\t\t\tEList<AggregatedRelationship> aggregatedFROM = from.getAggregated();\t\t\r\n\r\n\t\t\t//Andre - começa um for nesses aggregated\r\n\t\t\tfor (int i = 0; i < aggregatedFROM.size(); i++) {\r\n\r\n\t\t\t\t//Andre - verifica se o aggregated que ja existe tem o mesmo destino que o que esta pra ser criado \r\n\t\t\t\tif (to.getName().equalsIgnoreCase(aggregatedFROM.get(i).getTo().getName())) {\r\n\r\n\t\t\t\t\t//Andre - se tiver o mesmo destino ele adiciona as relacoes novas e atualiza a densidade, depois disso ele pega e sai do for\r\n\t\t\t\t\t//ADICIONAR\r\n\r\n\t\t\t\t\taggregatedFROM.get(i).setDensity(aggregatedFROM.get(i).getDensity()+relations.size());\r\n\t\t\t\t\taggregatedFROM.get(i).getRelation().addAll(relations);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Andre - se for o ultimo aggregated do for e mesmo assim não encontrou o com o mesmo destino que esta pra ser criado \r\n\t\t\t\t//Andre - entao cria um novo aggregated para ser adicionado\r\n\t\t\t\t//se chegar no ultimo e nao encontrar\r\n\t\t\t\tif (i == (aggregatedFROM.size()-1)) {\r\n\r\n\t\t\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\t\t\tnewRelationship.setFrom(from);\r\n\t\t\t\t\tnewRelationship.setTo(to);\r\n\t\t\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t//Andre - se não tiver um agrregated na layer from adiciona um com as relacoes que podem entre duas layers\r\n\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\tnewRelationship.setFrom(from);\r\n\t\t\tnewRelationship.setTo(to);\r\n\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t}\r\n\r\n\t\t//Fernando - Limpando lista \r\n\t\trelations.clear();\r\n\t\tfrom = null;\r\n\t\tto = null;\r\n\r\n\r\n\t}", "protected CCProgressFromTo(float t, float fromPercentage, float toPercentage) {\n super(t);\n to_ = toPercentage;\n from_ = fromPercentage;\n }", "WithCreate withSourceType(SourceType sourceType);", "private PairOfNodeIndexIntervals createNodeIndexIntervalPair(int firstStart, int secondStart, int matchedLen) {\n\t\t// new first and second \n\t\tNodeIndexInterval first = new NodeIndexInterval(getStartNodeIndex(firstStart),\n\t\t\t\tgetEndNodeIndex(firstStart, matchedLen));\n\t\tNodeIndexInterval second = new NodeIndexInterval(getStartNodeIndex(secondStart),\n\t\t\t\tgetEndNodeIndex(secondStart, matchedLen));\n\n\t\tPairOfNodeIndexIntervals pair = new PairOfNodeIndexIntervals(first, second);\n\n\t\treturn pair;\n\t}", "protected PsiFieldReferenceSetResolver(XmlAttributeValue from) {\n super(from);\n }", "public int getFromDocType ()\n {\n return this.fromDocType;\n }", "public int getFromDocType ()\n {\n return this.fromDocType;\n }", "public abstract R createReference(T type, Object value);", "FromValues createFromValues();", "public void addRelationship(String classNameFrom, String classNameTo, String type) \n\t{\n\t\tstoreViewState();\n\t\tproject.addRelationship(classNameFrom, classNameTo, type);\n\t\tcheckStatus();\n\t}", "ConceptType createConceptType();", "@Endpoint(\n describeByClass = true\n )\n public static GenerateVocabRemapping create(Scope scope, Operand<TString> newVocabFile,\n Operand<TString> oldVocabFile, Long newVocabOffset, Long numNewVocab, Options... options) {\n OperationBuilder opBuilder = scope.opBuilder(OP_NAME, \"GenerateVocabRemapping\");\n opBuilder.addInput(newVocabFile.asOutput());\n opBuilder.addInput(oldVocabFile.asOutput());\n opBuilder.setAttr(\"new_vocab_offset\", newVocabOffset);\n opBuilder.setAttr(\"num_new_vocab\", numNewVocab);\n if (options != null) {\n for (Options opts : options) {\n if (opts.oldVocabSize != null) {\n opBuilder.setAttr(\"old_vocab_size\", opts.oldVocabSize);\n }\n }\n }\n return new GenerateVocabRemapping(opBuilder.build());\n }", "public static Value performImplicitConversion(final TypeSpec from,\n final TypeSpec to, final Value fromValue) {\n Debug.Assert(\n (fromValue.getValue() == null)\n || (TypeSpec.typeOf(fromValue).isA(from)),\n \"fromValue (type \" + TypeSpec.typeOf(fromValue)\n + \") must be of type 'from' (= \" + from\n + \") or a derived type\");\n\n if ((from == to) || from.equals(to)) {\n return fromValue;\n }\n\n // first try a user-define conversion. If none exist, try the builtin\n // conversions.\n final Value r = performImplicitUserDefinedConversion(from, to,\n fromValue);\n if (r != null) {\n return r;\n }\n\n if (existsImplicitNumericConversion(from, to)) {\n return performImplicitNumericConversion(from, to, fromValue);\n }\n\n if (existsImplicitReferenceConversion(from, to, fromValue)) {\n return performImplicitReferenceConversion(from, to, fromValue);\n }\n\n ScigolTreeParser\n .semanticError(\"there is no implicit conversion available from type '\"\n + from + \"' to type '\" + to + \"'\");\n return null;\n }", "TypeDef createTypeDef();", "ComponentRefType createComponentRefType();", "public Document(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "private MCTypeReference<? extends MCTypeSymbol> initTypeRef(ASTPort node, StringBuilder typeName, ASTType astType) {\n if (node.getType().get() instanceof ASTRange) {\n return initTypeRefASTRange(node, typeName, (ASTRange) astType);\n }\n else if (node.getType().get() instanceof ASTRanges) {\n return initTypeRefASTRanges(node, typeName, (ASTRanges) astType);\n }\n Log.debug(node.getName().isPresent() ? node.getName().get() : \"unnamed port\" + \" \" + astType.toString(), \"info\");\n return initTypeRefGeneralType(node, typeName, astType);\n }", "FROM toObject(CONTEXT context, final TO value);", "protected FromToOption createOption() {\n return new FromToOption();\n }", "void relationshipCreate( long id, int typeId, long startNodeId,\n long endNodeId );", "HxType createReference(final String className);", "void createOrUpdateReferenceObligationPairs(List<PsdReferenceObligationPair> psdReferObligPairs);", "protected URIReferenceImpl makeRefImpl(URIReference ref) {\n return (ref instanceof URIReferenceImpl) ? (URIReferenceImpl)ref : new URIReferenceImpl(ref.getURI());\n }", "public interface ConvertType<FROM, TO> {\n\tTO convert(FROM object);\n\tTO convertDetailed(FROM object);\n\t\n\tClass<FROM> supports();\n\t\n\t/**\n\t * Nested types can reuse converters already registered\n\t * @param converter\n\t */\n\tvoid setConverter(Converter converter);\n}", "EnumRef createEnumRef();", "BType createBType();", "FieldType createFieldType();", "public ReferenceRange() {\n\t\tsuper();\n\t\tmRr = CDAFactory.eINSTANCE.createReferenceRange();\n\t\tmRr.setObservationRange(getObsR());\n\t\tmRr.setTypeCode(ActRelationshipType.REFV);\n\t\tthis.setInterpretationCode(ObservationInterpretation.NORMAL);\n\t}", "public static Set<MustAliasBUEdge> constructMove(Variable from, Variable to) {\n\t\tif (from == null || to == null)\n\t\t\tthrow new RuntimeException(\"Neither from nor to can be null!\");\n\t\tSet<MustAliasBUEdge> ret = new ArraySet<MustAliasBUEdge>();\n\t\t// Case 1: from \\notin ms && to \\notin ms\n\t\tMustAliasBUEdge c1 = new MustAliasBUEdge();\n\t\tc1.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV1 = c1.constraint.getNotInVSet();\n\t\tnotInV1.add(from);\n\t\tnotInV1.add(to);\n\t\tret.add(c1);\n\t\t// Case 2: from \\in ms && to \\notin ms\n\t\tMustAliasBUEdge c2 = new MustAliasBUEdge();\n\t\tc2.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV2 = c2.constraint.getNotInVSet();\n\t\tnotInV2.add(to);\n\t\tSet<Variable> inV2 = c2.constraint.getInVSet();\n\t\tinV2.add(from);\n\t\tc2.genSet.add(new Pair<Variable, Variable>(to, from));\n\t\tret.add(c2);\n\t\t// Case 3: from \\notin ms && to \\in ms\n\t\tMustAliasBUEdge c3 = new MustAliasBUEdge();\n\t\tc3.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV3 = c3.constraint.getNotInVSet();\n\t\tnotInV3.add(from);\n\t\tSet<Variable> inV3 = c3.constraint.getInVSet();\n\t\tinV3.add(to);\n\t\tc3.killSet.add(to);\n\t\tret.add(c3);\n\t\t// Case 4: from \\in ms && to \\in ms\n\t\tMustAliasBUEdge c4 = new MustAliasBUEdge();\n\t\tc4.constraint = new AliasConstraint();\n\t\tSet<Variable> inV4 = c4.constraint.getInVSet();\n\t\tinV4.add(from);\n\t\tinV4.add(to);\n\t\tc4.killSet.add(to);\n\t\tc4.genSet.add(new Pair<Variable, Variable>(to, from));\n\t\tret.add(c4);\n\t\treturn ret;\n\t}", "public Edge(Vertex<VV> from, Vertex<VV> to)\r\n {\r\n this.from = from;\r\n this.to = to;\r\n from.addEdge(this);\r\n to.addEdge(this);\r\n }", "public void changeRelationshipType(String classNameFrom, String classNameTo, String newTypeName)\n\t{\n\t\tstoreViewState();\n\t\tproject.changeRelationshipType(classNameFrom, classNameTo, newTypeName);\n\t\tcheckStatus();\n\t}", "private VwConstraintDef fromBeanToObject(BaseOracleBean baseBean) {\n VwConstraintDefOracleBean bean = (VwConstraintDefOracleBean) baseBean;\n VwConstraintDef object = new VwConstraintDef();\n object.setConsType(bean.getConsType());\n object.setConsName(bean.getConsName());\n object.setMainTable(bean.getMainTable());\n object.setRefTable(bean.getRefTable());\n object.setTable1(bean.getTable1());\n object.setCol1(bean.getCol1());\n return object;\n }", "TypeDecl createTypeDecl();", "public com.squareup.okhttp.Call templateRefundByTransferCall(Long fromOfficeId, Long fromClientId, Long fromAccountId, Integer fromAccountType, Long toOfficeId, Long toClientId, Long toAccountId, Integer toAccountType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/accounttransfers/templateRefundByTransfer\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (fromOfficeId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromOfficeId\", fromOfficeId));\n if (fromClientId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromClientId\", fromClientId));\n if (fromAccountId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromAccountId\", fromAccountId));\n if (fromAccountType != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromAccountType\", fromAccountType));\n if (toOfficeId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toOfficeId\", toOfficeId));\n if (toClientId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toClientId\", toClientId));\n if (toAccountId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toAccountId\", toAccountId));\n if (toAccountType != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toAccountType\", toAccountType));\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n if(progressListener != null) {\n apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {\n @Override\n public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {\n com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());\n return originalResponse.newBuilder()\n .body(new ProgressResponseBody(originalResponse.body(), progressListener))\n .build();\n }\n });\n }\n\n String[] localVarAuthNames = new String[] { };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);\n }", "List<PsdReferenceObligationPair> wrapReferenceObligPair(CDSReferenceObligationPairs refObPairsXmlObject, List<PsdReferenceEntity> listReferenceEntity);", "public static void convertBookToBookVO() {\n\t\t// TODDO\n\t}", "RecordType createRecordType();", "public CreateDocumentRequest withTargetType(String targetType) {\n setTargetType(targetType);\n return this;\n }", "public Pair(T v1, V v2) {\r\n this.v1 = v1;\r\n this.v2 = v2;\r\n }", "public DocumentPair(Document doc1, Document doc2) {\r\n assert ((doc1 != null) && (doc2 != null));\r\n this.doc1 = doc1;\r\n this.doc2 = doc2;\r\n jsDiv = (int) doc1.computeJSDiv(doc2);\r\n sentimentDiff = Math.abs(doc1.getOverallSentiment() - doc2.getOverallSentiment());\r\n }", "SearchResultsType createSearchResultsType();", "public static @NotNull Breadcrumb navigation(\n final @NotNull String from, final @NotNull String to) {\n final Breadcrumb breadcrumb = new Breadcrumb();\n breadcrumb.setCategory(\"navigation\");\n breadcrumb.setType(\"navigation\");\n breadcrumb.setData(\"from\", from);\n breadcrumb.setData(\"to\", to);\n return breadcrumb;\n }", "public ITransliterator get(String fromSchema, String toSchema)\n\t{\n\t\tString key = fromSchema + \"~\" + toSchema;\n\t\treturn map.get(key);\n\t}", "public void addRelation(int from, int to){\n this.setAdjacencyMatrixEntry(from, to, 1);\n }", "HxType createReference(final HxType resolvedType);", "StructureType createStructureType();", "<T, DTO, CMD> DocRepoBuilder<T, DTO, CMD> getDocRepoBuilder();", "public com.squareup.okhttp.Call templateCall(Long fromOfficeId, Long fromClientId, Long fromAccountId, Integer fromAccountType, Long toOfficeId, Long toClientId, Long toAccountId, Integer toAccountType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/accounttransfers/template\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (fromOfficeId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromOfficeId\", fromOfficeId));\n if (fromClientId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromClientId\", fromClientId));\n if (fromAccountId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromAccountId\", fromAccountId));\n if (fromAccountType != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"fromAccountType\", fromAccountType));\n if (toOfficeId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toOfficeId\", toOfficeId));\n if (toClientId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toClientId\", toClientId));\n if (toAccountId != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toAccountId\", toAccountId));\n if (toAccountType != null)\n localVarQueryParams.addAll(apiClient.parameterToPair(\"toAccountType\", toAccountType));\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n if(progressListener != null) {\n apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {\n @Override\n public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {\n com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());\n return originalResponse.newBuilder()\n .body(new ProgressResponseBody(originalResponse.body(), progressListener))\n .build();\n }\n });\n }\n\n String[] localVarAuthNames = new String[] { };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);\n }", "public void create(Triple start, Triple end) {\n\t\t\n\t}", "B documentReference(String documentReference);", "static Map<Name, ObjectConverter> createConversionMap (final FeatureType input, final FeatureType toConvert) throws NonconvertibleObjectException{\n\n if(input.equals(toConvert)){\n return null;\n }\n final Map<Name, ObjectConverter> map = new HashMap<Name, ObjectConverter>();\n\n for (PropertyDescriptor toConvertDesc : toConvert.getDescriptors()) {\n for(PropertyDescriptor inputDesc : input.getDescriptors()){\n\n //same property name\n if(toConvertDesc.getName().equals(inputDesc.getName())){\n\n final Class inputClass = inputDesc.getType().getBinding();\n final Class toConvertClass = toConvertDesc.getType().getBinding();\n if(toConvertClass.equals(inputClass)){\n //same name and same type\n map.put(toConvertDesc.getName(), null);\n }else{\n //same name but different type\n if(toConvertDesc instanceof GeometryDescriptor){\n map.put(toConvertDesc.getName(), new GeomConverter(toConvertClass, inputClass));\n }else{\n map.put(toConvertDesc.getName(), ConverterRegistry.system().converter(toConvertClass, inputClass));\n }\n }\n }\n }\n }\n return map;\n\n }", "public SourceDocumentInformation(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public static ResourceIndex createResourceIndex( ResourceKey key, Struct gff, FileIndex sourceDir,\n FileIndex targetDir )\n {\n\n String name = getNameFromStruct( key, gff );\n\n return( new ResourceIndex( name, key, new FileIndex( sourceDir, getSourceFile(key) ),\n new FileIndex( targetDir, getDestinationFile(key) ) ) );\n }", "public VehicleTypeTO()\r\n {\r\n }", "Documentable createDocumentable();", "@Deprecated\npublic interface DocumentSearchStringConverter\n extends SearchStringToQueryConverter<DocumentSearchRequest> {\n\n}", "private static Map<String, Object> parseRelToType(RelToType r) {\n\t\tMap<String, Object> result = new HashMap<>();\n\t\tString clazz = r.getClazz();\n\t\t// System.out.println(\"\\t\\t\\tclazz: \" + clazz);\n\t\tresult.put(\"clazz\", clazz);\n\t\tString scheme = r.getScheme();\n\t\t// System.out.println(\"\\t\\t\\tscheme: \" + scheme);\n\t\tresult.put(\"scheme\", scheme);\n\t\tString type = r.getType();\n\t\t// System.out.println(\"\\t\\t\\ttype: \" + type);\n\t\tresult.put(\"type\", type);\n\t\tString v = r.getValue();\n\t\t// System.out.println(\"\\t\\t\\tv: \" + v);\n\t\tresult.put(\"value\", v);\n\t\treturn result;\n\n\t}", "public Edge(Node from, Node to) {\n fromNode = from;\n toNode = to;\n }", "public YuiProperty(String toBy, String from, boolean isTo)\r\n\t{\r\n\t\tif (isTo == true)\r\n\t\t{\r\n\t\t\tthis.to = toBy;\r\n\t\t\tthis.from = from;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.by = toBy;\r\n\t\t\tthis.from = from;\r\n\t\t}\r\n\t}", "ConceptsType createConceptsType();", "MessagesType createMessagesType();", "public static CCProgressFromTo action(float t, float fromPercentage, float toPercentage) {\n return new CCProgressFromTo(t, fromPercentage, toPercentage);\n }", "public Field createFieldRef(Position pos, Expr receiver, X10FieldInstance fi) {\n Field f = xnf.Field(pos, receiver, xnf.Id(pos, fi.name())).fieldInstance(fi);\n Type type = fi.rightType();\n // propagate self binding (if any)\n CConstraint c = X10TypeMixin.realX(receiver.type());\n XTerm term = X10TypeMixin.selfVarBinding(c); // the RHS of {self==x} in c\n if (term != null) {\n type = addSelfConstraint(type, xts.xtypeTranslator().trans(c, term, fi));\n assert (null != type);\n }\n return (Field) f.type(type);\n }", "private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }", "public static XContentBuilder toRiverMapping(String type, String analyzer) {\r\n\t\tXContentBuilder xbMapping = null;\r\n\t\ttry {\r\n xbMapping = jsonBuilder().prettyPrint().startObject();\r\n\r\n // Type\r\n xbMapping.startObject(type);\r\n\r\n // Manage _source\r\n // We store binary source as a stored field so we don't need it in _source\r\n xbMapping.startObject(\"_source\").array(\"excludes\", FsRiverUtil.Doc.ATTACHMENT).endObject();\r\n\r\n xbMapping.startObject(\"properties\");\r\n\r\n // Doc content\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.CONTENT, analyzer);\r\n\r\n // Doc source\r\n addBinary(xbMapping, FsRiverUtil.Doc.ATTACHMENT);\r\n\r\n // Meta\r\n xbMapping.startObject(FsRiverUtil.Doc.META).startObject(\"properties\");\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.AUTHOR);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.TITLE);\r\n addDate(xbMapping, FsRiverUtil.Doc.Meta.DATE);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.KEYWORDS);\r\n xbMapping.endObject().endObject(); // End Meta\r\n\r\n // File\r\n xbMapping.startObject(FsRiverUtil.Doc.FILE).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.CONTENT_TYPE);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.LAST_MODIFIED);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.INDEXING_DATE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.FILESIZE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.INDEXED_CHARS);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.FILENAME);\r\n addNotIndexedString(xbMapping, FsRiverUtil.Doc.File.URL);\r\n xbMapping.endObject().endObject(); // End File\r\n\r\n // Path\r\n xbMapping.startObject(FsRiverUtil.Doc.PATH).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ENCODED);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.VIRTUAL);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ROOT);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.REAL);\r\n xbMapping.endObject().endObject(); // End Path\r\n\r\n xbMapping.endObject().endObject().endObject(); // End Type\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Log when error\r\n\t\t}\r\n\t\treturn xbMapping;\r\n\t}", "@SOAPMethod(\"ConversionRate\")\n String conversionRate(@SOAPProperty(\"FromCurrency\") String fromCurrency,\n @SOAPProperty(\"ToCurrency\") String toCurrency);", "private Builder(org.LNDCDC_NCS_TCS.ORDER_TYPES.apache.nifi.LNDCDC_NCS_TCS_ORDER_TYPES other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.ORDER_TYPE)) {\n this.ORDER_TYPE = data().deepCopy(fields()[0].schema(), other.ORDER_TYPE);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.ORDER_DESCRIPTION)) {\n this.ORDER_DESCRIPTION = data().deepCopy(fields()[1].schema(), other.ORDER_DESCRIPTION);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.OT_USAGE_IND)) {\n this.OT_USAGE_IND = data().deepCopy(fields()[2].schema(), other.OT_USAGE_IND);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.OT_DFLT_LENGTH_CODE)) {\n this.OT_DFLT_LENGTH_CODE = data().deepCopy(fields()[3].schema(), other.OT_DFLT_LENGTH_CODE);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.OT_DFLT_ROS_SR_IND)) {\n this.OT_DFLT_ROS_SR_IND = data().deepCopy(fields()[4].schema(), other.OT_DFLT_ROS_SR_IND);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.OT_DFLT_UPFNT_SCAT_IND)) {\n this.OT_DFLT_UPFNT_SCAT_IND = data().deepCopy(fields()[5].schema(), other.OT_DFLT_UPFNT_SCAT_IND);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.REVENUE_REPORT_IND)) {\n this.REVENUE_REPORT_IND = data().deepCopy(fields()[6].schema(), other.REVENUE_REPORT_IND);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.REVENUE_DEFAULT_IND)) {\n this.REVENUE_DEFAULT_IND = data().deepCopy(fields()[7].schema(), other.REVENUE_DEFAULT_IND);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.REVENUE_SEQUENCE)) {\n this.REVENUE_SEQUENCE = data().deepCopy(fields()[8].schema(), other.REVENUE_SEQUENCE);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.INVALID_NORMAL_ORDERS)) {\n this.INVALID_NORMAL_ORDERS = data().deepCopy(fields()[9].schema(), other.INVALID_NORMAL_ORDERS);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.ORDER_TYPES_ID)) {\n this.ORDER_TYPES_ID = data().deepCopy(fields()[10].schema(), other.ORDER_TYPES_ID);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.OT_AVAIL_CACHE_IND)) {\n this.OT_AVAIL_CACHE_IND = data().deepCopy(fields()[11].schema(), other.OT_AVAIL_CACHE_IND);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.SRC_KEY_VAL)) {\n this.SRC_KEY_VAL = data().deepCopy(fields()[12].schema(), other.SRC_KEY_VAL);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.SRC_CDC_OPER_NM)) {\n this.SRC_CDC_OPER_NM = data().deepCopy(fields()[13].schema(), other.SRC_CDC_OPER_NM);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.SRC_COMMIT_DT_UTC)) {\n this.SRC_COMMIT_DT_UTC = data().deepCopy(fields()[14].schema(), other.SRC_COMMIT_DT_UTC);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.TRG_CRT_DT_PART_UTC)) {\n this.TRG_CRT_DT_PART_UTC = data().deepCopy(fields()[15].schema(), other.TRG_CRT_DT_PART_UTC);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.SRC_SCHEMA_NM)) {\n this.SRC_SCHEMA_NM = data().deepCopy(fields()[16].schema(), other.SRC_SCHEMA_NM);\n fieldSetFlags()[16] = true;\n }\n }", "WithCreate withTags(Object tags);", "public Pair(Object exchange, PairType type) {\n\t\tthis.exchange = exchange;\n\t\tthis.type = type;\n\t}", "TypedObjectDecl createTypedObjectDecl();", "public static SequenceCharMapper instance(String fromChars, String toChars) {\r\n return new SequenceCharMapper(fromChars, toChars);\r\n }" ]
[ "0.64151454", "0.52884185", "0.491656", "0.44607627", "0.4386548", "0.43758443", "0.43655875", "0.43343174", "0.43293265", "0.43239814", "0.43168235", "0.43075868", "0.42531592", "0.42077184", "0.4197882", "0.41959998", "0.41858172", "0.41454047", "0.41182533", "0.41138637", "0.41094744", "0.410591", "0.40914577", "0.40847188", "0.4076745", "0.4076494", "0.4074113", "0.4068495", "0.40654728", "0.4058407", "0.40543142", "0.4041342", "0.40357718", "0.401552", "0.3998799", "0.3998799", "0.3979291", "0.39772862", "0.3970989", "0.39613032", "0.39522293", "0.39508548", "0.39501402", "0.3909036", "0.38925833", "0.38713422", "0.38636717", "0.38569677", "0.38548735", "0.38484585", "0.38455227", "0.3842678", "0.38399357", "0.3839686", "0.3835047", "0.38299793", "0.38297784", "0.38251045", "0.38239905", "0.38233063", "0.38226444", "0.38080087", "0.37972647", "0.3791607", "0.37875912", "0.37833998", "0.37773493", "0.37767008", "0.37652496", "0.3760751", "0.37571204", "0.3738873", "0.37381908", "0.37381846", "0.37309182", "0.3724684", "0.37242976", "0.37229517", "0.37188756", "0.37185806", "0.3717248", "0.37166715", "0.37155342", "0.3711393", "0.37100783", "0.37064886", "0.370315", "0.36964595", "0.36939096", "0.36929774", "0.36927763", "0.36872685", "0.36842066", "0.36768284", "0.36758643", "0.36742207", "0.3671945", "0.367084", "0.3670468", "0.36685058" ]
0.8358998
0
/This API will return map which contains different property values to provided objects, if both objects are same interms their property than it will return empty map
public static Map<String, Map<Object, Object>> getDiffirentComparisionVal(Device d1, Device d2) throws IllegalArgumentException, IllegalAccessException { //Node root = ObjectDifferBuilder.buildDefault().compare(d1, d2); //To get Device one property Map <Object, Object> device1Fields = getFields(d1); //To get Device one property Map <Object, Object> device2Fields = getFields(d2); //Map to get Device difference property value Map <Object, Object> DeviceResult1 = new HashMap<>(); Map <Object, Object> DeviceResult2 = new HashMap<>(); Map <String, Map<Object, Object>> deviceComparisonMap = new HashMap<>(); device1Fields.forEach((k,v)->{ if(null != v && !device2Fields.get(k).equals(v)){ DeviceResult1.put(k, v); DeviceResult2.put(k, device2Fields.get(k)); } }); deviceComparisonMap.put(d1.getCmMacAddress(), DeviceResult1); deviceComparisonMap.put(d2.getCmMacAddress(), DeviceResult2); return deviceComparisonMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Map<String, String> syncAttributes(Map<String, String> first, Map<String, String> second){\n Map<String, String> synced = new HashMap<>();\n\n for(String firstKey : first.keySet()){\n if(second.containsKey(firstKey)){\n //both contain the same key -> take from second\n synced.put(firstKey, second.get(firstKey));\n }else{\n //second doesn't contain this key -> take from first\n synced.put(firstKey, first.get(firstKey));\n }\n }\n\n for(String secondKey : second.keySet()){\n if(!synced.containsKey(secondKey)){\n //since first doesn't contain this key (or it would already be in syned) we take this key\n synced.put(secondKey, second.get(secondKey));\n }\n }\n return synced;\n }", "Map<String, String> getCombinedMap() {\n Map<String, String> all = new HashMap<String, String>(plainProps);\n all.putAll(xProps);\n all.putAll(xxProps);\n all.putAll(sysProps);\n return all;\n }", "private Map mergeResults(Map first, Map second) {\n/* 216 */ Iterator verb_enum = second.keySet().iterator();\n/* 217 */ Map clonedHash = new HashMap(first);\n/* */ \n/* */ \n/* 220 */ while (verb_enum.hasNext()) {\n/* 221 */ String verb = verb_enum.next();\n/* 222 */ List cmdVector = (List)clonedHash.get(verb);\n/* 223 */ if (cmdVector == null) {\n/* 224 */ clonedHash.put(verb, second.get(verb));\n/* */ continue;\n/* */ } \n/* 227 */ List oldV = (List)second.get(verb);\n/* 228 */ cmdVector = new ArrayList(cmdVector);\n/* 229 */ cmdVector.addAll(oldV);\n/* 230 */ clonedHash.put(verb, cmdVector);\n/* */ } \n/* */ \n/* 233 */ return clonedHash;\n/* */ }", "@Test\n public void map() {\n \n /*\n * Construct the mapper factory;\n */\n MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();\n \n /*\n * Register mappings for the fields whose names done match; 'byDefault' covers the matching ones\n */\n mapperFactory.classMap(A.class, B1.class)\n .field(\"a1.Pa11\", \"Pb11\")\n .field(\"a1.Pa12\", \"Pb12\")\n .byDefault()\n .register();\n \n mapperFactory.classMap(A.class, B2.class)\n .field(\"a2.Pa21\", \"Pb21\")\n .field(\"a2.Pa22\", \"Pb22\")\n .byDefault()\n .register();\n \n /*\n * Construct some test object\n */\n A source = new A();\n source.p1 = new Property(\"p1\", \"p1.value\");\n source.p2 = new Property(\"p2\", \"p2.value\");\n source.a1 = new A1();\n source.a1.Pa11 = new Property(\"Pa11\", \"Pa11.value\");\n source.a1.Pa12 = new Property(\"Pa12\", \"Pa12.value\");\n source.a2 = new A2();\n source.a2.Pa21 = new Property(\"Pa21\", \"Pa21.value\");\n source.a2.Pa22 = new Property(\"Pa22\", \"Pa22.value\");\n \n MapperFacade mapper = mapperFactory.getMapperFacade();\n \n Collection<A> collectionA = new ArrayList<>();\n collectionA.add(source);\n\n /*\n * Map the collection of A into a collection of B1 using 'mapAsList'\n */\n Collection<B1> collectionB1 = mapper.mapAsList(collectionA, B1.class);\n \n Assert.assertNotNull(collectionB1);\n B1 b1 = collectionB1.iterator().next();\n Assert.assertEquals(source.p1, b1.p1);\n Assert.assertEquals(source.p2, b1.p2);\n Assert.assertEquals(source.a1.Pa11, b1.Pb11);\n Assert.assertEquals(source.a1.Pa12, b1.Pb12);\n \n /*\n * Map the collection of A into a collection of B2 using 'mapAsList'\n */\n Collection<B2> collectionB2 = mapper.mapAsList(collectionA, B2.class);\n \n B2 b2 = collectionB2.iterator().next();\n Assert.assertNotNull(b2);\n Assert.assertEquals(source.p1, b2.p1);\n Assert.assertEquals(source.p2, b2.p2);\n Assert.assertEquals(source.a2.Pa21, b2.Pb21);\n Assert.assertEquals(source.a2.Pa22, b2.Pb22);\n }", "@Ignore\n @Test\n public void whenAddTwoUsersWithTheSameNameAndBirthdayToHashMapThenGetTwoElementsAdded() {\n Calendar birthday = Calendar.getInstance();\n birthday.set(1001, 12, 21);\n User john = new User(\"John Snow\", birthday);\n User snow = new User(\"John Snow\", birthday);\n\n Map<User, String> map = new HashMap<>();\n map.put(john, \"John Snow\");\n map.put(snow, \"John Snow\");\n System.out.println(map);\n\n assertThat(\"Map has two values.\", map.size(), is(2));\n }", "Boolean same(MapComp<K, V> m);", "public static void main(String[] args) {\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"a\", \"A\");\r\n map.put(\"b\", \"B\");\r\n map.put(\"c\", \"C\");\r\n \r\n \r\n int h = (new TestMap()).hashCode();\r\n \r\n String a = map.get(\"a\");\r\n \r\n \r\n \r\n \r\n for (String o : map.keySet()){\r\n \tSystem.out.println(o);\r\n \tSystem.out.println(map.get(o));\r\n \t\r\n }\r\n \r\n Map<String, String> map2 = new HashMap<String, String>();\r\n map2.putAll(map);\r\n \r\n for (Map.Entry<String, String> o : map2.entrySet()){\r\n \tSystem.out.println(o.getKey());\r\n \tSystem.out.println(o.getValue());\r\n }\r\n \r\n System.out.println(map2.containsValue(\"A\")); \r\n System.out.println(map2.equals(map)); \r\n\r\n\t}", "@Test\n\tpublic void doEqualsTestDifferentMaps() {\n\t\tassertFalse(bigBidiMap.equals(leftChildMap));\n\n\t}", "private static boolean haveSameSkeleton(JsonObject object1, JsonObject object2){\n\t\tboolean res = (object1.entrySet().size() == object2.entrySet().size());\n\t\tSystem.err.println(res);\n\t\tif (res){\n\t\t\tfor(java.util.Map.Entry<String, JsonElement> entry : object1.entrySet()){\n\t\t\t\tif (!object2.has(entry.getKey())) return false;\n\t\t\t}\n\t\t\treturn true;\t\t\t\n\t\t}\n\t\telse return false;\n\t}", "protected Map createPropertiesMap() {\n return new HashMap();\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 }", "@Test\n\tpublic void doEqualsTestSameMapDifferentInstances() {\n\t\tassertTrue(bigBidiMap.equals(bigBidiMap_other));\n\n\t}", "public static Map<Object, Object> beanProperties(Object bean) {\r\n\t\ttry {\r\n\t\t\tMap<Object, Object> map = new HashMap<>();\r\n\t\t\tArrays.asList(Introspector.getBeanInfo(bean.getClass(), Object.class).getPropertyDescriptors()).stream()\r\n\t\t\t\t\t// filter out properties with setters only\r\n\t\t\t\t\t.filter(pd -> Objects.nonNull(pd.getReadMethod())).forEach(pd -> { // invoke\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// method\r\n\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\tObject value = pd.getReadMethod().invoke(bean);\r\n\r\n\t\t\t\t\t\t\tif (value != null) {\r\n\t\t\t\t\t\t\t\tboolean ignored = false;\r\n\t\t\t\t\t\t\t\tStringBuilder key = new StringBuilder();\r\n\t\t\t\t\t\t\t\tString fieldName = pd.getName();\r\n\t\t\t\t\t\t\t\tkey.append(fieldName.substring(0, 1).toLowerCase());\r\n\t\t\t\t\t\t\t\tkey.append(fieldName.substring(1));\r\n\t\t\t\t\t\t\t\tPropertyDescriptor mm = null;\r\n\r\n\t\t\t\t\t\t\t\tif (value instanceof MongoBean) {\r\n\r\n\t\t\t\t\t\t\t\t\tMongoBean mongoValue = (MongoBean) value;\r\n\r\n\t\t\t\t\t\t\t\t\t// Class type = pd.getName().getType();\r\n\r\n\t\t\t\t\t\t\t\t\tField field = getField(bean.getClass(), pd.getName());\r\n\t\t\t\t\t\t\t\t\tAnnotation[] annotations = field.getDeclaredAnnotations();\r\n\r\n\t\t\t\t\t\t\t\t\tMap<Object, Object> mapKey = beanProperties(mongoValue);\r\n\t\t\t\t\t\t\t\t\tboolean embedded = true;\r\n\t\t\t\t\t\t\t\t\tboolean idOnly = false;\r\n\r\n\t\t\t\t\t\t\t\t\tfor (Annotation annotation : annotations) {\r\n\t\t\t\t\t\t\t\t\t\t//ignore any transient value criteria\r\n\t\t\t\t\t\t\t\t\t\tif (annotation.toString().contains(\"Transient\")) {\r\n\t\t\t\t\t\t\t\t\t\t\tignored = true;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (annotation.toString()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.contains(\"org.mongodb.morphia.annotations.Reference\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t// key.append(pd.getName());\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tembedded = false;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (annotation.toString().contains(\"idOnly=true\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tidOnly = true;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (embedded && !ignored) {\r\n\t\t\t\t\t\t\t\t\t\tkey.append(\".\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (embedded && !ignored) {\r\n\t\t\t\t\t\t\t\t\t\tfor (Object key2 : mapKey.keySet()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// key.append(MongoBean.ID_PROPERTY);\r\n\t\t\t\t\t\t\t\t\t\t\tStringBuilder newKey = new StringBuilder();\r\n\t\t\t\t\t\t\t\t\t\t\tnewKey.append(key);\r\n\t\t\t\t\t\t\t\t\t\t\tnewKey.append(key2);\r\n\t\t\t\t\t\t\t\t\t\t\tmap.put(newKey.toString(), mapKey.get(key2));\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else if (!ignored) {\r\n\t\t\t\t\t\t\t\t\t\tif (idOnly) {\r\n\t\t\t\t\t\t\t\t\t\t\tmap.put(key.toString(), mongoValue.getId());\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tmap.put(key.toString(), mongoValue);\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\r\n\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\tField field = getField(bean.getClass(),\r\n\t\t\t\t\t\t\t\t\t\t\tStringUtil.LowerCaseFirstLetter(pd.getName()));\r\n\t\t\t\t\t\t\t\t\tAnnotation[] annotations = field.getDeclaredAnnotations();\r\n\t\t\t\t\t\t\t\t\tfor (Annotation annotation : annotations) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (annotation.toString().contains(\"Transient\")) {\r\n\t\t\t\t\t\t\t\t\t\t\tignored = true;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (!ignored) {\r\n\t\t\t\t\t\t\t\t\t\tmap.put(key.toString(), value);\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} catch (Exception e) {\r\n\t\t\t\t\t\t\t// e.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\treturn map;\r\n\t\t} catch (IntrospectionException e) {\r\n\t\t\t// and here, too\r\n\t\t\treturn Collections.emptyMap();\r\n\t\t}\r\n\t}", "public void testOkDupFields() throws Exception\n {\n OkDupFieldBean bean = new OkDupFieldBean(1, 2);\n Map<String,Object> json = writeAndMap(MAPPER, bean);\n assertEquals(2, json.size());\n assertEquals(Integer.valueOf(1), json.get(\"x\"));\n assertEquals(Integer.valueOf(2), json.get(\"y\"));\n }", "private boolean haveTwoObjsSameFields(Class classObjects, Object obj1, Object obj2, ArrayList<String> fieldsToExcludeFromCompare) {\n log.info(\"TEST: comparing two objects of class \"+classObjects.getName());\n if (obj1.getClass() != obj2.getClass()) {\n log.error(\"TEST: The two objects are instances of different classes, thus different\");\n return false;\n }\n\n try {\n PropertyDescriptor[] pds= Introspector.getBeanInfo(classObjects).getPropertyDescriptors();\n for(PropertyDescriptor pd: pds) {\n log.info(pd.getDisplayName());\n String methodName=pd.getReadMethod().getName();\n String fieldName = methodName.substring(3, methodName.length());\n\n if(fieldsToExcludeFromCompare.contains(fieldName)==true) {\n continue;\n }\n\n boolean areEqual=false;\n try {\n Object objReturned1 = pd.getReadMethod().invoke(obj1);\n Object objReturned2 =pd.getReadMethod().invoke(obj2);\n if(objReturned1!=null && objReturned2!=null) {\n areEqual=objReturned1.equals(objReturned2);\n if(objReturned1 instanceof List<?> && ((List) objReturned1).size()>0 && ((List) objReturned1).size()>0 && ((List) objReturned1).get(0) instanceof String) {\n String str1=String.valueOf(objReturned1);\n String str2=String.valueOf(objReturned2);\n areEqual=str1.equals(str2);\n\n }\n }\n else if(objReturned1==null && objReturned2==null) {\n log.info(\"TEST: Field with name \"+fieldName+\" null in both objects.\");\n areEqual=true;\n }\n else {\n //log.info(\"One of two objects is null\");\n //log.info(\"{}\",objReturned1);\n //log.info(\"{}\",objReturned2);\n }\n if(areEqual==false) {\n log.info(\"TEST: field with name \"+fieldName+\" has different values in objects. \");\n return false;\n }\n else{\n log.info(\"TEST: field with name \"+fieldName+\" has same value in both objects. \");\n }\n } catch (IllegalAccessException e) {\n\n e.printStackTrace();\n return false;\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n return false;\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n return false;\n }\n }\n } catch (IntrospectionException e) {\n e.printStackTrace();\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof BookingMap)) {\n return false;\n }\n BookingMap other = (BookingMap) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public static void main(String[] args) {\n Map<Integer, Integer> map = new HashMap<>();\r\n map.put(1, 1); // first pair\r\n map.put(2, 1); // second pair\r\n map.put(1, 3); // update the value of first pair\r\n\r\n // book - sales\r\n Book b1 = new Book(\"learn js\", 20);\r\n Book b2 = new Book(\"learn java\", 30);\r\n // we want to consider two books with same\r\n // name and same price to be matching\r\n Book b3 = new Book(\"learn css\", 10);\r\n Book b4 = new Book(\"learn css\", 10);\r\n Book b5 = new Book(\"learn csa\", 28);\r\n Map<Book, Integer> bookSales = new HashMap<>();\r\n bookSales.put(b1, 200);\r\n bookSales.put(b2, 400);\r\n bookSales.put(b3, 600);\r\n bookSales.put(b4, 300);\r\n bookSales.put(b5, 900);\r\n // 1. b3 and b4 are consider as different key\r\n // 2. HashMap does not reserve insertion order.(sorted)\r\n System.out.println(bookSales);\r\n\r\n System.out.println(b1.hashCode()); // 1836019240\r\n System.out.println(b2.hashCode()); // 325040804\r\n System.out.println(b3.hashCode() == b4.hashCode()); // false\r\n\r\n System.out.println(calc(b1.hashCode()));\r\n System.out.println(calc(b2.hashCode()));\r\n System.out.println(calc(b3.hashCode()));\r\n System.out.println(calc(b4.hashCode()));\r\n System.out.println(calc(b5.hashCode()));\r\n\r\n System.out.println(hash(b3.hashCode()));\r\n System.out.println(hash(b4.hashCode()));\r\n System.out.println(hash(b5.hashCode()));\r\n\r\n\r\n // keys' hashcode are different, indies may be different or same.\r\n // indies which are calculated are different, keys' hash must be different\r\n\r\n // TreeMap\r\n // sorted map by key\r\n // The key must be Comparable or create map with custom comparator\r\n Comparator<String> comparator = new Comparator<String>() {\r\n @Override\r\n public int compare(String o1, String o2) {\r\n return o2.compareTo(o1);\r\n }\r\n };\r\n Map<String, Integer> scores = new TreeMap<>(comparator);\r\n scores.put(\"bob\", 80);\r\n scores.put(\"alice\", 100);\r\n scores.put(\"zack\", 90);\r\n System.out.println(scores);\r\n\r\n // LinkedHashMap: sorted map by insertion order\r\n\r\n Map<String, Integer> scores1 = new HashMap<>();\r\n scores1.put(\"alice\", 90);\r\n scores1.put(\"bob\", 80);\r\n scores1.put(\"zack\", 100);\r\n // your codes start here\r\n\r\n System.out.println(scores1); // sorted by score1(value)\r\n }", "private boolean equalKeys(Object other) {\r\n if (this == other) {\r\n return true;\r\n }\r\n if (!(other instanceof Contacto)) {\r\n return false;\r\n }\r\n Contacto that = (Contacto) other;\r\n if (this.getIdContacto() != that.getIdContacto()) {\r\n return false;\r\n }\r\n return true;\r\n }", "private <T extends Reference> void buildMap(Map<String, T> map, List<T> objects) {\n for (T candidateObject : objects) {\n String rid = candidateObject.getId();\n log.debug(\"...... caching RID: {}\", rid);\n map.put(rid, candidateObject);\n }\n }", "private Set<Staff> getClonedEquivalent(Set<Staff> originalStaff, Map<Long, Staff> oldIdToNewStaff) {\n\tSet<Staff> clonedStaffSet = new HashSet<Staff>();\n\tfor (Staff originalStf : originalStaff) {\n\t Staff newStaff = oldIdToNewStaff.get(originalStf.getId());\n\t if (newStaff == null) {\n\t\tcontinue;\n\t }\n\t clonedStaffSet.add(newStaff);\n\t}\n\treturn clonedStaffSet;\n }", "private HashMap<ComparableExpression, HashSet<ComparableExpression>> composition(\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rel1,\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rel2) {\n\n HashMap<ComparableExpression, HashSet<ComparableExpression>> newRel = new HashMap<>();\n // (a,b) in rel1, (b,c) in rel2 => put (a,c) into newRel\n for (Map.Entry<ComparableExpression, HashSet<ComparableExpression>> r1 : rel1.entrySet()) {\n ComparableExpression key = r1.getKey();\n for (ComparableExpression oldValue : r1.getValue()) {\n // transitive relation?\n if (rel2.containsKey(oldValue)) {\n HashSet<ComparableExpression> newValues = rel2.get(oldValue);\n newRel.putIfAbsent(key, new HashSet<>());\n newRel.get(key).addAll(newValues);\n }\n }\n }\n return newRel;\n }", "@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}", "private static void mergeTables(Hashtable<? super String, Object> props1,\n Hashtable<? super String, Object> props2) {\n for (Object key : props2.keySet()) {\n String prop = (String) key;\n Object val1 = props1.get(prop);\n if (val1 == null) {\n props1.put(prop, props2.get(prop));\n } else if (isListProperty(prop)) {\n String val2 = (String) props2.get(prop);\n props1.put(prop, ((String) val1) + \":\" + val2);\n }\n }\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 }", "public Set<ConfigMapDTO> getMapProperties() {\n \t\treturn new HashSet<ConfigMapDTO>(mapProperties.values());\n \t}", "@Test\n public void whenAddTwoUsersWithTheSameNameAndBirthdayToHashMapThenGetOneElementAdded() {\n Calendar birthday = Calendar.getInstance();\n birthday.set(1001, 12, 21);\n User john = new User(\"John Snow\", birthday);\n User snow = new User(\"John Snow\", birthday);\n\n Map<User, String> map = new HashMap<>();\n map.put(john, \"John Snow 1\");\n map.put(snow, \"John Snow 2\");\n System.out.println(map);\n\n assertThat(\"Map has two values.\", map.size(), is(1));\n }", "public Map<AnnotatedWithParams, BeanPropertyDefinition[]> _findCreatorsFromProperties(DeserializationContext ctxt, BeanDescription beanDesc) throws JsonMappingException {\n Map<AnnotatedWithParams, BeanPropertyDefinition[]> result = Collections.emptyMap();\n for (BeanPropertyDefinition propDef : beanDesc.findProperties()) {\n Iterator<AnnotatedParameter> it = propDef.getConstructorParameters();\n while (true) {\n if (it.hasNext()) {\n AnnotatedParameter param = (AnnotatedParameter) it.next();\n AnnotatedWithParams owner = param.getOwner();\n BeanPropertyDefinition[] defs = (BeanPropertyDefinition[]) result.get(owner);\n int index = param.getIndex();\n if (defs == null) {\n if (result.isEmpty()) {\n result = new LinkedHashMap<>();\n }\n defs = new BeanPropertyDefinition[owner.getParameterCount()];\n result.put(owner, defs);\n } else if (defs[index] != null) {\n throw new IllegalStateException(\"Conflict: parameter #\" + index + \" of \" + owner + \" bound to more than one property; \" + defs[index] + \" vs \" + propDef);\n }\n defs[index] = propDef;\n }\n }\n }\n return result;\n }", "private Map<String, String> convertArrayToMap(PairDTO[] pairDTOs) {\n Map<String, String> map = new HashMap<>();\n for (PairDTO pairDTO : pairDTOs) {\n map.put(pairDTO.getKey(), pairDTO.getValue());\n }\n return map;\n }", "public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}", "public static <T> Map<String, T> getByName(List<T> namedObjects, Function<T, String> nameFn, BinaryOperator<T> mergeFunc) {\n return namedObjects.stream().collect(Collectors.toMap(\n nameFn,\n identity(),\n mergeFunc)\n );\n }", "private Map deepMerge(Map original, Map newMap) {\r\n for (Object key : newMap.keySet()) {\r\n if (newMap.get(key) instanceof Map && original.get(key) instanceof Map) {\r\n Map originalChild = (Map) original.get(key);\r\n Map newChild = (Map) newMap.get(key);\r\n original.put(key, deepMerge(originalChild, newChild));\r\n } else if (newMap.get(key) instanceof List && original.get(key) instanceof List) {\r\n List originalChild = (List) original.get(key);\r\n List newChild = (List) newMap.get(key);\r\n for (Object each : newChild) {\r\n if (!originalChild.contains(each)) {\r\n originalChild.add(each);\r\n }\r\n }\r\n } else {\r\n original.put(key, newMap.get(key));\r\n }\r\n }\r\n return original;\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}", "private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }", "Map<String, Object> getPropertiesAsMap();", "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 Map<String, String> a(Map<String, String> map, @Nullable Map<String, String> map2) {\n LinkedHashMap linkedHashMap = new LinkedHashMap(map);\n if (map2 == null) {\n return linkedHashMap;\n }\n for (Entry entry : map2.entrySet()) {\n String str = (String) entry.getKey();\n String str2 = (String) linkedHashMap.get(str);\n linkedHashMap.put(str, a(str).a(str2, (String) entry.getValue()));\n }\n return linkedHashMap;\n }", "static Map<Name, ObjectConverter> createConversionMap (final FeatureType input, final FeatureType toConvert) throws NonconvertibleObjectException{\n\n if(input.equals(toConvert)){\n return null;\n }\n final Map<Name, ObjectConverter> map = new HashMap<Name, ObjectConverter>();\n\n for (PropertyDescriptor toConvertDesc : toConvert.getDescriptors()) {\n for(PropertyDescriptor inputDesc : input.getDescriptors()){\n\n //same property name\n if(toConvertDesc.getName().equals(inputDesc.getName())){\n\n final Class inputClass = inputDesc.getType().getBinding();\n final Class toConvertClass = toConvertDesc.getType().getBinding();\n if(toConvertClass.equals(inputClass)){\n //same name and same type\n map.put(toConvertDesc.getName(), null);\n }else{\n //same name but different type\n if(toConvertDesc instanceof GeometryDescriptor){\n map.put(toConvertDesc.getName(), new GeomConverter(toConvertClass, inputClass));\n }else{\n map.put(toConvertDesc.getName(), ConverterRegistry.system().converter(toConvertClass, inputClass));\n }\n }\n }\n }\n }\n return map;\n\n }", "public Map<String, Object> publicMap(boolean includeSingleRelationShip) {\n\t\tMap<String, Object> map = publicMap();\n\t\tif (includeSingleRelationShip) {\n\t\t\tmap.put(\"user\", this.user == null ? null\t: this.user.publicMap());\n\t\t\tmap.put(\"field\", this.field == null ? null : this.field.publicMap());\n\t\t}\n\t\treturn map;\n\t}", "public static Map<String, String> asMap(Properties props){\r\n\t\tMap<String, String> result = new HashMap<String, String>();\r\n\t\tfor (Map.Entry<Object, Object> entry: props.entrySet()) {\r\n\t\t\tObject value = entry.getValue();\r\n\t\t\tString valueString = (value == null)? null: value.toString();\r\n\t\t\tresult.put(entry.getKey().toString(), valueString);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof MapPromoMch)) {\n return false;\n }\n MapPromoMch other = (MapPromoMch) object;\n if ((this.mapPromoMchId == null && other.mapPromoMchId != null) || (this.mapPromoMchId != null && !this.mapPromoMchId.equals(other.mapPromoMchId))) {\n return false;\n }\n return true;\n }", "protected abstract Map<String, Object> _getMulti(Set<String> keys);", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Sanpham)) {\n return false;\n }\n Sanpham that = (Sanpham) other;\n Object myMasp = this.getMasp();\n Object yourMasp = that.getMasp();\n if (myMasp==null ? yourMasp!=null : !myMasp.equals(yourMasp)) {\n return false;\n }\n return true;\n }", "public final Map<String, Object> buildMap(Object... objs) {\n Map<String, Object> out = new LinkedHashMap<>();\n for (int i = 0; i < objs.length; i += 2) {\n out.put(objs[i].toString(), objs[i + 1]);\n }\n return out;\n }", "@Test\n public void test2 ()\n {\n MyMap m = new MyMap();\n m.put(\"a\", \"1\");\n m.put(\"b\", \"2\");\n m.put(\"a\", \"3\");\n assertEquals(2, m.size());\n assertEquals(\"3\", m.get(\"a\"));\n assertEquals(\"2\", m.get(\"b\"));\n assertNull(m.get(\"c\"));\n }", "public MapAssertion<K, V> containsAll(final K expectedKey1, final V expectedValue1, final K expectedKey2, final V expectedValue2) {\n Map<K, V> expected = new LinkedHashMap<>();\n expected.put(expectedKey1, expectedValue1);\n expected.put(expectedKey2, expectedValue2);\n containsAll(expected);\n return this;\n }", "public static Map<String, Property> getDefaultMapping() {\n\t\tMap<String, Property> props = new HashMap<String, Property>();\n\t\tprops.put(\"nstd\", Property.of(p -> p.nested(n -> n.enabled(true))));\n\t\tprops.put(\"properties\", Property.of(p -> {\n\t\t\t\tif (nestedMode()) {\n\t\t\t\t\tp.nested(n -> n.enabled(true));\n\t\t\t\t} else {\n\t\t\t\t\tp.object(n -> n.enabled(true));\n\t\t\t\t}\n\t\t\t\treturn p;\n\t\t\t}\n\t\t));\n\t\tprops.put(\"latlng\", Property.of(p -> p.geoPoint(n -> n.nullValue(v -> v.text(\"0,0\")))));\n\t\tprops.put(\"_docid\", Property.of(p -> p.long_(n -> n.index(false))));\n\t\tprops.put(\"updated\", Property.of(p -> p.date(n -> n.format(DATE_FORMAT))));\n\t\tprops.put(\"timestamp\", Property.of(p -> p.date(n -> n.format(DATE_FORMAT))));\n\n\t\tprops.put(\"tag\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"id\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"key\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"name\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"type\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"tags\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"token\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"email\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"appid\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"groups\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"password\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"parentid\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"creatorid\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"identifier\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\treturn props;\n\t}", "private void merge(Map<String, NodeT> source, Map<String, NodeT> target) {\n for (Map.Entry<String, NodeT> entry : source.entrySet()) {\n String key = entry.getKey();\n if (!target.containsKey(key)) {\n target.put(key, entry.getValue());\n }\n }\n }", "Map<String, Object> getServiceSpecificObjects();", "@Override\n public boolean hardDiff(FObject o1, FObject o2, FObject diff) {\n if ( this.get(o1) == null ) {\n if ( this.get(o2) == null ) {\n return false;\n } else {\n //shadow copy, since we only use to print out diff entry in journal\n this.set(diff, this.get(o2));\n return true;\n }\n }\n //Both this.get(o1) and thid.get(o2) are not null\n //The propertyInfo is instance of AbstractObjectProperty, so that there is no way to do nested propertyInfo check\n //No matter if there are point to same instance or not, treat them as difference\n //if there are point to different instance, indeed there are different\n //if there are point to same instance, we can not guarantee if there are no difference comparing with record in the journal.\n //shodow copy\n this.set(diff, this.get(o2));\n return true;\n }", "public static void main(String[] args) {\n\t\tMap<BigDecimal, String> result3 = items.stream()\r\n\t\t\t\t.collect(Collectors.toMap(Item::getPrice, Item::getName, (s, a) -> s + \", \" + a));\r\n\t\tresult3.forEach((k, v) -> System.out.println(k + \" \" + v));\r\n\r\n\t\tMap<Integer, String> map = items.stream()\r\n\t\t\t\t.collect(Collectors.toMap(Item::getQuantity, Item::getName, (x, y) -> x + \", \" + y));\r\n\t\tmap.forEach((x, y) -> System.out.println(\"Key: \" + x + \", value: \" + y));\r\n\t\tMap<Integer, String> map1 = items.stream().collect(\r\n\t\t\t\tCollectors.toMap(Item::getQuantity, Item::getName, (x, y) -> x + \", \" + y, LinkedHashMap::new));\r\n\t\tmap.forEach((x, y) -> System.out.println(\"Key: \" + x + \", value: \" + y));\r\n\r\n\t\t/*\r\n\t\t * Map<BigDecimal, List<Item>> result1 =\r\n\t\t * items.stream().collect(Collectors.groupingBy(Item::getPrice));\r\n\t\t * Map<BigDecimal, List<Item>> result2 = items.stream()\r\n\t\t * .collect(Collectors.groupingBy(Item::getPrice, Collectors.toList()));\r\n\t\t * Map<BigDecimal, Item> result4 =\r\n\t\t * items.stream().collect(Collectors.toMap(Item::getPrice, Item -> Item));\r\n\t\t * Map<BigDecimal, String> toMapuse = items.stream()\r\n\t\t * .collect(Collectors.toMap(Item::getPrice, Item::getName, (s, a) -> s + \", \" +\r\n\t\t * a)); ///toMapuse.forEach((k, v) -> System.out.print(k + \" \" + v));\r\n\t\t */\r\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate static List<Object> mergeResult(List<Object> list1, List<Object> list2) {\n\t\tList<Object> result = new ArrayList<Object>();\n\t\tfor (int i = 0; i < list1.size(); i++) {\n\t\t\tfor (int j = 0; j < list2.size(); j++) {\n\t\t\t\tif (Integer.parseInt(((Map) list1.get(i)).get(MongoDBConstants.DOCUMENT_ID).toString()) == Integer\n\t\t\t\t\t\t.parseInt(((Map) list2.get(j)).get(MongoDBConstants.DOCUMENT_ID).toString())) {\n\t\t\t\t\tMap data = new HashMap();\n\t\t\t\t\tint hour = (Integer.parseInt(((Map) list1.get(i)).get(MongoDBConstants.DOCUMENT_ID).toString()) + 8) % 24;\n\t\t\t\t\tdata.put(MongoDBConstants.DOCUMENT_ID, hour + \"\");\n\t\t\t\t\tdata.put(\"value\", Integer.parseInt(((Map) list1.get(i)).get(\"value\").toString())\n\t\t\t\t\t\t\t+ Integer.parseInt(((Map) list2.get(j)).get(\"value\").toString()));\n\t\t\t\t\tresult.add(data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "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 HashMap<String, String> getHashmapFromDTO(Object dto) {\n HashMap<String, String> mappings = new HashMap<String, String>();\n try {\n for (PropertyDescriptor propertyDescriptor :\n Introspector.getBeanInfo(dto.getClass()).getPropertyDescriptors()) {\n if (isGetter(propertyDescriptor)) {\n mappings.put(propertyDescriptor.getName(), getStringValueFromGetter(dto, propertyDescriptor));\n }\n }\n } catch (IntrospectionException e) {\n e.printStackTrace();\n }\n return mappings;\n\n }", "public static <K, V> Map<K, V> createMap(K key1, V value1, K key2, V value2) {\n\t\tif (key1.equals(key2))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Key1 = Key2, value1 will be overwritten! The createMap method requires unique keys.\");\n\t\tMap<K, V> map = new HashMap<K, V>();\n\t\tmap.put(key1, value1);\n\t\tmap.put(key2, value2);\n\t\treturn map;\n\t}", "public static Map<String, Object> convertToEntityMappingFieldAndValue(Object dto) {\n Map<String, Object> mapData = new HashMap<>();\n if (null != dto) {\n List<Field> fields = ObjectUtils.getFields(dto.getClass(), true);\n for (Field field : fields) {\n mapData.putAll(convertToEntityMappingFieldAndValue(dto, field));\n }\n }\n return mapData;\n }", "public Object obtDupla(Object key1, Object key2) {\r\n\t\tObject value=null;\r\n\t\tHashMap<String, Double> fila = structure.get(key1);\r\n\t\tif (fila != null)\r\n\t\t\tvalue = fila.get(key2);\r\n\t\treturn value;\r\n\t}", "default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }", "public static ImmutableMap<Long, Sample> mergeResults(final Map<Long, Sample> generated, final Map<Long, Sample> data) {\n final Map<Long, Sample> all = new HashMap<>();\n all.putAll(generated);\n all.putAll(data);\n return ImmutableMap.copyOf(all);\n }", "private Map<Species, Integer> mergeObservedSpeciesMap(List<Map<Species, Integer>> observedSpecies) {\n Map<Species, Integer> mergedMap = new HashMap<>();\n\n for (Map<Species, Integer> watchlist : observedSpecies) {\n for (Species species : watchlist.keySet()) {\n if (mergedMap.containsKey(species)) {\n mergedMap.put(species, mergedMap.get(species) + watchlist.get(species));\n } else {\n mergedMap.put(species, watchlist.get(species));\n }\n }\n }\n return mergedMap;\n }", "private static void generateMaps(Object bean)\n {\n try\n {\n att_map = new HashMap<>();\n getter_map = new HashMap<>();\n setter_map = new HashMap<>();\n\n Arrays.stream(Introspector.getBeanInfo(bean.getClass(), Object.class)\n .getPropertyDescriptors())\n // filter out properties with setters only\n .filter(pd -> Objects.nonNull(pd.getReadMethod()))\n .forEach(pd ->\n { // invoke method to get value\n try\n {\n Object value = pd.getReadMethod().invoke(bean);\n if (value != null)\n {\n att_map.put(pd.getName(), value);\n getter_map.put(pd.getName(), pd.getReadMethod());\n setter_map.put(pd.getName(), pd.getWriteMethod());\n }\n } catch (Exception e)\n {\n // add proper error handling here\n }\n });\n att_map = sortAsDeclaredOrder(bean,att_map);\n getter_map = sortAsDeclaredOrder(getter_map, bean);\n setter_map = sortAsDeclaredOrder(setter_map, bean);\n currentObject = bean;\n } catch (IntrospectionException e)\n {\n // and here, too\n att_map = null;\n getter_map = null;\n setter_map = null;\n currentObject = null;\n }\n }", "private static Map<String, String> createPropertiesAttrib() {\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"Property1\", \"Value1SA\");\r\n map.put(\"Property3\", \"Value3SA\");\r\n return map;\r\n }", "@Override\n\tpublic Map<String, String> Bean2Map(Object obj) {\n\t\tif (obj != null && obj instanceof AttentionBean) {\n\t\t\tAttentionBean bean = (AttentionBean) obj;\n\t\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\tmap.put(\"from_id\", bean.getFollowers_id());\n\t\t\tmap.put(\"to_id\", bean.getBy_follower_id());\n\t\t\treturn map;\n\t\t}\n\t\treturn null;\n\t}", "private boolean compareProperties (Properties props1 , Properties props2){\n boolean propertiesAreEqual = true;\n Properties props2Clone = (Properties)props2.clone();\n Iterator<Object> itProps1Name = props1.keySet().iterator();\n while (propertiesAreEqual && itProps1Name.hasNext()){\n String propertyName = (String)itProps1Name.next();\n if (props2Clone.containsKey(propertyName)){\n propertiesAreEqual = props1.getProperty(propertyName).trim()\n .equals(props2Clone.getProperty(propertyName).trim());\n // Remove checked property from props2Clone properties\n props2Clone.remove(propertyName);\n }\n else{\n propertiesAreEqual = false;\n }\n }\n // If there are left properties in CSS file then files are not equal\n if (props2Clone.size() > 0){\n propertiesAreEqual = false;\n }\n \n return propertiesAreEqual;\n \n }", "public static Map<String, Object> getNonNullProperties(Object bean)\n {\n generateMaps(bean);\n return att_map;\n }", "static void prediacteDiffHelper(HashMap<String, ArrayList<String>> first, \n\t\t\t\t\t\t\t\t\t\t\t\t\t HashMap<String, ArrayList<String>> second, Role role,\n\t\t\t\t\t\t\t\t\t\t\t\t\t HashMap<String, ActionRoles> output) {\n\t\tHashMap<String, ArrayList<String>> copy = new HashMap<>();\n\t\tfor (Entry<String, ArrayList<String>> entry : second.entrySet()) {\n\t\t\tcopy.put(entry.getKey(), new ArrayList<String>(entry.getValue()));\n\t\t}\n\t\tSet<String> actions = first.keySet();\n\t\tfor (String action : actions) {\n\t\t\tArrayList<String> firstPredicates = first.get(action);\n\t\t\tArrayList<String> secondPredicates = copy.get(action);\n\t\t\t// find the difference\n\t\t\tsecondPredicates.removeAll(firstPredicates);\n\t\t\t// update the HashMap\n\t\t\tfor (String predicate: secondPredicates) {\n\t\t\t\tif (output.get(predicate) == null) {\n\t\t\t\t\toutput.put(predicate, new ActionRoles());\n\t\t\t\t}\n\t\t\t\toutput.get(predicate).add(action, role);\n\t\t\t}\n\t\t}\n\t}", "public static HashMap merge(Map map1, Map map2) {\r\n\t\tHashMap retval = new HashMap(calcCapacity(map1.size() + map2.size()));\r\n\r\n\t\tretval.putAll(map1);\r\n\t\tretval.putAll(map2);\r\n\r\n\t\treturn retval;\r\n\t}", "private static Map<Object, Object> getFields(Device d1) {\n\t Class<? extends Device> deviceClass = d1.getClass();\n\t Field[] fields = deviceClass.getDeclaredFields();\n\t \n\t //Map to get property details to provided class\n\t \tMap<Object,Object> mapFields = new HashMap<>();\t \n\n\t Arrays.stream(fields)\n\t .forEach(\n\t field -> {\n\t field.setAccessible(true);\n\t try {\n\t \tmapFields.put(field.getName(), field.get(d1));\n\t } catch (final IllegalAccessException e) {\n\t \t\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tmapFields.put(field.getName(), field.get(d1));\n\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t }\n\t });\n\n\t return mapFields;\n\t}", "private Map<String, Object> createDefaultMap() {\n Map<String, Object> result = new LinkedHashMap<>();\n result.put(\"stream_speed0\", 1);\n result.put(\"stream_start0\", 0);\n result.put(\"stream_end0\", 7);\n result.put(\"stream_speed1\", -2);\n result.put(\"stream_start1\", 15);\n result.put(\"stream_end1\", 19);\n\n result.put(\"fish_quantity\", numFishes);\n result.put(\"fish_reproduction\", 3);\n result.put(\"fish_live\", 10);\n result.put(\"fish_speed\", 2);\n result.put(\"fish_radius\", 4);\n\n result.put(\"shark_quantity\", numSharks);\n result.put(\"shark_live\", 20);\n result.put(\"shark_hungry\", 7);\n result.put(\"shark_speed\", 2);\n result.put(\"shark_radius\", 5);\n\n return result;\n }", "@Test\n public void valuesTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.values());\n }", "private static boolean union(Map<String, Integer> map, String c1, String c2){\n if(!map.containsKey(c1) && !map.containsKey(c2)){\n map.put(c1, counter);\n map.put(c2, counter);\n counter++;\n return true;\n }\n\n if(!map.containsKey(c1) && map.containsKey(c2)) {\n int newValue = map.get(c2);\n map.put(c1 , newValue);\n return true;\n }\n\n\n if(map.containsKey(c1) && !map.containsKey(c2)) {\n int newValue = map.get(c1);\n map.put(c2 , newValue);\n return true;\n }\n\n\n //If different unions, Make the second oen to be the first one\n if(map.containsKey(c1) && map.containsKey(c2)){\n int newValue = map.get(c1);\n int oldValue = map.get(c2);\n\n if(newValue == oldValue){\n return false;\n }\n\n for(String city : map.keySet()){\n if(map.get(city) == oldValue){\n map.put(city , newValue);\n }\n return true;\n }\n }\n\n return true;\n }", "private static Map<String, Serializable> convertProps(Map<String, Serializable> properties, String typeId)\r\n {\r\n\r\n Map<String, Serializable> tmpProperties = new HashMap<String, Serializable>();\r\n if (properties != null)\r\n {\r\n tmpProperties.putAll(properties);\r\n }\r\n\r\n // Transform Alfresco properties to cmis properties\r\n for (Entry<String, String> props : ALFRESCO_TO_CMIS.entrySet())\r\n {\r\n if (tmpProperties.containsKey(props.getKey()))\r\n {\r\n tmpProperties.put(props.getValue(), tmpProperties.get(props.getKey()));\r\n tmpProperties.remove(props.getKey());\r\n }\r\n }\r\n\r\n // Take ObjectId provided in map or the default one provided by the\r\n // method\r\n String objectId = null;\r\n if (tmpProperties.containsKey(PropertyIds.OBJECT_TYPE_ID))\r\n {\r\n objectId = (String) tmpProperties.get(PropertyIds.OBJECT_TYPE_ID);\r\n }\r\n else\r\n {\r\n if (ContentModel.TYPE_CONTENT.equals(typeId))\r\n {\r\n objectId = BaseTypeId.CMIS_DOCUMENT.value();\r\n }\r\n else if (ContentModel.TYPE_FOLDER.equals(typeId))\r\n {\r\n objectId = BaseTypeId.CMIS_FOLDER.value();\r\n }\r\n else\r\n {\r\n objectId = typeId;\r\n }\r\n }\r\n\r\n // add aspects flags to objectId\r\n for (Entry<String, String> props : ALFRESCO_ASPECTS.entrySet())\r\n {\r\n if (tmpProperties.containsKey(props.getKey()) && !objectId.contains(props.getValue()))\r\n {\r\n objectId = objectId.concat(\",\" + props.getValue());\r\n }\r\n }\r\n\r\n // Log.d(TAG, objectId);\r\n\r\n tmpProperties.put(PropertyIds.OBJECT_TYPE_ID, objectId);\r\n\r\n return tmpProperties;\r\n }", "java.util.Map<java.lang.String, java.lang.String>\n getDetailsMap();", "private boolean compareBookedTicketsMap(Map<Integer, BookTickets> actualBookingTicketHashMap,Map<Integer, BookTickets> expectedBookingTicketHashMap) {\t\t\n\t\tboolean compareFlag = false;\n\t\tif(!actualBookingTicketHashMap.isEmpty()) {\n\t\t\tfor (int eachEntry : actualBookingTicketHashMap.keySet()) {\n\t\t\t\tBookTickets actualBookTicketObject = actualBookingTicketHashMap.get(eachEntry);\n\t\t\t\t\n\t\t\t\tBookTickets expectedBookTicketObject = expectedBookingTicketHashMap.get(eachEntry);\n\t\t\t\t\n\t\t\t\tif(actualBookTicketObject.getRefNumber() == expectedBookTicketObject.getRefNumber() && actualBookTicketObject.getNumbOfSeats() == expectedBookTicketObject.getNumbOfSeats()) {\n\t\t\t\t\tif(actualBookTicketObject.getSeats().equals(expectedBookTicketObject.getSeats()) && actualBookTicketObject.isBookingConfirmed() == expectedBookTicketObject.isBookingConfirmed()){\n\t\t\t\t\t\tcompareFlag = true;\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tcompareFlag = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcompareFlag = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n return compareFlag; \n\t}", "@Test\n public void mapToTest() throws Exception {\n RESTEasyContextMapper rcm = new RESTEasyContextMapper();\n RESTEasyBindingData rbd = new RESTEasyBindingData();\n\n Context context = new DefaultContext();\n context.setProperty(\"one\", Integer.valueOf(1));\n \n rcm.mapTo(context, rbd);\n Iterator<Map.Entry<String, List<String>>> entries = rbd.getHeaders().entrySet().iterator();\n while (entries.hasNext()) {\n Map.Entry<String, List<String>> entry = entries.next();\n List<String> values = entry.getValue();\n Assert.assertTrue(values.size() == 1);\n Assert.assertTrue(entry.getKey().equals(\"one\"));\n Assert.assertTrue(values.get(0).equals(\"1\"));\n }\n \n RESTEasyBindingData rbd2 = new RESTEasyBindingData();\n context.removeProperties();\n List<Integer> list = new ArrayList<Integer>();\n list.add(Integer.valueOf(1));\n list.add(Integer.valueOf(2));\n list.add(Integer.valueOf(3));\n context.setProperty(\"numbers\", list);\n rcm.mapTo(context, rbd2);\n entries = rbd2.getHeaders().entrySet().iterator();\n while (entries.hasNext()) {\n Map.Entry<String, List<String>> entry = entries.next();\n List<String> values = entry.getValue();\n Assert.assertTrue(values.size() == 3);\n Assert.assertTrue(entry.getKey().equals(\"numbers\"));\n for (String value : values) {\n Assert.assertTrue(values.get(0).equals(\"1\") || values.get(1).equals(\"2\") ||\n values.get(1).equals(\"3\"));\n }\n } \n }", "protected Map createCloneFromFields(Map fields_p) throws Exception\r\n {\r\n Map result = new HashMap();\r\n Set keys = fields_p.keySet();\r\n for (Iterator iterator = keys.iterator(); iterator.hasNext();)\r\n {\r\n String name = (String) iterator.next();\r\n OwEditField value = (OwEditField) fields_p.get(name);\r\n OwEditField clonedValue = new OwEditField(value.getFieldDefinition(), value.getValue());\r\n result.put(name, clonedValue);\r\n }\r\n return result;\r\n }", "public void sensibleMatches1() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n Map<String, Set<String>> mapWithoutHal = new HashMap<>(clientMap);\n mapWithoutHal.remove(\"Hal\");\n for (String eachClient : mapWithoutHal.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }", "public static void restoreDefaultProperties() {\n results = new HashMap<String, Map<String, Object>>();\n\n {\n Map<String, Object> host1 = new HashMap<String, Object>();\n results.put(HOST1_URL, host1);\n host1.put(P_COMMON_ID.toString(), HOST1_ID);\n host1.put(P_HOST_VM_ID.toString(VM1_ID), VM1_ID);\n host1.put(P_HOST_VM_MAC.toString(VM1_ID, 0), VM1_MAC);\n host1.put(P_HOST_VM_ID.toString(VM2_ID), VM2_ID);\n host1.put(P_HOST_VM_MAC.toString(VM2_ID, 0), VM2_MAC);\n host1.put(VMPLister.VMS_KEY, VM1_ID + VMPLister.VMS_SEPARATOR + VM2_ID);\n host1.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> host2 = new HashMap<String, Object>();\n results.put(HOST2_URL, host2);\n host2.put(P_COMMON_ID.toString(), HOST2_ID);\n host2.put(P_HOST_VM_ID.toString(VM3_ID), VM3_ID);\n host2.put(P_HOST_VM_MAC.toString(VM3_ID, 0), VM3_MAC);\n host2.put(P_HOST_VM_ID.toString(VM4_ID), VM4_ID);\n host2.put(P_HOST_VM_MAC.toString(VM4_ID, 0), VM4_MAC);\n host2.put(VMPLister.VMS_KEY, VM3_ID + VMPLister.VMS_SEPARATOR + VM4_ID);\n host2.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm1 = new HashMap<String, Object>();\n results.put(VM1_URL, vm1);\n vm1.put(P_COMMON_ID.toString(), VM1_ID);\n vm1.put(P_TEST_PROP_FROM_VM_SIGAR.toString(), VM1_PROP_VM_SIGAR);\n vm1.put(P_COMMON_NET_MAC.toString(0), VM1_MAC);\n vm1.put(P_SIGAR_JMX_URL.toString(), VM1_URL);\n vm1.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm2 = new HashMap<String, Object>();\n results.put(VM2_URL, vm2);\n vm2.put(P_COMMON_ID.toString(), VM2_ID);\n vm2.put(P_TEST_PROP_FROM_VM_SIGAR.toString(), VM2_PROP_VM_SIGAR);\n vm2.put(P_COMMON_NET_MAC.toString(0), VM2_MAC);\n vm2.put(P_SIGAR_JMX_URL.toString(), VM2_URL);\n vm2.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm3 = new HashMap<String, Object>();\n results.put(VM3_URL, vm3);\n vm3.put(P_COMMON_ID.toString(), VM3_ID);\n vm3.put(P_COMMON_NET_MAC.toString(0), VM3_MAC);\n vm3.put(P_SIGAR_JMX_URL.toString(), VM3_URL);\n vm3.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm4 = new HashMap<String, Object>();\n results.put(VM4_URL, vm4);\n vm4.put(P_COMMON_ID.toString(), VM4_ID);\n vm4.put(P_COMMON_NET_MAC.toString(0), VM4_MAC);\n vm4.put(P_SIGAR_JMX_URL.toString(), VM4_URL);\n vm4.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n }", "java.util.Map<java.lang.String, java.lang.String>\n getPropertiesMap();", "private static Map<Long, Set<XliffAlt>> getXliffAltMap(List<XliffAlt> alts)\n {\n // tuvId : Set<XliffAlt>\n Map<Long, Set<XliffAlt>> xlfAltMap = new HashMap<Long, Set<XliffAlt>>();\n\n for (XliffAlt alt : alts)\n {\n Set<XliffAlt> myAlts = xlfAltMap.get(alt.getTuvId());\n if (myAlts == null)\n {\n myAlts = new HashSet<XliffAlt>();\n myAlts.add(alt);\n xlfAltMap.put(alt.getTuvId(), myAlts);\n }\n else\n {\n myAlts.add(alt);\n xlfAltMap.put(alt.getTuvId(), myAlts);\n }\n }\n\n return xlfAltMap;\n }", "@Test\n public void hashCodeTest()\n {\n MapAdapter test1 = new MapAdapter();\n test1.put(1, \"test1\");\n\n MapAdapter test2 = new MapAdapter();\n test2.put(2, \"test2\");\n\n map.put(1, \"test1\");\n\n assertEquals(test1.hashCode(), map.hashCode());\n assertNotEquals(test2.hashCode(), map.hashCode());\n\n test1.put(1, 1);\n assertNotEquals(test1.hashCode(), map.hashCode());\n }", "public static <T> HashMap<String, Object> objectToMap(T x)\n\t{\n\t\tHashMap<String,Object> map = new HashMap<String, Object>();\n\t\tField[] fields = x.getClass().getDeclaredFields();\n\t\tfor(Field field : fields)\n\t\t{\n\t\t\tfield.setAccessible(true);\n\t\t\tif(!field.isAnnotationPresent(Special.class))\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\tif(field.get(x) != null)\n\t\t\t\t\t\tmap.put(field.getName(), field.get(x));\n\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "java.util.Map<java.lang.String, java.lang.String>\n getDetailsMap();", "public static void main(String[] args) throws IllegalAccessException, InvocationTargetException, InstantiationException {\n\r\n Map<String, Shape> shapeMap = new HashMap<>();\r\n\r\n shapeMap.put(\"Triangle\", new SimpleTriangle(3, 5, 5));\r\n shapeMap.put(\"Circle\", new SimpleCircle(5));\r\n\r\n for (Map.Entry<String, Shape> entry : shapeMap.entrySet()) {\r\n System.out.println(\"Key - \" + entry.getKey() + \" Value \" + entry.getValue());\r\n }\r\n\r\n //Write a Java program to count the number of key-value (size) mappings in a map\r\n\r\n int size = shapeMap.size();\r\n System.out.println(size);\r\n\r\n //Write a Java program to copy all of the mappings from the specified map to another map.\r\n\r\n Map<String, Shape> shapeMap1 = new HashMap<>();\r\n shapeMap1.put(\"Square7\", new SimpleSquare(7));\r\n shapeMap1.put(\"Square9\", new SimpleSquare(9));\r\n\r\n shapeMap.putAll(shapeMap1);\r\n\r\n System.out.println(shapeMap);\r\n\r\n //Write a Java program to check whether a map contains key-value mappings (empty) or not.Try to use .clear()\r\n\r\n shapeMap1.clear();\r\n System.out.println(shapeMap1.isEmpty());\r\n\r\n //Write a Java program to test if a map contains a mapping for the specified key.\r\n\r\n boolean what = shapeMap.containsKey(\"Square7\");\r\n System.out.println(what);\r\n\r\n //Write a Java program to test if a map contains a mapping for the specified value.\r\n\r\n boolean whatValue = shapeMap.containsValue(new SimpleSquare(7));\r\n System.out.println(whatValue);\r\n\r\n //Write a Java program to create a set view of the mappings contained in a map.\r\n\r\n\r\n //Tree Set\r\n\r\n Set<Employee> treeSet = new TreeSet<>();\r\n treeSet.add(new Employee(17_000, \"J\"));\r\n treeSet.add(new Employee(20_000, \"K\"));\r\n\r\n System.out.println(treeSet);\r\n\r\n final EmployeeAgeComparator ageComparator = new EmployeeAgeComparator();\r\n Set<Employee> treeSetByAge = new TreeSet<>(ageComparator);\r\n treeSetByAge.add(new Employee(22_000, 35, \"L\"));\r\n treeSetByAge.add(new Employee(78_000, 19, \"J\"));\r\n treeSetByAge.add(new Employee(93_000, 55, \"P\"));\r\n\r\n System.out.println(treeSetByAge);\r\n\r\n final EmployeeSalaryComparator salaryComparator = new EmployeeSalaryComparator();\r\n Set<Employee> treeSetBySalary = new TreeSet<>(salaryComparator);\r\n treeSetBySalary.add(new Employee(98_120, 59, \"LA\"));\r\n treeSetBySalary.add(new Employee(92_000, 79, \"AA\"));\r\n treeSetBySalary.add(new Employee(18_100, 44, \"AC\"));\r\n\r\n System.out.println(treeSetBySalary);\r\n\r\n System.out.println(\"==============================================\");\r\n\r\n Set<Employee> treeSetByName = new TreeSet<Employee>((o1, o2) -> o1.getName().compareTo(o2.getName()));\r\n\r\n treeSetByName.add(new Employee(98_120, 59, \"LA\"));\r\n treeSetByName.add(new Employee(92_000, 79, \"AA\"));\r\n treeSetByName.add(new Employee(18_100, 44, \"AC\"));\r\n\r\n System.out.println(treeSetByName);\r\n\r\n Employee newEmployee = null;\r\n final Constructor<?>[] constructorsEmp = Employee.class.getConstructors();\r\n for (Constructor constructor : constructorsEmp) {\r\n System.out.println(constructor.getParameterCount());\r\n if (constructor.getParameterCount() == 2) {\r\n newEmployee = (Employee) constructor.newInstance(66_000, \"From Reflection\");\r\n }\r\n }\r\n if(newEmployee != null){\r\n System.out.println(newEmployee);\r\n }\r\n\r\n }", "public static Map<String, Integer> intersect(Map<String, Integer> m1, Map<String, Integer> m2) {\n Map<String, Integer> intersect = new HashMap<>();\n for (String key : m1.keySet()) {\n if (m2.containsKey(key)) {\n Integer i = m1.get(key);\n if (m2.get(key).equals(i)) {\n intersect.put(key, i);\n }\n }\n }\n return intersect;\n //throw new UnsupportedOperationException(\"Not implemented yet.\");\n }", "public abstract Map<String, Object> toMap(T object);", "@Test\r\n void convertStreamBean2MapMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\t// Convert stream -> Map<Object, Object> -> Map<String, TransactionBean>\r\n\t\tMap<String, TransactionBean> afterStreamMap = (Map<String, TransactionBean>)transactionBeanStream.peek(System.out::println).collect(Collectors.toMap(p -> p.getValue(), p -> p));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamMap.get(\"r1\").getType());\r\n\t\tassertSame(\"wrong type\", Transaction.Test, afterStreamMap.get(\"r2\").getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamMap.get(\"r3\").getType());\r\n }", "private Map<Field, ValueRef> createFieldValueRefMap() {\n Map<Field, ValueRef> map = new IdentityHashMap<>(fields.size() + 1);\n map.put(NormalField.MISSING, new ValueRef(0, 0));\n return map;\n }", "public boolean equals(Object obj)\n {\n if (obj instanceof WrapperMap)\n {\n return getMap().equals(\n ((WrapperMap) obj).getMap());\n }\n return false;\n }", "private static Map<String, ArrayList<String>> getPersonsCityWise() {\n ArrayList<String> cityNames = new ArrayList<String>();\n\n for (String i : bookList.keySet()) {\n contactDetailsCity = bookList.get(i);\n for (int j = 0; j < contactDetailsCity.size(); j++) {\n cityNames.add(contactDetailsCity.get(j).getCity());\n }\n }\n Set<String> duplicateRemoval = new LinkedHashSet<String>();\n duplicateRemoval.addAll(cityNames);\n cityNames.clear();\n cityNames.addAll(duplicateRemoval);\n\n for (int y = 0; y < cityNames.size(); y++) {\n ArrayList<String> personNames = new ArrayList<String>();\n for (String i : bookList.keySet()) {\n contactDetailsCity = bookList.get(i);\n for (int j = 0; j < contactDetailsCity.size(); j++) {\n Contact initial = contactDetailsCity.get(j);\n if (initial.getCity().equals(cityNames.get(y))) {\n personNames.add(initial.getFirstName() + \" \" + initial.getLastName());\n }\n }\n }\n cityList.put(cityNames.get(y), personNames);\n }\n return cityList;\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof User)) {\n return false;\n }\n User that = (User) other;\n if (this.getIduser() != that.getIduser()) {\n return false;\n }\n return true;\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 getProperties();", "private Map<String, Object> dealWithMap(Map<String, Object> paramMap)\n {\n Set<String> set = new HashSet<String>();\n for (String colName : defaultValColArr)\n {\n set.add(colName);\n }\n for (String colName : pkColArr)\n {\n set.add(colName);\n }\n Iterator<String> iterator = set.iterator();\n while (iterator.hasNext())\n {\n String colName = iterator.next();\n if (paramMap.get(colName) == null)\n {\n paramMap.remove(colName);\n }\n }\n return paramMap;\n }", "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 static Map mapFrom(Object[][] keyValueSets) {\r\n\t\tMap map = new HashMap(keyValueSets.length);\r\n\t\tfor (int i=0; i<keyValueSets.length; i++) {\r\n\t\t\tmap.put(keyValueSets[i][0], keyValueSets[i][1]);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "private static Map<String, String> readPropertiesIntoMap(Properties properties) {\n Map<String, String> dataFromProperties = new HashMap<>();\n\n for (Map.Entry<Object, Object> pair : properties.entrySet()) {\n String key = (String) pair.getKey();\n String value = (String) pair.getValue();\n\n dataFromProperties.put(key, value);\n }\n return dataFromProperties;\n }", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "private HashMap name2() {\n\n\t HashMap hm = new HashMap();\n\t hm.put(\"firstName\", \"SIMA\");\n\t hm.put(\"middleName\", \"MISHRA\");\n\t hm.put(\"lastName\", \"ARADHANA\");\n\t hm.put(\"firstYearInOffice\", \"1981\");\n\t hm.put(\"lastYearInOffice\", \"1989\");\n\t return hm;\n\n\t }", "public static Map<String,List<CustomItemDto>> createMap(List<CustomItemDto> items){\n\t\t\n\t\tMap<String,List<CustomItemDto>> map=new HashMap<>();\n\n\t\tfor(CustomItemDto item:items){\n\t\t\n\t \tif(!map.containsKey(item.getCardType())){\t\n\t \t\tList<CustomItemDto> c = new ArrayList<>();\n\t\t\tc.add(item);\n\t\t map.put(item.getCardType(),c);\n\t\t }else{\t\n\t\t\tList<CustomItemDto> c=map.get(item.getCardType());\n\t\t c.add(item);\t\t\n\t\t\t\t}//else\n\t\t\t}\n\t\treturn map;\n\t\t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }" ]
[ "0.62315947", "0.5668834", "0.54142934", "0.5403795", "0.53386366", "0.5333585", "0.5298511", "0.5281656", "0.5249287", "0.5244207", "0.5215717", "0.5212884", "0.5198907", "0.51979554", "0.5173123", "0.5131027", "0.51100147", "0.5088761", "0.5084309", "0.50825816", "0.5069855", "0.50401556", "0.5035934", "0.50345016", "0.50310487", "0.50241", "0.5023253", "0.5020241", "0.5006236", "0.50058466", "0.50049853", "0.49986613", "0.49970886", "0.49937895", "0.4986943", "0.49740714", "0.49632367", "0.49585626", "0.49569193", "0.49518427", "0.49449018", "0.4944415", "0.4942886", "0.49402085", "0.4932138", "0.49309093", "0.49306855", "0.4925263", "0.4924053", "0.49192435", "0.49015057", "0.48995286", "0.4887901", "0.48779687", "0.48658136", "0.4843375", "0.4838152", "0.48346996", "0.4823551", "0.48134294", "0.48034522", "0.48031196", "0.4800989", "0.4795456", "0.47933185", "0.4790677", "0.47843298", "0.47836193", "0.47752178", "0.47744", "0.477097", "0.4767376", "0.4760233", "0.4759874", "0.47574732", "0.47547814", "0.474457", "0.47377947", "0.4736066", "0.473337", "0.47312024", "0.47308907", "0.4730873", "0.47303566", "0.47274137", "0.47161564", "0.47126868", "0.47117558", "0.4709054", "0.47076532", "0.47073153", "0.4704453", "0.4698827", "0.4696127", "0.46951172", "0.4693724", "0.46899137", "0.4689692", "0.46855778", "0.46855313" ]
0.53400224
4
/ API to get all fields to provided to invoke
private static Map<Object, Object> getFields(Device d1) { Class<? extends Device> deviceClass = d1.getClass(); Field[] fields = deviceClass.getDeclaredFields(); //Map to get property details to provided class Map<Object,Object> mapFields = new HashMap<>(); Arrays.stream(fields) .forEach( field -> { field.setAccessible(true); try { mapFields.put(field.getName(), field.get(d1)); } catch (final IllegalAccessException e) { try { mapFields.put(field.getName(), field.get(d1)); } catch (Exception e1) { e1.printStackTrace(); } } }); return mapFields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFields();", "Fields fields();", "public List<String> showFields() {\n Client client = new Client();\n Class<?> objFields = client.getClass();\n List<String> list = new ArrayList<>();\n for (Field field : objFields.getDeclaredFields()) {\n list.add(field.getName());\n }\n return list;\n }", "public GetFieldsOutput() {\n\t\tsuper();\n\t\tthis.succeed = null;\n\t\tthis.failed = null;\n\t\tthis.invalid = null;\n\t}", "public String getFields() {\n return fields;\n }", "protected Vector collectFields() {\n Vector fields = new Vector(1);\n fields.addElement(this.getField());\n return fields;\n }", "Map<String, Object> getParameters();", "Map<String, Object> getParameters();", "@Override\n public List<KParameter> getParameters() {\n return getReflected().getParameters();\n }", "public List<String> retornaFields() {\n\t\treturn data.retornaFields();\n\t}", "com.google.protobuf.ByteString\n getFieldsBytes();", "@SuppressWarnings(\"rawtypes\")\n\tpublic List getFields(){\n\t\treturn targetClass.fields;\n\t}", "public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}", "List<Pair<String, Value>> fields();", "public Map getParameters();", "String getField();", "public void printFields(){\n\t\tif(this.returnValueType==null){\n\t\t\tthis.returnValueType=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.className=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.methodName=\"\";\n\t\t}\n\t\tSystem.out.print(\"\t\"+this.address+\"\t\"+this.returnValueType+\" \"+this.className+\".\"+this.methodName+\" \");\n\t\tSystem.out.print(\"(\");\n\t\tif(this.hasParameter()){\n\t\t\t\n\t\t\tfor(int j=0;j<this.parameterType.length;j++){\n\t\t\t\tSystem.out.print(this.parameterType[j]);\n\t\t\t\tif(j!=(this.parameterType.length-1)){\n\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tSystem.out.println(\")\");\n\n\t}", "@Test\n public void getFieldsTest() throws ApiException {\n List<FieldDetails> response = api.getFields();\n\n // TODO: test validations\n }", "java.lang.String getField1046();", "java.lang.String getField1587();", "java.lang.String getField1246();", "java.lang.String getField1087();", "@Override\n\tpublic void getFields(List<String> table) {\n\t\t\n\t}", "@Override\n\tprotected String getParameterizedFields()\n\t{\n\t\tString fields = \" GAZOID=?, GAZFLD=?, GAZPVN=?, GAZTYP=?, GAZCLN=?, GAZCLS=? \";\n\t\treturn fields;\n\t}", "public Map<String, List<String>> getRequestProperties() {\n/* 337 */ return this.delegate.getRequestProperties();\n/* */ }", "java.util.List<godot.wire.Wire.Value> \n getArgsList();", "@Override\n\tpublic Object[] getParameterizedFieldsValues()\n\t{\n\t\tGAZRecordDataModel dataModel = getMyDataModel();\n\n\t\tObject[] object = new Object[] { dataModel.getOptionId(), dataModel.getFieldId(), dataModel.getPvId(), dataModel.getType(),\n\t\t\t\t\t\tdataModel.getClassName(), dataModel.getClassByte(), };\n\t\treturn object;\n\t}", "java.lang.String getField1243();", "public ITypeInfo[] getParameters();", "java.lang.String getField1287();", "List<Field> getFields();", "java.lang.String getField1021();", "public Parameters getParameters();", "Map<String, String> getParameters();", "java.lang.String getField1546();", "java.lang.String getField1244();", "java.lang.String getField1543();", "java.lang.String getField1044();", "INDArray getParams();", "@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" GAZOID, GAZFLD, GAZPVN, GAZTYP, GAZCLN, GAZCLS \";\n\t\treturn fields;\n\t}", "public void extractParameters() {\n\t\tString[] parameters = body.split(\"&\");\n\n\n\n\t\t//If there is a value given for every parameter, we extract them\n\t\tString[] huh = parameters[0].split(\"=\");\n\t\tif(huh.length>1) {\n\t\t\tusername = huh[1];\n\t\t}else{allParametersGiven=false;}\t\n\n\t\tString[] hoh = parameters[1].split(\"=\");\n\t\tif(hoh.length>1) {\n\t\t\tpassword = hoh[1];\n\t\t}else{allParametersGiven=false;}\n\n\t}", "java.lang.String getField1261();", "java.lang.String getField1094();", "java.lang.String getField1337();", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "java.lang.String getField1212();", "java.lang.String getField1146();", "java.lang.String getField1487();", "java.lang.String getField1073();", "java.lang.String getField1241();", "java.lang.String getField1273();", "java.lang.String getField1143();", "java.lang.String getField1069();", "java.lang.String getField1187();", "public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}", "java.lang.String getField1019();", "java.lang.String getField1446();", "java.lang.String getField1061();", "java.lang.String getField1074();", "java.lang.String getField1045();", "java.lang.String getField1269();", "java.lang.String getField1284();", "java.lang.String getField1443();", "java.lang.String getField1017();", "java.lang.String getField1346();", "java.lang.String getField1041();", "java.lang.String getField1746();", "java.lang.String getField1294();", "java.lang.String getField1078();", "java.lang.String getField1018();", "public abstract List<String> requiredFields();", "java.lang.String getField1288();", "public IMemberValuePair[] getMemberValuePairs();", "java.lang.String getField1109();", "java.lang.String getField1721();", "java.lang.String getField1051();", "public void readParameters()\n {\n readParameters(getData());\n }", "java.lang.String getField1787();", "java.lang.String getField1047();", "public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }", "java.lang.String getField1387();", "java.lang.String getField1067();", "java.lang.String getField1052();", "java.lang.String getField1584();", "com.google.protobuf.ByteString\n getField1848Bytes();", "java.lang.String getField1274();", "java.lang.String getField1573();", "java.lang.String getField1055();", "java.lang.String getField1542();", "java.lang.String getField1084();", "java.lang.String getField1336();", "java.lang.String getField1124();", "java.lang.String getField1012();", "public String[] getFieldNames();", "java.lang.String getField1088();", "java.lang.String getField1245();", "java.lang.String getField1544();", "java.lang.String getField1588();", "java.lang.String getField1144();", "java.lang.String getField1013();", "java.lang.String getField1744();" ]
[ "0.7085161", "0.6705134", "0.6337075", "0.6232433", "0.61806756", "0.6118754", "0.6085344", "0.6085344", "0.60588485", "0.6052169", "0.5975934", "0.5973035", "0.5958238", "0.59454864", "0.5928186", "0.59176093", "0.5916587", "0.5909281", "0.59003824", "0.5899078", "0.58929735", "0.5892468", "0.5879402", "0.5877361", "0.587706", "0.5876695", "0.58733374", "0.5872446", "0.5859965", "0.5850593", "0.5849597", "0.584488", "0.58278924", "0.58252466", "0.5818157", "0.58054894", "0.5802687", "0.5795475", "0.57948214", "0.57936364", "0.5774557", "0.57733196", "0.57726324", "0.5772489", "0.5771109", "0.57694465", "0.5768302", "0.57649976", "0.5760878", "0.5760695", "0.5759444", "0.57555884", "0.5752037", "0.5747853", "0.5743949", "0.57431626", "0.57394266", "0.5738122", "0.5733066", "0.5730085", "0.57270235", "0.5726829", "0.57262695", "0.57246226", "0.5724213", "0.5721273", "0.57204884", "0.5718247", "0.571818", "0.5716115", "0.5715734", "0.5713857", "0.57125944", "0.57116085", "0.57113165", "0.57112277", "0.57079345", "0.5704868", "0.57017875", "0.5700744", "0.5699285", "0.56992376", "0.56985104", "0.56972295", "0.56958735", "0.56950814", "0.5694848", "0.5691438", "0.56913996", "0.56908995", "0.56890607", "0.56888086", "0.56881684", "0.56860536", "0.56850404", "0.56822187", "0.56820846", "0.56814694", "0.5680915", "0.5678921", "0.56786555" ]
0.0
-1
Reset prior to next transform
@Override public void transform(CtExecutable method) { reset(); // Get setup for renaming setDefs(getChildrenOfType(method, CtLocalVariable.class)); setSubtokens(topTargetSubtokens); // Select some percentage of things to rename takePercentage(RENAME_PERCENT); // Build new names and apply them applyRenaming(method, false, generateRenaming( method, SHUFFLE_MODE, NAME_MIN_LENGTH, NAME_MAX_LENGTH )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetTransform() {\n this.mView.setScaleX(1.0f);\n this.mView.setScaleY(1.0f);\n this.mView.setTranslationX(0.0f);\n this.mView.setTranslationY(0.0f);\n }", "private void reset() throws TransformerException {\n if (firstRun) {\n firstRun = false;\n // Does IMS need this?\n }\n }", "public void resetUserTransform() {\n workTransform.setTransform(null);\n doc.setTransform(workTransform);\n swapTransforms();\n }", "private void abortTransformations() {\n for (Integer num : this.mTransformedViews.keySet()) {\n TransformState currentState = getCurrentState(num.intValue());\n if (currentState != null) {\n currentState.abortTransformation();\n currentState.recycle();\n }\n }\n }", "public void resetPhase();", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public synchronized void reset(){\n\t\tif(motor.isMoving())\n\t\t\treturn;\n\t\tmotor.rotateTo(0);\n\t}", "public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}", "public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void reset() {\n\t\tthis.flow = 0;\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void resetPose() {\n }", "protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }", "public void reset() {\n\t\tmCenterOfProjection = new Vector3f(0, 0, 15);\n\t\tmLookAtPoint = new Vector3f(0, 0, 0);\n\t\tmUpVector = new Vector3f(0, 1, 0);\n\t\tmCameraMatrix = new Matrix4f();\n\t\tthis.update();\n\t}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public void reset ()\r\n\t{\r\n\t\tsuper.reset();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@SuppressWarnings(\"NullAway\")\n\t\tpublic void reset() {\n\t\t\ttrackDoc = null;\n\t\t\tglobalDoc = null;\n\t\t\tpredicted.reset();\n\t\t\tobserved.reset();\n\t\t\tdoc_to_imagePixel.reset();\n\t\t}", "void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }", "private void swapTransforms() {\n Transform tmp = workTransform;\n workTransform = userTransform;\n userTransform = tmp;\n }", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "public void reset()\n {\n m_source_.setToStart();\n updateInternalState();\n }", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "private void reset() {\n }", "public void reset() {\n reset(animateOnReset);\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "protected void reset() {\n\t\t}", "protected void reset()\n {\n super.reset();\n m_seqNum = 1;\n }", "public void reset() {\n firstUpdate = true;\n }", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}", "private void reset() {\n\t availableInputs = new HashSet<String>(Arrays.asList(INPUT));\n\t requiredOutputs = new HashSet<String>(Arrays.asList(OUTPUT));\n\t updateInputAndOutput(availableInputs, requiredOutputs);\n\t}", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "public void reset() {\r\n bop.reset();\r\n gzipOp = null;\r\n }", "public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}", "public synchronized void resetConquestWarriorTransformation() {\n ConquestWarriorTransformation = null;\n }", "public void reset() {\r\n\t\tsuper.reset();\r\n\t\tfor (TransitionMode mode : transitionModes) {\r\n\r\n\t\t\tmode.reset();\r\n\t\t}\r\n\r\n\t}", "protected void resetInternalState() {\n setStepStart(null);\n setStepSize(minStep.multiply(maxStep).sqrt());\n }", "protected void reset(){\n inited = false;\n }", "public void reset () {}", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "public synchronized void reset() {\n }", "public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }", "public void resetAnimations() {\n Mat4 m = new Mat4(1);\n rollHead.setTransform(m);\n snowmanRockTransform.setTransform(m);\n snowmanMoveZTranslate.setTransform(m);\n //For ensuring the snowman turns 45 degrees again when slide button is pressed again\n turn45 = true;\n i = 0;\n oldI = 0;\n snowmanRoot.update();\n }", "public void reset() {\n finished = false;\n }", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "public void reset() {\n\n\t}", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "public void reset(){\n x = originalX;\n y = originalY;\n dx = originalDX;\n dy = originalDY;\n }", "public void reset() {\n mRotationAngle = 0;\n mIsScheduled = false;\n unscheduleSelf(this);\n invalidateSelf();\n }", "public void reset() {\n _oldColorBuffer = _oldNormalBuffer = _oldVertexBuffer = _oldInterleavedBuffer = null;\n Arrays.fill(_oldTextureBuffers, null);\n }", "@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}", "void reset()\n {\n reset(values);\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "@Override\r\n\tpublic void reset() {\n\t}", "public void reset() {\n\r\n\t}", "public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }", "void reset() {\n myIsJumping = myNoJumpInt;\n setRefPixelPosition(myInitialX, myInitialY);\n setFrameSequence(FRAME_SEQUENCE);\n myScoreThisJump = 0;\n // at first the cowboy faces right:\n setTransform(TRANS_NONE);\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "public void reset() {\n position = 0;\n }", "@Override\n public void reset() \n {\n\n }", "public void reset()\n\t{\n\t\tm_running = false;\n\t\tm_elapsedMs = 0;\n\t\tm_lastMs = 0;\n\t}", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "@Override\n\tpublic void reset() {\n\t\t\n\t}", "@Override\r\n\tpublic void reset() {\n\t\tsuper.reset();\r\n\t\tthis.setScale(0.75f);\r\n\t}", "@Override\n\tpublic void reset() {\n\n\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "public void reset() {\r\n minX = null;\r\n maxX = null;\r\n minY = null;\r\n maxY = null;\r\n\r\n minIn = null;\r\n maxIn = null;\r\n\r\n inverted = false;\r\n }", "protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\n\t\tselectedCurves.clear();\n\t\thooveredCurves.clear();\n\t\tselectedPoints.clear();\n\t\thooveredPoints.clear();\n\t\tselectionTool.clear();\n\t}", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "public void reset() {\r\n reset(params);\r\n }", "@Override\r\n\tpublic void reset() {\n\r\n\t}", "@Override\r\n\tpublic void reset() {\n\r\n\t}", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "@Override\n public void reset() {\n }", "public void reset()\n {\n currentPosition = 0;\n }", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "public void reset() {\n this.done = false;\n }", "public synchronized void reset()\n\t{\n\t\tm_elapsed = 0;\n\t}", "@Override\n\tpublic void reset() {\n\t}", "public void resetComputation()\n {\n for (Block block : this.blocks) {\n block.setShadow(null);\n block.deleteInputValues();\n }\n }", "public void reset() {\n\n }", "public void resetEncoders() {\n leftEncoder.setPosition(0);\n rightEncoder.setPosition(0);\n }", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }" ]
[ "0.73857063", "0.71153814", "0.71035504", "0.69421476", "0.6925128", "0.68917394", "0.6869222", "0.68473047", "0.68443567", "0.67890507", "0.6763889", "0.67629087", "0.67135966", "0.6709979", "0.6709828", "0.6706579", "0.6692436", "0.6687838", "0.6682195", "0.6678796", "0.6665024", "0.6665024", "0.6665024", "0.6665024", "0.6649499", "0.663908", "0.66326284", "0.6625471", "0.6620393", "0.6616591", "0.6609673", "0.6604488", "0.6595464", "0.65929323", "0.65891767", "0.6584804", "0.6580934", "0.65782666", "0.65748835", "0.6569621", "0.65530807", "0.6542163", "0.65371764", "0.652021", "0.65201527", "0.65140283", "0.65038353", "0.65036327", "0.6488828", "0.6479368", "0.6477037", "0.6472588", "0.6467336", "0.646422", "0.64620954", "0.6450927", "0.6446919", "0.6444796", "0.64256173", "0.64049166", "0.640364", "0.64025426", "0.64025426", "0.64025426", "0.64025426", "0.6390027", "0.6389198", "0.63890696", "0.6386686", "0.63860285", "0.6383494", "0.636612", "0.6362531", "0.6362198", "0.6362198", "0.6362198", "0.6362198", "0.6361748", "0.63566065", "0.63566065", "0.63541806", "0.63540584", "0.634701", "0.6341381", "0.6334552", "0.6332886", "0.6328534", "0.63221914", "0.63221914", "0.63178426", "0.63178426", "0.630886", "0.63087547", "0.6307894", "0.63020647", "0.6299775", "0.6297455", "0.6287932", "0.62862796", "0.62820387", "0.6280395" ]
0.0
-1
Add the given listener to the list of listeners that will receive notification when new analysis results become available.
public void addAnalysisServerListener(AnalysisServerListener listener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addListener(\n IListener listener\n )\n {listeners.add(listener);}", "public void addListener(Listener listener) {\n m_listeners.add(listener);\n }", "public void addListener(@NotNull ReceiverListener listener) {\n myListeners.add(listener);\n }", "static //@Override\n\tpublic void addListener(final Listener listener) {\n\t\tif (null == stListeners) {\n\t\t\tstListeners = new LinkedList<>();\n\t\t}\n\t\tstListeners.add(listener);\n\t}", "default void addListener(Runnable listener) {\n\t\tthis.getItemListeners().add(listener);\n\t}", "public void addListener(StatisticsListener listener)\r\n\t{\r\n\t\tlisteners.add(listener);\r\n\t}", "@Override\n public void addListener(StreamListener listener) {\n streamListeners.add(listener);\n }", "private void addListener(RestStateChangeListener... listener) {\n\t\tfor (RestStateChangeListener l : listener) {\n\t\t\tthis.listener.add(l);\n\t\t}\n\t}", "public static void addListener(MetadataListListener listener) {\n if (DEBUG.Enabled) Log.debug(\"listeners no longer allowed, will not report to: \" + Util.tags(listener));\n // listeners.add(listener);\n }", "public void addFinishedListener(Consumer<List<S>> listener) {\n finishedListeners.add(listener);\n }", "protected final void addListener(DialogModuleChangeListener listener) {\n listeners.add(listener);\n }", "public void addListener( DatabaseUpdaterListener listener ) {\n\t\tsynchronized( listeners_ ) {\n\t\t\tif( ! listeners_.contains(listener) ) { \n\t\t\t\tlisteners_.add(listener);\n\t\t\t}\n\t\t}\n\t}", "public void addChangeListener(ChangeListener listener)\r\n {\r\n listeners.add(listener);\r\n }", "public void addListener(EventListener listener);", "private void addListener(final @NonNull Consumer<E> listener) {\n if (eventListeners.isEmpty()) {\n PLUGIN_MANAGER.registerEvent(\n configuration.getType(), this, configuration.getPriority(), this, configuration.getPlugin()\n );\n LISTENERS_GROUPS.putIfAbsent(configuration, this);\n }\n\n eventListeners.add(listener);\n }", "public void addChangeListener (ChangeListener listener)\n {\n listenerList.add(ChangeListener.class, listener);\n }", "public void addListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "public synchronized void addListener(IIpcEventListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void addListener(LogListener listener) {\n\t\tthis.eventListeners.add(listener);\n\t}", "public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }", "public void addListener(Listener l) {\n\t\tmListenerSet.add(l);\n\t}", "public void addPluginManagerListener( PluginManagerListener listener )\n {\n pluginManagerListeners.add( listener );\n if ( isExecuted() )\n {\n firePluginsMonitored(listener);\n }\n }", "abstract public void addListener(Listener listener);", "protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }", "public void addChangeListener(ChangeListener listener) {\n if (listener == null) {\n return;\n }\n if (LOG.isLoggable(Level.FINE) && listeners.contains(listener)) {\n LOG.log(Level.FINE, \"diagnostics for #167491\", new IllegalStateException(\"Added \" + listener + \" multiply\"));\n }\n listeners.add(listener);\n }", "void addListener(RiakFutureListener<V,T> listener);", "public void addCompletionListener(Runnable listener) {\n\t\tcompletionListeners.add(listener);\n\t\tif(isDone() || isCancelled()) {\n\t\t\tlistener.run();\n\t\t}\t\t\n\t}", "public void addChangeListener(ChangeListener listener) {\n listenerList.add(ChangeListener.class, listener);\n }", "public void addListener(ModifiedEventListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void addListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.addListener(listener);\n }", "void subscribeToEvents(Listener listener);", "public void addListener(GridListener listener) {\n listeners.add(listener);\n }", "public void addChangeListener(ChangeListener listener) {\n\t\tchangeListeners.add(listener);\n\t}", "public void registerListener(PPGListener listener){\n listeners.add(listener);\n }", "public void addListener(final T listener) {\n if (listener == null)\n throw new IllegalArgumentException(\"Parameter 'listener' must not be null!\");\n _elements.add(listener);\n }", "public void addUpdateListener(Consumer<List<S>> listener) {\n updateListeners.add(listener);\n }", "void addListener(PromiseListener promiseListener);", "public void addOnDataChangedListener(OnDataChangedListener listener) {\n dataChangedListeners.add(listener);\n }", "@Override\n public void addListener(DisplayEventListener listener) {\n listenerList.add(DisplayEventListener.class, listener);\n }", "public void addListener(Listener l) {\n if (!listeners.contains(l)) {\n listeners.add(l);\n }\n }", "private void addListeners() {\n \t\tfHistoryListener= new HistoryListener();\n \t\tfHistory.addOperationHistoryListener(fHistoryListener);\n \t\tlistenToTextChanges(true);\n \t}", "public synchronized void addPlotNotificationListener(\n PlotNotificationListener listener) {\n m_plotListeners.add(listener);\n }", "@Override\n\tpublic void addActionListener(ActionListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public final void addChangeListener(ChangeListener l) {\n\t\tsynchronized (listeners) {\n\t\t\tlisteners.add(l);\n\t\t}\n\t}", "public void addListener(ValueChangedListener listener) {\n\t\t_listenerManager.addListener(listener);\n\t}", "public void addListener(SchedulerListener toAdd) {\n\t\tlisteners.add(toAdd);\n\t}", "public void addScanListener(Listener l) {\n listeners.add(l);\n }", "public void addListSelectionListener(ListSelectionListener listener)\r\n {\r\n listSelectionListeners.add(listener);\r\n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "public void addListener(MinMaxListener listener) {\n listeners.add(listener);\n }", "public synchronized void addProgressListener (ProgressListener lsnr) {\n if (listeners == null) {\n listeners = new java.util.Vector();\n }\n listeners.addElement(lsnr);\n }", "public void addScheduleChangeListener(ScheduleChangeListener lst) {\r\n\t\tlisteners.add(lst);\r\n\t}", "public void addRatioListener(IRatioListener listener)\r\n {\r\n // Add the listener if he isn't already in our list\r\n if (!ratioListeners.contains(listener))\r\n {\r\n ratioListeners.add(listener);\r\n }\r\n }", "@Override\n\tpublic void registListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.register(listener);\n\t}", "public void addNotificationListener(NotificationListener listener) {\n\t\tnotificationListeners.add(listener);\n\t}", "public static void listen(HistoryListener hl) {\n\t\tlisteners.add(hl);\n\t}", "public void addNameChangeListener(NameChangeListener listener) {\n listeners.add(listener);\n }", "public void addListener(SerialConnectionReadyListener listener) {\n listeners.add(listener);\n }", "public void addListener(TypeAeronefListener aListener) {\n\t mListListener.add(aListener);\n\t}", "void registerListeners();", "public void addChangeListener(ChangeListener<BufferedImage> listener) {\n observer.add(listener);\n }", "public synchronized void addEventListener(InputListener listener) {\n\t\tlisteners.add(listener);\n\t}", "@Override\n\t\t\t\tpublic void onAddSuccess() {\n\t\t\t\t\tif (addListener != null) {\n\t\t\t\t\t\taddListener.onAddSuccess();\n\t\t\t\t\t}\n\t\t\t\t}", "public void addChangeListener(ChangeListener listener) {\n changeListeners.add(ChangeListener.class, listener);\n }", "public void addListener(CachePolicyListener listener) {\n if (listener == null) {\n throw new IllegalArgumentException(\"Cannot add null listener.\");\n }\n if ( ! listeners.contains(listener)) {\n listeners.addElement(listener);\n }\n }", "public void addListener(Listener listener) {\n\t\tListener wrapper = new ParameterListenerWrapper(this, listener);\r\n\t\tfor (Button b : radioButton) {\r\n\t\t\tb.addListener(SWT.Selection, wrapper);\r\n\t\t}\r\n\t}", "void addRefreshListener(RefreshListener listener) throws RemoteException;", "public void addListener(ATabbedPaneListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void addStatusChangeListener(StatusChangeListener listener){\n\n\t\tstatusChangeListeners.add(StatusChangeListener.class, listener);\n\t}", "public MockRestRequest addListener(EventListener listener) {\n if (listener != null) {\n synchronized (listeners) {\n listeners.add(listener);\n }\n }\n return this;\n }", "public void addNavigatorListener(NavigatorListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void addReachabilityListener(Consumer<ReachabilityEvent> reachabilityListener) {\r\n reachabilityListeners.add(reachabilityListener);\r\n }", "public void addSelectionListener(SelectionListener listener) {\n \t\tfSelectionListeners.add(listener);\n \t}", "public void addSelectionChangedListener(ITableSelectionChangedListener listener){\n\t\tif(selectionChangedListeners == null){\n\t\t\tselectionChangedListeners = new ListenerList();\n\t\t\ttableViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\t\t\n\t\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\t\tString[][] selection = getSelection();\n\t\t\t\t\tfor(Object listener : selectionChangedListeners.getListeners()){\n\t\t\t\t\t\t((ITableSelectionChangedListener)listener).selectionChanged(selection);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tselectionChangedListeners.add(listener);\n\t}", "public void addListener( RemoteFileIOListener passedListener ) {\n if(passedListener != null){\n\n synchronized(theTaskListeners){\n if(!theTaskListeners.contains(passedListener)){\n theTaskListeners.add(passedListener);\n }\n }\n }\n }", "void setListener(Listener listener);", "public void addEventListener(EventListener listener){\n listenerList.add(EventListener.class, listener);\n }", "public void addListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.addListener(listener);\n }\n\n if (null != mInitialSyncToToken) {\n listener.onInitialSyncComplete(mInitialSyncToToken);\n }\n }\n }", "protected void installListeners() {\n }", "protected void installListeners() {\n }", "public void addSelectionListener(SelectionListener listener) {\n selectionListeners.add(listener);\n }", "public void addListener(AwaleListener awaleListener) {\r\n\tthis.listeners.add(awaleListener);\r\n }", "void onPlaybackStarted(Consumer<Void> listener) {\n playbackStartedListeners.add(listener);\n }", "public void addListener(final IModuleListener listener) {\n m_listeners.addListener(listener);\n }", "public void addGraphChangeListener(GraphChangeListener<N, ET> listener)\n\t{\n\t\tlistenerList.add(GraphChangeListener.class, listener);\n\t}", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "public abstract void registerListeners();", "public void addListener(TransferListener listener) {\n listeners.add(listener);\n }", "public void addListener(PersonneAdapterListener aListener) {\n mListListener.add(aListener);\n }", "void addListener( AvailabilityListener listener );", "public Promise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener)\r\n/* 97: */ {\r\n/* 98:133 */ if (listener == null) {\r\n/* 99:134 */ throw new NullPointerException(\"listener\");\r\n/* 100: */ }\r\n/* 101:137 */ if (isDone())\r\n/* 102: */ {\r\n/* 103:138 */ notifyLateListener(listener);\r\n/* 104:139 */ return this;\r\n/* 105: */ }\r\n/* 106:142 */ synchronized (this)\r\n/* 107: */ {\r\n/* 108:143 */ if (!isDone())\r\n/* 109: */ {\r\n/* 110:144 */ if (this.listeners == null)\r\n/* 111: */ {\r\n/* 112:145 */ this.listeners = listener;\r\n/* 113: */ }\r\n/* 114:147 */ else if ((this.listeners instanceof DefaultFutureListeners))\r\n/* 115: */ {\r\n/* 116:148 */ ((DefaultFutureListeners)this.listeners).add(listener);\r\n/* 117: */ }\r\n/* 118: */ else\r\n/* 119: */ {\r\n/* 120:151 */ GenericFutureListener<? extends Future<V>> firstListener = (GenericFutureListener)this.listeners;\r\n/* 121: */ \r\n/* 122:153 */ this.listeners = new DefaultFutureListeners(firstListener, listener);\r\n/* 123: */ }\r\n/* 124:156 */ return this;\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127:160 */ notifyLateListener(listener);\r\n/* 128:161 */ return this;\r\n/* 129: */ }", "public void addIndexDiffChangedListener(IndexDiffChangedListener listener) {\n\t\tsynchronized (listeners) {\n\t\t\tlisteners.add(listener);\n\t\t}\n\t}", "public void addTrackerListener(IXArchRelativePathTrackerListener listener) {\n listeners.add(listener);\n }", "public void addInternalListener(InternalListener listener) {\r\n getManager().addInternalListener(listener);\r\n }", "@Override\n\tpublic void addSinkLogEventListener(SinkLogEventListener listener) {\n\t\tsynchronized (logListeners) {\n\t\t\tlogListeners.add(listener);\n\t\t}\n\t}", "public void addAnswerListener(AnswerListener anw){\n\t\tlisteners.add(anw);\n\t}", "void addListener(GraphListener listener);", "public void addListener(IMessageListener newListener) {\n synchronized (listeners) {\n listeners.add(newListener);\n }\n }", "public void addChangeListener(final ChangeListener listener) {\n listeners.add(ChangeListener.class, listener);\n }" ]
[ "0.7401766", "0.73755157", "0.70935124", "0.708499", "0.7065984", "0.6974851", "0.69687635", "0.6924405", "0.69134957", "0.68875694", "0.6872939", "0.6854193", "0.68477225", "0.68084997", "0.6778137", "0.67492104", "0.6747239", "0.6746791", "0.67270833", "0.67069954", "0.66944474", "0.66613877", "0.6661324", "0.6636288", "0.66289467", "0.66173667", "0.6606419", "0.66003186", "0.6595862", "0.65924805", "0.6570338", "0.65623856", "0.6528014", "0.6526902", "0.65230983", "0.651649", "0.65131986", "0.6483706", "0.64830714", "0.6474896", "0.6474538", "0.6443783", "0.64076644", "0.6403888", "0.64033616", "0.63947105", "0.63921404", "0.63770735", "0.6374362", "0.6374362", "0.63505626", "0.6347379", "0.6342338", "0.6334705", "0.6334392", "0.6331709", "0.6330821", "0.63304305", "0.6324812", "0.632452", "0.63235587", "0.63145006", "0.63118047", "0.6309529", "0.63034505", "0.6269271", "0.6266371", "0.6254845", "0.6249353", "0.6246157", "0.6241483", "0.6224903", "0.6213", "0.62046736", "0.6202529", "0.61946243", "0.6192325", "0.6191546", "0.618479", "0.61796385", "0.61796385", "0.61748874", "0.617483", "0.6171289", "0.616458", "0.6158803", "0.61586815", "0.6155275", "0.6152124", "0.613844", "0.6135008", "0.6124578", "0.61172634", "0.61003387", "0.60999274", "0.6099276", "0.6098014", "0.60928714", "0.6092466", "0.6091926" ]
0.709532
2
Delete the refactoring with the given id. Future attempts to use the refactoring id will result in an error being returned.
public void deleteRefactoring(String refactoringId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int delete(String id) {\n\treturn projectmapper.delete(id);\n}", "@Override\n\tpublic void deleteById(Integer id) {\n\t\tfacturaRepository.deleteById(id);\n\t\t\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Chocolate : {}\", id);\n chocolateRepository.deleteById(id);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Competition : {}\", id);\n competitionRepository.deleteById(id);\n }", "public static void delete(int id) {\r\n\t\tString IdColumnName = \"feature_id\";\r\n\t\toperation.removeRow(\"FEATURE\", IdColumnName, id);\r\n\t}", "public void deleteTour(String id) {\n tourRepository.delete(Long.parseLong(id));\n }", "public void deleteTeamById(UUID id) {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if (!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with id \" + id + \" is not available\");\n teamRepo.deleteById(id);\n }", "void deleteById(final String id);", "@Override\n\tpublic int delete(String id) {\n\t\treturn st.delete(\"couplens.delete\",id);\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete TechPractices : {}\", id);\n techPracticesRepository.deleteById(id);\n }", "@Override\n\tpublic void deleteClasse(String id) {\n\t\tclasseRepo.deleteById(id);\n\t}", "public static void delete(int id){\n\t\tfind.byId(id).delete();\n\t}", "@Override\r\n\tpublic void delete(int id) {\n\t\tstnLooseMtRepository.delete(id);\r\n\t\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Faculty : {}\", id);\n facultyRepository.deleteById(id);\n }", "public void delete(String id) {\n\t\tdao.delete(id);\n\t}", "@DeleteMapping(value = \"/deletegreeting\")\n public String deleteGreeting(@RequestParam int id) {\n return greetingService.deleteGreeting(id);\n }", "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 ProjectTypeId : {}\", id);\n projectTypeIdRepository.deleteById(id);\n }", "default void delete(ID id)\n throws TechnicalException, ConflictException{\n delete(find(id));\n }", "@Override\r\n\tpublic int delete(int id) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_DEL_ESTADO_CIVIL(?)\", id);\r\n\t}", "public void deleteById(String id);", "public int deleteComment(int id) {\n\t\treturn cdi.deleteComment(id);\n\t}", "public com.vportal.portlet.vfaq.model.FAQComment remove(long id)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tcom.vportal.portlet.vfaq.NoSuchFAQCommentException;", "public boolean delete(String id);", "public boolean delete(String id);", "public void delete(Long id) {\n log.debug(\"Request to delete ContributionType : {}\", id);\n contributionTypeRepository.deleteById(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Chucdanh : {}\", id);\n chucdanhRepository.deleteById(id);\n }", "@RequestMapping(method = RequestMethod.DELETE, value = \"/teams/{id}\")\n public void deleteTeam(@PathVariable Integer id) {\n teamService.deleteTeam(id);\n }", "public void delete(int id) {\n\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\tdispositivoDao.deleteById(id);\n\t}", "@DeleteMapping(\"/c-p-expense-tranfers/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCPExpenseTranfer(@PathVariable UUID id) {\n log.debug(\"REST request to delete CPExpenseTranfer : {}\", id);\n cPExpenseTranferService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public String deleteCar(int id) {\r\n repository.deleteById(id);\r\n\r\n return \"\\nCar with id \" + id + \" deleted!\\n\";\r\n }", "public void deleteById(final String id)\n\t{\n\t\tfinal T entity = findById(id);\n\t\tdelete(entity);\n\t}", "@Override\n\tpublic void delete(Integer id) {\n\t\tchiTietDonHangRepository.deleteById(id);\n\t}", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete File : {}\", id);\n fileRepository.delete(id);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete TaskProject : {}\", id);\n taskProjectRepository.delete(id);\n taskProjectSearchRepository.delete(id);\n }", "@Override\r\n\tpublic Result delete(int id) {\n\t\treturn null;\r\n\t}", "public int delete(String id) {\n\t\treturn 0;\n\t}", "void deleteTrackerProjects(final Integer id);", "public void delete(Long id) {\n log.debug(\"Request to delete Candidato : {}\", id);\n candidatoRepository.deleteById(id);\n }", "public void delete(int id) {\n\t\tdao.delete(id);\r\n\t}", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete ClarifaiProcess : {}\", id);\n clarifaiProcessRepository.delete(id);\n clarifaiProcessSearchRepository.delete(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Fonctions : {}\", id);\n fonctionsRepository.deleteById(id);\n }", "@DeleteMapping(\"/suggestions/{id}\")\r\n public ResponseEntity<Void> deleteSuggestion(@PathVariable Long id) {\r\n log.debug(\"REST request to delete Suggestion : {}\", id);\r\n suggestionService.delete(id);\r\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\r\n }", "@Security.Authenticated(Authenticators.Admin.class)\n public Result deleteComment(int id) {\n Comment comment = Comment.findById(id);\n if (comment == null) {\n return badRequest(\"Comment does not exist!\");\n }\n comment.delete();\n return ok();\n }", "public void delete(int id) throws Exception {\n\n\t}", "@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tcomproRepository.deleteById(id);\n\t}", "@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}", "public void delete(String id) {\n\t\t\n\t\tString sql = \"delete from test_jdbc where id=\"+id;\n\t\ttemplate.update(sql);\n\t\t\n//\t\ttry {\n//\t\t\tcon = DriverManager.getConnection(url, user, pw);\n//\t\t\tps = con.prepareStatement(sql);\n//\t\t\tps.setString(1, id);\n//\t\t\tps.executeUpdate();\n//\t\t} catch (Exception e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n\t\t\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete TipoSituacao : {}\", id);\n tipoSituacaoRepository.delete(id);\n }", "public void deleteTicket(Long id) {\n\t\tTicket ticket = ticketRepository.findTicketByReference(id).orElseThrow(()->\n\t\t\t\tnew ResourceNotFoundException(\"Ticket with id \"+id+\" was not found\"));\n\t\tticketRepository.delete(ticket);\n\t}", "@Override\n\tpublic void delete(long id) throws Exception {\n\t\tfind(id);\n\n\t\t// check if the template component has been used\n\t\tList<GpProjectTemplate> list = getProjectTemplateService()\n\t\t\t\t.findByTemplate(id);\n\t\tif (list != null && !list.isEmpty()) {\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Template (ID=\"\n\t\t\t\t\t\t\t+ id\n\t\t\t\t\t\t\t+ \") can't be deleted. It has been used inside a Project Template.\");\n\t\t}\n\n\t\t// delete template components\n\t\tgetTemplateComponentService().deleteTemplateComponent(id);\n\n\t\t// delete template\n\t\tgetTemplateDao().delete(id);\n\t}", "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);", "public boolean delete(String id) {\n\t\t\treturn false;\n\t\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Proposal : {}\", id);\n proposalRepository.deleteById(id);\n proposalSearchRepository.deleteById(id);\n }", "@Override\r\n\tpublic void delete(Long id) {\n\t\trepository.deleteById(id);\r\n\t}", "@DeleteMapping(value = \"/deleteGreeting\")\n\tpublic ResponseEntity<String> deleteGreeting(@RequestParam(name = \"id\") int id) {\n\t\treturn new ResponseEntity<>(greetingService.deleteGreeting(id), HttpStatus.OK);\n\t}", "@Override\r\n\tpublic void delete(int id) {\n\t\tlibroRepository.deleteById(id);\r\n\t}", "@Override\n\tpublic String delete(Long id) {\n\t\tOptional<FoodTruckEntity> result=repo.findById(id);\n\t\tif(result.isPresent()) { \n\t\t\t repo.deleteById(id);\n\t\t\t return \"Id \" +id +\"data deleted Succesfully\";\n\t\t } \n\t\t else {\n\t\t \n\t\t\t return \"id \"+id+\"is not pressent\"; \n\t\t }\n\t\t\n\t}", "@Override\n\tpublic void deleteById(String id) {\n\t\tcontractDao.delete(id);\n\t}", "@Override\n\tpublic void deleteById(String id) {\n\t\t\n\t}", "public void deleteFichier(int id) throws SQLException {\n\t\tString query = SQLQueries.DELETE_FICHIER_QUERY + id;\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t\tSystem.out.println(\"Fichier supprimé.\");\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tconnection.close();\n\t\t}\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete PositionMove : {}\", id);\n positionMoveRepository.delete(id);\n }", "public static void deleteTorre(int id) {\n Connection conn = Menu_Principal.conn;\n PreparedStatement pstmt = null;\n\n String q_DeTorre = \"DELETE\\n\"\n + \"FROM\\n\"\n + \" tor_torre\\n\"\n + \"WHERE\\n\"\n + \" id_torre = ?\";\n try {\n pstmt = conn.prepareStatement(q_DeTorre);\n pstmt.setInt(1, id);\n pstmt.executeUpdate();\n conn.commit();\n// JOptionPane.showMessageDialog(null, \"El registro se elimino correctamente\", \"Información\", JOptionPane.INFORMATION_MESSAGE);\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"No se pudo completar la operación.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n// System.err.println(\"Fallo DELETE Torre: \" + e.getClass().getName() + \": \" + e.getMessage());\n } // Fin de try...catch\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete BenchCommentHistory : {}\", id);\n benchCommentHistoryRepository.delete(id);\n }", "@Override\n\tpublic void del(String id) {\n\t\ttBasUnitClassRepository.delete(id);\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete CaseReport : {}\", id);\n caseReportRepository.deleteById(id);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Tbc_fazenda : {}\", id);\n tbc_fazendaRepository.delete(id);\n tbc_fazendaSearchRepository.delete(id);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Exam : {}\", id);\n examRepository.deleteById(id);\n }", "@Override\n\tpublic void delete(String id) throws Exception {\n\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Ticket : {}\", id);\n ticketRepository.delete(id);\n ticketSearchRepository.delete(id);\n }", "public void eliminar(int id) {\n\t\tvacantesrepo.deleteById(id);\n\t}", "@DeleteMapping(\"/comments/{id}\")\n ResponseEntity<HttpStatus> deleteComment(@PathVariable String id){\n commentService.deleteComment(Integer.parseInt(id));\n return ResponseEntity.ok(HttpStatus.OK);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Movie : {}\", id);\n movieRepository.delete(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete MFPortfolio : {}\", id);\n mFPortfolioRepository.delete(id);\n }", "@Override\n\tpublic void deleteVille(Long id) {\n\t\tOptional<Ville> ville = villeRepository.findById(id);\n\t\t\n\t\tif(ville==null)\n\t\t\tthrow new EntityNotFoundException(\"No ville with id \"+id+\" is founded\");\n\t\telse\n\t\t\tvilleRepository.delete(ville.get());\n\t\t\n\t}", "@Override\n\tpublic int delete(String id) {\n\t\treturn sysActionLogDao.delete(id);\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete PizzaOrder : {}\", id);\n pizzaOrderRepository.deleteById(id);\n }", "@Override\n\tpublic void delete(String id) {\n\n\t}", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete Projectproduct : {}\", id);\n projectproductRepository.delete(UUID.fromString(id));\n }", "@Override\n\tpublic long delete(String id) {\n\t\tdelete(Integer.valueOf(id));\n\t\treturn 0;\n\t}", "@Override\n\tpublic int deleteById(int id) {\n\t\treturn customerBrowseMapper.deleteById(id);\n\t}", "public void deleteById(Integer id) {\n\n\t}", "@Override\n\tpublic void deleteById(String id) throws Exception {\n\t\t\n\t}", "public void remove(String id) {\n\t\t\n\t}", "public String deleteMovie(String id)\r\n\t{\n\t\treturn null;\r\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Recipe : {}\", id);\n recipeRepository.deleteById(id);\n }" ]
[ "0.651414", "0.6216701", "0.6202856", "0.6184521", "0.6178757", "0.6178643", "0.61768985", "0.6163505", "0.61586666", "0.6141616", "0.6130887", "0.6129712", "0.6101032", "0.60761666", "0.60220635", "0.60169834", "0.6006094", "0.6006094", "0.6006094", "0.6006094", "0.6006094", "0.5974252", "0.596778", "0.5950557", "0.59347945", "0.5933909", "0.5933286", "0.5919798", "0.5919798", "0.5918645", "0.5910432", "0.58997333", "0.5894797", "0.5893505", "0.5889009", "0.58839834", "0.58792216", "0.58791363", "0.5876639", "0.58719426", "0.5868219", "0.586183", "0.58557194", "0.58554995", "0.58515114", "0.58472973", "0.58356404", "0.58346695", "0.58288246", "0.5814428", "0.58140683", "0.5813568", "0.58113295", "0.5810267", "0.5807305", "0.58069813", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5805719", "0.5796292", "0.5786813", "0.57833976", "0.5782351", "0.5781131", "0.57775486", "0.57730925", "0.5765176", "0.5762366", "0.57609653", "0.5755074", "0.57516396", "0.5748901", "0.5744313", "0.57401395", "0.5737158", "0.57363355", "0.57340574", "0.5733626", "0.5722833", "0.57220674", "0.5721619", "0.5720574", "0.571989", "0.5717771", "0.57120323", "0.5711061", "0.5710892", "0.57085127", "0.5703096", "0.5698034", "0.56968135", "0.5694474", "0.5692739" ]
0.83060175
0
Computes the set of assits that are available at the given location. An assist is distinguished from a refactoring primarily by the fact that it affects a single file and does not require user input in order to be performed. The given consumer is invoked asynchronously on a different thread.
public void getAssists(String file, int offset, int length, AssistsConsumer consumer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {\n\t\treturn Arrays.asList(assistant.computeCompletionProposals(context.getViewer(), context.getInvocationOffset()));\n\t}", "private ICompletionProposal[] getCompletionProposals(int offset) throws BadLocationException {\n \t\treturn contentAssistant.getContentAssistProcessor(document.getContentType(offset))\n \t\t\t\t.computeCompletionProposals(editor.getProjectionViewer(), offset);\n \t}", "private List<ICompletionProposal> getSuggestions(ITextViewer viewer,\n \t\t\tint offset, String prefix) throws BadLocationException {\n \n \t\tProperties properties = loadProposalFile();\n \n \t\tMap<String, String> filteredSuggestions = new HashMap<String, String>();\n \n \t\tfor (Entry<Object, Object> property : properties.entrySet()) {\n \t\t\tif (((String) property.getValue()).startsWith(prefix)) {\n \t\t\t\tfilteredSuggestions.put((String) property.getKey(),\n \t\t\t\t\t\t(String) property.getValue());\n \t\t\t}\n \t\t}\n \n \t\tList<ICompletionProposal> suggestions = createProposals(viewer,\n \t\t\t\tfilteredSuggestions, offset, prefix);\n \n \t\treturn suggestions;\n \t}", "private void asyncRecomputeProposals() {\n\t\tfooter.setText(\"Searching...\");\n\t\tif (isValid()) {\n\t\t\tsynchronized (uniqueId) {\n\t\t\t\tif (uniqueId == Long.MAX_VALUE)\n\t\t\t\t\tuniqueId = Long.MIN_VALUE;\n\t\t\t\tuniqueId++;\n\t\t\t}\n\t\t\tfinal Long currentId = new Long(uniqueId);\n\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tadapter.getProposals(new IContentProposalSearchHandler() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleResult(\n\t\t\t\t\t\t\t\tfinal ContentProposalList proposalList) {\n\t\t\t\t\t\t\tif (control != null && !control.isDisposed()) {\n\t\t\t\t\t\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tif (currentId.equals(uniqueId))\n\t\t\t\t\t\t\t\t\t\t\trecomputeProposals(proposalList);\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}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleTooltips(List<TooltipData> tooltips) {\n\t\t\t\t\t\t\tadapter.handleTooltipData(tooltips);\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 ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,\n\t\t\tint documentOffset) {\n\t\tboolean dotActivation = false;\n\n\t\tVector<ICompletionProposal> result = new Vector<ICompletionProposal>();\n\t\t// ICompletionProposal[] result= new\n\t\t// ICompletionProposal[fgProposals.length];\n\t\tIDocument doc = viewer.getDocument();\n\n\t\tFindReplaceDocumentAdapter frd = new FindReplaceDocumentAdapter(doc);\n\n\t\tint pos = documentOffset;\n\t\tdo {\n\t\t\tpos--;\n\t\t} while (pos >= 0 && !Character.isWhitespace(frd.charAt(pos)));\n\t\tpos++;\n\n\t\tString stp = \"\";\n\t\tif (pos >= 0)\n\t\t\tstp = frd.subSequence(pos, documentOffset).toString();\n\n\t\t// See if we have . activation\n\t\tif (frd.charAt(documentOffset - 1) == '.') {\n\t\t\tString props[] = dotActivation(stp, result);\n\t\t\tfor (int i = 0; i < props.length; i++) {\n\t\t\t\tString val = props[i];\n\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t// fgProposals[i], info,\n\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\tresult.add(new CompletionProposal(val, documentOffset, 0,\n\t\t\t\t\t\tval.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t}\n\n\t\t} else {\n\t\t\t// System.out.println(\"String part:\" + stp);\n\t\t\tSet<String> comps = fgProposals.keySet();\n\t\t\tIterator<String> compitr = comps.iterator();\n\t\t\twhile (compitr.hasNext()) {\n\t\t\t\t// CompletionToken comp = comps.nextElement();\n\t\t\t\t// String val = comp.getKey();\n\t\t\t\tString val = compitr.next();\n\t\t\t\t// If there are too many matches (and it becomes annoying) then\n\t\t\t\t// remove the two calls to toLowerCase() below\n\t\t\t\t// if (val.toLowerCase().startsWith(stp.toLowerCase())) {\n\t\t\t\tif (val.startsWith(stp)) {\n\n\t\t\t\t\tString rep = val.substring(stp.length());\n\t\t\t\t\tIContextInformation info = new ContextInformation(\n\t\t\t\t\t\t\tval,\n\t\t\t\t\t\t\tMessageFormat\n\t\t\t\t\t\t\t\t\t.format(\n\t\t\t\t\t\t\t\t\t\t\t\"CompletionProcessor.Proposal.ContextInfo.pattern\", new Object[] { val })); //$NON-NLS-1$\n\t\t\t\t\t// result.add(new CompletionProposal(fgProposals[i],\n\t\t\t\t\t// documentOffset, 0, fgProposals[i].length(), null,\n\t\t\t\t\t// fgProposals[i], info,\n\t\t\t\t\t// MessageFormat.format(\"CompletionProcessor.Proposal.hoverinfo.pattern\",\n\t\t\t\t\t// new Object[] { fgProposals[i]}))); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t\t\t// Do not show proposals with . if the stump does not have a .\n\t\t\t\t\tif(!((stp.indexOf('.') == -1) && val.indexOf('.') != -1)) {\n\t\t\t\t\t\tresult.add(new CompletionProposal(rep, documentOffset, 0,\n\t\t\t\t\t\t\t\trep.length(), null, val, null, null)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// adding an empty string to ensure that the completion dialog appears\n\t\tif (result.size() == 0) {\n\t\t\tresult.add(new CompletionProposal(\n\t\t\t\t\t\"\", documentOffset, 0, 0, null, \"\", null, null)); //$NON-NLS-1$\n\t\t}\n\n\t\treturn result.toArray(new ICompletionProposal[result.size()]);\n\t}", "public CompletableFuture<List<Details>> searchTweetByLocation(CompletableFuture<String> geoLocation){\n try{\n String topic= geoLocation.get();\n return searchTweetByTopic(topic);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return null;\n\n }", "@Override\n\tpublic CompletableFuture<Void> advance(String loc) {\n\t\treturn console(\"advance \" + loc, CompletesWithRunning.MUST);\n\t}", "public interface AutoCompleter {\n \n /** Sets the callback that will be notified when items are selected. */\n void setAutoCompleterCallback(AutoCompleterCallback callback);\n\n /** \n * Sets the new input to the autocompleter. This can change what is\n * currently visible as suggestions.\n * \n * The returned Future returns true if the lookup for autocompletions\n * completed succesfully. True does not indicate autocompletions are\n * available. It merely indicates that the lookup completed.\n * \n * Because AutoCompleters are allowed to be asynchronous, one should\n * use Future.get or listen to the future in order to see when\n * the future has completed.\n */\n ListeningFuture<Boolean> setInput(String input);\n\n /**\n * Returns true if any autocomplete suggestions are currently available, based the data\n * that was given to {@link #setInput(String)}.\n */\n boolean isAutoCompleteAvailable();\n\n /** Returns a component that renders the autocomplete items. */\n JComponent getRenderComponent();\n\n /** Returns the currently selected string. */\n String getSelectedAutoCompleteString();\n\n /** Increments the selection. */\n void incrementSelection();\n \n /** Decrements the selection. */\n void decrementSelection();\n \n /** A callback for users of autocompleter, so they know when items have been suggested. */\n public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }\n\n}", "private static void automate() {\n \tLOG.info(\"Begin automation task.\");\n \t\n \tcurrentOpticsXi = clArgs.clusteringOpticsXi;\n \tdouble opticsXiMax = (clArgs.clusteringOpticsXiMaxValue > ELKIClusterer.MAX_OPTICS_XI ? ELKIClusterer.MAX_OPTICS_XI : clArgs.clusteringOpticsXiMaxValue);\n \tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \tint opticsMinPointsMax = clArgs.clusteringOpticsMinPtsMaxValue;\n \t\n \tLOG.info(\"optics-xi-start: {}, optics-xi-min-points-start: {}, optics-xi-step-size: {}, optics-min-points-step-size: {}\",\n \t\t\tnew Object[] { \n \t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints), \n \t\t\t\tdf.format(clArgs.clusteringOpticsXiStepSize), df.format(clArgs.clusteringOpticsMinPtsStepSize)\n \t\t\t});\n \t\n \twhile (currentOpticsXi <= opticsXiMax) {\n \t\twhile (currentOpticsMinPoints <= opticsMinPointsMax) {\n \t\t\t// Run automation for each combination of opticsXi and opticsMinPoints\n \t\t\tLOG.info(\"Run automation with optics-xi: {}, optics-xi-min-points: {}\", \n \t\t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints));\n \t\t\t\n \t\t\ttry {\n\t \t\t\t// Step 1: Clustering\n\t \t\t\tclustering(clArgs.clusteringInFile, clArgs.clusteringOutDir, currentOpticsXi, currentOpticsMinPoints);\n\t \t\t\t\n\t \t\t\t// Step 2: Build shared framework\n\t \t\t\tbuildFramework();\n\t \t\t\t\n\t \t\t\t// Step 3: Build user hierarchical graphs\n\t \t\t\tbuildHierarchicalGraphs();\n\t \t\t\t\n\t \t\t\t// Step 4: Calculate similarity between all users and create evaluation results afterwards\n\t \t\t\tcalculateSimilarity();\n \t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred during the automation task. Jumping to the next pass.\", e);\n\t\t\t\t} finally {\n\t \t\t\t// Step 5: Clean up for the next run\n\t \t\t\tcleanAutomationResults();\n\t \t\t\t\n\t \t\t\t// Increase the currentOpticsMinPoints for the next run if desired\n\t \t\t\tif (clArgs.clusteringOpticsMinPtsStepSize > 0)\n\t \t\t\t\tcurrentOpticsMinPoints += clArgs.clusteringOpticsMinPtsStepSize;\n\t \t\t\telse\n\t \t\t\t\tbreak;\n\t\t\t\t}\n \t\t}\n \t\t// Reset current values\n \t\tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \t\t\n \t\t// Increase currentOpticsXi for the next run if desired\n \t\tif (clArgs.clusteringOpticsXiStepSize > 0)\n\t\t\t\tcurrentOpticsXi += clArgs.clusteringOpticsXiStepSize;\n\t\t\telse\n\t\t\t\tbreak;\n \t}\n \t\n \tLOG.info(\"End automation task.\");\n }", "public ArrayList<University> takeQuiz(String location, String characteristic, String control, String[] emphasis) {\n\t\tArrayList<University> personalMatches = new ArrayList<University>();\n\n\t\tif (location.equals(\"\") || control.equals(\"\") || characteristic.equals(\"\")) {\n\t\t\tthrow new IllegalArgumentException(\"Sorry, you must answer all questions\");\n\t\t} else {\n\t\t\tif (characteristic.equals(\"academic\")) {\n\n\t\t\t\tpersonalMatches = sfCon.search(\"\", \"-1\", location, -1, -1, (float) -1.0, (float) -1.0, -1, -1, -1, -1,\n\t\t\t\t\t\t-1, -1, (float) -1.0, (float) -1.0, -1, -1, (float) -1.0, (float) -1.0, (float) -1.0,\n\t\t\t\t\t\t(float) -1.0, 3, -1, -1, -1, -1, -1, emphasis, control);\n\t\t\t} else if (characteristic.equals(\"social\")) {\n\t\t\t\tpersonalMatches = sfCon.search(\"\", \"-1\", location, -1, -1, (float) -1.0, (float) -1.0, -1, -1, -1, -1,\n\t\t\t\t\t\t-1, -1, (float) -1.0, (float) -1.0, -1, -1, (float) -1.0, (float) -1.0, (float) -1.0,\n\t\t\t\t\t\t(float) -1.0, -1, -1, 3, -1, -1, -1, emphasis, control);\n\t\t\t} else if (characteristic.equals(\"qualityOfLife\")) {\n\t\t\t\tpersonalMatches = sfCon.search(\"\", \"-1\", location, -1, -1, (float) -1.0, (float) -1.0, -1, -1, -1, -1,\n\t\t\t\t\t\t-1, -1, (float) -1.0, (float) -1.0, -1, -1, (float) -1.0, (float) -1.0, (float) -1.0,\n\t\t\t\t\t\t(float) -1.0, -1, -1, -1, -1, 3, -1, emphasis, control);\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 0; i < personalMatches.size(); i++) {\n\t\t\tSystem.out.println(\"Match: \" + personalMatches.get(i).getName());\n\n\t\t}\n\t\treturn personalMatches;\n\t}", "public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}", "private synchronized void syncTypeChefAnalyzes() {\r\n\t\tif (threadInExecId.isEmpty()) {\r\n\t\t\tProjectConfigurationErrorLogger.getInstance().clearLogList();\r\n\t\t\trunTypeChefAnalyzes(featureProject.getSourceFolder());\r\n\t\t}\r\n\t\tthreadInExecId.add(Thread.currentThread().getId());\r\n\t}", "public void testCompletion() throws Exception {\n \t\tsetUpIntentProject(\"completionTest\", INTENT_DOC_PATH);\n \t\teditor = openIntentEditor();\n \t\tdocument = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tcontentAssistant = editor.getViewerConfiguration().getContentAssistant(editor.getProjectionViewer());\n \n \t\tICompletionProposal[] proposals = null;\n \n \t\t/*\n \t\t * STRUCTURE\n \t\t */\n \t\t// inside a document\n \t\tproposals = getCompletionProposals(12);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(15);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_CHAPTER, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CHAPTER, proposals[1].getDisplayString());\n \n \t\t// inside a chapter\n \t\tproposals = getCompletionProposals(741);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tproposals = getCompletionProposals(745);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(KW_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[1].getDisplayString());\n \n \t\t// inside a section\n \t\tproposals = getCompletionProposals(773);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_SECTION, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_MU, proposals[1].getDisplayString());\n \n \t\t/*\n \t\t * MODELING UNITS\n \t\t */\n \t\t// beginning of the modeling unit\n \t\tproposals = getCompletionProposals(2138);\n \t\t// We should propose to create a new resource, a new entity, or contribute to an existing entity\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// beginning of a named modeling unit\n \t\tproposals = getCompletionProposals(3232);\n \t\tassertIsExpectedProposalsForEmptyModelingUnit(proposals);\n \n \t\t// resource declaration patterns\n \t\tproposals = getCompletionProposals(3263);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_URI, proposals[0].getDisplayString());\n \t\tassertEquals(TEMPLATE_DESC_CONTENT, proposals[1].getDisplayString());\n \n \t\t// features proposals in instanciation\n \t\tproposals = getCompletionProposals(3557);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"nsURI : EString [?] - Set the value EPackage.nsURI\", proposals[0].getDisplayString());\n \t\tassertEquals(\"nsPrefix : EString [?] - Set the value EPackage.nsPrefix\",\n \t\t\t\tproposals[1].getDisplayString());\n \n \t\t// features proposals in contribution\n \t\tproposals = getCompletionProposals(3848);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\"eClassifiers : EClassifier [0,*] - Set the value match.eClassifiers\",\n \t\t\t\tproposals[0].getDisplayString());\n \n \t\t// Boolean value\n \t\tproposals = getCompletionProposals(4016);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(TEMPLATE_DESC_BOOL_VALUE, proposals[0].getDisplayString());\n \n \t\t// Object value\n \t\tproposals = getCompletionProposals(3985);\n \t\tassertEquals(3, proposals.length);\n \t\t// We should propose to create a new Element\n \t\tassertEquals(\"new Element (of type EClassifier) - Set this new Element as value for eType\",\n \t\t\t\tproposals[0].getDisplayString());\n \t\t// Use existing elements (of matching type) defined in the document\n \t\tassertEquals(\"Reference to MatchElement - Set the MatchElement element as value for eType\",\n \t\t\t\tproposals[1].getDisplayString());\n \t\t// And available Classifiers from the package registry\n \t\tassertEquals(\"MatchElement - http://www.eclipse.org/emf/compare/match/1.1\",\n \t\t\t\tproposals[2].getDisplayString());\n \n \t\t// instanciation proposals\n \t\tproposals = getCompletionProposals(3865);\n \t\tassertEquals(2, proposals.length);\n \t\tassertEquals(\"EClass - http://www.eclipse.org/emf/2002/Ecore\", proposals[0].getDisplayString());\n \t\tassertEquals(\"EClassifier - http://www.eclipse.org/emf/2002/Ecore\", proposals[1].getDisplayString());\n \n \t\t// features proposals further in contribution\n \t\tproposals = getCompletionProposals(4128);\n \t\tassertEquals(1, proposals.length);\n \t\tassertEquals(\n \t\t\t\t\"eStructuralFeatures : EStructuralFeature [0,*] - Set the value EClass.eStructuralFeatures\",\n \t\t\t\tproposals[0].getDisplayString());\n \t}", "public CompletionProvider createCodeCompletionProvider() {\n\n\t\t// Add completions for the C standard library.\n\t\tDefaultCompletionProvider cp = new DefaultCompletionProvider();\n\n\t\t// First try loading resource (running from demo jar), then try\n\t\t// accessing file (debugging in Eclipse).\n\t\tClassLoader cl = getClass().getClassLoader();\n\t\tInputStream in = cl.getResourceAsStream(rootFolder + \"\\\\c.xml\");\n\t\ttry {\n\t\t\tif (in!=null) {\n\t\t\t\tcp.loadFromXML(in);\n\t\t\t\tin.close();\n\t\t\t\t//System.out.println(\"*******************File exists1***************\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tFile file = new File(rootFolder, \"c.xml\");\n\t\t\t\t//System.out.println(\"@AutoCompleteProvider completeFile:\" + file.getAbsolutePath());\n\t\t\t\tif (file.exists())\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"*******************File exists2***************\");\n\t\t\t\t\tcp.loadFromXML(file);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\t// Add some handy shorthand completions.\n\t\tcp.addCompletion(new ShorthandCompletion(cp, \"main\",\n\t\t\t\t\t\t\t\"int main(int argc, char **argv)\"));\n\n\t\t// Add a parameterized completion with a ton of parameters (see #67)\n\t\tFunctionCompletion functionCompletionWithLotsOfParameters = new FunctionCompletion(cp, \"long\", \"int\");\n\t\tParameterizedCompletion.Parameter param = new ParameterizedCompletion.Parameter(\"int\", \"intVal \");\n\t\tparam.setDescription(\"hello world\");\n\t\tfunctionCompletionWithLotsOfParameters.setParams(Arrays.asList(\n\t\t\tparam,\n\t\t\tnew ParameterizedCompletion.Parameter(\"float\", \"floatVal \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"string\", \"stringVal \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"int\", \"intVal2 \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"float\", \"floatVal2 \"),\n\t\t\tnew ParameterizedCompletion.Parameter(\"string\", \"stringVal2 \")\n\t\t\t\n\t\t));\n\t\t\n\t\tcp.addCompletion(functionCompletionWithLotsOfParameters);\n\t\treturn cp;\n\n\t}", "public void Run(String filePath){\n\n //read in the input file from the user declared path\n ReadInputFile(filePath);\n\n //save data for refactoring process\n refact = inputFile;\n\n //Prompt the user and wait\n System.out.println(\"Beginning refactoring process...\\n\\n\");\n DisplaySleep();\n\n //refactor the entire async task file\n ImportLibrary();\n CacheAsyncTaskFunctions();\n HandleAysncFromOnCreate();\n HandleBuilder(LOADER_CALLBACK);\n HandleBuilder(LOADER_CLASS);\n\n //write to the new file\n try{\n PrintWriter writer = new PrintWriter(\"RefactoredOutput.java\", \"UTF-8\");\n\n for(String in: inputFile){\n writer.print(in);\n }\n writer.close();\n }\n catch(IOException ex){\n System.out.println(ex);\n }\n\n //let the user know that the program has finished running\n System.out.println(\"AsyncTask Refactoring Process Complete!\");\n }", "@Test\n public void testGetsAroundLocationI() throws DataSourceException, InvalidIdentifierException {\n // Get all demands from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 0);\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) && selection.get(1).getKey().equals(second.getKey()) ||\n selection.get(1).getKey().equals(first.getKey()) && selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }", "public static void main() {\n // Since we cant use a global counter for all the different files\n // We use a global accumulator that takes the result from each file\n // After they are done with their respective file and save their result\n // This way they dont share a counter, but rather a place to store their counter\n // when they are done. \n AtomicInteger accumulator = new AtomicInteger(); // Default value = 0\n \n // word -> number of times that it appears over all files\n Map< String, Integer> occurrences = new HashMap<>();\n\n List< String> filenames = List.of(\n \"text1.txt\",\n \"text2.txt\",\n \"text3.txt\",\n \"text4.txt\",\n \"text5.txt\",\n \"text6.txt\",\n \"text7.txt\",\n \"text8.txt\",\n \"text9.txt\",\n \"text10.txt\"\n );\n\n CountDownLatch latch = new CountDownLatch(filenames.size());\n\n filenames.stream()\n .map(filename -> new Thread(() -> {\n int count = computeOccurrences(filename, occurrences);\n accumulator.addAndGet(count);\n latch.countDown();\n }))\n .forEach(Thread::start);\n\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(accumulator);\n }", "public interface FriendAutoCompleterFactory {\n\n /**\n * Returns a FriendLibraryAutocompleter that will supply suggestions based\n * on category.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);\n\n /**\n * Returns a FriendLibraryPropertyAutocompleter that will supply suggestions\n * based on category and FilePropertyKey combination.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch,\n FilePropertyKey filePropertyKey);\n\n}", "@Test\n public void testGetsAroundLocationII() throws InvalidIdentifierException, DataSourceException {\n // Get just one demand from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 1);\n assertNotNull(selection);\n assertEquals(1, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) ||\n selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }", "private void assignAssistants(Player owner, Assistant a) {\n\t\towner.setAssistants(owner.getAssistants() + a.getNumber());\n\t}", "String readAll(String pressNum){\n // All files to write to / read from\n File listIOLog = new File(folderName + FILE_LIST_IO_LOG); // Write only the values which are different\n File listTodo = new File(folderName + \"Todosteps.txt\"); // This file have all the steps that are needed\n\n\n BufferedReader fileBr = null;\n BufferedReader fileTodoBw = null;\n BufferedWriter fileBw = null; // Temp to used in many places\n BufferedWriter fileBwLog = null;\n\n\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n\n if (!reading) { // TODO - When the program is close - delete listIOTemp\n reading = true; // Started to read the files\n try {\n fileTodoBw = new BufferedReader(new FileReader(listTodo));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n /* if (!listIOCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(listIOFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(listIOCurr)); // Add exception for only file not found ?\n }*/\n\n// String fileData = fileBr.readLine(); // Start reading\n String fileTodo = fileTodoBw.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread());\n\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\";\n String topicName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0; // Counter to know how many completion service where open\n Map<String, String> topicMap = new HashMap<>();\n List<String> todoList = new ArrayList<>();\n List<String> stepList = new ArrayList<>(); // Save all the steps (Step1, Step2 ...)\n\n // File read all todo list and save in an arraylist\n while (fileTodo != null) { // TODO - Add check if the number isn't missing\" (1,2,3,[missing],5 ..)\n\n todoList.add(fileTodo);\n fileTodo = fileTodoBw.readLine(); // Next line\n } // File read end\n\n // Save in a list all the steps of IO\n for(String steps : todoList){ // Maybe write a method in util/interface as it will be needed for Reg\n String[] stepName = steps.trim().split(\" \"); // [0] = step number , [1] = step title\n\n stepList.add(stepName[0].trim());\n }\n\n\n for(String step : stepList){\n\n String stepFile =\"StepIO\\\\\" + step + \"IO.text\"; // Check if it create the folder if doesn't exist\n\n File stepFileCurr = new File(pressNum + \"StepIO\\\\Curr\" + step + \"IO.text\"); // FolderName\\SystabIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n File stepFileFresh = new File(pressNum + stepFile); // FolderName\\SystabIO\\StepxIO.txt - File without value , only the name of the systabIO\n\n\n if (!stepFileCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(stepFileFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(stepFileCurr)); // Add exception for only file not found ?\n }\n// String[] stepName = step.trim().split(\" \"); // [0] = step number , [1] = step name\n String fileData = fileBr.readLine(); // Start reading\n\n while (fileData != null) {\n\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topic name , [1] = value\n topicName = topicDetails[0]; // Readability\n if (topicDetails.length > 1) { // -> there is a value\n topicValue = topicDetails[1]; // Readability , verify only here if it really exist\n topicMap.put(topicName,topicValue); // Save the topic name and value as my temp\n } else {\n topicMap.put(topicName,\"\"); // No topic value\n }\n\n // Start futuretask completion service -> Start process to read the SystabIO\n completionService.submit(new SystabIO.CallSystabReg(topicName, step)); // TEST\n counterRequest++;\n fileData = fileBr.readLine(); // Next line\n } // No more topics to read from , continue to the next step\n\n stepFileCurr.delete(); // Delete it as all the data was read and saved , for later create a new current file with the new values\n }\n\n\n // Take results from process\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request were submit to completion service\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = step number . [1] = topic name , [2] = value\n String endResult = endResultArr[1] + \" \" + endResultArr[2];\n\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press)\n if (!endResultArr[2].equals(topicMap.get(endResultArr[1]))){ // Check if the new value and old value are equal , not equal -> show to user and save in log\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n // TODO - Change the values to On / Off\n String logResult = timeStamp + \" \" + endResultArr[0] + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n }\n\n // Create the new current file with new values\n File stepFileCurr = new File(pressNum + \"StepIO\\\\Curr\" + endResultArr[0] + \"IO.text\"); // FolderName\\SystabIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n\n fileBw = new BufferedWriter(new FileWriter(stepFileCurr));\n fileBw.write(endResult);\n fileBw.newLine();\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error IO\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n reading = false; // Finish to read all\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileTodoBw != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "String readAll(){\n // All files to write to / read from\n File listIOFresh = new File(FILE_LIST_IO_FRESH); // Only used when there still isn't a current file - template of list for IO\n File listIOCurr = new File(folderName + FILE_LIST_IO_CURR); // The file which the values and list are taken and compare with input from IO\n File listIOTemp = new File(folderName + FILE_LIST_IO_TEMP); // While runtime it will write the values in this file\n File listIOLog = new File(folderName + FILE_LIST_IO_LOG); // Write only the values which are different\n\n BufferedReader IOBr = null;\n BufferedReader fileBr = null;\n BufferedWriter fileBw = null;\n BufferedWriter fileBwLog = null;\n\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n\n if (!listIOTemp.exists()) { // TODO - When the program is close - delete listIOTemp\n try {\n fileBw = new BufferedWriter(new FileWriter(listIOTemp));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n if (!listIOCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(listIOFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(listIOCurr)); // Add exception for only file not found ?\n }\n\n String fileData = fileBr.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread());\n\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\";\n String topicName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0;\n HashMap<String, String> topicMap = new HashMap<>();\n\n // File data start\n while (fileData != null) {\n\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topic name , [1] = value\n topicName = topicDetails[0]; // Readability\n if (topicDetails.length > 1) {\n topicValue = topicDetails[1]; // Readability , verify only here if it really exist\n topicMap.put(topicName,topicValue); //\n } else {\n topicMap.put(topicName,\"\"); // No topic value\n }\n\n // Start futuretask completion service -> Start process to read the SystabIO\n completionService.submit(new CallSystabIo(topicName)); // TEST\n counterRequest++;\n fileData = fileBr.readLine(); // Next line\n } // File data end\n\n // Take results from process\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = topic name , [1] = value\n String endResult = endResultArr[0] + \" \" + endResultArr[1];\n\n fileBw.write(endResult);\n fileBw.newLine();\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press)\n if (!topicMap.get(topicName).isEmpty() && !endResultArr[1].equalsIgnoreCase(topicValue)) { // If the map in that key is empty -> first search\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n String logResult = timeStamp + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n }\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (IOBr != null) try {\n IOBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n if (listIOCurr.exists()) listIOCurr.delete();\n listIOTemp.renameTo(listIOCurr);\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "@Test\n public void testGetsAroundLocationIII() throws InvalidIdentifierException, DataSourceException {\n // Get limited number of demands from many locations\n //\n LocationOperations lOps = new LocationOperations();\n ProposalOperations sOps = new ProposalOperations();\n\n Location lFirst = new Location();\n lFirst.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n lFirst.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lFirst = lOps.createLocation(lFirst);\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal sFirst = new Proposal();\n sFirst.setLocationKey(lFirst.getKey());\n sFirst.setOwnerKey(ownerKey);\n sFirst.setStoreKey(storeKey);\n sFirst = sOps.createProposal(sFirst);\n\n Location lSecond = new Location();\n lSecond.setPostalCode(\"H1H1H1\");\n lSecond.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lSecond = lOps.createLocation(lSecond);\n\n Proposal sSecond = new Proposal();\n sSecond.setLocationKey(lSecond.getKey());\n sSecond.setOwnerKey(ownerKey);\n sSecond.setStoreKey(storeKey);\n sOps.createProposal(sSecond);\n\n Proposal sThird = new Proposal();\n sThird.setLocationKey(lSecond.getKey());\n sThird.setOwnerKey(ownerKey);\n sThird.setStoreKey(storeKey);\n sOps.createProposal(sThird);\n\n sFirst = sOps.getProposal(sFirst.getKey(), null, null);\n sSecond = sOps.getProposal(sSecond.getKey(), null, null);\n sThird = sOps.getProposal(sThird.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(lFirst);\n places.add(lSecond);\n\n List<Proposal> selection = sOps.getProposals(places, 2); // Should cut to 2 items\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertEquals(sFirst.getKey(), selection.get(0).getKey());\n // No more test because it appears sometimes sSecond comes back, sometimes sThird comes back\n // FIXME: re-insert the test for sSecond in the returned list when we're sure the issue related ordering on inherited attribute is fixed.\n }", "public interface AutofillAssistantActionHandler {\n /**\n * Returns the names of available AA actions.\n *\n * <p>This method starts AA on the current tab, if necessary, and waits for the first results.\n * Once AA is started, the results are reported immediately.\n *\n * @param userName name of the user to use when sending RPCs. Might be empty.\n * @param experimentIds comma-separated set of experiment ids. Might be empty\n * @param arguments extra arguments to include into the RPC. Might be empty.\n * @param callback callback to report the result to\n */\n void listActions(String userName, String experimentIds, Bundle arguments,\n Callback<Set<String>> callback);\n\n /**\n * Returns the available AA actions to be reported to the direct actions framework.\n *\n * <p>This method simply returns the list of actions known to AA. An empty string array means\n * either that the controller has not yet been started or there are no actions available for the\n * current website.\n *\n * @return Array of strings with the names of known actions.\n */\n String[] getActions();\n\n /** Performs onboarding and returns the result to the callback. */\n void performOnboarding(String experimentIds, Callback<Boolean> callback);\n\n /**\n * Performs an AA action.\n *\n * <p>If this method returns {@code true}, a definition for the action was successfully started.\n * It can still fail later, and the failure will be reported to the UI.\n *\n * @param name action name, might be empty to autostart\n * @param experimentIds comma-separated set of experiment ids. Might be empty.\n * @param arguments extra arguments to pass to the action. Might be empty.\n * @param callback to report the result to\n */\n void performAction(\n String name, String experimentIds, Bundle arguments, Callback<Boolean> callback);\n}", "public void performSearch()\r\n {\r\n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR) );\r\n\r\n try\r\n {\r\n // Create the search pattern.\r\n String SearchPatternString = SearchPatternField.getText();\r\n if ( SearchPatternString == null\r\n || SearchPatternString.equals(\"\") )\r\n throw new ScreenInputException(\"No search pattern entered\",\r\n SearchPatternField);\r\n SearchPattern = new Regex(SearchPatternString);\r\n SearchPattern.optimize();\r\n\r\n // Build the definition of the root directory to search.\r\n String FilePatternString = FilePatternField.getText();\r\n if ( FilePatternString == null\r\n || FilePatternString.equals(\"\") )\r\n throw new ScreenInputException(\"No file pattern entered\",\r\n FilePatternField);\r\n\r\n String DirPathString = DirPatternField.getText();\r\n if ( DirPathString == null\r\n || DirPathString.equals(\"\") )\r\n throw new ScreenInputException(\"No directory specified\",\r\n DirPatternField);\r\n File DirectoryFile = new File(DirPathString);\r\n if (!DirectoryFile.exists() )\r\n throw new ScreenInputException(\"Directory '\" + DirPathString + \"'does not exist\",\r\n DirPatternField);\r\n\r\n // Prepare the walker that performs the grep on each directory.\r\n GrepSubDirWalker.prepareSearch(SearchPattern,\r\n FilePatternString,\r\n DirPathString,\r\n ResultsDocument);\r\n\r\n if (SubDirsTooCheckBox.isSelected() )\r\n {\r\n // Process named directory and its sub-directories.\r\n Directory RootDirectory = new Directory(DirPathString);\r\n RootDirectory.walk(GrepSubDirWalker);\r\n }\r\n else\r\n // Process just the named directory.\r\n GrepSubDirWalker.processDirectory(DirPathString);\r\n\r\n GrepSubDirWalker.appendStatistics(); // Show statistics\r\n }\r\n catch (NoClassDefFoundError InputException)\r\n {\r\n showPatMissingDialog();\r\n }\r\n catch (ScreenInputException InputException)\r\n {\r\n InputException.requestComponentFocus();\r\n showExceptionDialog(InputException);\r\n }\r\n catch (Exception InputException)\r\n {\r\n showExceptionDialog(InputException);\r\n }\r\n setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR) );\r\n }", "public com.squareup.okhttp.Call poisAutocompleteAsync(String longitude, String latitude, String searchText, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String areaName1, String areaName3, String postcode1, String postcode2, String ipAddress, String autoDetectLocation, String type, String categoryCode, String sicCode, String maxCandidates, String sortBy, String searchOnNameOnly, final ApiCallback<GeoEnrichResponse> callback) throws ApiException {\n\n ProgressResponseBody.ProgressListener progressListener = null;\n ProgressRequestBody.ProgressRequestListener progressRequestListener = null;\n\n if (callback != null) {\n progressListener = new ProgressResponseBody.ProgressListener() {\n @Override\n public void update(long bytesRead, long contentLength, boolean done) {\n callback.onDownloadProgress(bytesRead, contentLength, done);\n }\n };\n\n progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {\n @Override\n public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {\n callback.onUploadProgress(bytesWritten, contentLength, done);\n }\n };\n }\n\n com.squareup.okhttp.Call call = poisAutocompleteCall(longitude, latitude, searchText, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, areaName1, areaName3, postcode1, postcode2, ipAddress, autoDetectLocation, type, categoryCode, sicCode, maxCandidates, sortBy, searchOnNameOnly, progressListener, progressRequestListener);\n Type localVarReturnType = new TypeToken<GeoEnrichResponse>(){}.getType();\n apiClient.executeAsync(call, localVarReturnType, callback);\n return call;\n }", "default List<String> assignedConcepts(Location locatedUnit, int topK){\n final UnitLocation unitLocation = (UnitLocation) Objects.requireNonNull(locatedUnit);\n final Set<Location> irrelevantSet = generateIrrelevantSet(unitLocation);\n\n return interestingConcepts(topK, unitLocation, irrelevantSet);\n }", "String readAll(){\n // All files to write to / read from\n File listIOFresh = new File(FILE_LIST_REG_FRESH); // Only used when there still isn't a current file - template of list for IO\n File listIOCurr = new File(folderName + FILE_LIST_REG_CURR); // The file which the values and list are taken and compare with input from IO\n File listIOTemp = new File(folderName + FILE_LIST_REG_TEMP); // While runtime it will write the values in this file\n File listIOLog = new File(folderName + FILE_LIST_REG_LOG); // Write only the values which are different\n\n BufferedReader IOBr = null;\n BufferedReader fileBr = null;\n BufferedWriter fileBw = null;\n BufferedWriter fileBwLog = null;\n\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n List<String> topicList = new ArrayList<>();\n\n if (!listIOTemp.exists()) {\n try {\n fileBw = new BufferedWriter(new FileWriter(listIOTemp));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n if (!listIOCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(listIOFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(listIOCurr)); // Add exception for only file not found ?\n }\n\n String fileData = fileBr.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread()); // Changed to a global variable for readability\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\"; // Save the current value , which will be compare with the new value\n String topicFullName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0;\n HashMap<String, String> topicMap = new HashMap<>();\n\n // File data start\n while (fileData != null) {\n\n topicList.add(fileData);\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topicName, [1] = topicIndex, [2] = itemName, [3] = itemIndex, [4] = value\n topicFullName = topicDetails[0] + \" \" + topicDetails[1] + \" \" + topicDetails[2] + \" \" + topicDetails[3] ; // Readability\n if (topicDetails.length > 4) { // Bigger than 4 -> there is value at [4]\n topicValue = topicDetails[4]; // Readability , verify only here if it really exist\n topicMap.put(topicFullName,topicValue);\n } else { // No value\n topicMap.put(topicFullName,\"\"); // No value to compare later\n }\n\n // Start futuretask completion service -> Start process to read the SystabReg\n completionService.submit(new SystabReg.CallSystabReg(topicDetails[0], topicDetails[1], topicDetails[2], topicDetails[3])); // [0] = topicName, [1] = topicIndex, [2] = itemName, [3] = itemIndex\n counterRequest++;\n fileData = fileBr.readLine(); // Next line\n }\n // File data end\n\n // Take results from process , as the result are random topics, use the help of listMap(HashMap) to save the topic full name and value to verify with the new value\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = topicName, [1] = topicIndex, [2] = itemName, [3] = itemIndex, [4] = value\n String endResult = endResultArr[0] + \" \" + endResultArr[1] + \" \" + endResultArr[2] + \" \" + endResultArr[3] + \" \" + endResultArr[4];\n\n fileBw.write(endResult);\n fileBw.newLine();\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press)\n if (!topicMap.get(topicFullName).isEmpty() && !endResultArr[4].equalsIgnoreCase(topicValue)) { // If the map in that key is empty -> first search , new value is different than current value\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n String logResult = timeStamp + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n }\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (IOBr != null) try {\n IOBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n if (listIOCurr.exists()) listIOCurr.delete();\n listIOTemp.renameTo(listIOCurr);\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "@Ignore @Test\n public void doCompletion() {\n controller.getCompletionList(INPUT,ONTOLOGY,FIELD,bean);\n List<CompletionTerm> compList = bean.getCompletionTermList();\n Assert.assertNotNull(compList);\n Assert.assertTrue(\"Should have >0 comp terms\",compList.size()>0);\n boolean containsInput = false;\n for (CompletionTerm t : compList)\n containsInput |= t.toString().contains(INPUT);\n Assert.assertTrue(\"Should contain \"+INPUT,containsInput);\n }", "String readAll(String pressNum){ // TODO - Make a chooseable way for which steps to check . Each step contains a series of checks that the user will do , only verify those checks\n // All files to write to / read from\n File listIOLog = new File(folderName + FILE_LIST_IO_LOG); // Write only the values which are different\n File listTodo = new File(folderName + \"Todosteps.txt\"); // This file have all the steps that are needed\n File completedStep = new File( folderName + FILE_LIST_STEPS_COMPLETED);\n\n\n BufferedReader fileBr = null;\n BufferedReader fileTodoBr = null;\n BufferedReader fileCompletedBr = null;\n BufferedWriter fileTodoBw = null;\n BufferedWriter fileBw = null; // Temp to used in many places\n BufferedWriter fileBwLog = null;\n BufferedWriter fileCompletedBw = null;\n\n String completed = \"Completed\";\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n\n if (!reading) {\n reading = true; // Started to read the files\n try {\n fileTodoBr = new BufferedReader(new FileReader(listTodo));\n fileCompletedBr = new BufferedReader(new FileReader(completedStep));\n fileTodoBw = new BufferedWriter(new FileWriter(listTodo));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n fileCompletedBw = new BufferedWriter(new FileWriter(completedStep, true));\n\n String fileTodo = fileTodoBr.readLine(); // Start reading\n String fileCompleted = fileCompletedBr.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread());\n\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\";\n String topicName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0; // Counter to know how many completion service where open\n int topicCounter = 0;\n Map<String, String> topicMap = new HashMap<>();\n Map<String, Integer> stepMap = new HashMap<>();\n\n List<String> completedList = new ArrayList<>(); // List of completed steps\n List<String> todoList = new ArrayList<>();\n List<String> stepList = new ArrayList<>(); // Save all the steps (Step1, Step2 ...)\n\n // File read all the completed steps and save\n while (fileCompleted != null && fileCompleted.contains(completed)) { // While the there is next line and the line contains completed\n\n completedList.add(fileCompleted);\n fileCompleted = fileCompletedBr.readLine(); // Next line\n\n } // File read end\n\n\n // Read the amount of steps needed and add them to the todolist, then save in an arraylist\n for (int stepsReading = 0 ; fileTodo != null && stepsReading < STEPS_TO_READ ; stepsReading++) { // TODO - Add check if the number isn't missing\" (1,2,3,[missing],5 ..)\n\n todoList.add(fileTodo);\n fileTodo = fileTodoBr.readLine(); // Next line\n } // File read end\n\n // Save in a list all the steps of IO\n for(String steps : todoList){ // Maybe write a method in util/interface as it will be needed for Reg\n String[] stepName = steps.trim().split(\" \"); // [0] = step number , [1] = step title , [2] = completed / not\n String step = stepName[0] + \" \" + stepName[1];\n stepList.add(step);\n }\n\n\n for(String step : stepList){\n\n String[] splitStep = step.trim().split(\" \"); // [0] = step number , [1] = step title\n String newStep = splitStep[0];\n String stepFile = SYSTAB_STEPIO_FOLDER + newStep + \"IO.text\"; // Check if it create the folder if doesn't exist\n\n File stepFileCurr = new File(pressNum + SYSTAB_STEPIO_FOLDER + \"Curr\" + newStep + \"IO.text\"); // FolderName\\StepIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n File stepFileFresh = new File(pressNum + stepFile); // FolderName\\StepIO\\StepxIO.txt - File without value , only the name of the systabIO\n\n\n if (!stepFileCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(stepFileFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(stepFileCurr)); // Add exception for only file not found ?\n }\n// String[] stepName = step.trim().split(\" \"); // [0] = step number , [1] = step name\n String fileData = fileBr.readLine(); // Start reading\n\n while (fileData != null) {\n\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topic name , [1] = value , [2] = completed(only when completed)\n\n if(topicDetails.length > 2 && topicDetails[2].equals(completed)) continue; // The current topic is already completed and don't need to check again -> continue to the next topic\n\n topicName = topicDetails[0]; // Readability\n if (topicDetails.length > 1) { // -> there is a value\n topicValue = topicDetails[1]; // Readability , verify only here if it really exist\n topicMap.put(topicName,topicValue); // Save the topic name and value as my temp\n } else {\n topicMap.put(topicName,\"\"); // No topic value\n }\n\n // Start futuretask completion service -> Start process to read the SystabIO\n completionService.submit(new CallSystabIo(topicName, newStep)); // TEST\n counterRequest++;\n stepMap.put(newStep, ++topicCounter); // Save the step with the counter of how many topics there is\n\n fileData = fileBr.readLine(); // Next line\n } // No more topics to read from , continue to the next step\n\n stepFileCurr.delete(); // Delete it as all the data was read and saved , for later create a new current file with the new values\n }\n\n\n // Take results from process\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request were submit to completion service\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = step number . [1] = topic name , [2] = value\n String stepNumber = endResultArr[0];\n String newTopicName = endResultArr[1];\n String newValue = endResultArr[2];\n String endResult = newTopicName + \" \" + newValue;\n\n // Create the new current file with new values\n File stepFileCurr = new File(pressNum + SYSTAB_STEPIO_FOLDER + \"Curr\" + stepNumber + \"IO.text\"); // FolderName\\StepIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press) -> Done current topic check\n if (!endResultArr[2].equals(topicMap.get(endResultArr[1]))){ // Check if the new value and old value are equal , not equal -> show to user and save in log\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n // TODO - Change the values to On / Off\n String logResult = timeStamp + \" \" + stepNumber + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n\n fileBw = new BufferedWriter(new FileWriter(stepFileCurr));\n fileBw.write(endResult + \" \" + completed);\n fileBw.newLine();\n\n int remainTopics = stepMap.get(stepNumber) - 1; // This topic is done -> one less topic in the step\n if(remainTopics == 0){ // When the step don't have any more topics to check , it will remove from the step list and add to the completed step list\n stepList.remove(stepNumber);\n completedList.add(stepNumber);\n }\n stepMap.put(stepNumber, remainTopics);\n\n } else { // When the topic isn't complete\n fileBw = new BufferedWriter(new FileWriter(stepFileCurr));\n fileBw.write(endResult);\n fileBw.newLine();\n }\n\n\n\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n\n listTodo.delete(); // Delete the file to reset the list and write the remain steps\n completedStep.delete(); // Delete the file to reset the list and write the remain steps\n\n // First write all the completed steps\n for (String step: completedList){\n fileCompletedBw.write(step + \" \" + completed);\n fileCompletedBw.newLine();\n }\n // Then all the undone steps\n for (String step: stepList){\n // Write in the completed file\n fileCompletedBw.write(step + \" Undone\");\n fileCompletedBw.newLine();\n // Write in the todosteps , the next time it read only the remaining steps\n fileTodoBw.write(step);\n fileTodoBw.newLine();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error IO\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n reading = false; // Finish to read all\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileTodoBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "private void runTypeChefAnalyzes(IFolder folder) {\r\n\t\tProjectExplorerController prjController = new ProjectExplorerController();\r\n\t\tprjController.addResource(folder);\r\n\t\ttypeChef.run(prjController.getList());\r\n\t\tfinal Display display = Display.getDefault();\r\n\t\tif (display == null) {\r\n\t\t\tthrow new NullPointerException(\"Display is null\");\r\n\t\t}\r\n\r\n\t\tdisplay.syncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tPluginViewController viewController = PluginViewController\r\n\t\t\t\t\t\t.getInstance();\r\n\t\t\t\tviewController.showPluginView();\r\n\t\t\t\tif (typeChef.getLogs().length > 0) {\r\n\t\t\t\t\tviewController.adaptTo(typeChef.getLogs());\r\n\t\t\t\t\tcontinueCompilationFlag = MessageDialog.openQuestion(\r\n\t\t\t\t\t\t\tdisplay.getActiveShell(),\r\n\t\t\t\t\t\t\t\"Error!\",\r\n\t\t\t\t\t\t\t\"This project contains errors in some feature combinations.\\nDo you want to continue the compilation?\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tviewController.clear();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public interface PlayerInteraction {\n\t/**\n\t * Asynchronously select a color from a set of colors\n\t * \n\t * @param colors set of colors to select from\n\t * @param callback callback function with selected color\n\t */\n\tvoid selectColorFrom(Set<GameColor> colors, String title, Consumer<GameColor> callback);\n\n\t/**\n\t * Asynchronously select a player from a list of players\n\t * \n\t * @param players list of players to select from\n\t * @param callback callback function with selected player\n\t */\n\tvoid selectPlayerFrom(List<Player> players, String title, Consumer<Player> callback);\n\n\t/**\n\t * Asynchronously select a card from a list of cards\n\t * \n\t * @param cards list of cards to select from\n\t * @param callback callback function with selected card\n\t */\n\tdefault void selectOneCardFrom(List<Card> cards, String title, Consumer<Card> callback) {\n\t\tselectCardsFrom(1, cards, title, list -> callback.accept(list.get(0)));\n\t}\n\n\t/**\n\t * Asynchronously select many cards from a list of cards. The callback will only\n\t * be called if a valid selection with the correct number of cards is made.\n\t * \n\t * @param number the number of cards to choose\n\t * @param cards cards to choose from\n\t * @param callback callback function with selected cards\n\t */\n\tvoid selectCardsFrom(int number, List<Card> cards, String title, Consumer<List<Card>> callback);\n\n\t/**\n\t * Asynchronously select a city from the set of cities\n\t * \n\t * @param cities the cities to select from\n\t * @param callback callback function with the selected city\n\t */\n\tvoid selectCityFrom(Set<City> cities, String title, Consumer<City> callback);\n\n\tList<Card> selectCardsToDiscard(int number, List<Card> cards, String title);\n\n\t/**\n\t * Asynchronously arrange many cards. The callback function must provide a new\n\t * data structure that will not affect the provided list of cards when modified\n\t * \n\t * @param cards cards to arrange\n\t * @param callback callback function with the arranged list of cards\n\t */\n\tvoid arrangeCards(List<Card> cards, String title, Consumer<List<Card>> callback);\n\n\t/**\n\t * Display cities to the user without blocking\n\t * \n\t * @param cities\n\t */\n\tdefault void displayCities(Set<City> cities, String title) {\n\t\tList<Card> cityCardList = new ArrayList<>();\n\t\tcities.forEach(card -> cityCardList.add(new CardCity(card)));\n\t\tdisplayCards(cityCardList, title);\n\t}\n\n\t/**\n\t * Display cards to the user without blocking\n\t * \n\t */\n\tvoid displayCards(List<Card> cards, String title);\n}", "public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {\n\t\tDatabaseNode activeDatabaseNode = DatabaseView.getActiveDatabase();\n\t\tif (activeDatabaseNode == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString[] proposals = null;\n\t\tif (activeDatabaseNode != connectionModelCache) {\n\t\t\ttableNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = tableNamesCache;\n\t\t} else {\n\t\t\tdatabaseNamesCache = getModelNames(activeDatabaseNode.getChildren());\n\t\t\tproposals = databaseNamesCache;\n\t\t}\n\n\t\treturn getProposals(proposals, documentOffset);\n\t}", "private void populateAutoComplete() {\n if (!mayRequestContacts()) {\n return;\n }\n\n getLoaderManager().initLoader(0, null, this);\n }", "List<String> completeEndpointPath(String completionText);", "private void addScoriaEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {\n enriching(consumer, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, BYGBlocks.SCORIA_STONEBRICKS, basePath + \"cracked_bricks_to_bricks\");\n //Scoria -> Cracked Scoria Stone Bricks\n enriching(consumer, BYGBlocks.SCORIA_STONE, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, basePath + \"to_cracked_bricks\");\n //Scoria -> Scoria Stone Bricks\n enriching(consumer, BYGBlocks.SCORIA_SLAB, BYGBlocks.SCORIA_STONEBRICK_SLAB, basePath + \"slabs_to_brick_slabs\");\n enriching(consumer, BYGBlocks.SCORIA_STAIRS, BYGBlocks.SCORIA_STONEBRICK_STAIRS, basePath + \"stairs_to_brick_stairs\");\n enriching(consumer, BYGBlocks.SCORIA_WALL, BYGBlocks.SCORIA_STONEBRICK_WALL, basePath + \"walls_to_brick_walls\");\n }", "public interface IMazePathFinder extends Callable<OutputBundle> {\n\n}", "default List<String> assignedConcepts(Source code, final Set<String> relevant){\n final Context context = Sources.from(code);\n\n final UnitLocation unit = relevant.isEmpty()\n ? locatedCompilationUnit(context)\n : locatedMethod(context, relevant);\n\n if(unit == null) return ImmutableList.of();\n\n return assignedConcepts(unit, 10);\n }", "protected void updateAnnotations(CompilationUnit ast, IProgressMonitor progressMonitor) {\n if (ast == null || progressMonitor.isCanceled()) {\n return;\n }\n // add annotations\n OverriddenElementFinder visitor = new OverriddenElementFinder();\n ast.accept(visitor);\n // may be already cancelled\n if (progressMonitor.isCanceled()) {\n return;\n }\n // add annotations to the model\n updateAnnotations(visitor.indicators);\n }", "private void loadWords(Future<Void> future) {\n if (wordsLocation == null || ! wordsLocation.exists() ) {\n future.fail(\"wordsLocation[\" + wordsLocation + \"] does not exist\");\n return;\n }\n\n try (InputStream wis = wordsLocation.getInputStream();\n InputStreamReader isr = new InputStreamReader(wis);\n BufferedReader br = new BufferedReader(isr)) {\n\n String word;\n int wc = 0;\n while ((word = br.readLine()) != null) {\n LOG.debug(\"adding \" + word + \"to WordFinder\");\n wordFinder.add(word);\n wc++;\n }\n\n LOG.info(\"Loaded \" + wc + \" words into WordFinder\");\n\n future.complete();\n } catch (IOException e) {\n String msg = \"an error occurred while trying to read the words\";\n LOG.warn(msg, e);\n future.fail(e);\n }\n }", "@Deprecated // Seems this method is not in use any more.\n\t@RequestMapping(value = \"getAutoCompleteSelectRosterStudents.htm\", method = RequestMethod.GET)\n\tpublic final @ResponseBody Set<String> getAutoCompleteSelectRosterStudents(\n\t\t\t@RequestParam(\"testSessionId\") Long testSessionId,\n\t\t\t@RequestParam(\"fileterAttribute\") String fileterAttribute, @RequestParam(\"term\") String term) {\n\t\tLOGGER.trace(\"Entering the getAutoCompleteSelectRosterStudents page for getting results\");\n\n\t\tSet<String> autoCompleteValues = new HashSet<String>();\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\n\t\tMap<String, String> studentRosterCriteriaMap = recordBrowserJsonUtil\n\t\t\t\t.constructAutoCompleteFilterCriteria(fileterAttribute, term);\n\n\t\tint currentSchoolYear = (int) (long) userDetails.getUser().getContractingOrganization().getCurrentSchoolYear();\n\n\t\tList<StudentRoster> studentRosters = enrollmentService.getEnrollmentWithRoster(userDetails,\n\t\t\t\tpermissionUtil.hasPermission(userDetails.getAuthorities(),\n\t\t\t\t\t\tRestrictedResourceConfiguration.getViewAllRostersPermissionCode()),\n\t\t\t\tnull, null, null, null, studentRosterCriteriaMap, testSessionId, null, null, currentSchoolYear);\n\n\t\tLOGGER.trace(\"Leaving the getRosterStudentsByTeacher page.\");\n\n\t\tfor (StudentRoster studentRoster : studentRosters) {\n\t\t\tif (fileterAttribute.equals(\"legalFirstName\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getLegalFirstName());\n\t\t\telse if (fileterAttribute.equals(\"legalMiddleName\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getStudent().getLegalMiddleName());\n\t\t\telse if (fileterAttribute.equals(\"legalLastName\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getStudent().getLegalLastName());\n\t\t\telse if (fileterAttribute.equals(\"educatorFirstName\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getEducator().getFirstName());\n\t\t\telse if (fileterAttribute.equals(\"educatorLastName\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getEducator().getSurName());\n\t\t\telse if (fileterAttribute.equals(\"currentSchoolYear\"))\n\t\t\t\tautoCompleteValues.add(Integer.toString(studentRoster.getCurrentSchoolYear()));\n\t\t\telse if (fileterAttribute.equals(\"firstLanguage\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getFirstLanguage());\n\t\t\telse if (fileterAttribute.equals(\"comprehensiveRace\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getStudent().getComprehensiveRace());\n\t\t\telse if (fileterAttribute.equals(\"primaryDisabilityCode\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getStudent().getPrimaryDisabilityCode());\n\t\t\telse if (fileterAttribute.equals(\"localStudentIdentifier\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getLocalStudentIdentifier());\n\t\t\telse if (fileterAttribute.equals(\"firstLanguage\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getFirstLanguage());\n\t\t\telse if (fileterAttribute.equals(\"firstLanguage\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getFirstLanguage());\n\t\t\telse if (fileterAttribute.equals(\"gender\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getStudent().getGenderStr());\n\t\t\telse if (fileterAttribute.equals(\"generationCode\"))\n\t\t\t\tautoCompleteValues.add(studentRoster.getGenerationCode());\n\t\t\telse if (fileterAttribute.equals(\"enrollmentsRostersId\"))\n\t\t\t\tautoCompleteValues.add(Long.toString(studentRoster.getEnrollmentId()));\n\t\t\telse if (fileterAttribute.equals(\"stateStudentIdentifier\"))\n\t\t\t\tautoCompleteValues.add((studentRoster.getStudent().getStateStudentIdentifier()));\n\t\t\telse if (fileterAttribute.equals(\"localStudentIdentifier\"))\n\t\t\t\tautoCompleteValues.add((studentRoster.getLocalStudentIdentifier()));\n\t\t\telse if (fileterAttribute.equals(\"residenceDistrictIdentifier\"))\n\t\t\t\tautoCompleteValues.add((studentRoster.getResidenceDistrictIdentifier()));\n\t\t\telse if (fileterAttribute.equals(\"uniqueCommonIdentifier\"))\n\t\t\t\tautoCompleteValues.add((studentRoster.getEducator().getUniqueCommonIdentifier()));\n\t\t\telse if (fileterAttribute.equals(\"courseSectionName\"))\n\t\t\t\tautoCompleteValues.add((studentRoster.getRoster().getCourseSectionName()));\n\t\t}\n\n\t\treturn autoCompleteValues;\n\t}", "private void suggestMove(Canvas canvas) {\n if (paintSuggestingMoveSquare && neighboringTiles(paintingSuggestingMoveSquareX, paintingSuggestingMoveSquareY)) {\n if (paintingSuggestingMoveSquareX != -1 && paintingSuggestingMoveSquareY != -1) {\n Bitmap current;\n if (!onTile[paintingSuggestingMoveSquareY][paintingSuggestingMoveSquareX]) {\n current = suggestingSquare;\n } else {\n current = banned_square;\n }\n canvas.drawBitmap(current, (int) squares[paintingSuggestingMoveSquareY][paintingSuggestingMoveSquareX].getX(),\n (int) squares[paintingSuggestingMoveSquareY][paintingSuggestingMoveSquareX].getY(), null);\n setPaintSuggestingMoveSquare(false);\n }\n }\n }", "public void recommended() {\n MainActivity activity = (MainActivity) getActivity();\n ArrayList<Integer> results = new ArrayList<>();\n int highest = 0;\n for (int i = 0; i < activity.getUserLocations().size(); i++) {\n int lid = activity.database.getLocID(1, activity.userLocations.get(i).getProvider());\n ArrayList<LocationMoodObject> locmood = activity.database.getLocMood(lid);\n int result = 0;\n\n for (int j = 0; j < locmood.size(); j++) {\n switch (locmood.get(j).mood) {\n case (1):\n result = result + 1;\n break;\n case (2):\n result = result + 2;\n break;\n case (3):\n result = result + 3;\n break;\n case (4):\n result = result + 4;\n break;\n case (5):\n result = result + 5;\n break;\n }\n }\n if (locmood.size()>0){\n result = result / locmood.size();\n results.add(result);}\n\n }\n\n for (int i = 0; i < results.size(); i++) {\n if (results.get(i) > highest) {\n highest = results.get(i);\n }\n }\n\n recommended = activity.userLocations.get(highest).getProvider();\n }", "@Override\r\n public void solve(String[] arr) {\r\n\tString nameAlg = arr[arr.length - 1];\r\n\tsb = new StringBuilder();\r\n\tfor (int i = 1; i < arr.length - 1; i++) {\r\n\t sb.append(arr[i]);\r\n\t}\r\n\tString name = sb.toString();\r\n\tMaze3d tempMaze = hMaze.get(name);\r\n\tif ((hSol.get(tempMaze)) != null) {\r\n\t setChanged();\r\n\t notifyObservers((\"solution:\" + name).split(\":\"));\r\n\t}\r\n\tFuture<Solution<Position>> fCallSolution = threadpool.submit(new Callable<Solution<Position>>() {\r\n\r\n\t @Override\r\n\t public Solution<Position> call() throws Exception {\r\n\r\n\t\tMaze3d m = hMaze.get(name);\r\n\t\tSearchableMaze sMaze = new SearchableMaze(m);\r\n\t\tCommonSearcher<Position> cs;\r\n\t\tSolution<Position> s = new Solution<Position>();\r\n\t\tswitch (nameAlg) {\r\n\t\tcase \"Astar\":\r\n\t\t cs = new AStar<Position>(new MazeManhattenDistance());\r\n\t\t s = cs.search(sMaze);\r\n\t\t break;\r\n\t\tcase \"A*\":\r\n\t\t cs = new AStar<Position>(new MazeManhattenDistance());\r\n\t\t s = cs.search(sMaze);\r\n\t\t break;\r\n\t\tcase \"BFS\":\r\n\t\t cs = new BFS<Position>();\r\n\t\t s = cs.search(sMaze);\r\n\t\t break;\r\n\t\t}\r\n\t\treturn s;\r\n\t }\r\n\t});\r\n\ttry {\r\n\t hSol.put(tempMaze, fCallSolution.get());\r\n\t} catch (InterruptedException | ExecutionException e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t}\r\n\tsetChanged();\r\n\tnotifyObservers((\"solution:\" + name).split(\":\"));\r\n }", "public void assist() throws IOException {\n\t\tlong timerStart = System.currentTimeMillis();\n\t\tTrivia trivia = myTriviaReader.read();\n\t\tGuess guess = new GuesserFactory().getGuesser(trivia).makeGuess(trivia);\n\t\tSystem.out.println(guess);\n\t\tlong timerEnd = System.currentTimeMillis();\n\t\tSystem.out.println(\"Timed: \"+(timerEnd-timerStart)+\" millis\");\n\t\tSystem.out.println(\"\\n\\n\\n\");\n\t}", "public void init(AjaxRequestTarget aTarget, CurationContainer aCurationContainer,\n Map<String, Map<Integer, AnnotationSelection>> aAnnotationSelectionByUsernameAndAddress,\n SourceListView aCurationSegment)\n throws UIMAException, ClassNotFoundException, IOException\n {\n AnnotatorState state = aCurationContainer.getState();\n SourceDocument sourceDocument = state.getDocument();\n\n Map<String, CAS> casses = new HashMap<>();\n // This is the CAS that the user can actively edit\n CAS annotatorCas = getAnnotatorCas(state, aAnnotationSelectionByUsernameAndAddress,\n sourceDocument, casses);\n\n // We store the CAS that the user will edit as the \"CURATION USER\"\n casses.put(CURATION_USER, annotatorCas);\n List<DiffAdapter> adapters = getDiffAdapters(schemaService, state.getAnnotationLayers());\n\n Map<String, Map<VID, AnnotationState>> annoStates1 = new HashMap<>();\n\n Project project = state.getProject();\n Mode mode1 = state.getMode();\n\n DiffResult diff;\n if (mode1.equals(CURATION)) {\n diff = doDiffSingle(adapters, LINK_ROLE_AS_LABEL, casses,\n aCurationSegment.getCurationBegin(), aCurationSegment.getCurationEnd())\n .toResult();\n }\n else {\n diff = doDiffSingle(adapters, LINK_ROLE_AS_LABEL, casses, aCurationSegment.getBegin(),\n aCurationSegment.getEnd()).toResult();\n }\n\n Collection<ConfigurationSet> d = diff.getDifferingConfigurationSets().values();\n\n Collection<ConfigurationSet> i = diff.getIncompleteConfigurationSets().values();\n for (ConfigurationSet cfgSet : d) {\n if (i.contains(cfgSet)) {\n i.remove(cfgSet);\n }\n }\n\n addSuggestionColor(project, mode1, casses, annoStates1, d, false, false);\n addSuggestionColor(project, mode1, casses, annoStates1, i, true, false);\n\n List<ConfigurationSet> all = new ArrayList<>();\n all.addAll(diff.getConfigurationSets());\n all.removeAll(d);\n all.removeAll(i);\n\n addSuggestionColor(project, mode1, casses, annoStates1, all, false, true);\n\n // get differing feature structures\n Map<String, Map<VID, AnnotationState>> annoStates = annoStates1;\n\n List<String> usernamesSorted = new ArrayList<>(casses.keySet());\n Collections.sort(usernamesSorted);\n\n final Mode mode = state.getMode();\n boolean isAutomationMode = mode.equals(Mode.AUTOMATION);\n boolean isCorrectionMode = mode.equals(Mode.CORRECTION);\n boolean isCurationMode = mode.equals(Mode.CURATION);\n\n List<UserAnnotationSegment> segments = new ArrayList<>();\n for (String username : usernamesSorted) {\n if ((!username.equals(CURATION_USER) && isCurationMode)\n || (username.equals(CURATION_USER) && (isAutomationMode || isCorrectionMode))) {\n\n CAS cas = casses.get(username);\n\n // Set up coloring strategy\n ColoringStrategy curationColoringStrategy = makeColoringStrategy(\n annoStates.get(username));\n\n // Create curation view for the current user\n UserAnnotationSegment seg = new UserAnnotationSegment();\n seg.setUsername(username);\n seg.setAnnotatorState(state);\n seg.setCollectionData(getCollectionInformation(schemaService, aCurationContainer));\n seg.setDocumentResponse(render(cas, state, curationColoringStrategy));\n seg.setSelectionByUsernameAndAddress(aAnnotationSelectionByUsernameAndAddress);\n segments.add(seg);\n }\n }\n\n sentenceListView.setModelObject(segments);\n if (aTarget != null) {\n aTarget.add(this);\n }\n }", "private <LOC extends IcfgLocation> void computeClausesForEntryPoints(final IIcfg<LOC> icfg,\n\t\t\tfinal Collection<HornClause> resultChcs) {\n\t\tfor (final Entry<String, LOC> en : icfg.getProcedureEntryNodes().entrySet()) {\n\n\t\t\tfinal String proc = en.getKey();\n\n\t\t\tfinal HcPredicateSymbol headPred = getOrConstructPredicateSymbolForIcfgLocation(en.getValue());\n\n\t\t\tfinal Map<Term, Term> substitutionMapping = new LinkedHashMap<>();\n\n\t\t\t// look for V\n\t\t\t// look for globals\n\t\t\tHcHeadVar assertionViolatedHeadVar = null;\n\t\t\tfinal List<HcHeadVar> headVars = new ArrayList<>();\n\t\t\tfinal List<Term> globalsWithTheirOldVarsEqualities = new ArrayList<>();\n\t\t\t{\n\t\t\t\tfinal List<TermVariable> varsForProc = getTermVariableListForPredForProcedure(proc);\n\t\t\t\tfor (int i = 0; i < varsForProc.size(); i++) {\n\t\t\t\t\tfinal TermVariable tv = varsForProc.get(i);\n\t\t\t\t\tfinal IProgramVar pv = mTermVarToProgVar.get(tv);\n\t\t\t\t\tfinal HcHeadVar headVar = getPrettyHeadVar(headPred, i, tv.getSort(), pv);\n\t\t\t\t\theadVars.add(headVar);\n\t\t\t\t\tif (tv.equals(mAssertionViolatedVar)) {\n\t\t\t\t\t\tassertionViolatedHeadVar = headVar;\n\t\t\t\t\t} else if (pv.isGlobal()) {\n\n\t\t\t\t\t\t// add equality var = old(var)\n\t\t\t\t\t\tif (!pv.isOldvar()) {\n\t\t\t\t\t\t\tif (!mIcfg.getCfgSmtToolkit().getModifiableGlobalsTable()\n\t\t\t\t\t\t\t\t\t.getModifiedBoogieVars(proc).contains(pv)) {\n\t\t\t\t\t\t\t\t// not modified --> skip\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tglobalsWithTheirOldVarsEqualities.add(SmtUtils.binaryEquality(mMgdScript.getScript(),\n\t\t\t\t\t\t\t\t\tpv.getTermVariable(), ((IProgramNonOldVar) pv).getOldVar().getTermVariable()));\n\t\t\t\t\t\t\tsubstitutionMapping.put(pv.getTermVariable(), headVar.getTermVariable());\n\t\t\t\t\t\t} else if (pv.isOldvar()) {\n\t\t\t\t\t\t\tif (!mIcfg.getCfgSmtToolkit().getModifiableGlobalsTable()\n\t\t\t\t\t\t\t\t\t.getModifiedBoogieVars(proc).contains(((IProgramOldVar) pv).getNonOldVar())) {\n\t\t\t\t\t\t\t\t// not modified --> skip\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubstitutionMapping.put(pv.getTermVariable(), headVar.getTermVariable());\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\tfinal Term equateGlobalsWithTheirOldVars = SmtUtils.and(mMgdScript.getScript(),\n\t\t\t\t\tglobalsWithTheirOldVarsEqualities.toArray(new Term[globalsWithTheirOldVarsEqualities.size()]));\n\n\t\t\tfinal Term constraintRaw = SmtUtils.and(mMgdScript.getScript(),\n\t\t\t\t\tSmtUtils.not(mMgdScript.getScript(), assertionViolatedHeadVar.getTermVariable()),\n\t\t\t\t\tequateGlobalsWithTheirOldVars);\n\t\t\tfinal Term constraintFinal = new Substitution(mMgdScript, substitutionMapping).transform(constraintRaw);\n\n\t\t\tupdateLogicWrtConstraint(constraintFinal);\n\n\t\t\tif (!assertNoFreeVars(headVars, Collections.emptySet(), constraintFinal)) {\n\t\t\t\tthrow new UnsupportedOperationException(\"implement this\");\n\t\t\t}\n\n\t\t\tfinal HornClause chc = new HornClause(mMgdScript, mHcSymbolTable, constraintFinal, headPred, headVars,\n\t\t\t\t\tCollections.emptyList(), Collections.emptyList(), Collections.emptySet());\n\t\t\tchc.setComment(\"Type: (not V) -> procEntry\");\n\t\t\tresultChcs.add(chc);\n\t\t}\n\t}", "public String run(String[] participant, String[] completion) {\n return cheat(participant, completion);\n }", "public interface ICalculator {\n\n /**\n * Calculator type\n * \n * @author alex\n *\n */\n public enum CalculatorType {\n\tIterative(\"Iterative calculator\"), Eratosthenes(\"Eratosthenes calculator\");\n\n\tprivate String description;\n\n\tprivate CalculatorType(String desc) {\n\t description = desc;\n\t}\n\n\tpublic String getDescription() {\n\t return description;\n\t}\n }\n\n default void validateInput(int start, int end) throws IllegalArgumentException {\n\tif (end <= start) {\n\t throw new IllegalArgumentException(\"Invalid input parameters: \" + start + \" :: \" + end);\n\t}\n }\n\n static boolean isPrime(int number) {\n\tif (number == 1 || number == 2 || number == 3) {\n\t return true;\n\t}\n\tif (number < 10) {\n\t for (int i = 2; i < number; i++) {\n\t\tif (number % i == 0) {\n\t\t return false;\n\t\t}\n\t }\n\t} else {\n\t for (int i = 2; i <= Math.sqrt(number); i++) {\n\t\tif (number % i == 0) {\n\t\t return false;\n\t\t}\n\t }\n\t}\n\treturn true;\n }\n\n CalculatorType getCalculatorType();\n\n /**\n * Initialises the algorithm\n * \n * @param concurrency\n * @param start\n * @param end\n * @param service\n */\n ICalculator init(int concurrency, int start, int end, ExecutorCompletionService<Collection<Integer>> service);\n\n /**\n * Executes the algorithm\n * \n * @param segmentStart\n * @param segmentEnd\n * @return\n * @throws IllegalArgumentException\n */\n Collection<Integer> findPrimeNumbers(int segmentStart, int segmentEnd) throws IllegalArgumentException;\n\n /**\n * Returns start of the search\n * \n * @return\n */\n int getStartSearch();\n\n /**\n * Sets start of search\n * \n * @param startSearch\n */\n void setStartSearch(int startSearch);\n\n /**\n * Returns end of the search\n * \n * @return\n */\n int getEndSearch();\n\n /**\n * Sets end of search\n * \n * @param endSearch\n */\n void setEndSearch(int endSearch);\n\n /**\n * Returns start of the interval\n * \n * @return\n */\n int getStartSegment();\n\n /**\n * Sets start of segment\n * \n * @param startSegment\n */\n void setStartSegment(int startSegment);\n\n /**\n * Returns end of the interval\n * \n * @return\n */\n int getEndSegment();\n\n /**\n * Sets end of segment\n * \n * @param endSegment\n */\n void setEndSegment(int endSegment);\n\n /**\n * Returns step\n * \n * @return\n */\n int getStep();\n\n /**\n * Sets the step\n * \n * @param step\n */\n void setStep(int step);\n\n}", "public ArrayList<String> call() {\n\t\t\treturn grepMultiThreadExecute(file, pattern, start, end);\n\t\t}", "private void problemSolve (String folderName, ArrayList<String> loader1, ArrayList<String> loader2) throws IOException {\n Object[] pValue = { WED_ZERO.lang.getInstruct().get(1)[20], WED_ZERO.lang.getInstruct().get(1)[21],WED_ZERO.lang.getInstruct().get(1)[22], WED_ZERO.lang.getInstruct().get(1)[23] };\n Object selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[24]+\" \"+\"\\\"\"+folderName+\"\\\" \"+WED_ZERO.lang.getInstruct().get(1)[25], WED_ZERO.lang.getInstruct().get(1)[26], JOptionPane.INFORMATION_MESSAGE, null, pValue, pValue[0]);\n if(selectedValue==null||(selectedValue.equals(pValue[3]))) {\n int res = JOptionPane.showConfirmDialog(null, WED_ZERO.lang.getInstruct().get(1)[27], WED_ZERO.lang.getInstruct().get(1)[12],\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if(res==JOptionPane.YES_OPTION) {\n return;\n } else {\n this.problemSolve(folderName, loader1, loader2);\n }\n } else if(selectedValue.equals(pValue[0])) {\n int res = JOptionPane.showConfirmDialog(null, WED_ZERO.lang.getInstruct().get(1)[28], WED_ZERO.lang.getInstruct().get(1)[12],\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if(res==JOptionPane.YES_OPTION) {\n this.replaceData(folderName, loader1, loader2);\n this.refresh();\n } else {\n this.problemSolve(folderName, loader1, loader2);\n }\n } else if(selectedValue.equals(pValue[1])) {\n this.renameFolder(folderName, loader1, loader2);\n this.refresh();\n } else if(selectedValue.equals(pValue[2])) {\n this.getFile(null);\n selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[29]+\": \", WED_ZERO.lang.getInstruct().get(1)[25], JOptionPane.INFORMATION_MESSAGE, null, this.getListOfFileInArray(), Arrays.asList(this.getListOfFileInArray()).indexOf(folderName));\n if(selectedValue!=null) {\n this.merge(selectedValue.toString(), loader1, loader2);\n } else {\n this.problemSolve(folderName, loader1, loader2);\n }\n }\n }", "private void run()\n {\n searchLexDb(\"^providing_\", true);\n }", "void fileCollectionObserved(FileCollection inputs, String consumer);", "public static CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> provideDefinition(\n URI uri, Position position) {\n MocaLanguageContext mocaLanguageContext = MocaLanguageUtils.getMocaLanguageContextFromPosition(position,\n MocaServices.mocaCompilationResult);\n\n switch (mocaLanguageContext.id) {\n case Moca:\n\n if (MocaServices.mocaCompilationResult == null) {\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n }\n\n String mocaWord = PositionUtils.getWordAtPosition(MocaServices.mocaCompilationResult.script, position,\n \"([a-zA-Z_0-9.])\");\n\n if (mocaWord != null) {\n\n mocaWord = mocaWord.toLowerCase();\n\n // Get current moca token at position.\n org.antlr.v4.runtime.Token curMocaToken = MocaLanguageUtils.getMocaTokenAtPosition(position,\n MocaServices.mocaCompilationResult);\n\n // Get verb noun clause current moca token is in.\n StringBuilder verbNounClause = null;\n for (Map.Entry<StringBuilder, ArrayList<org.antlr.v4.runtime.Token>> entry : MocaServices.mocaCompilationResult.mocaParseTreeListener.verbNounClauses\n .entrySet()) {\n\n // Checking for begin/end match since token objects parsed and lexed will not be\n // the same objects.\n for (org.antlr.v4.runtime.Token verbNounClauseToken : entry.getValue()) {\n if (verbNounClauseToken.getStartIndex() == curMocaToken.getStartIndex()\n // No need to adjust stop index here!\n && verbNounClauseToken.getStopIndex() == curMocaToken.getStopIndex()\n && verbNounClauseToken.getType() == curMocaToken.getType()) {\n\n verbNounClause = entry.getKey();\n\n ArrayList<MocaCommand> mcmds = MocaServices.mocaCache.commands\n .get(verbNounClause.toString());\n if (mcmds != null) {\n\n ArrayList<Location> locations = new ArrayList<>();\n\n // For override mcmd support, let's go ahead and load all local syntax levels.\n for (MocaCommand mcmd : mcmds) {\n // Before we go any further, make sure command is local syntax.\n if (mcmd.type.compareToIgnoreCase(MocaCommand.TYPE_LOCAL_SYNTAX) == 0) {\n try {\n\n String mcmdFileName = MocaLanguageServer.globalStoragePath\n + \"\\\\command-lookup\\\\\"\n + (mcmd.cmplvl + \"-\" + mcmd.command).replace(\" \", \"_\")\n + \".moca.readonly\";\n File mcmdFile = new File(mcmdFileName);\n URI mcmdFileUri = mcmdFile.toURI();\n BufferedWriter mcmdBufferedWriter = new BufferedWriter(\n new FileWriter(mcmdFile));\n mcmdBufferedWriter.write(mcmd.syntax);\n mcmdBufferedWriter.close();\n\n Position startPos = new Position(0, 0);\n Location location = new Location(mcmdFileUri.toString(),\n new Range(startPos, startPos));\n\n locations.add(location);\n\n } catch (IOException ioException) {\n return CompletableFuture\n .completedFuture(Either.forLeft(Collections.emptyList()));\n }\n }\n }\n\n return CompletableFuture.completedFuture(Either.forLeft(locations));\n }\n }\n }\n }\n }\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n case MocaSql:\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n case Groovy:\n\n GroovyCompilationResult groovyCompilationResult = MocaServices.mocaCompilationResult.groovyCompilationResults\n .get(mocaLanguageContext.compilationResultIdx);\n\n if (groovyCompilationResult.astVisitor == null) {\n // This shouldn't happen, but let's avoid an exception if something\n // goes terribly wrong.\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n }\n\n // Catching NoClassDefFoundError -- this isn't really best practice, but it\n // doesn't hurt anything and I would rather give the user a more concise error\n // message than what is thrown without this try/catch.\n try {\n ASTNode offsetNode = groovyCompilationResult.astVisitor.getNodeAtLineAndColumn(position.getLine(),\n position.getCharacter(), groovyCompilationResult.range);\n\n ASTNode definitionNode = GroovyASTUtils.getDefinition(offsetNode, false,\n groovyCompilationResult.astVisitor);\n\n if (definitionNode == null || definitionNode.getLineNumber() == -1\n || definitionNode.getColumnNumber() == -1) {\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n }\n\n Location location = new Location(uri.toString(),\n GroovyLanguageUtils.astNodeToRange(definitionNode, groovyCompilationResult.range));\n\n return CompletableFuture.completedFuture(Either.forLeft(Collections.singletonList(location)));\n } catch (NoClassDefFoundError noClassDefFoundError) {\n MocaServices.logErrorToLanguageClient(String.format(\"Class '%s' not linked in groovyclasspath\",\n noClassDefFoundError.getMessage()));\n\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n }\n }\n\n return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));\n\n }", "private void runRefactoring() {\r\n Refactoring refactoring = createRefactoring();\r\n\r\n // Update the code\r\n try {\r\n refactoring.run();\r\n } catch (RefactoringException re) {\r\n JOptionPane.showMessageDialog(null, re.getMessage(), \"Refactoring Exception\",\r\n JOptionPane.ERROR_MESSAGE);\r\n } catch (Throwable thrown) {\r\n ExceptionPrinter.print(thrown, true);\r\n }\r\n\r\n followup(refactoring);\r\n }", "@Override\n\tprotected List<String> performScanning(String inputFilePath) {\n\t\tList<String> resultList = App.fileParser(inputFilePath);\n\t\treturn resultList;\n\t}", "public interface ExternalAssignmentProviderCompat {\n\n /**\n * Retrieve all assignments for a gradebook that are marked as externally\n * maintained.\n *\n * @param gradebookUid The gradebook's unique identifier\n * @return A list of external IDs of assignments managed by this provider\n */\n List<String> getAllExternalAssignments(String gradebookUid);\n}", "public static void main(String[] args) throws IOException {\n\t\t// word -> number of times that it appears over all files\n \n Map< Character, Set<String> > globalWordSetsPerCharacter = new ConcurrentHashMap<>();\n \n // NOTE(jakob): The CountDownLatch no longer keeps track of the\n // amount of threads left, it instead is a blocking barrier\n // that the main thread will wait for to open, which happens\n // once our AtomicInteger (which is our actual\n // thread counter) reaches zero.\n\t\tCountDownLatch latch = new CountDownLatch( 1 ); // Wait and see (^:\n AtomicInteger activeThreadCount = new AtomicInteger(0);\n \n\t\tFiles.walk(Path.of(\"data/\"))\n .filter(Files::isRegularFile)\n\t\t\t.map( path -> new Thread( () -> {\n activeThreadCount.incrementAndGet();\n\t\t\t\tcomputeOccurrences( path, globalWordSetsPerCharacter );\n\t\t\t\t\n // Now this is a bit tricky.\n // It is in essence a check-then-act race condition.\n // The thread safety of this relies on the fact that only the\n // last thread to finish will get a return value of 0 from the\n // decrementAndGet method on the AtomicInt (Since it is atomic).\n // POST CLASS: We actually discussed that this would not work in\n // all cases, if for instance the first thread finishes before\n // any other thread has been started yet. Look at the solution\n // we developed together to see a solution that does not have\n // this problem. (^:\n if (activeThreadCount.decrementAndGet() == 0) {\n latch.countDown();\n }\n\t\t\t} ) )\n\t\t\t.forEach( Thread::start );\n\n\t\ttry {\n\t\t\tlatch.await();\n\t\t} catch( InterruptedException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tglobalWordSetsPerCharacter.forEach(\n (character, words) -> System.out.println( character + \": \" + words ) );\n\t}", "@Override public void onDisplayCompletions(CompletionInfo[] completions) {\n // @note フルスクリーンモードでのエディタからの補完候補を受け取る.フルスクリーンフラグは自分でevaluateさせる\n }", "private void run()\r\n\t{\r\n\t\tboolean programLoop = true;\r\n\t\t\r\n\t\twhile(programLoop)\r\n\t\t{\r\n\t\t\tmenu();\r\n\t\t\tSystem.out.print(\"Selection: \");\r\n\t\t\tString userInput = input.nextLine();\r\n\t\t\t\r\n\t\t\tint validInput = -1;\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tvalidInput = Integer.parseInt(userInput);\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid selection.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tswitch(validInput)\r\n\t\t\t{\r\n\t\t\t\tcase 0: forInstructor();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1: addSeedURL();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: addConsumer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: addProducer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4: addKeywordSearch();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5: printStats();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t//case 10: debug(); //Not synchronized and will most likely cause a ConcurrentModificationException\r\n\t\t\t\t\t\t //break;\t//if multiple Producer and Consumer Threads are running.\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@RequestMapping(value = \"getTestsAutoCompleteData.htm\", method = RequestMethod.GET)\n\tpublic final @ResponseBody Set<String> getAutoCompleteData(\n\t\t\t@RequestParam(\"fileterAttribute\") String fileterAttribute, @RequestParam(\"term\") String term, @RequestParam(\"testingProgramName\")String testingProgramName) {\n\t\tLOGGER.trace(\"Entering the findTests() method.\");\n\n\t\tList<TestCollectionDTO> testCollections = new ArrayList<TestCollectionDTO>();\n\t\tBoolean qcComplete = true;\n\t\tSet<String> autoCompleteValues = new HashSet<String>();\n\n\t\tUserDetailImpl userDetails = (UserDetailImpl) SecurityContextHolder.getContext().getAuthentication()\n\t\t\t\t.getPrincipal();\n\t\tUser user = userDetails.getUser();\n\t\tOrganization organization = user.getOrganization();\n\t\tBoolean hasQCCompletePermission = permissionUtil.hasPermission(userDetails.getAuthorities(),\n\t\t\t\tRestrictedResourceConfiguration.getQualityControlCompletePermission());\n\t\tBoolean hasHighStakesPermission = permissionUtil.hasPermission(userDetails.getAuthorities(),\n\t\t\t\tRestrictedResourceConfiguration.getHighStakesPermission());\n\n\t\tMap<String, String> testsAndTestCollectionsCriteriaMap = recordBrowserJsonUtil\n\t\t\t\t.constructAutoCompleteFilterCriteria(fileterAttribute, term);\n\n\t\ttestsAndTestCollectionsCriteriaMap.put(\"assessmentProgramCode\", userDetails.getUser().getCurrentAssessmentProgramName());\n\t\ttestsAndTestCollectionsCriteriaMap.put(\"assessmentProgramName\", userDetails.getUser().getCurrentAssessmentProgramName());\n\t\ttestsAndTestCollectionsCriteriaMap.put(\"testingProgramName\", testingProgramName);\n\t\t\n\t\t// US12810 - if the user has qc complete permission then we want to show\n\t\t// qccomplete true and false\n\t\t// so send null as qcComplete to remove where clause item\n\t\tif (hasQCCompletePermission) {\n\t\t\tqcComplete = null;\n\t\t\t// If the user has QC complete permission, then pull tests only\n\t\t\t// rather than using\n\t\t\t// testcollection unionall tests query as we need to show data at\n\t\t\t// the tests level.\n\n\t\t\ttestCollections = testCollectionService.selectTestsAndTestCollectionsForQCAdmin(organization.getId(),\n\t\t\t\t\tsessionRulesConfiguration.getSystemEnrollmentCategory().getId(),\n\t\t\t\t\ttestStatusConfiguration.getPublishedTestStatusCategory().getId(), qcComplete,\n\t\t\t\t\thasHighStakesPermission, testsAndTestCollectionsCriteriaMap, null, null, null, TASK_TYPE_CODE);\n\n\t\t} else {\n\n\t\t\ttestCollections = testCollectionService.selectTestsAndTestCollections(\n\t\t\t\t\ttestStatusConfiguration.getPublishedTestStatusCategory().getId(),\n\t\t\t\t\tsessionRulesConfiguration.getSystemEnrollmentCategory().getId(),\n\t\t\t\t\tsessionRulesConfiguration.getManualEnrollmentCategory().getId(), organization.getId(), qcComplete,\n\t\t\t\t\thasHighStakesPermission, testsAndTestCollectionsCriteriaMap, null, null, null, TASK_TYPE_CODE);\n\t\t}\n\n\t\tfor (TestCollectionDTO testCollection : testCollections) {\n\t\t\tautoCompleteValues.add(testCollection.getName());\n\t\t}\n\n\t\treturn autoCompleteValues;\n\t}", "private String completeBuffer(String buf, ConsoleEditor editor) {\n buf = StringUtils.trimFront(buf);\n if (buf.isEmpty()) {\n return \"\";\n }\n\n editor.completionList.clear();\n\n if (buf.contains(\" \")) {\n StringUtils.tokenize(buf, arguments);\n\n assert (arguments.size() > 1);\n\n // Find the command and call its completion func\n String arg0 = arguments.get(0);\n ConsoleCmd cmd = cmdList.get(arg0);\n IConsoleCompleter complete = null;\n if (cmd != null) {\n if (cmd.isCallable(false)) {\n complete = cmd;\n }\n } else {\n CVar cvar = cvarList.get(arguments.get(0));\n if (cvar != null && cvar.isVisible(false)) {\n complete = cvar.getCompleter();\n }\n }\n if (complete != null) {\n String arg = arguments.size() > 1 ? arguments.get(1) : \"\";\n complete.complete(arg, editor.completionList);\n if (!editor.completionList.isEmpty()) {\n String base = arg0 + \" \";\n for (int i = 0; i < editor.completionList.size(); i++) {\n editor.completionList.set(i, base + editor.completionList.get(i));\n }\n }\n }\n } else {\n cmdCompleter.complete(buf, editor.completionList);\n cvarCompleter.complete(buf, editor.completionList);\n }\n if (editor.completionList.isEmpty()) {\n return buf;\n }\n\n int numEntries = editor.completionList.size();\n\n // Only one option, so return it straight\n if (numEntries == 1) {\n return editor.completionList.get(0);\n }\n\n // Convert to lowercase for faster comparison, then strip the input and calculate the shortest length\n int shortest = 1023;\n String lowerBuf = buf.toLowerCase();\n editor.completionListLower.clear();\n int i;\n for (i = 0; i < numEntries; i++) {\n String s = StringUtils.stripFrontOnce(editor.completionList.get(i).toLowerCase(), lowerBuf);\n editor.completionListLower.add(s);\n if (s.length() < shortest) {\n shortest = s.length();\n }\n }\n\n String returnValue = editor.completionList.get(0);\n if (shortest == 0) {\n returnValue = returnValue.substring(0, buf.length());\n } else {\n // Find the first not matching char\n int pos;\n String firstStr = editor.completionListLower.get(0);\n for (pos = 0; pos < shortest; pos++) {\n // Check if all chars at this position match\n for (i = 1; i < numEntries; i++) {\n if (StringUtils.cmpn(firstStr, editor.completionListLower.get(i), pos) != 0) {\n break;\n }\n }\n // One did not match\n if (i < numEntries) {\n break;\n }\n }\n returnValue = returnValue.substring(0, buf.length() + pos - 1);\n }\n\n return returnValue;\n }", "private ArrayList<Location> getCandidateLocations(Location origin)\n {\n ArrayList<Location> locs = new ArrayList<>();\n Piece p = getPiece(origin);\n if (p==null)\n return locs;\n switch (p.getType())\n {\n case QUEEN:case ROOK:case BISHOP:\n locs = getLocations();break;\n case KNIGHT:case PAWN:case KING:\n locs = getLocationsWithin(getLocation(p),2);\n }\n return locs;\n }", "private TaskLocation[] getPreferredLocsInternal(RDD<?> rdd,\n int partition,\n HashSet<Tuple2<RDD<?>, Integer>> visited) {\n if (!visited.add(new Tuple2<>(rdd, partition))) {\n return new TaskLocation[0];\n }\n\n // If the partition is cached, return the cache locations\n TaskLocation[] taskLocation = getCacheLocs(rdd)[partition];\n if (taskLocation != null && taskLocation.length > 0) {\n return taskLocation;\n }\n\n // If the RDD has some placement preferences (as is the case for input RDDs), get those\n String[] rddPrefs = rdd.preferredLocations(rdd.partitions()[partition]);\n if (rddPrefs != null && rddPrefs.length > 0) {\n TaskLocation[] locations = new TaskLocation[rddPrefs.length];\n for (int i = 0; i < rddPrefs.length; ++i) {\n locations[i] = TaskLocation.apply(rddPrefs[i]);\n }\n return locations;\n }\n\n // If the RDD has narrow dependencies, pick the first partition of the first narrow dependency\n // that has any placement preferences. Ideally we would choose based on transfer sizes,\n // but this will do for now.\n List<Dependency<?>> dependencies = rdd.dependencies();\n if (dependencies == null) {\n return new TaskLocation[0];\n }\n for (Dependency<?> dep : dependencies) {\n if (dep instanceof NarrowDependency) {\n int[] parents = ((NarrowDependency) dep).getParents(partition);\n for (int inPart : parents) {\n TaskLocation[] locs = getPreferredLocsInternal(dep.rdd(), inPart, visited);\n if (locs != null) {\n return locs;\n }\n }\n }\n }\n return new TaskLocation[0];\n }", "protected void doWork() throws Exception {\n\t\tSet<PluginInfo> plis = PluginManager.getInstance()\n\t\t\t\t.getPluginsFor(Defaults.MC_METAINFORMATION_PROVIDER);\n\n\t\tsetProgress(0, \"Searching ...\");\n\t\t\n\t\tint step = 10000 / plis.size();\t\t\n\t\t\n\t\tfor (PluginInfo pli : plis) {\n\n\t\t\t// check if task has being canceled\n\t\t\tif(getTaskState() == TaskStateEvent.TASK_CANCELLING) {\n\t\t\t\tdoCancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// instantiate it\n\t\t\tAbstractPlugin abstractPlugin = pli.getInstance();\n\n\t\t\t// check if this is a real AnnotationProvider\n\t\t\tif (abstractPlugin instanceof AbstractAnnotationProvider) {\n\t\t\t\tAbstractAnnotationProvider abstractProvider = (AbstractAnnotationProvider) abstractPlugin;\n\t\n\t\t\t\tsetProgress(getProgress(), abstractProvider.getName());\n\t\t\t\t\n\t\t\t\t// try to initialize it\n\t\t\t\tif (!abstractProvider.getStatus())\n\t\t\t\t\tabstractProvider.initProvider();\n\n\t\t\t\t\n\t\t\t\t// if it worked, add it to the working AnnotationProviders\n\t\t\t\t// and add IdSettings\n\t\t\t\tif (abstractProvider.getStatus())\n\t\t\t\t\tannotationManager.addProvider(abstractProvider);\n\t\t\t\telse\n\t\t\t\t\t// write a short error log\n\t\t\t\t\twriteLog(abstractProvider.getName()\n\t\t\t\t\t\t\t+ \" initialization failed!\\n\");\n\t\t\t\n\t\t\t\t\tif(abstractProvider.getErrorLog().size() > 0) {\n\t\t\t\t\t\tfor(String errorMessage : abstractProvider.getErrorLog()) {\n\t\t\t\t\t\twriteLog(abstractProvider.getName()\n\t\t\t\t\t\t\t\t+ \" -> \" + errorMessage + \"!\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsetProgress(getProgress() + step, abstractProvider.getName());\n\t\t\t}\n\t\t}\n\t\tsetProgress(10000);\n\t}", "@Override public final void onCompletion( CountedCompleter caller ) {\n // Reduce results into 'this' so they collapse going up the execution tree.\n // NULL out child-references so we don't accidentally keep large subtrees\n // alive since each one may be holding large partial results.\n reduce2(_left); _left = null;\n reduce2(_rite); _rite = null;\n // Only on the top local call, have more completion work\n if( _topLocal ) postLocal();\n }", "public void complete() {\r\n\t\tcomplete(suggestBox.getText());\r\n\t}", "public void run() {\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }", "List<String> getAllExternalAssignments(String gradebookUid);", "public void clickOnCourseSuggestionButton() {\n\t if(CourseSuggestions.isDisplayed()) {\n\t\twaitAndClick(CourseSuggestions);\n\t }\n\t}", "public void testCompletionOnEEnums() throws BadLocationException {\n \t\tsetUpIntentProject(\"completionTest\", INTENT_DOC_WITH_ENUMS_PATH);\n \t\teditor = openIntentEditor();\n \t\tdocument = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tcontentAssistant = editor.getViewerConfiguration().getContentAssistant(editor.getProjectionViewer());\n \n \t\tICompletionProposal[] proposals = getCompletionProposals(112);\n \t\tassertEquals(4, proposals.length);\n \t\tString enumSuffix = \" value (of type CompilationStatusSeverity) - Default: WARNING - Set a simple value of type CompilationStatusSeverity\";\n \t\tassertEquals(\"'WARNING'\" + enumSuffix, proposals[0].getDisplayString());\n \t\tassertEquals(\"'ERROR'\" + enumSuffix, proposals[1].getDisplayString());\n \t\tassertEquals(\"'INFO'\" + enumSuffix, proposals[2].getDisplayString());\n \t\tassertEquals(\"'OK'\" + enumSuffix, proposals[3].getDisplayString());\n \t}", "private static void forInstructor()\r\n\t{\r\n\t\tSystem.out.println(\" ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" This option will do the following:\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Add www.cnn.com, www.king5.com, www.msn.com, www.yahoo.com, and www.nbc.com to the seed URLs\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Add the following keywords to the keyword search:\");\r\n\t\tSystem.out.println(\" Trump, America, and Russia\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Spool up 1000 Fetchers (Producers)\");\r\n\t\tSystem.out.println(\" Spool up 10 Parsers (Consumers)\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Keep pressing option 5 to watch as the program progresses.\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please press 1 to continue or press 0 again to go back.\");\r\n\t\t\r\n\t\tString userInput = input.nextLine();\r\n\t\tboolean valid = false;\r\n\t\twhile(!valid)\r\n\t\t{\r\n\t\t\tif(userInput.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\tvalid = true;\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.cnn.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.king5.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.msn.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.yahoo.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.nbc.com\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tkeywords.add(\"Trump\");\r\n\t\t\t\t\tkeywords.add(\"America\");\r\n\t\t\t\t\tkeywords.add(\"Russia\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int i=0; i < 1000; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\taddProducer();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int i=0; i < 10; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\taddConsumer();\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\t\tcatch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(userInput.equals(\"0\"))\r\n\t\t\t{\r\n\t\t\t\tvalid = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please press 1 to continue or press 0 again to go back.\");\r\n\t\t\t\tuserInput = input.nextLine();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void startConsumerThreads() {\n\n // index the repository\n Map<AttributeFamilyDescriptor, Set<AttributeFamilyDescriptor>> familyToCommitLog;\n familyToCommitLog = indexFamilyToCommitLogs();\n\n log.info(\"Starting consumer threads for familyToCommitLog {}\", familyToCommitLog);\n // execute threads to consume the commit log\n familyToCommitLog.forEach((family, logs) -> {\n for (AttributeFamilyDescriptor commitLogFamily : logs) {\n if (!family.getAccess().isReadonly()) {\n CommitLogReader commitLog = commitLogFamily.getCommitLogReader()\n .orElseThrow(() -> new IllegalStateException(\n \"Failed to find commit-log reader in family \" + commitLogFamily));\n AttributeWriterBase writer = family.getWriter()\n .orElseThrow(() ->\n new IllegalStateException(\n \"Unable to get writer for family \" + family.getName() + \".\"));\n StorageFilter filter = family.getFilter();\n Set<AttributeDescriptor<?>> allowedAttributes =\n new HashSet<>(family.getAttributes());\n final String name = \"consumer-\" + family.getName();\n registerWriterTo(name, commitLog, allowedAttributes, filter,\n writer, retryPolicy);\n log.info(\n \"Started consumer {} consuming from log {} with URI {} into {} \"\n + \"attributes {}\",\n name, commitLog, commitLog.getUri(), writer.getUri(), allowedAttributes);\n } else {\n log.debug(\"Not starting thread for read-only family {}\", family);\n }\n }\n });\n\n // execute transformer threads\n repo.getTransformations().forEach(this::runTransformer);\n }", "public String[] showSuggestionDialog(String room){\n\t\tframe.enableSuggestBtn(false);\n\t\tgame.endTurn();\n\t\tString characterSuggestion = showCharacterSuggestions(room);\n\t\tString weaponSuggestion = showWeaponSuggestions(room);\n\t\treturn new String[]{frame.unDave(characterSuggestion), frame.unDave(weaponSuggestion)};\n\t}", "protected void addSectionConsumer( SectionType type, SectionParsingConsumer<SectionEntry> consumer ) {\n\t\tconsumerList.put( type, consumer );\n\t}", "public CompletableFuture<List<Details>> searchTweetByTopic(String topic) {\n\n List<Details> tweetData = new ArrayList<>();\n try {\n Query query = new Query(topic);\n query.setCount(100);\n listCompletableFuture = CompletableFuture.supplyAsync(() -> {\n QueryResult result = null;\n try {\n result = twitter.search(query);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }).thenApply((QueryResult result) -> {\n tweetStatusObjects = result.getTweets();\n return tweetStatusObjects;\n }).thenApply((tweetStatusObjects) -> {\n tweetStatusObjects.stream()\n .map((Status s) -> {\n tweetData.add(new Details(s.getUser().getName(), s.getUser().getLocation(),\n s.getUser().getFollowersCount(), s.getUser().getScreenName(), s.getText(),s.getHashtagEntities()));\n return tweetData;\n })\n .collect(Collectors.toList());\n return tweetData;\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return listCompletableFuture;\n }", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "public void execute()\n {\n // obtain object references\n ttlAG = (TTL_Autoguider)TTL_Autoguider.getInstance();\n AUTOGUIDE a = (AUTOGUIDE)command;\n AGS_State desired = null;\n pmc = new AltAzPointingModelCoefficients();\n telescope.getMount().getPointingModel().addCoefficients( pmc );\n\n // start of command execution\n Timestamp start = telescope.getTimer().getTime();\n\n try\n {\n AutoguideMode mode = a.getAutoguideMode();\n\n // Guide on the Brightest guide star\n if( mode == AutoguideMode.BRIGHTEST )\n {\n\tttlAG.guideOnBrightest();\n\tdesired = AGS_State.E_AGS_ON_BRIGHTEST;\n }\n\n // Gide on a guide star between magnitudes i1 and i2\n else if( mode == AutoguideMode.RANGE )\n {\n\tint i1 = (int)\n\t ( Math.rint\n\t ( a.getFaintestMagnitude() ) * 1000.0 );\n\n\tint i2 = (int)\n\t ( Math.rint\n\t ( a.getBrightestMagnitude() ) * 1000.0 );\n\n\tttlAG.guideOnRange( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_RANGE;\n }\n\n // Guide on teh Nth brightest star\n else if( mode == AutoguideMode.RANK )\n {\n\tttlAG.guideOnRank( a.getBrightnessRank() );\n\tdesired = AGS_State.E_AGS_ON_RANK;\n }\n\n // Guide on the star at pixel coords X,Y\n else if( mode == AutoguideMode.PIXEL )\n {\n\tint i1 = (int)\n\t ( Math.rint( a.getXPixel() * 1000.0 ) );\n\n\tint i2 = (int)\n\t ( Math.rint( a.getYPixel() * 1000.0 ) );\n\n\tttlAG.guideOnPixel( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_PIXEL;\n }\n\n\n // wait for AGS state change and see if it's the desired one\n // after 200 seconds\n int sleep = 5000;\n while( ( ttlAG.get_AGS_State() == AGS_State.E_AGS_WORKING )&&\n\t ( slept < TIMEOUT ) )\n {\n\n\ttry\n\t{\n\t Thread.sleep( sleep );\n\t slept += sleep;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n }\n\n AGS_State actual = ttlAG.get_AGS_State();\n if( actual != desired )\n {\n\tString s = ( \"after \"+slept+\"ms AGS has acheived \"+actual.getName()+\n\t\t \" state, desired state is \"+desired.getName() );\n\tcommandDone.setErrorMessage( s );\n\tlogger.log( 1, logName, s );\n\treturn;\n }\n\n\n // get x,y of guide star depending on mode and check for age of\n // returned centroids - centroids MUST have been placed SINCE this\n // cmd impl was started.\n TTL_AutoguiderCentroid centroid;\n\n // sleep for 0.5 sec to check values have been updated\n int updateSleep = 500;\n do\n {\n\ttry\n\t{\n\t Thread.sleep( 500 );\n\t slept += 500;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n\n\tcentroid = ttlAG.getCentroidData();\n }\n while( centroid.getTimestamp().getSeconds() < start.getSeconds() );\n\n guideStar = ttlAG.getGuideTarget( centroid );\n\n }\n catch( TTL_SystemException se )\n {\n\n }\n\n stopGuiding = false;\n new Thread( this ).start();\n\n commandDone.setSuccessful( true );\n }", "private void getDriveContents() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n // get only the folders in the root directory of drive account\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }\n });\n t.start();\n }", "@Override\n\tpublic void suggestExchange() {\n\t\t\n\t}", "private void resolve(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor astRequestor, int apiLevel, Map compilerOptions, WorkingCopyOwner owner, int flags) {\n astRequestor.compilationUnitResolver = this;\n this.bindingTables = new DefaultBindingResolver.BindingTables();\n CompilationUnitDeclaration unit = null;\n try {\n int length = compilationUnits.length;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits = new org.eclipse.jdt.internal.compiler.env.ICompilationUnit[length];\n System.arraycopy(compilationUnits, 0, sourceUnits, 0, length);\n beginToCompile(sourceUnits, bindingKeys);\n // process all units (some more could be injected in the loop by the lookup environment)\n for (int i = 0; i < this.totalUnits; i++) {\n if (resolvedRequestedSourcesAndKeys(i)) {\n // cleanup remaining units\n for (; i < this.totalUnits; i++) {\n this.unitsToProcess[i].cleanUp();\n this.unitsToProcess[i] = null;\n }\n break;\n }\n unit = this.unitsToProcess[i];\n try {\n // this.process(...) is optimized to not process already known units\n super.process(unit, i);\n // requested AST\n char[] fileName = unit.compilationResult.getFileName();\n ICompilationUnit source = (ICompilationUnit) this.requestedSources.get(fileName);\n if (source != null) {\n // convert AST\n CompilationResult compilationResult = unit.compilationResult;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;\n char[] contents = sourceUnit.getContents();\n AST ast = AST.newAST(apiLevel);\n ast.setFlag(flags | AST.RESOLVED_BINDINGS);\n ast.setDefaultNodeFlag(ASTNode.ORIGINAL);\n ASTConverter converter = new ASTConverter(/*need to resolve bindings*/\n compilerOptions, true, this.monitor);\n BindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);\n ast.setBindingResolver(resolver);\n converter.setAST(ast);\n CompilationUnit compilationUnit = converter.convert(unit, contents);\n compilationUnit.setTypeRoot(source);\n compilationUnit.setLineEndTable(compilationResult.getLineSeparatorPositions());\n ast.setDefaultNodeFlag(0);\n ast.setOriginalModificationCount(ast.modificationCount());\n // pass it to requestor\n astRequestor.acceptAST(source, compilationUnit);\n worked(1);\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedSources.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n // requested binding\n Object key = this.requestedKeys.get(fileName);\n if (key != null) {\n if (key instanceof BindingKeyResolver) {\n reportBinding(key, astRequestor, owner, unit);\n worked(1);\n } else if (key instanceof ArrayList) {\n Iterator iterator = ((ArrayList) key).iterator();\n while (iterator.hasNext()) {\n reportBinding(iterator.next(), astRequestor, owner, unit);\n worked(1);\n }\n }\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedKeys.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n } finally {\n // cleanup compilation unit result\n unit.cleanUp();\n }\n // release reference to processed unit declaration\n this.unitsToProcess[i] = null;\n this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());\n }\n // remaining binding keys\n DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);\n Object[] keys = this.requestedKeys.valueTable;\n for (int j = 0, keysLength = keys.length; j < keysLength; j++) {\n BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];\n if (keyResolver == null)\n continue;\n Binding compilerBinding = keyResolver.getCompilerBinding();\n IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding);\n // pass it to requestor\n astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding);\n worked(1);\n }\n } catch (OperationCanceledException e) {\n throw e;\n } catch (AbortCompilation e) {\n this.handleInternalException(e, unit);\n } catch (Error e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } catch (RuntimeException e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } finally {\n // disconnect ourselves from ast requestor\n astRequestor.compilationUnitResolver = null;\n }\n }", "protected abstract void getAllUniformLocations();", "public void performMyActivitiesSearch(String regarding) throws InterruptedException {\n\t\tString methodID = \"performMyActivitiesSearch\";\n\t\t\n\t\tMyActivityViewsElements activitiesListView = PageFactory.initElements(driver, MyActivityViewsElements.class);\n\t\tHeaderButton headerButton = PageFactory.initElements(driver, HeaderButton.class); \n\t\t\t\t\n\t\t//Step: execute a filter-free search\n\t\theaderButton.showRightContextMenu();\n\t\tactivitiesListView.myActivitiesSearchTxtBox.click();\n\t\tThread.sleep(500);\n\t\tactivitiesListView.myActivitiesSearchClearBtn.click();\n\t\tThread.sleep(1000);\n\t\tactivitiesListView.myActivitiesSearchTxtBox.sendKeys(regarding);\n\t\tThread.sleep(500);\n\t\tactivitiesListView.myActivitiesSearchLookupBtn.click();\n\t\tThread.sleep(3000);\n\t}", "public void getFixes(List<AnalysisError> errors, FixesConsumer consumer);", "public void performSearch() throws IOException {\n configuration();\n\n File fileDir = new File(queryFilePath);\n if (fileDir.isDirectory()) {\n File[] files = fileDir.listFiles();\n Arrays.stream(files).forEach(file -> performSearchUsingFileContents(file));\n }\n }", "private StatusEnum stepInternal()\n {\n if (initialStep)\n {\n this.tail = map.getStart();\n this.openSet.push(map.getStart());\n initialStep = false;\n }\n\n if (status != StatusEnum.RUNNING)\n return status;\n\n cursor = openSet.pop(); // Pull the cursor off the open set min-heap\n if (cursor == null)\n {\n // The open set was empty, so although we have not reached the goal, there are no more points to investigate\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n\n while (closedSet.contains(cursor) || !map.isTraversable(cursor))\n {\n // The cursor is in the closed set (meaning it was already investigated) or the cursor point is non traversable on the map\n cursor = openSet.pop();\n if (cursor == null)\n {\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n }\n\n // The goal has been reached, the path is complete\n if (cursor.equals(map.getGoal()))\n {\n tail = cursor; // Set the member tail to be used in the reconstruction done in getPath()\n return StatusEnum.COMPLETED_FOUND;\n }\n\n // Add the cursor point to the closed set\n closedSet.add(cursor);\n\n // Get the list of neighboring points\n List<WeightedPoint> neighbors = neighborSelector.getNeighbors(map, cursor, heuristic);\n\n // Link the neighbors to the cursor (for backtracking the path when the goal is reached) and calculate their weight\n for (WeightedPoint wp : neighbors)\n {\n if (map.isTraversable(wp.getRow(), wp.getCol()) && !closedSet.contains(wp))\n {\n wp.setFromCost(cursor.getFromCost() + heuristic.distance(cursor, wp));\n\n if (dijkstra)\n {\n wp.setToCost(0);\n }\n else\n {\n wp.setToCost(heuristic.distance(wp, map.getGoal()));\n }\n wp.setPrev(cursor);\n }\n }\n\n if (shuffle)\n {\n // Shuffle the neighbors to randomize the order of testing nodes with the same cost value\n Collections.shuffle( neighbors );\n }\n Collections.sort( neighbors );\n\n // Put the neighbors on the open set\n for (WeightedPoint wp : neighbors)\n {\n if (!openSet.contains(wp))\n openSet.push(wp);\n }\n\n return StatusEnum.RUNNING;\n }", "private static String getUserIdsByRolePreference(\n WorkflowTaskInstance p_node, String[] p_userIds, Date p_baseDate,\n String p_rolePreference, TaskInfo p_taskInfo) throws Exception\n {\n String assignees = null;\n if (p_rolePreference != null)\n {\n\n long totalDuration = p_node.getAcceptTime()\n + p_node.getCompletedTime();\n\n if (WorkflowConstants.FASTEST_ROLE_PREFERENCE\n .equals(p_rolePreference))\n {\n assignees = getFastestResources(p_baseDate, totalDuration,\n p_userIds);\n }\n else if (WorkflowConstants.AVAILABLE_ROLE_PREFERENCE\n .equals(p_rolePreference))\n {\n assignees = getAvailableResources(p_baseDate,\n p_taskInfo.getCompleteByDate(), totalDuration,\n p_userIds);\n }\n }\n return assignees;\n }", "public void execute() throws IOException, InterruptedException {\n\n if (FindBugs.noAnalysis)\n throw new UnsupportedOperationException(\"This FindBugs invocation was started without analysis capabilities\");\n\n Profiler profiler = bugReporter.getProjectStats().getProfiler();\n\n try {\n // Get the class factory for creating classpath/codebase/etc.\n classFactory = ClassFactory.instance();\n\n // The class path object\n createClassPath();\n\n progress.reportNumberOfArchives(project.getFileCount() + project.getNumAuxClasspathEntries());\n profiler.start(this.getClass());\n\n // The analysis cache object\n createAnalysisCache();\n\n // Create BCEL compatibility layer\n createAnalysisContext(project, appClassList, analysisOptions.sourceInfoFileName);\n\n // Discover all codebases in classpath and\n // enumerate all classes (application and non-application)\n buildClassPath();\n\n\n // Build set of classes referenced by application classes\n buildReferencedClassSet();\n\n // Create BCEL compatibility layer\n setAppClassList(appClassList);\n\n // Configure the BugCollection (if we are generating one)\n FindBugs.configureBugCollection(this);\n\n // Enable/disabled relaxed reporting mode\n FindBugsAnalysisFeatures.setRelaxedMode(analysisOptions.relaxedReportingMode);\n FindBugsDisplayFeatures.setAbridgedMessages(analysisOptions.abridgedMessages);\n\n // Configure training databases\n FindBugs.configureTrainingDatabases(this);\n\n // Configure analysis features\n configureAnalysisFeatures();\n\n // Create the execution plan (which passes/detectors to execute)\n createExecutionPlan();\n\n for (Plugin p : detectorFactoryCollection.plugins()) {\n for (ComponentPlugin<BugReporterDecorator> brp\n : p.getComponentPlugins(BugReporterDecorator.class)) {\n if (brp.isEnabledByDefault() && !brp.isNamed(explicitlyDisabledBugReporterDecorators)\n || brp.isNamed(explicitlyEnabledBugReporterDecorators))\n bugReporter = BugReporterDecorator.construct(brp, bugReporter);\n }\n }\n if (!classScreener.vacuous()) {\n bugReporter = new DelegatingBugReporter(bugReporter) {\n\n @Override\n public void reportBug(@Nonnull BugInstance bugInstance) {\n String className = bugInstance.getPrimaryClass().getClassName();\n String resourceName = className.replace('.', '/') + \".class\";\n if (classScreener.matches(resourceName)) {\n this.getDelegate().reportBug(bugInstance);\n }\n }\n };\n }\n\n if (executionPlan.isActive(NoteSuppressedWarnings.class)) {\n SuppressionMatcher m = AnalysisContext.currentAnalysisContext().getSuppressionMatcher();\n bugReporter = new FilterBugReporter(bugReporter, m, false);\n }\n\n if (appClassList.size() == 0) {\n if (analysisOptions.noClassOk) {\n System.err.println(\"No classfiles specified; output will have no warnings\");\n } else {\n throw new NoClassesFoundToAnalyzeException(classPath);\n }\n }\n\n // Analyze the application\n analyzeApplication();\n } catch (CheckedAnalysisException e) {\n IOException ioe = new IOException(\"IOException while scanning codebases\");\n ioe.initCause(e);\n throw ioe;\n } catch (OutOfMemoryError e) {\n System.err.println(\"Out of memory\");\n System.err.println(\"Total memory: \" + Runtime.getRuntime().maxMemory() / 1000000 + \"M\");\n System.err.println(\" free memory: \" + Runtime.getRuntime().freeMemory() / 1000000 + \"M\");\n\n for (String s : project.getFileList()) {\n System.err.println(\"Analyzed: \" + s);\n }\n for (String s : project.getAuxClasspathEntryList()) {\n System.err.println(\" Aux: \" + s);\n }\n throw e;\n } finally {\n clearCaches();\n profiler.end(this.getClass());\n profiler.report();\n }\n }", "public void findMatchingDirectories(CompleteOperation completion) {\n completion.doAppendSeparator(false);\n \n //if incDir is empty, just list cwd\n if(incDir.trim().isEmpty()) {\n completion.addCompletionCandidates( listDirectory(cwd, null));\n }\n else if(startWithHome()) {\n if(isHomeAndIncDirADirectory()) {\n if(endWithSlash()) {\n completion.addCompletionCandidates(\n listDirectory(new File(Config.getHomeDir()+incDir.substring(1)), null));\n }\n else\n completion.addCompletionCandidate(Config.getPathSeparator());\n }\n else if(isHomeAndIncDirAFile()) {\n completion.addCompletionCandidate(\"\");\n //append when we have a file\n completion.doAppendSeparator(true);\n }\n //not a directory or file, list what we find\n else {\n listPossibleDirectories(completion);\n }\n }\n else if(!startWithSlash()) {\n if(isCwdAndIncDirADirectory()) {\n if(endWithSlash()) {\n completion.addCompletionCandidates(\n listDirectory(new File(cwd.getAbsolutePath() +\n Config.getPathSeparator()+incDir), null));\n }\n else\n completion.addCompletionCandidate(Config.getPathSeparator());\n }\n else if(isCwdAndIncDirAFile()) {\n completion.addCompletionCandidate(\"\");\n //append when we have a file\n completion.doAppendSeparator(true);\n }\n //not a directory or file, list what we find\n else {\n listPossibleDirectories(completion);\n }\n }\n else if(startWithSlash()) {\n if(isIncDirADirectory()) {\n if(endWithSlash()) {\n completion.addCompletionCandidates(\n listDirectory(new File(incDir), null));\n }\n else\n completion.addCompletionCandidate(Config.getPathSeparator());\n }\n else if(isIncDirAFile()) {\n completion.addCompletionCandidate(\"\");\n //append when we have a file\n completion.doAppendSeparator(true);\n }\n //not a directory or file, list what we find\n else {\n listPossibleDirectories(completion);\n }\n }\n \n }", "public static void main(String[] args) {\n\t\t\n\t\tString[] input = {\"i love you\", \"island\",\"ironman\", \"i love leetcode\"};\n\t\tint[] times = {5,3,2,2};\n\t\tAutocompleteSystem sol = new AutocompleteSystem(input, times);\n\t}", "static void scan(Class<?> aClass, BiConsumer<Method, Annotation> consumer) {\n if (Object.class.equals(aClass)) {\n return;\n }\n\n if (!isInstantiable(aClass)) {\n return;\n }\n for (Method method : aClass.getMethods()) {\n scan(consumer, aClass, method);\n }\n }", "private void applyLocationAlgorithms() {\n List<NodeState> states = new ArrayList<NodeState>();\n List<RemoteNode> nodes = new ArrayList<RemoteNode>(nodeManager.getNodes());\n AlgorithmMatchCriteria criteria;\n\n for (Algorithm la : algorithmManager.getAlgorithms()) {\n if (!la.isEnabled()) continue;\n criteria = algorithmManager.getCriteria(la);\n\n List<Node> filteredNodes = criteria.filter(nodes);\n if (filteredNodes.size() > 0) {\n states.add(la.applyTo(nodeManager.getLocalNode(), filteredNodes));\n }\n }\n for (NodeState s : states) {\n nodeManager.getLocalNode().addPending(s);\n }\n }", "public static final void main(String[] args)\n {\n\t\tTranslate.setKey(\"4C2B4C498E936A3FEEB32F247DEC58CF5EBBAF50\");\n\n\t\t// since there's no other argument -> quick and dirty \n\t\tif (args.length > 0)\n\t\t\tSettings.Instance().NewValues();\n\t\t\n \tString [] directories = new String[Locations.length];\n \tString [] mapFiles = new String[Locations.length];\n \t\n \tfor (int i=0; i<Locations.length; i++)\n \t{\n \t\tAvalancheReport ar = null;\n \tReportWriter rw = new FileReportWriter(Locations[i]);\n \tif (Locations[i].equals(\"salzburg\")) ar = new FetchSalzburg(rw); \n \telse if (Locations[i].equals(\"styria\")) ar = new FetchStyria(rw); \n \telse if (Locations[i].equals(\"tyrol\")) ar = new FetchTyrol(rw);\n \telse if (Locations[i].equals(\"southtyrol\")) ar = new FetchSouthTyrol(rw);\n \telse if (Locations[i].equals(\"carinthia\")) ar = new FetchCarinthia(rw);\n \telse if (Locations[i].equals(\"vorarlberg\")) ar = new FetchVorarlberg(rw);\n \telse if (Locations[i].equals(\"upperaustria\")) ar = new FetchUpperAustria(rw);\n \telse if (Locations[i].equals(\"loweraustria\")) ar = new FetchLowerAustria(rw);\n \telse if (Locations[i].equals(\"bavaria\")) ar = new FetchBavaria(rw);\n \telse if (Locations[i].equals(\"veneto\")) ar = new FetchVeneto(rw);\n \telse if (Locations[i].equals(\"trentino\")) ar = new FetchTrentino(rw);\n \telse if (Locations[i].equals(\"switzerland\")) ar = new FetchSwitzerland(rw);\n \telse if (Locations[i].equals(\"en/salzburg\")) ar = new FetchSalzburgEn(rw);\n \telse if (Locations[i].equals(\"en/styria\")) ar = new FetchStyriaEn(rw); \n/* \telse if (Locations[i].equals(\"en/tyrol\")) ar = new FetchTyrolEn(rw);\n \telse if (Locations[i].equals(\"en/southtyrol\")) ar = new FetchSouthTyrolEn(rw);\n \telse if (Locations[i].equals(\"en/carinthia\")) ar = new FetchCarinthiaEn(rw);\n \telse if (Locations[i].equals(\"en/vorarlberg\")) ar = new FetchVorarlbergEn(rw);\n \telse if (Locations[i].equals(\"en/upperaustria\")) ar = new FetchUpperAustriaEn(rw);\n \telse if (Locations[i].equals(\"en/loweraustria\")) ar = new FetchLowerAustriaEn(rw);\n \telse if (Locations[i].equals(\"en/bavaria\")) ar = new FetchBavariaEn(rw);\n \telse if (Locations[i].equals(\"en/veneto\")) ar = new FetchVenetoEn(rw);\n \telse if (Locations[i].equals(\"en/trentino\")) ar = new FetchTrentinoEn(rw);\n \telse if (Locations[i].equals(\"en/switzerland\")) ar = new FetchSwitzerlandEn(rw);\n */ \t\n \tif (ar != null) \n \t{\n \t\tHtmlFileWriter h = new HtmlFileWriter(Locations[i]);\n \t\th.Write(ar);\n \t\trw.Write(ar);\n \t}\n\n \t// cache for ftp upload\n \tdirectories[i] = rw.GetDestinationDir();\n \tmapFiles[i] = ar.GetImgOnDevice();\n \ttry\n \t{\n \t\tUtils.filecopy(mapFiles[i], Settings.Instance().GetDataDir()+Locations[i]+\"/\");\n \t}\n \tcatch (Exception e)\n \t{}\n \t}\n\n \tif (upload)\n \t{\n \t\t// ftp upload\n \t\tFtpUploader ftp = new FtpUploader();\n \t\tftp.Connect();\n \t\t//ftp.CreateDirectoryStructure(Locations);\n\n \t\tfor (int i=0; i<directories.length; i++)\n \t\t{\n \t\t\tftp.Upload(directories[i]+\"/report.xml\", Locations[i]+\"/report.xml\");\n \t\t\tftp.Upload(mapFiles[i], Locations[i]+mapFiles[i].substring(mapFiles[i].lastIndexOf('/')));\t\n \t\t\tftp.Upload(Settings.Instance().GetDataDir()+Locations[i]+\".html\", Locations[i]+\".html\");\n \t\t}\n \t\tftp.Disconnect();\n \t}\n }", "private void auctionJob(String expression){\r\n currentPartial = expression;\r\n solvers = getSolvers(expression.split(\" \")[2]);\r\n for (AID s: solvers){\r\n System.out.println(s.getLocalName());\r\n }\r\n proposals = new ArrayList<ACLMessage>();\r\n ACLMessage solveRequest = new ACLMessage(ACLMessage.CFP);\r\n solveRequest.setContent(expression);\r\n for(AID s: solvers){\r\n solveRequest.addReceiver(s);\r\n }\r\n send(solveRequest);\r\n\t}", "private static void digestPythonSummaries(String inputDir,\n Collection<String> summarizers,\n String docParsedFile,\n String outputDir) {\n for (String summarizer : summarizers) {\n final Map<Integer, Map<String, List<String>>> kToDocSummaries = importSummaries(inputDir,\n summarizer);\n final Map<Integer, Map<String, List<SetResult>>> kToDocSentences = inferSummaries(\n docParsedFile, kToDocSummaries);\n exportSummaries(kToDocSentences, outputDir, summarizer);\n }\n }", "@Override\r\n protected Object doInBackground() throws Exception {\n for (SummaryEntry summaryEntry : inputFilesBySelection.values()) {\r\n if (!isSubmissionOfNewTaskAllowed()) {\r\n break;\r\n }\r\n for (File file : summaryEntry.getFilesInSelection()) {\r\n if (!isSubmissionOfNewTaskAllowed()) {\r\n break;\r\n }\r\n DecryptionTask decryptionTask = new DecryptionTask(file, summaryEntry.getRootFile(),\r\n outputFolder, outputFileType);\r\n completionService.submit(decryptionTask);\r\n }\r\n }\r\n return null;\r\n }", "public static void listy(String[] args){\n\t\tCollection<Foodies> listy = new ArrayList<Foodies>();\n\t\tYelpAPI.setLocation(\"Seattle\", \"WA\");\n\t\tfor (String pref : preferences){\n\t\t\tYelpAPI.setLimit(20);\n\t\t\tYelpAPI.setTerm(pref);\n\t\t\tYelpAPI yelper = new YelpAPI(CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET);\n\t\t\tYelpAPI.YelpAPICLI yelperApiCli = new YelpAPI.YelpAPICLI();\n\t\t\t\n\t\t\tfor (Object firstB :YelpAPI.queryAPI(yelper, yelperApiCli)){\n\t\t\t\tJSONObject b = (JSONObject) firstB;\n\t\t\t\tcuisine = pref;\n\t\t\t\tname = b.get(\"name\").toString();\n\t\t\t\tprice = 0;\n\t\t\t\trating = Double.parseDouble(b.get(\"rating\").toString());\n\t\t\t\tString location = b.get(\"location\").toString();\n\t\t\t\tdistance = getDistance(location);\n\n\t\t\t\tFoodies neuw = new Foodies (cuisine,name,price,rating,distance,lat,lng);\n\t\t\t\tlisty.add(neuw);\n\t\t\t}\n\t\t}\n\t\tdone = listy;\n\t}", "public List<String> Execute(String googleScholarURL) {\r\n try {\r\n // get String representation of HTML File.\r\n HTMLFile = getHTMLFile(googleScholarURL);\r\n if (HTMLFile != null) {\r\n matcher = new HTMLMatcher(HTMLFile);\r\n outputResult = new ArrayList<String>();\r\n\r\n // check if given url is live or local html url\r\n if (googleScholarURL.startsWith(\"https://\")) {\r\n matcher.setLive(true);\r\n }\r\n\r\n // Execute all data extractor methods.\r\n extractAuthorsName();\r\n extractAllCitations();\r\n extracti10Index();\r\n extractFirstThreePubs();\r\n extractFirstFivePubsCites();\r\n extractNumberOfCoauthors();\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error has occured in HTMLReader class\");\r\n }\r\n allMatches.clear();\r\n return outputResult;\r\n }", "public void runExploration() {\n List<Queue<String>> smallSkierQueues = partitionQueue(skierQueue);\n List<Queue<String>> smallLiftQueues = partitionQueue(liftQueue);\n List<Queue<String>> smallhourQueues = partitionQueue(hourQueue);\n\n // run threads here\n long startTime = System.nanoTime();\n for(int i = 0; i < 8; i++) {\n SmallSkierThread runSmallSkier = new SmallSkierThread(smallSkierQueues.get(i));\n SmallLiftThread runSmallLift = new SmallLiftThread(smallLiftQueues.get(i));\n SmallHourThread runSmallHour = new SmallHourThread(smallhourQueues.get(i));\n runSmallSkier.start();\n runSmallHour.start();\n runSmallLift.start();\n }\n // -> Aggregate results here\n // ...\n // ...\n // ...\n // <- End aggregation\n long endTime = System.nanoTime();\n long duration = endTime - startTime;\n System.out.println(\"Concurrent Solution Runtime: \" + duration/1000f + \" microseconds\");\n }", "protected Void doInBackground(Context... params) {\n Long t = Calendar.getInstance().getTimeInMillis();\n while (!foundLocation) {\n searchForLocation();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return null;\n }" ]
[ "0.4905232", "0.47502634", "0.47206274", "0.46424556", "0.46196127", "0.44204685", "0.439912", "0.43951175", "0.42811966", "0.42506543", "0.42154276", "0.41877866", "0.4152129", "0.41498557", "0.41488087", "0.41378918", "0.41362676", "0.40946135", "0.406641", "0.40605044", "0.40415284", "0.40353727", "0.40130183", "0.39858592", "0.398343", "0.39795607", "0.39782882", "0.39781418", "0.39620817", "0.39251018", "0.3924371", "0.392402", "0.3922228", "0.39175698", "0.39046487", "0.39045736", "0.39018035", "0.38930124", "0.38873214", "0.38872334", "0.388466", "0.38718864", "0.38701805", "0.38647723", "0.3864429", "0.38618302", "0.38496578", "0.3831012", "0.38305596", "0.38273346", "0.38167894", "0.38130686", "0.38097137", "0.38076884", "0.3785513", "0.37804314", "0.37728006", "0.37647706", "0.3764127", "0.3761277", "0.37569425", "0.37556398", "0.37552625", "0.37520152", "0.37462288", "0.37437558", "0.3739119", "0.37385443", "0.37323964", "0.37292704", "0.37264436", "0.3723206", "0.3723113", "0.37207666", "0.37160006", "0.37114516", "0.3700207", "0.36984122", "0.3694591", "0.36941642", "0.36935994", "0.36888555", "0.36884984", "0.36836708", "0.36835167", "0.36822435", "0.36820897", "0.3681349", "0.36811754", "0.36693713", "0.36684895", "0.36673105", "0.36665156", "0.36588627", "0.36536893", "0.36450726", "0.364316", "0.36423424", "0.36399987", "0.36371917" ]
0.5909849
0
Computes a set of fixes that are available for the given list of errors. The given consumer is invoked asynchronously on a different thread.
public void getFixes(List<AnalysisError> errors, FixesConsumer consumer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Future<String> processHosts(List<String> input) {\n\t List<Future<String>> futures =\n\t \tinput.stream()\n\t .map(str -> supplyAsync(() -> callApi(str)))\n\t .collect(toList());\n\n\t // Restructure as varargs because that's what CompletableFuture.allOf requires.\n\t CompletableFuture<?>[] futuresAsVarArgs = futures\n\t .toArray(new CompletableFuture[futures.size()]);\n\n\t // Create a new future that completes once once all of the previous futures complete.\n\t CompletableFuture<Void> jobsDone = CompletableFuture.allOf(futuresAsVarArgs);\n\n\t CompletableFuture<String> output = new CompletableFuture<>();\n\n\t // Once all of the futures have completed, build out the result string from results.\n\t jobsDone.thenAccept(ignored -> {\n\t StringBuilder stringBuilder = new StringBuilder();\n\t futures.forEach(f -> {\n\t try {\n\t stringBuilder.append(f.get());\n\t } catch (Exception e) {\n\t output.completeExceptionally(e);\n\t }\n\t });\n\t output.complete(stringBuilder.toString());\n\t });\n\n\t return output;\n\t}", "void collectFailures(Collection<? super Throwable> failures);", "private List resolvePackages(Iterator pkgs) {\n ArrayList res = new ArrayList();\n\n while (pkgs.hasNext()) {\n ExportPkg provider = null;\n ImportPkg ip = (ImportPkg)pkgs.next();\n if (ip.provider != null) {\n framework.listeners.frameworkError(ip.bpkgs.bundle,\n new Exception(\"resolvePackages: InternalError1!\"));\n }\n if (Debug.packages) {\n Debug.println(\"resolvePackages: check - \" + ip.pkgString());\n }\n provider = (ExportPkg)tempProvider.get(ip.name);\n if (provider != null) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name + \" - has temporary provider - \"\n + provider);\n }\n if (provider.zombie && provider.bpkgs.bundle.state == Bundle.UNINSTALLED) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name +\n \" - provider not used since it is an uninstalled zombie - \"\n + provider);\n }\n provider = null;\n } else if (!ip.okPackageVersion(provider.version)) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name +\n \" - provider has wrong version - \" + provider +\n \", need \" + ip.packageRange + \", has \" + provider.version);\n }\n provider = null;\n }\n } else {\n for (Iterator i = ip.pkg.providers.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n tempBlackListChecks++;\n if (tempBlackList.contains(ep)) {\n tempBlackListHits++;\n continue;\n }\n\t if (ep.zombie) {\n // TBD! Should we refrain from using a zombie package and try a new provider instead?\n continue;\n }\n if (ip.okPackageVersion(ep.version)) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name + \" - has provider - \" + ep);\n }\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n if (!checkUses(ep)) {\n tempProvider = oldTempProvider;\n tempBlackList.add(ep);\n continue;\n }\n provider = ep;\n break;\n }\n }\n if (provider == null) {\n provider = pickProvider(ip);\n }\n if (provider != null) {\n tempProvider.put(ip.pkg.pkg, provider);\n }\n }\n if (provider == null) {\n if (ip.resolution == Constants.RESOLUTION_MANDATORY) {\n res.add(ip);\n } else {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: Ok, no provider for optional \" + ip.name);\n }\n }\n }\n }\n return res;\n }", "@Test\n public void actionsExecute() throws Exception {\n Language english = (Language)new English();\n Issue issue1 = this.githubIssue(\"amihaiemil\", \"@charlesmike hello there\");\n Issue issue2 = this.githubIssue(\"jeff\", \"@charlesmike hello\");\n Issue issue3 = this.githubIssue(\"vlad\", \"@charlesmike, hello\");\n Issue issue4 = this.githubIssue(\"marius\", \"@charlesmike hello\");\n final Action ac1 = new Action(issue1);\n final Action ac2 = new Action(issue2);\n final Action ac3 = new Action(issue3);\n final Action ac4 = new Action(issue4);\n \n final ExecutorService executorService = Executors.newFixedThreadPool(5);\n List<Future> futures = new ArrayList<Future>();\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac1.perform();\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac2.perform();\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac3.perform();\n \n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac4.perform();\n }\n }));\n\n for(Future f : futures) {\n assertTrue(f.get()==null);\n }\n \n List<Comment> commentsWithReply1 = Lists.newArrayList(issue1.comments().iterate());\n List<Comment> commentsWithReply2 = Lists.newArrayList(issue2.comments().iterate());\n List<Comment> commentsWithReply3 = Lists.newArrayList(issue3.comments().iterate());\n List<Comment> commentsWithReply4 = Lists.newArrayList(issue4.comments().iterate());\n String expectedReply1 = \"> @charlesmike hello there\\n\\n\" + String.format(english.response(\"hello.comment\"),\"amihaiemil\");\n assertTrue(commentsWithReply1.get(1).json().getString(\"body\")\n .equals(expectedReply1)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply2 = \"> @charlesmike hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"jeff\");\n assertTrue(commentsWithReply2.get(1).json().getString(\"body\")\n .equals(expectedReply2)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply3 = \"> @charlesmike, hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"vlad\");\n assertTrue(commentsWithReply3.get(1).json().getString(\"body\")\n .equals(expectedReply3)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply4 = \"> @charlesmike hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"marius\");\n assertTrue(commentsWithReply4.get(1).json().getString(\"body\")\n .equals(expectedReply4)); //there should be only 2 comments - the command and the reply.\n \n }", "public static <U> void main(String[] args) {\n\t\t\n\t\tExecutorService service = Executors.newFixedThreadPool(10);\n\t\t//String orderValue = \"\";\n\t\tFuture<String> order1 = service.submit(()->{return \"GetOrders111\";});\n\t\ttry {\n\t\t\tString orders = order1.get();\n\t\t\t//orderValue = orders;\n\t\t\tFuture<String> orderEnrich = service.submit(()->{return \"enrichingOrders : \"+orders;});\n\t\t\tFuture<String> orderReconciliation = service.submit(()->{return \"orderReconciliation : \"+orders;});\n\t\t\tFuture<String> orderAutoCreate = service.submit(()->{return \"orderAutoCreate : \"+orders;});\n\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//In above code if too many heavy loaded tasks are there then its a big problem, for ex. get order is fetching millions of records and other services need to wait above code is going to fail.\n\t\t\n\t\tProcessOrder p = (String s)->{System.out.println(\"S \"+s); return 0;};\n\t\t//Solution\n\t\tCompletableFuture<String> cfuture = new CompletableFuture<>();\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tcfuture.supplyAsync(()->{return \"GetOrders111\";})\n\t\t\t\t\t\t.thenApply((x)->{return \"enrichingOrders\";})\n\t\t\t\t\t\t.thenApply((x)->{return \"orderReconciliation\";})\n\t\t\t\t\t\t.thenAccept((x)->{System.out.println(\"orderAutoCreate\");});\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tList<Integer> ls= Arrays.asList(3,9,7,0,10,20);\r\n\t\tls.forEach(consumerWrapper(i-> System.out.println(50/i),Exception.class));\r\n\t\t\r\n\t}", "@Test\n @SuppressWarnings(\"ArraysAsListWithZeroOrOneArgument\")\n public void validateValidCursors() throws NakadiException, InvalidCursorException {\n for (final Cursor cursor : MY_TOPIC_VALID_CURSORS) {\n kafkaTopicRepository.createEventConsumer(MY_TOPIC, asList(cursor));\n }\n // validate all valid cursors\n kafkaTopicRepository.createEventConsumer(MY_TOPIC, MY_TOPIC_VALID_CURSORS);\n\n // validate each individual valid cursor\n for (final Cursor cursor : ANOTHER_TOPIC_VALID_CURSORS) {\n kafkaTopicRepository.createEventConsumer(ANOTHER_TOPIC, asList(cursor));\n }\n // validate all valid cursors\n kafkaTopicRepository.createEventConsumer(ANOTHER_TOPIC, ANOTHER_TOPIC_VALID_CURSORS);\n }", "private Set<String> crossCheckDependenciesAndResolve(Map<String, List<Dependency>> dependencies) throws MojoFailureException {\n Map<String, Map<String, Dependency>> lookupTable = new HashMap<>();\n for (String bom : dependencies.keySet()) {\n Map<String, Dependency> bomLookup = new HashMap<>();\n lookupTable.put(bom, bomLookup);\n\n for (Dependency dependency : dependencies.get(bom)) {\n String key = dependencyKey(dependency);\n bomLookup.put(key, dependency);\n }\n }\n\n Map<String, Set<VersionInfo>> inconsistencies = new TreeMap<>();\n Set<String> trueInconsistencies = new TreeSet<>();\n\n // Cross-check all dependencies\n for (String bom1 : dependencies.keySet()) {\n for (Dependency dependency1 : dependencies.get(bom1)) {\n String key = dependencyKey(dependency1);\n String version1 = dependency1.getArtifact().getVersion();\n\n for (String bom2 : dependencies.keySet()) {\n // Some boms have conflicts with themselves\n\n Dependency dependency2 = lookupTable.get(bom2).get(key);\n String version2 = dependency2 != null ? dependency2.getArtifact().getVersion() : null;\n if (version2 != null) {\n Set<VersionInfo> inconsistency = inconsistencies.get(key);\n if (inconsistency == null) {\n inconsistency = new TreeSet<>();\n inconsistencies.put(key, inconsistency);\n }\n\n inconsistency.add(new VersionInfo(dependency1, bom1));\n inconsistency.add(new VersionInfo(dependency2, bom2));\n\n if (!version2.equals(version1)) {\n trueInconsistencies.add(key);\n }\n }\n }\n }\n }\n\n // Try to solve with preferences\n Set<String> resolvedInconsistencies = new TreeSet<>();\n DependencyMatcher preferencesMatcher = new DependencyMatcher(this.preferences);\n for (String key : trueInconsistencies) {\n int preferred = 0;\n for (VersionInfo nfo : inconsistencies.get(key)) {\n if (preferencesMatcher.matches(nfo.getDependency())) {\n preferred++;\n }\n }\n\n if (preferred == 1) {\n resolvedInconsistencies.add(key);\n }\n }\n\n trueInconsistencies.removeAll(resolvedInconsistencies);\n\n if (trueInconsistencies.size() > 0) {\n StringBuilder message = new StringBuilder();\n message.append(\"Found \" + trueInconsistencies.size() + \" inconsistencies in the generated BOM.\\n\");\n\n for (String key : trueInconsistencies) {\n message.append(key);\n message.append(\" has different versions:\\n\");\n for (VersionInfo nfo : inconsistencies.get(key)) {\n message.append(\" - \");\n message.append(nfo);\n message.append(\"\\n\");\n }\n }\n\n throw new MojoFailureException(message.toString());\n }\n\n return resolvedInconsistencies;\n }", "protected final void whenResolved(Collection<? extends Task<?>> tasks, Runnable callback) {\n \tnumOfTasksLeft = tasks.size();\n Object[] tmpArr = tasks.toArray();\n this.callback=callback;\n// \tfor (Task<?> t : tasks) {\n//\n//\t\t}\n \n for (int i=0; i<tmpArr.length; i++){\n ((Task<?>)tmpArr[i]).getResult().whenResolved(()->{\n \tsynchronized (this) { // we need to synchronize in order to prevent a situation where two threads adds the same resolved task\n \tnumOfTasksLeft--;\n if (numOfTasksLeft <= 0)\n // Add to my Queue\n myProcessor.getPool().addTask(this, myProcessor.getProcessorID());\n \t}\n });\n }\n \n \n // I get tasks, and callbacks. When all the tasks are completed, run the callback\n // @pre-condition - all of the tasks needs to be resolved <-> getResult!=null\n// \tIterator<? extends Task<?>> it=tasks.iterator();\n// \twhile (it.hasNext()) {\n// \t\tif (it.next().getResult()==null)\n//\t\t\t\ttry {\n//\t\t\t\t\t// Option for OBJECT in wait\n//\t\t\t\t\twait();\n//\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\te.printStackTrace();\n//\t\t\t\t}\n// \t}\n }", "public Future<List<UUID>> checkDelegate(List<UUID> provider_ids, String userId) {\n Promise<List<UUID>> p = Promise.promise();\n Collector<Row, ?, List<UUID>> idCollector =\n Collectors.mapping(row -> row.getUUID(ID), Collectors.toList());\n\n try {\n pool.withConnection(\n conn ->\n conn.preparedQuery(CHECK_DELEGATION)\n .collecting(idCollector)\n .execute(\n Tuple.of(authUrl, UUID.fromString(userId))\n .addArrayOfUUID(provider_ids.toArray(UUID[]::new)))\n .onSuccess(obj -> p.complete(obj.value()))\n .onFailure(\n obj -> {\n LOGGER.error(\"checkDelegate db fail :: \" + obj.getLocalizedMessage());\n p.fail(INTERNALERROR);\n }));\n } catch (Exception e) {\n LOGGER.error(\"Fail checkDelegate:\" + e.toString());\n p.fail(INTERNALERROR);\n }\n return p.future();\n }", "public List<Diagnostic> doDiagnostics(Template template, QuteValidationSettings validationSettings,\r\n\t\t\tList<CompletableFuture<?>> resolvingJavaTypeFutures, CancelChecker cancelChecker) {\r\n\t\treturn diagnostics.doDiagnostics(template, validationSettings, resolvingJavaTypeFutures, cancelChecker);\r\n\t}", "static <S, F> ConsumableFunction<Result<S, F>> onFailureDo(Consumer<F> consumer) {\n return r -> r.then(onFailure(peek(consumer)));\n }", "public static void test009()\r\n {\r\n System.out.println(\"RxJavaTest04::test009\");\r\n List<String> tickets = new ArrayList<String>(Arrays.asList(\"one\", \"two\", \"three\", \"four\", \"five\"));\r\n List<String> failures = Observable.fromIterable(tickets)\r\n .flatMap(ticket ->\r\n myRxSendEmail(ticket)\r\n .flatMap(response -> Observable.<String>empty())\r\n .doOnError(e -> System.out.printf(\"Failed to send %s: %s\\n\", ticket, e))\r\n .onErrorReturn(err -> ticket)\r\n .subscribeOn(Schedulers.io())\r\n )\r\n .toList()\r\n .blockingGet();\r\n for (String failure : failures) {\r\n System.out.println(failure);\r\n }\r\n }", "public Map lookup(Set lfns, String handle) {\n //Map indexed by lrc url and each value a collection\n //of lfns that the RLI says are present in it.\n Map lrc2lfn = this.getLRC2LFNS(lfns);\n if(lrc2lfn == null){\n //probably RLI is not connected!!\n return null;\n }\n\n // now query the LRCs with the LFNs they are responsible for\n // and aggregate stuff.\n String key = null,message = null;\n Map result = new HashMap(lfns.size());\n for(Iterator it = lrc2lfn.entrySet().iterator();it.hasNext();){\n Map.Entry entry = (Map.Entry)it.next();\n key = (String)entry.getKey();\n message = \"Querying LRC \" + key;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,key);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + key,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n\n //query the lrc\n try{\n Map m = lrc.lookup((Set)entry.getValue(),handle);\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n entry = (Map.Entry)mit.next();\n //merge the entries into the main result\n key = (String)entry.getKey(); //the lfn\n if(result.containsKey(key)){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((Set)result.get(key)).addAll((Set)entry.getValue());\n }\n else{\n result.put(key,entry.getValue());\n }\n }\n }\n catch(Exception ex){\n mLogger.log(\"lookup(Set,String)\",ex,\n LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n //disconnect\n lrc.close();\n }\n\n\n mLogger.log(message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n return result;\n\n\n }", "void patch(final MailboxUsageMailboxCounts sourceMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);", "public static void grepMultiThread(String[] args) {\n\t\t\t\tBoolean searchTerm = false;\n\t\t\t\tString pattern = null;\n\t\t\t for (String i : args) {\n\t\t\t \t if (searchTerm==false) {\n\t\t\t \t\t pattern = i;\n\t\t\t \t\t searchTerm = true;\n\t\t\t \t\t continue;\n\t\t\t \t }\n\t\t\t \t//Print the current directory\n\t\t\t \t System.out.println(i);\n\t\t\t \t int lines = lines(i);\n\t\t\t \t int startEnd = (lines/2);\n\t\t\t \t \n\t\t\t \t //Create an executor and 2 workers\n\t\t\t \t ExecutorService executor = Executors.newFixedThreadPool(2);\n\t\t\t \t \n\t\t\t \t //One workers holds the info for the first half of the file,\n\t\t\t \t //the other worker holds the info for the second half of the file\n\t\t\t \t Callable<ArrayList<String>> worker = new MyCallable(i, pattern, 0, startEnd);\n\t\t\t \t Callable<ArrayList<String>> worker2 = new MyCallable(i, pattern, startEnd, lines);\n\t\t\t \t \n\t\t\t \t \n\t\t\t \t //Run the workers and store the results in Futures\n\t\t\t \t Future <ArrayList<String>> future = executor.submit(worker);\n\t\t\t \t Future <ArrayList<String>> future2 = executor.submit(worker2);\n\t\t\t \t \n\t\t\t \t //Shutdown when complete\n\t\t\t \t executor.shutdown();\n\t\t\t \t\twhile (!executor.isTerminated()) {\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\t//Now get the results from the futures and store them into Arraylists\n\t\t\t \t\t//Then print those Arraylists in the correct order, first half then second half\n\t\t\t \t\ttry {\n\t\t\t\t\t\tArrayList<String> results = future.get();\n\t\t\t\t\t\tfor (String s: results) {\n\t\t\t\t \t\t\tSystem.out.println(s);\n\t\t\t\t \t\t}\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t \t\t\n\t\t\t \t\ttry {\n\t\t\t\t\t\tArrayList<String> results2 = future2.get();\n\t\t\t\t\t\tfor (String s: results2) {\n\t\t\t\t \t\t\tSystem.out.println(s);\n\t\t\t\t \t\t}\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t }\n\t}", "public static void scheduleRefreshResolvedArtifacts(List<MavenProjectsProcessorTask> postTasks,\n Iterable<MavenProject> projectsToRefresh) {\n\n HashSet<File> files = new HashSet<>();\n for (MavenProject project : projectsToRefresh) {\n for (MavenArtifact dependency : project.getDependencies()) {\n files.add(dependency.getFile());\n }\n }\n\n if (MavenUtil.isMavenUnitTestModeEnabled()) {\n doRefreshFiles(files);\n }\n else {\n postTasks.add(new RefreshingFilesTask(files));\n }\n }", "static Exception executeAll(\r\n ExecutorService executorService, \r\n Collection<Callable<Object>> callables) \r\n throws InterruptedException\r\n {\r\n CompletionService<Object> completionService =\r\n new ExecutorCompletionService<Object>(executorService);\r\n int n = callables.size();\r\n List<Future<Object>> futures = new ArrayList<Future<Object>>(n);\r\n Exception caughtException = null;\r\n try\r\n {\r\n for (Callable<Object> callable : callables)\r\n {\r\n futures.add(completionService.submit(callable));\r\n }\r\n for (int i = 0; i < n; ++i)\r\n {\r\n try\r\n {\r\n Future<Object> future = completionService.take();\r\n future.get();\r\n } \r\n catch (ExecutionException e)\r\n {\r\n logger.fine(\"Exception during execution: \" + e);\r\n caughtException = e;\r\n break;\r\n }\r\n }\r\n } \r\n catch (RejectedExecutionException e)\r\n {\r\n // This should not happen: When the executor is shut down,\r\n // then no more executions should be scheduled\r\n logger.severe(\"Cannot schedule execution: \" + e);\r\n caughtException = e;\r\n }\r\n finally\r\n {\r\n if (caughtException != null)\r\n {\r\n logger.info(\"Canceling execution of remaining tasks\");\r\n for (Future<Object> f : futures)\r\n {\r\n f.cancel(true);\r\n }\r\n }\r\n }\r\n return caughtException;\r\n }", "@Nonnull \r\n\tpublic static <T> List<List<T>> invokeAll(\r\n\t\t\t@Nonnull final Iterable<? extends Observable<? extends T>> sources) throws InterruptedException {\r\n\t\treturn invokeAll(sources, scheduler());\r\n\t}", "public static void test008()\r\n {\r\n System.out.println(\"RxJavaTest04::test008\");\r\n List<String> tickets = new ArrayList<String>(Arrays.asList(\"one\", \"two\", \"three\", \"four\", \"five\"));\r\n List<String> failures = Observable.fromIterable(tickets)\r\n .flatMap(ticket ->\r\n myRxSendEmail(ticket)\r\n .flatMap(response -> Observable.<String>empty())\r\n .doOnError(e -> System.out.printf(\"Failed to send %s: %s\\n\", ticket, e))\r\n .onErrorReturn(err -> ticket))\r\n .toList()\r\n .blockingGet();\r\n for (String failure : failures) {\r\n System.out.println(failure);\r\n }\r\n }", "@Test\n public void actionsFail() throws Exception {\n Language english = (Language)new English();\n Issue issue1 = this.githubIssue(\"amihaiemil\", \"@charlesmike index\");\n Issue issue2 = this.githubIssue(\"jeff\", \"@charlesmike index\");\n \n Comments comments = Mockito.mock(Comments.class);\n Comment com = Mockito.mock(Comment.class);\n Mockito.when(com.json()).thenThrow(new IOException(\"expected IOException...\"));\n Mockito.when(comments.iterate()).thenReturn(Arrays.asList(com));\n \n Issue mockedIssue1 = Mockito.mock(Issue.class);\n Mockito.when(mockedIssue1.comments())\n .thenReturn(comments)\n .thenReturn(issue1.comments());\n\n Issue mockedIssue2 = Mockito.mock(Issue.class);\n Mockito.when(mockedIssue2.comments())\n .thenReturn(comments)\n .thenReturn(issue2.comments());\n \n final Action ac1 = new Action(mockedIssue1);\n final Action ac2 = new Action(mockedIssue2);\n \n final ExecutorService executorService = Executors.newFixedThreadPool(5);\n List<Future> futures = new ArrayList<Future>();\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac1.perform();;\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac2.perform();\n }\n }));\n\n for(Future f : futures) {\n assertTrue(f.get()==null);\n }\n \n List<Comment> commentsWithReply1 = Lists.newArrayList(issue1.comments().iterate());\n List<Comment> commentsWithReply2 = Lists.newArrayList(issue2.comments().iterate());\n\n String expectedStartsWith = \"There was an error when processing your command. [Here](/\";\n assertTrue(commentsWithReply1.get(1).json().getString(\"body\")\n .startsWith(expectedStartsWith)); //there should be only 2 comments - the command and the reply.\n \n assertTrue(commentsWithReply2.get(1).json().getString(\"body\")\n .startsWith(expectedStartsWith)); //there should be only 2 comments - the command and the reply.\n \n }", "public Task<List<Notification>> getNotificationsByIds(List<String> notifIds) {\r\n // Starts an asynchronous task to get notifications from database\r\n // caller should call an on success listener to get all users under the specified zipcode\r\n\r\n final TaskCompletionSource<List<Notification>> tcs = new TaskCompletionSource<>();\r\n final List<Notification> notificationList = new LinkedList<>();\r\n\r\n\r\n for (int i = 0; i < notifIds.size(); i++){\r\n String id = notifIds.get(i);\r\n System.out.println(id + \" LLLLLLLLLLLL\");\r\n getNotification(id).addOnSuccessListener(new OnSuccessListener<Notification>() {\r\n @Override\r\n public void onSuccess(Notification notification) {\r\n System.out.println(\"SUCCESS ADDING \" + notification);\r\n notificationList.add(notification);\r\n }\r\n });\r\n\r\n }\r\n tcs.setResult(notificationList);\r\n\r\n System.out.println(\"b4 RETURN \" + notificationList);\r\n return tcs.getTask();\r\n }", "public void calculateFee(Map<TransactionEntry, List<Transaction>> transactionsMap, PrintStream out) {\n int nWorkerThreads = 8;\n ExecutorService pool = Executors.newFixedThreadPool(nWorkerThreads);\n Set<Future<String>> futures = new HashSet<>();\n try {\n CountDownLatch countDownLatch = new CountDownLatch(nWorkerThreads);\n Queue<TransactionEntry> transactionEntryQueue = new ConcurrentLinkedQueue<>(transactionsMap.keySet());\n for (int i = 0; i < nWorkerThreads; i++) {\n Callable<String> task = new FeeCalculatorWorker(transactionEntryQueue, transactionsMap, countDownLatch);\n Future<String> future = pool.submit(task);\n futures.add(future);\n }\n countDownLatch.await();\n // Just to ensure that we have result in future object. Result is returned after we decrement the countDownLatch\n Thread.sleep(100);\n } catch (InterruptedException e) {\n out.println(\"Exception occurred, while waiting for worker threads to finish! \" + e.getMessage());\n } finally {\n pool.shutdown();\n }\n out.println(\"Printing Future results!\");\n for (Future<String> future : futures) {\n try {\n String result = future.get();\n if (result != null) {\n out.println(result);\n } else {\n out.println(\"Future should not be NULL.\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public synchronized CatchupFuture catchup(Map<String, Long> journalSequenceNumbers) {\n List<Long> distinctSequences =\n journalSequenceNumbers.values().stream().distinct().collect(Collectors.toList());\n Preconditions.checkState(distinctSequences.size() == 1, \"incorrect journal sequences\");\n return mStateMachine.catchup(distinctSequences.get(0));\n }", "public List<Diagnostic> doDiagnostics(Template template, QuteValidationSettings validationSettings,\r\n\t\t\tList<CompletableFuture<?>> resolvingJavaTypeFutures, CancelChecker cancelChecker) {\r\n\t\tif (validationSettings == null) {\r\n\t\t\tvalidationSettings = QuteValidationSettings.DEFAULT;\r\n\t\t}\r\n\t\tString projectUri = template.getProjectUri();\r\n\t\tif (projectUri != null) {\r\n\t\t\tCompletableFuture<?> f = template.getTemplateDataModel();\r\n\t\t\tif (!f.isDone()) {\r\n\t\t\t\tresolvingJavaTypeFutures.add(f);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tList<Diagnostic> diagnostics = new ArrayList<Diagnostic>();\r\n\t\tif (validationSettings.isEnabled()) {\r\n\t\t\tvalidateWithRealQuteParser(template, diagnostics);\r\n\t\t\tvalidateDataModel(template, template, resolvingJavaTypeFutures, new ResolutionContext(), diagnostics);\r\n\t\t}\r\n\t\treturn diagnostics;\r\n\t}", "private void resolveRecursions(final AbraModule module)\n {\n int lastMissing = 0;\n while (missing != lastMissing)\n {\n // try to resolve missing ones by running another pass\n // over the ones that have not been done analyzing yet\n // and see if that results in less missing branch sizes\n lastMissing = missing;\n missing = 0;\n evalBlocks(module.branches);\n }\n\n if (missing != 0)\n {\n // still missing some branch sizes\n // must be due to recursion issues\n for (final AbraBlockBranch branch : module.branches)\n {\n if (branch.size() == 0)\n {\n Qupla.log(\"Unresolved trit vector size in branch: \" + branch.name);\n }\n }\n\n error(\"Recursion issue detected\");\n }\n\n // quick sanity check if everything has a size now\n for (final AbraBlockBranch branch : module.branches)\n {\n for (final AbraBaseSite site : branch.sites)\n {\n if (site.size == 0 && ((AbraSiteMerge) site).inputs.size() != 0)\n {\n error(\"WTF?\");\n }\n }\n\n for (final AbraBaseSite site : branch.outputs)\n {\n if (site.size == 0 && ((AbraSiteMerge) site).inputs.size() != 0)\n {\n error(\"WTF?\");\n }\n }\n\n for (final AbraBaseSite site : branch.latches)\n {\n if (site.size == 0 && site.references != 0)\n {\n error(\"WTF?\");\n }\n }\n }\n }", "public static <T> void executeUntilFailure(Executor executor, Collection<Callable<T>> tasks)\n {\n CompletionService<T> completionService = new ExecutorCompletionService<>(executor);\n List<Future<T>> futures = new ArrayList<>(tasks.size());\n for (Callable<T> task : tasks) {\n futures.add(completionService.submit(task));\n }\n try {\n for (int i = 0; i < futures.size(); i++) {\n getDone(take(completionService));\n }\n }\n catch (Exception failure) {\n try {\n futures.forEach(future -> future.cancel(true));\n }\n catch (RuntimeException e) {\n failure.addSuppressed(e);\n }\n throw failure;\n }\n }", "public static void main(String[] args)\r\n\t{\r\n\t\tExecutorService executorService = Executors.newFixedThreadPool(1);\r\n\t\tList<Future<String>> futureList = new ArrayList<>();\r\n\t\t\r\n\t\tCallable<String> callable = new Thread1();\r\n\t\tCallable<String> callable2 = new Thread1();\r\n\t\tCallable<String> callable3 = new Thread1();\r\n\t\t\r\n\t\t// Future:\r\n\t\t/** A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, \r\n\t\t* to wait for its completion, and to retrieve the result of the computation. The result can only be retrieved using method get \r\n\t\t* when the computation has completed, blocking if necessary until it is ready. Cancellation is performed by the cancel method. \r\n\t\t* Additional methods are provided to determine if the task completed normally or was cancelled. Once a computation has completed, \r\n\t\t* the computation cannot be cancelled. If you would like to use a Future for the sake of cancellability but not provide a usable \r\n\t\t* result, you can declare types of the form Future<?> and return null as a result of the underlying task. **/\r\n\t\t\r\n\t\t// submit():\r\n\t\t/** Submits a value-returning task for execution and returns a Future representing the pending results of the task. \r\n\t\t* The Future's get method will return the task's result upon successful completion. \r\n\t\t* If you would like to immediately block waiting for a task, you can use constructions of the form result = exec.submit(aCallable).get(); **/ \r\n\t\tFuture<String> future = executorService.submit(callable);\r\n\t\tfutureList.add(future);\r\n\t\t\r\n\t\tFuture<String> future2 = executorService.submit(callable2);\r\n\t\tfutureList.add(future2);\r\n\t\t\r\n\t\tFuture<String> future3 = executorService.submit(callable3);\r\n\t\tfutureList.add(future3);\r\n\t\t\r\n\t\tSystem.out.println(\"futureList.size(): \"+futureList.size()); \r\n\t\t\r\n\t\tfor(Future<String> fut : futureList)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// cancel(true)\r\n\t\t\t\t/** Attempts to cancel execution of this task. This attempt will fail if the task has already completed, has already been cancelled, \r\n\t\t\t\t* or could not be cancelled for some other reason. If successful, and this task has not started when cancel is called, this task should never run. \r\n\t\t\t\t* If the task has already started, then the mayInterruptIfRunning parameter determines whether the thread executing this task should be \r\n\t\t\t\t* interrupted in an attempt to stop the task. After this method returns, subsequent calls to isDone will always return true. \r\n\t\t\t\t* Subsequent calls to isCancelled will always return true if this method returned true. **/\r\n\t\t\t\t// System.out.println(fut.cancel(true));\r\n\t\t\t\t\r\n\t\t\t\t// get():\r\n\t\t\t\t// Waits if necessary for the computation to complete, and then retrieves its result.\r\n\t\t\t\tSystem.out.println(fut.get());\r\n\t\t\t\t\r\n\t\t\t\t// get(1000, TimeUnit.MILLISECONDS):\r\n\t\t\t\t/** Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.\r\n\t\t\t\t* Here, we can specify the time to wait for the result, itís useful to avoid current thread getting blocked for longer time. **/ \r\n\t\t\t\t// System.out.println(fut.get(1000, TimeUnit.MILLISECONDS));\r\n\t\t\t\t\r\n\t\t\t\t// isDone():\r\n\t\t\t\t/** Returns true if this task completed. \r\n\t\t\t\t* Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method will return true **/\r\n\t\t\t\t// System.out.println(fut.isDone());\r\n\t\r\n\t\t\t\t// isCancelled(): \r\n\t\t\t\t/** Returns true if this task was cancelled before it completed normally. **/\r\n\t\t\t\t// System.out.println(fut.isCancelled());\r\n\t\t\t}\r\n\t\t\tcatch(Exception ex)\r\n\t\t\t{\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\texecutorService.shutdown();\r\n\t}", "@Nonnull \r\n\tpublic static <T> List<List<T>> invokeAll(\r\n\t\t\t@Nonnull final Observable<? extends T>... sources) throws InterruptedException {\r\n\t\treturn invokeAll(Arrays.asList(sources), scheduler());\r\n\t}", "private void resolveSudokuByRules() {\n for (int i = 0; i < 9; i++) {\n updateBoardForSingleCandidate();\n }\n updateCandidateMapForPairByCol();\n updateCandidateMapForPairByRow();\n\n for (int i = 0; i < 5; i++) {\n updateBoardForSingleCandidate();\n }\n\n updateBoardForSinglePossibilityByBlock();\n updateBoardForSinglePossibilityByRow();\n updateBoardForSinglePossibilityByCol();\n refreshCandidateMap();\n\n for (int i = 0; i < 5; i++) {\n updateBoardForSingleCandidate();\n }\n\n printBoardAndCandidatesHtmlFile();\n }", "public static void processFeeds(List<FeedContext> fcs) {\n for (FeedContext fc : fcs) {\n try {\n processFeed(fc);\n }\n catch (Exception e) {\n mLog.error(\"Skipping feed at URL [\" + fc.getFeedUrl() +\n \"] due to error while processing: \" + e,e);\n }\n\t\t}\n\t}", "private void tryDoingTasksInQueue() {\n var list = queue.exceptionsList;\n var t2 = new Thread(() -> {\n Retry.Operation op = (list1) -> {\n if (!list1.isEmpty()) {\n LOG.warn(\"Error in accessing queue db to do tasks, trying again..\");\n throw list1.remove(0);\n }\n doTasksInQueue();\n };\n Retry.HandleErrorIssue<QueueTask> handleError = (o, err) -> {\n };\n var r = new Retry<>(op, handleError, numOfRetries, retryDuration,\n e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));\n try {\n r.perform(list, null);\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n });\n t2.start();\n }", "void submitAndWaitForAll(Iterable<Runnable> tasks);", "public abstract List<Callable<String>> getTestCases(final List<String> lines) throws Exception;", "private void populateRecipientEmailsFromPendingResponseComments(\n List<FeedbackResponseCommentAttributes> pendingResponseCommentsList,\n List<StudentAttributes> allStudents, CourseRoster roster,\n Map<String, List<StudentAttributes>> teamStudentTable,\n Set<String> recipientEmailsList) {\n \n Map<String, FeedbackQuestionAttributes> feedbackQuestionsTable = new HashMap<String, FeedbackQuestionAttributes>();\n Map<String, FeedbackResponseAttributes> feedbackResponsesTable = new HashMap<String, FeedbackResponseAttributes>();\n Map<String, Set<String>> responseCommentsAddedTable = new HashMap<String, Set<String>>();\n \n for(FeedbackResponseCommentAttributes frc:pendingResponseCommentsList){\n FeedbackQuestionAttributes relatedQuestion = getRelatedQuestion(\n feedbackQuestionsTable, frc);\n FeedbackResponseAttributes relatedResponse = getRelatedResponse(\n feedbackResponsesTable, frc);\n \n if(relatedQuestion != null && relatedResponse != null){\n populateRecipientEmailsForGiver(roster, teamStudentTable,\n recipientEmailsList, responseCommentsAddedTable, frc,\n relatedQuestion, relatedResponse);\n populateRecipientEmailsForReceiver(roster, teamStudentTable,\n recipientEmailsList, responseCommentsAddedTable, frc,\n relatedQuestion, relatedResponse);\n populateRecipientEmailsForTeamMember(roster, teamStudentTable,\n recipientEmailsList, responseCommentsAddedTable, frc,\n relatedQuestion, relatedResponse);\n populateRecipientEmailsForAllStudents(allStudents,\n recipientEmailsList, responseCommentsAddedTable, frc,\n relatedQuestion);\n }\n }\n }", "public void run() {\n\t\tLOG.info(\"consumer thread started for topic: \" + topic + \" partition: \" + partition);\n\t\tSimpleConsumer consumer = getConsumer(leadBroker);\n\t\tlong readOffset = getLastOffset(consumer, topic, partition, kafka.api.OffsetRequest.EarliestTime(),\n\t\t\t\tclientName);\n\n\t\tint numErrors = 0;\n\t\twhile (!shutdown) {\n\t\t\tif (consumer == null) {\n\t\t\t\tconsumer = getConsumer(leadBroker);\n\t\t\t}\n\t\t\tFetchRequest req = new FetchRequestBuilder().clientId(clientName)\n\t\t\t\t\t.addFetch(topic, partition, readOffset, timeOut).build();\n\t\t\tFetchResponse fetchResponse = consumer.fetch(req);\n\n\t\t\tif (fetchResponse.hasError()) {\n\t\t\t\tnumErrors++;\n\t\t\t\t// Something went wrong!\n\t\t\t\tshort code = fetchResponse.errorCode(topic, partition);\n\t\t\t\tLOG.warn(\"Error fetching data from the Broker:\" + leadBroker + \" Reason: \" + code);\n\t\t\t\tif (numErrors > 5) //TODO: do i want this?? maybe throw up\n\t\t\t\t\tbreak;\n\t\t\t\tif (code == ErrorMapping.OffsetOutOfRangeCode()) {\n\t\t\t\t\t// We asked for an invalid offset. For simple case ask for\n\t\t\t\t\t// the last element to reset\n\t\t\t\t\treadOffset = getLastOffset(consumer, topic, partition, kafka.api.OffsetRequest.LatestTime(),\n\t\t\t\t\t\t\tclientName);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconsumer.close();\n\t\t\t\tconsumer = null;\n\t\t\t\tleadBroker = findNewLeader(leadBroker, topic, partition);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnumErrors = 0;\n\n\t\t\tlong numRead = 0;\n\t\t\tfor (MessageAndOffset messageAndOffset : fetchResponse.messageSet(topic,partition)) {\n\t\t\t\tlong currentOffset = messageAndOffset.offset();\n\t\t\t\tif (currentOffset < readOffset) {\n\t\t\t\t\tLOG.info(\"Found an old offset: \" + currentOffset + \" Expecting: \" + readOffset);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\treadOffset = messageAndOffset.nextOffset();\n\t\t\t\ttry {\n\t\t\t\t\tLOG.debug(\"##################### received a message! on topic: \" + topic + \" partition \" + partition);\n\t\t\t\t\tmessages.put(new Message<String, String>(\n\t\t\t\t\t\t\tconvertBytesToString(messageAndOffset.message().key()),\n\t\t\t\t\t\t\tconvertBytesToString(messageAndOffset.message().payload())));\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\tLOG.error(\"message failure to decode bytes into UTF-8 format.\",e);\n\t\t\t\t\tthrow new RuntimeException(\"Cannot decode the messages into UTF-8 format\",e);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tLOG.error(\"interupted waiting to add to the queue\",e);\n\t\t\t\t\tthrow new RuntimeException(\"Cannot add to my own queue\");\n\t\t\t\t}\n\t\t\t\tnumRead++;\n\t\t\t}\n\n\t\t\tif (numRead == 0) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t} catch (InterruptedException ie) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (consumer != null)\n\t\t\tconsumer.close();\n\t\tLOG.info(\"shutdown complete\");\n\t}", "public static void main(String[] args) throws Exception {\n // construct a new executor that will run async tasks\n AsyncExecutor executor = new ThreadAsyncExecutor();\n\n // start few async tasks with varying processing times, two last with callback handlers\n AsyncResult<Integer> asyncResult1 = executor.startProcess(lazyval(10, 5000));\n AsyncResult<String> asyncResult2 = executor.startProcess(lazyval(\"test\", 3000));\n AsyncResult<Long> asyncResult3 = executor.startProcess(lazyval(50L, 7000));\n AsyncResult<Integer> asyncResult4 = executor.startProcess(lazyval(20, 4000), callback(9999));\n AsyncResult<String> asyncResult5 =\n executor.startProcess(lazyval(\"I am result5\", 6000), callback(\"Callback result 5\"));\n\n // emulate processing in the current thread while async tasks are running in their own threads\n Thread.sleep(3500); // Oh boy I'm working hard here\n log(\"Some hard work done\");\n\n // wait for completion of the tasks\n Integer result1 = executor.endProcess(asyncResult1);\n String result2 = executor.endProcess(asyncResult2);\n Long result3 = executor.endProcess(asyncResult3);\n asyncResult4.await();\n asyncResult5.await();\n\n // log the results of the tasks, callbacks log immediately when complete\n log(\"Result 1: \" + result1);\n log(\"Result 2: \" + result2);\n log(\"Result 3: \" + result3);\n log(\"Result 4: \" + asyncResult4.getValue());\n log(\"Result 5: \" + asyncResult5.getValue());\n }", "@Nonnull \r\n\tpublic static <T> List<List<T>> invokeAll(\r\n\t\t\t@Nonnull final Iterable<? extends Observable<? extends T>> sources,\r\n\t\t\t@Nonnull Scheduler scheduler) throws InterruptedException {\r\n\t\t\r\n\t\tList<List<T>> result = new ArrayList<List<T>>();\r\n\t\tList<Observable<Pair<Integer, T>>> taggedSources = new ArrayList<Observable<Pair<Integer, T>>>();\r\n\t\t\r\n\t\tint idx = 0;\r\n\t\tfor (Observable<? extends T> o : sources) {\r\n\t\t\tfinal int fidx = idx;\r\n\t\t\tObservable<Pair<Integer, T>> tagged = select(o, new Func1<T, Pair<Integer, T>>() { \r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Pair<Integer, T> invoke(T param1) {\r\n\t\t\t\t\treturn Pair.of(fidx, param1);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\ttaggedSources.add(tagged);\r\n\t\t\tresult.add(new ArrayList<T>());\r\n\t\t\tidx++;\r\n\t\t}\r\n\t\t\r\n\t\tObservable<Pair<Integer, T>> merged = merge(taggedSources);\r\n\r\n\t\tCloseableIterator<Pair<Integer, T>> it = toIterable(merged).iterator();\r\n\t\ttry {\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tPair<Integer, T> pair = it.next();\r\n\t\t\t\tresult.get(pair.first).add(pair.second);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn result;\r\n\t}", "@SafeVarargs\n\tstatic <T> EagerFutureStream<T> react(Supplier<T>... values) {\n\t\treturn new EagerReact(ThreadPools.getSequential(),new AsyncRetryExecutor(ThreadPools.getSequentialRetry()),false).react(values);\n\t}", "private void dispatch(List<Request> requests) {\n List<Request> inbox = new ArrayList<>(requests);\n\n // run everything in a single transaction\n dao.tx(tx -> {\n int offset = 0;\n Set<UUID> projectsToSkip = new HashSet<>();\n\n while (true) {\n // fetch the next few ENQUEUED processes from the DB\n List<ProcessQueueEntry> candidates = new ArrayList<>(dao.next(tx, offset, BATCH_SIZE));\n if (candidates.isEmpty() || inbox.isEmpty()) {\n // no potential candidates or no requests left to process\n break;\n }\n\n uniqueProjectsHistogram.update(countUniqueProjects(candidates));\n\n // filter out the candidates that shouldn't be dispatched at the moment\n for (Iterator<ProcessQueueEntry> it = candidates.iterator(); it.hasNext(); ) {\n ProcessQueueEntry e = it.next();\n\n // currently there are no filters applicable to standalone (i.e. without a project) processes\n if (e.projectId() == null) {\n continue;\n }\n\n // see below\n if (projectsToSkip.contains(e.projectId())) {\n it.remove();\n continue;\n }\n\n // TODO sharded locks?\n boolean locked = dao.tryLock(tx);\n if (!locked || !pass(tx, e)) {\n // the candidate didn't pass the filter or can't lock the queue\n // skip to the next candidate (of a different project)\n it.remove();\n }\n\n // only one process per project can be dispatched at the time, currently the filters are not\n // designed to run multiple times per dispatch \"tick\"\n\n // TODO\n // this can be improved if filters accepted a list of candidates and returned a list of\n // those who passed. However, statistically each batch of candidates contains unique project IDs\n // so \"multi-entry\" filters are less effective and just complicate things\n // in the future we might need to consider batching up candidates by project IDs and using sharded\n // locks\n projectsToSkip.add(e.projectId());\n }\n\n List<Match> matches = match(inbox, candidates);\n if (matches.isEmpty()) {\n // no matches, try fetching the next N records\n offset += BATCH_SIZE;\n continue;\n }\n\n for (Match m : matches) {\n ProcessQueueEntry candidate = m.response;\n\n // mark the process as STARTING and send it to the agent\n // TODO ProcessQueueDao#updateStatus should be moved to ProcessManager because it does two things (updates the record and inserts a status history entry)\n queueDao.updateStatus(tx, candidate.key(), ProcessStatus.STARTING);\n\n sendResponse(m);\n\n inbox.remove(m.request);\n }\n }\n });\n }", "private List<RuleDocumentation> collectNativeRules(\n String productName, String provider, List<String> inputDirs, String blackList)\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException,\n BuildEncyclopediaDocException, ClassNotFoundException, IOException {\n ProtoFileBuildEncyclopediaProcessor processor =\n new ProtoFileBuildEncyclopediaProcessor(productName, createRuleClassProvider(provider));\n processor.generateDocumentation(inputDirs, \"\", blackList);\n return processor.getNativeRules();\n }", "String readAll(){\n // All files to write to / read from\n File listIOFresh = new File(FILE_LIST_REG_FRESH); // Only used when there still isn't a current file - template of list for IO\n File listIOCurr = new File(folderName + FILE_LIST_REG_CURR); // The file which the values and list are taken and compare with input from IO\n File listIOTemp = new File(folderName + FILE_LIST_REG_TEMP); // While runtime it will write the values in this file\n File listIOLog = new File(folderName + FILE_LIST_REG_LOG); // Write only the values which are different\n\n BufferedReader IOBr = null;\n BufferedReader fileBr = null;\n BufferedWriter fileBw = null;\n BufferedWriter fileBwLog = null;\n\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n List<String> topicList = new ArrayList<>();\n\n if (!listIOTemp.exists()) {\n try {\n fileBw = new BufferedWriter(new FileWriter(listIOTemp));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n if (!listIOCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(listIOFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(listIOCurr)); // Add exception for only file not found ?\n }\n\n String fileData = fileBr.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread()); // Changed to a global variable for readability\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\"; // Save the current value , which will be compare with the new value\n String topicFullName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0;\n HashMap<String, String> topicMap = new HashMap<>();\n\n // File data start\n while (fileData != null) {\n\n topicList.add(fileData);\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topicName, [1] = topicIndex, [2] = itemName, [3] = itemIndex, [4] = value\n topicFullName = topicDetails[0] + \" \" + topicDetails[1] + \" \" + topicDetails[2] + \" \" + topicDetails[3] ; // Readability\n if (topicDetails.length > 4) { // Bigger than 4 -> there is value at [4]\n topicValue = topicDetails[4]; // Readability , verify only here if it really exist\n topicMap.put(topicFullName,topicValue);\n } else { // No value\n topicMap.put(topicFullName,\"\"); // No value to compare later\n }\n\n // Start futuretask completion service -> Start process to read the SystabReg\n completionService.submit(new SystabReg.CallSystabReg(topicDetails[0], topicDetails[1], topicDetails[2], topicDetails[3])); // [0] = topicName, [1] = topicIndex, [2] = itemName, [3] = itemIndex\n counterRequest++;\n fileData = fileBr.readLine(); // Next line\n }\n // File data end\n\n // Take results from process , as the result are random topics, use the help of listMap(HashMap) to save the topic full name and value to verify with the new value\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = topicName, [1] = topicIndex, [2] = itemName, [3] = itemIndex, [4] = value\n String endResult = endResultArr[0] + \" \" + endResultArr[1] + \" \" + endResultArr[2] + \" \" + endResultArr[3] + \" \" + endResultArr[4];\n\n fileBw.write(endResult);\n fileBw.newLine();\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press)\n if (!topicMap.get(topicFullName).isEmpty() && !endResultArr[4].equalsIgnoreCase(topicValue)) { // If the map in that key is empty -> first search , new value is different than current value\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n String logResult = timeStamp + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n }\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (IOBr != null) try {\n IOBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n if (listIOCurr.exists()) listIOCurr.delete();\n listIOTemp.renameTo(listIOCurr);\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "protected void startConsumerThreads() {\n\n // index the repository\n Map<AttributeFamilyDescriptor, Set<AttributeFamilyDescriptor>> familyToCommitLog;\n familyToCommitLog = indexFamilyToCommitLogs();\n\n log.info(\"Starting consumer threads for familyToCommitLog {}\", familyToCommitLog);\n // execute threads to consume the commit log\n familyToCommitLog.forEach((family, logs) -> {\n for (AttributeFamilyDescriptor commitLogFamily : logs) {\n if (!family.getAccess().isReadonly()) {\n CommitLogReader commitLog = commitLogFamily.getCommitLogReader()\n .orElseThrow(() -> new IllegalStateException(\n \"Failed to find commit-log reader in family \" + commitLogFamily));\n AttributeWriterBase writer = family.getWriter()\n .orElseThrow(() ->\n new IllegalStateException(\n \"Unable to get writer for family \" + family.getName() + \".\"));\n StorageFilter filter = family.getFilter();\n Set<AttributeDescriptor<?>> allowedAttributes =\n new HashSet<>(family.getAttributes());\n final String name = \"consumer-\" + family.getName();\n registerWriterTo(name, commitLog, allowedAttributes, filter,\n writer, retryPolicy);\n log.info(\n \"Started consumer {} consuming from log {} with URI {} into {} \"\n + \"attributes {}\",\n name, commitLog, commitLog.getUri(), writer.getUri(), allowedAttributes);\n } else {\n log.debug(\"Not starting thread for read-only family {}\", family);\n }\n }\n });\n\n // execute transformer threads\n repo.getTransformations().forEach(this::runTransformer);\n }", "public static void main(String[] args) {\n for (String file : args) {\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n String line;\n\n while ((line = br.readLine()) != null) {\n solveSudoku(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static <T> ImmutableList<T> waitForAll(Iterable<ListenableFuture<T>> futures) {\n // Note that all futures are already completed due to the Futures#successfulAsList(), however\n // it means that some futures might fail, and we want to propagate a failure down the line. The\n // reason that we don't use Futures#allAsList() directly is it will fail-fast and will cause the\n // other existing futures to continue running until they fail (e.g. if they depend on the\n // temporary file which gets deleted then it will produce NoFileFound exception).\n try {\n return ImmutableList.copyOf(waitFor(Futures.allAsList(futures)));\n } catch (RuntimeException e) {\n try {\n waitFor(Futures.whenAllComplete(futures).call(() -> null, directExecutor()));\n } catch (RuntimeException ignoredException) {\n // Silently ignored - only report the very first Exception encountered.\n }\n throw e;\n }\n }", "public /* synthetic */ void lambda$run$2(TLRPC$TL_messages_getStickers tLRPC$TL_messages_getStickers, ArrayList arrayList, LongSparseArray longSparseArray, TLObject tLObject, TLRPC$TL_error tLRPC$TL_error) {\n AndroidUtilities.runOnUIThread(new StickerMasksAlert$StickersSearchGridAdapter$1$$ExternalSyntheticLambda0(this, tLRPC$TL_messages_getStickers, tLObject, arrayList, longSparseArray));\n }", "@Test\n public void repairMultipleTables()\n {\n long startTime = System.currentTimeMillis();\n\n TableReference tableReference = new TableReference(\"ks\", \"tb\");\n TableReference tableReference2 = new TableReference(\"ks\", \"tb2\");\n\n createKeyspace(tableReference.getKeyspace(), 3);\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2));\n injectRepairHistory(tableReference2, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(4));\n createTable(tableReference);\n createTable(tableReference2);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS).until(() -> isRepairedSince(tableReference, startTime));\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS).until(() -> isRepairedSince(tableReference2, startTime));\n\n verifyTableRepairedSince(tableReference, startTime);\n verifyTableRepairedSince(tableReference2, startTime);\n verify(myFaultReporter, never()).raise(any(RepairFaultReporter.FaultCode.class), anyMapOf(String.class, Object.class));\n }", "@Test\n void should_call_the_rules_executor_when_multiple_algo_result_contains_products_and_there_are_rules_to_test() {\n when(recStatusParams.getMultipleAlgorithmResult()).thenReturn(multipleAlgorithmResult);\n\n products.add(product1);\n when(multipleAlgorithmResult.getRecProducts()).thenReturn(products);\n\n ruleIds.add(\"1\");\n when(activeBundle.getPlacementFilteringRuleIds()).thenReturn(ruleIds);\n\n when(merchandisingRuleExecutor.getFilteredRecommendations(products, ruleIds, Collections.emptyMap(), recCycleStatus)).\n thenReturn(filteringRulesResult);\n\n filteringRulesHandler.handleTask(recInputParams, recStatusParams, activeBundle);\n\n verify(merchandisingRuleExecutor).getFilteredRecommendations(products, ruleIds, Collections.emptyMap(), recCycleStatus);\n verify(recStatusParams).setFilteringRulesResult(filteringRulesResult);\n }", "@Test\n public void supplierCompletableFutureTest3() throws ExecutionException, InterruptedException {\n CompletableFuture<Void> cf1 = CompletableFuture.supplyAsync(() -> PiCalculator.computePi(400).toString()).thenAccept(s -> {\n this.result = s;\n });\n CompletableFuture<Void> cf2 = CompletableFuture.supplyAsync(() -> PiCalculator.computePi(40).toString()).thenAccept(s -> {\n this.result = s;\n });\n\n CompletableFuture<Void> cfAll = CompletableFuture.allOf(cf1, cf2);\n\n // Wacht tot taak klaar is\n cfAll.get();\n\n Assert.assertThat(result, Matchers.is(\"3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094\"));\n }", "@Override\n\tpublic <R> IssueCapture<R> captureIssues(Supplier<R> supplier) {\n\n\t\t// Run the capture issues\n\t\tthis.mock.captureIssues();\n\t\tfinal R returnValue = supplier.get();\n\n\t\t// Return the issues\n\t\treturn new IssueCapture<R>() {\n\n\t\t\t@Override\n\t\t\tpublic R getReturnValue() {\n\t\t\t\treturn returnValue;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic CompilerIssue[] getCompilerIssues() {\n\t\t\t\treturn MockCompilerIssues.this.capturedIssues;\n\t\t\t}\n\t\t};\n\t}", "public static void main(String args[]) {\n ExecutorService executor = Executors.newFixedThreadPool(5);\n //create a list to hold the Future object associated with Callable\n Map<Integer, Future<String>> map = new HashMap<Integer, Future<String>>();\n //Create MyCallable instance\n for (int i = 0; i < 10; i++) {\n Callable<String> callable = new MyCallable(\"\" + i);\n //submit Callable tasks to be executed by thread pool\n Future<String> future = executor.submit(callable);\n\n //add Future to the list, we can get return value using Future\n map.put(i, future);\n }\n System.out.println(\"Assigned\");\n map.forEach(MyCallable::handleResult);\n// for (Future<String> fut : list) {\n// try {\n// //print the return value of Future, notice the output delay in console\n// // because Future.get() waits for task to get completed\n// System.out.println(new Date() + \"::\" + fut.get());\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// } catch (ExecutionException e) {\n// System.out.println(\"Handled in main thread - Crash\");\n// }\n// }\n System.out.println(\"About to shutdown\");\n //shut down the executor service now\n executor.shutdown();\n System.out.println(\"Shutdown\");\n }", "String readAll(){\n // All files to write to / read from\n File listIOFresh = new File(FILE_LIST_IO_FRESH); // Only used when there still isn't a current file - template of list for IO\n File listIOCurr = new File(folderName + FILE_LIST_IO_CURR); // The file which the values and list are taken and compare with input from IO\n File listIOTemp = new File(folderName + FILE_LIST_IO_TEMP); // While runtime it will write the values in this file\n File listIOLog = new File(folderName + FILE_LIST_IO_LOG); // Write only the values which are different\n\n BufferedReader IOBr = null;\n BufferedReader fileBr = null;\n BufferedWriter fileBw = null;\n BufferedWriter fileBwLog = null;\n\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n\n if (!listIOTemp.exists()) { // TODO - When the program is close - delete listIOTemp\n try {\n fileBw = new BufferedWriter(new FileWriter(listIOTemp));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n if (!listIOCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(listIOFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(listIOCurr)); // Add exception for only file not found ?\n }\n\n String fileData = fileBr.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread());\n\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\";\n String topicName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0;\n HashMap<String, String> topicMap = new HashMap<>();\n\n // File data start\n while (fileData != null) {\n\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topic name , [1] = value\n topicName = topicDetails[0]; // Readability\n if (topicDetails.length > 1) {\n topicValue = topicDetails[1]; // Readability , verify only here if it really exist\n topicMap.put(topicName,topicValue); //\n } else {\n topicMap.put(topicName,\"\"); // No topic value\n }\n\n // Start futuretask completion service -> Start process to read the SystabIO\n completionService.submit(new CallSystabIo(topicName)); // TEST\n counterRequest++;\n fileData = fileBr.readLine(); // Next line\n } // File data end\n\n // Take results from process\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = topic name , [1] = value\n String endResult = endResultArr[0] + \" \" + endResultArr[1];\n\n fileBw.write(endResult);\n fileBw.newLine();\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press)\n if (!topicMap.get(topicName).isEmpty() && !endResultArr[1].equalsIgnoreCase(topicValue)) { // If the map in that key is empty -> first search\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n String logResult = timeStamp + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n }\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (IOBr != null) try {\n IOBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n if (listIOCurr.exists()) listIOCurr.delete();\n listIOTemp.renameTo(listIOCurr);\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "@Nonnull\n public static <T> List<T> runInParallel(\n Iterable<Callable<T>> callables,\n @Nonnegative long timeoutMillis,\n Decorator decorator) throws ExecutionException {\n Preconditions.checkNotNull(callables);\n Preconditions.checkArgument(timeoutMillis >= 0);\n Preconditions.checkNotNull(decorator);\n\n CompletionService<T> completionService = new ExecutorCompletionService<T>(THREAD_POOL);\n long endTimeMillis = DateTimeUtils.currentTimeMillis() + timeoutMillis;\n Set<Future<T>> futures = Sets.newHashSet();\n ImmutableList.Builder<T> resultsBuilder = ImmutableList.builder();\n\n try {\n for (Callable<T> callable : callables) {\n futures.add(completionService.submit(callable));\n }\n while (!futures.isEmpty()) {\n Future<T> future\n = completionService.poll(\n endTimeMillis - DateTimeUtils.currentTimeMillis(),\n TimeUnit.MILLISECONDS);\n if (future == null) {\n // timed out, we're done now.\n break;\n }\n try {\n T singleResult = future.get();\n if (null != singleResult) {\n resultsBuilder.add(singleResult);\n }\n } catch (CancellationException e) {\n // Nothing to do but ignore it.\n } finally {\n futures.remove(future);\n }\n }\n } catch (InterruptedException e) {\n // Reset the interrupt, then fall through to the cleanup code below.\n logger.warning(decorator.apply(\"Timeout in worker thread: \" + e.getMessage()));\n Thread.currentThread().interrupt();\n\n } finally {\n // Cancel any unfinished futures. Don't wait for them to finish; just\n // move on. Requests for new threads will, if necessary, block until they\n // have finished.\n for (Future<T> future : futures) {\n future.cancel(true);\n }\n }\n return resultsBuilder.build();\n }", "@Test\n public void repairMultipleTables()\n {\n long startTime = System.currentTimeMillis();\n\n TableReference tableReference = myTableReferenceFactory.forTable(\"test\", \"table1\");\n TableReference tableReference2 = myTableReferenceFactory.forTable(\"test\", \"table2\");\n\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2));\n injectRepairHistory(tableReference2, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(4));\n\n schedule(tableReference);\n schedule(tableReference2);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS)\n .until(() -> isRepairedSince(tableReference, startTime));\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS)\n .until(() -> isRepairedSince(tableReference2, startTime));\n\n verifyTableRepairedSince(tableReference, startTime);\n verifyTableRepairedSince(tableReference2, startTime);\n verify(mockFaultReporter, never())\n .raise(any(RepairFaultReporter.FaultCode.class), anyMap());\n }", "static <S, F> Function<Result<Result<S, F>, F>, Result<S, F>> mergeFailures() {\n return attempt(i -> i);\n }", "private Set<StructuralMessage> computeMemberViolations(Map<AccessibilityTarget, ArrayList<Accessor>> targetsToAccessors,\n Map<Integer, StructuralRule> accessibilityRulesMap, IClassHierarchy cha) {\n Set<StructuralMessage> messages = new HashSet<StructuralMessage>();\n Iterator<Map.Entry<AccessibilityTarget, ArrayList<Accessor>>> targetsToAccessorsIter = targetsToAccessors.entrySet().iterator();\n while (targetsToAccessorsIter.hasNext()) {\n Map.Entry<AccessibilityTarget, ArrayList<Accessor>> entry = targetsToAccessorsIter.next();\n AccessibilityTarget target = (AccessibilityTarget) entry.getKey();\n\n // Detect if the given target represents a non-private, non-final, static\n // field\n if (target.isField() && target.isStatic() && !target.isFinal()) {\n Location location = Location.createFieldLocation(target.getClassName(), target.getMemberName());\n StructuralRule rule = accessibilityRulesMap.get(FIELD_MAKE_FINAL_ID);\n messages.add(new AccessibilityMessage(rule, location, target));\n }\n\n int currentModifier = target.getCurrentModifier();\n List<Accessor> accessors = (List<Accessor>) entry.getValue();\n if (accessors.isEmpty() && !target.getMemberName().endsWith(\"<clinit>()V\")) {\n Location location = Location.createMethodLocation(target.getClassName(), target.getMemberName());\n StructuralRule rule = null;\n if (target.isField()) {\n rule = accessibilityRulesMap.get(FIELD_UNREFERENCED_ID);\n } else { // target is a method\n if (currentModifier == PUBLIC) {\n rule = accessibilityRulesMap.get(PUBLIC_METHOD_UNREACHABLE_ID);\n } else if (currentModifier == PROTECTED) {\n rule = accessibilityRulesMap.get(PROTECTED_METHOD_UNREACHABLE_ID);\n } else if (currentModifier == DEFAULT) {\n rule = accessibilityRulesMap.get(DEFAULT_METHOD_UNREACHABLE_ID);\n } else {\n rule = accessibilityRulesMap.get(PRIVATE_METHOD_UNREACHABLE_ID);\n }\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n continue;\n }\n\n // Private scope: nothing to do\n if (currentModifier == PRIVATE) {\n target.setSuggestedModifier(PRIVATE);\n continue; // Nothing can be better than private!\n }\n\n int superModifier = target.getSuperModifier();\n if (superModifier == currentModifier) {\n target.setSuggestedModifier(currentModifier);\n continue;\n }\n Iterator<Accessor> accessorsIter = accessors.iterator();\n // Default scope: see if we can make it private\n if (currentModifier == DEFAULT) {\n boolean okToBeDefault = false; // assume that it is not OK for this\n // member to have default scope\n while (accessorsIter.hasNext()) {\n Accessor accessor = accessorsIter.next();\n // If the class to which the target member belongs is not the same as\n // the class of the accessor\n if (!target.getClassLoaderName().equals(accessor.getClassLoaderName())\n || !target.getClassName().equals(accessor.getClassName())\n || !target.getClassLoaderName().equals(accessor.getAccessingClassLoaderName())\n || !target.getClassName().equals(accessor.getAccessingClassName())) {\n okToBeDefault = true;\n target.setSuggestedModifier(DEFAULT);\n break;\n }\n if (!okToBeDefault) {\n target.setSuggestedModifier(PRIVATE);\n Location location;\n StructuralRule rule;\n if (target.isField()) {\n location = Location.createFieldLocation(target.getClassName(), target.getMemberName());\n rule = accessibilityRulesMap.get(DEFAULT_FIELD_PRIVATE_ID);\n } else {\n location = Location.createMethodLocation(target.getClassName(), target.getMemberName());\n rule = accessibilityRulesMap.get(DEFAULT_METHOD_PRIVATE_ID);\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n if (DEBUG)\n System.out.println(target + MAKE_PRIVATE);\n }\n }\n continue;\n }\n\n // Protected scope: see if we can make it default or private\n if (currentModifier == PROTECTED) {\n boolean okNotToBePrivate = false;\n boolean okNotToBeDefault = false;\n while (accessorsIter.hasNext()) {\n Accessor accessor = (Accessor) accessorsIter.next();\n if (!target.getClassLoaderName().equals(accessor.getClassLoaderName())\n || !target.getClassLoaderName().equals(accessor.getAccessingClassLoaderName())) {\n // The protected modifier was appropriate.\n okNotToBePrivate = true;\n okNotToBeDefault = true;\n target.setSuggestedModifier(PROTECTED);\n break;\n }\n if (!target.getClassName().equals(accessor.getClassName())\n || !target.getClassName().equals(accessor.getAccessingClassName())) {\n // The private modifier would have been too restrictive.\n // Either default of protected is appropriate.\n okNotToBePrivate = true;\n }\n if (!target.getPackageName().equals(accessor.getPackageName())\n || !target.getPackageName().equals(accessor.getAccessingPackageName())) {\n okNotToBeDefault = true;\n target.setSuggestedModifier(PROTECTED);\n break;\n }\n }\n if (!okNotToBeDefault) {\n Location location;\n if (target.isField()) {\n location = Location.createFieldLocation(target.getClassName(), target.getMemberName());\n } else {\n location = Location.createMethodLocation(target.getClassName(), target.getMemberName());\n }\n StructuralRule rule;\n if (!okNotToBePrivate && currentModifier > superModifier) {\n target.setSuggestedModifier(PRIVATE);\n if (target.isField()) {\n rule = accessibilityRulesMap.get(PROTECTED_FIELD_PRIVATE_ID);\n } else {\n rule = accessibilityRulesMap.get(PROTECTED_METHOD_PRIVATE_ID);\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n if (DEBUG)\n System.out.println(target + MAKE_PRIVATE);\n } else {\n target.setSuggestedModifier(DEFAULT);\n if (target.isField()) {\n rule = accessibilityRulesMap.get(PROTECTED_FIELD_DEFAULT_ID);\n } else {\n rule = accessibilityRulesMap.get(PROTECTED_METHOD_DEFAULT_ID);\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n if (DEBUG)\n System.out.println(target + MAKE_DEFAULT);\n }\n }\n continue;\n }\n\n // Public scope: see if we can make it protected, default, or private\n if (currentModifier == PUBLIC) {\n boolean okNotToBePrivate = false;\n boolean okNotToBeDefault = false;\n boolean okNotToBeProtected = false;\n while (accessorsIter.hasNext()) {\n Accessor accessor = (Accessor) accessorsIter.next();\n if (!target.getClassLoaderName().equals(accessor.getClassLoaderName())\n || !target.getClassLoaderName().equals(accessor.getAccessingClassLoaderName())) {\n okNotToBePrivate = true;\n okNotToBeDefault = true;\n } else {\n if (!target.getClassName().equals(accessor.getClassName())\n || !target.getClassName().equals(accessor.getAccessingClassName())) {\n okNotToBePrivate = true;\n }\n if (!target.getPackageName().equals(accessor.getPackageName())\n || !target.getPackageName().equals(accessor.getAccessingPackageName())) {\n okNotToBeDefault = true;\n }\n }\n if (!target.getPackageName().equals(accessor.getPackageName())\n && !accessor.getClassName().equals(accessor.getAccessingClassName())) {\n okNotToBeProtected = true;\n target.setSuggestedModifier(PUBLIC);\n break;\n }\n }\n\n if (!okNotToBeProtected && currentModifier > superModifier) {\n Location location;\n if (target.isField()) {\n location = Location.createFieldLocation(target.getClassName(), target.getMemberName());\n } else {\n location = Location.createMethodLocation(target.getClassName(), target.getMemberName());\n }\n if (!okNotToBeDefault) {\n if (!okNotToBePrivate) {\n target.setSuggestedModifier(PRIVATE);\n StructuralRule rule;\n if (target.isField()) {\n rule = accessibilityRulesMap.get(PUBLIC_FIELD_PRIVATE_ID);\n } else {\n rule = accessibilityRulesMap.get(PUBLIC_METHOD_PRIVATE_ID);\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n if (DEBUG)\n System.out.println(target + MAKE_PRIVATE);\n } else {\n target.setSuggestedModifier(DEFAULT);\n StructuralRule rule;\n if (target.isField()) {\n rule = accessibilityRulesMap.get(PUBLIC_FIELD_DEFAULT_ID);\n } else {\n rule = accessibilityRulesMap.get(PUBLIC_METHOD_DEFAULT_ID);\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n if (DEBUG)\n System.out.println(target + MAKE_DEFAULT);\n }\n } else {\n target.setSuggestedModifier(PROTECTED);\n StructuralRule rule;\n if (target.isField()) {\n rule = accessibilityRulesMap.get(PUBLIC_FIELD_PROTECTED_ID);\n } else {\n rule = accessibilityRulesMap.get(PUBLIC_METHOD_PROTECTED_ID);\n }\n messages.add(new AccessibilityMessage(rule, location, target));\n if (DEBUG)\n System.out.println(target + MAKE_PROTECTED);\n }\n }\n }\n }\n\n Iterator<IClass> classesIter = classes.iterator();\n while (classesIter.hasNext()) {\n IClass klass = classesIter.next();\n if (Modifier.isDefault(klass.getModifiers())) {\n continue; // Nothing better to do\n }\n String thisPackageName = AccessibilityMember.computePackageName(klass.getName().toString());\n Iterator<IClass> subclasses = cha.getImmediateSubclasses(klass).iterator();\n boolean okToBePublic = false;\n while (subclasses.hasNext()) {\n IClass subclass = subclasses.next();\n String thatPackageName = AccessibilityMember.computePackageName(subclass.getName().toString());\n if (!thisPackageName.equals(thatPackageName)) {\n okToBePublic = true;\n break; // Nothing to do here\n }\n }\n if (!okToBePublic) {\n Iterator<IField> instanceFields = klass.getDeclaredInstanceFields().iterator();\n while (instanceFields.hasNext()) {\n IField instanceField = (IField) instanceFields.next();\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(instanceField);\n int currentMod = target.getCurrentModifier();\n if (currentMod >= PROTECTED) {\n okToBePublic = true;\n break;\n }\n }\n Iterator<IField> staticFields = klass.getDeclaredStaticFields().iterator();\n while (staticFields.hasNext()) {\n IField staticField = (IField) staticFields.next();\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(staticField);\n int currentMod = target.getCurrentModifier();\n if (currentMod >= PROTECTED) {\n okToBePublic = true;\n break;\n }\n }\n Iterator<IMethod> methods = klass.getDeclaredMethods().iterator();\n while (methods.hasNext()) {\n IMethod method = (IMethod) methods.next();\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(method);\n int currentMod = target.getCurrentModifier();\n if (currentMod >= PROTECTED && !(target.getMemberName().endsWith(\"<init>()V\") && currentMod == PUBLIC)) {\n okToBePublic = true;\n break;\n }\n }\n }\n if (!okToBePublic) {\n Location location = Location.createClassLocation(klass.getName().toString(), -1);\n StructuralRule rule = accessibilityRulesMap.get(PUBLIC_CLASS_DEFAULT_ID);\n messages.add(new StructuralMessage(rule, location));\n }\n }\n return messages;\n }", "@Override\n public String processJournals(List<String> journalUrls) {\n List<String> finalData = new LinkedList<>();\n ExecutorService executorService = Executors.newFixedThreadPool(10);\n// UminExtractJournalMetadata uminExtractJournalMetadata = new UminExtractJournalMetadata();\n for (String journalUrl : journalUrls) {\n// Runnable uminExtractJournalMetadata = new UminExtractJournalMetadata();\n// ((UminExtractJournalMetadata)uminExtractJournalMetadata).setJournalUrl(journalUrl);\n// ((UminExtractJournalMetadata)uminExtractJournalMetadata).setFinalData(finalData);\n// executorService.execute(uminExtractJournalMetadata);\n UminExtractJournalMetadata uminExtractJournalMetadata = new UminExtractJournalMetadata();\n uminExtractJournalMetadata.setJournalUrl(journalUrl);\n uminExtractJournalMetadata.setFinalData(finalData);\n uminExtractJournalMetadata.getJournalMetadata();\n// String contents = uminExtractJournalMetadata.getJournalMetadata();\n// addEmailToQueue(contents);\n//\t\t\tString contents = getJournalMetadata(journalUrl);\n// if (contents.indexOf(\"@\") == -1)\n// continue;\n//\t\t\tSystem.out.println(\"contents: \" + contents);\n// fData = fData + contents;\n }\n executorService.shutdown();\n while (!executorService.isTerminated()){}\n// addEmailToQueue(\"Processing done for: \" + url);\n String fData = String.join(\"\\n\", finalData);\n return fData;\n }", "public static void main(String[] args) throws IOException {\n\t\tSystem.out.println(\"Starting message processing.....\");\n\n\t\tProcessor processor = new Processor();\n\t\tList<FutureTask<String>> futureTasks = processor.buildFutureCallableMessages();\n\t\tExecutorService executor = Executors.newFixedThreadPool(10);\n\n\t\tint i=1;\n\t\tfor (FutureTask<String> futureTask:futureTasks) {\n\t\t\tSystem.out.println(\"Executing \" + i + \" out of \" + futureTasks.size());\n\t\t\texecutor.execute(futureTask);\n\t\t\ti++;\n\t\t}\n\t\tfor (FutureTask<String> futureTask:futureTasks) {\n\t\t\twhile (true) {\n\t\t\t\tif(futureTask.isDone()){\n\t\t\t\t\tSystem.out.println(\"Done\");\n\t\t\t\t\t//shut down executor service\n\t\t\t\t\t//executor.shutdown();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Done message processing \" + futureTasks.size() + \" message\");\n\t\tSystem.exit(0);\n\t\n\t}", "default <U> void forEach(TryFunction<T, U> fn) {\n if (isSuccess()) {\n try {\n fn.apply(get());\n } catch (Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }", "public static <T> void getAllDone(final Iterable<Future<T>> futures, final Collection<T> results) {\n getAllDone(futures.iterator(), results);\n }", "public void setCallbacks(Consumer<String> passedConsumer,\n Consumer<List<PackageConfig>> supportedConsumer, Runnable notifySyncRunnable) {\n synchronized (mLock) {\n if (mPassedConsumer != null || mSupportedConsumer != null\n || mNotifySyncRunnable != null) {\n Slog.wtf(TAG, \"Resetting health check controller callbacks\");\n }\n\n mPassedConsumer = Preconditions.checkNotNull(passedConsumer);\n mSupportedConsumer = Preconditions.checkNotNull(supportedConsumer);\n mNotifySyncRunnable = Preconditions.checkNotNull(notifySyncRunnable);\n }\n }", "public static <T> Call<Collection<T>> ofAll(Collection<Call<T>> rCalls)\n\t{\n\t\tList<ThrowingSupplier<T>> aSuppliers =\n\t\t\trCalls.stream().map(c -> c.fSupplier).collect(toList());\n\n\t\treturn new Call<>(\n\t\t\t() -> aSuppliers.stream().map(f -> f.get()).collect(toList()));\n\t}", "@Override\n protected void run() {\n for (long number : numbers){\n addTask(new FindFactorsTask(new FindFactorsTask.SearchOptions(number)));\n }\n executeTasks();\n\n //Find common factors\n final Set<Long> set = new HashSet<>(((FindFactorsTask) getTasks().get(0)).getFactors());\n for (int i = 1; i < getTasks().size(); ++i){\n set.retainAll(((FindFactorsTask) getTasks().get(i)).getFactors());\n }\n\n //Find largest factor\n gcf = Collections.max(set);\n }", "private Future<List<String>> findMissingSubs(List<String> subPerms, Conn connection) {\n Map<String, Future<Boolean>> futureMap = new HashMap<>();\n List<String> notFoundList = new ArrayList<>();\n for (String permName : subPerms) {\n Future<Boolean> permCheckFuture = checkPermExists(permName, connection);\n futureMap.put(permName, permCheckFuture);\n }\n CompositeFuture compositeFuture = CompositeFuture.all(new ArrayList<>(futureMap.values()));\n return compositeFuture.compose(res -> {\n futureMap.forEach((permName, existsCheckFuture) -> {\n if (Boolean.FALSE.equals(existsCheckFuture.result())) {\n notFoundList.add(permName);\n }\n });\n return Future.succeededFuture(notFoundList);\n });\n }", "public Map lookup( Set lfns, String handle ) {\n Map result = new HashMap();\n\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n Map m = catalog.lookup(lfns, handle);\n\n //merge all the entries in the map into the result\n for (Iterator mit = m.entrySet().iterator(); mit.hasNext(); ) {\n Map.Entry entry = (Map.Entry) mit.next();\n //merge the entries into the main result\n String lfn = (String) entry.getKey(); //the lfn\n if ( result.containsKey( lfn ) ) {\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ( (Set) result.get( lfn )).addAll( (Set) entry.getValue());\n }\n else {\n result.put( lfn, entry.getValue() );\n }\n }\n }\n return result;\n }", "@Nonnull\r\n\tpublic static <T> Observable<List<T>> forkJoin(\r\n\t\t\t@Nonnull final Iterable<? extends Observable<? extends T>> sources) {\r\n\t\treturn new Observable<List<T>>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull final Observer<? super List<T>> observer) {\r\n\t\t\t\tfinal CompositeCloseable closeables = new CompositeCloseable();\r\n\t\t\t\tfinal List<AtomicReference<T>> lastValues = new ArrayList<AtomicReference<T>>();\r\n\t\t\t\tfinal List<Observable<? extends T>> observableList = new ArrayList<Observable<? extends T>>();\r\n\t\t\t\tfinal List<Observer<T>> observers = new ArrayList<Observer<T>>();\r\n\t\t\t\tfinal AtomicInteger wip = new AtomicInteger(observableList.size() + 1);\r\n\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tfor (Observable<? extends T> o : sources) {\r\n\t\t\t\t\tfinal int j = i;\r\n\t\t\t\t\tobservableList.add(o);\r\n\t\t\t\t\tlastValues.add(new AtomicReference<T>());\r\n\t\t\t\t\tobservers.add(new Observer<T>() {\r\n\t\t\t\t\t\t/** The last value. */\r\n\t\t\t\t\t\tT last;\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void error(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\t\tobserver.error(ex);\r\n\t\t\t\t\t\t\tcloseables.closeSilently();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void finish() {\r\n\t\t\t\t\t\t\tlastValues.get(j).set(last);\r\n\t\t\t\t\t\t\trunIfComplete(observer, lastValues, wip);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void next(T value) {\r\n\t\t\t\t\t\t\tlast = value;\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\ti = 0;\r\n\t\t\t\tfor (Observable<? extends T> o : observableList) {\r\n\t\t\t\t\tcloseables.add(Observers.registerSafe(o, observers.get(i)));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\trunIfComplete(observer, lastValues, wip);\r\n\t\t\t\treturn closeables;\r\n\t\t\t}\r\n\t\t\t/**\r\n\t\t\t * Runs the completion sequence once the WIP drops to zero.\r\n\t\t\t * @param observer the observer who will receive the values\r\n\t\t\t * @param lastValues the array of last values\r\n\t\t\t * @param wip the work in progress counter\r\n\t\t\t */\r\n\t\t\tpublic void runIfComplete(\r\n\t\t\t\t\tfinal Observer<? super List<T>> observer,\r\n\t\t\t\t\tfinal List<AtomicReference<T>> lastValues,\r\n\t\t\t\t\tfinal AtomicInteger wip) {\r\n\t\t\t\tif (wip.decrementAndGet() == 0) {\r\n\t\t\t\t\tList<T> values = new ArrayList<T>();\r\n\t\t\t\t\tfor (AtomicReference<T> r : lastValues) {\r\n\t\t\t\t\t\tvalues.add(r.get());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tobserver.next(values);\r\n\t\t\t\t\tobserver.finish();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}", "private int computeErrorStats( CalibAlgo calib, List<CalibCBlock> list, float[] errors )\n {\n int ke = 0; // number of errors\n for ( int c=0; c<errors.length; ++c ) errors[c] = -1;\n\n calib.initErrorStats();\n long group = 0;\n int k = 0;\n int cnt = 0;\n while( k < list.size() && list.get(k).mGroup <= 0 ) ++k;\n \n for ( int j=k; j<list.size(); ++j ) {\n if ( list.get(j).mGroup > 0 ) {\n if ( list.get(j).mGroup != group ) {\n if ( cnt > 0 ) {\n Vector g[] = new Vector[cnt];\n Vector m[] = new Vector[cnt];\n float e[] = new float[cnt];\n int i=0;\n for ( ; k<j; ++k ) {\n CalibCBlock b = list.get(k);\n if ( b.mGroup == group ) {\n g[i] = new Vector( b.gx, b.gy, b.gz );\n m[i] = new Vector( b.mx, b.my, b.mz );\n e[i] = -1;\n ++i;\n }\n }\n calib.addStatErrors( g, m, e );\n for ( int c=0; c<cnt; ++c ) errors[ ke++ ] = e[c];\n }\n group = list.get(j).mGroup;\n cnt = 1;\n } else { \n cnt ++;\n }\n }\n } \n if ( cnt > 0 ) {\n Vector g[] = new Vector[cnt];\n Vector m[] = new Vector[cnt];\n float e[] = new float[cnt];\n int i=0;\n for ( ; k<list.size(); ++k ) {\n CalibCBlock b = list.get(k);\n if ( b.mGroup == group ) {\n g[i] = new Vector( b.gx, b.gy, b.gz );\n m[i] = new Vector( b.mx, b.my, b.mz );\n e[i] = -1;\n ++i;\n }\n }\n calib.addStatErrors( g, m, e );\n for ( int c=0; c<cnt; ++c ) errors[ ke++ ] = e[c];\n }\n return ke;\n }", "private static Iterable<String> calcClosure(List<String> classes) {\n Set<String> ret = new HashSet<String>();\n\n List<String> newClasses = new ArrayList<String>();\n for (String cName : classes) {\n newClasses.add(cName);\n ret.add(cName);\n }\n\n boolean updating = true;\n while (updating) {\n updating = false;\n classes = newClasses;\n newClasses = new ArrayList<String>();\n for (String cName : classes) {\n Set<String> nC = new HashSet<String>();\n Analysis as = new Analysis() {\n @Override\n public ClassVisitor getClassVisitor() {\n return new ReachingClassAnalysis(Opcodes.ASM5, null, nC);\n }\n };\n\n try {\n as.analyze(cName);\n } catch (IOException ex) {\n System.err.println(\"WARNING: IOError handling: \" + cName);\n System.err.println(ex);\n }\n\n for (String cn : nC) {\n if (!ret.contains(cn) &&\n !cn.startsWith(\"[\")) {\n ret.add(cn);\n newClasses.add(cn);\n updating = true;\n }\n }\n }\n }\n\n System.err.println(\"Identified \" + ret.size() +\n \" potentially reachable classes\");\n\n return ret;\n }", "@Scheduled(fixedDelay = 1000)\n public void syncGithubIssues() throws Throwable {\n for (var repo : githubRepoService.findAll()) {\n var jsonState =\n jsonStateStore.load(\n buildSyncStateKey(repo.getOwner(), repo.getRepo()), SyncIssueState.class);\n if (jsonState.getData() != null) {\n this.syncGithubIssue(jsonState);\n return;\n }\n }\n }", "List<FeatureUpdate> dispatchFeatureUpdates(@NonNull List<FeatureUpdate> featureUpdates) {\n for (FeatureUpdate featureUpdate : featureUpdates) {\n dispatchFeatureUpdate(featureUpdate);\n }\n return featureUpdates;\n }", "String readAll(String pressNum){\n // All files to write to / read from\n File listIOLog = new File(folderName + FILE_LIST_IO_LOG); // Write only the values which are different\n File listTodo = new File(folderName + \"Todosteps.txt\"); // This file have all the steps that are needed\n\n\n BufferedReader fileBr = null;\n BufferedReader fileTodoBw = null;\n BufferedWriter fileBw = null; // Temp to used in many places\n BufferedWriter fileBwLog = null;\n\n\n StringBuilder resultUser = new StringBuilder(); // Append the end result to later return it to controller and show to the user\n\n if (!reading) { // TODO - When the program is close - delete listIOTemp\n reading = true; // Started to read the files\n try {\n fileTodoBw = new BufferedReader(new FileReader(listTodo));\n fileBwLog = new BufferedWriter(new FileWriter(listIOLog, true));\n /* if (!listIOCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(listIOFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(listIOCurr)); // Add exception for only file not found ?\n }*/\n\n// String fileData = fileBr.readLine(); // Start reading\n String fileTodo = fileTodoBw.readLine(); // Start reading\n\n ExecutorService executor = Executors.newFixedThreadPool(util.getNumThread());\n\n CompletionService<String> completionService = new ExecutorCompletionService<>(executor); // Initialize the completion service\n\n String topicValue = \"\";\n String topicName = \"\";\n StringBuilder results = new StringBuilder();\n int counterRequest = 0; // Counter to know how many completion service where open\n Map<String, String> topicMap = new HashMap<>();\n List<String> todoList = new ArrayList<>();\n List<String> stepList = new ArrayList<>(); // Save all the steps (Step1, Step2 ...)\n\n // File read all todo list and save in an arraylist\n while (fileTodo != null) { // TODO - Add check if the number isn't missing\" (1,2,3,[missing],5 ..)\n\n todoList.add(fileTodo);\n fileTodo = fileTodoBw.readLine(); // Next line\n } // File read end\n\n // Save in a list all the steps of IO\n for(String steps : todoList){ // Maybe write a method in util/interface as it will be needed for Reg\n String[] stepName = steps.trim().split(\" \"); // [0] = step number , [1] = step title\n\n stepList.add(stepName[0].trim());\n }\n\n\n for(String step : stepList){\n\n String stepFile =\"StepIO\\\\\" + step + \"IO.text\"; // Check if it create the folder if doesn't exist\n\n File stepFileCurr = new File(pressNum + \"StepIO\\\\Curr\" + step + \"IO.text\"); // FolderName\\SystabIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n File stepFileFresh = new File(pressNum + stepFile); // FolderName\\SystabIO\\StepxIO.txt - File without value , only the name of the systabIO\n\n\n if (!stepFileCurr.exists()) { // Change file if the current still doesn't exist\n fileBr = new BufferedReader(new FileReader(stepFileFresh)); // Maybe better way ?\n } else {\n fileBr = new BufferedReader(new FileReader(stepFileCurr)); // Add exception for only file not found ?\n }\n// String[] stepName = step.trim().split(\" \"); // [0] = step number , [1] = step name\n String fileData = fileBr.readLine(); // Start reading\n\n while (fileData != null) {\n\n String[] topicDetails = fileData.trim().split(\" \"); // [0] = topic name , [1] = value\n topicName = topicDetails[0]; // Readability\n if (topicDetails.length > 1) { // -> there is a value\n topicValue = topicDetails[1]; // Readability , verify only here if it really exist\n topicMap.put(topicName,topicValue); // Save the topic name and value as my temp\n } else {\n topicMap.put(topicName,\"\"); // No topic value\n }\n\n // Start futuretask completion service -> Start process to read the SystabIO\n completionService.submit(new SystabIO.CallSystabReg(topicName, step)); // TEST\n counterRequest++;\n fileData = fileBr.readLine(); // Next line\n } // No more topics to read from , continue to the next step\n\n stepFileCurr.delete(); // Delete it as all the data was read and saved , for later create a new current file with the new values\n }\n\n\n // Take results from process\n for(int i = 0 ; i < counterRequest ; i++){ // Loop through the results -> counterRequests have the number of how many request were submit to completion service\n try {\n Future<String> resultFuture = completionService.take(); // Wait for one completed task\n results.append(resultFuture.get()); // Get a completed task , results = topicName + new Value\n\n String [] endResultArr = results.toString().trim().split(\" \"); // [0] = step number . [1] = topic name , [2] = value\n String endResult = endResultArr[1] + \" \" + endResultArr[2];\n\n\n // Writes data into IOLog file - only those which aren't equal to the value of inputIO(from press)\n if (!endResultArr[2].equals(topicMap.get(endResultArr[1]))){ // Check if the new value and old value are equal , not equal -> show to user and save in log\n String timeStamp = new SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(new Date());\n\n // TODO - Change the values to On / Off\n String logResult = timeStamp + \" \" + endResultArr[0] + \" \" + endResult; // The result which the log file will save & the one which will show the user\n\n resultUser.append(logResult).append(\"\\n\"); // Append the log result to later show to the user\n\n fileBwLog.write(logResult);\n fileBwLog.newLine();\n }\n\n // Create the new current file with new values\n File stepFileCurr = new File(pressNum + \"StepIO\\\\Curr\" + endResultArr[0] + \"IO.text\"); // FolderName\\SystabIO\\CurrStepxIO.txt - File with value of current moment & name of systabIO\n\n fileBw = new BufferedWriter(new FileWriter(stepFileCurr));\n fileBw.write(endResult);\n fileBw.newLine();\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n return \"CompletionService of SystabIO process Exception\";\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Process IO Error\");\n return \"Read error IO\" + \"\\n\"; // Don't change , this return stops the flow !\n\n } finally { // Maybe something better later on ?\n reading = false; // Finish to read all\n if (fileBw != null) try {\n fileBw.close(); // Close to finish the stream and write everything\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBr != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileTodoBw != null) try {\n fileBr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (fileBwLog != null) try {\n fileBwLog.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return resultUser.toString();\n }\n return \"No File\";\n }", "public float[] compute(float[] values) throws Exception {\r\n input(values);\r\n return compute();\r\n }", "public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }", "@Override\n\t\tprotected void fixReferences(List<EObject> objects) {\n\t\t\tfor (EObject next : objects) {\n\t\t\t\tif (fixReferences(next)) {\n\t\t\t\t\tfixReferences(getContentsToMerge(next, Phase.FIX));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void \n\tprocessPieceChecks() \n\t{\n\t\tif ( piece_check_result_list.size() > 0 ){\n\n\t\t\tfinal List pieces;\n\n\t\t\t// process complete piece results\n\n\t\t\ttry{\n\t\t\t\tpiece_check_result_list_mon.enter();\n\n\t\t\t\tpieces = new ArrayList( piece_check_result_list );\n\n\t\t\t\tpiece_check_result_list.clear();\n\n\t\t\t}finally{\n\n\t\t\t\tpiece_check_result_list_mon.exit();\n\t\t\t}\n\n\t\t\tfinal Iterator it = pieces.iterator();\n\n\t\t\twhile (it.hasNext()) {\n\n\t\t\t\tfinal Object[]\tdata = (Object[])it.next();\n\n\t\t\t\tprocessPieceCheckResult((DiskManagerCheckRequest)data[0],((Integer)data[1]).intValue());\n\n\t\t\t}\n\t\t}\n\t}", "public void resolveExternalDependencies(List<Antfile> antfiles)\n {\n List<Dependency> unresolvedDependencies = getUnresolvedDependencies();\n\n for (Dependency unresolvedDependency : unresolvedDependencies)\n {\n boolean found = false;\n String unresolvedDependencyName = unresolvedDependency.getName();\n\n for (Antfile antfile : antfiles)\n {\n if (!antfile.getBuildFile().equals(buildFile))\n {\n List<Target> targets = getAllTargets(antfile);\n\n for (Target target : targets)\n {\n String targetName = target.getName();\n String qualifiedTargetname = antfile.getProjectName() + \".\" + targetName;\n\n if (unresolvedDependencyName.equals(targetName) || unresolvedDependencyName.equals(qualifiedTargetname))\n {\n unresolvedDependency.setResolved(true);\n unresolvedDependency.setBuildFile(antfile);\n found = true;\n\n break;\n }\n\n if (found)\n {\n break;\n }\n }\n }\n }\n } // end for\n }", "static <S, F> ConsumableFunction<Result<S, F>> onSuccessDo(Consumer<S> consumer) {\n return r -> r.then(onSuccess(peek(consumer)));\n }", "private static void notifyListeners0(Future<?> future, DefaultFutureListeners listeners)\r\n/* 518: */ {\r\n/* 519:599 */ GenericFutureListener<?>[] a = listeners.listeners();\r\n/* 520:600 */ int size = listeners.size();\r\n/* 521:601 */ for (int i = 0; i < size; i++) {\r\n/* 522:602 */ notifyListener0(future, a[i]);\r\n/* 523: */ }\r\n/* 524: */ }", "public Row resolve(Collection<Message> responses) throws DigestMismatchException, IOException\n {\n long startTime = System.currentTimeMillis();\n\t\tList<ColumnFamily> versions = new ArrayList<ColumnFamily>();\n\t\tList<InetAddress> endPoints = new ArrayList<InetAddress>();\n\t\tDecoratedKey key = null;\n\t\tbyte[] digest = new byte[0];\n\t\tboolean isDigestQuery = false;\n \n /*\n\t\t * Populate the list of rows from each of the messages\n\t\t * Check to see if there is a digest query. If a digest \n * query exists then we need to compare the digest with \n * the digest of the data that is received.\n */\n\t\tfor (Message response : responses)\n\t\t{\t\t\t\t\t \n byte[] body = response.getMessageBody();\n ByteArrayInputStream bufIn = new ByteArrayInputStream(body);\n ReadResponse result = ReadResponse.serializer().deserialize(new DataInputStream(bufIn));\n if (result.isDigestQuery())\n {\n digest = result.digest();\n isDigestQuery = true;\n }\n else\n {\n versions.add(result.row().cf);\n endPoints.add(response.getFrom());\n key = result.row().key;\n }\n }\n\t\t// If there was a digest query compare it with all the data digests \n\t\t// If there is a mismatch then throw an exception so that read repair can happen.\n if (isDigestQuery)\n {\n for (ColumnFamily cf : versions)\n {\n if (!Arrays.equals(ColumnFamily.digest(cf), digest))\n {\n /* Wrap the key as the context in this exception */\n String s = String.format(\"Mismatch for key %s (%s vs %s)\", key, FBUtilities.bytesToHex(ColumnFamily.digest(cf)), FBUtilities.bytesToHex(digest));\n throw new DigestMismatchException(s);\n }\n }\n }\n\n ColumnFamily resolved = resolveSuperset(versions);\n maybeScheduleRepairs(resolved, table, key, versions, endPoints);\n\n if (logger_.isDebugEnabled())\n logger_.debug(\"resolve: \" + (System.currentTimeMillis() - startTime) + \" ms.\");\n\t\treturn new Row(key, resolved);\n\t}", "private void resolve(String[] sourceCompilationUnits, String[] encodings, String[] bindingKeys, FileASTRequestor astRequestor, int apiLevel, Map compilerOptions, int flags) {\n astRequestor.compilationUnitResolver = this;\n this.bindingTables = new DefaultBindingResolver.BindingTables();\n CompilationUnitDeclaration unit = null;\n try {\n int length = sourceCompilationUnits.length;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits = new org.eclipse.jdt.internal.compiler.env.ICompilationUnit[length];\n int count = 0;\n for (int i = 0; i < length; i++) {\n char[] contents = null;\n String encoding = encodings != null ? encodings[i] : null;\n String sourceUnitPath = sourceCompilationUnits[i];\n try {\n contents = Util.getFileCharContent(new File(sourceUnitPath), encoding);\n } catch (IOException e) {\n continue;\n }\n if (contents == null) {\n // go to the next unit\n continue;\n }\n sourceUnits[count++] = new org.eclipse.jdt.internal.compiler.batch.CompilationUnit(contents, sourceUnitPath, encoding);\n }\n beginToCompile(sourceUnits, bindingKeys);\n // process all units (some more could be injected in the loop by the lookup environment)\n for (int i = 0; i < this.totalUnits; i++) {\n if (resolvedRequestedSourcesAndKeys(i)) {\n // cleanup remaining units\n for (; i < this.totalUnits; i++) {\n this.unitsToProcess[i].cleanUp();\n this.unitsToProcess[i] = null;\n }\n break;\n }\n unit = this.unitsToProcess[i];\n try {\n // this.process(...) is optimized to not process already known units\n super.process(unit, i);\n // requested AST\n char[] fileName = unit.compilationResult.getFileName();\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit source = (org.eclipse.jdt.internal.compiler.env.ICompilationUnit) this.requestedSources.get(fileName);\n if (source != null) {\n // convert AST\n CompilationResult compilationResult = unit.compilationResult;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;\n char[] contents = sourceUnit.getContents();\n AST ast = AST.newAST(apiLevel);\n ast.setFlag(flags | AST.RESOLVED_BINDINGS);\n ast.setDefaultNodeFlag(ASTNode.ORIGINAL);\n ASTConverter converter = new ASTConverter(/*need to resolve bindings*/\n compilerOptions, true, this.monitor);\n BindingResolver resolver = new DefaultBindingResolver(unit.scope, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);\n ast.setBindingResolver(resolver);\n converter.setAST(ast);\n CompilationUnit compilationUnit = converter.convert(unit, contents);\n compilationUnit.setTypeRoot(null);\n compilationUnit.setLineEndTable(compilationResult.getLineSeparatorPositions());\n ast.setDefaultNodeFlag(0);\n ast.setOriginalModificationCount(ast.modificationCount());\n // pass it to requestor\n astRequestor.acceptAST(new String(source.getFileName()), compilationUnit);\n worked(1);\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedSources.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n // requested binding\n Object key = this.requestedKeys.get(fileName);\n if (key != null) {\n if (key instanceof BindingKeyResolver) {\n reportBinding(key, astRequestor, unit);\n worked(1);\n } else if (key instanceof ArrayList) {\n Iterator iterator = ((ArrayList) key).iterator();\n while (iterator.hasNext()) {\n reportBinding(iterator.next(), astRequestor, unit);\n worked(1);\n }\n }\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedKeys.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n } finally {\n // cleanup compilation unit result\n unit.cleanUp();\n }\n // release reference to processed unit declaration\n this.unitsToProcess[i] = null;\n this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());\n }\n // remaining binding keys\n DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);\n Object[] keys = this.requestedKeys.valueTable;\n for (int j = 0, keysLength = keys.length; j < keysLength; j++) {\n BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];\n if (keyResolver == null)\n continue;\n Binding compilerBinding = keyResolver.getCompilerBinding();\n IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding);\n // pass it to requestor\n astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding);\n worked(1);\n }\n } catch (OperationCanceledException e) {\n throw e;\n } catch (AbortCompilation e) {\n this.handleInternalException(e, unit);\n } catch (Error e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } catch (RuntimeException e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } finally {\n // disconnect ourselves from ast requestor\n astRequestor.compilationUnitResolver = null;\n }\n }", "synchronized String resolve(BundleImpl bundle, Iterator pkgs) {\n String res;\n if (Debug.packages) {\n Debug.println(\"resolve: \" + bundle);\n }\n // If we entry with tempResolved set, it means that we already have\n // resolved bundles. Check that it is true!\n if (tempResolved != null) {\n if (!tempResolved.contains(bundle)) {\n framework.listeners.frameworkError(bundle,\n new Exception(\"resolve: InternalError1!\"));\n }\n return null;\n }\n\n tempResolved = new HashSet();\n BundleImpl sb = checkBundleSingleton(bundle);\n if (sb != null) {\n tempResolved = null;\n return \"Singleton bundle failed to resolve because \" + sb + \" is already resolved\";\n }\n\n tempProvider = new HashMap();\n tempRequired = new HashMap();\n tempBlackList = new HashSet();\n tempResolved.add(bundle);\n String br = checkRequireBundle(bundle);\n if (br == null) {\n List failed = resolvePackages(pkgs);\n if (failed.size() == 0) {\n registerNewProviders(bundle);\n res = null;\n } else {\n StringBuffer r = new StringBuffer(\"missing package(s) or can not resolve all of the them: \");\n Iterator mi = failed.iterator();\n r.append(((ImportPkg)mi.next()).pkgString());\n while (mi.hasNext()) {\n r.append(\", \");\n r.append(((ImportPkg)mi.next()).pkgString());\n }\n res = r.toString();\n }\n } else {\n res = \"Failed to resolve required bundle or host: \" + br;\n } \n tempResolved = null;\n tempProvider = null;\n tempRequired = null;\n tempBlackList = null;\n if (Debug.packages) {\n Debug.println(\"resolve: Done for \" + bundle);\n }\n return res;\n }", "private void handleEntries(List<SyndEntry> entries, FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) throws IOException, InterruptedException, ExecutionException {\n\t\tSet<FeedItem> newItems = new HashSet<>();\n\t\tfor (SyndEntry entry : entries)\n\t\t\tnewItems.add(new FeedItem(this, entry));\n\n\t\t//Find outdated items\n\t\tfor (FeedItem oldItem : new HashSet<>(items))\n\t\t\tif (!newItems.contains(oldItem) && oldItem.getLastSeen() != null && oldItem.getLastSeen().before(cacheExpiryDate)) {\n\t\t\t\t//Item expired\n\t\t\t\titems.remove(oldItem);\n\t\t\t} else if (newItems.contains(oldItem)) {\n\t\t\t\tfor (FeedItem newItem : newItems)\n\t\t\t\t\tif (newItem.equals(oldItem))\n\t\t\t\t\t\tnewItem.setState(oldItem.getState());//Transfer state to new item\n\t\t\t\tif (oldItem.getState() != FeedItem.State.SENT_PDF)\n\t\t\t\t\titems.remove(oldItem);//Replace with new item to resend pdf\n\t\t\t\telse\n\t\t\t\t\toldItem.updateLastSeen();\n\t\t\t}\n\n\t\t// Ignore already existing items\n\t\tnewItems.removeAll(items);\n\n\t\t//Add new items\n\t\titems.addAll(newItems);\n\n\t\tList<Future<?>> futures = new ArrayList<>();\n\t\tfor (FeedItem item : newItems) {\n\t\t\tFuture<?> future = executor.submit(new Runnable() {\n\t\t\t\tprivate FeedItemHandler handler;\n\t\t\t\tprivate Feed feed;\n\t\t\t\tprivate FeedItem item;\n\n\t\t\t\tpublic Runnable setParameters(FeedItemHandler handler, Feed feed, FeedItem item) {\n\t\t\t\t\tthis.handler = handler;\n\t\t\t\t\tthis.feed = feed;\n\t\t\t\t\tthis.item = item;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandler.handle(feed, item);\n\t\t\t\t\t} catch (RuntimeException ex) {\n\t\t\t\t\t\tlog.error(MessageFormat.format(messages.getString(\"ERROR_HANDLING_FEED_ITEM\"), new Object[]{item}), ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.setParameters(handler, this, item));\n\t\t\tfutures.add(future);\n\t\t}\n\t\tfor (Future future : futures)\n\t\t\tfuture.get();\n\t}", "public static <T> ImmutableList<T> waitForAll(Iterable<ListenableFuture<T>> futures) {\n try {\n return ImmutableList.copyOf(Futures.allAsList(futures).get());\n } catch (InterruptedException | ExecutionException e) {\n throw new CommandExecutionException(\"A concurrent operation failed.\", e);\n }\n }", "public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {\n\n\n addCodeCheckAPI(project);\n\n //Create a second thread for the CodeCheck fix\n CallFixThread cf = new CallFixThread();\n try {\n\n //get the argument\n PsiExpression arg = (PsiExpression) descriptor.getPsiElement();\n //get the current instance of IntelliJ and create a \"factory\" to generate better code\n PsiElementFactory factory = JavaPsiFacade.getInstance(project).getElementFactory();\n\n\n //create a safer call to CodeCheck.validator\n PsiMethodCallExpression safeCall =\n (PsiMethodCallExpression) factory.createExpressionFromText(\n \"CodeCheck.validator.getValidInputString(a)\", null);\n //replace our code with our safer call\n safeCall.getArgumentList().getExpressions()[0].replace(arg);\n arg.replace(safeCall);\n\n } catch (IncorrectOperationException e) {\n LOG.error(e);\n\n }\n\n\n\n\n\n\n\n\n }", "private void updateFringeAndConflicts(List<String> changed) {\n //update fringe\n for (Clause ci : fringe) {\n for (CLiteral l : ci.getCLiterals()) {\n if (changed.contains(l.getName())) {\n ci.updateClause(labels);\n if ( ci.numOfNegative>0)\n // else if (c.numUnknownLiterals==0 && c.numOfNegative==c.numUnknownLiterals)\n if (!conflicts.contains(ci)) {\n if (conflicts.size()+1<=maxConflicts)\n conflicts.add(ci);\n\n break;\n }\n }\n }\n }\n\n // check rest of clauses which not in fringe or conflicts.\n for (Clause c : clauses) {\n if (!fringe.contains(c) && !conflicts.contains(c)) {\n for (CLiteral l : c.getCLiterals()) {\n if (changed.contains(l.getName())) {\n c.updateClause(labels);\n\n if (c.getNumUnknownLiterals() == 1 && c.getNumOfNegative() == c.getNumOfLiterals() - c.getNumUnknownLiterals()) {\n fringe.push(c);\n break;\n } else if (c.numOfNegative >0) {\n // else if (c.numUnknownLiterals==0 && c.numOfNegative==c.numUnknownLiterals)\n if (!conflicts.contains(c)) {\n if (conflicts.size()+1<=maxConflicts)\n conflicts.add(c);\n\n break;\n }\n }\n }\n }\n }\n }\n }", "void submitBugReport(BugReport bugReport, AsyncCallback<Void> callback);", "private static List<Pair> runErrorMapReduce(String[] passengerData) {\n\n logger.debug(\"Mapping errors\");\n Mapper errorMapper = new ErrorMapper();\n List<Pair> mappedErrors = errorMapper.execute(passengerData);\n\n logger.debug(\"Shuffling errors\");\n Shuffler errorShuffler = new Shuffler();\n List<Pair<String, List>> shuffledErrors = errorShuffler.execute(mappedErrors);\n\n logger.debug(\"Reducing errors\");\n Reducer errorReducer = new ErrorReducer();\n return errorReducer.execute(shuffledErrors);\n }", "public static void main(String[] args) {\n ArrayList<Double> myList = new ArrayList<>();\n\n myList.add(7.0);\n myList.add(18.0);\n myList.add(10.0);\n myList.add(24.0);\n myList.add(17.0);\n myList.add(5.0);\n\n double productOfSqrRoots = myList.parallelStream().reduce(\n 1.0,\n (a, b) -> a * Math.sqrt(b),\n (a, b) -> a * b\n );\n\n System.out.println(\"Product of square roots: \" + productOfSqrRoots);\n\n\n // This won't work. !! VERY HARD TO UNDERSTAND !!\n // In this version of reduce(), ACCUMULATOR and COMBINER function are one and the same.\n // This results in an error because when TWO PARTIAL RESULTS ARE COMBINED, THEIR SQUARE\n // ROOTS ARE MULTIPLIED TOGETHER RATHER THAN THE PARTIAL RESULTS, themselves.\n double productOfSqrRoots2 = myList.parallelStream().reduce(\n 1.0,\n (a, b) -> a * Math.sqrt(b)\n );\n\n System.out.println(productOfSqrRoots2);\n }", "default List<String> assignedConcepts(int topK, List<Source> sources, Set<String> relevantSet){\n\n final ExecutorService service = newExecutorService(sources.size());\n final WordCounter counter = new WordCounter();\n\n for(Source each : sources){\n service.execute(() -> counter.addAll(assignedConcepts(each, relevantSet)));\n }\n\n // shuts down the executor service\n shutdownExecutorService(service);\n\n return counter.mostFrequent(topK);\n\n }", "public List<RuleFailure> check(FoundFiles filesToCheck) {\n List<RuleFailure> failures = new LinkedList<>();\n\n AtomicInteger count = new AtomicInteger();\n\n filesToCheck.fileRequests()\n .stream()\n .filter(this::include)\n .forEach(fr -> {\n count.incrementAndGet();\n processFile(fr, failures);\n });\n\n if (failures.size() == 0) {\n Log.info(\"Inclusive naming processed \" + count.get() + \" files.\");\n } else {\n Log.info(\"Inclusive naming processed \" + count.get() + \" files, found \" + failures.size() + \" errors\");\n }\n return failures;\n }", "public Map lookup(Set lfns) {\n //Map indexed by lrc url and each value a collection\n //of lfns that the RLI says are present in it.\n Map lrc2lfn = this.getLRC2LFNS(lfns);\n\n if(lrc2lfn == null){\n //probably RLI is not connected!!\n return null;\n }\n\n // now query the LRCs with the LFNs that they are responsible for\n // and aggregate stuff.\n String key = null;\n Map result = new HashMap(lfns.size());\n String message;\n for(Iterator it = lrc2lfn.entrySet().iterator();it.hasNext();){\n Map.Entry entry = (Map.Entry)it.next();\n key = (String)entry.getKey();\n message = \"Querying LRC \" + key;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,key);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + key,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n\n //query the lrc\n try{\n Map m = lrc.lookup((Set)entry.getValue());\n\n //figure out if we need to restrict our queries or not.\n //restrict means only include results if they have a site\n //handle associated\n boolean restrict = ( this.determineQueryType(key) == this.LRC_QUERY_RESTRICT );\n\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n entry = (Map.Entry)mit.next();\n List pfns = (( List )entry.getValue());\n if ( restrict ){\n //traverse through all the PFN's and check for resource handle\n for ( Iterator pfnIterator = pfns.iterator(); pfnIterator.hasNext(); ){\n ReplicaCatalogEntry pfn = (ReplicaCatalogEntry) pfnIterator.next();\n if ( pfn.getResourceHandle() == null ){\n //do not include in the results if the entry does not have\n //a pool attribute associated with it.\n mLogger.log(\"Ignoring entry \" + entry.getValue() +\n \" from LRC \" + key,\n LogManager.DEBUG_MESSAGE_LEVEL);\n pfnIterator.remove();\n }\n }\n\n }\n\n //if pfns are empty which could be due to\n //restriction case taking away all pfns\n //do not merge in result\n if( pfns.isEmpty() ){ continue; }\n\n //merge the entries into the main result\n key = (String)entry.getKey(); //the lfn\n if( result.containsKey(key) ){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((List)result.get(key)).addAll( pfns );\n }\n else{\n result.put( key, pfns );\n }\n }\n }\n catch(Exception ex){\n mLogger.log(\"lookup(Set)\",ex,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n //disconnect\n lrc.close();\n }\n\n\n mLogger.log( message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n return result;\n }", "FunDef resolve(\n Exp[] args,\n Validator validator,\n List<Conversion> conversions);", "Object process(Collection<File> listOfFilesToProcess, File tempDir)\r\n\t\t\tthrows CheckerException;", "private List<Intent> handleSubscribeFailure (ContentResolver contentResolver, ArrayList<String> requestIds,\n MediatorTuple mediatorTuple) {\n List<Intent> intentsToBroadcast = new ArrayList<Intent>();\n String consumer = mediatorTuple.getConsumer();\n\n if (requestIds.size() > 1) {\n //Other subscribe requests are pending. Only remove this entry.\n mediatorTuple.removeSubscribeRequestId(mResponseId);\n MediatorHelper.updateTuple(contentResolver, mediatorTuple);\n } else {\n //Subscribe failed. Remove entry from the database\n MediatorHelper.deleteFromMediatorDatabase(contentResolver, consumer, mPublisher, mConfig);\n }\n intentsToBroadcast.add(MediatorHelper.createCommandResponseIntent(consumer, mConfig,\n mResponseId, SUBSCRIBE_RESPONSE_EVENT, mPublisher, mStatus, mState, null));\n return intentsToBroadcast;\n }", "private void usersFetched(final List<User> users, final Project project) {\n FetchGroupsTask fetchGroupsTask = new FetchGroupsTask(project, Context.user, groups -> groupsFetched(users, groups, project));\n fetchGroupsTask.queue();\n }", "protected void fillMissingValues() {\r\n\t\tArrayList<Thread> fillDateThreads = new ArrayList<Thread>();\r\n\t\tfillDateValuesJob fillDateJob;\r\n\t\tThread currentThreadToAdd;\r\n\t\tfor (String date : datesValuesMap.keySet())\r\n\t\t{\r\n\t\t\tHashMap<String, SupplyValue> dateValue = datesValuesMap.get(date);\r\n\t\t\tfillDateJob = new fillDateValuesJob(dateValue, zonesTreeRoot);\r\n\t\t\tcurrentThreadToAdd = new Thread(fillDateJob);\r\n\t\t\tcurrentThreadToAdd.start();\r\n\t\t\tfillDateThreads.add(currentThreadToAdd);\r\n\t\t}\r\n\t\tfor (Thread fillThread : fillDateThreads)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tfillThread.join(THREAD_TIMEOUT);\r\n\t\t\t} catch (InterruptedException e) {}\r\n\t\t\tif (fillThread.isAlive())\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"one of the fill missing values threads didn't finish in timeout, results may be wrong\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void forEachRemaining(LongConsumer param1LongConsumer) {\n/* 1111 */ if (param1LongConsumer == null)\n/* 1112 */ throw new NullPointerException(); long[] arrayOfLong; int i; int j;\n/* 1113 */ if ((arrayOfLong = this.array).length >= (j = this.fence) && (i = this.index) >= 0 && i < (this.index = j)) {\n/* */ \n/* 1115 */ do { param1LongConsumer.accept(arrayOfLong[i]); } while (++i < j);\n/* */ }\n/* */ }", "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\") // I know what I'm doing - famous last words.\n private static void awaitCompletion(final HashMultimap<UUID, Future<Void>> handles) {\n final Set<Future<Void>> futures;\n synchronized (handles) {\n futures = new HashSet<>(handles.values());\n handles.clear();\n }\n\n for (final Future<Void> future : futures) {\n await(future);\n }\n }", "protected static List<Conflict> solve() {\n\t\tcleaned = false;\n\t\tif (curMIDI != null)\n\t\t\ttry {\n\t\t\t\tSolver greedy = new OOGreedySolver(setOfStrings);\n\t\t\t\tcurMIDI = TrackSplitter.split(curMIDI, setOfStrings.length, bassTrack);\n\t\t\t\tcurMIDI = greedy.solve(curMIDI);\n\t\t\t\tsetOfConflicts = Cleaner.getConflicts(curMIDI, setOfStrings);\n\n\t\t\t\t//serve users valid choices\n\t\t\t\t//receive users choice\n\t\t\t\t//call appropriate method\n\n\t\t\t\t// give the simulation the new midi\n\t\t\t\tcurMIDI = Cleaner.prePos(curMIDI, prepositionDelay, setOfStrings, prepositionLength);\n\t\t\t\tif (sim!=null) sim.setSequence(curMIDI);\n\t\t\t\treturn setOfConflicts;\n\t\t\t} catch (InvalidMidiDataException e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private List<Pair<SettableFuture<Object>, Collection<SolrInputDocument>>> getDocs() throws InterruptedException\n {\n List<Pair<SettableFuture<Object>, Collection<SolrInputDocument>>> tasks = new ArrayList<>(batchSize);\n int collectedDocs = 0;\n\n lock.lock();\n try\n {\n //Wait on the queue not being empty for up to 250 milliseconds\n long waitRemaining = TimeUnit.MILLISECONDS.toNanos(250);\n while (waitRemaining > 0 & taskQueue.isEmpty() & keepRunning)\n {\n waitRemaining = queueNotEmpty.awaitNanos(waitRemaining);\n }\n\n //Timed out polling so block on needing more runners\n //Rather then add another loop and indentation return an empty list\n //to restart the loop\n if (waitRemaining <= 0 & keepRunning)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n return tasks;\n }\n\n //Pull stuff out of the queue until there are batchSize docs\n //Tracks # of docs collected as well as the weight impact on the queue\n while (collectedDocs < batchSize & !taskQueue.isEmpty())\n {\n Pair<SettableFuture<Object>, Collection<SolrInputDocument>> p = taskQueue.poll();\n int size = p.right.size();\n collectedDocs += size;\n queueWeight -= size;\n tasks.add(p);\n }\n\n //If we didn't drain the queue, then signal the next waiter on the queue\n if (!taskQueue.isEmpty())\n {\n queueNotEmpty.signal();\n }\n\n //If the queue is no longer full wake up anyone waiting to offer\n if (queueWeight < maxQueueWeight)\n {\n queueNotFull.signal();\n }\n }\n finally\n {\n lock.unlock();\n }\n return tasks;\n }" ]
[ "0.46407783", "0.44948226", "0.44023353", "0.4400814", "0.43839857", "0.43812847", "0.43678", "0.43585902", "0.4355524", "0.4349368", "0.4334714", "0.43129247", "0.43119806", "0.43090692", "0.42636612", "0.426215", "0.4261641", "0.42418832", "0.4239385", "0.42342824", "0.423125", "0.422088", "0.42163664", "0.4163818", "0.41581613", "0.4157175", "0.41508496", "0.41343382", "0.41228035", "0.41072163", "0.41035333", "0.40948668", "0.40938005", "0.40906444", "0.40742093", "0.40347964", "0.40272832", "0.40268102", "0.4023646", "0.40195534", "0.40163925", "0.39963514", "0.39773512", "0.39761627", "0.3972164", "0.39695308", "0.39639643", "0.39616182", "0.3959669", "0.39459172", "0.3945319", "0.39334074", "0.39256358", "0.39233097", "0.39222538", "0.3912393", "0.3906352", "0.39062697", "0.39033082", "0.39020357", "0.38958946", "0.38925943", "0.3892069", "0.38918567", "0.3885709", "0.3883482", "0.3881897", "0.3874731", "0.38662097", "0.38590202", "0.38476795", "0.38440892", "0.3841275", "0.38399398", "0.3839426", "0.38338405", "0.3832716", "0.38316423", "0.38313037", "0.38305375", "0.38295937", "0.3828403", "0.38242707", "0.38240424", "0.38217124", "0.38216206", "0.38214812", "0.38211408", "0.38127065", "0.3804829", "0.38047993", "0.38034618", "0.3799025", "0.37977856", "0.3793424", "0.3788684", "0.37880144", "0.37876877", "0.3787083", "0.3784745" ]
0.7591465
0
Computes the hover text to be displayed at the given location. The given consumer is invoked asynchronously on a different thread.
public void getHover(String file, int offset, HoverConsumer consumer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }", "@Override\n public String getHoverInfo( final ITextViewer textViewer,\n final IRegion hoverRegion ) {\n \t String hoverInfo = computeProblemInfo( textViewer, hoverRegion );\n \t if (hoverInfo != null) {\n \t return hoverInfo;\n \t }\n \t return computeThingAtPoint( textViewer, hoverRegion );\n }", "public abstract SpannableString getText(long presentationTimeUs);", "public void hoverOver(String locator) {\n waitForElement(locator);\n WebElement element = driver.findElement(By.xpath(locator));\n Actions actions = new Actions(driver);\n actions.moveToElement(element).build().perform();\n }", "protected void drawHoveringText( List<String> descriptionLines, int posX, int posY, FontRenderer fontrenderer )\n\t{\n\t\tif( !descriptionLines.isEmpty() )\n\t\t{\n\t\t\tGL11.glDisable( GL_RESCALE_NORMAL );\n\n\t\t\tGL11.glDisable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glDisable( GL11.GL_DEPTH_TEST );\n\n\t\t\tint maxStringLength = 0;\n\n\t\t\tfor( String string : descriptionLines )\n\t\t\t{\n\n\t\t\t\tint stringLen = fontrenderer.getStringWidth( string );\n\n\t\t\t\tif( stringLen > maxStringLength )\n\t\t\t\t{\n\t\t\t\t\tmaxStringLength = stringLen;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint offsetX = posX + 12;\n\n\t\t\tint offsetY = posY - 12;\n\n\t\t\tint tooltipHeight = 8;\n\n\t\t\tif( descriptionLines.size() > 1 )\n\t\t\t{\n\t\t\t\ttooltipHeight += 2 + ( ( descriptionLines.size() - 1 ) * 10 );\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\n\t\t\tint drawColor = 0xF0100010;\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 4, offsetX + maxStringLength + 3, offsetY - 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 4, drawColor,\n\t\t\t\tdrawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 4, offsetY - 3, offsetX - 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 3, offsetY - 3, offsetX + maxStringLength + 4, offsetY + tooltipHeight + 3, drawColor,\n\t\t\t\tdrawColor );\n\n\t\t\tdrawColor = 0x505000FF;\n\t\t\tint fadeColor = ( ( drawColor & 0xFEFEFE ) >> 1 ) | ( drawColor & 0xFF000000 );\n\t\t\tthis.drawGradientRect( offsetX - 3, ( offsetY - 3 ) + 1, ( offsetX - 3 ) + 1, ( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 2, ( offsetY - 3 ) + 1, offsetX + maxStringLength + 3,\n\t\t\t\t( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, ( offsetY - 3 ) + 1, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 2, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, fadeColor,\n\t\t\t\tfadeColor );\n\n\t\t\tfor( int descriptionIndex = 0; descriptionIndex < descriptionLines.size(); descriptionIndex++ )\n\t\t\t{\n\t\t\t\tString s1 = descriptionLines.get( descriptionIndex );\n\t\t\t\tfontrenderer.drawStringWithShadow( s1, offsetX, offsetY, -1 );\n\t\t\t\tif( descriptionIndex == 0 )\n\t\t\t\t{\n\t\t\t\t\toffsetY += 2;\n\t\t\t\t}\n\t\t\t\toffsetY += 10;\n\t\t\t}\n\t\t\tthis.zLevel = 0.0F;\n\n\t\t\tGL11.glEnable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glEnable( GL11.GL_DEPTH_TEST );\n\n\t\t\tGL11.glEnable( GL_RESCALE_NORMAL );\n\t\t}\n\t}", "public interface ConsumerRunnable {\n public void consumer(long offset, String msg);\n}", "private void drawCenteredText(Canvas canvas, PointF loc, Paint paint, String text) {\n float width = paint.measureText(text) / 2;\n canvas.drawText(text, loc.x - width, loc.y, paint);\n }", "public String getLocalizedHoverText(ContentEntity entity, boolean expanded);", "public String call() {\n\t\treturn Thread.currentThread().getName() + \" executing ...\" + count.incrementAndGet(); // Consumer\n\t}", "public static JLabel newHyperlinkLabel(final URI uri, String text) {\n final JLabel label = newLabel(text);\n\n\n Map<TextAttribute, Object> map = new HashMap();\n map.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_ONE_PIXEL);\n final Font def = label.getFont();\n final Font hover = def.deriveFont(map);\n\n label.addMouseListener(\n new MouseAdapter() {\n\n @Override\n public void mouseClicked(MouseEvent e) {\n\n try {\n Desktop.getDesktop().browse(uri);\n } catch (IOException ex) {\n LOGGER.error(\"Could not open browser\");\n }\n }\n\n\n @Override\n public void mouseEntered(MouseEvent e) {\n label.setCursor(new Cursor(Cursor.HAND_CURSOR));\n label.setFont(hover);\n }\n\n\n @Override\n public void mouseExited(MouseEvent e) {\n label.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n label.setFont(def);\n }\n });\n\n return label;\n }", "private void setHoverDisplay(String text, Vector3 coords) {\n\t\tfloat scaleFactor = 1920 / (Gdx.graphics.getWidth() * 1.0f);\n\t\tfloat x = coords.x * scaleFactor + 50;\n\t\tfloat y = coords.y * scaleFactor - 125;\n\t\tx = Math.min(Math.max(x, 0), 1920 - hoverImage.getWidth());\n\t\ty = Math.min(Math.max(y, 200), 1080 - hoverImage.getHeight());\n\t\thoverLabel.setText(text);\n\t\thoverLabel.setPosition(x + 75, y + 155);\n\t\tif (!text.equals(\"\")) {\n\t\t\thoverImage.setVisible(true);\n\t\t\thoverImage.setPosition(x, y);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}", "private void showMessage ( final String str ){\r\n\t\tSwingUtilities.invokeLater(\r\n\t\t\t\tnew Runnable(){\r\n\t\t\t\t\tpublic void run(){\r\n\t\t\t\t\t\tdisplayArea.append(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n );\r\n\t}", "public void hover();", "private String generateHoverover(Tool tool) {\n \n String name = tool.getName();\n String desc = tool.getDescription();\n String image = tool.getIcon();\n \n StringBuilder hoverText = new StringBuilder();\n hoverText.append(\"<html>\");\n hoverText.append(\"<div style='width:200px;background-color:white'>\");\n hoverText.append(\"<h3>\");\n hoverText.append(name);\n hoverText.append(\"</h3>\");\n if (desc != null && !desc.equals(\"\")) {\n hoverText.append(\"<p>\");\n hoverText.append(desc);\n hoverText.append(\"</p>\");\n }\n if (image != null && !image.equals(\"\")) {\n \n FileLoader fileLookup = new FileLoader(1);\n \n try {\n Object[] iconURL = fileLookup.getFileURL(image); \n if (iconURL[1] != null && image.startsWith(\"http\")) {\n hoverText.append(\"<p align='center'><img src='\");\n hoverText.append(image);\n hoverText.append(\"' alt='image'></p>\");\n }\n } catch (Exception ex) {\n // there was a problem finding the image, just don't display it\n }\n } \n \n hoverText.append(\"<br>\");\n hoverText.append(\"</div>\");\n hoverText.append(\"</html>\");\n \n return hoverText.toString();\n\n }", "private Text createText(String text, int offset) {\n\t\tText res = new Text(text);\n\t\tres.setFont(new Font(\"Minecraftia\", 60));\n\t\tres.setFill(Color.YELLOW);\n\t\tres.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\tres.setX(canvas.getWidth() / 2);\n\t\tres.setY(canvas.getHeight() / 2 + offset);\n\t\tres.setId(\"handCursor\");\n\t\tres.setOnMouseEntered(e -> {\n\t\t\tres.setText(\"> \" + res.getText() + \" <\");\n\t\t});\n\t\tres.setOnMouseExited(e -> {\n\t\t\tres.setText(res.getText().replaceAll(\"[<> ]\", \"\"));\n\t\t});\n\t\treturn res;\n\t}", "public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }", "@Override \n\t\t public void handle(MouseEvent event) {\n\t\t \ttooltip.setText(\n\t\t \t\t\tnode instanceof Label ? \n\t\t \t\t\t\t\t((Label)node).getText() :\n\t\t \t\t\t\t\t\t// for VBoxes who manage children\n\t\t \t\t\t\t\t\t(node instanceof VBox || node instanceof HBox) // is VBox or HBox\n\t\t \t\t\t\t\t\t&& (((Pane)node).getParent() != null) // AND has parent\n\t\t \t\t\t\t\t\t&& ((Pane)((Pane)node).getParent()).getChildren().get(0) instanceof Label ? // AND parent has children, the first of which is a Label \n\t\t \t\t\t\t\t\t((Label)((VBox)((Pane)node).getParent()).getChildren().get(0)).getText() :\n\t\t \t\t\t\t\t// for VBoxes who manage a Label and the child VBox\n\t\t \t\t\t\t\tnode instanceof VBox || node instanceof HBox || node instanceof Pane ? ((Label)((Pane)node).getChildren().get(0)).getText() :\t\t \t\t\t\t\t\n\t\t \t\t\t\t\t\t\"\"\t\t \t\t\t\n\t\t \t);\t\t \t\n\t\t tooltip.show(node, event.getScreenX() + 1 , event.getScreenY() - 30);\n//\t\t System.out.println(node.getClass().getName() + \" \" + tooltip.getText() + \" MouseMove\");\n\t\t event.consume();\n\t\t }", "@SuppressWarnings(\"deprecation\")\n public String getToolTipText(JTextComponent t, Point pt) {\n if (!painted) {\n return null;\n }\n Document doc = editor.getDocument();\n String tt = null;\n Rectangle alloc = getVisibleEditorRect();\n\n if (alloc != null) {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readLock();\n }\n try {\n tt = rootView.getToolTipText(pt.x, pt.y, alloc);\n } finally {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readUnlock();\n }\n }\n }\n return tt;\n }", "String getHoverDetail();", "public CompletableFuture<List<Details>> searchTweetByLocation(CompletableFuture<String> geoLocation){\n try{\n String topic= geoLocation.get();\n return searchTweetByTopic(topic);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return null;\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n if (!jspText.contains(e.getPoint())) {\n dispose();\n }\n }", "private void performHighlight() {\n final String wordToHighlight;\n if (autoHighlight && !editor.getSelectionModel().hasSelection()) {\n int currentOffset = editor.getCaretModel().getOffset();\n wordToHighlight = BWACUtils.extractWordFrom(editor.getDocument().getText(), currentOffset);\n } else {\n wordToHighlight = null;\n }\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n buildHighlighters(wordToHighlight);\n }\n });\n }", "private void displayToast(String paintingDescription) {\n Toast.makeText(this, paintingDescription, Toast.LENGTH_SHORT).show();\n }", "private void renderCardStat(Graphics2D g,String str,int yOffset) {\n\t\twhile((currentCardBounds.x + currentCardBounds.width/2 - this.makeRectangleWidth(g.getFont(), str)/2) + (this.makeRectangleWidth(g.getFont(), str)) > (this.displayCardBounds.x + this.displayCardBounds.width)) {\r\n\t\t\tg.setFont(new Font(g.getFont().getFamily(),g.getFont().getStyle(),g.getFont().getSize()-1));\r\n\t\t}\r\n\t\tg.drawString(str, currentCardBounds.x + currentCardBounds.width/2 - this.makeRectangleWidth(g.getFont(), str)/2, currentCardBounds.y + currentCardBounds.height + this.makeRectangleHeight(g.getFont(), str) + (yOffset));\r\n\t\t//g.setFont(originalFont);\r\n\t}", "public void hover() {\n\t}", "@Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }", "public void run() {\n\t\t\t\t\t\tif (labelWarning == null || labelWarning.isDisposed()\n\t\t\t\t\t\t\t\t&& !top.isDisposed()) {\n\t\t\t\t\t\t\tlabelWarning = new CLabel(top, SWT.CENTER);\n\n\t\t\t\t\t\t\tlabelWarning.setForeground(display\n\t\t\t\t\t\t\t\t\t.getSystemColor(UIConstants.WARNING_PANEL_FOREGROUND_COLOR));\n\n\t\t\t\t\t\t\tif (compositeUnderDisplay != null\n\t\t\t\t\t\t\t\t\t&& !compositeUnderDisplay.isDisposed()) {\n\t\t\t\t\t\t\t\tlabelWarning.moveAbove(compositeUnderDisplay);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfinal Image warningImage = lumina.ui.swt.ApplicationImageCache\n\t\t\t\t\t\t\t\t.getInstance().getImage(\n\t\t\t\t\t\t\t\t\t\tUIConstants.WARNING_PANEL_IMAGE_PATH);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * We were having problem with \"widget is disposed\" when\n\t\t\t\t\t\t * exiting the application. This fixes the problem (sort\n\t\t\t\t\t\t * of).\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (!labelWarning.isDisposed()) {\n\t\t\t\t\t\t\tlabelWarning.setText(message);\n\t\t\t\t\t\t\tlabelWarning.setImage(warningImage);\n\n\t\t\t\t\t\t\tlabelWarning.setBackground(display\n\t\t\t\t\t\t\t\t\t.getSystemColor(UIConstants.WARNING_PANEL_BACKGROUND_COLOR));\n\n\t\t\t\t\t\t\tfinal GridData labelGd = new GridData(SWT.FILL,\n\t\t\t\t\t\t\t\t\tSWT.CENTER | SWT.FILL, true, true);\n\n\t\t\t\t\t\t\t// FIXME: Temporary fix, what happens if the font\n\t\t\t\t\t\t\t// changes?\n\t\t\t\t\t\t\t// CHECKSTYLE:OFF\n\t\t\t\t\t\t\tlabelGd.minimumHeight = 32;\n\t\t\t\t\t\t\t// CHECKSTYLE:ON\n\n\t\t\t\t\t\t\tlabelWarning.setLayoutData(labelGd);\n\t\t\t\t\t\t\tlabelWarning.pack();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!top.isDisposed()) {\n\t\t\t\t\t\t\ttop.layout(true, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public String verifyMouseOverText(String object, String data) {\n\t\tlogger.debug(\"verifying Mouseover text\");\n\t\ttry {\n\n\t\t\tboolean flag = false;\n\t\t\tString actual = \"\";\n\t\t\tactual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getAttribute(OR.getProperty(\"ATTRIBUTE_TITLE\"));\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.equals(data)) {\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t\tif (flag)\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--- Mouseover text matched\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Mouseover text not verified \" + actual + \" -- \" + data;\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}", "@Override\r\n\tpublic String getToolTipText(MouseEvent event) {\r\n return toolTipWriter.write(getToolTipText(), event.getPoint());\r\n }", "public void display() {\t\t\n\t\tparent.pushStyle();\n\t\t\n\t\t//parent.noStroke();\n\t\t//parent.fill(255);\n\t\tparent.noFill();\n\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\tnodeSpin.drawNode(pos.x, pos.y, diam);\n\t\t\n\t\t//This should match what happens in the hover animation\n\t\tif (focused && userId >= 0) {\n\t\t\tparent.fill(Sequencer.colors[userId]);\n\t\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\t}\n\t\t\n\t\trunAnimations();\n\t\t\n\t\tparent.popStyle();\n\t}", "public String generateToolTipFragment(String toolTipText) {\n/* 88 */ return \" onMouseOver=\\\"return stm(['\" + \n/* 89 */ ImageMapUtilities.javascriptEscape(this.title) + \"','\" + \n/* 90 */ ImageMapUtilities.javascriptEscape(toolTipText) + \"'],Style[\" + this.style + \"]);\\\"\" + \" onMouseOut=\\\"return htm();\\\"\";\n/* */ }", "@Redirect(method = \"runCollectedTicks\",\n at = @At(value = \"INVOKE\",\n target = \"Ljava/util/function/BiConsumer;accept(Ljava/lang/Object;Ljava/lang/Object;)V\"\n )\n )\n @SuppressWarnings({\"rawtypes\", \"unchecked\"})\n private void tracker$wrapTickConsumer(BiConsumer consumer, Object blockPos, Object ticking) {\n final var thisScheduledTick = this.alreadyRunThisTick.get(this.alreadyRunThisTick.size() - 1);\n if (((ScheduledTickBridge) (Object) thisScheduledTick).bridge$isPartOfWorldGeneration()) {\n try (final var context = GenerationPhase.State.DEFERRED_SCHEDULED_UPDATE.createPhaseContext(\n PhaseTracker.SERVER)\n .source(this)\n .scheduledUpdate((BlockPos) blockPos, ticking)\n ) {\n context.buildAndSwitch();\n consumer.accept(blockPos, ticking);\n }\n } else {\n consumer.accept(blockPos, ticking);\n }\n }", "@Override\r\n\tpublic String getToolTipText(MouseEvent e) {\r\n\t\tMCLParticleSet particles = model.getParticles();\r\n\t\tif (particles == null) return null;\r\n\t\t\r\n\t\t// If the mouse is on a article, show its weight\r\n\t\tfloat x = e.getX()/ parent.pixelsPerUnit + viewStart.x;\r\n\t\tfloat y = (getHeight() - e.getY())/ parent.pixelsPerUnit + viewStart.y;\r\n\t\tint i = particles.findClosest(x,y);\r\n\t\tMCLParticle part = particles.getParticle(i);\r\n\t\tPose p = part.getPose(); \r\n\t\tif (Math.abs(p.getX() - x) <= 2f && Math.abs(p.getY() - y) <= 2f) return \"Weight \" + part.getWeight();\r\n\t\telse return null;\r\n\t}", "public void mouseEntered(MouseEvent arg0) {\r\n\t\tPoint pos = new Point(arg0.getX(), arg0.getY());\r\n\t\tSwingUtilities.convertPointToScreen(pos, owner);\r\n\t\tx = ((int) pos.getX() + 10);\r\n\t\ty = ((int) pos.getY() + 10);\r\n\r\n\t\t/*\r\n\t\t * ensure that it does not go off the screen if the coordinate of the\r\n\t\t * position exceeds the window size of the default screen it always\r\n\t\t * opens on the left. TODO fix the two screen to be not too strict.\r\n\t\t */\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tboolean exceed = false;\r\n\t\tif ((x + this.WIDTH_SC) > screenSize.getWidth()) {\r\n\t\t\tx = (x - 10 - this.WIDTH_SC);\r\n\t\t}\r\n\t\tif ((y + this.HEIGHT_SC) > screenSize.getHeight()) {\r\n\t\t\ty = (y - 10 - this.HEIGHT_SC);\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * wait for mouse to say ontop of the component for a while to ensure\r\n\t\t * that user really wanted to see to tooltip. Generates the sleeping\r\n\t\t * thread\r\n\t\t */\r\n\t\tt = new Thread(new Runnable() {\r\n\r\n\t\t\tpublic void run() {\r\n\t\t\t\tboolean cont = true; // indicating if thread was interrupted\r\n\r\n\t\t\t\t/* sleep */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(1300);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcont = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * if mouse stayed ontop of the component (mouse event is not\r\n\t\t\t\t * consumed) create toolTip popup.\r\n\t\t\t\t */\r\n\t\t\t\tif (cont && !helpActive) {\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpopup.remove(help);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpopup.setLocation(x, y);\r\n\t\t\t\t\tpopup.add(toolTip);\r\n\t\t\t\t\tpopup.pack();\r\n\t\t\t\t\tpopup.setVisible(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tt.start();\r\n\r\n\t\t/* keylistener can not be in thread */\r\n\t\tpopup.addKeyListener(this);\r\n\r\n\t}", "@Override public String getToolTipText(MouseEvent evt)\n{\n String rslt = null;\n\n int pos = evt.getX();\n int minpos = getX() + 16;\n int maxpos = getX() + getWidth() - 16;\n double relpos = (pos - minpos);\n if (relpos < 0) relpos = 0;\n relpos /= (maxpos - minpos);\n double timer = getMinimum() + relpos * (getMaximum() - getMinimum()) + 0.5;\n long time = (long) timer;\n if (time > getMaximum()) time = getMaximum();\n\n BicexEvaluationContext ctx = for_bubble.getExecution().getCurrentContext();\n if (ctx == null) return null;\n\n BicexValue bv = ctx.getValues().get(\"*LINE*\");\n List<Integer> times = bv.getTimeChanges();\n String line = null;\n for (Integer t : times) {\n if (t <= time) {\n\t line = bv.getStringValue(t+1);\n\t}\n else break;\n }\n if (line != null) rslt = \"Line \" + line;\n\n if (ctx != null) {\n String what = \"In\";\n if (ctx.getInnerContexts() != null) {\n\t for (BicexEvaluationContext sctx : ctx.getInnerContexts()) {\n\t if (sctx.getStartTime() <= time && sctx.getEndTime() >= time) {\n\t ctx = sctx;\n\t what = \"Calling\";\n\t break;\n\t }\n\t }\n }\n if (rslt == null) rslt = what + \" \" + ctx.getMethod();\n else rslt += \" \" + what + \" \" + ctx.getShortName();\n }\n\n return rslt;\n}", "private static void drawText(Canvas canvas, String text, int left, int top, int width, int maxWidth, Paint paint)\n\t{\n\t\tcanvas.save();\n\t\tint offset = Math.max(0, maxWidth - width) / 2;\n\t\tcanvas.clipRect(left, top, left + maxWidth, top + paint.getTextSize() * 2);\n\t\tcanvas.drawText(text, left + offset, top - paint.ascent(), paint);\n\t\tcanvas.restore();\n\t}", "private void showPopText(Canvas canvas, String content, float x, float y) {\n int heightOffSet = 40;\n int margin = 10;\n int rectRadius = 4;\n\n //draw rounded rectangle\n Rect popupTextRect = new Rect();\n Paint paint = new Paint();\n paint.getTextBounds(content + \" \", 0, content.length() + 2, popupTextRect);\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setTextSize(heightOffSet / 2);\n RectF r =\n new RectF(x - popupTextRect.width() - margin, y - (mFontSize * heightOffSet + 0.5f),\n x + popupTextRect.width() / 6 + (mFontSize * margin + 0.5f),\n y - (mFontSize * heightOffSet * 2 / 5));\n canvas.drawRoundRect(r, (mFontSize * rectRadius), (mFontSize * rectRadius), paint);\n\n //draw triangle.\n Path path = new Path();\n path.moveTo(x, y - (mFontSize * heightOffSet * 2 / 5));\n path.lineTo(x, y - (mFontSize * 10));\n path.lineTo(x - (mFontSize * 5), y - (mFontSize * heightOffSet / 2));\n path.close();\n canvas.drawPath(path, paint);\n\n //draw text\n paint.setColor(Color.WHITE);\n FontMetricsInt fontMetrics = paint.getFontMetricsInt();\n int baseline =\n (int) (r.top + (r.bottom - r.top - fontMetrics.bottom + fontMetrics.top) / 2 -\n fontMetrics.top);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(content, r.centerX(), baseline, paint);\n }", "public void drawCenteredText(String text, int x, int y);", "@Override\n public void displayMessage(String message)\n {\n Platform.runLater(() -> {\n gui.getStatusText().scheduleMessage(message, 2000.0);\n });\n }", "public void run(){\n // If there is not word to recognized or the word is empty then do not recognize it\n if(word == null || word.trim().isEmpty()){\n return;\n }\n\n // Set up the highlighter\n DefaultHighlighter.DefaultHighlightPainter highLighter = FileUtils.getInstance().getHighlighter();\n\n // Highlight words at the exact position\n try{\n textPane.getHighlighter().addHighlight(startPosition, endPosition, highLighter);\n }catch(Exception e){\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void run() {\n\t\tfor (int i = start;i<stop;i++){\n\t\t\ttext+=list.get(i);\n\t\t}\n\t\tXmlHelpMethods.str[no]=text;\n\t\t//System.out.println(\"thread \"+no+\" done\");\t\n\t}", "public void displayPreviewMessage(String str) {\n }", "public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public void displayToScreen(String str){\r\n textPane1.setText(str);\r\n paintDiamond();\r\n }", "void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color);", "private void drawString( Graphics2D g2, String str, Point2D.Double p, Color colour )\r\n {\r\n double x = translateX( p.getX() );\r\n double y = translateY( p.getY() );\r\n \r\n Font f = g2.getFont().deriveFont( FONT_SIZE );\r\n g2.setFont( f );\r\n \r\n g2.setColor( colour );\r\n g2.drawString( str, (float)x, (float)y );\r\n }", "public void setToolTipText (String string) {\r\n\tcheckWidget();\r\n\ttoolTipText = string;\r\n}", "static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}", "private void onHoverHandler(MouseEvent e) {\n Circle source = (Circle) e.getSource();\n\n int selectRowIndex = GridPane.getRowIndex(source);\n int selectColumnIndex = GridPane.getColumnIndex(source);\n\n // Increment both Column and Row by 1 to display for player correctly.\n // Normally, we start at 1, not 0\n selectRowIndex++;\n selectColumnIndex++;\n coordinate.setText(\"ROW: \" + selectRowIndex + \" COL: \" + selectColumnIndex);\n\n // Reset Column back to correct order (Start counting at 0)\n selectColumnIndex--;\n checkPotentialCircle(selectColumnIndex);\n }", "public void handleMouseMove(final int x, final int y) {\r\n int width = displayPanel.getWidth() - 1;\r\n int height = displayPanel.getHeight() - 1;\r\n Bounds bounds = topBounds;\r\n if (bounds == null) {\r\n mouseOut = true;\r\n textArea.setText(\"\");\r\n return;\r\n }\r\n \r\n Rectangle b = bounds.bounds;\r\n double scale = Math.min(width / (double) b.width,\r\n height / (double) b.height);\r\n double xOffs = (width - b.width * scale) / 2.0;\r\n double yOffs = (height - b.height * scale) / 2.0;\r\n \r\n StringBuilder result = new StringBuilder();\r\n findComponents(x, y, xOffs, yOffs, scale, bounds, 0,\r\n result);\r\n String resultStr = result.toString();\r\n if (resultStr.length() > 0) {\r\n mouseOut = false;\r\n textArea.setText(resultStr);\r\n }\r\n else {\r\n mouseOut = true;\r\n textArea.setText(topBounds.toString());\r\n }\r\n }", "private void fireLabelEvent(final LabelProviderChangedEvent event) {\n\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tfireLabelProviderChanged(event);\n\t\t\t}\n\t\t});\n\t}", "String getDisplayText();", "public static <T> T timed(String description, Supplier<T> code){\n Consumer<String> defaultOutput = System.out::println;\n return timed(description,defaultOutput,code);\n }", "public void mouseOver() {\n}", "private void renderText(CharSequence source) {\n \n }", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "public abstract void showInputBox(String message, Consumer<String> resultCallback);", "String underMouseSimple(MouseEvent me) {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return null;\n Rectangle2D mouse_rect = new Rectangle2D.Double(me.getX()-1,me.getY()-1,3,3);\n Iterator<String> it = myrc.node_coord_set.keySet().iterator();\n while (it.hasNext()) {\n String node_coord = it.next(); \n if (myrc.node_to_geom.containsKey(node_coord) && \n mouse_rect.intersects(myrc.node_to_geom.get(node_coord).getBounds())) return node_coord;\n }\n return null;\n }", "private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false));\n\t}", "private void displayMessage( final String messageToDisplay )\r\n\t{\r\n\t\tSwingUtilities.invokeLater(\r\n\t\t\tnew Runnable()\r\n\t\t\t{\r\n\t\t\t\tpublic void run() // updates displayArea\r\n\t\t\t\t{\r\n\t\t\t\t\tdisplayArea.append( messageToDisplay );\r\n\t\t\t\t} // end method run\r\n\t\t\t} // end inner class\r\n\t\t); // end call to SwingUtilities.invokeLater\r\n\t}", "public abstract double drawString(AEColor clr, double font_size, String str, double mid_x, double mid_y);", "public String mouseOver(String object, String data) {\n\t\ttry {\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tWebElement ele=null;\n\t\t\tele = explictWaitForElementUsingFluent(object);\n\t\t\tActions action = new Actions(driver);\n\t\t\taction.moveToElement(ele).perform();\n\t\t\treturn Constants.KEYWORD_PASS;\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found\";\n\t\t}\n\t}", "private void showLabel(String text, Color color) {\n GLabel result = new GLabel(text);\n result.setFont(\"Verdana-60\");\n result.setColor(color);\n result.sendToFront();\n add(result, (getWidth() - result.getWidth()) /2, (getHeight() - result.getHeight()) / 2 );\n pause(FREEZE_TIME);\n remove(result);\n }", "public void run() {\n if (topic.equals(Topic.CURSOR_LOCATION) && _plot != null && _plot.getCursorReception()) {\n CursorLocation cursorLoc = (CursorLocation) data;\n // Check that the cursor location event did not come\n // from this viewer.\n if (!cursorLoc.isSender(\"\" + hashCode())) {\n // Unpack the x,y coordinates and pass them along to\n // the cursor updated method.\n final Point3d p = cursorLoc.getLocation().getPoint();\n double x = p.getX();\n double y = p.getY();\n _plot.cursorTracked(x, y);\n cursorUpdated(x, y, false);\n }\n }\n }", "void showTooltip();", "void setHoverDetail(String detail);", "private static void drawOutlineText(Canvas canvas, Paint textPaint, String str,\n float x, float y) {\n // Is there a better way to do this?\n textPaint.setColor(0xff000000);\n canvas.drawText(str, x-1, y, textPaint);\n canvas.drawText(str, x+1, y, textPaint);\n canvas.drawText(str, x, y-1, textPaint);\n canvas.drawText(str, x, y+1, textPaint);\n canvas.drawText(str, x-0.7f, y-0.7f, textPaint);\n canvas.drawText(str, x+0.7f, y-0.7f, textPaint);\n canvas.drawText(str, x-0.7f, y+0.7f, textPaint);\n canvas.drawText(str, x+0.7f, y+0.7f, textPaint);\n textPaint.setColor(0xffffffff);\n canvas.drawText(str, x, y, textPaint);\n }", "private void displayMessage(final String messageToDisplay) {\n SwingUtilities.invokeLater(\n new Runnable() {\n public void run() // updates displayArea\n {\n displayArea.append(messageToDisplay);\n }\n }\n );\n }", "public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }", "@Override\n public void run() {\n try{\n Thread.sleep(5000);\n // To get rid of the Exception lets run the label updating after process is get completing. So that is label is\n // getting updated on the UI Thread and we don't get any exception\n Platform.runLater(new Runnable() { // Opening new Runnable to update the label\n @Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }\n });\n } catch (InterruptedException e) {\n // We don't care about this\n }\n }", "protected abstract void addHelpHandler(boolean hoverListener);", "abstract void nameHighlight(Spannable name, String matchStr, int color,\r\n int text_color);", "public String getToolTipText () {\r\n\tcheckWidget();\r\n\treturn toolTipText;\r\n}", "public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }", "public void strokeString(float x, float y, String text);", "public interface ToolTipable {\n String getInfoFromPosition(int i, Part part);\n}", "public void doPaint(Painter painter)\n\t{\n\t\t// Checks if there is text associated with the Shape\n\t\tif(text!=null)\n\t\t{\n\t\t\t// If there is then it paints the text in the middle of the shape\n\t\t\tpainter.drawCentredText(_x,_y,_width,_height,text);\n\t\t}\n\n\t\tpaint(painter);\n\t}", "public static void MouseOverAction(WebElement ele,By locator ,String ObjectName,String Textvalue) {\n\t\t\n\t\tWebElement We=driver.findElement(locator);\n\t\tnew Actions(driver).moveToElement(We).build().perform();\n\t\t\n\t\t }", "default @Nonnull SELF visit(@Nonnull LIntConsumer consumer) {\n\t\tNull.nonNullArg(consumer, \"consumer\");\n\t\tconsumer.accept(get());\n\t\treturn fluentCtx();\n\t}", "@FXML\r\n private void displayPostion(MouseEvent event) {\r\n status.setText(\"X = \" + event.getX() + \". Y = \" + event.getY() + \".\");\r\n }", "private void updateText(final String info, final String caller) {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\n\t\t\t\tinfoText.setText(info);\n\t\t\t\tcallerText.setText(caller);\n\t\t\t}\n\t\t});\n\t}", "public DisplayThread(AccountDisplay accountDisplay, String name, List<String> pastMessages) {\n this.accountDisplay = accountDisplay;\n threadName = name;\n\n history = new GridPane();\n history.getStyleClass().add(\"message-thread\");\n populateHistory(pastMessages);\n thread = new BorderPane();\n thread.setTop(new Text(name));\n thread.getStyleClass().add(\"thread-header\");\n //https://stackoverflow.com/questions/13156896/javafx-auto-scroll-down-scrollpane\n ScrollPane scrollPane = new ScrollPane(history);\n scrollPane.vvalueProperty().bind(history.heightProperty());\n thread.setCenter(scrollPane);\n setUpOutbox();\n }", "private void drawScoreText(Canvas canvas) {\n paint.setTextSize(bodyTextSize);\n paint.setTextAlign(Paint.Align.CENTER);\n\n int bodyWidthHighScore = (int) (paint.measureText(\"\" + game.highScore));\n int bodyWidthScore = (int) (paint.measureText(\"\" + game.score));\n\n int textWidthHighScore = Math.max(titleWidthHighScore, bodyWidthHighScore) + textPaddingSize * 2;\n int textWidthScore = Math.max(titleWidthScore, bodyWidthScore) + textPaddingSize * 2;\n\n int textMiddleHighScore = textWidthHighScore / 2;\n int textMiddleScore = textWidthScore / 2;\n\n int eXHighScore = endingX;\n int sXHighScore = eXHighScore - textWidthHighScore;\n\n int eXScore = sXHighScore - textPaddingSize;\n int sXScore = eXScore - textWidthScore;\n\n //Outputting high-scores box\n backgroundRectangle.setBounds(sXHighScore, sYAll, eXHighScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.high_score), sXHighScore + textMiddleHighScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.highScore), sXHighScore + textMiddleHighScore, bodyStartYAll, paint);\n\n\n //Outputting scores box\n backgroundRectangle.setBounds(sXScore, sYAll, eXScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.score), sXScore + textMiddleScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.score), sXScore + textMiddleScore, bodyStartYAll, paint);\n }", "@CalledInAwt\n public void executeOnMainUiCreated(@NotNull Consumer<? super MainVcsLogUi> consumer) {\n LOG.assertTrue(ApplicationManager.getApplication().isDispatchThread());\n\n if (myUi == null) {\n myOnCreatedListener = consumer;\n }\n else {\n consumer.consume(myUi);\n }\n }", "public String getToolTip(java.awt.Point position, long millis) {\n return getName() + \"\\n\"\n + getClass().getName() + \"\\n\"\n + \"Start = \" + isStart() + \"\\n\"\n + \"AFU ID = \" + getAfuId() + \"\\n\"\n + \"value<\" + (n_bits - 1) + \":0>= \" + vector.toBinString() + \"\\n\"\n + vector.toHexString() + \" / \" + vector.toDecString();\n }", "@Override\n public void run() {\n descriptionActivity.mReadingScore.setText(\"Reading: \"+ read);\n descriptionActivity.mMathScore.setText(\"Math: \" + math);\n descriptionActivity.mWritingScore.setText(\"Writing: \" + writing);\n }", "private void addText(Graphics g, Font font, Color frontColor, Rectangle rectangle, Color backColor, String str, int xPos, int yPos) {\n g.setFont(font);\n g.setColor(frontColor);\n if (rectangle != null) {\n g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(backColor);\n if (rectangle != null) {\n g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(frontColor);\n g.drawString(str, xPos, yPos);\n }", "@Override\n public String getToolTipText (final MouseEvent mEvent) {\n return getText();\n }", "void saySomething(String desc, MouseEvent e) {\n\t}", "public void mousePrint(String eventDescription, MouseEvent e) {\n\t\ttextArea.append(\"Mouse \" + eventDescription + \" at (\" + \n\t\t\t\t\t e.getX() + \", \" + e.getY() + \")\" + \"\\n\");\n\t}", "void msgDisplay(String s);", "void display() throws InterruptedException, IOException;", "public void retrieveThread() {\n\t\tRunnable runScrape = () -> {\n\t\t\ttry {\n\t\t\t\tPlatform.runLater(() -> { //enables non-FX application thread to update UI elements\n\t\t\t\t\tsetLoadingTxt(\"Getting data...\");\n\t\t\t\t\tsetErrorTxt(\"\");\n\t\t\t\t});\n\t\t\t\tscraper.retrieve(url.getText());\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tPlatform.runLater(() -> setErrorTxt(\"Error: could not retrieve data\"));\n\t\t\t}\n\t\t\tPlatform.runLater(() -> setLoadingTxt(\"\"));\n\t\t};\n\t\tThread t = new Thread(runScrape);\n\t\tt.start();\n\t}", "public void setToolTipText(String text)\n/* */ {\n/* 227 */ putClientProperty(\"ToolTipText\", text);\n/* */ }", "public void displayMessage()\n {\n // getCourseName gets the name of the course\n System.out.printf( \"Welcome to the grade book for\\n%s!\\n\\n\",\n getCourseName() );\n }", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\"You Exited the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t}", "private static void demoRunnable() {\n new Thread(() -> System.out.println(Thread.currentThread().getName()), \"thread-λ\").start();\n new Thread(ToLambdaP5::printThread, \"thread-method-ref\").start();\n }" ]
[ "0.5746241", "0.5328362", "0.50298285", "0.49277246", "0.4857585", "0.4719501", "0.4691163", "0.4635018", "0.46259955", "0.45498475", "0.45283994", "0.44935808", "0.44882795", "0.4459333", "0.4428981", "0.44167584", "0.439144", "0.4381031", "0.43779996", "0.43726936", "0.43488592", "0.4347352", "0.43363872", "0.43184435", "0.43055212", "0.43015248", "0.42987156", "0.42960244", "0.42893922", "0.42849758", "0.42748195", "0.4265912", "0.42569444", "0.4256474", "0.42469403", "0.4238122", "0.4237262", "0.42363328", "0.42072985", "0.42064267", "0.41997725", "0.41963816", "0.4183936", "0.41712877", "0.41504407", "0.41339093", "0.41227576", "0.41223568", "0.4120415", "0.41178358", "0.41155985", "0.41092536", "0.4107939", "0.41054845", "0.4105476", "0.410164", "0.40948743", "0.4081875", "0.40817106", "0.40754178", "0.40750548", "0.40725332", "0.40701857", "0.40687084", "0.4067739", "0.40609297", "0.40581462", "0.40562734", "0.4055279", "0.40550897", "0.40545428", "0.404666", "0.4042046", "0.4037021", "0.40337023", "0.40240562", "0.4023632", "0.40234315", "0.4006868", "0.40051684", "0.4000594", "0.39974523", "0.39942813", "0.3993539", "0.39882544", "0.3977152", "0.39684215", "0.3968209", "0.3965885", "0.3947398", "0.3938499", "0.39288285", "0.39243224", "0.39230925", "0.39166933", "0.39159498", "0.3909532", "0.390365", "0.39036196", "0.3895522" ]
0.58500636
0
Return the version number of the analysis server.
public void getVersion(VersionConsumer consumer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServerVersion();", "public Long getServerVersion() {\n\t\treturn serverVersion;\n\t}", "public String getServerVersion() throws IOException {\n\t\treturn Core.getServerVersion(getHttpMethodExecutor());\n\t}", "@GetMapping()\n public String getServerVersion() {\n return versionProperties.getVersion();\n }", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "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() {\r\n\t\treturn VERSION;\r\n\t}", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public long getVersion() {\n return version;\n }", "public long getVersion() {\n return version;\n }", "public final String getVersion() {\n return version;\n }", "private static String getVersion(Server server) {\n final String packageName = server.getClass().getPackage().getName();\n return packageName.substring(packageName.lastIndexOf('.') + 1);\n }", "public final int getVersion() {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\r\n return version;\r\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 static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n\t\treturn version;\n\t}", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public String getVersion()\n {\n return ver;\n }", "public String getVersion() {\n\t\treturn _version;\n\t}", "public String getVersion() {\n return _version;\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Integer getVersion() {\r\n return version;\r\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public Integer getVersion() {\n return version;\n }", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n\t\treturn (VERSION);\n\t}", "public int getVersion() {\n return this.version;\n }", "public int getVersionNumber() {\n return versionNumber;\n }", "public short getVersion() {\n return version;\n }", "public String getVersion(){\r\n return version;\r\n }", "public String getVersionNumber() {\n return versionNumber;\n }", "public String version() throws CallError, InterruptedException {\n return (String)service.call(\"version\").get();\n }", "public String getVersionNum();", "long getVersion();", "long getVersion();", "long getVersion();", "long getVersion();", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "Integer getVersion();", "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 String getVersion () {\n return this.version;\n }", "public int getVersion()\n\t{\n\t\tString versionString = conferenceInfo.getAttribute(VERSION_ATTR_NAME);\n\t\tif (versionString == null)\n\t\t\treturn -1;\n\t\tint version = -1;\n\t\ttry {\n\t\t\tversion = Integer.parseInt(versionString);\n\t\t}\n\t\tcatch (NumberFormatException e) {\n\t\t\tif (logger.isInfoEnabled())\n\t\t\t\tlogger.info(\"Failed to parse version string: \" + versionString);\n\t\t}\n\n\t\treturn version;\n\t}", "public long getVersion() {\r\n return this.version;\r\n }", "int getCurrentVersion();", "public Integer version() {\n return this.version;\n }", "public Version getVersion();", "long getVersionNumber();", "public String getVersionNumber ();" ]
[ "0.8057583", "0.7872356", "0.75915563", "0.7464723", "0.73173606", "0.7233867", "0.723208", "0.7202536", "0.7202536", "0.7099567", "0.7090782", "0.7090782", "0.7090782", "0.7090782", "0.7090782", "0.70727044", "0.70727044", "0.7069294", "0.70591617", "0.70574915", "0.70559466", "0.70529574", "0.7049459", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70440716", "0.70408314", "0.70408314", "0.7017821", "0.7017821", "0.70148295", "0.7008405", "0.69853395", "0.698451", "0.698451", "0.6976355", "0.69491744", "0.69491744", "0.69491744", "0.69491744", "0.6944663", "0.69277275", "0.69164956", "0.691182", "0.691182", "0.691182", "0.691182", "0.68982226", "0.6896448", "0.6896448", "0.6896448", "0.6896448", "0.6896448", "0.6896448", "0.689608", "0.6892899", "0.6891327", "0.6878204", "0.68729883", "0.6868185", "0.68573487", "0.6845855", "0.6842582", "0.6841069", "0.6841069", "0.6841069", "0.6841069", "0.68386555", "0.68386555", "0.68386555", "0.68386555", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6820944", "0.6816478", "0.68139917", "0.68139917", "0.68136626", "0.68134373", "0.6806586", "0.6780776", "0.6778208", "0.6776648", "0.67673755", "0.6758034" ]
0.0
-1
Remove the given listener from the list of listeners that will receive notification when new analysis results become available.
public void removeAnalysisServerListener(AnalysisServerListener listener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeListener(RiakFutureListener<V,T> listener);", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public void removeListener(T listener);", "default void removeListener(Runnable listener) {\n\t\tthis.getItemListeners().remove(listener);\n\t}", "@Override\n public void removeListener(StreamListener listener) {\n streamListeners.remove(listener);\n }", "public void removeListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.removeListener(listener);\n }", "public void removeListener(StatisticsListener listener)\r\n\t{\r\n\t\tlisteners.remove(listener);\r\n\t}", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "public void removeNPTListener(NPTListener l) {}", "void removeListener( AvailabilityListener listener );", "public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "private void removeListener(final @NonNull Consumer<E> listener) {\n eventListeners.remove(listener);\n\n if (eventListeners.isEmpty()) {\n HandlerList.unregisterAll(this);\n LISTENERS_GROUPS.remove(configuration);\n }\n }", "public void removeListener(GrillEventListener listener);", "@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }", "void removeListener(GraphListener listener);", "@Override\r\n\tpublic synchronized void unregisterListener(EventListener<T> listener) {\n\t\tlisteners.removeElement(listener);\r\n\t}", "public void unregisterListeners(){\n listeners.clear();\n }", "void removeListener(BotListener l);", "public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}", "protected void removeListeners() {\n }", "@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}", "public void remove(Object listener) {\n if (!type.isInstance(listener)) {\n return;\n }\n if (listener.equals(logger.getDelegate())) {\n logger = noOpLogger;\n }\n handlers.remove(listener);\n }", "public void removeListener(final T listener) {\n if (listener == null)\n throw new IllegalArgumentException(\"Parameter 'listener' must not be null!\");\n for (Iterator<T> it = _elements.iterator(); it.hasNext(); ) {\n if (it.next().equals(listener)) {\n it.remove();\n break;\n }\n }\n }", "private void removeListeners() {\n \t\tlistenToTextChanges(false);\n \t\tfHistory.removeOperationHistoryListener(fHistoryListener);\n \t\tfHistoryListener= null;\n \t}", "public void removeTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.removeElement(listener);\t\n\t}", "@Override\n public void removeListener(DisplayEventListener listener) {\n listenerList.remove(DisplayEventListener.class, listener);\n }", "public void removeAllListener() {\r\n listeners.clear();\r\n }", "public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }", "public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void removeCompletionListener(Runnable listener) {\n\t\tcompletionListeners.remove(listener);\n\t}", "void removeListener(IEventChannelListener<K, V> listener);", "public void removeListeners() {\n if ( listeners != null ) {\n listeners.clear();\n }\n }", "void removeListener(ChangeListener<? super T> listener);", "public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }", "void unregisterListeners();", "public void removeListener(LogListener listener) {\n\t\tthis.eventListeners.remove(listener);\n\t}", "public void removeListeners() {\n listeners = new ArrayList<MinMaxListener>();\n listeners.add(evalFct);\n }", "public void removeDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.remove(listener);\n\t}", "public void removeListener(ValueChangedListener listener) {\n\t\t_listenerManager.removeListener(listener);\n\t}", "public void removeEventListener(EventListener listener){\n try {\n listenerList.remove(EventListener.class, listener);\n } catch (Exception e) {\n System.out.println(\"[analizadorClient.removeEventListener]\" + e.getMessage());\n }\n \n \n }", "public synchronized void removeValueChangedListener(ValueChangedListener listener) {\n\t\tif (listeners != null && listeners.length > 0) {\n\t\t\tValueChangedListener[] tmp = new ValueChangedListener[listeners.length - 1];\n\t\t\tint idx = 0;\n\t\t\tfor (int i = 0; i < listeners.length; i++) {\n\t\t\t\tif (listeners[i] != listener) {\n\t\t\t\t\tif (idx == tmp.length) {\n\t\t\t\t\t\t// the listener was not registerd\n\t\t\t\t\t\treturn; // early exit\n\t\t\t\t\t}\n\t\t\t\t\ttmp[idx++] = listeners[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tlisteners = tmp;\n\t\t}\n\t}", "void unsubscribe(LogListener listener);", "private void removeEventListener(IEventListener<T> listener) {\n\t\t\tevent.removeEventListener(listener);\n\t\t}", "public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public synchronized void removeProgressListener (ProgressListener lsnr) {\n if (listeners == null) {\n return;\n }\n listeners.removeElement(lsnr);\n }", "public void unregisterListener(PPGListener listener){\n listeners.remove(listener);\n }", "public void removeFactListener(GenericFactListener<Fact> listener);", "public void removeListener(ICdtVariableChangeListener listener){\n\t\tfListeners.remove(listener);\n\t}", "public synchronized void removeChangeListener(ChangeListener l) {\n if (changeListeners != null && changeListeners.contains(l)) {\n Vector v = (Vector) changeListeners.clone();\n v.removeElement(l);\n changeListeners = v;\n }\n }", "void removeListener(\n ReaderSettingsListenerType l);", "public void removeEnumerateCallback(OctaveReference listener) {\n\t\tlistenerEnumerate.remove(listener);\n\t}", "public void removeScanListener(Listener l) {\n listeners.remove(l);\n }", "public void removeListener(LineListener listener) {\n\t\tplayer.removeListeners(listener);\n\t}", "public void removeListener(CachePolicyListener listener) {\n listeners.removeElement(listener);\n }", "void removeListener( ConfigurationListener listener );", "void removeListener(RosZeroconfListener listener);", "void removeExecutionListener(ExecutionListener listener);", "public void removeChangeListener(ChangeListener<BufferedImage> listener) {\n observer.remove(listener);\n }", "@Override\n\tpublic void removeAllListener() {\n\t\tLog.d(\"HFModuleManager\", \"removeAllListener\");\n\t\tthis.eventListenerList.clear();\n\t}", "public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}", "public void removeListener(ILabelProviderListener listener) {\n\t}", "public void removeListener(final IHistoryStringBuilderListener listener) {\n m_listeners.removeListener(listener);\n }", "public void removeMonoflopDoneListener(MonoflopDoneListener listener) {\n\t\tlistenerMonoflopDone.remove(listener);\n\t}", "protected void uninstallListeners() {\n }", "protected void uninstallListeners() {\n }", "public Promise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)\r\n/* 147: */ {\r\n/* 148:181 */ if (listener == null) {\r\n/* 149:182 */ throw new NullPointerException(\"listener\");\r\n/* 150: */ }\r\n/* 151:185 */ if (isDone()) {\r\n/* 152:186 */ return this;\r\n/* 153: */ }\r\n/* 154:189 */ synchronized (this)\r\n/* 155: */ {\r\n/* 156:190 */ if (!isDone()) {\r\n/* 157:191 */ if ((this.listeners instanceof DefaultFutureListeners)) {\r\n/* 158:192 */ ((DefaultFutureListeners)this.listeners).remove(listener);\r\n/* 159:193 */ } else if (this.listeners == listener) {\r\n/* 160:194 */ this.listeners = null;\r\n/* 161: */ }\r\n/* 162: */ }\r\n/* 163: */ }\r\n/* 164:199 */ return this;\r\n/* 165: */ }", "public abstract void unregisterListeners();", "public void removeDownloadListener(DownloadListener aListener) {\n\t\tmListeners.remove(aListener);\n\t}", "public void removeAmplitudeListener(IDualAmplitudeListener listener)\r\n {\r\n amplitudeListeners.remove(listener);\r\n }", "public void removeListener(@NotNull ValueListener<V> listener) {\n\t\tlistener.listenerDetached();\n\t\tvalueListeners.remove(listener);\n\t}", "public void removeChangeListener(ChangeListener listener) {\n listenerList.remove(ChangeListener.class, listener);\n }", "public void removeRatioListener(IRatioListener listener)\r\n {\r\n ratioListeners.remove(listener);\r\n }", "synchronized public void removeLogListener(LogListener l) {\n\t\tif (listeners == null)\n\t\t\tlisteners = new Vector();\n\t\tlisteners.removeElement(l);\n\t}", "public void removeOnDataChangedListener(OnDataChangedListener listener) {\n dataChangedListeners.remove(listener);\n }", "public void removeInvalidationListener(Runnable listener)\n {\n myInvalidationChangeSupport.removeListener(listener);\n }", "@Override\n public void removeListener(ChangeListener<? super String> listener) {\n }", "public void removeListener(ILabelProviderListener listener) {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void removeActionListener(ActionListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void removeListener(TransferListener listener) {\n listeners.remove(listener);\n }", "void removeFilterListener(FilterListener listener);", "void removeListener(MapDelegateEventListener<K, V> listener);", "public void removeChangeListener(ChangeListener listener) {\n\t\tchangeListeners.remove(listener);\n\t}", "public synchronized void removeButtonListener(ButtonListener l) {\r\n listeners.removeElement(l);\r\n }", "protected void uninstallListeners() {\n\t}", "public void removeEventListener(GroupChatListener listener)\n\t\t\tthrows RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener3(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public synchronized void removePlotNotificationListener(\n PlotNotificationListener l) {\n m_plotListeners.remove(l);\n }", "void removeListener(MediaQueryListListener listener);", "void removeDataSourceListener(@Nonnull IDataSourceListener listener);", "public void removeGraphChangeListener(GraphChangeListener<N, ET> listener)\n\t{\n\t\tlistenerList.remove(GraphChangeListener.class, listener);\n\t}", "public synchronized void removeBuildListener(BuildListener listener) {\n // create a new Vector to avoid ConcurrentModificationExc when\n // the listeners get added/removed while we are in fire\n Vector newListeners = getBuildListeners();\n newListeners.removeElement(listener);\n listeners = newListeners;\n }", "public void removeUpdateListener(StoreUpdateListener listener);", "public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }", "@Override\r\n public void removeNotify() {\r\n // remove listener\r\n component.getResults().removeLabTestListener(this);\r\n \r\n super.removeNotify();\r\n }", "public void removeConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.remove(listener);\n\t}", "public synchronized void removePermanentHandler(Listener listener) {\n permanentEventMethodCache.remove(listener);\n }", "public synchronized void removeCompletionListener(ActionListener l) {\n completionListeners.removeElement(l); //remove listeners\n }", "public void unregister(ListenerRegistration listener) {\n if (handlerSlots.get(listener.getOrder()).contains(listener)) {\n dirty();\n handlerSlots.get(listener.getOrder()).remove(listener);\n }\n }", "public void removeListener(INotifyChangedListener notifyChangedListener)\n {\n changeNotifier.removeListener(notifyChangedListener);\n }", "public void removeChangeListener(ChangeListener l) {\n\t\t//do nothing\n\t}", "public void removeEventListener(OneToOneChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener2(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}" ]
[ "0.77010864", "0.75822157", "0.7560366", "0.7558607", "0.74428666", "0.7440245", "0.7401411", "0.7400021", "0.7392057", "0.7378665", "0.7343231", "0.7326621", "0.73259944", "0.73165673", "0.7266201", "0.7254889", "0.72223914", "0.7208358", "0.72057956", "0.72009885", "0.71872807", "0.7179647", "0.716084", "0.7148225", "0.71429324", "0.71366894", "0.7131369", "0.7131095", "0.712453", "0.7091185", "0.70887595", "0.70758164", "0.70532393", "0.70446974", "0.70432365", "0.70412153", "0.7038638", "0.70183706", "0.7011044", "0.7002524", "0.69974595", "0.6976425", "0.69680244", "0.6953938", "0.6950843", "0.6950128", "0.6949058", "0.6937908", "0.69275755", "0.6926573", "0.69242275", "0.69204265", "0.69185036", "0.6912036", "0.69080573", "0.6907513", "0.69033694", "0.69019437", "0.689994", "0.68846107", "0.6872967", "0.685731", "0.6852384", "0.6843408", "0.6843408", "0.68387437", "0.68309397", "0.6829008", "0.6828316", "0.68093497", "0.67960155", "0.6780719", "0.67693245", "0.67655927", "0.6751327", "0.67500246", "0.6749802", "0.6742065", "0.67344874", "0.6730539", "0.6729799", "0.6715534", "0.67146134", "0.6714516", "0.6712945", "0.6703513", "0.6701768", "0.6699126", "0.6696953", "0.66894543", "0.6682068", "0.66690594", "0.6647962", "0.664561", "0.6640047", "0.6638472", "0.6635269", "0.6631044", "0.6629809", "0.6627935" ]
0.75234836
4
Searches for declarations of class members with the given name. The given consumer is invoked asynchronously on a different thread.
public void searchClassMemberDeclarations(String name, SearchIdConsumer consumer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchClassMemberReferences(String name, SearchIdConsumer consumer);", "private void\r\n findMemberType(@Nullable String name, Collection<IClass> result) throws CompileException {\n IClass[] memberTypes = this.getDeclaredIClasses();\r\n if (name == null) {\r\n result.addAll(Arrays.asList(memberTypes));\r\n } else {\r\n String memberDescriptor = Descriptor.fromClassName(\r\n Descriptor.toClassName(this.getDescriptor())\r\n + '$'\r\n + name\r\n );\r\n for (final IClass mt : memberTypes) {\r\n if (mt.getDescriptor().equals(memberDescriptor)) {\r\n result.add(mt);\r\n return;\r\n }\r\n }\r\n }\r\n\r\n // Examine superclass.\r\n {\r\n IClass superclass = this.getSuperclass();\r\n if (superclass != null) superclass.findMemberType(name, result);\r\n }\r\n\r\n // Examine interfaces.\r\n for (IClass i : this.getInterfaces()) i.findMemberType(name, result);\r\n\r\n // Examine enclosing type declarations.\r\n {\r\n IClass declaringIClass = this.getDeclaringIClass();\r\n IClass outerIClass = this.getOuterIClass();\r\n if (declaringIClass != null) {\r\n declaringIClass.findMemberType(name, result);\r\n }\r\n if (outerIClass != null && outerIClass != declaringIClass) {\r\n outerIClass.findMemberType(name, result);\r\n }\r\n }\r\n }", "public static void moduleClassScan(Consumer<? super Class> consumer, String packageName) {\n\n\n Set<Class<? extends Module>> allClasses = getModuleClasses(packageName);\n\n for (Class clazz : allClasses) {\n\n consumer.accept(clazz);\n }\n }", "protected Set<Element> getMembersFromJavaSource(final String clazzname, final ElementUtilities.ElementAcceptor acceptor) {\n final Set<Element> ret = new LinkedHashSet<>();\n JavaSource javaSource = getJavaSourceForClass(clazzname);\n if (javaSource != null) {\n try {\n javaSource.runUserActionTask(new Task<CompilationController>() {\n @Override\n public void run(CompilationController controller) throws IOException {\n controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);\n TypeElement classElem = controller.getElements().getTypeElement(clazzname);\n if (classElem == null) {\n return;\n }\n ElementUtilities eu = controller.getElementUtilities();\n\n Iterable<? extends Element> members = eu.getMembers(classElem.asType(), acceptor);\n for (Element e : members) {\n ret.add(e);\n }\n }\n }, false);\n }\n catch (IOException ioe) {\n Exceptions.printStackTrace(ioe);\n }\n }\n return ret;\n }", "ClassMember search (String name, MethodType type, int access,\r\n\t\t int modifier_mask) {\r\n IdentifierList methods = (IdentifierList) get (name);\r\n\r\n if (methods == null) return null;\r\n\r\n java.util.Enumeration ms = methods.elements ();\r\n\r\n ClassMember more_specific = null;\r\n while (ms.hasMoreElements ()) {\r\n ClassMember m = (ClassMember) ms.nextElement ();\r\n\r\n int diff;\r\n try {\r\n\tdiff = m.type.compare (type);\r\n } catch (TypeMismatch e) {\r\n\tcontinue;\r\n }\r\n\r\n if (diff < 0) continue;\r\n\r\n int m_access = m.getAccess ();\r\n\r\n if (access == Constants.PROTECTED) {\r\n\tif (m_access == Constants.PRIVATE) continue;\r\n } else if (access == Constants.PUBLIC) {\r\n\tif (m_access != Constants.PUBLIC) continue;\r\n }\r\n\t \r\n if (modifier_mask > 0 &&\r\n\t ((m.getModifier () & modifier_mask) == 0)) continue;\r\n\r\n if (diff == 0) return m;\r\n\r\n if (more_specific == null) {\r\n\tmore_specific = m;\r\n\tcontinue;\r\n }\r\n\r\n try {\r\n\tif (((MethodType) m.type).isMoreSpecific ((MethodType) more_specific.type))\r\n\t more_specific = m;\r\n } catch (OverloadingAmbiguous ex) {\r\n\t/* this overloading is ambiguous */\r\n\tOzcError.overloadingAmbiguous (m);\r\n\treturn ClassMember.ANY;\r\n }\r\n }\r\n\r\n return more_specific;\r\n }", "public interface ClassesByNameProvider {\n\n List<ReferenceType> get(String s);\n\n static ClassesByNameProvider createCache(List<ReferenceType> allTypes) {\n return new Cache(allTypes);\n }\n\n /**\n * Caching implementation for name based class provider.\n */\n final class Cache implements ClassesByNameProvider {\n\n private final ConcurrentHashMap<String, ReferenceType> myCache;\n\n public Cache(List<ReferenceType> classes) {\n myCache = new ConcurrentHashMap<>();\n classes.forEach(t -> myCache.put(t.signature(), t));\n }\n\n @Override\n public List<ReferenceType> get(String s) {\n String signature = VirtualMachineProxyImpl.JNITypeParserReflect.typeNameToSignature(s);\n if (signature != null) {\n return (List<ReferenceType>) myCache.get(signature);\n }\n return Collections.emptyList();\n }\n }\n}", "public abstract List<String> scanAllClassNames();", "@Override\n\tpublic MemberBean[] findByName(String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void searchMembers(String keyword) {\n\t}", "@Override\n\t@Transactional\n\tpublic List<IoMember> searchMember(String name) {\n\t\treturn memberDao.searchMember(name);\n\t}", "public static void search(final View view, final String name) {\r\n\t\tview.getStatus().setMessage(\"Searching ... \");\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tString path = jEdit.getProperty(\"options.javadoc.path\", \"\");\r\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(path, File.pathSeparator);\r\n\t\t\t\tArrayList<String> pathList = new ArrayList<String>();\r\n\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\tString dir = tokenizer.nextToken();\r\n\t\t\t\t\tBuffer packageList = jEdit.openTemporary(view, dir, \"package-list\", false);\r\n\t\t\t\t\tif (packageList == null || packageList.isNewFile()) {\r\n\t\t\t\t\t\tLog.log(Log.ERROR, JavadocPlugin.class, \"Invalid API root: \"+dir);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (int i = 0; i<packageList.getLineCount(); i++) {\r\n\t\t\t\t\t\tString pkg = packageList.getLineText(i).replace(\".\", File.separator);\r\n\t\t\t\t\t\tFile pkgDir = new File(dir, pkg);\r\n\t\t\t\t\t\tFile cls = new File(pkgDir, name+\".html\");\r\n\t\t\t\t\t\tif (cls.exists()) {\r\n\t\t\t\t\t\t\tpathList.add(cls.getPath());\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\tif (pathList.size() == 0) {\r\n\t\t\t\t\tview.getStatus().setMessageAndClear(\"Class \"+name+\" not found\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString chosenDoc = null;\r\n\t\t\t\tif (pathList.size() > 1) {\r\n\t\t\t\t\tchosenDoc = (String) JOptionPane.showInputDialog(view,\r\n\t\t\t\t\t\tjEdit.getProperty(\"msg.javadoc.resolve-class.message\"),\r\n\t\t\t\t\t\tjEdit.getProperty(\"msg.javadoc.resolve-class.title\"),\r\n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, pathList.toArray(), pathList.get(0));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tchosenDoc = pathList.get(0);\r\n\t\t\t\t}\r\n\t\t\t\tif (chosenDoc != null) {\r\n\t\t\t\t\tInfoViewerPlugin.openURL(view, new File(chosenDoc).toURI().toString());\r\n\t\t\t\t}\r\n\t\t\t\tview.getStatus().setMessage(\"\");\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}", "static void scan(Class<?> aClass, BiConsumer<Method, Annotation> consumer) {\n if (Object.class.equals(aClass)) {\n return;\n }\n\n if (!isInstantiable(aClass)) {\n return;\n }\n for (Method method : aClass.getMethods()) {\n scan(consumer, aClass, method);\n }\n }", "public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;", "public void testInClosureDeclaringType2() throws Exception {\n String contents = \n \"class Baz {\\n\" +\n \" def method() { }\\n\" +\n \"}\\n\" +\n \"class Bar extends Baz {\\n\" +\n \"}\\n\" +\n \"new Bar().method {\\n \" +\n \" other\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Search\", false, true);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tdoSearch(name, count);\n\t\t\t}", "public void fetchByName(String name) {\n\t\trefgservice.fetchNodesByName(name, new SearchByNameCallback());\n\t\t\n\t}", "public final java.util.Collection<kotlin.reflect.jvm.internal.KCallableImpl<?>> getMembers(kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope r8, kotlin.reflect.jvm.internal.KDeclarationContainerImpl.MemberBelonginess r9) {\n /*\n r7 = this;\n java.lang.String r0 = \"scope\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)\n java.lang.String r0 = \"belonginess\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)\n kotlin.reflect.jvm.internal.KDeclarationContainerImpl$getMembers$visitor$1 r0 = new kotlin.reflect.jvm.internal.KDeclarationContainerImpl$getMembers$visitor$1\n r0.<init>(r7, r7)\n kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope r8 = (kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope) r8\n r1 = 0\n r2 = 3\n java.util.Collection r8 = kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope.DefaultImpls.getContributedDescriptors$default(r8, r1, r1, r2, r1)\n java.lang.Iterable r8 = (java.lang.Iterable) r8\n java.util.ArrayList r2 = new java.util.ArrayList\n r2.<init>()\n java.util.Collection r2 = (java.util.Collection) r2\n java.util.Iterator r8 = r8.iterator()\n L_0x0024:\n boolean r3 = r8.hasNext()\n if (r3 == 0) goto L_0x005e\n java.lang.Object r3 = r8.next()\n kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor r3 = (kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor) r3\n boolean r4 = r3 instanceof kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor\n if (r4 == 0) goto L_0x0057\n r4 = r3\n kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor r4 = (kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor) r4\n kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility r5 = r4.getVisibility()\n kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility r6 = kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.INVISIBLE_FAKE\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r6)\n r5 = r5 ^ 1\n if (r5 == 0) goto L_0x0057\n boolean r4 = r9.accept(r4)\n if (r4 == 0) goto L_0x0057\n r4 = r0\n kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorVisitor r4 = (kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorVisitor) r4\n kotlin.Unit r5 = kotlin.Unit.INSTANCE\n java.lang.Object r3 = r3.accept(r4, r5)\n kotlin.reflect.jvm.internal.KCallableImpl r3 = (kotlin.reflect.jvm.internal.KCallableImpl) r3\n goto L_0x0058\n L_0x0057:\n r3 = r1\n L_0x0058:\n if (r3 == 0) goto L_0x0024\n r2.add(r3)\n goto L_0x0024\n L_0x005e:\n java.util.List r2 = (java.util.List) r2\n java.lang.Iterable r2 = (java.lang.Iterable) r2\n java.util.List r8 = kotlin.collections.CollectionsKt.toList(r2)\n java.util.Collection r8 = (java.util.Collection) r8\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.KDeclarationContainerImpl.getMembers(kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.KDeclarationContainerImpl$MemberBelonginess):java.util.Collection\");\n }", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "int hint_for(ThreadContext tc, RakudoObject classHandle, String name);", "private static void scan(BiConsumer<Method, Annotation> consumer, Class<?> aClass, Method method) {\n if (Object.class.equals(method.getDeclaringClass())) {\n return;\n }\n scan(consumer, aClass, method, method.getAnnotations());\n }", "@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }", "private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;", "List<Member> findByName(String name);", "private InjectionMetadata findReferenceMetadata(String beanName, Class<?> clazz, PropertyValues pvs) {\n String cacheKey = (StringUtils.hasLength(beanName) ? beanName : clazz.getName());\n // Quick check on the concurrent map first, with minimal locking.\n ReferenceInjectionMetadata metadata = this.injectionMetadataCache.get(cacheKey);\n if (InjectionMetadata.needsRefresh(metadata, clazz)) {\n synchronized (this.injectionMetadataCache) {\n metadata = this.injectionMetadataCache.get(cacheKey);\n if (InjectionMetadata.needsRefresh(metadata, clazz)) {\n if (metadata != null) {\n metadata.clear(pvs);\n }\n try {\n metadata = buildReferenceMetadata(clazz);\n this.injectionMetadataCache.put(cacheKey, metadata);\n } catch (NoClassDefFoundError err) {\n throw new IllegalStateException(\"Failed to introspect bean class [\" + clazz.getName() +\n \"] for reference metadata: could not find class that it depends on\", err);\n }\n }\n }\n }\n return metadata;\n }", "public <C extends Document & HasEnabled> T with(final Class<C> type, final String name, final Consumer<C> consumer) {\n requireNonNulls(type, name, consumer);\n //@SuppressWarnings(\"unchecked\")\n //final Consumer<? extends Document> consumerCasted = (Consumer<? extends Document>)consumer;\n withsNamed.add(Tuples.of(type, name, consumer));\n return self();\n }", "public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public void getAssists(String file, int offset, int length, AssistsConsumer consumer);", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "@SuppressWarnings(\"unused\")\r\n\t\tpublic static void resolveSearchInMembersScopeForFunction(CommonScopeLookup search, Reference retType) {\n\t\t}", "private void getMovieIDs(String name) {\n\n Thread t1 = new Thread(new Runnable() {\n @Override\n public void run() {\n extractIDsfromJson(NetworkUtils.getMovieIDasJson(name));\n }\n });\n t1.start();\n\n\n }", "protected Runnable listMembers() {\n return () -> {\n while (enableHa) {\n try {\n if (Thread.currentThread().isInterrupted()) {\n break;\n }\n NotificationServiceOuterClass.ListMembersRequest request =\n NotificationServiceOuterClass.ListMembersRequest.newBuilder()\n .setTimeoutSeconds(listMemberIntervalMs / 1000)\n .build();\n NotificationServiceOuterClass.ListMembersResponse response = notificationServiceStub.listMembers(request);\n if (response.getReturnCode() == NotificationServiceOuterClass.ReturnStatus.SUCCESS) {\n livingMembers = new HashSet<>(response.getMembersList());\n } else {\n logger.warn(response.getReturnMsg());\n selectValidServer();\n }\n } catch (Exception e) {\n e.printStackTrace();\n logger.warn(\"Error while listening notification\");\n selectValidServer();\n }\n }\n };\n }", "public List<Declaration> localMembers() throws LookupException;", "@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }", "public void testInClosureDeclaringType4() throws Exception {\n String contents = \n \"class Bar {\\n\" +\n \" def method() { }\\n\" +\n \"}\\n\" +\n \"new Bar().method {\\n \" +\n \" this\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"this\");\n int end = start + \"this\".length();\n assertDeclaringType(contents, start, end, \"Search\", false);\n }", "public void testInClassDeclaringType1() throws Exception {\n String contents = \n \"class Baz {\\n\" +\n \" def method() {\\n\" +\n \" other\\n\" +\n \" }\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Baz\", false, true);\n }", "public static ClassObj findClass(@NonNull Snapshot snapshot, String name) {\n return snapshot.findClass(name);\n }", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "@Override\n\tpublic List<DiscoveredMember> list() throws DiscoveryException {\n\t\tif(this.myself == null) {\n\t\t\tthrow new DiscoveryException(\"Jmdns not yet registered!!!\");\n\t\t}\n\t\t\n\t\tServiceInfo[] list = this.jmDns.list(this.type);\n\t\tList<DiscoveredMember> members = new ArrayList<DiscoveredMember>();\n\n\t\tfor (ServiceInfo info : list) {\n\t\t\tif (!info.getName().equals(this.myself.getName())\n\t\t\t\t\t&& info.getName().startsWith(this.cloudName)) {\n\t\t\t\t//todo-discovery: it could lead to problems if it retunrs multiple inetAdresses\n\t\t\t\tfor (InetAddress ad : info.getInetAddresses()) {\n\t\t\t\t\tDiscoveredMember member = discoveredMemberProvider.get();\n\t\t\t\t\tmember.setInetAdresses(ad);\n\t\t\t\t\tmember.setPort(info.getPort());\n\t\t\t\t\tmember.setName(info.getName());\n\t\t\t\t\tmembers.add(member);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tPieLogger.trace(this.getClass(), \"We discovered {} members!\", members.size());\n\n\t\treturn members;\n\t}", "<T extends Message> void visitConsumer(Class<T> consumedType, MethodHandle handle);", "private void classDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n Vector queue = new Vector();\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modifier.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modifier.check(modifier.classes | modifier.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) == 0)\r\n modifier.methods &= ~Keyword.ABSTRACTSY.value;\r\n else\r\n modifier.methods |= Keyword.ABSTRACTSY.value;\r\n\r\n x.modify |= modifier.cur;\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n Type t = type();\r\n x.extend = new ClassType(t.ident.string.substring(t.ident.string.lastIndexOf('.') + 1));\r\n }\r\n else if (((x.modify & Keyword.STATICSY.value) != 0 || (Scope)scopeStack.get(0) == scope) && x.name.string.compareTo(\"Object\") != 0)\r\n {\r\n x.extend = new ClassType(\"Object\");\r\n unresolved.add(x.extend.name.string);\r\n }\r\n else\r\n x.extend = new ClassType();\r\n\r\n if (nextSymbol == Keyword.IMPLEMENTSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) != 0 && (modifier.cur & modifier.constructors) == 0)\r\n modifier.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modifier.cur &= modifier.constructors;\r\n\r\n classBody(x, new Modifier(), \"\", queue);\r\n\r\n Iterator iter = x.scope.iterator();\r\n\r\n while(iter.hasNext())\r\n {\r\n Basic b = (Basic)iter.next();\r\n\r\n if (b instanceof MethodType)\r\n if ((b.modify & Keyword.STATICSY.value) != 0)\r\n { // remove this from static method\r\n MethodType m = (MethodType)b;\r\n m.scope.remove(\"§this\");\r\n if (m.parameter.length > 0 && m.parameter[0].name.string.compareTo(\"§this\") == 0)\r\n {\r\n Parameter [] p = new Parameter[m.parameter.length - 1];\r\n\r\n for(int i = 0; i < p.length; i++)\r\n p[i] = m.parameter[i + 1];\r\n\r\n m.parameter = p;\r\n }\r\n }\r\n }\r\n\r\n // add queue to constructors\r\n addToConstructor(x, queue);\r\n unresolved = dummy;\r\n\r\n writeList(x);\r\n }", "Contact searchContact(String searchName){\n for(int i = 0; i < friendsCount; i++){\n if(myFriends[i].name.equals(searchName)){\n return myFriends[i];\n }\n }\n return null;\n }", "public ObjectArrayList getPrimings(String name, String sequence) throws IOException, InterruptedException{\n\t\tBufferedReader reader = getPrimingsInternal(name, sequence);\n\t\t\n\t\tObjectArrayList hits = new ObjectArrayList();\n\t\tString ln;\n\t\twhile((ln = reader.readLine()) != null){\n\t\t\tString[] values = ln.split(\"\\t\");\n\t\t\tif(values.length == 21 && !values[0].equals(\"match\")){\n\t\t\t\t// prune hits\n\t\t\t\tint queryLength = Integer.parseInt(values[10]);\n//\t\t\t\tint queryStart = Integer.parseInt(values[11]);\n\t\t\t\tint queryEnd = Integer.parseInt(values[12]);\n\t\t\t\t\n\t\t\t\t// prune misprimings with NO end priming\n\t\t\t\tif(isDangerousMispriming(queryLength, queryEnd)){\n\t\t\t\t\t//hits.add(new IndexHitImpl(new SimpleContig(values[13].replace('_', ' ').substring(0, values[13].length() - 1)), Integer.parseInt(values[15]), values[8].equals(\"+\") ? true : false));\n\t\t\t\t\thits.add(new IndexHitImpl(new SimpleSlimContig(values[13]), Integer.parseInt(values[15]), values[8].equals(\"+\") ? true : false));\n\t\t\t\t}\n\t\t\t\telse continue;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Found \" + hits.size() + \" hits for query \" + sequence);\n\t\treturn hits;\n\t}", "public interface ConsumerRunnable {\n public void consumer(long offset, String msg);\n}", "@Override\r\n\tpublic List<User> search(String name) {\n\t\treturn null;\r\n\t}", "@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }", "private void onClassesFound(List<UMDClass> classes) {\n\t}", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "private static void addConsumer()\r\n\t{\r\n\t\tparsers++;\r\n\t\tParser consumer = new Parser();\r\n\t\tconsumer.start();\r\n\t}", "public void addStartListener(Consumer<JvmThread> consumer) {\n startListeners.add(consumer);\n }", "public ContainsNamedTypeChecker(String name) {\n myNames.add(name);\n }", "public IDefinition resolveProperty(IClassDefinition classDefinition, String propertyName)\n {\n Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);\n while (classIterator.hasNext())\n {\n IClassDefinition c = classIterator.next();\n \n ASScope classScope = ((ClassDefinition)c).getContainedScope();\n IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);\n if (definitionSet != null)\n {\n IDefinition winner = null;\n \n int n = definitionSet.getSize();\n for (int i = 0; i < n; i++)\n {\n IDefinition definition = definitionSet.getDefinition(i);\n \n // Look for vars and setters, but not getters.\n // Remember that getters and setters implement IVariableDefinition!\n if (definition instanceof IVariableDefinition &&\n !(definition instanceof IGetterDefinition))\n {\n // TODO Add namespace logic.\n // Can MXML set protected properties?\n // Can MXML set mx_internal properties if you've done\n // 'use namesapce mx_internal' in a <Script>?\n winner = definition;\n final INamespaceReference namespaceReference = definition.getNamespaceReference();\n final INamespaceDefinition thisNamespaceDef = namespaceReference.resolveNamespaceReference(this);\n final boolean isBindable = ((NamespaceDefinition)thisNamespaceDef).getAETNamespace().getName().equals(\n BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());\n // if we find a setter always take it, otherwise \n // keep looking for a setter\n if (winner instanceof ISetterDefinition && !isBindable)\n break;\n }\n }\n if (winner != null)\n {\n \tif (apiReportFile != null)\n \t\taddToAPIReport(classDefinition, winner);\n return winner;\n }\n }\n }\n \n return null;\n }", "protected void syncConsumeLoop(MessageConsumer requestConsumer) {\n try {\n Message message = requestConsumer.receive(5000);\n if (message != null) {\n onMessage(message);\n } else {\n System.err.println(\"No message received\");\n }\n } catch (JMSException e) {\n onException(e);\n }\n }", "public void search(final String word){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.lookup(word.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public int search (String name) {\n int result = -1;\n int offset = 0;\n\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].indexOf (name);\n if (result == -1)\n offset += q[i].size ();\n qLock[i].unlock ();\n if (result != -1)\n break;\n }\n\n if (result == -1)\n return result;\n\n return result + offset;\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "private Obj myFindForClass(String name, DesignatorIdent desIdent) {\n \tObj rez = findInMyScope(name); // provera da li je lokalna promenljiva trenutne funkcije\r\n \tif(rez!= Tab.noObj) {\r\n \t\treturn rez;\r\n \t}\r\n \t\r\n \tStruct classStruct = null;\r\n \tif(currentClass != null) {\r\n \t\tclassStruct = currentClass;\r\n \t}\r\n \telse {\r\n \t\tclassStruct = currentAbsClass;\r\n \t}\r\n \t\r\n \tObj resultObj = null;\r\n \tSymbolDataStructure members = Tab.currentScope().getOuter().getLocals(); // nisu dodati u classStruct, ali se nalaze u scope, vec su sig svi navedeni\r\n \t\r\n \twhile (classStruct != null) { // u sebi ga trazis ...ako si ga nasao pristupas preko implicitnog this!\r\n \t\tif (members != null) {\r\n \t\t\tresultObj = members.searchKey(name);\r\n \t\t\tif (resultObj != null) break;\r\n \t\t}\r\n \t\t\r\n \t\tclassStruct = classStruct.getElemType();\r\n \t\tif (classStruct != null) {\r\n \t\t\tmembers = classStruct.getMembersTable();\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (resultObj != null) {\r\n \t\tStruct trenutna = null;\r\n \t\tif (currentClass != null)\r\n \t\t\ttrenutna = currentClass;\r\n \t\tif (currentAbsClass != null)\r\n \t\t\ttrenutna = currentAbsClass;\r\n// \t\tif (trenutna == null) // dal je moguce? ---> jeste u main-u npr ---> ovde nece moci jel sig zovem iz klase...\r\n// \t\t\treturn;\r\n \t\t// znaci polje sam klase \"klasa\" ; zovem se sa . nesto...sig sam polje ili metoda klase\r\n \t\tif (resultObj.getKind() == Obj.Fld || resultObj.getKind() == Obj.Meth) { \r\n \t\t\tif (resultObj.getFpPos() == 1 || resultObj.getFpPos() == -9) { // public\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 2 || resultObj.getFpPos() == -8) { // protected\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 3 || resultObj.getFpPos() == -7) { // private\r\n \t\t\t\tif (trenutna != classStruct) {\r\n \t\t\t\t\treport_error(\"Greska na liniji \" + desIdent.getLine()+ \" : polju \"+desIdent.getName()+\" se ne sme pristupati na ovom mestu, private je!\", null);\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t\t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t\t \t\t\tcallFunctionClassField = 1;\r\n \t\t \t\t\treturn resultObj;\r\n \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 (resultObj.getKind() == Obj.Meth) {\r\n// \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n// \t\t\tcallFunctionClassField = 1;\r\n// \t\t}\r\n \t\treturn resultObj;\r\n \t}\r\n \t\r\n \tObj meth = Tab.find(name); // ako je global...\r\n \tif (meth.getKind() == Obj.Meth) {\r\n \t\treport_info(\"Detektovan poziv globalne f-je: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n\t\t\tcallFunctionClassField = 0;\r\n \t}\r\n \t\r\n \treturn meth;\r\n\t}", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@FXML\n private void searchName() {\n raise(new SearchNameEvent(name.getText()));\n }", "public List<MmathFighter> searchByName(String name) {\n String searchQuery = \"%\" + name + \"%\";\n\n String[] nameSplit = name.split(\" \");\n ExecutorService exec = Executors.newFixedThreadPool(nameSplit.length + 2);\n\n List<Future<List<MmathFighter>>> futures = new ArrayList<>();\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NICKNAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n if (nameSplit.length > 1) {\n futures.addAll(\n Stream.of(nameSplit)\n .map(s -> exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(s))\n .or(FIGHTERS.NICKNAME.like(s))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)\n )).collect(Collectors.toList())\n );\n }\n return futures.stream()\n .flatMap(f -> {\n try {\n return f.get().stream();\n } catch (InterruptedException | ExecutionException e) {\n return null;\n }\n })\n .filter(s -> s != null)\n .filter(distinctByKey(MmathFighter::getSherdogUrl)).limit(10).collect(Collectors.toList());\n }", "public interface Members<T extends Member> {\n\n /**\n * Declare a new property\n *\n * @param name the name of property\n * @param propertySupplier the property to add\n */\n void declare(String name, Supplier<T> propertySupplier);\n\n /**\n * Declare a new property\n *\n * @param property the property to add\n */\n default void declare(T property) {\n declare(property.getSimpleName(), () -> property);\n }\n\n /**\n * Get amount of properties\n *\n * @return the amount of properties\n */\n int size();\n\n /**\n * Check if container contains property with the given name\n *\n * @param name the name to search for\n * @return true if container contains property with the given name, otherwise false\n */\n boolean hasPropertyLike(String name);\n\n /**\n * Get properties with the given name\n *\n * @param name the name to search for\n * @return list of properties with the given name\n */\n List<? extends T> getPropertiesLike(String name);\n\n /**\n * Get properties declared in this container\n *\n * @return list of properties\n */\n List<? extends T> getDeclaredProperties();\n\n /**\n * Get all available properties\n *\n * @return the list of properties\n */\n List<? extends T> getProperties();\n\n /**\n * Get associated type\n *\n * @return the type\n */\n Type getType();\n\n}", "public void testInClassDeclaringType2() throws Exception {\n String contents = \n \"class Baz {\\n\" +\n \" def method = {\\n\" +\n \" other\\n\" +\n \" }\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Baz\", false, true);\n }", "public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }", "public static ArrayList<Member> findByName(String usr){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE name LIKE ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setString(1, \"%\"+usr+\"%\");\n \n //Execute the prepared statement\n ResultSet result = preparedStatement.executeQuery();\n \n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n members.add(new Member(memberId, name, email, phone, address, dob));\n }\n\n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }", "public Class getReadTask(SelectorThread selectorThread);", "public ArrayList<TakeStock> findMemberByName(String name) {\n\n matches.clear();\n\n for(TakeStock member : mTakeStockList) {\n\n if(member.getProducts_name().toLowerCase().contains(name)){\n matches.add(member);\n }\n\n }\n return matches; // return the matches, which is empty when no member with the given name was found\n }", "public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }", "public AccessibleObject getConsumerSite(String name) {\n return consumerSignatures.get(name);\n }", "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}", "public CompletableFuture<List<Details>> searchTweetByTopic(String topic) {\n\n List<Details> tweetData = new ArrayList<>();\n try {\n Query query = new Query(topic);\n query.setCount(100);\n listCompletableFuture = CompletableFuture.supplyAsync(() -> {\n QueryResult result = null;\n try {\n result = twitter.search(query);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }).thenApply((QueryResult result) -> {\n tweetStatusObjects = result.getTweets();\n return tweetStatusObjects;\n }).thenApply((tweetStatusObjects) -> {\n tweetStatusObjects.stream()\n .map((Status s) -> {\n tweetData.add(new Details(s.getUser().getName(), s.getUser().getLocation(),\n s.getUser().getFollowersCount(), s.getUser().getScreenName(), s.getText(),s.getHashtagEntities()));\n return tweetData;\n })\n .collect(Collectors.toList());\n return tweetData;\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return listCompletableFuture;\n }", "@Override\r\n\tpublic Member getMemberByName(String name) throws NotFoundException,\r\n\t\t\tExistException, MissingParameter, InvalidParameter {\n\t\treturn null;\r\n\t}", "protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "ClassMember search (ClassMember method) {\r\n ClassMember m = (ClassMember) by_name_table.get (method.type.toString ());\r\n\r\n if (m == null) return null;\r\n\r\n if (!((MethodType) m.type).return_type.isSame (((MethodType) method.type).return_type)) {\r\n /* overriding methods must be exactly same */\r\n OzcError.illegalOverride (method);\r\n return null;\r\n } \r\n\r\n if ((m.isPublic () && !method.isPublic ()) ||\r\n\t(m.isProtected () && method.isPrivate ())) {\r\n /* overriding methods must be more publicity */\r\n OzcError.illegalOverridePublicity (method);\r\n return null;\r\n }\r\n\r\n return m;\r\n }", "List<Contact> findByNameLike(String name);", "@Override\n\tpublic Symbol resolveMember(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// don't look in the enclosing scope for this one\n\t\t\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "public FindResult findClass(String className);", "static final void userFormClassNames(MemoryResultsSnapshot snapshot) {\n String[] classNames = snapshot == null ? null : snapshot.getClassNames();\n if (classNames != null) for (int i = 0; i < classNames.length; i++)\n classNames[i] = StringUtils.userFormClassName(classNames[i]);\n }", "PsiElement[] findCommentsContainingIdentifier( String identifier, SearchScope searchScope);", "public void setConsumer(Consumer consumer) {\n this.consumer = consumer;\n }", "public static LinkedList<Actor> nameSearch(String name) {\n //sets name to lower case\n String hname = name.toLowerCase();\n //hashes the lower cased name\n int hash = Math.abs(hname.hashCode()) % ActorList.nameHashlist.length;\n //finds the location of the linked list\n LinkedList<Actor> location = ActorList.nameHashlist[hash];\n //sets the head to the head of the linked list\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each Actor\n Actor actor = (Actor) head.nextDataLink.data;\n //checks the name of the actor to inputted name\n if (actor.getName().toLowerCase().equals(hname)) {\n //if it's the same it returns the actor\n return location;\n //or moves to next link\n } else {\n head = head.nextDataLink;\n }\n }\n //returns null if the list does not match input\n return null;\n\n\n }", "boolean processCommentsContainingIdentifier( String identifier, SearchScope searchScope, Processor<PsiElement> processor);", "Consumer getConsumer();", "public List<Resource> findByNameContaining(String nameFragment) {\n\t\tMap<String, Object> nameFilter = new HashMap<>();\n\t\tnameFilter.put(\"name\", new ValueParameter(\"%\" + nameFragment + \"%\"));\n\t\treturn this.filter(nameFilter);\n\t}", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }" ]
[ "0.7096554", "0.50843054", "0.50366586", "0.48764136", "0.48262504", "0.47705403", "0.47517523", "0.47299978", "0.4617511", "0.46082464", "0.45994157", "0.45530924", "0.4521071", "0.43467307", "0.42936614", "0.4264465", "0.42603046", "0.42453808", "0.4232241", "0.42291164", "0.4225105", "0.42237017", "0.42125657", "0.41605437", "0.4156222", "0.41519108", "0.41357374", "0.4111046", "0.41056472", "0.41042885", "0.41006815", "0.40890044", "0.40776256", "0.40702742", "0.4065944", "0.40635017", "0.40267435", "0.40254113", "0.40072894", "0.40034556", "0.39950207", "0.39816722", "0.39796108", "0.39780587", "0.39658034", "0.39433077", "0.39396688", "0.3939411", "0.39374882", "0.39215267", "0.39070943", "0.3900851", "0.39005616", "0.39003", "0.38932723", "0.3891599", "0.38913983", "0.38913983", "0.38754326", "0.3871934", "0.38713393", "0.38713393", "0.38713393", "0.38713393", "0.38713393", "0.38713393", "0.38713393", "0.38713393", "0.38713393", "0.38527367", "0.3849679", "0.38420165", "0.3837963", "0.38194546", "0.38168573", "0.38166294", "0.38124785", "0.38078475", "0.3806236", "0.3805412", "0.37979996", "0.37951896", "0.37892002", "0.37798837", "0.3778426", "0.37765107", "0.37743643", "0.37717676", "0.3768883", "0.37631384", "0.37613693", "0.37557498", "0.37542436", "0.37501016", "0.37458158", "0.37384847", "0.37384847", "0.37384847", "0.37384847", "0.37384847" ]
0.8359497
0
Searches for resolved and unresolved references to class members with the given name. The given consumer is invoked asynchronously on a different thread.
public void searchClassMemberReferences(String name, SearchIdConsumer consumer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchClassMemberDeclarations(String name, SearchIdConsumer consumer);", "private InjectionMetadata findReferenceMetadata(String beanName, Class<?> clazz, PropertyValues pvs) {\n String cacheKey = (StringUtils.hasLength(beanName) ? beanName : clazz.getName());\n // Quick check on the concurrent map first, with minimal locking.\n ReferenceInjectionMetadata metadata = this.injectionMetadataCache.get(cacheKey);\n if (InjectionMetadata.needsRefresh(metadata, clazz)) {\n synchronized (this.injectionMetadataCache) {\n metadata = this.injectionMetadataCache.get(cacheKey);\n if (InjectionMetadata.needsRefresh(metadata, clazz)) {\n if (metadata != null) {\n metadata.clear(pvs);\n }\n try {\n metadata = buildReferenceMetadata(clazz);\n this.injectionMetadataCache.put(cacheKey, metadata);\n } catch (NoClassDefFoundError err) {\n throw new IllegalStateException(\"Failed to introspect bean class [\" + clazz.getName() +\n \"] for reference metadata: could not find class that it depends on\", err);\n }\n }\n }\n }\n return metadata;\n }", "public interface ClassesByNameProvider {\n\n List<ReferenceType> get(String s);\n\n static ClassesByNameProvider createCache(List<ReferenceType> allTypes) {\n return new Cache(allTypes);\n }\n\n /**\n * Caching implementation for name based class provider.\n */\n final class Cache implements ClassesByNameProvider {\n\n private final ConcurrentHashMap<String, ReferenceType> myCache;\n\n public Cache(List<ReferenceType> classes) {\n myCache = new ConcurrentHashMap<>();\n classes.forEach(t -> myCache.put(t.signature(), t));\n }\n\n @Override\n public List<ReferenceType> get(String s) {\n String signature = VirtualMachineProxyImpl.JNITypeParserReflect.typeNameToSignature(s);\n if (signature != null) {\n return (List<ReferenceType>) myCache.get(signature);\n }\n return Collections.emptyList();\n }\n }\n}", "public static void search(final View view, final String name) {\r\n\t\tview.getStatus().setMessage(\"Searching ... \");\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tString path = jEdit.getProperty(\"options.javadoc.path\", \"\");\r\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(path, File.pathSeparator);\r\n\t\t\t\tArrayList<String> pathList = new ArrayList<String>();\r\n\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\tString dir = tokenizer.nextToken();\r\n\t\t\t\t\tBuffer packageList = jEdit.openTemporary(view, dir, \"package-list\", false);\r\n\t\t\t\t\tif (packageList == null || packageList.isNewFile()) {\r\n\t\t\t\t\t\tLog.log(Log.ERROR, JavadocPlugin.class, \"Invalid API root: \"+dir);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (int i = 0; i<packageList.getLineCount(); i++) {\r\n\t\t\t\t\t\tString pkg = packageList.getLineText(i).replace(\".\", File.separator);\r\n\t\t\t\t\t\tFile pkgDir = new File(dir, pkg);\r\n\t\t\t\t\t\tFile cls = new File(pkgDir, name+\".html\");\r\n\t\t\t\t\t\tif (cls.exists()) {\r\n\t\t\t\t\t\t\tpathList.add(cls.getPath());\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\tif (pathList.size() == 0) {\r\n\t\t\t\t\tview.getStatus().setMessageAndClear(\"Class \"+name+\" not found\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString chosenDoc = null;\r\n\t\t\t\tif (pathList.size() > 1) {\r\n\t\t\t\t\tchosenDoc = (String) JOptionPane.showInputDialog(view,\r\n\t\t\t\t\t\tjEdit.getProperty(\"msg.javadoc.resolve-class.message\"),\r\n\t\t\t\t\t\tjEdit.getProperty(\"msg.javadoc.resolve-class.title\"),\r\n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, pathList.toArray(), pathList.get(0));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tchosenDoc = pathList.get(0);\r\n\t\t\t\t}\r\n\t\t\t\tif (chosenDoc != null) {\r\n\t\t\t\t\tInfoViewerPlugin.openURL(view, new File(chosenDoc).toURI().toString());\r\n\t\t\t\t}\r\n\t\t\t\tview.getStatus().setMessage(\"\");\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}", "private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }", "public void fetchByName(String name) {\n\t\trefgservice.fetchNodesByName(name, new SearchByNameCallback());\n\t\t\n\t}", "private void\r\n findMemberType(@Nullable String name, Collection<IClass> result) throws CompileException {\n IClass[] memberTypes = this.getDeclaredIClasses();\r\n if (name == null) {\r\n result.addAll(Arrays.asList(memberTypes));\r\n } else {\r\n String memberDescriptor = Descriptor.fromClassName(\r\n Descriptor.toClassName(this.getDescriptor())\r\n + '$'\r\n + name\r\n );\r\n for (final IClass mt : memberTypes) {\r\n if (mt.getDescriptor().equals(memberDescriptor)) {\r\n result.add(mt);\r\n return;\r\n }\r\n }\r\n }\r\n\r\n // Examine superclass.\r\n {\r\n IClass superclass = this.getSuperclass();\r\n if (superclass != null) superclass.findMemberType(name, result);\r\n }\r\n\r\n // Examine interfaces.\r\n for (IClass i : this.getInterfaces()) i.findMemberType(name, result);\r\n\r\n // Examine enclosing type declarations.\r\n {\r\n IClass declaringIClass = this.getDeclaringIClass();\r\n IClass outerIClass = this.getOuterIClass();\r\n if (declaringIClass != null) {\r\n declaringIClass.findMemberType(name, result);\r\n }\r\n if (outerIClass != null && outerIClass != declaringIClass) {\r\n outerIClass.findMemberType(name, result);\r\n }\r\n }\r\n }", "@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }", "@Override\n\tpublic Symbol resolveMember(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// don't look in the enclosing scope for this one\n\t\t\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }", "public static void moduleClassScan(Consumer<? super Class> consumer, String packageName) {\n\n\n Set<Class<? extends Module>> allClasses = getModuleClasses(packageName);\n\n for (Class clazz : allClasses) {\n\n consumer.accept(clazz);\n }\n }", "ClassMember search (String name, MethodType type, int access,\r\n\t\t int modifier_mask) {\r\n IdentifierList methods = (IdentifierList) get (name);\r\n\r\n if (methods == null) return null;\r\n\r\n java.util.Enumeration ms = methods.elements ();\r\n\r\n ClassMember more_specific = null;\r\n while (ms.hasMoreElements ()) {\r\n ClassMember m = (ClassMember) ms.nextElement ();\r\n\r\n int diff;\r\n try {\r\n\tdiff = m.type.compare (type);\r\n } catch (TypeMismatch e) {\r\n\tcontinue;\r\n }\r\n\r\n if (diff < 0) continue;\r\n\r\n int m_access = m.getAccess ();\r\n\r\n if (access == Constants.PROTECTED) {\r\n\tif (m_access == Constants.PRIVATE) continue;\r\n } else if (access == Constants.PUBLIC) {\r\n\tif (m_access != Constants.PUBLIC) continue;\r\n }\r\n\t \r\n if (modifier_mask > 0 &&\r\n\t ((m.getModifier () & modifier_mask) == 0)) continue;\r\n\r\n if (diff == 0) return m;\r\n\r\n if (more_specific == null) {\r\n\tmore_specific = m;\r\n\tcontinue;\r\n }\r\n\r\n try {\r\n\tif (((MethodType) m.type).isMoreSpecific ((MethodType) more_specific.type))\r\n\t more_specific = m;\r\n } catch (OverloadingAmbiguous ex) {\r\n\t/* this overloading is ambiguous */\r\n\tOzcError.overloadingAmbiguous (m);\r\n\treturn ClassMember.ANY;\r\n }\r\n }\r\n\r\n return more_specific;\r\n }", "@Override\n\tpublic MemberBean[] findByName(String name) {\n\t\treturn null;\n\t}", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }", "int hint_for(ThreadContext tc, RakudoObject classHandle, String name);", "@SuppressWarnings(\"unused\")\r\n\t\tpublic static void resolveSearchInMembersScopeForFunction(CommonScopeLookup search, Reference retType) {\n\t\t}", "public final java.util.Collection<kotlin.reflect.jvm.internal.KCallableImpl<?>> getMembers(kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope r8, kotlin.reflect.jvm.internal.KDeclarationContainerImpl.MemberBelonginess r9) {\n /*\n r7 = this;\n java.lang.String r0 = \"scope\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)\n java.lang.String r0 = \"belonginess\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)\n kotlin.reflect.jvm.internal.KDeclarationContainerImpl$getMembers$visitor$1 r0 = new kotlin.reflect.jvm.internal.KDeclarationContainerImpl$getMembers$visitor$1\n r0.<init>(r7, r7)\n kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope r8 = (kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope) r8\n r1 = 0\n r2 = 3\n java.util.Collection r8 = kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope.DefaultImpls.getContributedDescriptors$default(r8, r1, r1, r2, r1)\n java.lang.Iterable r8 = (java.lang.Iterable) r8\n java.util.ArrayList r2 = new java.util.ArrayList\n r2.<init>()\n java.util.Collection r2 = (java.util.Collection) r2\n java.util.Iterator r8 = r8.iterator()\n L_0x0024:\n boolean r3 = r8.hasNext()\n if (r3 == 0) goto L_0x005e\n java.lang.Object r3 = r8.next()\n kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor r3 = (kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor) r3\n boolean r4 = r3 instanceof kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor\n if (r4 == 0) goto L_0x0057\n r4 = r3\n kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor r4 = (kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor) r4\n kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility r5 = r4.getVisibility()\n kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility r6 = kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.INVISIBLE_FAKE\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r6)\n r5 = r5 ^ 1\n if (r5 == 0) goto L_0x0057\n boolean r4 = r9.accept(r4)\n if (r4 == 0) goto L_0x0057\n r4 = r0\n kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorVisitor r4 = (kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorVisitor) r4\n kotlin.Unit r5 = kotlin.Unit.INSTANCE\n java.lang.Object r3 = r3.accept(r4, r5)\n kotlin.reflect.jvm.internal.KCallableImpl r3 = (kotlin.reflect.jvm.internal.KCallableImpl) r3\n goto L_0x0058\n L_0x0057:\n r3 = r1\n L_0x0058:\n if (r3 == 0) goto L_0x0024\n r2.add(r3)\n goto L_0x0024\n L_0x005e:\n java.util.List r2 = (java.util.List) r2\n java.lang.Iterable r2 = (java.lang.Iterable) r2\n java.util.List r8 = kotlin.collections.CollectionsKt.toList(r2)\n java.util.Collection r8 = (java.util.Collection) r8\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.KDeclarationContainerImpl.getMembers(kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.KDeclarationContainerImpl$MemberBelonginess):java.util.Collection\");\n }", "<T> T resolve(String name, Class<T> type);", "boolean isResolvable(String name, Class<?> type);", "private ResolvedJavaClassInfo validateObjectPart(ObjectPart objectPart, Section ownerSection, String projectUri,\r\n\t\t\tResolutionContext resolutionContext, List<Diagnostic> diagnostics,\r\n\t\t\tList<CompletableFuture<?>> resolvingJavaTypeFutures) {\n\t\tJavaMemberInfo javaMember = resolutionContext.findMemberWithObject(objectPart.getPartName(), projectUri);\r\n\t\tif (javaMember != null) {\r\n\t\t\treturn resolveJavaType(javaMember.getMemberType(), projectUri,\r\n\t\t\t\t\t() -> QutePositionUtility.createRange(objectPart), diagnostics, resolvingJavaTypeFutures);\r\n\t\t}\r\n\r\n\t\tJavaTypeInfoProvider javaTypeInfo = objectPart.resolveJavaType();\r\n\t\tif (javaTypeInfo == null) {\r\n\t\t\t// ex : {item} --> undefined variable\r\n\t\t\tRange range = QutePositionUtility.createRange(objectPart);\r\n\t\t\tDiagnostic diagnostic = createDiagnostic(range, DiagnosticSeverity.Warning, QuteErrorCode.UndefinedVariable,\r\n\t\t\t\t\tobjectPart.getPartName());\r\n\t\t\t// Create data information helpful for code action\r\n\t\t\tdiagnostic.setData(DiagnosticDataFactory.createUndefinedVariableData(objectPart.getPartName(),\r\n\t\t\t\t\townerSection != null && ownerSection.isIterable()));\r\n\t\t\tdiagnostics.add(diagnostic);\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tString javaTypeToResolve = javaTypeInfo.getJavaType();\r\n\t\tif (javaTypeToResolve == null) {\r\n\t\t\t// case of (#for item as data.items) where data.items expression must be\r\n\t\t\t// evaluated\r\n\t\t\tExpression expression = javaTypeInfo.getJavaTypeExpression();\r\n\t\t\tif (expression != null) {\r\n\t\t\t\tString literalJavaType = expression.getLiteralJavaType();\r\n\t\t\t\tif (literalJavaType != null) {\r\n\t\t\t\t\tjavaTypeToResolve = literalJavaType;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tPart lastPart = expression.getLastPart();\r\n\t\t\t\t\tif (lastPart != null) {\r\n\t\t\t\t\t\tResolvedJavaClassInfo alias = javaCache.resolveJavaType(lastPart, projectUri).getNow(null);\r\n\t\t\t\t\t\tif (alias != null) {\r\n\t\t\t\t\t\t\tjavaTypeToResolve = alias.getClassName();\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\treturn validateJavaTypePart(objectPart, ownerSection, projectUri, diagnostics, resolvingJavaTypeFutures,\r\n\t\t\t\tjavaTypeToResolve);\r\n\t}", "protected Set<Element> getMembersFromJavaSource(final String clazzname, final ElementUtilities.ElementAcceptor acceptor) {\n final Set<Element> ret = new LinkedHashSet<>();\n JavaSource javaSource = getJavaSourceForClass(clazzname);\n if (javaSource != null) {\n try {\n javaSource.runUserActionTask(new Task<CompilationController>() {\n @Override\n public void run(CompilationController controller) throws IOException {\n controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);\n TypeElement classElem = controller.getElements().getTypeElement(clazzname);\n if (classElem == null) {\n return;\n }\n ElementUtilities eu = controller.getElementUtilities();\n\n Iterable<? extends Element> members = eu.getMembers(classElem.asType(), acceptor);\n for (Element e : members) {\n ret.add(e);\n }\n }\n }, false);\n }\n catch (IOException ioe) {\n Exceptions.printStackTrace(ioe);\n }\n }\n return ret;\n }", "static void scan(Class<?> aClass, BiConsumer<Method, Annotation> consumer) {\n if (Object.class.equals(aClass)) {\n return;\n }\n\n if (!isInstantiable(aClass)) {\n return;\n }\n for (Method method : aClass.getMethods()) {\n scan(consumer, aClass, method);\n }\n }", "public IDefinition resolveProperty(IClassDefinition classDefinition, String propertyName)\n {\n Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);\n while (classIterator.hasNext())\n {\n IClassDefinition c = classIterator.next();\n \n ASScope classScope = ((ClassDefinition)c).getContainedScope();\n IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);\n if (definitionSet != null)\n {\n IDefinition winner = null;\n \n int n = definitionSet.getSize();\n for (int i = 0; i < n; i++)\n {\n IDefinition definition = definitionSet.getDefinition(i);\n \n // Look for vars and setters, but not getters.\n // Remember that getters and setters implement IVariableDefinition!\n if (definition instanceof IVariableDefinition &&\n !(definition instanceof IGetterDefinition))\n {\n // TODO Add namespace logic.\n // Can MXML set protected properties?\n // Can MXML set mx_internal properties if you've done\n // 'use namesapce mx_internal' in a <Script>?\n winner = definition;\n final INamespaceReference namespaceReference = definition.getNamespaceReference();\n final INamespaceDefinition thisNamespaceDef = namespaceReference.resolveNamespaceReference(this);\n final boolean isBindable = ((NamespaceDefinition)thisNamespaceDef).getAETNamespace().getName().equals(\n BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());\n // if we find a setter always take it, otherwise \n // keep looking for a setter\n if (winner instanceof ISetterDefinition && !isBindable)\n break;\n }\n }\n if (winner != null)\n {\n \tif (apiReportFile != null)\n \t\taddToAPIReport(classDefinition, winner);\n return winner;\n }\n }\n }\n \n return null;\n }", "@Override\n public Object get(String name, ObjectFactory<?> objectFactory) {\n Map<String, Object> mapForThisThread = beanMap.get();\n\n Object obj = mapForThisThread.get(name);\n if(obj != null) {\n log.info(\"get {} resolved from scope\", name);\n return obj;\n }\n obj = objectFactory.getObject();\n mapForThisThread.put(name, obj);\n log.info(\"get {} resolved from factory\", name);\n return obj;\n }", "@Override\n\t@Transactional\n\tpublic List<IoMember> searchMember(String name) {\n\t\treturn memberDao.searchMember(name);\n\t}", "Consumer getConsumer();", "@Override\n\tpublic void searchMembers(String keyword) {\n\t}", "public AccessibleObject getConsumerSite(String name) {\n return consumerSignatures.get(name);\n }", "Lookup lookup(Member member) {\n MethodHandles.Lookup lookup = privateLookup;\n if (lookup != null) {\n return lookup;\n }\n\n // See if we need private access, otherwise just return ordinary lookup.\n\n // Needs private lookup, unless class is public or protected and member is public\n // We are comparing against the members declaring class..\n // We could store boolean isPublicOrProcected in a field.\n // But do not know how it would work with abstract super classes in other modules...\n\n // See if we need private access, otherwise just return ordinary lookup.\n if (!needsPrivateLookup(member)) {\n // Hmm\n // return lookup;\n }\n\n String pckName = beanClass.getPackageName();\n Module beanModule = beanClass.getModule();\n\n // See if the bean's package is open to app.packed.base\n if (!beanModule.isOpen(pckName, APP_PACKED_BASE_MODULE)) {\n String otherModule = beanModule.getName();\n String thisModule = APP_PACKED_BASE_MODULE.getName();\n throw new InaccessibleBeanMemberException(\"In order to access '\" + StringFormatter.format(beanClass) + \"', the module '\" + otherModule\n + \"' must be open to '\" + thisModule + \"'. This can be done, for example, by adding 'opens \" + pckName + \" to \" + thisModule\n + \";' to the module-info.java file for \" + otherModule);\n }\n\n // Should we use lookup.getdeclaringClass???\n APP_PACKED_BASE_MODULE.addReads(beanModule);\n\n // Create and cache a private lookup.\n try {\n // Fjernede lookup... Skal vitterligt have samlet det i en klasse\n return privateLookup = MethodHandles.privateLookupIn(beanClass, MethodHandles.lookup() /* lookup */);\n } catch (IllegalAccessException e) {\n throw new InaccessibleBeanMemberException(\"Could not create private lookup [type=\" + beanClass + \", Member = \" + member + \"]\", e);\n }\n }", "public <C extends Document & HasEnabled> T with(final Class<C> type, final String name, final Consumer<C> consumer) {\n requireNonNulls(type, name, consumer);\n //@SuppressWarnings(\"unchecked\")\n //final Consumer<? extends Document> consumerCasted = (Consumer<? extends Document>)consumer;\n withsNamed.add(Tuples.of(type, name, consumer));\n return self();\n }", "public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }", "public interface ConsumerRunnable {\n public void consumer(long offset, String msg);\n}", "private AMethod lookupMethodImplementedInterfaces(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tType t = (Type) e.nextElement();\n\t\t\tAClass cl = t.getRefType();\n\t\t\tcandidate =\n\t\t\t\tcl.lookupMethodInterface(\n\t\t\t\t\tconfig,\n\t\t\t\t\tmth_name,\n\t\t\t\t\tparam_types,\n\t\t\t\t\tcandidate);\n\t\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t}\n\n\t\treturn candidate;\n\t}", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "private static void scan(BiConsumer<Method, Annotation> consumer, Class<?> aClass, Method method) {\n if (Object.class.equals(method.getDeclaringClass())) {\n return;\n }\n scan(consumer, aClass, method, method.getAnnotations());\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tdoSearch(name, count);\n\t\t\t}", "public void search(final String word){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.lookup(word.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n public JavaClass findClass(final String className) {\n final SoftReference<JavaClass> ref = loadedClasses.get(className);\n if (ref == null) {\n return null;\n}\n return ref.get();\n }", "public abstract List<String> scanAllClassNames();", "public static ClassObj findClass(@NonNull Snapshot snapshot, String name) {\n return snapshot.findClass(name);\n }", "private Object retrieveObject(String name)\r\n {\r\n Object retVal = null;\r\n\r\n // retrieve the object that the weak reference refers to, if any\r\n WeakReference ref = (WeakReference) nameObjects.get(name);\r\n if (ref != null)\r\n {\r\n retVal = ref.get();\r\n }\r\n \r\n return retVal;\r\n }", "public static Object lookupBean(String name) {\n BeanManager manager = lookupBeanManager();\n Set<Bean<?>> beans = manager.getBeans(name);\n if (beans != null && !beans.isEmpty()) {\n Bean<?> bean = beans.iterator().next();\n CreationalContext<?> context = manager.createCreationalContext(bean);\n return manager.getReference(bean, Object.class, context);\n }\n return null;\n }", "public AMethod lookupMethodClass(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in super classes for better methods\n\t\tif (!isObject()) {\n\t\t\tAClass super_class = getSuperClass();\n\n\t\t\treturn super_class.lookupMethodClass(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\t} else {\n\t\t\treturn candidate;\n\t\t}\n\t}", "protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}", "Consumer getConsumerById(String consumerId) throws IllegalArgumentException, RegistrationException;", "private static void checkResolvedClassMethodReference(final CALCompiler compiler, final ParseTreeNode nameNode, final QualifiedName qualifiedName) {\r\n if (compiler.getDeprecationScanner().isFunctionOrClassMethodDeprecated(qualifiedName)) {\r\n compiler.logMessage(new CompilerMessage(nameNode, new MessageKind.Warning.DeprecatedClassMethod(qualifiedName)));\r\n }\r\n }", "boolean isResolvable(String name);", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "<T extends Message> void visitConsumer(Class<T> consumedType, MethodHandle handle);", "private static Iterable<String> calcClosure(List<String> classes) {\n Set<String> ret = new HashSet<String>();\n\n List<String> newClasses = new ArrayList<String>();\n for (String cName : classes) {\n newClasses.add(cName);\n ret.add(cName);\n }\n\n boolean updating = true;\n while (updating) {\n updating = false;\n classes = newClasses;\n newClasses = new ArrayList<String>();\n for (String cName : classes) {\n Set<String> nC = new HashSet<String>();\n Analysis as = new Analysis() {\n @Override\n public ClassVisitor getClassVisitor() {\n return new ReachingClassAnalysis(Opcodes.ASM5, null, nC);\n }\n };\n\n try {\n as.analyze(cName);\n } catch (IOException ex) {\n System.err.println(\"WARNING: IOError handling: \" + cName);\n System.err.println(ex);\n }\n\n for (String cn : nC) {\n if (!ret.contains(cn) &&\n !cn.startsWith(\"[\")) {\n ret.add(cn);\n newClasses.add(cn);\n updating = true;\n }\n }\n }\n }\n\n System.err.println(\"Identified \" + ret.size() +\n \" potentially reachable classes\");\n\n return ret;\n }", "@Override\n\tpublic finalDataBean findByName(String name) throws Exception {\n\t\treturn null;\n\t}", "default Object resolve(String name) {\n return resolve(name, Object.class);\n }", "private void getMovieIDs(String name) {\n\n Thread t1 = new Thread(new Runnable() {\n @Override\n public void run() {\n extractIDsfromJson(NetworkUtils.getMovieIDasJson(name));\n }\n });\n t1.start();\n\n\n }", "public org.omg.CORBA.Object resolve(String name)\n {\n NameComponent nc = new NameComponent(name, \"Object\");\n NameComponent path[] = {nc};\n org.omg.CORBA.Object objRef = null;\n try\n {\n objRef = namingContext.resolve(path);\n }\n catch (Exception e)\n {\n fatalError(\"Cound not get object with name \\\"\" + name +\n \"\\\" from NameService\", e);\n }\n return objRef;\n }", "public void getAssists(String file, int offset, int length, AssistsConsumer consumer);", "public void setConsumer(Consumer consumer) {\n this.consumer = consumer;\n }", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "@Override\n\tpublic List<DiscoveredMember> list() throws DiscoveryException {\n\t\tif(this.myself == null) {\n\t\t\tthrow new DiscoveryException(\"Jmdns not yet registered!!!\");\n\t\t}\n\t\t\n\t\tServiceInfo[] list = this.jmDns.list(this.type);\n\t\tList<DiscoveredMember> members = new ArrayList<DiscoveredMember>();\n\n\t\tfor (ServiceInfo info : list) {\n\t\t\tif (!info.getName().equals(this.myself.getName())\n\t\t\t\t\t&& info.getName().startsWith(this.cloudName)) {\n\t\t\t\t//todo-discovery: it could lead to problems if it retunrs multiple inetAdresses\n\t\t\t\tfor (InetAddress ad : info.getInetAddresses()) {\n\t\t\t\t\tDiscoveredMember member = discoveredMemberProvider.get();\n\t\t\t\t\tmember.setInetAdresses(ad);\n\t\t\t\t\tmember.setPort(info.getPort());\n\t\t\t\t\tmember.setName(info.getName());\n\t\t\t\t\tmembers.add(member);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tPieLogger.trace(this.getClass(), \"We discovered {} members!\", members.size());\n\n\t\treturn members;\n\t}", "@Override public Collection<Annotation> resolve(String datasourceName,\n Collection<Annotation> annotationsToResolve)\n throws ZoomaResolutionException {\n if (executor.isShutdown()) {\n throw new IllegalStateException(\"Cannot resolve annotations - resolver service has been shutdown\");\n }\n\n List<Annotation> annotations;\n if (annotationsToResolve instanceof List) {\n annotations = (List<Annotation>) annotationsToResolve;\n }\n else {\n annotations = new ArrayList<>();\n annotations.addAll(annotationsToResolve);\n }\n final List<Annotation> syncedAnnotations = Collections.synchronizedList(annotations);\n\n // first, resolve single annotations\n final Collection<Annotation> resolvedAnnotations = Collections.synchronizedSet(new HashSet<Annotation>());\n final WorkloadScheduler scheduler =\n new WorkloadScheduler(executor, annotationsToResolve.size(), \"Annotation-Resolver-\" + datasourceName) {\n @Override protected void executeTask(int iteration) throws Exception {\n Annotation annotationToResolve = syncedAnnotations.get(iteration - 1);\n getLog().trace(\"Executing runnable to resolve annotation \" + annotationToResolve.getURI());\n Annotation resolvedAnnotation = resolve(annotationToResolve);\n if (resolvedAnnotation != null) {\n resolvedAnnotations.add(resolvedAnnotation);\n }\n getLog().trace(\"Resolved annotation \" + annotationToResolve.getURI());\n }\n };\n scheduler.start();\n\n int count = -1;\n int total = annotationsToResolve.size();\n try {\n while (true) {\n try {\n scheduler.waitUntilComplete();\n break;\n }\n catch (InterruptedException e) {\n getLog().debug(\"Interrupted whilst waiting for annotations resolution to finish, continuing\");\n }\n }\n }\n catch (RuntimeException e) {\n getLog().error(\"Execution of annotation resolving failed (\" + e.getMessage() + \"). \" +\n \"Completed \" + count + \"/\" + total + \".\", e);\n if (e.getCause() instanceof ZoomaResolutionException) {\n throw (ZoomaResolutionException) e.getCause();\n }\n else {\n throw new ZoomaResolutionException(\"A resolver task failed\", e);\n }\n }\n\n // then filter out annotations with no semantic tag\n return filter(resolvedAnnotations);\n }", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "public AsyncLoadingHandler obtain(EntityQueryCriteria<E> criteria, AsyncCallback<EntitySearchResult<E>> handlingCallback);", "public Cancellable getDependencies(DependenciesProvider.Receiver r) {\n ResolvedDependencies d = null;\n synchronized (this) {\n if (deps != null) {\n d = deps;\n }\n }\n if (d != null) {\n r.receive(d);\n return null;\n }\n DependenciesProvider p = project.getLookup().lookup(DependenciesProvider.class);\n if (p != null) {\n R receiver = new R(r);\n return p.requestDependencies(receiver);\n }\n return null;\n }", "public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }", "public void testInClosureDeclaringType2() throws Exception {\n String contents = \n \"class Baz {\\n\" +\n \" def method() { }\\n\" +\n \"}\\n\" +\n \"class Bar extends Baz {\\n\" +\n \"}\\n\" +\n \"new Bar().method {\\n \" +\n \" other\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Search\", false, true);\n }", "@Override\r\n\tpublic Member getMemberByName(String name) throws NotFoundException,\r\n\t\t\tExistException, MissingParameter, InvalidParameter {\n\t\treturn null;\r\n\t}", "interface Consumer {\n /**\n * Consume a message.\n * \n * @param entry\n * A log entry converted to hash.\n */\n public void consume(Map<String, Object> entry);\n\n /**\n * Shutdown the consumer thread, waiting for it to finish.\n */\n public void shutdown();\n}", "@Override\n public synchronized QueueMessage pull(String queueName, long visibilityTimeout) {\n int startReadLocation = this.readQueueLocation;\n QueueMessage message = null;\n boolean search = true;\n\n while(search) {\n message = this.ringBufferQueue[startReadLocation];\n\n // If we have a message and it's not 'locked' thats who we want\n if(message != null && message.getTimeout() <= System.currentTimeMillis()) {\n message.setTimeout(System.currentTimeMillis() + visibilityTimeout);\n search = false;\n }\n // Wrap around search\n startReadLocation = this.incrementPosition(startReadLocation);\n\n // We have looked at every element found nothing to do\n if(startReadLocation == this.pushQueueLocation && search) {\n message = null;\n search = false;\n }\n }\n\n return message;\n }", "@Override\n public ClassInfo findClass(String fqcn) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n return classLookup.get(fqcn);\n }", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "private void onClassesFound(List<UMDClass> classes) {\n\t}", "Member getWidenedMatchingMember(String memberPath);", "public Class getReadTask(SelectorThread selectorThread);", "Map<String, ExternalIdentityRef> getDeclaredMemberRefs(ExternalIdentityRef ref, String dn) throws ExternalIdentityException {\n if (!isMyRef(ref)) {\n return Collections.emptyMap();\n }\n LdapConnection connection = null;\n try {\n Map<String, ExternalIdentityRef> members = new HashMap<>();\n DebugTimer timer = new DebugTimer();\n connection = connect();\n timer.mark(MARKER_CONNECT);\n Entry entry = connection.lookup(dn);\n timer.mark(MARKER_LOOKUP);\n Attribute attr = entry.get(config.getGroupMemberAttribute());\n if (attr == null) {\n log.warn(\"LDAP group does not have configured attribute: {}\", config.getGroupMemberAttribute());\n } else {\n for (Value value: attr) {\n ExternalIdentityRef memberRef = new ExternalIdentityRef(value.getString(), this.getName());\n members.put(memberRef.getId(), memberRef);\n }\n }\n timer.mark(\"iterate\");\n log.debug(\"members lookup of {} found {} members. {}\", ref.getId(), members.size(), timer);\n\n return members;\n } catch (Exception e) {\n throw error(e, \"Error during ldap group members lookup.\");\n } finally {\n disconnect(connection);\n }\n }", "protected Object resolve(String roleName) throws ComponentException \n\t{\n\t\treturn lookup(roleName);\n\t}", "void search( RealLocalizable reference );", "@Override\n public BrokerMessageListener fetchByName(long companyId, String name,\n boolean retrieveFromCache) throws SystemException {\n Object[] finderArgs = new Object[] { companyId, name };\n\n Object result = null;\n\n if (retrieveFromCache) {\n result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_NAME,\n finderArgs, this);\n }\n\n if (result instanceof BrokerMessageListener) {\n BrokerMessageListener brokerMessageListener = (BrokerMessageListener) result;\n\n if ((companyId != brokerMessageListener.getCompanyId()) ||\n !Validator.equals(name, brokerMessageListener.getName())) {\n result = null;\n }\n }\n\n if (result == null) {\n StringBundler query = new StringBundler(4);\n\n query.append(_SQL_SELECT_BROKERMESSAGELISTENER_WHERE);\n\n query.append(_FINDER_COLUMN_NAME_COMPANYID_2);\n\n boolean bindName = false;\n\n if (name == null) {\n query.append(_FINDER_COLUMN_NAME_NAME_1);\n } else if (name.equals(StringPool.BLANK)) {\n query.append(_FINDER_COLUMN_NAME_NAME_3);\n } else {\n bindName = true;\n\n query.append(_FINDER_COLUMN_NAME_NAME_2);\n }\n\n String sql = query.toString();\n\n Session session = null;\n\n try {\n session = openSession();\n\n Query q = session.createQuery(sql);\n\n QueryPos qPos = QueryPos.getInstance(q);\n\n qPos.add(companyId);\n\n if (bindName) {\n qPos.add(name);\n }\n\n List<BrokerMessageListener> list = q.list();\n\n if (list.isEmpty()) {\n FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_NAME,\n finderArgs, list);\n } else {\n BrokerMessageListener brokerMessageListener = list.get(0);\n\n result = brokerMessageListener;\n\n cacheResult(brokerMessageListener);\n\n if ((brokerMessageListener.getCompanyId() != companyId) ||\n (brokerMessageListener.getName() == null) ||\n !brokerMessageListener.getName().equals(name)) {\n FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_NAME,\n finderArgs, brokerMessageListener);\n }\n }\n } catch (Exception e) {\n FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_NAME,\n finderArgs);\n\n throw processException(e);\n } finally {\n closeSession(session);\n }\n }\n\n if (result instanceof List<?>) {\n return null;\n } else {\n return (BrokerMessageListener) result;\n }\n }", "default <T> List<T> resolve(String[] names, Class<T> type) {\n List<T> resolved = new ArrayList<>();\n for (String name : names) {\n resolved.add(resolve(name, type));\n }\n return resolved;\n }", "public interface MqConsumer {\n}", "@Override\n public V get(final K name, final Supplier<V> supplier)\n {\n V value = get(name);\n\n if (value == null)\n {\n value = supplier.get();\n put(name, value);\n }\n\n return value;\n }", "protected Runnable listMembers() {\n return () -> {\n while (enableHa) {\n try {\n if (Thread.currentThread().isInterrupted()) {\n break;\n }\n NotificationServiceOuterClass.ListMembersRequest request =\n NotificationServiceOuterClass.ListMembersRequest.newBuilder()\n .setTimeoutSeconds(listMemberIntervalMs / 1000)\n .build();\n NotificationServiceOuterClass.ListMembersResponse response = notificationServiceStub.listMembers(request);\n if (response.getReturnCode() == NotificationServiceOuterClass.ReturnStatus.SUCCESS) {\n livingMembers = new HashSet<>(response.getMembersList());\n } else {\n logger.warn(response.getReturnMsg());\n selectValidServer();\n }\n } catch (Exception e) {\n e.printStackTrace();\n logger.warn(\"Error while listening notification\");\n selectValidServer();\n }\n }\n };\n }", "protected void syncConsumeLoop(MessageConsumer requestConsumer) {\n try {\n Message message = requestConsumer.receive(5000);\n if (message != null) {\n onMessage(message);\n } else {\n System.err.println(\"No message received\");\n }\n } catch (JMSException e) {\n onException(e);\n }\n }", "RequestSender onRefuse(Consumer<Message> consumer);", "<T extends java.lang.reflect.Member> T reflectAs(Class<T> expected, MethodHandles.Lookup lookup);", "Observable<AppNameAvailabilityInfo> checkNameAvailabilityAsync(String name);", "private Obj myFindForClass(String name, DesignatorIdent desIdent) {\n \tObj rez = findInMyScope(name); // provera da li je lokalna promenljiva trenutne funkcije\r\n \tif(rez!= Tab.noObj) {\r\n \t\treturn rez;\r\n \t}\r\n \t\r\n \tStruct classStruct = null;\r\n \tif(currentClass != null) {\r\n \t\tclassStruct = currentClass;\r\n \t}\r\n \telse {\r\n \t\tclassStruct = currentAbsClass;\r\n \t}\r\n \t\r\n \tObj resultObj = null;\r\n \tSymbolDataStructure members = Tab.currentScope().getOuter().getLocals(); // nisu dodati u classStruct, ali se nalaze u scope, vec su sig svi navedeni\r\n \t\r\n \twhile (classStruct != null) { // u sebi ga trazis ...ako si ga nasao pristupas preko implicitnog this!\r\n \t\tif (members != null) {\r\n \t\t\tresultObj = members.searchKey(name);\r\n \t\t\tif (resultObj != null) break;\r\n \t\t}\r\n \t\t\r\n \t\tclassStruct = classStruct.getElemType();\r\n \t\tif (classStruct != null) {\r\n \t\t\tmembers = classStruct.getMembersTable();\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (resultObj != null) {\r\n \t\tStruct trenutna = null;\r\n \t\tif (currentClass != null)\r\n \t\t\ttrenutna = currentClass;\r\n \t\tif (currentAbsClass != null)\r\n \t\t\ttrenutna = currentAbsClass;\r\n// \t\tif (trenutna == null) // dal je moguce? ---> jeste u main-u npr ---> ovde nece moci jel sig zovem iz klase...\r\n// \t\t\treturn;\r\n \t\t// znaci polje sam klase \"klasa\" ; zovem se sa . nesto...sig sam polje ili metoda klase\r\n \t\tif (resultObj.getKind() == Obj.Fld || resultObj.getKind() == Obj.Meth) { \r\n \t\t\tif (resultObj.getFpPos() == 1 || resultObj.getFpPos() == -9) { // public\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 2 || resultObj.getFpPos() == -8) { // protected\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 3 || resultObj.getFpPos() == -7) { // private\r\n \t\t\t\tif (trenutna != classStruct) {\r\n \t\t\t\t\treport_error(\"Greska na liniji \" + desIdent.getLine()+ \" : polju \"+desIdent.getName()+\" se ne sme pristupati na ovom mestu, private je!\", null);\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t\t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t\t \t\t\tcallFunctionClassField = 1;\r\n \t\t \t\t\treturn resultObj;\r\n \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 (resultObj.getKind() == Obj.Meth) {\r\n// \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n// \t\t\tcallFunctionClassField = 1;\r\n// \t\t}\r\n \t\treturn resultObj;\r\n \t}\r\n \t\r\n \tObj meth = Tab.find(name); // ako je global...\r\n \tif (meth.getKind() == Obj.Meth) {\r\n \t\treport_info(\"Detektovan poziv globalne f-je: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n\t\t\tcallFunctionClassField = 0;\r\n \t}\r\n \t\r\n \treturn meth;\r\n\t}", "public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}", "Member getWidenedMatchingMember(String[] memberPath);", "public void resolveInternalDependencies()\n {\n List<Dependency> dependencies = getUnresolvedDependencies();\n\n for (Dependency dependency : dependencies)\n {\n List<Target> allTargets = getTargets();\n\n for (Target target : allTargets)\n {\n String dependencyName = dependency.getName();\n String targetName = target.getName();\n\n System.out.println(\"Antfile.resolveInternalDependencies dependencyName, targetName = \" + dependencyName + \" \" + targetName);\n\n if (dependencyName == null)\n {\n System.out.println(\"Antfile.resolveInternalDependencies dependency = \" + dependency);\n }\n else if (dependencyName.equals(targetName))\n {\n dependency.setResolved(true);\n\n break;\n }\n }\n }\n }", "<T> IMessageFetcher<T> createFetcher(String queueName, Consumer<T> itemConsumer);", "private int matchLevel(QualifiedNameReference qNameRef, boolean resolve) {\n if (!resolve) {\n if (this.pkgName == null) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n switch (this.matchMode) {\n case EXACT_MATCH:\n case PREFIX_MATCH:\n if (CharOperation.prefixEquals(this.pkgName, CharOperation.concatWith(qNameRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n case PATTERN_MATCH:\n char[] pattern = this.pkgName[this.pkgName.length-1] == '*' ? this.pkgName : CharOperation.concat(this.pkgName, \".*\".toCharArray()); //$NON-NLS-1$\n if (CharOperation.match(pattern, CharOperation.concatWith(qNameRef.tokens, '.'), this.isCaseSensitive)) {\n return this.needsResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n default:\n return IMPOSSIBLE_MATCH; } }\n } else {\n Binding binding = qNameRef.binding;\n if (binding == null) {\n return INACCURATE_MATCH;\n } else {\n TypeBinding typeBinding = null;\n char[][] tokens = qNameRef.tokens;\n int lastIndex = tokens.length-1;\n switch (qNameRef.bits & AstNode.RestrictiveFlagMASK) {\n case BindingIds.FIELD : // reading a field\n typeBinding = ((FieldBinding)binding).declaringClass;\n // no valid match amongst fields\n int otherBindingsCount = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; \n lastIndex -= otherBindingsCount + 1;\n if (lastIndex < 0) return IMPOSSIBLE_MATCH;\n break;\n case BindingIds.LOCAL : // reading a local variable\n return IMPOSSIBLE_MATCH; // no package match in it\n case BindingIds.TYPE : //=============only type ==============\n typeBinding = (TypeBinding)binding; }\n if (typeBinding instanceof ArrayBinding) {\n typeBinding = ((ArrayBinding)typeBinding).leafComponentType; }\n if (typeBinding == null) {\n return INACCURATE_MATCH;\n } else {\n if (typeBinding instanceof ReferenceBinding) {\n PackageBinding pkgBinding = ((ReferenceBinding)typeBinding).fPackage;\n if (pkgBinding == null) {\n return INACCURATE_MATCH;\n } else if (this.matches(pkgBinding.compoundName)) {\n return ACCURATE_MATCH;\n } else {\n return IMPOSSIBLE_MATCH; }\n } else {\n return IMPOSSIBLE_MATCH; } } } } }", "public static Object invokeMethod(Object receiver, String name, Object... args) {\n try {\n Class<?> clazz = receiver.getClass();\n /*Class<?>[] parameterTypes = new Class<?>[args.length];\n for (int i=0; i<args.length; i++) {\n parameterTypes[i] = args[i].getClass();\n }*/\n \n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n if (method.getName().equals(name)) {\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (parameterTypes.length == args.length) {\n int matched = 0;\n for (; matched<parameterTypes.length; matched++) {\n if (!isAcceptableParameter(parameterTypes[matched], args[matched])) {\n break;\n }\n }\n if (matched == parameterTypes.length) {\n method.setAccessible(true);\n return method.invoke(receiver, args);\n }\n }\n }\n }\n\n /*Method method = clazz.getDeclaredMethod(name, parameterTypes);\n if (method != null) {\n method.setAccessible(true);\n return method.invoke(receiver, args);\n }*/\n } catch (Exception e) {\n Logger.w(\"Reflection\", \"invokeMethod \" + name + \" \" + e.toString());\n }\n return null;\n }", "private void setContactThatNameContains(String s) {\n new AsyncContactName(s).execute();\n }", "public Future<String> getUsage(String name) throws DynamicCallException, ExecutionException {\n return call(\"getUsage\", name);\n }", "List<Member> findByName(String name);", "public Consumer getConsumer() {\n return consumer;\n }", "public List<MmathFighter> searchByName(String name) {\n String searchQuery = \"%\" + name + \"%\";\n\n String[] nameSplit = name.split(\" \");\n ExecutorService exec = Executors.newFixedThreadPool(nameSplit.length + 2);\n\n List<Future<List<MmathFighter>>> futures = new ArrayList<>();\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NICKNAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n if (nameSplit.length > 1) {\n futures.addAll(\n Stream.of(nameSplit)\n .map(s -> exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(s))\n .or(FIGHTERS.NICKNAME.like(s))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)\n )).collect(Collectors.toList())\n );\n }\n return futures.stream()\n .flatMap(f -> {\n try {\n return f.get().stream();\n } catch (InterruptedException | ExecutionException e) {\n return null;\n }\n })\n .filter(s -> s != null)\n .filter(distinctByKey(MmathFighter::getSherdogUrl)).limit(10).collect(Collectors.toList());\n }", "public static LinkedList<Actor> nameSearch(String name) {\n //sets name to lower case\n String hname = name.toLowerCase();\n //hashes the lower cased name\n int hash = Math.abs(hname.hashCode()) % ActorList.nameHashlist.length;\n //finds the location of the linked list\n LinkedList<Actor> location = ActorList.nameHashlist[hash];\n //sets the head to the head of the linked list\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each Actor\n Actor actor = (Actor) head.nextDataLink.data;\n //checks the name of the actor to inputted name\n if (actor.getName().toLowerCase().equals(hname)) {\n //if it's the same it returns the actor\n return location;\n //or moves to next link\n } else {\n head = head.nextDataLink;\n }\n }\n //returns null if the list does not match input\n return null;\n\n\n }", "@FXML\n private void searchName() {\n raise(new SearchNameEvent(name.getText()));\n }" ]
[ "0.7325263", "0.51814127", "0.51262486", "0.4728892", "0.47040907", "0.47007918", "0.46759054", "0.46077457", "0.457918", "0.454777", "0.45155954", "0.44941297", "0.44601166", "0.44597733", "0.44487068", "0.43936393", "0.43905127", "0.4331471", "0.43185136", "0.4314611", "0.4292617", "0.42746347", "0.42538998", "0.42279124", "0.42012584", "0.41660258", "0.41606444", "0.4159504", "0.41465688", "0.41323745", "0.41092822", "0.4104335", "0.40976894", "0.4094139", "0.40923017", "0.40703052", "0.406292", "0.40373543", "0.40366286", "0.40267172", "0.40231603", "0.40085945", "0.4006946", "0.39929074", "0.39923197", "0.3991474", "0.39847484", "0.39826912", "0.39750415", "0.397429", "0.39728934", "0.3970902", "0.39664787", "0.39655104", "0.39613467", "0.39589506", "0.3955763", "0.39507535", "0.3947189", "0.3943154", "0.39318308", "0.39280924", "0.39211687", "0.39178494", "0.39155215", "0.39100608", "0.39067972", "0.39040786", "0.3903774", "0.38986847", "0.38975358", "0.38844225", "0.38829082", "0.38816425", "0.38757443", "0.38688165", "0.38631135", "0.38629344", "0.3862368", "0.38575333", "0.3856646", "0.38534322", "0.3851593", "0.3848031", "0.38453946", "0.38447005", "0.38333368", "0.38296446", "0.3825878", "0.38241446", "0.38228574", "0.38146758", "0.3803214", "0.38014555", "0.37937418", "0.37928027", "0.3787644", "0.3778986", "0.3777542", "0.37749296" ]
0.76218194
0
Sets the root paths used to determine which files to analyze. The set of files to be analyzed are all of the files in one of the included paths that are not also in one of the excluded paths.
public void setAnalysisRoots(List<String> includedPaths, List<String> excludedPaths);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PublishFileSet(Path root) throws IOException {\n this.root = root;\n this.files = getFilesOnPath(root);\n }", "public void setIncludes( String[] includes )\n {\n if( includes == null )\n {\n this.includes = null;\n }\n else\n {\n this.includes = new String[ includes.length ];\n for( int i = 0; i < includes.length; i++ )\n {\n String pattern;\n pattern = includes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.includes[ i ] = pattern;\n }\n }\n }", "protected void setRootPath(String root) {\n this.root = new File(root);\n this.appsDir = new File(this.root, APPS_ROOT);\n this.m2Dir = new File(M2_ROOT);\n }", "@Override\n\tpublic Iterable<Path> getRootDirectories() {\n\t\treturn null;\n\t}", "public void scan()\n throws TaskException\n {\n if( basedir == null )\n {\n throw new IllegalStateException( \"No basedir set\" );\n }\n if( !basedir.exists() )\n {\n throw new IllegalStateException( \"basedir \" + basedir\n + \" does not exist\" );\n }\n if( !basedir.isDirectory() )\n {\n throw new IllegalStateException( \"basedir \" + basedir\n + \" is not a directory\" );\n }\n\n if( includes == null )\n {\n // No includes supplied, so set it to 'matches all'\n includes = new String[ 1 ];\n includes[ 0 ] = \"**\";\n }\n if( excludes == null )\n {\n excludes = new String[ 0 ];\n }\n\n filesIncluded = new ArrayList();\n filesNotIncluded = new ArrayList();\n filesExcluded = new ArrayList();\n dirsIncluded = new ArrayList();\n dirsNotIncluded = new ArrayList();\n dirsExcluded = new ArrayList();\n\n if( isIncluded( \"\" ) )\n {\n if( !isExcluded( \"\" ) )\n {\n dirsIncluded.add( \"\" );\n }\n else\n {\n dirsExcluded.add( \"\" );\n }\n }\n else\n {\n dirsNotIncluded.add( \"\" );\n }\n scandir( basedir, \"\", true );\n }", "public static void setRootDir() {\n for(int i = 0; i < rootDir.length; i++){\n Character temp = (char) (65 + i);\n Search.rootDir[i] = temp.toString() + \":\\\\\\\\\";\n }\n }", "public void setRootPath(String rootPath) {\r\n this.rootPath = rootPath;\r\n }", "public void setRootPath(String rootPath) {\n this.rootPath = rootPath;\n }", "public void setRootDir(String rootDir);", "protected void slowScan()\n throws TaskException\n {\n if( haveSlowResults )\n {\n return;\n }\n\n String[] excl = new String[ dirsExcluded.size() ];\n excl = (String[])dirsExcluded.toArray( excl );\n\n String[] notIncl = new String[ dirsNotIncluded.size() ];\n notIncl = (String[])dirsNotIncluded.toArray( notIncl );\n\n for( int i = 0; i < excl.length; i++ )\n {\n if( !couldHoldIncluded( excl[ i ] ) )\n {\n scandir( new File( basedir, excl[ i ] ),\n excl[ i ] + File.separator, false );\n }\n }\n\n for( int i = 0; i < notIncl.length; i++ )\n {\n if( !couldHoldIncluded( notIncl[ i ] ) )\n {\n scandir( new File( basedir, notIncl[ i ] ),\n notIncl[ i ] + File.separator, false );\n }\n }\n\n haveSlowResults = true;\n }", "private void setPathToRootOfPostVersionLists() {\n if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Text) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"text\");\n } else if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Code) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"code\");\n }\n }", "public void setAllPaths(boolean allPaths) {\n\t\tthis.allPaths = allPaths;\n\t}", "public void excludeAllFiles(){\n for(Map.Entry<String,File> entry : dataSourcesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //For each directory created for each service\n for(Map.Entry<String,File> entry : servicesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //Finally, delete sessionDirectory\n if(sessionDirectory != null)\n sessionDirectory.delete();\n \n }", "public void setExcludes( String[] excludes )\n {\n if( excludes == null )\n {\n this.excludes = null;\n }\n else\n {\n this.excludes = new String[ excludes.length ];\n for( int i = 0; i < excludes.length; i++ )\n {\n String pattern;\n pattern = excludes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.excludes[ i ] = pattern;\n }\n }\n }", "public void includes(Object includeRoots) {\n includes.from(includeRoots);\n }", "public StaticFiles(final File root) {\r\n\t\tthis.rootPath = root;\r\n\t}", "private static void getFiles(String root, Vector files) {\n Location f = new Location(root);\n String[] subs = f.list();\n if (subs == null) subs = new String[0];\n Arrays.sort(subs);\n \n // make sure that if a config file exists, it is first on the list\n for (int i=0; i<subs.length; i++) {\n if (subs[i].endsWith(\".bioformats\") && i != 0) {\n String tmp = subs[0];\n subs[0] = subs[i];\n subs[i] = tmp;\n break;\n }\n }\n \n if (subs == null) {\n LogTools.println(\"Invalid directory: \" + root);\n return;\n }\n \n ImageReader ir = new ImageReader();\n Vector similarFiles = new Vector();\n \n for (int i=0; i<subs.length; i++) {\n LogTools.println(\"Checking file \" + subs[i]);\n subs[i] = new Location(root, subs[i]).getAbsolutePath();\n if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) {\n LogTools.println(subs[i] + \" is a bad file\");\n String[] matching = new FilePattern(subs[i]).getFiles();\n for (int j=0; j<matching.length; j++) {\n similarFiles.add(new Location(root, matching[j]).getAbsolutePath());\n }\n continue;\n }\n Location file = new Location(subs[i]);\n \n if (file.isDirectory()) getFiles(subs[i], files);\n else if (file.getName().equals(\".bioformats\")) {\n // special config file for the test suite\n configFiles.add(file.getAbsolutePath());\n }\n else {\n if (ir.isThisType(subs[i])) {\n LogTools.println(\"Adding \" + subs[i]);\n files.add(file.getAbsolutePath());\n }\n else LogTools.println(subs[i] + \" has invalid type\");\n }\n file = null;\n }\n }", "public void setRootDir(File rootDir) {\r\n\t\tthis.rootDir = rootDir;\r\n\t}", "private List<String> scanFileSet(File sourceDirectory, FileSet fileSet) {\n final String[] emptyStringArray = {};\n\n DirectoryScanner scanner = new DirectoryScanner();\n\n scanner.setBasedir(sourceDirectory);\n if (fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty()) {\n scanner.setIncludes(fileSet.getIncludes().toArray(emptyStringArray));\n } else {\n scanner.setIncludes(DEFAULT_INCLUDES);\n }\n\n if (fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty()) {\n scanner.setExcludes(fileSet.getExcludes().toArray(emptyStringArray));\n }\n\n if (fileSet.isUseDefaultExcludes()) {\n scanner.addDefaultExcludes();\n }\n\n scanner.scan();\n\n return Arrays.asList(scanner.getIncludedFiles());\n }", "public static void analyze(String rootPath) {\n\n File rootDirectory = new File(rootPath);\n if (!rootDirectory.exists()) {\n System.err.println(\"The root directory does not exist.\");\n return;\n }\n// List<File> directories = FileUtil.traverseRootDirectory(rootDirectory, \"junit\");\n// for (File directory : directories) {\n// traverseJUnitDirectory(directory);\n// }\n// for()\n }", "public void setAllFiles(HashMap<String, String> allFiles) {\n _allFiles = allFiles;\n }", "private void loadBasePaths() {\n\n Log.d(TAG, \"****loadBasePaths*****\");\n List<FileInfo> paths = BaseMediaPaths.getInstance().getBasePaths();\n for (FileInfo path : paths) {\n\n }\n }", "public Set<File> getSourceDirectories() {\n return Collections.unmodifiableSet(sourceDirectories);\n }", "private void enqueueFiles(File currentRoot){\n // stop condition\n if (currentRoot.listFiles().length == 0) return;\n // recursivly places all files in the queue\n for(File subDir : currentRoot.listFiles(File::isDirectory)){\n m_DirectoryQueue.enqueue(subDir);\n enqueueFiles(subDir);\n }\n }", "public void setClassesRoot(File classesRoot) {\n\t\tthis.classesRoot = classesRoot;\n\t}", "public void unifyAccessPaths(Set roots) {\n LinkedList worklist = new LinkedList();\n for (Iterator i = roots.iterator(); i.hasNext(); ) {\n worklist.add(i.next());\n }\n while (!worklist.isEmpty()) {\n Node n = (Node) worklist.removeFirst();\n if (n instanceof UnknownTypeNode) continue;\n unifyAccessPathEdges(n);\n for (Iterator i = n.getAccessPathEdges().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n FieldNode n2 = (FieldNode) e.getValue();\n Assert._assert(n2 != null);\n if (roots.contains(n2)) continue;\n worklist.add(n2); roots.add(n2);\n }\n for (Iterator i=n.getNonEscapingEdges().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Object o = e.getValue();\n if (o instanceof Node) {\n Node n2 = (Node)o;\n Assert._assert(n2 != null);\n if (roots.contains(n2)) continue;\n worklist.add(n2); roots.add(n2);\n } else {\n Set s = NodeSet.FACTORY.makeSet((Set) o);\n for (Iterator j = s.iterator(); j.hasNext(); ) {\n Object p = j.next();\n Assert._assert(p != null);\n if (roots.contains(p)) j.remove();\n }\n if (!s.isEmpty()) {\n worklist.addAll(s); roots.addAll(s);\n }\n }\n }\n }\n }", "void setAppRootDirectory(String rootDir);", "@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getDexFolders();", "private void listAllClasses(List<Path> foundFiles, Path root) {\r\n if (root.toFile().isFile()) {\r\n foundFiles.add(root);\r\n } else {\r\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(root, filter)) {\r\n for (Path path : stream) {\r\n if (Files.isDirectory(path)) {\r\n listAllClasses(foundFiles, path);\r\n } else {\r\n foundFiles.add(path);\r\n }\r\n }\r\n } catch (AccessDeniedException e) {\r\n logger.error(\"Access denied to directory {}\", root, e);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading directory {}\", root, e);\r\n }\r\n }\r\n }", "public void setConfigFiles(final Set<String> configFiles) {\n final Properties properties = new Properties();\n\n try {\n configFiles.forEach(x -> {\n final Resource resource = new ClassPathResource(x);\n logger.info(this.getClass().getName() + \" loading properties from \" + resource.getFilename());\n\n try {\n try (InputStream inputStream = resource.getInputStream()) {\n final Properties prop = new Properties();\n prop.load(inputStream);\n if (prop != null) {\n properties.putAll(prop);\n }\n }\n }\n catch (final Exception e) {\n System.out.println(\"Error occurs, message: \" + e.getMessage());\n }\n });\n }\n catch (final Exception e) {\n System.out.println(\"Error occurs, message: \" + e.getMessage());\n }\n\n /*System.out.print(\"All properties resolved.\\n \");\n final Enumeration<?> propertySet = properties.propertyNames();\n \n while (propertySet.hasMoreElements()) {\n final String candidate = (String) propertySet.nextElement();\n System.out.print(candidate + \" = \" + properties.getProperty(candidate) + \"\\n \");\n }\n System.out.println();\n */\n\n this.setProperties(properties);\n }", "public static void loadFiles(String rootDirectory, LinkedList<File> filepaths) throws IOException{\r\n\t\tFile root = new File(rootDirectory);\r\n\t\tfor(String str:root.list()){\r\n\t\t\tif(new File(rootDirectory+\"/\"+str).isDirectory())\r\n\t\t\t\tloadFiles(rootDirectory+\"/\"+str, filepaths);\r\n\t\t\telse\r\n\t\t\t\tfilepaths.add(new File(rootDirectory+\"/\"+str));\r\n\t\t}\r\n\t}", "public void setClassesDirs(FileCollection classesDirs) {\n this.classesDirs = classesDirs;\n }", "public void setRootDirectory(IDirectory rootDir) {\r\n this.rootDir = (Directory) rootDir;\r\n }", "@Before\n public void setUp() throws Throwable\n {\n myLog.debug( \"entering\" );\n try\n {\n if ( Files.exists( Testconstants.ROOT_DIR ) )\n {\n Helper.deleteDirRecursive( Testconstants.ROOT_DIR );\n }\n \n Files.createDirectory( Testconstants.ROOT_DIR );\n FSOBJECTS.DIR1.setFsObject( Testconstants.createNewFolder( Testconstants.ROOT_DIR, \"existingDir1\" ) );\n FSOBJECTS.DIR2.setFsObject( Testconstants.createNewFolder( Testconstants.ROOT_DIR, \"existingDir2\" ) );\n FSOBJECTS.DIR3.setFsObject( Testconstants.createNewFolder( Testconstants.ROOT_DIR, \"existingDir3\" ) );\n FSOBJECTS.FILE1.setFsObject( Testconstants.createNewFile( Testconstants.ROOT_DIR, \"existingFile1.txt\" ) );\n FSOBJECTS.FILE2.setFsObject( Testconstants.createNewFile( Testconstants.ROOT_DIR, \"existingFile2.txt\" ) );\n FSOBJECTS.FILE3.setFsObject( Testconstants.createNewFile( Testconstants.ROOT_DIR, \"existingFile3.txt\" ) );\n FSOBJECTS.NOT1.setFsObject( Paths.get( Testconstants.ROOT_DIR.toString(), \"notExisting1\" ) );\n FSOBJECTS.NOT2.setFsObject( Paths.get( Testconstants.ROOT_DIR.toString(), \"notExisting2\" ) );\n FSOBJECTS.NOT3.setFsObject( Paths.get( Testconstants.ROOT_DIR.toString(), \"notExisting3\" ) );\n \n Files.deleteIfExists( Paths.get( EXCLUDE_FILE_NAME ) );\n myExcludeFile = Testconstants.createNewFile( Paths.get( \".\" ), EXCLUDE_FILE_NAME );\n FileUtils.writeLines( myExcludeFile.toFile(), Arrays.asList( new String[] { EXCLUDE_VALUE } ) );\n }\n catch ( Throwable t )\n {\n myLog.error( \"Throwable caught in setup\", t );\n throw t;\n }\n }", "@Override\n protected Collection<String> getRelevantScannedFolders(Collection<String> scannedFolders) {\n return scannedFolders == null ? Collections.emptyList() : scannedFolders;\n }", "public void addAllRecursively(Collection<? extends File> someResourceFiles) {\n\t\tfor (File tempResourceFile : someResourceFiles) {\n\t\t\taddRecursively(tempResourceFile);\n\t\t}\n\t}", "public void setPathsCombine(Map<Integer, ArrayList<ASNode>> paths) {\n\t\tfor (int currASnum : paths.keySet()) {\n\t\t\tif (this.paths.containsKey(currASnum)) {\n\t\t\t\tif (paths.get(currASnum).size() < this.paths.get(currASnum)\n\t\t\t\t\t\t.size()) {\n\n\t\t\t\t\tif (!paths.get(currASnum).contains(currASnum)) {\n\t\t\t\t\t\tthis.paths.put(currASnum, paths.get(currASnum));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currASnum != ASNum) {\n\t\t\t\t\tthis.paths.put(currASnum, paths.get(currASnum));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}", "public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }", "public void testFiles(AugeasProxy augeas){\n \t System.out.print(\"Test if all included configuration files was discovered and loaded.\");\n \t AugeasConfigurationApache config = (AugeasConfigurationApache)augeas.getConfiguration();\n \t List<File> configFiles = config.getAllConfigurationFiles();\n \t \n \t /*\n \t * There are three files one main file one which is included from main file and one which is included from \n \t * included file and which is declared in IfModule. All of them must be discovered.\n \t */\n\t boolean found=false;\n \t for (File confFile : configFiles){\n\t found = false;\n \t for (String fileName : ApacheTestConstants.CONFIG_FILE_NAMES){\n \t if (!confFile.getName().equals(fileName))\n\t found= true;\n \t }\n \t assert found;\n \t }\n System.out.println(\" [success!]\");\n \t }", "public void clearPaths() {\n _thePaths.clear();\n }", "private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }", "public void SetTestFiles(File[] testFiles)\n\t{\n\t\tthis.testFiles = testFiles;\n\t}", "protected void scandir( File dir, String vpath, boolean fast )\n throws TaskException\n {\n String[] newfiles = dir.list();\n\n if( newfiles == null )\n {\n /*\n * two reasons are mentioned in the API docs for File.list\n * (1) dir is not a directory. This is impossible as\n * we wouldn't get here in this case.\n * (2) an IO error occurred (why doesn't it throw an exception\n * then???)\n */\n throw new TaskException( \"IO error scanning directory \"\n + dir.getAbsolutePath() );\n }\n\n for( int i = 0; i < newfiles.length; i++ )\n {\n String name = vpath + newfiles[ i ];\n File file = new File( dir, newfiles[ i ] );\n if( file.isDirectory() )\n {\n if( isIncluded( name ) )\n {\n if( !isExcluded( name ) )\n {\n dirsIncluded.add( name );\n if( fast )\n {\n scandir( file, name + File.separator, fast );\n }\n }\n else\n {\n everythingIncluded = false;\n dirsExcluded.add( name );\n if( fast && couldHoldIncluded( name ) )\n {\n scandir( file, name + File.separator, fast );\n }\n }\n }\n else\n {\n everythingIncluded = false;\n dirsNotIncluded.add( name );\n if( fast && couldHoldIncluded( name ) )\n {\n scandir( file, name + File.separator, fast );\n }\n }\n if( !fast )\n {\n scandir( file, name + File.separator, fast );\n }\n }\n else if( file.isFile() )\n {\n if( isIncluded( name ) )\n {\n if( !isExcluded( name ) )\n {\n filesIncluded.add( name );\n }\n else\n {\n everythingIncluded = false;\n filesExcluded.add( name );\n }\n }\n else\n {\n everythingIncluded = false;\n filesNotIncluded.add( name );\n }\n }\n }\n }", "public void loadFilesInFolder(File rootFile) {\r\n\t\tDefaultListModel<File> model = new DefaultListModel<>();\r\n\t\tfor (File nextFile : rootFile.listFiles()) {\r\n\t\t\tmodel.addElement(nextFile);\r\n\t\t}\r\n\t\tlist.setModel(model);\r\n\t}", "private ArrayList<String> checkSubDir(ArrayList<String> paths) {\n ArrayList<String> finalPaths;\n finalPaths = (ArrayList<String>) paths.clone();\n for (int i = 0; i < paths.size(); i++) {\n if (!checkValidity(paths.get(i))) {\n finalPaths.remove(paths.get(i));\n continue;\n }\n for (int j = i + 1; j < paths.size(); j++)\n if (paths.get(j).contains(paths.get(i))) {\n finalPaths.remove(paths.get(j));\n }\n }\n return finalPaths;\n }", "private void FindFiles(Path findPath)\n {\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(findPath))\n {\n\n for (Path thisPath : stream)\n {\n File file = new File(thisPath.toString());\n\n if (file.isDirectory())\n {\n dirCount++;\n\n if (HasMatch(thisPath.toString(), lineIncludePattern, lineExcludePattern))\n {\n dirLineMatchCount++;\n\n System.out.println(thisPath.toAbsolutePath().toString() + \",directory,none\");\n }\n\n if (HasMatch(thisPath.toString(), dirIncludePattern, dirExcludePattern))\n {\n dirMatchCount++;\n folderLevel++;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n indentBuffer = \"\";\n\n //System.out.println(indentBuffer + thisPath.toString() + \" ...\");\n FindFiles(thisPath.toAbsolutePath());\n\n folderLevel--;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n }\n }\n else\n {\n fileCount++;\n\n if (HasMatch(thisPath.getParent().toString(), lineIncludePattern, lineExcludePattern))\n {\n fileLineMatchCount++;\n\n System.out.println(thisPath.getParent().toString() + \",\" + thisPath.getFileName() + \",none\");\n }\n\n if (HasMatch(thisPath.toString(), fileIncludePattern, fileExcludePattern))\n {\n fileMatchCount++;\n\n File refFile;\n if (doReplace)\n {\n refFile = new File(thisPath.toString() + \"_bak\");\n file.renameTo(refFile);\n\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(refFile.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n else\n {\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(file.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n\n }\n }\n }\n }\n catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", findPath);\n e.printStackTrace();\n }\n\n }", "@Override\n public void setIncludeSources(Collection<File> sources) throws InterruptedException\n {\n Collection<File> files = populateIncludedSourceFiles(sources);\n \n super.setIncludeSources(files.toArray(new File[files.size()]));\n }", "@VisibleForTesting\n /* package */ void setIncluded(String includer, List<String> included, boolean detectCycles) {\n // Remove previously linked inverse mappings\n List<String> oldIncludes = mIncludes.get(includer);\n if (oldIncludes != null && oldIncludes.size() > 0) {\n for (String includee : oldIncludes) {\n List<String> includers = mIncludedBy.get(includee);\n if (includers != null) {\n includers.remove(includer);\n }\n }\n }\n\n mIncludes.put(includer, included);\n // Reverse mapping: for included items, point back to including file\n setIncludedBy(includer, included);\n\n if (detectCycles) {\n detectCycles(includer);\n }\n }", "@Override\r\n\tpublic String globFilesDirectories(String[] args) {\r\n\t\treturn globHelper(args);\r\n\t}", "public static void removeEmptyPathsOnClient() {\r\n\t\tfinal File libRoot = JSurePreferencesUtility.getJSureXMLDirectory();\r\n\t\tif (libRoot != null) {\r\n\t\t\tFileUtility.deleteEmptySubDirectories(libRoot);\r\n\t\t}\r\n\t}", "void setInFiles(String inFilesStr) {\n\t\tString[] result = inFilesStr.split(\",\");\n\t\tfor (int x = 0; x < result.length; x++) {\n\t\t\tString fName = result[x].trim();\n\t\t\tthis.inFiles.add(new File(fName));\n\t\t}\n\t}", "private void setIncludedBy(String includer, List<String> included) {\n for (String target : included) {\n List<String> list = mIncludedBy.get(target);\n if (list == null) {\n list = new ArrayList<String>(2); // We don't expect many includes\n mIncludedBy.put(target, list);\n }\n if (!list.contains(includer)) {\n list.add(includer);\n }\n }\n }", "public static void setRootDirectory(String rootDirectory) {\n\t\tROOT_DIRECTORY = new File(rootDirectory);\n\t\tAPPS_DIRECTORY = new File(ROOT_DIRECTORY, \"apps\");\n\t\tDATA_DIRECTORY = new File(ROOT_DIRECTORY, \"data\");\n\t\tPREFERENCES_DIRECTORY = new File(ROOT_DIRECTORY, \"prefs\");\n\t\tLOG_DIRECTORY = new File(ROOT_DIRECTORY, \"logs\");\n\t}", "private static void findAllFilesRecurse(File root, ArrayList<File> files, boolean recurse) {\n\t\tFile[] rootContents = root.listFiles();\n\t\tif (rootContents == null) {\n\t\t\tfiles.add(root);\n\t\t} else {\n\t\t\tfor (File f : rootContents) {\n\t\t\t\t// if it is a file or do not go deeper\n\t\t\t\tif (f.isFile() || !recurse) {\n\t\t\t\t\tfiles.add(f);\n\t\t\t\t} else if (recurse) { // directory\n\t\t\t\t\tfindAllFilesRecurse(f, files, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void expectFiles(Path[] files)\n {\n expect_files = files;\n }", "public void addDirectories( File base ) {\n if( base.isDirectory() ) {\n repository.add( base );\n File[] files = base.listFiles();\n\n for( int i = 0; i < files.length; i++ ) {\n addDirectories( files[i] );\n }\n }\n }", "private Collection<File> getInputFiles(String docRoot) {\r\n File dir = new File(docRoot);\r\n if (testXMLDir == null || !dir.isDirectory() || !dir.canRead()) {\r\n throw new RuntimeException(\"unable to read from this directory: \" + testXMLDir);\r\n }\r\n Collection<File> xmlFiles = new ArrayList<File>();\r\n xmlFiles = listFileNames(dir,xmlFiles);\r\n return xmlFiles;\r\n }", "public static void checkRootDirectory() {\n File root = new File(transferITModel.getProperty(\"net.server.rootpath\"));\n JFileChooser jFileChooser = new JFileChooser();\n jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n while (true) {\n try {\n if (root.isDirectory()) {\n transferITModel.setProperty(\"net.server.rootpath\", root.getPath());\n break;\n }\n int returnVal = jFileChooser.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n root = jFileChooser.getSelectedFile();\n }\n } catch (SecurityException se) {\n }\n\n }\n }", "public void removeAllPathIds() {\n synchronized (pathsToBeTraversed) {\n pathsToBeTraversed.clear();\n }\n }", "@PathSensitive(PathSensitivity.RELATIVE)\n @InputFiles\n @SkipWhenEmpty\n public FileCollection getClassesDirs() {\n return classesDirs;\n }", "public void setIncludes( List<IncludeClasses> includes )\n {\n this.includes = includes;\n }", "public void setPaths(@NonNull List<String> paths) {\n Parameters.notNull(\"paths\", paths);\n\n synchronized (this) {\n this.paths.clear();\n this.paths.addAll(paths);\n }\n }", "public void addDefaultExcludes()\n {\n int excludesLength = excludes == null ? 0 : excludes.length;\n String[] newExcludes;\n newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];\n if( excludesLength > 0 )\n {\n System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );\n }\n for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )\n {\n newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n }\n excludes = newExcludes;\n }", "private void loadDirectoryUp() {\n\t\tString s = pathDirsList.remove(pathDirsList.size() - 1);\n\t\t// path modified to exclude present directory\n\t\tpath = new File(path.toString().substring(0,\n\t\t\t\tpath.toString().lastIndexOf(s)));\n\t\tfileList.clear();\n\t}", "@Test\n public void testMatchesAny() {\n\n Set<PathMatcher> patterns = new HashSet<PathMatcher>() {\n {\n add(FileUtil.matcherForGlobExpression(\"/notADir1\"));\n add(FileUtil.matcherForGlobExpression(\"/notADir2\"));\n }\n };\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isFalse();\n\n patterns.add(FileUtil.matcherForGlobExpression(FOLDER.toString()));\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isTrue();\n }", "private void searchDFS(File[] files, ArrayList<String> list) {\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tif (file.getAbsolutePath().endsWith(GIT)) {\n\t\t\t\t\tgitDir = file.getAbsolutePath();\n\t\t\t\t}\n\t\t\t\tsearchDFS(file.listFiles(), list);\n\t\t\t} else {\n\t\t\t\tif (file.getName().endsWith(EXTENSION)) {\n\t\t\t\t\tlist.add(file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public GlobFileSet recurse()\n\t\t{\n\t\tm_recurse = true;\n\t\treturn (this);\n\t\t}", "public static void searchForImageReferences(File rootDir, FilenameFilter fileFilter) {\n \t\tfor (File file : rootDir.listFiles()) {\n \t\t\tif (file.isDirectory()) {\n \t\t\t\tsearchForImageReferences(file, fileFilter);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (fileFilter.accept(rootDir, file.getName())) {\n \t\t\t\t\tif (MapTool.getFrame() != null) {\n \t\t\t\t\t\tMapTool.getFrame().setStatusMessage(\"Caching image reference: \" + file.getName());\n \t\t\t\t\t}\n \t\t\t\t\trememberLocalImageReference(file);\n \t\t\t\t}\n \t\t\t} catch (IOException ioe) {\n \t\t\t\tioe.printStackTrace();\n \t\t\t}\n \t\t}\n \t\t// Done\n \t\tif (MapTool.getFrame() != null) {\n \t\t\tMapTool.getFrame().setStatusMessage(\"\");\n \t\t}\n \t}", "public GlobFileSet addExcludeFiles(Object... files)\n\t\t{\n\t\tif ((files.length == 1) && (files[0] instanceof Iterable))\n\t\t\treturn (addExcludeFiles((Iterable<Object>)files[0]));\n\t\telse\n\t\t\treturn (addExcludeFiles(Arrays.asList(files)));\n\t\t}", "private static void inferPathsFromSourceDir(File sourceDir,\n Properties props) {\n String pidFiles = \"\";\n String xsltFiles = \"\";\n for (File file : sourceDir.listFiles()) {\n if (file.getName().endsWith(\".xslt\")\n || file.getName().endsWith(\".xsl\")) {\n String path = file.getPath();\n int i = path.lastIndexOf(\".\");\n String pathPrefix = path.substring(0, i);\n File pidFile = getPidFile(pathPrefix);\n if (pidFile != null) {\n if (xsltFiles.length() > 0) {\n xsltFiles += \" \";\n }\n xsltFiles += path;\n if (pidFiles.length() > 0) {\n pidFiles += \" \";\n }\n pidFiles += pidFile.getPath();\n }\n }\n }\n props.setProperty(\"xsltFiles\", xsltFiles);\n props.setProperty(\"pidFiles\", pidFiles);\n }", "private void initializeStoreDirectories() {\n LOG.info(\"Initializing side input store directories.\");\n\n stores.keySet().forEach(storeName -> {\n File storeLocation = getStoreLocation(storeName);\n String storePath = storeLocation.toPath().toString();\n if (!isValidSideInputStore(storeName, storeLocation)) {\n LOG.info(\"Cleaning up the store directory at {} for {}\", storePath, storeName);\n new FileUtil().rm(storeLocation);\n }\n\n if (isPersistedStore(storeName) && !storeLocation.exists()) {\n LOG.info(\"Creating {} as the store directory for the side input store {}\", storePath, storeName);\n storeLocation.mkdirs();\n }\n });\n }", "private void scanProject() {\n ProjectResources resources = ResourceManager.getInstance().getProjectResources(mProject);\n if (resources != null) {\n Collection<ResourceItem> layouts = resources.getResourceItemsOfType(LAYOUT);\n for (ResourceItem layout : layouts) {\n List<ResourceFile> sources = layout.getSourceFileList();\n for (ResourceFile source : sources) {\n updateFileIncludes(source, false);\n }\n }\n\n return;\n }\n }", "public static String[] scanFiles(File dir, String[] includes, String[] excludes) {\n // remove tailing '/' in patterns\n if (includes != null) {\n for (int i = 0; i < includes.length; i++)\n includes[i] = StringUtil.trimSuffix(includes[i], \"/\");\n }\n if (excludes != null) {\n for (int i = 0; i < excludes.length; i++)\n excludes[i] = StringUtil.trimSuffix(excludes[i], \"/\");\n }\n\n ArrayList result = new ArrayList();\n ArrayList queue = new ArrayList();\n queue.add(\"\");\n\n String dirPath, path;\n File dirFile, f;\n File[] files;\n while (!queue.isEmpty()) {\n dirPath = (String) queue.remove(queue.size() - 1);\n dirFile = dirPath.isEmpty() ? dir : new File(dir, dirPath);\n files = dirFile.listFiles();\n for (int i = 0; files != null && i < files.length; i++) {\n f = files[i];\n path = dirPath + (dirPath.isEmpty() ? \"\" : \"/\") + f.getName();\n if (f.isDirectory()) {\n // cut off excluded dir early\n if (scanFiles_isIncluded(path, null, excludes))\n queue.add(path);\n } else if (f.isFile()) {\n if (scanFiles_isIncluded(path, includes, excludes))\n result.add(path);\n }\n }\n }\n return (String[]) result.toArray(new String[result.size()]);\n }", "synchronized List<File> getRoots() {\n\t\t\treturn new ArrayList<>(roots);\n\t\t}", "public void setIncludes(String includes)\n {\n this.includes = includes;\n }", "private List<File> getFileList(File root){\n\t List<File> returnable = new ArrayList<File>();\n\t if(root.exists()){\n\t\t for(File currentSubFile : root.listFiles()){\n\t\t\t if(currentSubFile.isDirectory()){\n\t\t\t\t returnable.addAll(getFileList(currentSubFile));\n\t\t\t } else {\n\t\t\t\t returnable.add(currentSubFile);\n\t\t\t }\n\t\t }\n\t }\n\t return returnable;\n }", "private List<File> getSearchFiles() {\n\t\tif (searchDirs == null || searchDirs.size() <= 0) {\n\n\t\t\tsearchDirs = new ArrayList<File>();\n\t\t\t\n\t\t\tsearchDirs.add(StorageUtils.getLocalCacheDir(this));\n//\t\t\tsearchDirs.add(StorageUtils.getExternalCacheDir(this));\n\t\t\tsearchDirs.add(StorageUtils.getFavorDir(this));\n\t\t}\n\t\treturn searchDirs;\n\t}", "public ScanResult getFilesRecursively() {\n\n final ScanResult scanResult = new ScanResult();\n try {\n Files.walkFileTree(this.basePath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n if (!attrs.isDirectory() && PICTURE_MATCHER.accept(file.toFile())) {\n scanResult.addEntry(convert(file));\n System.out.println(file.toFile());\n }\n return FileVisitResult.CONTINUE;\n }\n });\n } catch (IOException e) {\n // intentional fallthrough\n }\n\n return new ScanResult();\n }", "@FXML\n private void setDirectoryOfPostVersionLists() {\n setPathToRootOfPostVersionLists();\n indexPostVersionListsInRootPath();\n }", "public void setCommonDirs(String[] dirs) {\n\n\t\t/*\n\t\t * \n\t\t * for (int i = 0; (i < dirs.length) && (i < commonDirs.length); i++) {\n\t\t * \n\t\t * commonDirs[i] = dirs[i];\n\t\t * \n\t\t * }\n\t\t * \n\t\t */\n\n\t\tint n = getMAX_DIRS();\n\n\t\tcommonDirs = new String[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tcommonDirs[i] = dirs[i];\n\n\t\t}\n\n\t}", "public static Set<String> getWorkingSets() {\n\t\tSet<String> workingSets = new HashSet<>();\n\t\tFile localExtensions = new File(PathUtils.getLocalExtensionsPath());\n\t\ttry {\n\t\t\tDocumentBuilder dBuilder = XmlScannerUtils.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(localExtensions);\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\n\t\t\tString path = \"//comment()[following-sibling::*[1][self::extension]]\";\n\t\t\tNodeList commentNodes = (NodeList) xPath.compile(path).evaluate(doc, XPathConstants.NODESET);\n\t\t\tfor (int i = 0; i < commentNodes.getLength(); i++) {\n\t\t\t\tNode node = commentNodes.item(i);\n\t\t\t\tString workingSet = node.getNodeValue().trim();\n\t\t\t\tworkingSets.add(workingSet);\n\t\t\t}\n\t\t} catch (ParserConfigurationException | SAXException | IOException | XPathExpressionException e) {\n\t\t\tActivator.logError(\"Couldn't parse working sets file\", e);\n\t\t}\n\t\treturn workingSets;\n\t}", "public void setProjectRootLocation(int i, int j) {\n int[] l = Location.init();\n Location.setLocationId(l, i);\n l = Location.addLocationPos(l, j);\n\n// Location l = new Location();\n// l.setLocationId(i);\n// l.addLocationPos(j);\n\n //check if l exists in rootLocations ????\n\n boolean dup=false;\n for(int k=0; k<rootLocations.size(); ++k)\n if(Location.getLocationId(rootLocations.get(k)) == i &&\n Location.getLocationPos(rootLocations.get(k)) == j)\n dup=true;\n\n if(!dup) this.rootLocations.add(l);\n\n }", "public void setFilesPath(File path) {\r\n\t\tfilesPathProperty.set(path);\r\n\t}", "private static List<File> rootFiles(final File metaDir) throws IOException {\n File containerFile = new File(metaDir, \"container.xml\");\n if(!containerFile.exists()) {\n throw new IOException(\"Missing 'META-INF/container.xml'\");\n }\n\n List<File> rootFiles = Lists.newArrayListWithExpectedSize(2);\n try(FileInputStream fis = new FileInputStream(containerFile)) {\n Document doc = Jsoup.parse(fis, Charsets.UTF_8.name(), \"\", Parser.xmlParser());\n Elements elements = doc.select(\"rootfile[full-path]\");\n for(Element element : elements) {\n String path = element.attr(\"full-path\").trim();\n if(path.isEmpty()) {\n continue;\n } else if(path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n File rootFile = new File(metaDir.getParent(), path);\n if(!rootFile.exists()) {\n throw new IOException(String.format(\"Missing file, '%s'\", rootFile.getAbsolutePath()));\n }\n rootFiles.add(rootFile);\n }\n }\n\n return rootFiles;\n }", "private static void listFiles(File rootFile, String filename, List<File> fileList) {\n File[] files_ = rootFile.listFiles();\n if(files_ != null) {\n for(File file : files_) {\n if(file.isFile() && file.getName().equalsIgnoreCase(filename))\n \t fileList.add(file);\n else\n listFiles(file, filename, fileList);\n }\n }\n }", "private boolean SetRootOfSynset() {\t\t\r\n\t\tthis.roots = new ArrayList<ISynsetID>();\r\n\t\tISynset\tsynset = null;\r\n\t\tIterator<ISynset> iterator = null;\r\n\t\tList<ISynsetID> hypernyms =\tnull;\r\n\t\tList<ISynsetID>\thypernym_instances = null;\r\n\t\titerator = dict.getSynsetIterator(POS.NOUN);\r\n\t\twhile(iterator.hasNext())\r\n\t\t{\r\n\t\t\tsynset = iterator.next();\r\n \t\t\thypernyms =\tsynset.getRelatedSynsets(Pointer.HYPERNYM);\t\t\t\t\t// !!! if any of these point back (up) to synset then we have an inf. loop !!!\r\n \t\t\thypernym_instances = synset.getRelatedSynsets(Pointer.HYPERNYM_INSTANCE);\r\n \t\t\tif(hypernyms.isEmpty() && hypernym_instances.isEmpty())\r\n \t\t\t{\r\n\t\t\t\tthis.roots.add(synset.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t\titerator = this.dict.getSynsetIterator(POS.VERB);\r\n\t\twhile(iterator.hasNext())\r\n\t\t{\r\n\t\t\tsynset = iterator.next();\r\n \t\t\thypernyms =\tsynset.getRelatedSynsets(Pointer.HYPERNYM);\t\t\t\t\t// !!! if any of these point back (up) to synset then we have an inf. loop !!!\r\n \t\t\thypernym_instances = synset.getRelatedSynsets(Pointer.HYPERNYM_INSTANCE);\r\n \t\t\tif(hypernyms.isEmpty() && hypernym_instances.isEmpty())\r\n \t\t\t{\r\n\t\t\t\tthis.roots.add(synset.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ( this.roots.size() > 0 );\r\n\t}", "private final void fillPaths() {\n\t\ticalCombo.addItem(\"\"); //$NON-NLS-1$\n\t\tString[] paths = config.getCalendarPaths();\n\t\tif (paths != null) {\n\t\t\tString path, name;\n\t\t\tfor (int i = 0; i < paths.length; i++) {\n\t\t\t\tpath = paths[i];\n\t\t\t\tname = config.getCalendarName(path);\n\t\t\t\tif (name == null) {\n\t\t\t\t\ticalCombo.addItem(path);\n\t\t\t\t} else {\n\t\t\t\t\ticalCombo.addItem(name + \" - \" + path); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (fileSync != null && fileSync.icalPath != null) {\n\t\t\tMainConfig.selectItem(icalCombo, fileSync.icalPath);\n\t\t}\n\t}", "void initializeBath( File destinationFolderFile );", "private static void joinFiles(String mainPath, ArrayList<File> oldFiles){\n FileFilter jsonFilter = new FileFilter() {\r\n public boolean accept(File path) {\r\n return path.getName().endsWith(\".json\");\r\n }\r\n };\r\n\r\n //contains all files in path\r\n File fileMain = new File(mainPath);\r\n File[] fileList = fileMain.listFiles();\r\n boolean checkedPath = false;\r\n\r\n if(fileList!=null){\r\n for(File fileTemp: fileList){\r\n //checkedPath makes sure JSON files are not cloned\r\n if(fileTemp.isFile() && checkedPath == false){\r\n //adds the JSON files found to arraylist\r\n File file = new File(mainPath);\r\n File[] jsonList = file.listFiles(jsonFilter);\r\n for(File temp: jsonList){\r\n oldFiles.add(temp);\r\n }\r\n checkedPath = true;\r\n }\r\n //if file found is a folder, recursively searches until JSON file is found\r\n else if(fileTemp.isDirectory()){\r\n joinFiles(fileTemp.getAbsolutePath(), oldFiles);\r\n }\r\n }\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void loadFiles(){\n\n\t\t/* Remove all names from the combo boxes to begin with */\n\t\tpath1.removeAllItems();\n\t\tpath2.removeAllItems();\n\n\t\t/* List all files in the current working directory */\n\t\tFile file = new File(\"./\");\n\t\tFile[] configs =file.listFiles();\n\n\t\t/* For every file */\n\t\tfor (int i=0;i<configs.length;i++){\n\n\t\t\t/* Retrieve the name and if it ends with .con extension then add it\n\t\t\t * to the two combo boxes */\n\t\t\tString name = configs[i].getName();\n\t\t\tif((!(name.length()<4)) && name.substring(name.length()-4).equals(\".con\")){\n\t\t\t\tpath1.addItem(name.substring(0,name.length()-4));\n\t\t\t\tpath2.addItem(name.substring(0,name.length()-4));\n\t\t\t}\n\t\t}\n\t}", "public void setExcludes( List<ExcludeClasses> excludes )\n {\n this.excludes = excludes;\n }", "public void setXmlRoot() {\n\t\tif (lineNodeIsSelected)\n\t\t\treturn;\n\n\t\tif (selections.size() == 0) {\n\t\t\tlineNode = (XsdNode) treeModel.getRoot();\n\t\t\tlineElements = getNodes(lineNode.getPath());\n\t\t\treturn;\n\t\t}\n\n\t\tXsdNode value = rootNode;\n\t\tXsdNode tmp = null;\n\t\tXsdNode select = null;\n\t\tXsdNode lastDuplicable = null;\n\t\t// go down while no more than one child is used and current node\n\t\t// is not selected\n\n\t\t// keep last node duplicable\n\n\t\tEnumeration children = value.children();\n\t\tint nb = 0;\n\t\twhile (nb <= 1 && !selections.contains(tmp)) {\n\n\t\t\tif (children.hasMoreElements()) {\n\t\t\t\tXsdNode child;\n\t\t\t\tchild = (XsdNode) children.nextElement();\n\t\t\t\tif (child.isUsed) {\n\t\t\t\t\ttmp = child;\n\t\t\t\t\tnb++;\n\t\t\t\t}\n\t\t\t\tif (selections.contains(child)) {\n\t\t\t\t\tselect = child;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnb = 0;\n\t\t\t\tif (tmp.isDuplicable())\n\t\t\t\t\tlastDuplicable = tmp;\n\t\t\t\tvalue = tmp;\n\t\t\t\tchildren = value.children();\n\t\t\t}\n\t\t}\n\t\tif (nb <= 1)\n\t\t\tvalue = select;\n\t\tSystem.out.println(\"[PSI makers: flattener] root selected: \"\n\t\t\t\t+ value.toString());\n\n\t\tlineNode = lastDuplicable;\n\n\t\tlineElements = getNodes(lineNode.getPath());\n\n\t}", "public void setRestrictedPaths(String[] restrictedPaths) {\r\n\t\tmRestrictedPaths = restrictedPaths;\r\n\t}", "private void cacheFoldersFiles() throws Exception {\n\n ArrayList<FileManagerFile> files = new ArrayList<FileManagerFile>();\n if (fileCount > 0) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n int offset = 0;\n int count = 1000;\n List<FileManagerFile> filelist;\n\n do {\n filelist = connection.getFileManager().getFileManagerFiles(count, offset);\n offset += count;\n for (FileManagerFile file : filelist) {\n if (file.getFolderId() == id) {\n files.add(file);\n }\n }\n } while (filelist.size() > 0 && files.size() < fileCount);\n }\n this.files = files;\n }", "public void filesLocation (String externalFolder) {\n externalStaticFileFolder = externalFolder;\n }", "public void setTestFolders(final String testResourcesFolder, final String testUpdateScriptsFolder) {\n setTestFolders(testResourcesFolder, testUpdateScriptsFolder, NO_INIT_SCRIPTS_FOLDER);\n }", "public Scouter(SynchronizedQueue<java.io.File> directoryQueue, java.io.File root) {\r\n this.root = root;\r\n this.directory_queue = directoryQueue;\r\n }", "public void setTestFolders(final String testResourcesFolder, final String testUpdateScriptsFolder, final String testInitScriptsFolder) {\n ServicesUtil.validateParameterNotNullStandardMessage(\"testResourcesFolder\", testResourcesFolder);\n ServicesUtil.validateParameterNotNullStandardMessage(\"testUpdateScriptsFolder\", testUpdateScriptsFolder);\n ServicesUtil.validateParameterNotNullStandardMessage(\"testInitScriptsFolder\", testResourcesFolder);\n this.saveCurrentFolders();\n\n setConfigurationAndLog(ArecoDeploymentScriptFinder.RESOURCES_FOLDER_CONF, testResourcesFolder);\n setConfigurationAndLog(ArecoDeploymentScriptFinder.UPDATE_SCRIPTS_FOLDER_CONF, testUpdateScriptsFolder);\n setConfigurationAndLog(ArecoDeploymentScriptFinder.INIT_SCRIPTS_FOLDER_CONF, testInitScriptsFolder);\n }", "private void getAllFiles(File dir, List<File> fileList) throws IOException {\r\n File[] files = dir.listFiles();\r\n if(files != null){\r\n for (File file : files) {\r\n // Do not add the directories that we need to skip\r\n if(!isDirectoryToSkip(file.getName())){\r\n fileList.add(file);\r\n if (file.isDirectory()) {\r\n getAllFiles(file, fileList);\r\n }\r\n }\r\n }\r\n }\r\n }" ]
[ "0.56471086", "0.5595827", "0.557366", "0.5524158", "0.55013585", "0.5475013", "0.54437745", "0.54117656", "0.5403667", "0.5352288", "0.5240845", "0.5149561", "0.5060944", "0.50592166", "0.4998405", "0.49978867", "0.49906364", "0.49680406", "0.49054635", "0.49022198", "0.48456573", "0.48259565", "0.48184416", "0.4808313", "0.4752322", "0.47381008", "0.47330016", "0.4729947", "0.4703193", "0.46806642", "0.46762758", "0.46643755", "0.46626034", "0.46586308", "0.46572044", "0.46483228", "0.4631413", "0.46246243", "0.46199206", "0.46129936", "0.46115616", "0.46105167", "0.4600043", "0.45850804", "0.4579039", "0.456778", "0.4565646", "0.45615613", "0.4556387", "0.4547826", "0.45427957", "0.45170313", "0.45046464", "0.4488841", "0.44855914", "0.44848967", "0.44820142", "0.4481305", "0.44796956", "0.44768405", "0.44737875", "0.44718504", "0.44580925", "0.4457262", "0.44558525", "0.44479507", "0.444628", "0.44394225", "0.4436037", "0.4423795", "0.44114813", "0.44107085", "0.43943676", "0.4393523", "0.4391976", "0.43799832", "0.43779817", "0.43655902", "0.43553197", "0.43527457", "0.43521163", "0.43468204", "0.4346664", "0.43444848", "0.4341098", "0.43409628", "0.43330088", "0.43186724", "0.4308994", "0.43070823", "0.43048453", "0.4293171", "0.42908153", "0.42906344", "0.4288749", "0.428373", "0.42808643", "0.42781723", "0.42779014", "0.42733523" ]
0.775261
0
Subscribe for services. All previous subscriptions are replaced by the current set of subscriptions. If a given service is not included as a key in the map then no files will be subscribed to the service, exactly as if the service had been included in the map with an explicit empty list of files.
public void setAnalysisSubscriptions(Map<AnalysisService, List<String>> subscriptions);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<Service> getAllSubscribeService();", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.SubscribeServiceResponse subscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.SubscribeServiceRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "private Set<Node> getRelevantServices(Map<String,Node> serviceMap, Set<String> inputs, Set<String> outputs) {\n\t\t// Copy service map values to retain original\n\t\tCollection<Node> services = new ArrayList<Node>(serviceMap.values());\n\n\t\tSet<String> cSearch = new HashSet<String>(inputs);\n\t\tSet<Node> sSet = new HashSet<Node>();\n\t\tSet<Node> sFound = discoverService(services, cSearch);\n\t\twhile (!sFound.isEmpty()) {\n\t\t\tsSet.addAll(sFound);\n\t\t\tservices.removeAll(sFound);\n\t\t\tfor (Node s: sFound) {\n\t\t\t\tcSearch.addAll(s.getOutputs());\n\t\t\t}\n\t\t\tsFound.clear();\n\t\t\tsFound = discoverService(services, cSearch);\n\t\t}\n\n\t\tif (isSubsumed(outputs, cSearch)) {\n\t\t\treturn sSet;\n\t\t}\n\t\telse {\n\t\t\tString message = \"It is impossible to perform a composition using the services and settings provided.\";\n\t\t\tSystem.out.println(message);\n\t\t\tSystem.exit(0);\n\t\t\treturn null;\n\t\t}\n\t}", "boolean addServiceSubscriber(Service service, Subscriber subscriber);", "private List<ServiceNode> getRelevantServices(Map<String,ServiceNode> serviceMap, Set<String> inputs, Set<String> outputs) {\n\t\t// If we are counting total time and total cost from scratch, reset them\n\t\tif (normaliseTotals && recalculateTotals) {\n\t\t\t_totalCost = 0.0;\n\t\t\t_totalTime = 0.0;\n\t\t}\n\n\t\t// Copy service map values to retain original\n\t\tCollection<ServiceNode> services = new ArrayList<ServiceNode>(serviceMap.values());\n\n\t\tSet<String> cSearch = new HashSet<String>(inputs);\n\t\tList<ServiceNode> sList = new ArrayList<ServiceNode>();\n\t\tSet<ServiceNode> sFound = discoverService(services, cSearch);\n\t\twhile (!sFound.isEmpty()) {\n\t\t\tsList.addAll(sFound);\n\t\t\tservices.removeAll(sFound);\n\t\t\tfor (ServiceNode s: sFound) {\n\t\t\t\tcSearch.addAll(s.getOutputs());\n\t\t\t\tif (normaliseTotals && recalculateTotals) {\n\t\t\t\t\t_totalCost += s.getQos()[COST];\n\t\t\t\t\t_totalTime += s.getQos()[TIME];\n\t\t\t\t}\n\t\t\t}\n\t\t\tsFound.clear();\n\t\t\tsFound = discoverService(services, cSearch);\n\t\t}\n\n\t\tif (isSubsumed(outputs, cSearch)) {\n\t\t\treturn sList;\n\t\t}\n\t\telse {\n\t\t\tString message = \"It is impossible to perform a composition using the services and settings provided.\";\n\t\t\tSystem.out.println(message);\n\t\t\tSystem.exit(0);\n\t\t\treturn null;\n\t\t}\n\t}", "public static void deliverMessages(Map<Serializable, ClientMessage> map, List<IService> sServices) {\n\t\t\n\t\tIterator<Serializable> it = map.keySet().iterator();\n\t\tRandom rand = new Random();\n\t\tint bound = sServices.size();\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\tClientMessage msg = map.get(it.next());\n\t\t\tint idx = rand.nextInt(bound);\n\t\t\t\n\t\t\tStorageService ss = (StorageService) sServices.get(idx);\n\t\t\tClientMessage res = ss.deliverMessage(msg);\n\t\t\tAssert.assertTrue(\"status: \" + res.status, res.status == Message.SUCCESS);\n\t\t}\n\t\t\n\t}", "public final void storeService(final Service service) {\r\n Concept[] o;\r\n Service[] s, s2;\r\n int i, hc, l;\r\n Service x, y;\r\n\r\n o = service.m_out;\r\n\r\n if (o.length > 0) {\r\n this.m_service_count++;\r\n s = o[0].m_services;\r\n\r\n for (i = (o[0].m_serviceCount - 1); i >= 0; i--) {\r\n if (service.isServiceEqual(s[i])) {\r\n return;\r\n }\r\n }\r\n\r\n for (i = (o.length - 1); i >= 0; i--) {\r\n o[i].addService(service);\r\n }\r\n\r\n s = this.m_services;\r\n l = s.length;\r\n if ((3 * (this.m_service_h++)) > (l << 1)) {\r\n i = (l - 1);\r\n l <<= 1;\r\n s2 = new Service[l];\r\n for (--l; i >= 0; i--) {\r\n for (x = s[i]; x != null; x = y) {\r\n y = x.m_next;\r\n hc = (x.m_name.hashCode() & l);\r\n x.m_next = s2[hc];\r\n s2[hc] = x;\r\n }\r\n }\r\n this.m_services = s = s2;\r\n } else\r\n l--;\r\n\r\n hc = (service.m_name.hashCode() & l);\r\n service.m_next = s[hc];\r\n s[hc] = service;\r\n }\r\n }", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "void putServiceNameServiceInfos(net.zyuiop.ovhapi.api.objects.services.Service param0, java.lang.String serviceName) throws java.io.IOException;", "public void map(HashMap<String, Object> map) {\n String indexString = (String) map.get(\"serviceIndexes\");\n String[] arr = indexString.split(\",\");\n // Fill indexes from map's return value.\n for(int i = 0; i < arr.length; i++) {\n this.indexes.add(new Integer(arr[i]));\n }\n // Retrieve services from enum by index\n for(int i = 0; i < indexes.size(); i++) {\n String s = ServiceTypes.values()[indexes.get(i)].getKey();\n this.services.add(s);\n }\n }", "@Override\n\tpublic void subTypeForServiceTypeAdded(ServiceEvent arg0) {\n\n\t}", "public void updateListOfIncludedServices(String serviceID){\n \n for(Iterator it = listOfIncludedServices.iterator();it.hasNext();){\n ServiceInfo si = (ServiceInfo) it.next();\n if(si.getID().equals(serviceID)){\n \n //Remove directory associated do service and all files on it\n this.removeServiceDirectory(serviceID);\n \n listOfExcludedServices.add(si);\n \n it.remove();\n }\n }\n }", "boolean removeServiceSubscriber(Service service);", "public URIRegisterExecutorSubscriber(final Map<String, ShenyuClientRegisterServiceFactory> shenyuClientRegisterService) {\n this.shenyuClientRegisterService = shenyuClientRegisterService;\n }", "public void setServerSubscriptions(List<ServerService> subscriptions);", "public void registerService(String serviceName, Object service);", "ServiceRegistry() {\n mRegistrations = new TreeMap<String, ServiceFactory>();\n }", "public void addSubscriptions(String subscribeTo){\n\t subscriptions.add(subscribeTo);\n\t}", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "private Set<ServiceNode> discoverService(Collection<ServiceNode> services, Set<String> searchSet) {\n\t\tSet<ServiceNode> found = new HashSet<ServiceNode>();\n\t\tfor (ServiceNode s: services) {\n\t\t\tif (isSubsumed(s.getInputs(), searchSet))\n\t\t\t\tfound.add(s);\n\t\t}\n\t\treturn found;\n\t}", "public void serviceInstalled(String serviceID, int[] eventIDs,\r\n \t\t\tString[] resourceOptions) {\t\t\r\n \t\teventIDFilter.serviceInstalled(serviceID, eventIDs);\r\n \t}", "private Map<String, Object> getSubServiceMap() {\n\t\tlog.info(\"*****Inside getSubservice method **\");\n\t\tMap<String, Object> serviceMap = null;\n\n\t\ttry {\n\n\t\t\tserviceMap = new HashMap<String, Object>();\n\t\t\tserviceMap.put(ResourceResolverFactory.SUBSERVICE, \"sam\");\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tStringWriter errors = new StringWriter();\n\t\t\te.printStackTrace(new PrintWriter(errors));\n\t\t\tlog.info(\"errors ***\" + errors.toString());\n\t\t}\n\t\tlog.info(\"*****getSubservice Method End**\");\n\t\t\n\t\treturn serviceMap;\n\n\t}", "private void mergeServices(JsonObject originService, JsonObject targetService, JsonObject tree) {\n mergeAnnotations(originService, targetService, tree);\n List<JsonObject> targetServices = new ArrayList<>();\n\n for (JsonElement targetItem : targetService.getAsJsonArray(\"resources\")) {\n JsonObject targetResource = targetItem.getAsJsonObject();\n boolean matched = false;\n for (JsonElement originItem : originService.getAsJsonArray(\"resources\")) {\n JsonObject originResource = originItem.getAsJsonObject();\n if (matchResource(originResource, targetResource)) {\n matched = true;\n mergeAnnotations(originResource, targetResource, tree);\n }\n }\n\n if (!matched) {\n targetResource.getAsJsonObject(\"body\").add(\"statements\", new JsonArray());\n targetServices.add(targetResource);\n }\n }\n\n targetServices.forEach(resource -> {\n int startIndex = FormattingSourceGen.getStartPosition(originService, \"resources\", -1);\n FormattingSourceGen.reconcileWS(resource, originService.getAsJsonArray(\"resources\"), tree,\n startIndex);\n originService.getAsJsonArray(\"resources\").add(resource);\n });\n }", "Subscriber getSubscriber(Service service);", "@Override\n public void serviceResolved(ServiceEvent serviceEvent) {\n // Test service info is resolved.\n String[] serviceUrls = serviceEvent.getInfo().getURLs();\n\n logger.info(\"Found kinect service \" + serviceEvent.getInfo().getURLs()[0].toString());\n\n if (serviceUrls.length > 0) {\n logger.info(\"Connecting to kinect service 2\");\n\n try {\n final URL url = new URL(serviceUrls[0]);\n logger.info(\"Connecting to kinect service \" + url.getHost() + \":\" + url.getPort());\n final KinectConnector connector = new KinectConnector(url.getHost(), url.getPort());\n connector.setDeviceListCallback(new DeviceCallback() {\n @Override\n public void onItemsChanged(List<KinectItem> devices) {\n logger.info(\"Found kinect objects\");\n for (KinectItem item : devices) {\n createDevice(url.getHost(), url.getPort(), item.getName().replace(\" \", \"\"));\n }\n connector.stop();\n }\n });\n connector.start();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n }\n }", "@Override\n\tpublic void subscribe()\n\t{\n\t\ts_ctx = (IContextProxy) ServiceManager.get(IContextProxy.class);\n\t\ts_fileMgr = (IFileManager) ServiceManager.get(IFileManager.class);\n\t\tm_models = new ProcedureModelManager(s_ctx, s_fileMgr);\n\t}", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "public void setService(String service) {\n this.service = service;\n }", "public void setService(String service) {\n this.service = service;\n }", "public void setService(String service) {\n this.service = service;\n }", "public Map<String, List<String>> getServices();", "public void setService(String service) {\n this.service = service;\n }", "@Override\n\tpublic void fileDeliveryServiceListUpdate() {\n\t\t\n\t}", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void addService() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n null,\n childrenNames());\n }", "public void setServiceArns(java.util.Collection<String> serviceArns) {\n if (serviceArns == null) {\n this.serviceArns = null;\n return;\n }\n\n this.serviceArns = new java.util.ArrayList<String>(serviceArns);\n }", "@Override\n\tpublic void serviceAdded(ServiceEvent arg0) {\n\t\tServiceInfo serviceInfo = mJmDNS.getServiceInfo(arg0.getType(),\n\t\t\t\targ0.getName());\n\t\tif (onFoundListener != null) {\n\t\t\tonFoundListener.onFound(serviceInfo);\n\t\t}\n\t}", "@Override\n\tpublic void streamingServiceListUpdate() {\n\t\t\n\t}", "public void fetchServices() {\n serviciosTotales.clear();\n for (String serviceId : serviceList) {\n databaseServiceReference.child(serviceId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Servicio servicioTemp = dataSnapshot.getValue(Servicio.class);\n serviciosTotales.add(servicioTemp);\n servicesAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "public interface SearchService extends Service {\n Observable<SearchPlacesResponse> doSearchPlacesService(String authorizationKey, int page, int size, SearchPlacesRequest searchPlacesRequest);\n Observable<SearchPlacesResponse> doSearchBreweriesService(String authorizationKey, int page, int size, SearchPlacesRequest searchPlacesRequest);\n Observable<SearchProductResponse> doSearchProductsService(String authorizationKey, int page, int size, SearchProductsRequest searchProductsRequest);\n Observable<List<String>> getSuggestPlacesService(String authorizationKey, String text, int count);\n Observable<List<String>> getSuggestBreweriesService(String authorizationKey, String text, int count);\n Observable<List<String>> getSuggestProductsService(String authorizationKey, String text, int count);\n}", "@Override\n public void onSubscribe(Subscription s) {\n s.request(10);\n\n // Should not produce anymore data\n s.request(10);\n }", "public void setService (String service) {\n\t this.service = service;\n\t}", "@Override\n\tpublic int addStationstoServices(Service serviceDTO) {\n\t\tcom.svecw.obtr.domain.Service serviceDomain = new com.svecw.obtr.domain.Service();\n\t\tserviceDomain.setSourceStationId(serviceDTO.getSourceStationId());\n\t\tserviceDomain.setDestinationStationId(serviceDTO.getDestinationStationId());\n\t\tserviceDomain.setServiceId(serviceDTO.getServiceId());\n\t\tSystem.out.println(serviceDTO.getServiceId());\n\t\t//System.out.println(serviceDTO.getDestinationStationId());\n\t\treturn iStationToService.addServiceToStation(serviceDomain);\n\t}", "public void addServices(Services services) {\n for(int i = 0; i < services.getServices().size(); i++) {\n this.services.add(services.getServices().get(i)); // Retrieve the name of the Service\n }\n for(int i = 0; i < services.getIndexes().size(); i++) {\n this.indexes.add(services.getIndexes().get(i)); // Retrieve the index of the Service\n }\n }", "public static void setMockSystemService(String serviceName, Object service) {\n if (service != null) {\n sMockServiceMap.put(serviceName, service);\n } else {\n sMockServiceMap.remove(serviceName);\n }\n }", "void subscribe();", "private static void registerFromPackage(String packageName, String packageURL, FileFilter fileFilter) {\n File dir = new File(packageURL);\n if (!dir.exists() || !dir.isDirectory()) return;\n File[] dirFiles = dir.listFiles(fileFilter);\n for (File file : dirFiles)\n if (file.isDirectory()) {\n registerFromPackage(packageName + \".\" + file.getName(), file.getAbsolutePath(), fileFilter);\n } else {\n String className = file.getName().substring(0, file.getName().indexOf(\".\"));\n try {\n Class<?> aClass = Class.forName(packageName + \".\" + className);\n Annotation[] annotations = aClass.getAnnotations();\n //TODO 并不一定是按照顺序的,而且未来有可能不只是2个注解\n\n // 扫描注册 controller requestMapping\n if (annotations.length > 1 && annotations[0].annotationType().equals(Controller.class) && annotations[1].annotationType().equals(RequestMapping.class)) {\n String preUrl = aClass.getAnnotation(RequestMapping.class).value();\n Method[] methods = aClass.getMethods();\n for (Method method : methods) {\n Annotation requestMapping = method.getAnnotation(RequestMapping.class);\n if (requestMapping != null) {\n String pixUrl = ((RequestMapping) requestMapping).value();\n register(preUrl + pixUrl, new Service(aClass.asSubclass(ServiceInterface.class).getConstructor().newInstance(), method));\n System.out.println(((RequestMapping) requestMapping).value());\n }\n }\n\n }\n\n //放弃以下早期的扫描服务代码\n // 实现了注解,并且实现了接口\n// if (annotation != null && ServiceInterface.class.isAssignableFrom(aClass)) {\n//\n//// register(annotation.urlPattern(),aClass.asSubclass(ServiceInterface.class).getDeclaredConstructor().newInstance());\n//// System.out.println(\"成功注册服务: \" + annotation.urlPattern() + \" \" + className);\n// }\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }", "@BackpressureSupport(BackpressureKind.SPECIAL)\n @SchedulerSupport(SchedulerKind.NONE)\n @Override\n public final void subscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n subscribeActual(s);\n }", "public void addServiceName(String name) {\n if (name != null) {\n this.serviceNameSet.add(name);\n }\n }", "public FileServer (Map<String, String> filePath){\n\t\tthis.filePath = new ConcurrentHashMap<String, String>();\n\n\t\tfor(String filename : filePath.keySet()){\n\t\t\tthis.filePath.putIfAbsent(filename, filePath.get(filename));\n\t\t}\n\t\t\n\t}", "void addService(ServiceInfo serviceInfo);", "@Override protected void subscribeActual(Subscriber s) {\n source.subscribe(MaybeFuseable.get().wrap(s, contextScoper, assembled));\n }", "public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}", "Collection<Service> getAllPublishedService();", "void subscribe(String id);", "public List<CatalogService> getService(String service);", "public void addServiceImpl(String serviceName, FileObject configFile, boolean fromWSDL);", "public void setServices(List<AService> services) {\n this.services = services;\n }", "public static void loadDefaultServices(SSOToken token,\n OrganizationConfigManager ocm) throws SMSException {\n // Check if DIT has been migrated to 7.0\n if (!migratedTo70) {\n return;\n }\n Set defaultServices = ServiceManager.servicesAssignedByDefault();\n // Load the default services automatically\n OrganizationConfigManager parentOrg = ocm.getParentOrgConfigManager();\n if (defaultServices == null) {\n // There are no services to be loaded\n return;\n }\n \n Set assignedServices = new CaseInsensitiveHashSet(\n parentOrg.getAssignedServices());\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager\"\n + \"::loadDefaultServices \" + \"assignedServices : \"\n + assignedServices);\n }\n boolean doAuthServiceLater = false;\n String serviceName = null;\n \n // Copy service configuration\n Iterator items = defaultServices.iterator();\n while (items.hasNext() || doAuthServiceLater) {\n if (items.hasNext()) {\n serviceName = (String) items.next();\n if (serviceName.equals(ISAuthConstants.AUTH_SERVICE_NAME)) {\n doAuthServiceLater = true;\n continue;\n }\n } else if (doAuthServiceLater) {\n serviceName = ISAuthConstants.AUTH_SERVICE_NAME;\n doAuthServiceLater = false;\n }\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager\" +\n \"::loadDefaultServices:ServiceName \" + serviceName);\n }\n try {\n ServiceConfig sc = parentOrg.getServiceConfig(serviceName);\n Map attrs = null;\n if (sc != null && assignedServices.contains(serviceName)) {\n attrs = sc.getAttributesWithoutDefaults();\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug\n .message(\"OrganizationConfigManager\"\n + \"::loadDefaultServices \"\n + \"Copying service from parent: \"\n + serviceName);\n }\n ServiceConfig scn = ocm\n .addServiceConfig(serviceName, attrs);\n // Copy sub-configurations, if any\n copySubConfig(sc, scn);\n }\n } catch (SSOException ssoe) {\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\n \"OrganizationConfigManager.loadDefaultServices \" +\n \"SSOException in loading default services \",\n ssoe);\n }\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n }\n }", "public void serviceAdded(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"added serivce: \" + event);\n\t\t}", "private void populateTaxonomyTree() {\n\t\tfor (Node s: serviceMap.values()) {\n\t\t\taddServiceToTaxonomyTree(s);\n\t\t}\n\t}", "public void addServiceEntriesToDD(String serviceName, String serviceEndpointInterface, String serviceEndpoint);", "public void serviceAdded(String serviceID, Remote service, List<?> itemList);", "@Override\n public void subscribe(ISubscriber subscriber) {\n subscribers.add(subscriber);\n }", "@Override\n public void subscribe(final Set<ValueSpecification> valueSpecifications) {\n LOGGER.debug(\"Added subscriptions to {}\", valueSpecifications);\n subscriptionsSucceeded(valueSpecifications);\n }", "default void subscribe(Subscriber<? super Void> s) {\n\t\tOperators.complete(s);\n\t}", "Observable<PolicySnippetsCollection> listByServiceAsync(String resourceGroupName, String serviceName);", "public void startService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "@Test\n\tvoid testAllNamespacesTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = true;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(NAMESPACE_ALL);\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 2);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertTrue(result.contains(\"service-b\"));\n\t}", "public void clearServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete(); \n }\n \n }", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx, Ice.Callback __cb);", "public void serviceChanged(ServiceEvent event)\n {\n ServiceReference serviceRef = event.getServiceReference();\n\n // if the event is caused by a bundle being stopped, we don't want to\n // know\n if (serviceRef.getBundle().getState() == Bundle.STOPPING)\n {\n return;\n }\n\n Object service = GuiActivator.bundleContext.getService(serviceRef);\n\n // we don't care if the source service is not a protocol provider\n if (!(service instanceof ProtocolProviderService))\n {\n return;\n }\n\n switch (event.getType())\n {\n case ServiceEvent.REGISTERED:\n addAccount((ProtocolProviderService) service, parentMenu);\n break;\n case ServiceEvent.UNREGISTERING:\n removeAccount((ProtocolProviderService) service, parentMenu);\n break;\n }\n }", "@Test\n\tvoid testSingleNamespaceTwoServicesPresent() {\n\t\tLister<V1Endpoints> endpointsLister = setupEndpointsLister(\"\");\n\n\t\tboolean allNamespaces = false;\n\t\tV1Service serviceA = new V1Service().metadata(new V1ObjectMeta().name(\"service-a\").namespace(\"namespace-a\"));\n\t\tV1Service serviceB = new V1Service().metadata(new V1ObjectMeta().name(\"service-b\").namespace(\"namespace-b\"));\n\t\tserviceCache.add(serviceA);\n\t\tserviceCache.add(serviceB);\n\n\t\tLister<V1Service> serviceLister = new Lister<>(serviceCache).namespace(\"namespace-a\");\n\t\tKubernetesDiscoveryProperties kubernetesDiscoveryProperties = new KubernetesDiscoveryProperties(true,\n\t\t\t\tallNamespaces, Set.of(), true, 60, false, null, Set.of(), Map.of(), null, null, 0, false);\n\n\t\tKubernetesInformerReactiveDiscoveryClient discoveryClient = new KubernetesInformerReactiveDiscoveryClient(\n\t\t\t\tnew KubernetesInformerDiscoveryClient(sharedInformerFactory, serviceLister, endpointsLister, null, null,\n\t\t\t\t\t\tkubernetesDiscoveryProperties));\n\n\t\tList<String> result = discoveryClient.getServices().collectList().block();\n\t\tAssertions.assertEquals(result.size(), 1);\n\t\tAssertions.assertTrue(result.contains(\"service-a\"));\n\t\tAssertions.assertFalse(result.contains(\"service-b\"));\n\t}", "public static void removeCurrentTargetServiceForAll() {\n DCASelectedService targetService = targetServiceMap.get(DCAUserPreference.getLoggedInUser().getUsername());\n\n if (targetService == null) {\n return;\n }\n\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"Invalidating Cached service with UUID = %s for all the Users\",\n targetService.getUuid()));\n }\n\n List<String> usersToRemove = new ArrayList<>();\n for (Map.Entry<String, DCASelectedService> entry : targetServiceMap.entrySet()) {\n DCASelectedService selectedService = entry.getValue();\n if (selectedService.getUuid().equals(targetService.getUuid())) {\n usersToRemove.add(entry.getKey());\n }\n }\n\n for (String userName : usersToRemove) {\n targetServiceMap.remove(userName);\n }\n }", "@Override\r\n\tpublic List<String> getGroup(String service) {\n\t\tList<String> results = new ArrayList<String>();\r\n\t\tString rest = null;\r\n\t\tfor(String s : prefixes)\r\n\t\t\tif(service.startsWith(s))\r\n\t\t\t\trest = service.substring(s.length());\r\n\t\tif(rest == null)\r\n\t\t\treturn null;\r\n\t\tfor(String s : prefixes)\r\n\t\t\tresults.add(s + rest);\r\n\t\treturn results;\r\n\t\t\t\r\n\t}", "public abstract T addService(ServerServiceDefinition service);", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "<T> void registerService(\n T service,\n Class<T> serviceKlass,\n @Nullable Map<String, Function<Object, Object>> resultProcessor\n );", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "public void processLiveCallWhenServiceConnected() {\n if (!this.mCallMapById.isEmpty()) {\n for (Integer num : this.mCallMapById.keySet()) {\n Call callById = getCallById(num);\n if (!(callById == null || callById.getState() == 10 || callById.getState() == 7)) {\n HiLog.info(LOG_LABEL, \"processLiveCallWhenServiceConnected: still has call\", new Object[0]);\n addCall(callById);\n }\n }\n processCallAudioStateWhenServiceConnected();\n processCanAddCallWhenServiceConnected();\n }\n }", "public void setServiceName(String serviceName)\r\n {\r\n this.serviceName = serviceName;\r\n }", "public synchronized void startCloudServices() {\n if (!Platform.cloudServicesStarted) {\n // guarantee to execute once\n Platform.cloudServicesStarted = true;\n AppConfigReader reader = AppConfigReader.getInstance();\n String cloudServices = reader.getProperty(EventEmitter.CLOUD_SERVICES);\n if (cloudServices != null) {\n List<String> list = Utility.getInstance().split(cloudServices, \", \");\n if (!list.isEmpty()) {\n List<String> loaded = new ArrayList<>();\n SimpleClassScanner scanner = SimpleClassScanner.getInstance();\n List<ClassInfo> services = scanner.getAnnotatedClasses(CloudService.class, true);\n for (String name: list) {\n if (loaded.contains(name)) {\n log.error(\"Cloud service ({}) already loaded\", name);\n } else {\n if (startService(name, services, false)) {\n loaded.add(name);\n } else {\n log.error(\"Cloud service ({}) not found\", name);\n }\n }\n }\n if (loaded.isEmpty()) {\n log.warn(\"No Cloud services are loaded\");\n } else {\n log.info(\"Cloud services {} started\", loaded);\n }\n }\n }\n }\n }", "public interface Subscription {\n /**\n * Calling this will send the event to the subscribed service\n * @param event the event to transmit to the subscribed service\n */\n boolean onEvent(Event event);\n\n /**\n * Returns a stream of all subscribeRequests that are transmitted by the subbed service\n * @return a stream of subscribeRequests transmitted by subbed service\n */\n Observable<SubscribeRequest> getSubscribeRequestStream();\n\n /**\n * This completable will complete when the subscription is terminated for some reason (most likely a connection termination)\n * @return a completable that will complete when the subscription is terminated\n */\n Completable getCompletable();\n}", "public void setServiceName(String serviceName)\n {\n this.serviceName = serviceName;\n }", "public interface ServicePresenceListener {\n\n\tvoid updateComponentServices(\n\t\t\tfinal ServiceProto.ComponentRef componentRef,\n\t\t\tfinal Multimap<ServiceProto.ServiceRef, String> services,\n\t\t\tfinal Multimap<ServiceProto.ServiceRef, Integer> serviceFlags);\n\n}", "private void updateDictionary(Collection<String> writtenFiles) {\n if(logger.isDebugEnabled()){\n logger.debug(\"updating VFSCache with files written: \" + writtenFiles);\n }\n Cache cache = CacheFactory.getVFSCache();\n for(String path : writtenFiles){\n cache.put(new Element(path, path));\n }\n }", "public abstract void observeSpecificData(Service service);", "public interface SysFileService extends CommonService<SysFile> {\n}", "default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }", "private void getServiceClasses(Class<?> service, Set<ProviderClass> sp) {\n LOGGER.log(Level.CONFIG, \"Searching for providers that implement: \" + service);\n Class<?>[] pca = ServiceFinder.find(service, true).toClassArray();\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n LOGGER.log(Level.CONFIG, \" Provider found: \" + pc);\n }\n }\n // Add service-defined providers to the set after application-defined\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n sp.add(new ProviderClass(pc, true));\n }\n }\n }", "@Inject\n public ChatMessageEventsSubscriber(ChannelService channelService) {\n channelService.createdChannelTopic()\n .subscribe()\n .atLeastOnce(Flow.fromFunction((ChannelEvent channelEvent) -> {\n logger.info(\"CHAT MESSAGE EVENT: new Channel created \" + channelEvent);\n return Done.getInstance();\n }));\n\n channelService.updatedChannelTopic()\n .subscribe()\n .atLeastOnce(Flow.fromFunction((ChannelEvent event) -> {\n logger.info(\"CHAT MESSAGE EVENT: Channel updated \" + event);\n return Done.getInstance();\n })\n );\n }", "void addPhotos(Subscriber<BaseBean> subscriber, String... photos);", "public void setServiceName(String serviceName){\n this.serviceName = serviceName;\n }", "private void requestSubscribe(LinkedHashMap<String, RequestedQoS> topics) {\n if (topics.isEmpty() || this.client == null || !this.client.isConnected()) {\n // nothing to do\n return;\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"Request Subscribe to: \" + topics);\n }\n\n this.client\n .subscribe(topics.entrySet()\n .stream().collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().toInteger())))\n .onComplete(result -> subscribeSent(result, topics));\n }", "void putServiceName(net.zyuiop.ovhapi.api.objects.license.windows.Windows param0, java.lang.String serviceName) throws java.io.IOException;", "public void setServiceName(String serviceName) {\n this.serviceName = serviceName;\n }", "public void setServiceName(String serviceName) {\n this.serviceName = serviceName;\n }", "private void subscribe() {\r\n\r\n OnUpdatePlayerSubscription subscription = OnUpdatePlayerSubscription.builder().build();\r\n subscriptionWatcher = awsAppSyncClient.subscribe(subscription);\r\n subscriptionWatcher.execute(subCallback);\r\n }" ]
[ "0.5828175", "0.56448305", "0.5606402", "0.5596014", "0.5555236", "0.5366495", "0.51768774", "0.51740676", "0.51514673", "0.507749", "0.50310767", "0.5010239", "0.4930087", "0.49250036", "0.49113742", "0.49108115", "0.4910304", "0.48963666", "0.4875961", "0.48705798", "0.4842241", "0.4815721", "0.4791484", "0.47876808", "0.4775279", "0.47461113", "0.47332105", "0.47050825", "0.4702242", "0.4702242", "0.4702242", "0.46970242", "0.46905947", "0.4678251", "0.4668794", "0.4668794", "0.46578327", "0.46564913", "0.46518803", "0.46337265", "0.46227258", "0.462143", "0.46134812", "0.460936", "0.46081176", "0.4601239", "0.459695", "0.45930266", "0.45914578", "0.45741645", "0.4573362", "0.4572609", "0.4570185", "0.45479557", "0.4536", "0.45310616", "0.45199165", "0.45196065", "0.451934", "0.45115438", "0.44934204", "0.44898152", "0.44893652", "0.4485508", "0.4484898", "0.4480455", "0.44759625", "0.44744733", "0.44630975", "0.44582707", "0.44547147", "0.44537964", "0.4452771", "0.445061", "0.44460246", "0.4436243", "0.44299883", "0.4425547", "0.44252303", "0.44199216", "0.44196156", "0.44017076", "0.4393347", "0.43910703", "0.43831185", "0.43817362", "0.43795624", "0.43784842", "0.4377879", "0.4376063", "0.43735927", "0.43622264", "0.43617213", "0.4360256", "0.4354822", "0.43536112", "0.43524233", "0.4351721", "0.4351721", "0.43498772" ]
0.5879108
0
Set the priority files to the files in the given list. A priority file is a file that is given priority when scheduling which analysis work to do first. The list typically contains those files that are visible to the user and those for which analysis results will have the biggest impact on the user experience.
public void setPriorityFiles(List<String> files);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int getFilePriority(File file) {\n \treturn 1;\n }", "public void setFileList(List<TbomFile> fileList) {\n\t\tthis.fileList = fileList;\n\t}", "private void prepareAssignmentFiles() {\n for (Assignment assignment : assignments) {\n //---------- initialize the assignmentFiles array list ----------\n assignment.assignmentFiles = new ArrayList<>();\n\n //create a temporary assignment files array list\n ArrayList<File> assignmentFiles = new ArrayList<>();\n\n //---------- call the recursive findAssignmentFiles method ----------\n findAssignmentFiles(assignmentFiles, assignment.assignmentDirectory);\n\n //---------- set the language for the assignment ----------\n if (language.equals( IAGConstant.LANGUAGE_AUTO) ) {\n assignment.language = autoDetectLanguage(assignmentFiles);\n }\n else {\n assignment.language = language;\n }\n\n String[] extensions;\n\n switch (assignment.language) {\n case IAGConstant.LANGUAGE_PYTHON3:\n extensions = IAGConstant.PYTHON_EXTENSIONS;\n break;\n case IAGConstant.LANGUAGE_CPP:\n extensions = IAGConstant.CPP_EXTENSIONS;\n break;\n default: //unable to determine the language\n extensions = new String[] {};\n }\n\n //add only files of the right type to the assignment file list\n for (File f: assignmentFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(extensions).contains(f_extension)){\n //---------- if the extension on the file matches\n // one of the extension in the extensions list, add\n // it to the programming files list. ----------\n assignment.assignmentFiles.add(f);\n }\n }\n assignment.bAutoGraded = false; //indicate the assignment has not yet been auto-graded\n }\n\n }", "public void setPriority(String arg[]) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.PRIORITY.toString(), arg);\n\t}", "private void sort() {\n setFiles(getFileStreamFromView());\n }", "protected void listUsedFiles(List<String> list){\r\n // By default do nothing\r\n }", "public void setFilesList(File nowFile) {\n enterFilePath(nowFile);\n }", "public final void mo118044a(List<File> list) {\n this.f120295d.mo118059a(list);\n }", "public void setThemeFiles(final List<IFileSpecification> files)\n {\n if (files != null)\n this.themeFiles = ImmutableList.copyOf(files);\n else\n this.themeFiles = ImmutableList.of();\n clean();\n }", "public void fileChanged(ArrayList<String> sortedFiles, ArrayList<String> tag1ArrList2, ArrayList<String> tag2ArrList2, ArrayList<String> tag3ArrList2, ArrayList<Boolean> favArrList2) {\n this.sortedFilesArrList.clear();\n this.tag1ArrList.clear();\n this.tag2ArrList.clear();\n this.tag3ArrList.clear();\n this.favArrList.clear();\n\n this.tag1ArrList.addAll(tag1ArrList2);\n this.tag2ArrList.addAll(tag2ArrList2);\n this.tag3ArrList.addAll(tag3ArrList2);\n this.favArrList.addAll(favArrList2);\n this.sortedFilesArrList.addAll(sortedFiles);\n\n notifyDataSetChanged();\n notifyItemRangeChanged(0, getItemCount());\n }", "void setPriority(int priority);", "void setPriority(int priority);", "public void setPriority(int value) {\n this.priority = value;\n }", "public void updatePriority(){\n\t\tpriority = (int) priority / 2;\n\t}", "protected void createFileList()\n {\n // get a sorted array of files\n File f = new File(appManagementDir);\n String[] files = f.list(new FileFilter(AppSettings.getFilter()));\n \n // get the adapter for this file list\n ArrayAdapter<String> a = (ArrayAdapter<String>)fileList.getAdapter();\n a.clear();\n \n // clear the check boxes\n fileList.clearChoices();\n \n if (files != null && files.length > 0)\n {\n Arrays.sort(files, 0, files.length, new Comparator<Object>() {\n \n @Override\n public int compare(Object object1, Object object2)\n {\n int comp = 0;\n if (object1 instanceof String \n && object2 instanceof String)\n {\n String str1 = (String)object1;\n String str2 = (String)object2;\n \n comp = str1.compareToIgnoreCase(str2);\n }\n \n return comp;\n }});\n \n \n // add all the files\n for (String fileName : files)\n {\n a.add(fileName);\n }\n \n fileList.invalidate();\n }\n }", "public static void sortFiles(List<File> files)\r\n\t{\r\n\t\t/*\r\n\t\t * bubblesort algorithm\r\n\t\t */\r\n\t\tboolean changesMade = true;\r\n\t\t\r\n\t\twhile (changesMade)\r\n\t\t{\r\n\t\t\tchangesMade = false;\r\n\t\t\t\r\n\t\t\tfor(int x=1; x<files.size(); x++)\r\n\t\t\t{\r\n\t\t\t\t/*\r\n\t\t\t\t * if file at index x has a lower number than the file\r\n\t\t\t\t * at index x-1\r\n\t\t\t\t */\r\n\t\t\t\tif(getFileNum(files.get(x)) < getFileNum(files.get(x-1)))\r\n\t\t\t\t{\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * put this file in the previous index\r\n\t\t\t\t\t */\r\n\t\t\t\t\tFile tempFile = files.get(x);\r\n\t\t\t\t\tfiles.remove(x);\r\n\t\t\t\t\tfiles.add(x-1, tempFile);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//indicate changes were made\r\n\t\t\t\t\tchangesMade = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void setImportance(ArrayList<DefaultActivity> scheduleList) {\n for (DefaultActivity i : scheduleList) {\n getKeyWords(i);\n i.setUrgencyFactor(getUrgencyRating(i));\n i.setEnjoymentFactor(getEnjoymentFactor(i));\n if (!i.getTypeSwitch()) {\n i.setSubjectValue(getSubjectValue(i));\n }\n }\n for (DefaultActivity i : scheduleList) {\n i.setProficiencyFactor(getProficiency(i));\n i.setImportanceValue(getImportance(i));\n }\n }", "public void setPriority(int data) {\n priority = data;\n }", "protected void assignItemPriorities(HashMap<String, String> itemPriorityMap, List<CompletionItem> completionItems) {\n completionItems.forEach(completionItem -> {\n if (itemPriorityMap.containsKey(completionItem.getDetail())) {\n completionItem.setSortText(itemPriorityMap.get(completionItem.getDetail()));\n }\n });\n }", "public void assignPriority(){\n\t /**\n\t * Uses a simple algorithm, where user priority and difficulty are weighted equally\n\t * Weight is given highest flat priority\n\t * Due date is given lowest priority\n\t * This implementation could be changed without affecting the overall algorithm\n\t */\n\t int user_priority_factor = user_priority * 3;\n\t int difficulty_factor = difficulty * 3;\n\t int weight_factor = weight * 5;\n\t \n\t //Assigns a priority based on the due date\n\t\tswitch(dueDate){\n\t\tcase 'M':\n\t\t\tduedate_priority = 6;\n\t\t\tbreak;\n\t\tcase 'T':\n\t\t duedate_priority = 5;\n\t\t\tbreak;\n\t\tcase 'W':\n\t\t duedate_priority = 4;\n\t\t\tbreak;\n\t\tcase 'R':\n\t\t duedate_priority = 3;\n\t\t\tbreak;\n\t\tcase 'F':\n\t\t\tduedate_priority = 2;\n\t\t\tbreak;\n\t\tcase 'S':\n\t\t\tduedate_priority = 1;\n\t\t\tbreak;\n\t\tcase 'N':\n\t\t\tduedate_priority = 7;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tint duedate_factor = duedate_priority * 2;\n\t priority = user_priority_factor + difficulty_factor + weight_factor\n\t + duedate_factor;\n\t}", "public void setPriorityItems(List<String> packageNames) {\n mAdapter.setPriorityItems(packageNames);\n }", "public void setFileTypes(String[] fileTypes);", "public int compareTo(AppFile aAF)\n{\n if(_priority!=aAF._priority) return _priority>aAF._priority? -1 : 1;\n return _file.compareTo(aAF._file);\n}", "public void setFiles(ArrayList<VipeFile> files) {\n this.files = files;\n }", "public void setPriority(int r) {\n priority = r;\n }", "protected void sortResources()\n {\n PriorityComparator priorityComparator = new PriorityComparator();\n List<Resource> resources = getResources();\n Collections.sort(resources, priorityComparator);\n }", "void setInFiles(String inFilesStr) {\n\t\tString[] result = inFilesStr.split(\",\");\n\t\tfor (int x = 0; x < result.length; x++) {\n\t\t\tString fName = result[x].trim();\n\t\t\tthis.inFiles.add(new File(fName));\n\t\t}\n\t}", "private void populateList(File[] filesList) {\n Log.i(\"mPackage\",\"FilesList: \"+filesList.length);\n for(File file : filesList) {\n //Log.i(\"mPackage\",\"Path: \"+file);\n if(file.isDirectory()) {\n populateList(file.listFiles());\n }\n else {\n MarkerModel markerModel = new MarkerModel();\n Boolean containsObj = false;\n for(File modelFile : filesList) {\n String[] extension = modelFile.getName().split(\"\\\\.\");\n if(extension[extension.length-1].equals(\"obj\")) {\n markerModel.setObj(modelFile.getPath());\n containsObj = true;\n }\n else if(extension[extension.length-1].equals(\"mtl\"))\n markerModel.setMtl(modelFile.getPath());\n else\n markerModel.addTexture(modelFile.getPath());\n }\n if(containsObj)\n models.add(markerModel);\n return;\n //models.add(file.getPath());\n //Log.i(\"mPackage\",\"Path: \"+file.getPath());\n }\n }\n }", "public void setFiles(ArrayList<BatchFileModel> value) {\n this.files = value;\n }", "public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }", "public void setPriority(int v) \n {\n \n if (this.priority != v)\n {\n this.priority = v;\n setModified(true);\n }\n \n \n }", "public void setPriority( int priority , int telObsCompIndex )\n\t{\n\t\t_avTable.set( ATTR_PRIORITY , priority , telObsCompIndex ) ;\n\t}", "public void SetTestFiles(File[] testFiles)\n\t{\n\t\tthis.testFiles = testFiles;\n\t}", "public void setFiles(String filenames)\n {\n if (filenames != null && filenames.length() > 0)\n {\n StringTokenizer tok = new StringTokenizer(\n filenames, \", \\t\\n\\r\\f\", false);\n while (tok.hasMoreTokens())\n {\n this.filenames.addElement(tok.nextToken());\n }\n }\n }", "public void a(File file, List<WxAndQqScanPathInfo> list) {\n if (file != null && !this.p) {\n File[] listFiles = file.listFiles();\n if (listFiles != null) {\n int length = listFiles.length;\n int i2 = 0;\n while (i2 < length) {\n File file2 = listFiles[i2];\n if (!this.p) {\n if (file2 != null) {\n if (!file2.isDirectory()) {\n if (!\".nomedia\".equals(file2.getName()) && file2.length() >= 5 && file2 != null && file2.exists()) {\n CleanWxItemInfo cleanWxItemInfo = new CleanWxItemInfo();\n cleanWxItemInfo.setFileType(((WxAndQqScanPathInfo) list.get(0)).getType());\n cleanWxItemInfo.setFile(file2);\n cleanWxItemInfo.setDays(TimeUtil.changeTimeToDay(cleanWxItemInfo.getFile().lastModified()));\n cleanWxItemInfo.setFileSize(file2.length());\n switch (((WxAndQqScanPathInfo) list.get(0)).getType()) {\n case 1:\n o += cleanWxItemInfo.getFileSize();\n d.setTotalSize(d.getTotalSize() + cleanWxItemInfo.getFileSize());\n d.setTotalNum(d.getTotalNum() + 1);\n if (d.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n d.setSelectSize(d.getSelectSize() + cleanWxItemInfo.getFileSize());\n d.setSelectNum(d.getSelectNum() + 1);\n }\n cleanWxItemInfo.setDays(TimeUtil.changeTimeToDay(0));\n a(d, cleanWxItemInfo);\n break;\n case 2:\n if (!file2.getAbsolutePath().endsWith(\"_cover\") && !new File(file2.getAbsolutePath() + \"_cover\").exists()) {\n if (!\"finishActivity\".equals(this.r) && !\"bigGarbageFragment\".equals(this.r)) {\n if (e.isFinished()) {\n j.setTotalNum(j.getTotalNum() + 1);\n j.setTotalSize(j.getTotalSize() + cleanWxItemInfo.getFileSize());\n a(j, cleanWxItemInfo);\n break;\n } else {\n o += cleanWxItemInfo.getFileSize();\n e.setTotalNum(e.getTotalNum() + 1);\n e.setTotalSize(e.getTotalSize() + cleanWxItemInfo.getFileSize());\n if (e.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n e.setSelectNum(e.getSelectNum() + 1);\n e.setSelectSize(e.getSelectSize() + cleanWxItemInfo.getFileSize());\n }\n a(e, cleanWxItemInfo);\n break;\n }\n }\n } else {\n j.setTotalSize(j.getTotalSize() + cleanWxItemInfo.getFileSize());\n j.setTotalNum(j.getTotalNum() + 1);\n a(j, cleanWxItemInfo);\n break;\n }\n break;\n case 3:\n o += cleanWxItemInfo.getFileSize();\n f.setTotalSize(f.getTotalSize() + cleanWxItemInfo.getFileSize());\n f.setTotalNum(f.getTotalNum() + 1);\n if (f.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n f.setSelectSize(f.getSelectSize() + cleanWxItemInfo.getFileSize());\n f.setSelectNum(f.getSelectNum() + 1);\n }\n a(f, cleanWxItemInfo);\n break;\n case 4:\n if (file2.getName().startsWith(\"snstblur_src_\")) {\n if (Constants.PRIVATE_LOG_CONTROLER) {\n break;\n } else {\n file2.delete();\n break;\n }\n } else {\n if (!file2.getName().startsWith(\"snst_\")) {\n if (file2.getName().startsWith(\"snsu_\") && new File(file2.getAbsolutePath().replace(\"snsu_\", \"snsb_\")).exists()) {\n break;\n }\n } else if (!new File(file2.getAbsolutePath().replace(\"snst_\", \"snsu_\")).exists()) {\n if (new File(file2.getAbsolutePath().replace(\"snst_\", \"snsb_\")).exists()) {\n break;\n }\n } else {\n break;\n }\n o += cleanWxItemInfo.getFileSize();\n g.setTotalSize(g.getTotalSize() + cleanWxItemInfo.getFileSize());\n g.setTotalNum(g.getTotalNum() + 1);\n if (g.isChecked()) {\n cleanWxItemInfo.setChecked(true);\n g.setSelectSize(g.getSelectSize() + cleanWxItemInfo.getFileSize());\n g.setSelectNum(g.getSelectNum() + 1);\n }\n a(g, cleanWxItemInfo);\n break;\n }\n case 5:\n if (file2.getName().endsWith(\".jpg_hevc\")) {\n if (Constants.PRIVATE_LOG_CONTROLER) {\n break;\n } else {\n file2.delete();\n break;\n }\n } else {\n if (file2.getName().startsWith(\"th_\")) {\n if (!file2.getName().endsWith(\"hd\")) {\n break;\n } else {\n break;\n }\n }\n h.setTotalSize(h.getTotalSize() + cleanWxItemInfo.getFileSize());\n h.setTotalNum(h.getTotalNum() + 1);\n a(h, cleanWxItemInfo);\n break;\n }\n case 6:\n if (!file2.getAbsolutePath().contains(\"download/appbrand\")) {\n if (file2.getName().endsWith(\".jpg\")) {\n if (!new File(file2.getAbsolutePath().replace(\".jpg\", \".mp4\")).exists() && !Constants.PRIVATE_LOG_CONTROLER) {\n file2.delete();\n break;\n }\n } else {\n i.setTotalSize(i.getTotalSize() + cleanWxItemInfo.getFileSize());\n i.setTotalNum(i.getTotalNum() + 1);\n a(i, cleanWxItemInfo);\n break;\n }\n } else {\n break;\n }\n case 8:\n k.setTotalSize(k.getTotalSize() + cleanWxItemInfo.getFileSize());\n k.setTotalNum(k.getTotalNum() + 1);\n a(k, cleanWxItemInfo);\n break;\n case 9:\n if (!file2.getName().endsWith(\".mp4\")) {\n l.setTotalSize(l.getTotalSize() + cleanWxItemInfo.getFileSize());\n l.setTotalNum(l.getTotalNum() + 1);\n l.getMineList().add(cleanWxItemInfo);\n a(l, cleanWxItemInfo);\n break;\n } else {\n m.setTotalSize(m.getTotalSize() + cleanWxItemInfo.getFileSize());\n m.setTotalNum(m.getTotalNum() + 1);\n m.getMineList().add(cleanWxItemInfo);\n a(m, cleanWxItemInfo);\n break;\n }\n case 10:\n n.setTotalSize(n.getTotalSize() + cleanWxItemInfo.getFileSize());\n n.setTotalNum(n.getTotalNum() + 1);\n a(n, cleanWxItemInfo);\n break;\n }\n }\n } else {\n try {\n if (file2.listFiles() == null || file2.listFiles().length == 0) {\n FileUtils.deleteFileAndFolder(file2);\n }\n } catch (Exception e2) {\n Logger.iCatch(Logger.TAG, Logger.ZYTAG, \"CleanWxClearNewActivity---wxFileScan ---- \", e2);\n }\n a(file2, list);\n }\n }\n i2++;\n } else {\n return;\n }\n }\n }\n }\n }", "@Override\n public void setPriorityValue(int priorityValue) {\n priority = priorityValue;\n }", "public void setWorkingFiles (final Map<String, NewData> mp){\n \t\tList<String> nf = new LinkedList<String>();\n \t\tString s =\"\";\n \t\t\n \t\tfor ( String str : mp.keySet()){\n //\t\t\tthis.getFilelist().remove(str);\n //\t\t\tthis.getFilelist().put(str, mp.get(str).getLclock());\n \t\t\tthis.getFilelist().get(str).putAll(mp.get(str).getLclock());\n \n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(mp.get(str).getFileContent()));\n \t\t\t\ttry {\n \t\t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\t\tnf.add(s);\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\te.printStackTrace();\n \t\t\t\t}\n \t\t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, nf);\n \t\t\tnf.clear();\n \t\t}\n \t\n \t}", "public void setPriority(Priority priority);", "public void setPriority(int priority){\n this.priority = priority;\n }", "void setSupportedFilesFilter(FileFilter supportedFilesFilter) {\n\t\tthis.supportedFilesFilter = supportedFilesFilter;\n\t}", "@Override\r\n\tpublic ArrayList<String> readAssignmentFiles(String packageName,\r\n\t\t\tArrayList<String> assignmentList) {\n\t\treturn null;\r\n\t}", "public void setPriorityItems(String... packageNames) {\n mAdapter.setPriorityItems(packageNames != null ? Arrays.asList(packageNames) : null);\n }", "private void sortFileToScreen() throws FileNotFoundException {\n Scanner file = new Scanner(new File(FILE_NAME));\n while (file.hasNext()) {\n addToOrderedList(file.nextInt());\n }\n file.close();\n printList();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void prepareFilesConfiguration(LinkedList<String> featureArgs,\r\n\t\t\tLinkedList<String> fileList, IFolder sourceFolder,\r\n\t\t\tIFolder buildFolder, CPPWrapper cpp) throws CoreException {\r\n\t\tString fullFilePath = null;\r\n\t\tLinkedList<String> preProcessorArgs;\r\n\t\tfor (final IResource res : sourceFolder.members()) {\r\n\t\t\tif (res instanceof IFolder) {\r\n\t\t\t\tprepareFilesConfiguration(featureArgs, fileList, (IFolder) res,\r\n\t\t\t\t\t\tbuildFolder.getFolder(res.getName()), cpp);\r\n\t\t\t} else if (res instanceof IFile) {\r\n\t\t\t\tif (!res.getFileExtension().equals(\"c\")\r\n\t\t\t\t\t\t&& !res.getFileExtension().equals(\"h\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfullFilePath = res.getLocation().toOSString();\r\n\t\t\t\tfileList.add(fullFilePath);\r\n\t\t\t\tpreProcessorArgs = (LinkedList<String>) featureArgs.clone();\r\n\t\t\t\tpreProcessorArgs.add(fullFilePath);\r\n\t\t\t\tpreProcessorArgs.add(\"-o\");\r\n\t\t\t\tpreProcessorArgs.add(buildFolder.getLocation().toOSString()\r\n\t\t\t\t\t\t+ File.separator + res.getName());\r\n\r\n\t\t\t\t// CommandLine syntax:\r\n\t\t\t\t// -DFEATURE1 -DFEATURE2 ... File1 outputDirectory/File1\r\n\t\t\t\tcpp.runPreProcessor(preProcessorArgs);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "void setModules(Set<File> modules);", "public void printListOfFile(List<File> listToPrint) {\n\t\tthis.showNamedMessage(\"List of files:\");\n\t\tfor (int i = 0; i < listToPrint.size(); i++) {\n\t\t\tthis.showNamedMessage(\"[\" + i + \"]: \" + listToPrint.get(i));\n\t\t}\n\t}", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "void configureWebDriver(@NotNull List<File> tempFiles);", "public void setPosition(Files f, Rank r);", "@Override\r\n\tpublic void setPriority(int arg0) throws NotesApiException {\n\r\n\t}", "private void saveExternalFilesList() {\n List<String> extFiles = new ArrayList<>();\n journalFiles.forEach(file -> {\n if (!file.isBuiltInListProperty().get()) {\n file.getAbsolutePath().ifPresent(path -> extFiles.add(path.toAbsolutePath().toString()));\n }\n });\n abbreviationsPreferences.setExternalJournalLists(extFiles);\n }", "public static void main(String[] args) {\n\n File folder = new File(\"D:\\\\UNSORTED TBW\\\\\");\n File[] listOfFiles = folder.listFiles();\n String defaultPath = \"D:\\\\UNSORTED TBW\\\\\";\n\n\n //for loop for each file in the list\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n\n //splits file name with - Only want the name before - so we call for 0.\n //This is the deafult way of show my shows are sorted.\n // also adds a - in the string in case there is no - in file\n String fileName = listOfFiles[i].getName() + \"-\";\n String[] names = fileName.split(\"-\");\n //System.out.print(names[0]+\"\\n\");\n Path folderPath = Paths.get(defaultPath + names[0].trim() + \"\\\\\");\n System.out.print(folderPath + \"\\n\");\n File directory = new File(String.valueOf(folderPath));\n\n //checks if directory exists. if does not exist, make new directory.\n if (!directory.exists()) {\n //makes a directory if not exists\n directory.mkdir();\n }\n //sets initial file directory\n File dirA = listOfFiles[i];\n //renames the file path of the file i nthe if loop\n //returns a user response if successful or not\n if (dirA.renameTo(new File(String.valueOf(folderPath) + \"\\\\\" + dirA.getName()))) {\n System.out.print(\"Move success\");\n } else {\n System.out.print(\"Failed\");\n }\n }\n }\n }", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "private void updateFiles() {\n\t}", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public static void userSort(ArrayList<String>list) throws FileNotFoundException{\r\n\t\tCollections.sort(list, new Comparator<String>(){\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(String o1, String o2) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t//Take the first string, split according to \";\", and store in an arraylist\r\n\t\t\t\tString[] values = o1.split(\";\");\r\n\t\t\t\t//Take the second string and do the same thing\r\n\t\t\t\tString[] values2 = o2.split(\";\");\r\n\t\t\t\t//Compare strings according to their integer values\r\n\t\t\t\treturn Integer.valueOf(values[0].replace(\"\\\"\", \"\")).compareTo(Integer.valueOf(values2[0].replace(\"\\\"\", \"\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\t//Output sorted ArrayList to a text file\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tPrintStream out = new PrintStream(new FileOutputStream(\"SortedUsers.txt\"));\r\n\t\t\tfor(int i = 0; i < list.size(); i++){\r\n\t\t\t\tout.println(list.get(i));\r\n\t\t\t}\r\n\t}", "public void setPriority(@EntityInstance int i, @IntRange(from = 0, to = 7) int priority) {\n nSetPriority(mNativeObject, i, priority);\n }", "public void setPriority(double priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "Object process(Collection<File> listOfFilesToProcess, File tempDir)\r\n\t\t\tthrows CheckerException;", "public void setPriority(int priority) \n {\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n lastEffectivePriority = -1; //Possible need to update effective priority\n }", "public void writeData(ArrayList<Task> orderList) {\n try {\n FileWriter fw = new FileWriter(filePath, false);\n for (Task task : orderList) {\n fw.write(task.fileFormattedString() + \"\\n\");\n }\n fw.close();\n\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }", "public CollectingFileToucher(String[] args)\n {\n super(args);\n mFiles = new ArrayList<File>();\n mFileFilter = new JavaSoftFileToucher(args);\n/*\n {\n public boolean accept(File inFile)\n {\n return true;\n }\n };\n*/\n }", "@Override\n public void sortCurrentList(FileSortHelper sort) {\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 int mergeSortedFiles(List<File> files, File outputfile) throws IOException {\n return mergeSortedFiles(files, outputfile, defaultcomparator,\n Charset.defaultCharset());\n }", "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "public ArrayList<File> mergeSortFiles(ArrayList<File> sortedList, Comparator<File> usedComparison,\r\n boolean inverse) {\r\n ArrayList<File> usedArray = new ArrayList<>(sortedList);\r\n mergeSort(usedArray, usedComparison);\r\n if (inverse) {\r\n Collections.reverse(usedArray);\r\n }\r\n return usedArray;\r\n }", "public void setPriorityCollect()\n\t{\n\t\tsetCollect(_Prefix + HardZone.PRIORITY.toString(), \"\");\n\t}", "private void mergeSort(ArrayList<File> listToSort, Comparator<File> fileComparator) {\r\n int size = listToSort.size();\r\n if (size < 2) {\r\n return;\r\n }\r\n int half = size / 2;\r\n ArrayList<File> firstList = new ArrayList<File>(listToSort.subList(0, half));\r\n ArrayList<File> secondList = new ArrayList<File>(listToSort.subList(half, size));\r\n\r\n mergeSort(firstList, fileComparator);\r\n mergeSort(secondList, fileComparator);\r\n\r\n merge(firstList, secondList, listToSort, fileComparator);\r\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "public static <T extends FileData> void sortFileDataByOrder(List<T> fileDataToSort) {\n Collections.sort(fileDataToSort, new Comparator<T>() {\n public int compare(T o1, T o2) {\n int ret = Integer.valueOf(o1.getOrder()).compareTo(o2.getOrder());\n if (ret != 0) {\n return ret;\n }\n return OID.compareOids(o1.getUniqueOid(), o2.getUniqueOid());\n }\n });\n }", "@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }", "public static void main(String[] args) {\n\t\tLab_11_ThreadPriority n=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n1=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n2=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n3=new Lab_11_ThreadPriority();\n\t\tn.start();\n\t\tn1.start();\n\t\tn2.start();\n\t\tn3.start();\n\t\tn.setPriority(NORM_PRIORITY);\n\t\tn1.setPriority(MAX_PRIORITY);\n\t\tn2.setPriority(MIN_PRIORITY);\n\t\t\n\t}", "public void AddPriority(Priority p) {\n \tpriorities.add(p);\n }", "void approveFiles(String[] fileIds,String[] commentList,String userId)throws LMSException;", "static void writeFile(List<String> sortList, int fileIndex) throws IOException, InterruptedException {\n\t\tFileWriter filewrite = new FileWriter(new File(DividedfileList.get(fileIndex)));\n\t\tBufferedWriter bufw = new BufferedWriter(filewrite);\n\n\t\tint fileLoc = 0;\n\n\t\twhile (fileLoc != sortList.size()) {\n\t\t\tbufw.write(sortList.get(fileLoc) + \"\\r\\n\");\n\t\t\tfileLoc++;\n\t\t}\n\t\tbufw.close();\n\t}", "public static List<ToDoHolder> orderByPriority(List<ToDoHolder> toDoList)\r\n\t{\r\n\t\t//1. sort alphabetically\r\n\t\t//2. sort by priority\r\n\t\t\r\n\t\tList<ToDoHolder> sortedList = new ArrayList<ToDoHolder>();\r\n\t\t\r\n\t\tList<ToDoHolder> alphabeticalList = orderAlpabetically(toDoList);\r\n\t\t\r\n\t\tIterator i;\r\n\t\t\r\n\t\t/*\r\n\t\t * first put urgent items into new list\r\n\t\t */\r\n\t\t\r\n\t\ti = alphabeticalList.iterator();\r\n\t\t\r\n\t\twhile (i.hasNext())\r\n\t\t{\r\n\t\t\tToDoHolder holder = (ToDoHolder)i.next();\r\n\t\t\tif(holder.getToDoItem().getPriority() == ToDoItem.PRIORITY_URGENT)\r\n\t\t\t{\r\n\t\t\t\tsortedList.add(holder);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * next put high priority items into new list\r\n\t\t */\r\n\t\t\r\n\t\ti = alphabeticalList.iterator();\r\n\t\t\r\n\t\twhile (i.hasNext())\r\n\t\t{\r\n\t\t\tToDoHolder holder = (ToDoHolder)i.next();\r\n\t\t\tif(holder.getToDoItem().getPriority() == ToDoItem.PRIORITY_HIGH)\r\n\t\t\t{\r\n\t\t\t\tsortedList.add(holder);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * next put medium priority items into new list\r\n\t\t */\r\n\t\t\r\n\t\ti = alphabeticalList.iterator();\r\n\t\t\r\n\t\twhile (i.hasNext())\r\n\t\t{\r\n\t\t\tToDoHolder holder = (ToDoHolder)i.next();\r\n\t\t\tif(holder.getToDoItem().getPriority() == ToDoItem.PRIORITY_MEDIUM)\r\n\t\t\t{\r\n\t\t\t\tsortedList.add(holder);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * next put low priority items into new list\r\n\t\t */\r\n\t\t\r\n\t\ti = alphabeticalList.iterator();\r\n\t\t\r\n\t\twhile (i.hasNext())\r\n\t\t{\r\n\t\t\tToDoHolder holder = (ToDoHolder)i.next();\r\n\t\t\tif(holder.getToDoItem().getPriority() == ToDoItem.PRIORITY_LOW)\r\n\t\t\t{\r\n\t\t\t\tsortedList.add(holder);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn sortedList;\r\n\t}", "public void setNewFiles(java.lang.String[] param){\r\n \r\n validateNewFiles(param);\r\n\r\n localNewFilesTracker = true;\r\n \r\n this.localNewFiles=param;\r\n }", "public void setPriority(String priority){\r\n\t\tDropDown.setExtJsComboValue(driver, driver.findElement(By.xpath(PRIORITY_XPATH)).getAttribute(\"id\"), priority);\r\n\t}", "int getArchivePriority();", "public void generatePriority() {\n\t\tpriority = .25 * frequency + .25 * age + .25 * links + .25 * money;\n\t}", "private static File[] sortFileList(File[] list, String sort_method) {\n // sort the file list based on sort_method\n // if sort based on name\n if (sort_method.equalsIgnoreCase(\"name\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return (f1.getName()).compareTo(f2.getName());\n }\n });\n } else if (sort_method.equalsIgnoreCase(\"size\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.length()).compareTo(f2.length());\n }\n });\n } else if (sort_method.equalsIgnoreCase(\"time\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());\n }\n });\n }\n return list;\n }", "public void setExtensions(String listExtensions) {\n this.extensions = listExtensions;\n }", "private static File[] sortFileList(File[] list, String sort_method) {\n // sort the file list based on sort_method\n // if sort based on name\n if (sort_method.equalsIgnoreCase(\"name\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return (f1.getName()).compareTo(f2.getName());\n }\n });\n }\n else if (sort_method.equalsIgnoreCase(\"size\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.length()).compareTo(f2.length());\n }\n });\n }\n else if (sort_method.equalsIgnoreCase(\"time\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());\n }\n });\n }\n return list;\n }", "@Override\r\n\tpublic int setPriority(int priority) {\n\t\treturn 0;\r\n\t}", "private void refreshList() {\n setTitle(this.path.get(this.path.size() - 1));\n\n // Read all files sorted into the values-array\n values.clear();\n File dir = new File(this.path.get(this.path.size() - 1));\n if (!dir.canRead()) {\n setTitle(getTitle() + \" (inaccessible)\");\n }\n String[] list = dir.list();\n if (list != null) {\n for (String file : list) {\n if (!file.startsWith(\".\")) {\n values.add(file);\n }\n }\n }\n Collections.sort(values);\n }", "@Override\n\tpublic boolean compareFiles(int f1, int f2) {\n\t\treturn false;\n\t}", "static void mergeSortedFiles() throws IOException {\n\n\t\tBufferedReader[] bufReaderArray = new BufferedReader[noOfFiles];\n\t\tList<String> intermediateList = new ArrayList<String>();\n\t\tList<String> lineDataList = new ArrayList<String>();\n\n\t\tfor (int file = 0; file < noOfFiles; file++) {\n\t\t\tbufReaderArray[file] = new BufferedReader(new FileReader(DividedfileList.get(file)));\n\n\t\t\tString fileLine = bufReaderArray[file].readLine();\n\n\t\t\tif (fileLine != null) {\n\t\t\t\tintermediateList.add(fileLine.substring(0, 10));\n\t\t\t\tlineDataList.add(fileLine);\n\t\t\t}\n\t\t}\n\n\t\tBufferedWriter bufw = new BufferedWriter(new FileWriter(Outputfilepath));\n\n\t\t// Merge files into one file\n\n\t\tfor (long lineNumber = 0; lineNumber < totalLinesInMainFile; lineNumber++) {\n\t\t\tString sortString = intermediateList.get(0);\n\t\t\tint sortFile = 0;\n\n\t\t\tfor (int iter = 0; iter < noOfFiles; iter++) {\n\t\t\t\tif (sortString.compareTo(intermediateList.get(iter)) > 0) {\n\t\t\t\t\tsortString = intermediateList.get(iter);\n\t\t\t\t\tsortFile = iter;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbufw.write(lineDataList.get(sortFile) + \"\\r\\n\");\n\t\t\tintermediateList.set(sortFile, \"-1\");\n\t\t\tlineDataList.set(sortFile, \"-1\");\n\n\t\t\tString nextString = bufReaderArray[sortFile].readLine();\n\n\t\t\tif (nextString != null) {\n\t\t\t\tintermediateList.set(sortFile, nextString.substring(0, 10));\n\t\t\t\tlineDataList.set(sortFile, nextString);\n\t\t\t} else {\n\t\t\t\tlineNumber = totalLinesInMainFile;\n\n\t\t\t\tList<String> ListToWrite = new ArrayList<String>();\n\n\t\t\t\tfor (int file = 0; file < intermediateList.size(); file++) {\n\t\t\t\t\tif (lineDataList.get(file) != \"-1\")\n\t\t\t\t\t\tListToWrite.add(lineDataList.get(file));\n\n\t\t\t\t\twhile ((sortString = bufReaderArray[file].readLine()) != null) {\n\t\t\t\t\t\tListToWrite.add(sortString);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tCollections.sort(ListToWrite);\n\t\t\t\tint index = 0;\n\t\t\t\twhile (index < ListToWrite.size()) {\n\t\t\t\t\tbufw.write(ListToWrite.get(index) + \"\\r\\n\");\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tbufw.close();\n\t\tfor (int file = 0; file < noOfFiles; file++)\n\t\t\tbufReaderArray[file].close();\n\t}", "private void launchFiles(@NotNull List<ResultDocument> docs) {\n\t\tassert !docs.isEmpty();\n\t\tMultiFileLauncher launcher = new MultiFileLauncher();\n\t\tSet<FileResource> resources = new HashSet<FileResource>();\n\t\ttry {\n\t\t\tfor (ResultDocument doc : docs) {\n\t\t\t\ttry {\n\t\t\t\t\tFileResource fileResource = doc.getFileResource();\n\t\t\t\t\tresources.add(fileResource);\n\t\t\t\t\tlauncher.addFile(fileResource.getFile());\n\t\t\t\t}\n\t\t\t\tcatch (FileNotFoundException e) {\n\t\t\t\t\tlauncher.addMissing(doc.getPath().getCanonicalPath());\n\t\t\t\t}\n\t\t\t\tcatch (ParseException e) {\n\t\t\t\t\tAppUtil.showError(e.getMessage(), true, false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (launcher.launch() && SettingsConf.Bool.HideOnOpen.get())\n\t\t\t\tevtHideInSystemTray.fire(null);\n\t\t}\n\t\tfinally {\n\t\t\tfor (FileResource fileResource : resources)\n\t\t\t\tfileResource.dispose();\n\t\t}\n\t}", "private static <File> void merge(ArrayList<File> firstList, ArrayList<File> secondList,\r\n ArrayList<File> wholeList, Comparator<File> usedComparison) {\r\n int i = 0;\r\n int j = 0;\r\n int k = 0;\r\n while (i < firstList.size() && j < secondList.size()) {\r\n if (usedComparison.compare(firstList.get(i), secondList.get(j)) < 0) {\r\n wholeList.set(k++, firstList.get(i++));\r\n } else {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }\r\n while (i < firstList.size()) {\r\n wholeList.set(k++, firstList.get(i++));\r\n }\r\n while (j < secondList.size()) {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }", "public void setPriority(int newPriority) {\n\t\tpriority = newPriority;\n\t}", "public List<Script> populateScriptsFromFileList(final List<File> files)\n\t{\n\t\tfinal List<Script> addedScripts = new ArrayList<>();\n\t\t\n\t\tfor (final File scriptFile : files)\n\t\t{\n\t\t\tScript script = scripts.get(Script.getScriptIdFromFile(scriptFile));\n\t\t\t\n\t\t\tif (script == null)\t\t\t\t\t\n\t\t\t{\t\t\t\n\t\t\t\tscript = new Script();\n\t\t\t\t\n\t\t\t\tcreateFileBasedScript(script, scriptFile, new ScriptDetails(true, false, scriptFile.getName())); \t\t\t\n\t\t\t\t\n\t\t\t\taddedScripts.add(script);\n\t\t\t\taddScript(script);\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn addedScripts;\n\t}", "public void setPriority( int priority )\n\t{\n\t\tmPriority = priority;\n\t\t\n\t\tmUpdated = true;\n\t}", "public Builder setPriority(int value) {\n\n priority_ = value;\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }", "@Test\n\tpublic void testDefinitionPriority() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setContentType(MediaType.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setAccept(MediaType.HTML);\n\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(1).setContentType(MediaType.HTML);\n\t\tthis.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);\n\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(2).setContentType(MediaType.UNKNOWN);\n\t\tthis.requestDefinitions.get(2).setAccept(MediaType.UNKNOWN);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(2),\n\t\t\t\tthis.requestDefinitions.get(1), this.requestDefinitions.get(0));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}", "public static void addOSMFilesToModel(Set<File> files) {\n ArrayList<File> sortedList = sortOsmFiles(files);\n addOSMFilesToModel(sortedList);\n }", "public static void rankFiles(Hashtable<?, Integer> fname, int numberOfOccurrences) \r\n\t{\n\t\tArrayList<Map.Entry<?, Integer>> arrayList = new ArrayList(fname.entrySet());\r\n\r\n\t\tCollections.sort(arrayList, new Comparator<Map.Entry<?, Integer>>() \r\n\t\t{\r\n\t\t\tpublic int compare(Map.Entry<?, Integer> obj1, Map.Entry<?, Integer> obj2) \r\n\t\t\t{\r\n\t\t\t\treturn obj1.getValue().compareTo(obj2.getValue());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tCollections.reverse(arrayList);\r\n\r\n\t\tif (numberOfOccurrences > 0) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\n------Top 10 search results-----\\n\");\r\n\r\n\t\t\tint my_number = 10;\r\n\t\t\tint j = 1;\r\n\t\t\twhile (arrayList.size() > j && my_number > 0) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"(\" + j + \") \" + arrayList.get(j) + \" times \");\r\n\t\t\t\tj++;\r\n\t\t\t\tmy_number--;\r\n\t\t\t}\r\n\t\t} \r\n\t}" ]
[ "0.5758162", "0.5728478", "0.5462058", "0.5387079", "0.5374607", "0.5364375", "0.52637637", "0.5241768", "0.5241609", "0.52389693", "0.521938", "0.521938", "0.5181472", "0.5139982", "0.51387036", "0.5135572", "0.5123817", "0.51205415", "0.5118907", "0.5079301", "0.5060792", "0.50457954", "0.50384015", "0.5016858", "0.5012189", "0.49979734", "0.49907175", "0.49890605", "0.4985403", "0.49851415", "0.49825707", "0.49754", "0.49635914", "0.4944872", "0.49391136", "0.4931204", "0.49276116", "0.49235898", "0.49076703", "0.49032676", "0.48951253", "0.4895036", "0.4892243", "0.4888496", "0.48549074", "0.48362926", "0.48291174", "0.48291174", "0.48251113", "0.4800015", "0.47738746", "0.47721404", "0.4758725", "0.47581387", "0.47553763", "0.47428983", "0.47353038", "0.47347978", "0.47281522", "0.47181755", "0.47136047", "0.47089466", "0.4703917", "0.469731", "0.46945447", "0.46929497", "0.46903116", "0.46885246", "0.46693623", "0.46579063", "0.46543133", "0.46542034", "0.4650353", "0.4645553", "0.46452752", "0.463327", "0.4630008", "0.4627346", "0.46268684", "0.46257198", "0.46074736", "0.4606103", "0.46049386", "0.45994538", "0.4599162", "0.4595514", "0.4593798", "0.4592003", "0.45915946", "0.45848262", "0.45840418", "0.45838314", "0.45824382", "0.45760107", "0.45709145", "0.45694438", "0.45665085", "0.45595944", "0.4554245", "0.4552438" ]
0.82971287
0
Subscribe for server services. All previous subscriptions are replaced by the given set of subscriptions.
public void setServerSubscriptions(List<ServerService> subscriptions);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAnalysisSubscriptions(Map<AnalysisService, List<String>> subscriptions);", "public static void subscriptions() {\n\t\ttry {\n\t\t\tList<Subscription> subscriptions = PlatformClient\n\t\t\t\t\t.subscriptions(getUser());\n\t\t\trender(subscriptions);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get subscriptions : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "public void setSubscriptions(List<User> subscriptions) {\n this.subscriptions = subscriptions;\n }", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.SubscribeServiceResponse subscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.SubscribeServiceRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "public void addSubscriptions(String subscribeTo){\n\t subscriptions.add(subscribeTo);\n\t}", "Collection<Service> getAllSubscribeService();", "public void subscribe(SubscriberInterface subscriber, UUID clientId) throws RemoteException;", "boolean addServiceSubscriber(Service service, Subscriber subscriber);", "Set<StreamSessionHandler> getSubscribers();", "Collection<Subscription> getSubscriptions();", "void subscribe();", "@Override\n public void onSubscribe(Subscription s) {\n s.request(10);\n\n // Should not produce anymore data\n s.request(10);\n }", "interface ClientSubscriptionManager {\n /**\n * return how many subscriptions this manager has.\n */\n int getSubscriptionCount();\n\n /**\n * Adds the given subscription for the given client to this manager.\n * If this manager already has a subscription\n * for that client then the old subscription is\n * removed and the new one is added.\n *\n * @return true if added or already added; false if caller should retry\n */\n boolean add(Client client, Subscription subscription);\n\n /**\n * Remove any subscription added for the given client.\n *\n * @return true if removed false if not removed\n */\n boolean remove(Client client);\n\n /**\n * The returned collection MUST be a live view of the subscriptions\n * in the manager. This means that if a subscription is added or\n * removed to the manager in the future then the returned Collection\n * will know about that change.\n */\n Collection<Subscription> getSubscriptions();\n}", "public SubscriptionsResponse withSubscriptions(List<Subscription> subscriptions) {\n this.subscriptions = subscriptions;\n return this;\n }", "private void subscribe() {\r\n\r\n OnUpdatePlayerSubscription subscription = OnUpdatePlayerSubscription.builder().build();\r\n subscriptionWatcher = awsAppSyncClient.subscribe(subscription);\r\n subscriptionWatcher.execute(subCallback);\r\n }", "public interface SubscriptionManager {\n\n void subscribe(Subscription subscription);\n\n void updateMetric(String tenant, String metricId, Metric.Update update);\n void updateForecaster(String tenant, String metricId, org.hawkular.datamining.forecast.Forecaster.Update update);\n\n boolean isSubscribed(String tenant, String metricId);\n Subscription subscription(String tenant, String metricId);\n Set<Subscription> subscriptionsOfTenant(String tenant);\n\n void unsubscribeAll(String tenant, String metricId);\n void unsubscribe(String tenant, String metricId, Subscription.SubscriptionOwner subscriptionOwner);\n void unsubscribe(String tenant, String metricId, Set<Subscription.SubscriptionOwner> subscriptionOwners);\n\n void setPredictionListener(PredictionListener predictionListener);\n}", "void addAnnouncedServers(ArrayList<ServerAddress> servers);", "public void subscribeInvoices(lnrpc.Rpc.InvoiceSubscription request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.Invoice> responseObserver) {\n asyncServerStreamingCall(\n getChannel().newCall(getSubscribeInvoicesMethod(), getCallOptions()), request, responseObserver);\n }", "private void handleSubscriptions(RoutingContext routingContext) {\n LOGGER.debug(\"Info: handleSubscription method started\");\n /* Handles HTTP request from client */\n HttpServerRequest request = routingContext.request();\n /* Handles HTTP response from server to client */\n HttpServerResponse response = routingContext.response();\n /* HTTP request body as Json */\n JsonObject requestBody = routingContext.getBodyAsJson();\n /* HTTP request instance/host details */\n String instanceID = request.getHeader(HEADER_HOST);\n String subHeader = request.getHeader(HEADER_OPTIONS);\n String subscrtiptionType =\n subHeader != null && subHeader.contains(SubsType.STREAMING.getMessage())\n ? SubsType.STREAMING.getMessage()\n : SubsType.CALLBACK.getMessage();\n requestBody.put(SUB_TYPE, subscrtiptionType);\n /* checking authentication info in requests */\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n LOGGER.debug(\"authInfo : \" + authInfo);\n\n if (requestBody.containsKey(SUB_TYPE)) {\n JsonObject jsonObj = requestBody.copy();\n jsonObj.put(JSON_CONSUMER, authInfo.getString(JSON_CONSUMER));\n jsonObj.put(JSON_INSTANCEID, instanceID);\n LOGGER.debug(\"Info: json for subs :: ;\" + jsonObj);\n Future<JsonObject> subsReq = subsService.createSubscription(jsonObj, databroker, database);\n subsReq.onComplete(subHandler -> {\n if (subHandler.succeeded()) {\n LOGGER.info(\"Success: Handle Subscription request;\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n subHandler.result().toString());\n } else {\n LOGGER.error(\"Fail: Handle Subscription request;\");\n processBackendResponse(response, subHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_SUB_TYPE_NOT_FOUND);\n }\n }", "public void registerServer() {\n log.info(\"Registering service {}\", serviceName);\n cancelDiscovery = discoveryService.register(\n ResolvingDiscoverable.of(new Discoverable(serviceName, httpService.getBindAddress())));\n }", "private void updateSubscriptions(SubscriptionList subscriptions, String userId, List<SubscriptionEventType> eventTypes)\n\t\t\tthrows RepositoryException {\n\t\tif (eventTypes == null) {\n\t\t\teventTypes = new ArrayList<>();\n\t\t}\n\t\t\n\t\tfor (Subscription subscription : subscriptions.getSubscription()) {\n\t\t\tif (eventTypes.contains( subscription.getEventType() )) {\n\t\t\t\tif (!subscription.getUser().contains( userId )) {\n\t\t\t\t\tsubscription.getUser().add( userId );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsubscription.getUser().remove( userId );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tfileUtils.saveSubscriptionList( subscriptions );\n\t\t\tFreeTextSearchServiceFactory.getInstance().indexSubscriptionTarget( subscriptions.getSubscriptionTarget() );\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tthrow new RepositoryException(\"Error saving updates to subscription list.\", e);\n\t\t}\n\t}", "@Override\n public void subscribe(ISubscriber subscriber) {\n subscribers.add(subscriber);\n }", "@Override\n public void subscribe(final Set<ValueSpecification> valueSpecifications) {\n LOGGER.debug(\"Added subscriptions to {}\", valueSpecifications);\n subscriptionsSucceeded(valueSpecifications);\n }", "void subscribe(String id);", "public void subscribe(String[] topics, String inboundPortURI) {\n\n\t}", "public void subscribeInvoices(lnrpc.Rpc.InvoiceSubscription request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.Invoice> responseObserver) {\n asyncUnimplementedUnaryCall(getSubscribeInvoicesMethod(), responseObserver);\n }", "public SubscriptionsInner(Retrofit retrofit, ApiManagementClientImpl client) {\n this.service = retrofit.create(SubscriptionsService.class);\n this.client = client;\n }", "public void setSubscribers(List<User> subscribers) {\n this.subscribers = subscribers;\n }", "@Override\n\tpublic int subscribe(String host, int port) {\n\t\t\n\t\t//InetSocketAddress insock = new InetSocketAddress(host, port);\n\t\tAdress add = new Adress(host, port);\n\t\t\n\t\tdataManager.addServer(add);\n\t\tSystem.out.println(\"subscribtion de \"+host+\":\"+port);\n\t\treturn 1;\n\t}", "boolean add(Client client, Subscription subscription);", "public void setSubscribers(Collection<User> subscribers) {\r\n\tthis.subscribers = subscribers;\r\n\t}", "Subscriptions() {\n // Will get filled in with set methods\n }", "default void subscribe(Subscriber<? super Void> s) {\n\t\tOperators.complete(s);\n\t}", "public void updateNamespaceSubscriptions(String baseNS, String userId, List<SubscriptionEventType> eventTypes)\n\t\t\tthrows RepositoryException {\n\t\tupdateSubscriptions( getNamespaceSubscriptions( baseNS ), userId, eventTypes );\n\t}", "public interface Subscription {\n /**\n * Calling this will send the event to the subscribed service\n * @param event the event to transmit to the subscribed service\n */\n boolean onEvent(Event event);\n\n /**\n * Returns a stream of all subscribeRequests that are transmitted by the subbed service\n * @return a stream of subscribeRequests transmitted by subbed service\n */\n Observable<SubscribeRequest> getSubscribeRequestStream();\n\n /**\n * This completable will complete when the subscription is terminated for some reason (most likely a connection termination)\n * @return a completable that will complete when the subscription is terminated\n */\n Completable getCompletable();\n}", "List<ClientTopicCouple> listAllSubscriptions();", "public QueryRequest withSubscriptions(List<String> subscriptions) {\n this.subscriptions = subscriptions;\n return this;\n }", "void wipeSubscriptions(String sessionID);", "public void subscribe(String name, String clientId) throws Exception, RemoteException;", "public void subscribeTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.Transaction> responseObserver) {\n asyncServerStreamingCall(\n getChannel().newCall(getSubscribeTransactionsMethod(), getCallOptions()), request, responseObserver);\n }", "public void setServerIds(java.lang.String[] serverIds) {\r\n this.serverIds = serverIds;\r\n }", "void addNewSubscription(Subscription newSubscription);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "protected SubscriptionsStore getSubscriptions() {\n return subscriptions;\n }", "private void requestSubscribe(LinkedHashMap<String, RequestedQoS> topics) {\n if (topics.isEmpty() || this.client == null || !this.client.isConnected()) {\n // nothing to do\n return;\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"Request Subscribe to: \" + topics);\n }\n\n this.client\n .subscribe(topics.entrySet()\n .stream().collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().toInteger())))\n .onComplete(result -> subscribeSent(result, topics));\n }", "public void unsubscribeAll() {\n \t\tint failCount = 0;\n \t\t// Make a copy of the collection because it will be modified in #unsubscribe()\n \t\tSet<String> removal = new HashSet<String>(subscriptions.keySet());\n \t\tfor (String subscriptionID : removal) {\n \t\t\tunsubscribe(subscriptionID);\n \t\t}\n \t\tif (failCount > 0) {\n \t\t\tlogger.warn(\n \t\t\t\t\t\"Problem while unsubcribing from all subscriptions: \"\n \t\t\t\t\t\t\t+ failCount\n \t\t\t\t\t\t\t+ \" unsubscriptions failed at DSB endpoint '\"\n \t\t\t\t\t\t\t+ subscriptionsTarget.getUri() + \"'\");\n \t\t} else {\n \t\t\tlogger.info(\n \t\t\t\t\t\"Successfully unsubcribed from all subscriptions at DSB endpoint '\"\n \t\t\t\t\t\t\t+ subscriptionsTarget.getUri() + \"'\");\n \t\t}\n \t}", "public static Subscribers add(@NonNull Subscribers subscriberSet, @NonNull String subscriber) {\n ImmutableSet.Builder<String> builder = ImmutableSet.builder();\n builder.addAll(subscriberSet.subscribers);\n builder.add(subscriber);\n return new Subscribers(builder.build());\n }", "public interface ISubsManager {\n\n public void subscribe(NodeId nodeId);\n}", "public synchronized void setServers(ServerList servers) {\r\n this.servers.clear();\r\n \r\n if (servers != null) {\r\n this.servers.addAll(servers);\r\n }\r\n }", "private void appendSubscription(RoutingContext routingContext) {\n LOGGER.debug(\"Info: appendSubscription method started\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String alias = request.getParam(JSON_ALIAS);\n String subsId = domain + \"/\" + usersha + \"/\" + alias;\n JsonObject requestJson = routingContext.getBodyAsJson();\n String instanceID = request.getHeader(HEADER_HOST);\n requestJson.put(SUBSCRIPTION_ID, subsId);\n requestJson.put(JSON_INSTANCEID, instanceID);\n String subHeader = request.getHeader(HEADER_OPTIONS);\n String subscrtiptionType =\n subHeader != null && subHeader.contains(SubsType.STREAMING.getMessage())\n ? SubsType.STREAMING.getMessage()\n : SubsType.CALLBACK.getMessage();\n requestJson.put(SUB_TYPE, subscrtiptionType);\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n LOGGER.debug(\"authInfo : \" + authInfo);\n if (requestJson != null && requestJson.containsKey(SUB_TYPE)) {\n if (requestJson.getString(JSON_NAME).equalsIgnoreCase(alias)) {\n JsonObject jsonObj = requestJson.copy();\n jsonObj.put(JSON_CONSUMER, authInfo.getString(JSON_CONSUMER));\n Future<JsonObject> subsReq = subsService.appendSubscription(jsonObj, databroker, database);\n subsReq.onComplete(subsRequestHandler -> {\n if (subsRequestHandler.succeeded()) {\n LOGGER.info(\"Success: Appending subscription\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n subsRequestHandler.result().toString());\n } else {\n LOGGER.error(\"Fail: Appending subscription\");\n processBackendResponse(response, subsRequestHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_NAME);\n }\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_SUB_TYPE_NOT_FOUND);\n }\n }", "public void subscribe() {\n mEventBus.subscribe(NetResponseProcessingCompletedEvent.CLASS_NAME, this);\n mEventBus.subscribe(FailureResponseDTO.CLASS_NAME, this);\n }", "@BackpressureSupport(BackpressureKind.SPECIAL)\n @SchedulerSupport(SchedulerKind.NONE)\n @Override\n public final void subscribe(Subscriber<? super T> s) {\n Objects.requireNonNull(s, \"s is null\");\n subscribeActual(s);\n }", "private void subscribe() {\n Log.i(TAG, \"Subscribing\");\n mNearbyDevicesArrayAdapter.clear();\n SubscribeOptions options = new SubscribeOptions.Builder()\n .setStrategy(PUB_SUB_STRATEGY)\n .setCallback(new SubscribeCallback() {\n @Override\n public void onExpired() {\n super.onExpired();\n Log.i(TAG, \"No longer subscribing\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mSubscribeSwitch.setChecked(false);\n }\n });\n }\n }).build();\n\n Nearby.Messages.subscribe(mGoogleApiClient, mMessageListener, options)\n .setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(@NonNull Status status) {\n if (status.isSuccess()) {\n Log.i(TAG, \"Subscribed successfully.\");\n } else {\n logAndShowSnackbar(\"Could not subscribe, status = \" + status);\n mSubscribeSwitch.setChecked(false);\n }\n }\n });\n }", "private void subscribeTopics(String token) throws IOException {\n GcmPubSub pubSub = GcmPubSub.getInstance(this);\n for (String topic : TOPICS) {\n pubSub.subscribe(token, \"/topics/\" + topic, null);\n }\n }", "void subscribe(Long subscriptionId, ApplicationProperties.VendorConfiguration configuration);", "private void updateSubscription(RoutingContext routingContext) {\n LOGGER.debug(\"Info: updateSubscription method started\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String alias = request.getParam(JSON_ALIAS);\n String subsId = domain + \"/\" + usersha + \"/\" + alias;\n JsonObject requestJson = routingContext.getBodyAsJson();\n String instanceID = request.getHeader(HEADER_HOST);\n String subHeader = request.getHeader(HEADER_OPTIONS);\n String subscrtiptionType =\n subHeader != null && subHeader.contains(SubsType.STREAMING.getMessage())\n ? SubsType.STREAMING.getMessage()\n : SubsType.CALLBACK.getMessage();\n requestJson.put(SUB_TYPE, subscrtiptionType);\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n if (requestJson != null && requestJson.containsKey(SUB_TYPE)) {\n if (requestJson.getString(JSON_NAME).equalsIgnoreCase(alias)) {\n JsonObject jsonObj = requestJson.copy();\n jsonObj.put(SUBSCRIPTION_ID, subsId);\n jsonObj.put(JSON_INSTANCEID, instanceID);\n jsonObj.put(JSON_CONSUMER, authInfo.getString(JSON_CONSUMER));\n Future<JsonObject> subsReq = subsService.updateSubscription(jsonObj, databroker, database);\n subsReq.onComplete(subsRequestHandler -> {\n if (subsRequestHandler.succeeded()) {\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n subsRequestHandler.result().toString());\n } else {\n LOGGER.error(\"Fail: Bad request\");\n processBackendResponse(response, subsRequestHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_NAME);\n }\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_SUB_TYPE_NOT_FOUND);\n }\n\n\n }", "@Override\n public void onSubscribe(String s, int i) {\n }", "public URIRegisterExecutorSubscriber(final Map<String, ShenyuClientRegisterServiceFactory> shenyuClientRegisterService) {\n this.shenyuClientRegisterService = shenyuClientRegisterService;\n }", "public void subscribe( Observer< S, Info > obs );", "@Override\n\tpublic void onSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "@Override\n public List<ISubscriber> getSubscribers() {\n return subscribers;\n }", "public List<Subscription> findAllClientSubscriptions(int clientId) throws ServiceException {\n try (ConnectionWrapper connectionManager = new ConnectionWrapper()) {\n SubscriptionDAO subscriptionDAO = new SubscriptionDAO(connectionManager.getConnection());\n\n return subscriptionDAO.selectClientSubscriptions(clientId);\n } catch (DAOException exception) {\n throw new ServiceException(\"Exception during attempt to find client's subscription operation.\", exception);\n }\n }", "interface SubscriptionsService {\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions list\" })\n @GET(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions\")\n Observable<Response<ResponseBody>> list(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"subscriptionId\") String subscriptionId, @Query(\"$filter\") String filter, @Query(\"$top\") Integer top, @Query(\"$skip\") Integer skip, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions getEntityTag\" })\n @HEAD(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}\")\n Observable<Response<Void>> getEntityTag(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions get\" })\n @GET(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}\")\n Observable<Response<ResponseBody>> get(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions createOrUpdate\" })\n @PUT(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}\")\n Observable<Response<ResponseBody>> createOrUpdate(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Body SubscriptionCreateParameters parameters, @Query(\"notify\") Boolean notify, @Header(\"If-Match\") String ifMatch, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions update\" })\n @PATCH(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}\")\n Observable<Response<ResponseBody>> update(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Body SubscriptionUpdateParameters parameters, @Query(\"notify\") Boolean notify, @Header(\"If-Match\") String ifMatch, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions delete\" })\n @HTTP(path = \"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}\", method = \"DELETE\", hasBody = true)\n Observable<Response<ResponseBody>> delete(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Header(\"If-Match\") String ifMatch, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions regeneratePrimaryKey\" })\n @POST(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey\")\n Observable<Response<ResponseBody>> regeneratePrimaryKey(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions regenerateSecondaryKey\" })\n @POST(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey\")\n Observable<Response<ResponseBody>> regenerateSecondaryKey(@Path(\"resourceGroupName\") String resourceGroupName, @Path(\"serviceName\") String serviceName, @Path(\"sid\") String sid, @Path(\"subscriptionId\") String subscriptionId, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.apimanagement.v2019_01_01.Subscriptions listNext\" })\n @GET\n Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n }", "public void initServers(List<IdnsServers> servers) {\n\t\tfor(IdnsServers server: servers) {\n\t\t\tAllservers.add(server.getName());\n\t\t\trouters.put(server.getName(), server.getServers());\n\t\t}\n\t}", "@Override\n default IServerPrx ice_endpoints(com.zeroc.Ice.Endpoint[] newEndpoints)\n {\n return (IServerPrx)_ice_endpoints(newEndpoints);\n }", "public Set<Subscriber> getSubscribersOfAPI(APIIdentifier identifier) throws APIManagementException {\n\n Set<Subscriber> subscriberSet = null;\n try {\n subscriberSet = apiMgtDAO.getSubscribersOfAPI(identifier);\n } catch (APIManagementException e) {\n handleException(\"Failed to get subscribers for API : \" + identifier.getApiName(), e);\n }\n return subscriberSet;\n }", "public void createSubscription(Subscription sub);", "public void setExpressions(List<Subscription> expressions) {\n this.expressions = expressions;\n }", "private Set<ServiceNode> discoverService(Collection<ServiceNode> services, Set<String> searchSet) {\n\t\tSet<ServiceNode> found = new HashSet<ServiceNode>();\n\t\tfor (ServiceNode s: services) {\n\t\t\tif (isSubsumed(s.getInputs(), searchSet))\n\t\t\t\tfound.add(s);\n\t\t}\n\t\treturn found;\n\t}", "public void subscribeTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.Transaction> responseObserver) {\n asyncUnimplementedUnaryCall(getSubscribeTransactionsMethod(), responseObserver);\n }", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.SubscribeProductResponse subscribeProduct(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.SubscribeProductRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "public static List<SubscriptionVO> getAllSubscriptions(Set<Integer> compIdSet) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_ALERT_SUB_WITH_COMP);\n\t\tquery.setParameterList(\"componentIdList\", compIdSet);\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<AlertSubscriptionEntity> resultList = query.list();\n\t\ttxn.commit();\n\t\t\n\t\tArrayList<SubscriptionVO> returnList = new ArrayList<SubscriptionVO>();\n\t\tfor(AlertSubscriptionEntity ase : resultList){\n\t\t\tSubscriptionVO sVO = new SubscriptionVO();\n\t\t\tif(ase.getComponentId() != null){\n\t\t\t\tsVO.setComponentId(ase.getComponentId());\n\t\t\t}\n\t\t\tsVO.setEnvironmentId(ase.getEnvironment().getEnvironmentId());\n\t\t\tsVO.setSubscriptionValue(ase.getSubscriptionVal());\n\t\t\tsVO.setSubscriptionType(ase.getSubscriptionType());\n\t\t\tif(ase.getGlobalComponentTypeId() != null){\n\t\t\t\tsVO.setGlobalComponentTypeId(ase.getGlobalComponentTypeId());\n\t\t\t}\n\t\t\treturnList.add(sVO);\n\t\t}\n return returnList;\n\n\t}", "public void subscribeActual(s<? super T> sVar) {\n this.f13338b.subscribe(new a(sVar));\n }", "public void setDnsServers(String[] servers);", "public void addSubscriber(String topic, Subscriber s) {\n if(this.subscriber.containsKey(topic)){\n this.subscriber.get(topic).add(s);\n } else {\n this.subscriber.put(topic, new ArrayList<Subscriber>());\n this.addSubscriber(topic, s);\n } \n }", "public void SubscribeTopic(Collection<String> subscribeList) {\n consumer.subscribe(subscribeList);\n }", "public void subscribeActual(Subscriber<? super T> subscriber) {\r\n PublishConnection publishConnection;\r\n while (true) {\r\n publishConnection = (PublishConnection) this.current.get();\r\n if (publishConnection != null) {\r\n break;\r\n }\r\n PublishConnection publishConnection2 = new PublishConnection(this.current, this.bufferSize);\r\n if (this.current.compareAndSet(publishConnection, publishConnection2)) {\r\n publishConnection = publishConnection2;\r\n break;\r\n }\r\n }\r\n InnerSubscription innerSubscription = new InnerSubscription(subscriber, publishConnection);\r\n subscriber.onSubscribe(innerSubscription);\r\n if (publishConnection.add(innerSubscription)) {\r\n if (innerSubscription.isCancelled()) {\r\n publishConnection.remove(innerSubscription);\r\n } else {\r\n publishConnection.drain();\r\n }\r\n return;\r\n }\r\n Throwable th = publishConnection.error;\r\n if (th != null) {\r\n subscriber.onError(th);\r\n } else {\r\n subscriber.onComplete();\r\n }\r\n }", "@Override protected void subscribeActual(Subscriber s) {\n source.subscribe(MaybeFuseable.get().wrap(s, contextScoper, assembled));\n }", "@Override\n public void onSubscribe(String channel, int subscribedChannels) {\n System.out.println(\"Client is Subscribed to channel : \"+ channel);\n }", "public final void subscribe() throws InvalidSubscriptionException {\r\n WritableSession session = (WritableSession) WebsocketActionSupport.getInstance().getSession();\r\n if (sessions.contains(session)) {\r\n throw new InvalidSubscriptionException(\"Current session is already subscribed to this topic\");\r\n }\r\n beforeSubscribe(session);\r\n sessions.add(session);\r\n }", "public abstract Set<WritableSession> getSubscribers(F filter);", "public void setDnsServersApp(String[] servers);", "public final void onChanged(PeopleSubscriptions peopleSubscriptions) {\n this.f53753a.f53736n = peopleSubscriptions;\n }", "public List<ServerServices> listServerServices();", "private void subscribeHandler(MqttSubscribeMessage subscribe) {\n\n final int messageId = subscribe.messageId();\n LOG.info(\"SUBSCRIBE [{}] from MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n\n // sending AMQP_SUBSCRIBE\n\n List<AmqpTopicSubscription> topicSubscriptions =\n subscribe.topicSubscriptions().stream().map(topicSubscription -> {\n return new AmqpTopicSubscription(topicSubscription.topicName(), topicSubscription.qualityOfService());\n }).collect(Collectors.toList());\n\n AmqpSubscribeMessage amqpSubscribeMessage =\n new AmqpSubscribeMessage(this.mqttEndpoint.clientIdentifier(),\n topicSubscriptions);\n\n this.ssEndpoint.sendSubscribe(amqpSubscribeMessage, done -> {\n\n if (done.succeeded()) {\n\n ProtonDelivery delivery = done.result();\n\n List<MqttQoS> grantedQoSLevels = null;\n if (delivery.getRemoteState() == Accepted.getInstance()) {\n\n // QoS levels requested are granted\n grantedQoSLevels = amqpSubscribeMessage.topicSubscriptions().stream().map(topicSubscription -> {\n return topicSubscription.qos();\n }).collect(Collectors.toList());\n\n // add accepted topic subscriptions to the local collection\n amqpSubscribeMessage.topicSubscriptions().stream().forEach(amqpTopicSubscription -> {\n this.grantedQoSLevels.put(amqpTopicSubscription.topic(), amqpTopicSubscription.qos());\n });\n\n } else {\n\n // failure for all QoS levels requested\n grantedQoSLevels = new ArrayList<>(Collections.nCopies(amqpSubscribeMessage.topicSubscriptions().size(), MqttQoS.FAILURE));\n }\n\n this.mqttEndpoint.subscribeAcknowledge(messageId, grantedQoSLevels);\n\n LOG.info(\"SUBACK [{}] to MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n }\n });\n }", "public void startServers()\n {\n ExecutorService threads = Executors.newCachedThreadPool();\n threads.submit(new StartServer(host, port));\n threads.submit(new StartServer(host, port + 1));\n threads.shutdown();\n }", "public void setSubscription(double value) {\n\t this.subscriptions = value;\n\t}", "void subscribe(Player player);", "public java.util.Iterator<lnrpc.Rpc.Invoice> subscribeInvoices(\n lnrpc.Rpc.InvoiceSubscription request) {\n return blockingServerStreamingCall(\n getChannel(), getSubscribeInvoicesMethod(), getCallOptions(), request);\n }", "private void subscribeSent(AsyncResult<Integer> result, LinkedHashMap<String, RequestedQoS> topics) {\n if (result.failed() || result.result() == null) {\n // failed\n for (String topic : topics.keySet()) {\n notifySubscriptionState(topic, SubscriptionState.UNSUBSCRIBED, null);\n }\n } else {\n // record request\n for (String topic : topics.keySet()) {\n notifySubscriptionState(topic, SubscriptionState.SUBSCRIBING, null);\n }\n this.pendingSubscribes.put(result.result(), topics);\n }\n }", "public String subscribe() throws SaaSApplicationException,\n IllegalArgumentException, IOException {\n\n String subscriptionId = model.getSubscription().getSubscriptionId();\n SubscriptionStatus status;\n String outcome = null;\n if (!isServiceAccessible(model.getService().getKey())) {\n redirectToAccessDeniedPage();\n return BaseBean.MARKETPLACE_ACCESS_DENY_PAGE;\n }\n try {\n rewriteParametersAndUdas();\n VOSubscription rc = getSubscriptionService().subscribeToService(\n model.getSubscription(), model.getService().getVO(),\n Collections.emptyList(),\n model.getSelectedPaymentInfo(),\n model.getSelectedBillingContact(),\n subscriptionsHelper.getVoUdaFromUdaRows(\n getModel().getSubscriptionUdaRows()));\n model.setDirty(false);\n menuBean.resetMenuVisibility();\n if (rc == null) {\n ui.handleProgress();\n outcome = OUTCOME_PROCESS;\n } else {\n status = rc.getStatus();\n getSessionBean()\n .setSelectedSubscriptionId(rc.getSubscriptionId());\n getSessionBean().setSelectedSubscriptionKey(rc.getKey());\n\n ui.handle(\n status.isPending() ? INFO_SUBSCRIPTION_ASYNC_CREATED\n : INFO_SUBSCRIPTION_CREATED,\n subscriptionId, rc.getSuccessInfo());\n\n // help the navigation to highlight the correct navigation item\n menuBean.setCurrentPageLink(MenuBean.LINK_SUBSCRIPTION_USERS);\n\n outcome = OUTCOME_SUCCESS;\n }\n\n conversation.end();\n\n } catch (NonUniqueBusinessKeyException e) {\n // if subscription name already existed redirect to page\n // confirmation with error message\n ui.handleError(null, SUBSCRIPTION_NAME_ALREADY_EXISTS,\n new Object[] { subscriptionId });\n outcome = SUBSCRIPTION_CONFIRMATION_PAGE;\n } catch (ObjectNotFoundException e) {\n // if service has been deleted in the meantime, give the\n // inaccessible error message\n if (e.getDomainObjectClassEnum()\n .equals(DomainObjectException.ClassEnum.SERVICE)) {\n ui.handleError(null, ERROR_SERVICE_INACCESSIBLE);\n } else {\n ConcurrentModificationException ex = new ConcurrentModificationException();\n ex.setMessageKey(ERROR_SERVICE_CHANGED);\n ExceptionHandler.execute(ex);\n }\n }\n\n return outcome;\n }", "public void subscribeActual(s<? super U> sVar) {\n this.f13338b.subscribe(new b(new e(sVar), this.f13894d, this.f13893c));\n }", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceResponse unSubscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "IPolicySubscriber withSubscriber();", "Subscriber getSubscriber(Service service);", "@GetMapping(\"/subscriptions\")\n @Timed\n public ResponseEntity<List<Subscription>> getAllSubscriptions(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Subscriptions\");\n Page<Subscription> page = subscriptionService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/subscriptions\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "public Subscription subscribeForDistributorDeliveries(ClockListener listener);", "public void subscribe(String arg0, IView arg1) {\n\t\t\n\t}", "@Override\n public void register(Object subscriber) {\n }" ]
[ "0.6481246", "0.63065296", "0.6033284", "0.59691936", "0.59622574", "0.5730013", "0.5678462", "0.55382925", "0.5503365", "0.5499725", "0.5469879", "0.5431415", "0.54079944", "0.53915477", "0.5357849", "0.5348792", "0.53166187", "0.52925164", "0.52689344", "0.52439505", "0.5230934", "0.5230522", "0.52250445", "0.520882", "0.51805973", "0.51752764", "0.517127", "0.51637936", "0.516038", "0.5158843", "0.5135135", "0.5133334", "0.5090827", "0.5073699", "0.5060814", "0.5052541", "0.50364244", "0.50348634", "0.50278026", "0.5016552", "0.5012952", "0.49996713", "0.49991325", "0.49913082", "0.4958984", "0.49476758", "0.493902", "0.49308476", "0.49209133", "0.49201554", "0.4908967", "0.49036005", "0.49034607", "0.49021366", "0.48943824", "0.48903722", "0.4886284", "0.4862711", "0.48485142", "0.48388845", "0.48354262", "0.48294282", "0.4808965", "0.48085335", "0.48041627", "0.48023802", "0.48018366", "0.4786668", "0.4783154", "0.47723338", "0.47704342", "0.47658956", "0.4760357", "0.4756067", "0.47520912", "0.47376665", "0.47308743", "0.472595", "0.47164124", "0.4707629", "0.46955064", "0.46873167", "0.46844748", "0.46805704", "0.4671086", "0.46630776", "0.466202", "0.46590748", "0.4655955", "0.4651027", "0.46500695", "0.46488178", "0.4628219", "0.46277416", "0.46232736", "0.46155152", "0.4615273", "0.46116847", "0.4610865", "0.46072826" ]
0.7634685
0
Cleanly shutdown the analysis server.
public void shutdown();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shutdown() {\n try {\n infoServer.stop();\n } catch (Exception e) {\n }\n this.shouldRun = false;\n ((DataXceiveServer) this.dataXceiveServer.getRunnable()).kill();\n try {\n this.storage.closeAll();\n } catch (IOException ie) {\n }\n }", "public void shutdown() {\n\t\tserver.stop(0);\n\t}", "public synchronized void shutdown() {\n server.stop();\n }", "public void shutdown() {\r\n System.exit(0);\r\n }", "public void shutdown() {\n shutdown(false);\n }", "public static void shutdown() {\n\t}", "private void shutdown()\n\t\t{\n\t\tif (myChannelGroup != null)\n\t\t\t{\n\t\t\tmyChannelGroup.close();\n\t\t\t}\n\t\tif (myHttpServer != null)\n\t\t\t{\n\t\t\ttry { myHttpServer.close(); } catch (IOException exc) {}\n\t\t\t}\n\t\tmyLog.log (\"Stopped\");\n\t\t}", "public void shutdown()\n {\n // todo\n }", "public void shutdown() {\n // For now, do nothing\n }", "public void shutdown() {\n // no-op\n }", "public synchronized void shutdown() {\n try {\n stop();\n } catch (Exception ex) {\n }\n \n try {\n cleanup();\n } catch (Exception ex) {\n }\n }", "public static void shutdown() {\n\t\t// Ignore\n\t}", "public void shutdown() {\n }", "public void cleanShutDown () {\n shutdown = true;\n }", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "public void shutdown() {\n _udpServer.stop();\n _registrationTimer.cancel();\n _registrationTimer.purge();\n }", "public void shutdown() {\n\t\t\n\t}", "public void shutdown() {\n logger.info(\"Shutting down modules.\");\n for (Module module : modules) {\n module.stop();\n }\n logger.info(\"Shutting down reporters.\");\n for (Reporter reporter : reporters.values()) {\n reporter.stop();\n }\n }", "public void shutdown() {\n if (configurations.isRegisterMXBeans()) {\n JmxConfigurator.get().removeMXBean(this);\n }\n configurations.shutdown();\n }", "@AfterClass\n public static void shutdown()\n {\n }", "public void shutdown() {\n for (TServer server : thriftServers) {\n server.stop();\n }\n try {\n zookeeper.shutdown();\n discovery.close();\n } catch (IOException ex) {\n //don't care\n }\n }", "public void shutdown(){\n\t\tAndroidSensorDataManagerSingleton.cleanup();\n\t}", "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "public void shutDown() {\n StunStack.shutDown();\n stunStack = null;\n stunProvider = null;\n requestSender = null;\n\n this.started = false;\n\n }", "public static void shutdown() {\n resetCache();\n listeningForChanges = false;\n }", "public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }", "public void shutdown()\n {\n // nothing to do here\n }", "public static void shutdown()\n\t{\n\t\tinstance = null;\n\t}", "public void ShutDown()\n {\n bRunning = false;\n \n LaunchLog.Log(COMMS, LOG_NAME, \"Shut down instruction received...\");\n\n for(LaunchServerSession session : Sessions.values())\n {\n LaunchLog.Log(COMMS, LOG_NAME, \"Closing session...\");\n session.Close();\n }\n \n LaunchLog.Log(COMMS, LOG_NAME, \"...All sessions are closed.\");\n }", "public void shutdown() {\n this.isShutdown = true;\n }", "public void shutdown() {\n try {\n \t\n \tserverSocket.close();\n \t\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}", "public void shutdown() {\n this.dontStop = false;\n }", "public void stop() {\n if (server != null) {\n server.shutdown();\n }\n }", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "public void shutdown() {\n YbkService.stop(ErrorDialog.this);\r\n System.runFinalizersOnExit(true);\r\n // schedule actual shutdown request on a background thread to give the service a chance to stop on the\r\n // foreground thread\r\n new Thread(new Runnable() {\r\n\r\n public void run() {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n }\r\n System.exit(-1);\r\n }\r\n }).start();\r\n }", "public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "public void shutdown()\n\t{\n\t\t; // do nothing\n\t}", "public void shutDown();", "public void shutdown()\r\n {\r\n debug(\"shutdown() the application module\");\r\n\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n // Save Our WatchLists\r\n saveAllVectorData();\r\n // Our Container vectors need to be emptied and clear. \r\n modelVector.removeAllElements();\r\n modelVector = null;\r\n\r\n tableVector.removeAllElements();\r\n tableVector = null;\r\n\r\n // Delete any additional Historic Data that is Serialized to disk\r\n expungeAllHistoricFiles();\r\n\r\n // Shutdown the task that monitors the update tasks\r\n if ( this.monitorTask != null )\r\n {\r\n this.monitorTask.cancel();\r\n this.monitorTask = null;\r\n }\r\n // Null out any reference to this data that may be present\r\n stockData = null;\r\n debug(\"shutdown() the application module - complete\");\r\n\r\n }", "public void stop () {\n if (server != null)\n server.shutDown ();\n server = null;\n }", "public void stopServer() {\n stop();\n }", "public void stop() {\n server.stop();\n }", "public void shutdown() {\n for (Entry<String,Session> entry : _sessions.entrySet())\n entry.getValue().disconnect();\n \n writeLine(\"\\nDebugServer shutting down.\");\n close();\n }", "public synchronized void shutDown() {\n\t state.shutDown();\n\t}", "@AfterClass\n public static void tearDownClass() throws Exception {\n TestHelper.stopServer(serverSyncObject);\n TestHelper.deleteViewStore();\n TestHelper.removeArchiveFiles();\n LOGGER.log(Level.INFO, \"Ending test class\");\n }", "public void shutdown() {\n\t\tinternalShutdown();\n\t\tC4JPluginLogging.getDefault().removeLogManager(this); \n\t}", "void shutDownServer() throws Exception;", "public void shutdown()\n {\n this.running = false;\n }", "public void shutdown()\r\n\t{\r\n\t\tgraphDb.shutdown();\r\n\t\tSystem.out.println(\"Shutdown-Done!\");\r\n\t}", "public void shutdown() {\n fsManager.getOpenFileSystems().forEach(JGitFileSystem::close);\n shutdownSSH();\n forceStopDaemon();\n fsManager.clear();\n }", "private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void closeServer() {\n\t\trun = false;\n\t}", "private void stopServer() {\n\t\ttry {\n//\t\t\tserver.shutdown();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "void shutDown();", "public void stop() {\n System.err.println(\"Server will stop\");\n server.stop(0);\n }", "public void abnormalShutDown() {\n\t}", "@After\n public void tearDown() throws Exception {\n Thread.sleep(1000);\n server.stop();\n }", "public void shutdownSilently() {\n shutdownSilently(true);\n }", "@AfterClass\n public static void stop() {\n }", "public void stop() {\n System.err.println(\"Server will stop\");\n server.stop(0);\n }", "@AfterClass(alwaysRun = true)\n public void stopEnvironment() {\n \ttry {\n al.closeMongoDbConnection();\n \t} catch (Exception e) {\n\t\t\tfail(e.toString());\n\t\t\t}\n }", "public static void shutdown() {\n if(registry != null)\n StandardServiceRegistryBuilder.destroy(registry);\n }", "public void shutdown() {\n if (pipelineExecutor != null) {\n ExecutorUtil.shutdownAndAwaitTermination(pipelineExecutor);\n }\n\n if (mHandler != null) {\n mHandler.removeCallbacksAndMessages(null);\n }\n }", "public void shutDownServer() throws IOException {\r\n \t\tthis.shutDownServer(true);\r\n \t}", "public void shutDown()\n {\n stunStack.removeSocket(serverAddress);\n messageSequence.removeAllElements();\n localSocket.close();\n }", "public void shutdown()\n {\n log.info(\"Stop accepting new events\");\n\n // Disable realtime hook\n forwardDispatcher.stop();\n\n // Disable writer to disk\n spoolDispatcher.shutdown();\n }", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }", "@Override\r\n protected void shutdownInternal() {\r\n service.stop();\r\n }", "public void shutdown() {\n logger.debug(\"Shutting down.\");\n try {\n // stop the cleaner first\n if (cleaner != null)\n Utils.swallow(new Runnable() {\n @Override\n public void run() {\n cleaner.shutdown();\n }\n });\n // flush the logs to ensure latest possible recovery point\n Utils.foreach(allLogs(), new Callable1<Log>() {\n @Override\n public void apply(Log _) {\n _.flush();\n }\n });\n // close the logs\n Utils.foreach(allLogs(), new Callable1<Log>() {\n @Override\n public void apply(Log _) {\n _.close();\n }\n });\n // update the last flush point\n checkpointRecoveryPointOffsets();\n // mark that the shutdown was clean by creating the clean shutdown marker file\n Utils.foreach(logDirs, new Callable1<File>() {\n @Override\n public void apply(final File dir) {\n Utils.swallow(new Runnable() {\n @Override\n public void run() {\n try {\n new File(dir, Logs.CleanShutdownFile).createNewFile();\n } catch (IOException e) {\n throw new KafkaException(e);\n }\n }\n });\n }\n });\n } finally {\n // regardless of whether the close succeeded, we need to unlock the data directories\n Utils.foreach(dirLocks, new Callable1<FileLock>() {\n @Override\n public void apply(FileLock _) {\n _.destroy();\n }\n });\n }\n\n logger.debug(\"Shutdown complete.\");\n }", "@AfterClass\n public void stop() throws Exception {\n super.finalize();\n }", "public void close() {\n\t\ttry {\n\t\t\tthis.stop();\n\t\t} catch (Exception e) {\n\t\t\tLOG.warn(\"Error closing Avro RPC server.\", e);\n\t\t}\n\t}", "public void shutdown() {\n // Shutting down a 'null' transport is invalid. Also, shutting down a server for multiple times is invalid.\n ensureServerState(true);\n try {\n transport.close();\n } catch (final Exception e) {\n throw new RuntimeException(e);\n } finally {\n isShutdown = true;\n }\n }", "private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Programmatic\n public void shutdown() {\n LOG.info(\"shutting down {}\", this);\n\n cache.clear();\n }", "public void shutDown () {\n sparkService.stop();\n }", "public void stop() {\n \n // first interrupt the server engine thread\n if (m_runner != null) {\n m_runner.interrupt();\n }\n\n // close server socket\n if (m_serverSocket != null) {\n try {\n m_serverSocket.close();\n }\n catch(IOException ex){\n }\n m_serverSocket = null;\n } \n \n // release server resources\n if (m_ftpConfig != null) {\n m_ftpConfig.dispose();\n m_ftpConfig = null;\n }\n\n // wait for the runner thread to terminate\n if( (m_runner != null) && m_runner.isAlive() ) {\n try {\n m_runner.join();\n }\n catch(InterruptedException ex) {\n }\n m_runner = null;\n }\n }", "public void stop() {\n log.info(\"Stopped\");\n execFactory.shutdown();\n cg.close();\n }" ]
[ "0.7983289", "0.7666222", "0.7644618", "0.76388454", "0.7590721", "0.75519943", "0.7416188", "0.74047", "0.73602873", "0.7336059", "0.73101985", "0.7307749", "0.73021966", "0.7257344", "0.7230628", "0.71848214", "0.71610624", "0.7143124", "0.70747817", "0.7062827", "0.7032385", "0.70319927", "0.7021282", "0.70199454", "0.7016148", "0.7015826", "0.7005575", "0.6998544", "0.6981622", "0.697503", "0.69417936", "0.6929366", "0.69293183", "0.69187546", "0.6906436", "0.6901861", "0.68959415", "0.6876517", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68620396", "0.68455625", "0.68354446", "0.68216777", "0.6820499", "0.68127626", "0.67955357", "0.6793242", "0.6792751", "0.6781332", "0.67798656", "0.67726225", "0.6767141", "0.6743811", "0.6741445", "0.67347914", "0.67255026", "0.67044353", "0.6696755", "0.6687121", "0.6674478", "0.66713786", "0.6660237", "0.66599876", "0.66586906", "0.6649863", "0.66462153", "0.66440684", "0.6633674", "0.66265875", "0.6622618", "0.6616143", "0.6615086", "0.6614537", "0.6610448", "0.66101086", "0.66030174", "0.6601173", "0.65999943", "0.6593719", "0.6591777", "0.65886956", "0.6578333" ]
0.7200014
18
Start the analysis server.
public void start(long millisToRestart) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startServer() {\n server.start();\n }", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "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 }", "public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/plain\");\n\t\t\t\t\n\t\t\t\t if(query_type.equals(\"/target\")){\n\t\t\t\t\t String key = req.params().get(\"targetID\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequest(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t String key = \"1\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequestRange(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}).listen(80);\n\t\t} else {\n\t\t\tSystem.out.println(\"Please make sure that both your DCI are up and running\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "public void run(){\r\n\t\tSystem.out.println(\"Launching Server\");\r\n\t\tServer srv = new Server(log);\r\n\t\tnew CollectorServer(srv).start();\r\n\t\ttry {\r\n\t\t\tnew ServerUDPThread(srv).start();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error in ServerUDP Broadcast\");\r\n\t\t}\r\n\t}", "public void run(){\n\t\tstartServer();\n\t}", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "public static void startServer() {\n clientListener.startListener();\n }", "public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}", "public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}", "private void start() throws IOException {\n\n\n int port = 9090;\n server = ServerBuilder.forPort(port)\n .addService(new CounterServiceImpl())\n .build()\n .start();\n // logger.info(\"Server started, listening on \" + port);\n\n /* Add hook when stop application*/\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n // Use stderr here since the logger may have been reset by its JVM shutdown hook.\n // IRedis.USER_SYNC_COMMAND.\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n Count.this.stop();\n System.err.println(\"*** server shut down\");\n\n }\n });\n }", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void analysisStarting();", "public static void main(final String[] args) throws IOException {\n startServer();\n }", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\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 }", "private void startMonitoring() {\n executors.startMetrics(monitoring);\n reporter = JmxReporter.forRegistry(monitoring).inDomain(getJmxDomain()).build();\n reporter.start();\n }", "@Override\n public void start() {\n try {\n hostname = InetAddress.getLocalHost().getHostName().split(\"\\\\.\")[0];\n }catch (Exception ex2) {\n logger.warn(\"Unknown error occured\", ex2);\n }\n \n collectorRunnable.server = this;\n if (service.isShutdown() || service.isTerminated()) {\n service = Executors.newSingleThreadScheduledExecutor();\n }\n service.scheduleWithFixedDelay(collectorRunnable, 0,\n pollFrequency, TimeUnit.SECONDS);\n\n }", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "void startAnalysis(long analysis_start, long analysis_stop) {\n start_scan_time.setTime(analysis_start);\r\n stop_scan_time.setTime(analysis_stop);\r\n\r\n // convert the date object of the stop time to a string in standard date time format\r\n scanTime = Utility.standardDateTime(stop_scan_time);\r\n\r\n // check whether networking is possible\r\n networking = Utility.networking(context);\r\n\r\n // TODO OOSO: networking is commented, for logging we need to \"send\" the data.\r\n networking = true;\r\n if (networking) {\r\n // send all the apps, which have been tracked during this scan, to the server\r\n sendDataToServer();\r\n }\r\n // start complete evaluation of this scan\r\n evaluateData();\r\n // store this scans time in local DB for later use\r\n insertCurrentScanTime();\r\n }", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "void startServer(String name, Config.ServerConfig config);", "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}", "@Override\n\t\tpublic void run() {\n\t\t\tIndexServer is = new IndexServer(3002,\"/src/P2Pfile/Peer2/filefolder\" );\n\t\t\tSystem.out.println(\"Peer2Server Start\");\n\t\t\tis.ConnectionAccept();\n\t\t\t\n\t\t\n\t\t\t\n\t\t}", "public void start() throws Exception {\n if (m_runner == null) {\n m_serverSocket = m_ftpConfig.getSocketFactory().createServerSocket(); \n m_runner = new Thread(this);\n m_runner.start();\n System.out.println(\"Server ready :: Apache FTP Server\");\n m_log.info(\"------- Apache FTP Server started ------\");\n }\n }", "public void runServer() throws IOException {\n runServer(0);\n }", "public static void main(String[] args) {\n loadServer();\n\n }", "public void start()\n {\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 RunMe() throws IOException {\n\n\t\t// Load data\n\t\tloadDataMap();\n\t\t\n\t\t// Start server\n\t\tcfg = createFreemarkerConfiguration();\n\t\tsetPort(8081);\n\t\tinitializeRoutes();\n\t}", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "public void startLocalServer() {\n \t boolean exists = (new File(addeMcservl)).exists();\n \t if (exists) {\n \t // Create and start the thread if there isn't already one running\n\t \tif (thread != null) {\n \t \t\tthread = new AddeThread();\n \t \t\tthread.start();\n \t\t System.out.println(addeMcservl + \" was started\");\n \t \t} else {\n \t \t\tSystem.out.println(addeMcservl + \" is already running\");\n \t \t}\n \t } else {\n \t \tSystem.out.println(addeMcservl + \" does not exist\");\n \t }\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 }", "@Override\n public void start() throws Exception {\n vertx.createHttpServer()\n // The requestHandler is called for each incoming\n // HTTP request, we print the name of the thread\n .requestHandler(req -> {\n req.response().end(\"Hello from \"\n + Thread.currentThread().getName());\n })\n .listen(8080); // start the server on port 8080\n }", "public synchronized void startAgent() throws IOException {\r\n setConnectorServer(JMXConnectorServerFactory.newJMXConnectorServer(getUrl(), null, fieldMBeanServer));\r\n getConnectorServer().start();\r\n started.set(true);\r\n }", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\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\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }", "public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}", "public static void main(String[] arg) {\n // start server on port 1500\n new SnesNETsrv(13375);\n }", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public static void main(String[] args) {\n\t\tserverManager = new ServerManager(8031);\n\t\t\n\t}", "protected void startAll() throws Throwable {\n\t\tthis.udpServer = new UDPServer(this.agent);\n\t\tthis.connectionServer = new TCPServer(this.agent);\n\t}", "public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }", "public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }", "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 }", "@Override\n public void start() {\n checkDebug();\n\n agentConfig.validate();\n\n if (mBeanServer == null) {\n mBeanServer = MBeanUtils.start();\n }\n\n try {\n startHttpAdaptor();\n } catch (StartupException e) {\n loggingSession.stopSession();\n loggingSession.shutdown();\n throw e;\n }\n\n try {\n startRMIConnectorServer();\n } catch (StartupException e) {\n stopHttpAdaptor();\n loggingSession.stopSession();\n loggingSession.shutdown();\n throw e;\n }\n\n try {\n startSnmpAdaptor();\n } catch (StartupException e) {\n stopRMIConnectorServer();\n stopHttpAdaptor();\n loggingSession.stopSession();\n loggingSession.shutdown();\n throw e;\n }\n\n if (agentConfig.getAutoConnect()) {\n try {\n connectToSystem();\n /*\n * Call Agent.stop() if connectToSystem() fails. This should clean up agent-DS connection &\n * stop all the HTTP/RMI/SNMP adapters started earlier.\n */\n } catch (AdminException ex) {\n logger.error(\"auto connect failed: {}\",\n ex.getMessage());\n stop();\n throw new StartupException(ex);\n } catch (MalformedObjectNameException ex) {\n String autoConnectFailed = \"auto connect failed: {}\";\n logger.error(autoConnectFailed, ex.getMessage());\n stop();\n throw new StartupException(new AdminException(\n String.format(\"auto connect failed: %s\", ex.getMessage()), ex));\n }\n } // getAutoConnect\n\n logger.info(\"GemFire JMX Agent is running...\");\n\n if (memberInfoWithStatsMBean == null) {\n initializeHelperMbean();\n }\n }", "public void start() {}", "public void start() {}", "public static void main(String[] args){\n\n Executors.newSingleThreadExecutor().execute(new Runnable() {\n public void run() {\n System.out.println(\"Starting\");\n new ScheduleExecutor();\n }\n });\n\n new Server(5821, 10).launch();\n\n }", "public static void main(String[] args) throws Exception {\n final BiStreamServer node = new BiStreamServer(Integer.parseInt(args[0]), args[1], args[2]);\n node.startFiles(args[1]);\n //node.print();\n node.startGrpc();\n node.print();\n node.blockUntilShutdown();\n }", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\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 void startListening() {\r\n\t\tlisten.startListening();\r\n\t}", "@Override\n public void start(Future<Void> startFuture) {\n vertx.createHttpServer()\n .requestHandler(getRequestHandler()).listen(8080, http -> {\n if (http.succeeded()) {\n startFuture.complete();\n LOGGER.info(\"HTTP server started on http://localhost:8080\");\n } else {\n startFuture.fail(http.cause());\n }\n });\n }", "@Test\n public void startServer() throws InterruptedException {\n UicdInstrumentation uicdInstrumentation =\n UicdInstrumentation.getInstance(\n getInstrumentation().getContext(), DEFAULT_PORT);\n uicdInstrumentation.startServer();\n\n while (!uicdInstrumentation.isStopServer()) {\n SystemClock.sleep(PING_SERVER_MS);\n }\n }", "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 void startServer() throws IOException {\n log.info(\"Starting server in port {}\", port);\n try {\n serverSocket = new ServerSocket(port);\n this.start();\n log.info(\"Started server. Server listening in port {}\", port);\n } catch (IOException e) {\n log.error(\"Error starting the server socket\", e);\n throw e;\n }\n }", "private void startServer(String ip, int port, String contentFolder) throws IOException{\n HttpServer server = HttpServer.create(new InetSocketAddress(ip, port), 0);\n \n //Making / the root directory of the webserver\n server.createContext(\"/\", new Handler(contentFolder));\n //Making /log a dynamic page that uses LogHandler\n server.createContext(\"/log\", new LogHandler());\n //Making /online a dynamic page that uses OnlineUsersHandler\n server.createContext(\"/online\", new OnlineUsersHandler());\n server.setExecutor(null);\n server.start();\n \n //Needing loggin info here!\n }", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "public static void main(String[] args) {\n new HttpService(getHttpServiceDefinition(8080)).start();\n }", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "public static void start(){\n mngr.getStpWds();\n mngr.getDocuments();\n mngr.calculateWeights();\n mngr.getInvertedIndex();\n mngr.getClusters();\n mngr.getCategories();\n mngr.getUserProfiles();\n mngr.makeDocTermMatrix();\n\n }", "public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // This is also known as the handler tree (in Jetty speak).\n final ServletContextHandler context = new ServletContextHandler(\n server, CONTEXT_ROOT);\n final ServletHolder restEasyServlet = new ServletHolder(\n new HttpServletDispatcher());\n restEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\",\n APPLICATION_PATH);\n restEasyServlet.setInitParameter(\"javax.ws.rs.Application\",\n \"de.kad.intech4.djservice.RestApplication\");\n context.addServlet(restEasyServlet, CONTEXT_ROOT);\n\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void start() throws IOException\n {\n File plugins = new File(\"plugins\");\n plugins.mkdir();\n pluginManager.loadPlugins(plugins);\n config.load();\n reconnectHandler = new YamlReconnectHandler();\n isRunning = true;\n\n pluginManager.enablePlugins();\n\n for (ListenerInfo info : config.getListeners())\n {\n $().info(\"Listening on \" + info.getHost());\n ListenThread listener = new ListenThread(info);\n listener.start();\n listeners.add(listener);\n }\n\n saveThread.scheduleAtFixedRate(new TimerTask()\n {\n @Override\n public void run()\n {\n getReconnectHandler().save();\n }\n }, 0, TimeUnit.MINUTES.toMillis(5));\n\n new Metrics().start();\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "@Override\n public void start(){\n // Retrieve the configuration, and init the verticle.\n JsonObject config = config();\n init(config);\n // Every `period` ms, the given Handler is called.\n vertx.setPeriodic(period, l -> {\n mining();\n send();\n });\n }", "protected void serverStarted()\n {\n // System.out.println\n // (\"Server listening for connections on port \" + getPort());\n }", "public void startup() {\n\t\tstart();\n }", "public void start() {\n }", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "@Override\n\t\tpublic void run() {\n\t\t\tExecutor executor = new Executor(this.env);\n\n\t\t\t// control loop\n\t\t\t//String dataFileName = monitorLog.monitor();\n\t\t\t//AnalysisStatus analysisStatus = analyser.analyse(dataFileName, args);\n\t\t\t// AdaptationPlan adaptationPlan =\n\t\t\t// planner.selectPlan(analysisStatus);\n\t\t\t//executor.execute(adaptationPlan);\n\t\t\t//System.out.println(this.getClass()+\" **************** CHANGE **************\"+System.nanoTime());\n\t\t\texecutor.executeFake(this.env);\n\t\t\t//executeFake();\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\" ThriftServer start ing ....\");\n\t\t\t\ttry { \n\t\t\t\t\tif (!server.isServing()) {\n\t\t\t\t\t\tserver.serve();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tif (transport != null) {\n\t\t\t\t\t\ttransport.close();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public static HttpServer startServer() {\n // create a resource config that scans for JAX-RS resources and providers\n // in com.example.rest package\n final ResourceConfig rc = new ResourceConfig().packages(\"com.assignment.backend\");\n rc.register(org.glassfish.jersey.moxy.json.MoxyJsonFeature.class);\n rc.register(getAbstractBinder());\n rc.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);\n rc.property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n }", "private void start() {\n\t\tif (null == this.sourceRunner || null == this.channel) {\n\t\t\tthrow new FlumeException(\n\t\t\t\t\t\"Source/Channel is null. Cannot start flume components\");\n\t\t}\n\t\tthis.sourceRunner.start();\n\t\tthis.channel.start();\n\t\tthis.sinkCounter.start();\n\t}", "public static void main(String[] args) {\r\n\t\tif (testCodeLocal) {\r\n\t\t\ttestCodeLocally();\r\n\t\t} else {\r\n\t\t\tTrackingServer ts = null;\r\n\t\t\tif (args.length != 2) {\r\n\t\t\t\tshowStartUsage();\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tString serverPropertyFileName = args[0];\r\n\t\t\t\tServerProps.loadProperties(serverPropertyFileName);\r\n\t\t\t\tint port = 0;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tport = Integer.parseInt(args[1]);\r\n\t\t\t\t\tif (!Utils.isValidPort(port)) {\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid port\");\r\n\t\t\t\t\t\tshowStartUsage();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid port\");\r\n\t\t\t\t\tshowStartUsage();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tts = new TrackingServer(port, ServerProps.INTERNAL_SERVER_THREADS);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tts.start();\r\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\t\t\tboolean stopped = false;\r\n\t\t\t\t\twhile (!stopped) {\r\n\t\t\t\t\t\tshowUsage();\r\n\t\t\t\t\t\tString command = reader.readLine();\r\n\t\t\t\t\t\t// if (command.startsWith(COMMAND_FIND)) {\r\n\t\t\t\t\t\t// if (command.length() > COMMAND_FIND.length()) {\r\n\t\t\t\t\t\t// String fileToFind = command.substring(\r\n\t\t\t\t\t\t// COMMAND_FIND.length()).trim();\r\n\t\t\t\t\t\t// if (!Utils.isEmpty(fileToFind)) {\r\n\t\t\t\t\t\t// List<Machine> machinesWithFile = n\r\n\t\t\t\t\t\t// .findFileOnTracker(fileToFind, null);\r\n\t\t\t\t\t\t// List<PeerMachine> avlblPeers = n\r\n\t\t\t\t\t\t// .getPeerMachineList(machinesWithFile);\r\n\t\t\t\t\t\t// System.out.println(\"File \" + fileToFind\r\n\t\t\t\t\t\t// + \" found at:\");\r\n\t\t\t\t\t\t// int indx = 1;\r\n\t\t\t\t\t\t// for (PeerMachine m : avlblPeers) {\r\n\t\t\t\t\t\t// System.out.print(indx + \". \");\r\n\t\t\t\t\t\t// System.out.println(m.getString());\r\n\t\t\t\t\t\t// indx++;\r\n\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\t// } else\r\n\t\t\t\t\t\tif (command.startsWith(COMMAND_STOP)) {\r\n\t\t\t\t\t\t\tstopped = true;\r\n\t\t\t\t\t\t\tts.shutdown();\r\n\t\t\t\t\t\t\tSystem.out.println(\"Exiting tracking server.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSystem.out.println(\"Exiting\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] arguments) {\n AnalyzeFile analyzer = new AnalyzeFile();\n analyzer.runAnalysis(arguments);\n }", "protected void serverStarted()\n {\n System.out.println(\"Server listening for connections on port \" + getPort());\n }", "@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static void main(String[] args) throws Exception {\n System.err.println(\"Starting main server\");\n\n AutonomousDatabaseWriter autonomousDatabaseWriter = null;\n\n String cloudlinkServerKey = \"\";\n\n if (args.length >= 3) {\n autonomousDatabaseWriter = new AutonomousDatabaseWriter(args[0], args[1]);\n try {\n autonomousDatabaseWriter.setupConnectionPool();\n } catch (SQLException sql) {\n // too bad if the connection pool to the oracle Autonomous Database could not be setup\n logger.log(Level.SEVERE, \"Failed to setup connection pool to oracle autonomous database.\", sql);\n }\n cloudlinkServerKey = args[2];\n }\n\n GluonCloudLinkService gluonCloudLinkService = new GluonCloudLinkService(cloudlinkServerKey);\n\n DeviceListener deviceListener = new DeviceListener(gluonCloudLinkService);\n deviceListener.startListening();\n\n ExternalRequestHandler externalRequestHandler = new ExternalRequestHandler(autonomousDatabaseWriter, gluonCloudLinkService);\n externalRequestHandler.startListening();\n }", "public static void main(String[] args) {\r\n int port = 5000;\r\n Server server = new Server(port);\r\n\r\n //Start the server thread:\r\n server.start();\r\n }", "public void start() {\n\n\t}", "private void startServer() {\n\t\tlogger.trace(\"startServer() is called\");\n\n\t\tKKModellable model = new KKModel(jokeFile);\n\t\tList<KKJoke> kkJokeList = model.getListOfKKJokes();\n\t\tint numOfJokes = kkJokeList.size();\n\t\ttotalJokesLabel.setText(\"Total jokes: \" + String.valueOf(numOfJokes));\n\t\t\n\t\tif (numOfJokes > 0){\n\t\t\tif (socketListeningTask == null){\n\t\t\t\tsocketListeningTask = new BackgroundSocketListener(kkServerPort, serverStatusLabel);\n\t\t\t\tsocketListeningTask.execute();\n\t\t\t\tConnectionCounter.resetConnectionCounter();\n\t\t\t\tserverStatusLabel.setText(serverStarted);\n\t\t\t\ttotalClientConectionLabel.setText(\"Client connections: 0\");\n\n\t\t\t\tstartServerToolBarButton.setEnabled(false);\n\t\t\t\tstopServerToolBarButton.setEnabled(true);\n\t\t\t\t\n\t\t\t\tconnectionCheckingTask = new BackgroundConnectionCheck(totalClientConectionLabel);\n\t\t\t\tconnectionCheckingTask.execute();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//Do not start server because joke list is empty\n\t\t\tserverStatusLabel.setText(jokesNotFound);\n\t\t\tSystem.err.println(\"Empty joke source\");\n\t\t\tlogger.info(\"Empty joke source\");\n\t\t\tUtility.displayErrorMessage(\"Jokes not found or missing the \\\" kk-jokes.txt \\\" file which must be stored in the same path as this server app. \"\n\t\t\t+ \"Each line or joke in the \\\" kk-jokes.txt \\\" file must also be formatted as \\\" clue ### answer \\\" without the quotes.\");\n\t\t}\n\t}", "public void run() {\n try {\n this.initialize();\n Listener ln = new Listener(localDir, port);\n ln.run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"TESLA has been started\");\n\t}", "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}", "protected void start() {\n }", "public static void main(String[] args) {\n\t\tServer.Serv();\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) {\n\t\tDMMainServer server = new DMMainServer();\n\t}", "public void start() throws IOException {\n ThreadExecutor.registerClient(this.getClass().getName());\n tcpServer.startServer();\n }", "public static void main(String args[]) throws Exception {\n SLF4JBridgeHandler.install();\n\n try {\n JettyServer server = new JettyServer(8080);\n server.start();\n log.info(\"Server started\");\n server.join();\n } catch (Exception e) {\n log.error(\"Failed to start server.\", e);\n }\n }", "public void start() {\n\t\tconnection.start((sender, message) -> message.accept(new Visitor(sender)));\n\t\tloadData();\n\t}", "public void startServer(){\r\n try {\r\n\r\n while(true){\r\n\r\n s = sc.accept();\r\n new ServerThread(s).start();\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n try {\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static void start() {\n enableIncomingMessages(true);\n }", "@Override\n\tpublic void run() {\n\t\tlog(\"Running on port \" + serverSocket.getLocalPort());\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\t// accept incomming connections\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t//log(\"New connection from \" + client_socket.getRemoteSocketAddress());\n\t\t\t\t// create a new connection handler and run in a separate thread\n\t\t\t\tTrackerRequestHandler handler = new TrackerRequestHandler(this, clientSocket);\n\t\t\t\texecutor.execute(handler);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog(\"Problem accepting a connection\");\n\t\t\t}\n\t\t}\n\t}", "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}" ]
[ "0.68181694", "0.6777529", "0.65562147", "0.65465665", "0.6513815", "0.64787406", "0.6442727", "0.6421294", "0.6411288", "0.63959473", "0.63554657", "0.63025075", "0.62366945", "0.6105581", "0.6100762", "0.6098456", "0.6084934", "0.6079956", "0.60073894", "0.59943604", "0.5967549", "0.59535116", "0.59513444", "0.59410626", "0.593888", "0.5921448", "0.5907742", "0.58996415", "0.58872515", "0.5880349", "0.5854081", "0.5853787", "0.58080524", "0.5798882", "0.5794501", "0.57914513", "0.57844454", "0.57702315", "0.57666546", "0.57611996", "0.5726544", "0.5719517", "0.57147706", "0.57106507", "0.5708025", "0.57024354", "0.569787", "0.56949365", "0.5690866", "0.5689569", "0.5684752", "0.5673945", "0.5673945", "0.5673124", "0.5670046", "0.566092", "0.5648948", "0.564697", "0.5645282", "0.5645121", "0.56442785", "0.5628367", "0.56233346", "0.5616288", "0.56116253", "0.5607519", "0.5599263", "0.5598479", "0.5596635", "0.55965626", "0.5594751", "0.55912304", "0.55868393", "0.5581439", "0.55809945", "0.5576474", "0.55689627", "0.55624", "0.5562202", "0.5553996", "0.55514926", "0.55476636", "0.5546672", "0.5543921", "0.55401486", "0.5533525", "0.5533218", "0.55249083", "0.5514473", "0.5513407", "0.551147", "0.55109864", "0.55075574", "0.55067515", "0.5506299", "0.5505032", "0.54998004", "0.5496105", "0.54922235", "0.5489266", "0.5484553" ]
0.0
-1
Update the content of one or more files. Files that were previously updated but not included in this update remain unchanged.
public void updateContent(Map<String, ContentChange> files);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateFiles() {\n\t}", "void updateFile() throws IOException;", "void update(FileInfo fileInfo);", "public static void refreshIOFiles(@NotNull final Collection<File> files) {\n final long start = System.currentTimeMillis();\n try {\n for (File file1 : files) {\n final VirtualFile file = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file1);\n if (file != null) {\n file.refresh(false, false);\n }\n }\n }\n finally {\n ourRefreshTime += (System.currentTimeMillis() - start);\n }\n }", "public void reloadFiles()\n {\n for (Reloadable rel : reloadables)\n {\n rel.reload();\n }\n }", "@Override\r\n\tpublic void updateAll() throws IOException {\n\t}", "public void updateFiles(String[] fileNames) {\n try {\n peerService.updateFiles(fileNames);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void flush() {\r\n synchronized (sync) {\r\n updatedFiles.clear();\r\n }\r\n }", "public void updateFile(String fname, String content) {\n\t\tprintMsg(\"running updateFiles() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\tString text = null;\n\t\tPath filepath = Paths.get(theRootPath + System.getProperty(\"file.separator\") + fname);\n\t\tif(Files.exists(filepath)) {\n\t\t\tprintMsg(\"File \" + fname + \" exists, updating...\");\n\t\t\t\n\t\t\tif(content.isEmpty() || content == null) {\n\t\t\t\ttext = String.format(\"%s, testing appending text to an empty file.\\r\\n\", new Date());\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttext = content + \"\\r\\n\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFiles.write(filepath, text.getBytes(), StandardOpenOption.APPEND);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "void updateContent(List<Md2Entity> updates);", "void handleChanged(Collection<AGStoredFile> existingFiles, Collection<AGStoredFile> changedFiles);", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "public synchronized void refresh()\n {\n // Update the last modified time\n // This returns zero (i.e. Jan 1 1970) if the file does not exist\n this.lastModifiedTime = this.file.lastModified() / 1000;\n }", "private void updateDictionary(Collection<String> writtenFiles) {\n if(logger.isDebugEnabled()){\n logger.debug(\"updating VFSCache with files written: \" + writtenFiles);\n }\n Cache cache = CacheFactory.getVFSCache();\n for(String path : writtenFiles){\n cache.put(new Element(path, path));\n }\n }", "public void doUpdate() {\n fileChooser.setCurrentDirectory(new File(getPath()));\n fileChooser.rescanCurrentDirectory();\n }", "public void updateFile() {\n try {\n FileWriter fw = new FileWriter(path);\n for (Task t : taskList.getTasks()) {\n fw.write(t.toTxt());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"File cannot be found\");\n }\n }", "private void updateImformation(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint fileId= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tString caption= request.getParameter(\"caption\");\n\t\tString label= request.getParameter(\"label\");\n\t\tString fileName= request.getParameter(\"fileName\");\n\t\tFiles file= new Files(fileId, fileName, label, caption);\n\t\tnew FilesDAO().update(fileId, caption, label);;\n\t\tlistingPage(request, response);\n\t}", "@Override\n\tpublic FileModel update(FileModel c) {\n\t\treturn fm.saveAndFlush(c);\n\t}", "@ActionKey(\"/api/blog/updateFile\")\n public void updateFile() throws IOException {\n Integer id = getParaToInt(\"id\");\n File blogFile = getFile(\"blog\").getFile();\n if (id == null) {\n mResult.fail(102);\n renderJson(mResult);\n return;\n }\n if (!blogFile.getName().endsWith(\".md\")) {\n mResult.fail(110);\n renderJson(mResult);\n return;\n }\n BufferedReader reader = null;\n try {\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(blogFile), \"UTF-8\"));\n StringBuilder builder = new StringBuilder();\n String line = \"\";\n while (line != null) {\n line = reader.readLine();\n builder.append(line);\n }\n mResult.success(mBlogService.update(id, \"content\", builder.toString()));\n renderJson(mResult);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n mResult.fail(109);\n if (reader != null) {\n reader.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n for (OIFitsFile oifitsFile : oifitsFiles) {\n // fire OIFitsCollectionChanged:\n addOIFitsFile(oifitsFile);\n }\n }", "private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip(currHeadFiles.get(fileName));\n temp.copyFile(fileName);\n }\n\n }", "public updateFile_args(updateFile_args other) {\n if (other.isSetFile()) {\n this.File = new UpdateData(other.File);\n }\n }", "List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);", "public void updateContent() {\n\t\t\n\t\tupdateResidencias();\n\t\tupdateUniversidades();\n\t\t\n\t}", "@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n // first reset if this we do not add files only:\n if (!appendOIFitsFilesOnly) {\n reset();\n }\n\n // add OIFits files to collection = fire OIFitsCollectionChanged:\n super.refreshUI(oifitsFiles);\n\n if (!appendOIFitsFilesOnly) {\n postLoadOIFitsCollection(file, oiDataCollection, checker);\n }\n\n listener.done(false);\n }", "public void reload() {\n\t\tif (file.lastModified() <= fileModified)\n\t\t\treturn;\n\t\n\t\treadFile();\n\t}", "@Override\r\n\tpublic int update_file(Map<String, Object> map) throws Exception {\n\t\treturn sql.update(\"cms_board.update_file\", map);\r\n\t}", "private void updateAll() {\n updateAction();\n updateQueryViews();\n }", "private void updateView(File selectedFile) {\n\n if (selectedFile != null && selectedFile != currentFile) {\n currentFile = selectedFile;\n setFileDetails(currentFile);\n previewFile(currentFile);\n }\n\n if (currentFile.isDirectory()) {\n view.getFileOperations().disableFileOperations();\n } else {\n enableFileOperations();\n }\n }", "public void refresh() {\n List<ConfigPath> configPaths = getConfigFiles();\n\n // Delete configs from cache which don't exist on disk anymore\n Iterator<String> currentEntriesIt = confs.keySet().iterator();\n while (currentEntriesIt.hasNext()) {\n String path = currentEntriesIt.next();\n boolean found = false;\n for (ConfigPath configPath : configPaths) {\n if (configPath.path.equals(path)) {\n found = true;\n break;\n }\n }\n if (!found) {\n currentEntriesIt.remove();\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected removed config \" + path + \" in \" + location);\n }\n }\n }\n\n // Add/update configs\n for (ConfigPath configPath : configPaths) {\n CachedConfig cachedConfig = confs.get(configPath.path);\n if (cachedConfig == null || cachedConfig.lastModified != configPath.file.lastModified()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected updated or added config \" + configPath.path + \" in \" + location);\n }\n long lastModified = configPath.file.lastModified();\n ConfImpl conf = parseConfiguration(configPath.file);\n cachedConfig = new CachedConfig();\n cachedConfig.lastModified = lastModified;\n cachedConfig.conf = conf;\n cachedConfig.state = conf == null ? ConfigState.ERROR : ConfigState.OK;\n confs.put(configPath.path, cachedConfig);\n }\n }\n }", "void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);", "public static void updateDatabase(){\n\t\ttry {\n\t\t\tPrintWriter pwFLU = new PrintWriter(filePath);\n\t\t\tfor(Entry<String, Pair<FileID, Integer>> entry : Peer.fileList.entrySet()){\n\t\t\t\tString path = entry.getKey();\n\t\t\t\tPair<FileID, Integer> pair = entry.getValue();\n\t\t\t\tpwFLU.println(path + \"|\" + pair.getFirst().toString() + \"|\" + pair.getSecond());\n\t\t\t}\n\t\t\tpwFLU.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\t * UPDATE THE CHUNKS\n\t\t */\n\t\ttry {\n\t\t\tPrintWriter pwCLU = new PrintWriter(chunkPath);\n\t\t\tfor(ChunkInfo ci : Peer.chunks){\n\t\t\t\tpwCLU.println(ci.getFileId() + \"|\" + ci.getChunkNo() + \"|\" + ci.getDesiredRD() + \"|\" + ci.getActualRD());\n\t\t\t}\n\t\t\tpwCLU.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void updateFile(CrowdinFile _file) {\n String fileN = _file.getFile().getName();\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Initializing: \" + fileN);\n // Making sure the file is a master file and not a translation\n if (_file.getClass().equals(CrowdinFile.class)) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Init dir\");\n initDir(_file.getCrowdinPath());\n try {\n if (_file.getFile().exists()) {\n \n //escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersBeforeSyncFromCodeToCrowdin\");\n \n if (!getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Add file: \" + _file.getCrowdinPath());\n String result = getHelper().addFile(_file);\n if (result.contains(\"success\")) {\n getLog().info(\"File \" + fileN + \" created succesfully.\");\n initTranslations(_file);\n } else {\n getLog().warn(\"Cannot create file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n }\n } else {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"*** Update file: \" + _file.getCrowdinPath());\n }\n String result = getHelper().updateFile(_file);\n System.out.println(result);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" updated succesfully.\");\n else\n getLog().warn(\"Cannot update file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n \n //remove escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersAfterSyncFromCodeToCrowdin\");\n \n }\n } else {\n if (getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Delete file: \" + _file.getCrowdinPath());\n String result = getHelper().deleteFile(_file);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" deleted succesfully.\");\n else\n getLog().warn(\"Cannot delete file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n }\n }\n } catch (MojoExecutionException e) {\n getLog().error(\"Error while updating file '\" + _file.getFile().getPath() + \"'. Exception:\\n\" + e.getMessage());\n }\n }\n }", "@Override\n public void fileStatusesChanged() {\n assertDispatchThread();\n LOG.debug(\"FileEditorManagerImpl.MyFileStatusListener.fileStatusesChanged()\");\n final VirtualFile[] openFiles = getOpenFiles();\n for (int i = openFiles.length - 1; i >= 0; i--) {\n final VirtualFile file = openFiles[i];\n LOG.assertTrue(file != null);\n ApplicationManager.getApplication().invokeLater(() -> {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"updating file status in tab for \" + file.getPath());\n }\n updateFileStatus(file);\n }, IdeaModalityState.NON_MODAL, myProject.getDisposed());\n }\n }", "@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n // add OIFits files to collection = fire OIFitsCollectionChanged:\n super.refreshUI(oifitsFiles);\n\n listener.done(false);\n }", "@Override\n public void uploadMultipleFiles(ArrayList<File> files, Modpack modpack) {\n uploadStatus = \"Uploading file(s) to server!\";\n modpackUploadRepository.uploadMultipleFiles(files, modpack);\n }", "public void updateResources(List<Resource> resources) {\n\t\t\n\t}", "@Override\r\n\tpublic void update(Resources resources) {\n\t\t\r\n\t}", "public void updateMenuFile() {\n\t\tif (fileMenu != null) {\n\t\t\tfileMenu.update();\n\t\t}\n\t}", "public void update(String filename, SensorData sensorData){\n //Adds the sensor data to the buffer. \n addToBuffer(filename, sensorData);\n \n //Uploads the data to the server if it's turned on. \n if (Server.getInstance().getServerIsOn())\n if(uploadData()){\n //If the upload was successful, clear the buffer.\n clearBuffer();\n }\n }", "public void updateDoc (DocFile updatefile) throws ParseException, IOException {\n\n // Check if the file extension is valid\n if (updatefile == null) return;\n if (!isValid(updatefile) || !(FileManager.fileExists(updatefile.getId(), updatefile.getFileType()) || pathExists (updatefile.getPath()))) {\n return;\n }\n\n if (FileManager.fileExists(updatefile.getId(), updatefile.getFileType())) {\n String path = FileManager.download(updatefile.getId(), updatefile.getFileType());\n updatefile.setPath(path);\n }\n\n // remove the file from the index and re-add it\n this.removeDoc(updatefile);\n this.addDoc(updatefile);\n //FileManager.cleanTemporaryDownloads();\n }", "@Override\n\t\tpublic void update() throws IOException {\n\t\t}", "public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }", "@Override\r\n\tpublic void updateFileData(FileMetaDataEntity userInfo) {\n\t\t\r\n\t}", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "public void setFileupdate(Date fileupdate) {\n this.fileupdate = fileupdate;\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "@Override\n\tpublic File update(File file) {\n\t\treturn (File) this.getSession().merge(file);\n\t}", "void update(String page, Collection<String> paths, Collection<String> refreshPaths);", "public void update() {\n\t\tfor (GameObject gameObject : objects) {\n\t\t\tgameObject.update();\n\t\t}\n\t}", "public void mergeConflictedFiles(final Map<String, NewData> conflictedFiles)\n \t{\n \t\tList<String> working = new LinkedList<String>();\n \t\tList<String> conflicted = new LinkedList<String>();\n \t\tString s=\"\";\n \t\tPatch diff = new Patch();\n \t\t\n \t\tfor(String str:conflictedFiles.keySet()){\n \t\t\n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(conflictedFiles.get(str).getFileContent()));\n \t\t\ttry {\n \t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\tconflicted.add(s);\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\t\n \t\tFile f = new File(this.getRoot() + File.separatorChar +str);\n \t\tif(!f.exists()){\n \t\t\tthis.pCreateFile(this.getRoot() + File.separatorChar +str);\t\n \t\t\tworking=conflicted;\n \t\t}\n \t\telse{\n \t\tworking = this.readFile(this.getRoot()+ File.separatorChar +str);\n \t\t\n \t\tdiff=this.getSnapshot().getDiff(working, conflicted);\n \t\t\n \t\tfor(Delta delta:diff.getDeltas()){\t\n \t\t\n\t\t\tfor(int i=delta.getRevised().getPosition(), j=0;j<delta.getRevised().getLines().size();++i,++j)\n\t\t\t\tworking.set(i, working.get(i)+\" <<<O==merge==R>>> \"+delta.getRevised().getLines().get(j));\n \t\t\t}\n \t\t}\n \t\tthis.getFilelist().get(str).putAll(conflictedFiles.get(str).getLclock());\n \t\t\n \t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, working);\n \t\t\n \t\tworking.clear();\n \t\tconflicted.clear();\n \t\t}\n \t}", "@Override\n public void update(String fileName) {\n //Responses or action taken after an event occured in publisher and is notified\n System.out.println(\"Email to \" + this.email + \": \\\" The file \" + fileName + \" has been modified!\");\n }", "private void update() {\r\n \tthis.pathTextView.setText(this.currentPath);\r\n \tthis.fileListAdapter.clear();\r\n \tthis.fileListAdapter.add(\"[\"+getResources().getString(R.string.go_home)+\"]\");\r\n \tif (!this.currentPath.equals(\"/\"))\r\n \t\tthis.fileListAdapter.add(\"..\");\r\n \t\r\n \tFile files[] = new File(this.currentPath).listFiles(this.fileFilter);\r\n\r\n \tif (files != null) {\r\n\t \ttry {\r\n\t\t \tArrays.sort(files, new Comparator<File>() {\r\n\t\t \t\tpublic int compare(File f1, File f2) {\r\n\t\t \t\t\tif (f1 == null) throw new RuntimeException(\"f1 is null inside sort\");\r\n\t\t \t\t\tif (f2 == null) throw new RuntimeException(\"f2 is null inside sort\");\r\n\t\t \t\t\ttry {\r\n\t\t \t\t\t\tif (dirsFirst && f1.isDirectory() != f2.isDirectory()) {\r\n\t\t \t\t\t\t\tif (f1.isDirectory())\r\n\t\t \t\t\t\t\t\treturn -1;\r\n\t\t \t\t\t\t\telse\r\n\t\t \t\t\t\t\t\treturn 1;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\treturn f1.getName().toLowerCase().compareTo(f2.getName().toLowerCase());\r\n\t\t \t\t\t} catch (NullPointerException e) {\r\n\t\t \t\t\t\tthrow new RuntimeException(\"failed to compare \" + f1 + \" and \" + f2, e);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t}\r\n\t\t \t});\r\n\t \t} catch (NullPointerException e) {\r\n\t \t\tthrow new RuntimeException(\"failed to sort file list \" + files + \" for path \" + this.currentPath, e);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i = 0; i < files.length; ++i) this.fileListAdapter.add(files[i].getName());\r\n \t}\r\n \t\r\n \tif (isHome(currentPath)) {\r\n \t\trecent = new Recent(this);\r\n \t\t\r\n \tfor (int i = 0; i < recent.size(); i++) {\r\n \t\tthis.fileListAdapter.insert(\"\"+(i+1)+\": \"+(new File(recent.get(i))).getName(), \r\n \t\t\t\tRECENT_START+i);\r\n \t}\r\n \t}\r\n \telse {\r\n \t\trecent = null;\r\n \t}\r\n \t\r\n \tthis.filesListView.setSelection(0);\r\n }", "public void fileChanged(ArrayList<String> sortedFiles, ArrayList<String> tag1ArrList2, ArrayList<String> tag2ArrList2, ArrayList<String> tag3ArrList2, ArrayList<Boolean> favArrList2) {\n this.sortedFilesArrList.clear();\n this.tag1ArrList.clear();\n this.tag2ArrList.clear();\n this.tag3ArrList.clear();\n this.favArrList.clear();\n\n this.tag1ArrList.addAll(tag1ArrList2);\n this.tag2ArrList.addAll(tag2ArrList2);\n this.tag3ArrList.addAll(tag3ArrList2);\n this.favArrList.addAll(favArrList2);\n this.sortedFilesArrList.addAll(sortedFiles);\n\n notifyDataSetChanged();\n notifyItemRangeChanged(0, getItemCount());\n }", "public void setFiles(ArrayList<VipeFile> files) {\n this.files = files;\n }", "private void onUpdateSelected() {\r\n mUpdaterData.updateOrInstallAll_WithGUI(\r\n null /*selectedArchives*/,\r\n false /* includeObsoletes */,\r\n 0 /* flags */);\r\n }", "@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }", "@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }", "public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}", "private void handleFileUpdateMessage(String request) {\r\n\t\tString[] commandFragments = Utils.splitCommandIntoFragments(request);\r\n\t\tLoggingUtils.logInfo(logger, \"request=%s;;commandFragments=%s;\", request, Arrays.toString(commandFragments));\r\n\t\tString[] filesFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[0]);\r\n\t\tString[] deleteFilesFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[1]);\r\n\t\tString[] machineFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[2]);\r\n\t\taddNodeFilesToMap(filesFromCommandFrag[1], Machine.parse(machineFromCommandFrag[1]));\r\n\t\tremoveNodeFilesFromMap(deleteFilesFromCommandFrag[1], Machine.parse(machineFromCommandFrag[1]));\r\n\t\t// need to change this to make it consistent with sequential\r\n\t\t// server\r\n\t}", "private void updateDataFile(DataFile dataFile) {\n updateMeeting(dataFile.getMeeting());\n }", "public void updateContent(Map<String, Object> update_params) throws SolrServerException, IOException {\n\t\tSolrInputDocument doc_in = new SolrInputDocument();\n\n\t\tIterator<String> itr = update_params.keySet().iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tString key = itr.next();\n\t\t\t\n\t\t\tdoc_in.addField(key, update_params.get(key));\n\t\t\titr.remove(); // avoids a ConcurrentModificationException\n\t\t}\n\t\t\n\t\t\n\t\t//System.out.println(\"Debug.\");\n\t\tSystem.out.println(\"Debug: Doc_in: \" + doc_in.toString());\n\t\tSystem.out.println(\"updating content...\");\n\t\tUpdateResponse UD_response = server.add(doc_in);\n\t\tserver.commit();\n\t\tSystem.out.println(\"Debug: \"+UD_response.toString());\n\t\tSystem.out.println(\"Finished updating solr.\");\n\n\t}", "private void updateListView() {\n fileList.getItems().setAll(files.readList());\n //System.out.println(System.currentTimeMillis() - start + \" мс\");\n }", "public void setFiles(org.hpccsystems.ws.filespray.PhysicalFileStruct[] files) {\n\t\t this.files = files;\n\t }", "public void update() {\n manager.update();\n }", "public void updateScripts() {\n\t\tFile file = new File(\"updatedPrescriptions.txt\");\n\t\tBufferedWriter bw;\n\t\ttry {\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tfor (int i = 0; i < scripts.size(); i++) {\n\n\t\t\t\tbw.write(scripts.get(i).toString());\n\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbw.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void updateAll() {\n\t\tList<Request> requests = peer.getRequests();\n\t\tfor(Request request : requests){\t\t\t\n\t\t\tupdateAccounting(request);\t\t\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * Once the accounting for all requests of each peer was performed, \n\t\t * we now update the lastUpdatedTime of each accounting info. \n\t\t */\n\t\tfor(AccountingInfo accInfo : accountingList)\n\t\t\taccInfo.setLastUpdated(TimeManager.getInstance().getTime());\n\t\t\t\t\n\t\tfinishRequests();\n\t}", "@Override\n public void onSuccess(Void v) {\n O365FileModel fileItem = mApplication.getDisplayedFile();\n fileItem.setContents(currentActivity, updatedContents);\n // Notify caller that the Event update operation is complete and\n // succeeded\n OperationResult opResult = new OperationResult(\n \"Post updated file contents\",\n \"Posted updated file contents\", \"FileContentsUpdate\");\n mEventOperationCompleteListener.onOperationComplete(opResult);\n }", "public void updateAllViews()\r\n { for (IView view : this.views)\r\n { view.updateView();\r\n }\r\n }", "public int update(FFileInputDO FFileInput) throws DataAccessException;", "public void touchOne(File inFile)\n {\n mFiles.add(inFile);\n }", "@Override\n\tpublic void fileDeliveryServiceListUpdate() {\n\t\t\n\t}", "private void refreshRemoteFilesList(final FileListMessage flm) {\n if (Platform.isFxApplicationThread()) {\n serverFilesList.getItems().clear();\n flm.getFiles().forEach(s -> serverFilesList.getItems().add(s));\n } else {\n Platform.runLater(() -> {\n serverFilesList.getItems().clear();\n flm.getFiles().forEach(s -> serverFilesList.getItems().add(s));\n });\n }\n }", "public static void update(String sFilename)\n\t{\n\t\tVTD_XML xml;\n\t\ttry\n\t\t{\n\t\t\tLogs.log.info(\"Translations being loaded from file: \" + sFilename);\n\t\t\txml = new VTD_XML(sFilename);\n\t\t\tupdate(xml);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\t// ex.printStackTrace();\n\t\t\tLogs.log.error(\"Exception occurred attempting to update the translations. Details below: \");\n\t\t\tLogs.log.error(ex);\n\t\t\tthrow new TranslationsUpdateException(ex.getMessage());\n\t\t}\n\t}", "private void updateDatabaseFile() {\n Log.i(\"updateDatabaseFile\", \"Updating server app database\");\n try {\n FileInputStream inputStream = new FileInputStream(databaseFile);\n DropboxAPI.Entry response = MainActivity.mDBApi.putFileOverwrite(databaseFile.getName(), inputStream,\n databaseFile.length(), null);\n Log.i(\"updateDatabaseFile\", \"The uploaded file's rev is: \" + response.rev);\n } catch (Exception e) {\n Log.e(\"updateDatabaseFile\", e.toString(), e);\n }\n }", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "public void update(long pBytesRead, long pContentLength, int pItems) {\r\n\tbytesRead = pBytesRead;\r\n\tbytesLength = pContentLength;\r\n }", "public void update(){}", "public void update(){}", "public static void update(CommentModel updatedroot, Context context, String file){\n\t\tArrayList<CommentModel> rootlist = new ArrayList<CommentModel>();\n\t\tString dir = dir(file);\n\t\trootlist = loadFromFile(file, context);\n\t\t\n\t\tcheck_if_exist(file, context);\n\t\tfor(CommentModel r : rootlist){\n\t\t\tif(r.getPostId().toString().equals(updatedroot.getPostId().toString())){\n\t\t\t\tr = updatedroot;\n\t\t\t\t\n\t\t\t}\n\t\t\tSaveComment(r, context, dir);\n\t\t}\n\t\t\n\t}", "public void run() {\n if (infomap.containsKey(\"updateListFiles\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n List<String> odfdocs =\n (List<String>) infomap.get(\"updateListFiles\");\n changesInfo.reload(odfdocs.toArray(new String[odfdocs.size()]));\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n\n }\n\n if (infomap.containsKey(\"updateListFile\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n String odfdoc = (String) infomap.get(\"updateListFile\");\n changesInfo.reload(odfdoc);\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n }\n }", "public void updateDatabase(){\n executeSQLQuery(\"create table if not exists updates(id integer PRIMARY KEY,version integer,ejecutado integer)\\n\");\n try {\n AssetManager am = mContext.getAssets();\n String[] list = am.list(\"actualizaciones\");\n File[] files = new File[list.length];\n if (list != null){\n for (int i = 0; i < list.length; ++i) {\n File file = new File(list[i]);\n files[i]=file;\n }\n }\n\n /*ordenar por fecha*/\n// if (files != null && files.length > 1) {\n// Arrays.sort(files, new Comparator<File>() {\n// @Override\n// public int compare(File object1, File object2) {\n// return (int) ((object1.lastModified() > object2.lastModified()) ? object1.lastModified() : object2.lastModified());\n// }\n// });\n// }\n\n if(files!=null){\n for (int j=0;j<files.length;j++){\n File file = files[j];\n if (file.isDirectory()) {\n Log.d(\"Assets:\", file.getPath() + \" is Directory\");\n } else {\n\n Log.d(\"Assets:\", file.getPath() + \" is File\");\n Log.w(\"archivo\",file.getPath());\n //InputStream in = am.open(\"actualizaciones/680.txt\");\n String fileName = file.getPath();\n int version = Integer.parseInt(fileName.substring(0,fileName.lastIndexOf(\".\")));\n int versionDB = getDataBaseVersion();\n\n Log.i(\"version\",Integer.toString(version));\n Log.i(\"versionDB\",Integer.toString(versionDB));\n\n //if(version>versionDB){//es una actualizacion\n if(true){\n //Log.w(\"update\",\"la version es mayor que la de la bd\");\n int ejecutado = ejecutado(version);\n if(ejecutado==-1 || ejecutado==0){//\n Log.w(\"update\",\"se actualizara la base de datos\");\n InputStream in = am.open(\"actualizaciones/\"+fileName);\n\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n StringBuilder total = new StringBuilder();\n String line;\n while ((line = r.readLine()) != null) {\n total.append(\" \"+line+\" \");\n }\n\n String[] script = total.toString().split(\";\");\n for(int i=0;i<script.length;i++){\n if(script[i].trim().length()>0){\n Log.i(\"query\",\"ejecuntado el siguiente script: \"+script[i]);\n try{\n executeSQLQuery(script[i]);\n Log.w(\"exito\",\"ejecucion de script\");\n }catch(Exception ex){\n Log.e(\"fracaso\",\"hubo un problema al ejecutar la actualizacion de la base de datos\");\n }\n }\n }\n\n if(ejecutado==-1){\n executeSQLQuery(\"insert into updates(version,ejecutado) values(\"+version+\",1)\");\n }else{\n executeSQLQuery(\"update updates set ejecutado=0 where version=\"+version+\"\\n\");\n }\n\n\n }else{\n Log.w(\"update\",\"esta en base de datos y esta actualizado\");\n }\n }else {\n //Log.w(\"update\",\"no es necesario actualizar\");\n }\n }\n }\n\n /*actualizar estado de la actualizacion*/\n Cursor cursor=null;\n cursor = executeSelect(\"select * from updates\",cursor);\n while (cursor.moveToNext()){\n Log.i(\"version\",cursor.getInt(1)+\"\");\n Log.i(\"ejecutado\",cursor.getInt(2)+\"\");\n }\n }\n setDatabaseVersion();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }", "private void refreshList() {\n setTitle(this.path.get(this.path.size() - 1));\n\n // Read all files sorted into the values-array\n values.clear();\n File dir = new File(this.path.get(this.path.size() - 1));\n if (!dir.canRead()) {\n setTitle(getTitle() + \" (inaccessible)\");\n }\n String[] list = dir.list();\n if (list != null) {\n for (String file : list) {\n if (!file.startsWith(\".\")) {\n values.add(file);\n }\n }\n }\n Collections.sort(values);\n }", "void approveFiles(String[] fileIds,String[] commentList,String userId)throws LMSException;", "public void setWorkingFiles (final Map<String, NewData> mp){\n \t\tList<String> nf = new LinkedList<String>();\n \t\tString s =\"\";\n \t\t\n \t\tfor ( String str : mp.keySet()){\n //\t\t\tthis.getFilelist().remove(str);\n //\t\t\tthis.getFilelist().put(str, mp.get(str).getLclock());\n \t\t\tthis.getFilelist().get(str).putAll(mp.get(str).getLclock());\n \n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(mp.get(str).getFileContent()));\n \t\t\t\ttry {\n \t\t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\t\tnf.add(s);\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\te.printStackTrace();\n \t\t\t\t}\n \t\t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, nf);\n \t\t\tnf.clear();\n \t\t}\n \t\n \t}", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "public void setFilesList(File nowFile) {\n enterFilePath(nowFile);\n }", "public void updateProperties() {\n\t\t\tEnumeration iter = properties.keys();\r\n\t\t\twhile (iter.hasMoreElements()) {\r\n\t\t\t\tString key = (String) iter.nextElement();\r\n\t\t\t\tif (key.startsWith(ConfigParameters.RECENT_FILE_PREFIX)) {\r\n\t\t\t\t\tproperties.remove(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Save the list of recent file information\r\n\t\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t\tproperties.put(ConfigParameters.RECENT_FILE_PREFIX + (i + 1),\r\n\t\t\t\t\t\tfiles[i]);\r\n\t\t\t}\r\n\t\t\t// Save the number of recent files\r\n\t\t\tproperties.remove(ConfigParameters.RECENT_FILE_NUMBER);\r\n\t\t\tproperties.put(ConfigParameters.RECENT_FILE_NUMBER, files.length\r\n\t\t\t\t\t+ \"\");\r\n\t\t\t// Save to external file\r\n\t\t\tsim.core.AppEngine.getInstance().system.systemParameters\r\n\t\t\t\t\t.saveProperties(properties);\r\n\t\t\tdirty = false;\r\n\t\t}", "public void processFiles(){\n\t\tfor(String fileName : files) {\n\t\t\ttry {\n\t\t\t\tloadDataFromFile(fileName);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Can't open file: \" + fileName);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tprintInOrder();\n\t\t\tstudents.clear();\n\t\t}\n\t}", "public void update()\n\t{\n\t\tsuper.update();\n\t}", "private void update(int position) {\n File f = list_items[position];\n list_items = f.listFiles();\n notifyDataSetChanged();\n }", "public void refreshFileInformation()\n\t\tthrows IOException, SMBException {\n\n\t\t// Get the latest file information for the file\n\n\t\tif ( m_sess instanceof DiskSession) {\n\t\t\tDiskSession diskSess = (DiskSession) m_sess;\n\n\t\t\tFileInfo fInfo = diskSess.getFileInformation( getFileName());\n\t\t\tif ( fInfo != null)\n\t\t\t\tsetFileInformation( fInfo);\n\t\t}\n\t}", "public void updateBitfield() {\n\t\tfor (int i = 0; i < peers.size(); i++) {\n\t\t\tPeer p = peers.get(i);\n\t\t\tif (p != null) {\n\t\t\t\tp.getClient().getBitfield().setBitfieldSize(files.getBitfieldSize());\n\t\t\t}\n\t\t}\n\t}", "boolean updateContent();", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {}", "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 }" ]
[ "0.8098725", "0.67336386", "0.6653385", "0.64883846", "0.6486336", "0.64805484", "0.64629567", "0.64279884", "0.6233876", "0.61422217", "0.6044006", "0.59891504", "0.5988727", "0.59563535", "0.5895895", "0.58513045", "0.581278", "0.5810694", "0.5788638", "0.5780936", "0.57632905", "0.57406205", "0.5740356", "0.56811476", "0.5676818", "0.5621634", "0.5607306", "0.55884486", "0.5584307", "0.55392843", "0.5530027", "0.55273825", "0.552026", "0.55116624", "0.5478505", "0.5464619", "0.5457604", "0.54518694", "0.5441508", "0.5441009", "0.54368114", "0.5423595", "0.5422969", "0.54222083", "0.5417683", "0.53841215", "0.53811455", "0.5377893", "0.5376326", "0.5367427", "0.53645355", "0.5351316", "0.53502524", "0.53427494", "0.5342475", "0.53376865", "0.53329057", "0.53329057", "0.53253347", "0.5319903", "0.5309677", "0.5286003", "0.52773064", "0.5261903", "0.52517176", "0.52245957", "0.52205867", "0.52078587", "0.5202497", "0.5200394", "0.51954925", "0.51857996", "0.5181486", "0.5171933", "0.5163288", "0.5158256", "0.5155381", "0.5153221", "0.5153221", "0.5139378", "0.51371723", "0.51355106", "0.5118133", "0.51181215", "0.51037556", "0.50990164", "0.5098981", "0.50888175", "0.5087704", "0.50801283", "0.5071489", "0.50678414", "0.50675166", "0.506108", "0.50587225", "0.50587225", "0.50587225", "0.50587225", "0.50563836", "0.50510573" ]
0.7311926
1
TODO jeffreyh 12816, wait for image upload implementation
public Event() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void uploadImage(byte[] imageData) {\n\n }", "private void doUpload(Part img1, String image) throws IOException{\n OutputStream out = null;\n InputStream filecontent = null;\n try {\n out = new FileOutputStream(new File(path \n + image));\n System.out.println(path \n + image);\n filecontent = img1.getInputStream();\n\n int read = 0;\n final byte[] bytes = new byte[1024];\n\n while ((read = filecontent.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n \n } catch (Exception fne) {\n System.out.println(\"You either did not specify a file to upload or are \"\n + \"trying to upload a file to a protected or nonexistent \"\n + \"location.\");\n fne.printStackTrace();\n\n } finally {\n if (out != null) {\n out.close();\n }\n if (filecontent != null) {\n filecontent.close();\n }\n }\n }", "public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString filePath = doFileUpload(params[1]);\r\n\t\t\tif(filePath!=null){\r\n\t\t\t\tString abd = imService.updateImage(params[0], filePath);\r\n\t\t\t\tLog.e(\"IMAGE TAG\",\" \"+abd);\r\n\t\t\t}\r\n\t\t\t//String abd = imService.updateImage(params[0], params[1]);\r\n\t\t\t//Log.e(\"IMAGE TAG\",\" \"+abd);\r\n\t\t\treturn params[1];\r\n\t\t}", "public interface FileUploadService {\n\n /**\n *\n * @param form\n * @param path\n * @param fileName\n * @throws Exception\n */\n void uploadBase64Image(Base64ImageForm form, String path, String fileName) throws Exception;\n}", "public void uploadImage() {\n if (imgPath != null && !imgPath.isEmpty()) {\n //prgDialog.setMessage(\"Converting Image to Binary Data\");\n //prgDialog.show();\n // Convert image to String using Base64\n new EncodeImageToStringTask().execute();\n // When Image is not selected from Gallery\n } else {\n //Toast.makeText(\n // getApplicationContext(),\n // \"You must select image from gallery before you try to upload\",\n // Toast.LENGTH_LONG).show();\n }\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(request)) {\n try {\n\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n\n for (FileItem item : multiparts) {\n\n if (!item.isFormField()) {\n item.write(new File(UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\"));\n\n }\n \n String fileName = UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\";\n\n }\n\n //File uploaded successfully\n request.setAttribute(\"message\", \"File Uploaded Successfully\");\n\n } catch (Exception ex) {\n\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n\n }\n\n } else {\n\n request.setAttribute(\"message\",\n \"Sorry this Servlet only handles file upload request\");\n\n }\n\n request.getRequestDispatcher(\"/result.jsp\").forward(request, response);\n\n }", "@RequestMapping(value = \"/uploadicon\", method = RequestMethod.POST, consumes = \"multipart/form-data\")\r\n\tpublic String handleFormUpload(@RequestPart(\"file\") MultipartFile f, RedirectAttributes redirectAttributes) throws IOException {\n\t\tUser u = (User) session.getAttribute(\"user\");\r\n\t\t\r\n\t\tInputStream is = new BufferedInputStream(f.getInputStream());\r\n\t\tBufferedImage image = ImageIO.read(is);\r\n\t\tis.close();\r\n\t\t\r\n\t\t//if(image == null) {\r\n\t\t\t//response.put(\"success\", \"false\");\r\n\t\t\t//response.put(\"reason\", \"notimage\");\r\n\t\t//}\t\t\r\n\t\t//else {\r\n\t\tif(image != null) {\r\n\t\t\tImage scaled = image.getScaledInstance(512, 512, Image.SCALE_SMOOTH);\r\n\t\t\tBufferedImage bufferedScale = new BufferedImage(512, 512, BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics2D g2d = bufferedScale.createGraphics();\r\n\t\t g2d.drawImage(scaled, 0, 0, null);\r\n\t\t g2d.dispose();\r\n\r\n\t\t\tstorageService.store(bufferedScale,Integer.toString(u.getUserID())+\".png\");\r\n\t\t\t//response.put(\"success\", \"true\");\r\n\t\t}\r\n\t\treturn \"redirect:/users/\"+u.getUserID();\r\n\t\t//return ResponseEntity.ok(response);\r\n }", "@Override\n\tvoid postarFoto() {\n\n\t}", "public interface ImageUpload {\n void imageUploadToServer(int selectedImageResourceId);\n}", "IbeisImage uploadImage(File image) throws UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException,\n UnsuccessfulHttpRequestException;", "public void uploadMultipart() {\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, \"todo\")\n .addFileToUpload(path, \"image\") //Adding file\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "public void upload(FileUploadEvent event) {\r\n\t\tUploadedFile uploadFile = event.getFile();\r\n\t\t// Recuperer le contenu de l'image en byte array (pixels)\r\n\t\tbyte[] contents = uploadFile.getContents();\r\n\t\tSystem.out.println(\"---------------- \" + contents);\r\n\t\tproduit.setPhoto(contents);\r\n\t\t// Transforme byte array en string (format basé64)\r\n\t\timage = \"data:image/png;base64,\" + Base64.encodeBase64String(produit.getPhoto());\r\n\t\t\r\n\t}", "public PictureResult upload(byte[] fileBytes,String extName,String orignalName) throws Exception;", "private void uploadToServer(String filePath, String title) {\n APIClient apiClient = new APIClient();\n Retrofit retrofit = apiClient.getApiClient();\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n File file = new File(filePath);\n\n MultipartBody.Part filePart =\n MultipartBody.Part.createFormData(\"file\", title+\".jpg\", //file.getName(),\n RequestBody.create(MediaType.parse(\"image/*\"), file));\n\n\n Call call = apiInterface.uploadImage(filePart);\n call.enqueue(new Callback() {\n @Override\n public void onResponse(Call call, Response response) {\n Toast.makeText(AddPost.this, \"Worked\",Toast.LENGTH_SHORT).show();\n }\n @Override\n public void onFailure(Call call, Throwable t) {\n t.printStackTrace();\n Toast.makeText(AddPost.this, \"Didn't work\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "String uploadProfileImage(String fileNameWithOutRepository,String fileName) throws GwtException, ServerDownException;", "private void uploadImageFile(final String token, final GMImage image) {\n // create RequestBody instance from file\n File imgFile = storeHelper.getImageFile(image);\n final RequestBody requestFile = RequestBody.create(MediaType.parse(\"multipart/form-data\"), imgFile);\n\n // MultipartBody.Part is used to send also the actual file name\n MultipartBody.Part body = MultipartBody.Part.createFormData(\"file\", imgFile.getName(), requestFile);\n\n // Add file name within the multipart request\n RequestBody requestFileName = RequestBody.create(MediaType.parse(\"multipart/form-data\"), imgFile.getName());\n\n httpRequest.upload(token, requestFileName, body).enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> res) {\n if (res.code() == 200) {\n try {\n // upload image information\n image.addTag(TAG_RETRY, 0);\n createNewImage(token, image);\n\n } catch (JSONException e) {\n e.printStackTrace();\n notifyUploadFail();\n }\n } else {\n notifyUploadFail();\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n t.printStackTrace();\n\n // notify fail after retry reach limit\n if (((Integer) image.getTag(TAG_RETRY)) >= GMGlobal.RETRY_LIMIT) {\n notifyUploadFail();\n }\n\n // retry upload image\n new Retry() {\n @Override\n protected void handle(Object... params) {\n uploadImageFile((String) params[0], (GMImage) params[1]);\n }\n }.execute(token, image);\n }\n });\n }", "public void upload() {\n try {\n BufferedImage bufferedProfile = ImageIO.read(profilePicture.getInputStream());\n FaceImage face = new FaceImage(bufferedProfile);\n\n if (face.foundFace()) {\n\n face.setNoCropMultiplier(1);\n face.setAdditionPadding(20);\n face.setDimension(128, 128);\n BufferedImage profilePicture = face.getScaledProfileFace();\n\n File outfile = new File(Settings.NEW_PROFILE_IMAGE_PATH.replace(\"~~username~~\", student.getUserName()));\n ImageIO.write(profilePicture, \"png\", outfile);\n\n success = true;\n\n student.setProfilePicturePath(\"profile/\" + student.getUserName() + \".png\");\n save();\n\n } else {\n FacesContext.getCurrentInstance().addMessage(\"imageContainer:file\", new FacesMessage(\"Kein Gesicht gefunden!\"));\n\n }\n\n } catch (IOException e) {\n System.err.println(\"something went wrong \" + e.getMessage());\n }\n\n }", "@Override\n protected void upload(X x) {\n }", "public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }", "public interface PictureService {\n\n String uploadPicture(byte[] fileBuffer, String fileName) throws Exception;\n\n String uploadFile(String local_filename, String file_ext_name) throws Exception;\n\n}", "public handleFileUpload() {\r\n\t\tsuper();\r\n\t}", "public static String uploadImage(String fileName, String serverUri,\n String serverFolderUploads) {\n\n HttpURLConnection connection = null;\n DataOutputStream outputStream = null;\n\n String pathToOurFile = fileName;\n String urlServer = serverUri;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n String charset = \"UTF-8\";\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n\n try {\n FileInputStream fileInputStream = new FileInputStream(new File(\n pathToOurFile));\n\n URL url = new URL(urlServer);\n connection = (HttpURLConnection) url.openConnection();\n\n // Allow Inputs & Outputs\n connection.setDoInput(true);\n connection.setDoOutput(true);\n connection.setUseCaches(false);\n\n pathToOurFile = UUID.randomUUID().toString() + \".jpg\";\n\n // Enable POST method\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"Accept-Charset\", charset);\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\",\n \"multipart/form-data;boundary=\" + boundary);\n\n outputStream = new DataOutputStream(connection.getOutputStream());\n outputStream.writeBytes(twoHyphens + boundary + lineEnd);\n outputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"\"\n + serverFolderUploads + \"\\\"\" + \"; filename=\\\"\"\n + pathToOurFile + \"\\\"\" + lineEnd);\n outputStream.writeBytes(lineEnd);\n\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n buffer = new byte[bufferSize];\n\n // Read file\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n try {\n while (bytesRead > 0) {\n outputStream.write(buffer, 0, bytesRead);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n outputStream.writeBytes(lineEnd);\n outputStream.writeBytes(twoHyphens + boundary + twoHyphens\n + lineEnd);\n\n // Responses from the server (code and message)\n int serverResponseCode = connection.getResponseCode();\n String serverResponseMessage = connection.getResponseMessage();\n fileInputStream.close();\n outputStream.flush();\n outputStream.close();\n if (serverResponseCode == 200 && serverResponseMessage.equals(\"OK\"))\n return pathToOurFile;\n else\n return \"\";\n } catch (Exception e) {\n e.printStackTrace();\n return \"\";\n }\n }", "private void uploadImage() {\n FileChooser fileChooser = new FileChooser();\n\n //Extension de l'image\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"Fichier image\", \"*.*\");\n fileChooser.getExtensionFilters().addAll(extFilter);\n\n File file = fileChooser.showOpenDialog(null);\n\n try {\n BufferedImage bufferedImage = ImageIO.read(file);\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\n imageViewAvatar.setImage(image);\n getUser().setAvatar(image);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void upload(UploadedFile file) {\n FacesContext faces = FacesContext.getCurrentInstance();\n\n getSelected().setUrlImage(file.getFileName());\n String fileExtension = file.getFileName().split(\"\\\\.\")[file.getFileName().split(\"\\\\.\").length - 1];\n\n //String generatedFileName = \"file\" + System.currentTimeMillis();\n File directory = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE));\n\n if (!directory.exists()) {\n directory.mkdir();\n }\n\n File newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + file.getFileName());\n try {\n if (!newFile.createNewFile()) {\n String nameGenerated = \"file_generated\" + System.currentTimeMillis();\n newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + nameGenerated + \".\" + fileExtension);\n getSelected().setUrlImage(nameGenerated);\n }\n\n FileOutputStream output = new FileOutputStream(newFile);\n\n byte[] buffer = new byte[BUFFER];\n\n int bulk;\n\n InputStream input = file.getInputstream();\n\n while (true) {\n bulk = input.read(buffer);\n\n if (bulk < 0) {\n break;\n }\n\n output.write(buffer, 0, bulk);\n output.flush();\n }\n\n output.close();\n input.close();\n\n } catch (Exception ex) {\n ex.printStackTrace();\n FacesContext.getCurrentInstance().addMessage(\"\", new FacesMessage(bundle.getString(\"Error_file_created\")));\n }\n\n }", "private void uploadProductImage() {\n Activity activity = getActivity();\n if (activity == null) {\n return;\n }\n final String imagePath = PhotoUtil.getPhotoPathCache(gtin, activity);\n Runnable uploadProductImage = new Runnable() {\n @Override\n public void run() {\n // TODO limit file size\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }\n };\n if (dbProduct == null) {\n createEmptyOrGetProduct(gtin, language, true, true, uploadProductImage);\n } else {\n uploadProductImage.run();\n }\n }", "public synchronized void upload(){\n\t}", "@RequestMapping(value = \"/upload\", method = RequestMethod.POST)\n // defining the upload\n public String uploadFile(@RequestParam(\"title\") String title,\n @RequestParam(\"description\") String description,\n @RequestParam(\"file\") MultipartFile file,\n @RequestParam(\"tags\") String tags,\n HttpSession session) throws IOException {\n\n User currUser = (User) session.getAttribute(\"currUser\");\n\n if(currUser == null ){\n return \"redirect:/\";\n }\n\n else {\n List<Tag> imageTags = findOrCreateTags(tags);\n // creating an id of the image\n Long imageId = createId();\n // uploading the image and converting it to a base64 encoded version of the image\n String uploadedImageData = convertUploadedFileToBase64(file);\n Image newImage = new Image(imageId, title, description, uploadedImageData, currUser, imageTags);\n // storing the new image\n imageService.save(newImage);\n // after upload is successful, redirect the user to the home page\n return \"redirect:/home\";\n }\n }", "public void uploadImage(View v) {\n // When Image is selected from Gallery\n if (imgPath != null && !imgPath.isEmpty()) {\n prgDialog.setMessage(\"Converting Image to Binary Data\");\n prgDialog.show();\n // Convert image to String using Base64\n encodeImagetoString();\n // When Image is not selected from Gallery\n } else {\n Toast.makeText(\n getApplicationContext(),\n \"You must select image from gallery before you try to upload\",\n Toast.LENGTH_LONG).show();\n }\n }", "public interface FileService {\n\n Map<String,Object> uploadImage(MultipartFile upfile);\n}", "public interface FileService {\n\n Map<String,Object> uploadImage(MultipartFile upfile);\n}", "public void upload(FileUploadEvent event){\n UploadedFile file = event.getFile();\n if(file != null){\n try {\n imagePic = new OracleSerialBlob(file.getContents());\n Long size = imagePic.length();\n putProfPic(imagePic);\n //setPhoto_profile(new ByteArrayContent(imagePic.getBytes(1, size.intValue())));\n } catch (SQLException ex) {\n LOG.error(ex);\n GBMessage.putErrorMessage(\"Error al subir el archivo\");\n } catch (IOException ex) {\n Logger.getLogger(StaffBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n GBMessage.putInfoMessage(\"Carga correcta\");\n }\n }", "@Test\n\tpublic void testDownLoadImage(){\n\t\tFile file = new File(\"D:\\\\mxk-test\\\\images\\\\20140214\\\\103171-10404.jpg\");\n\t\tSystem.out.println(\"ok\");\n//\t\tContent content = new Content();\n//\t\tbyte[] byteFile = HttpUtil.getImageByte(content.getSimpleImage());\n//\t\tif(byteFile != null){\n//\t\t\tString fileName = StringUtil.cutOutUrlFileName(content.getSimpleImage());\n//\t\t\tString foldler = StringUtil.dateToString(new Date(), \"yyyyMMdd\");\n//\t\t\tString simpleImage = baseFileUploadService.saveFile(byteFile, fileName , foldler);\n//\t\t\tresource.setSimpleImage(simpleImage);//图片保存成功后\n//\t\t\tif(simpleImage != null){\n//\t\t\t\tresource.setSimpleImageName( foldler + \"/\" + fileName);\n//\t\t\t\tStringBuilder sb = new StringBuilder();\n//\t\t\t\tfor(String img : content.getImages()){\n//\t\t\t\t\tsb.append(img+\",\");\n//\t\t\t\t}\n//\t\t\t\tresource.setImages(sb.toString());\n//\t\t\t}\n\t}", "public interface UploadFileService {\r\n Map upLoadPic(MultipartFile multipartFile);\r\n}", "@Multipart\n @POST()\n Call<Result> uploadImage(@Part MultipartBody.Part file, @Url String medialUploadUrl, @PartMap() Map<String, RequestBody> partMap);", "public Result uploadImage() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n String imageUrl = S3Action.putImg(s3, file, UUID.randomUUID().toString());\n return ok(afterPutImg.render(imageUrl));\n } else {\n return badRequest(\"error\");\n }\n }", "@Override\n\tpublic boolean baseToImg() {\n\t\tList<Image> imgList = imageRepository.findAll();\n\t\tfor (Image img : imgList) {\n\t\t\tString base = img.getSource();\n\t\t\tFiles file = new Files(img.getSaegimId(), \"jpg\");\n\t\t\tfile = fileRepository.save(file);\n\t\t\tLong fileId = file.getId();\n\t\t\t\n\t\t\tBase64ToImgDecoder.decoder(base, dir + fileId + '.' + \"jpg\");\n\t\t}\n\t\treturn true;\n\t}", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\t\r\n\t\tif(resultCode!=RESULT_OK){\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t}if(requestCode==SLE_PH){\r\n\t\t\tif(imageuri!=null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tis= getContentResolver().openInputStream(imageuri);\r\n\t\t\t\t\tBitmap bm=BitmapFactory.decodeStream(is);\r\n\t\t\t\t\tBitmap bm2= toRoundBitmap(bm);\r\n\t\t\t\t\tself_headimg.setImageBitmap(bm2);\r\n\t\t\t\t\tsaveMyBitmap(bm2);\r\n\t\t\t\t\tpath=Environment.getExternalStorageDirectory()+\"/head.png\";\r\n\t\t\t\t\tmyApplication my=(myApplication) Main_Activity.this.getApplication();\r\n//\t\t\t\t\tToast.makeText(Main_Activity.this, \"\"+my.getUser_name(), Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\tNetUtil.uploadDataByHttpClientFile(Main_Activity.this,f);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (FileNotFoundException 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\t}\r\n\t\t}}", "@Override\n public void run() {\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }", "@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }", "public interface FileService {\n Map<String,Object> uploadPicure(MultipartFile upfile) throws IOException;\n}", "@Override\n\t\t\t\t\t\t\t\tpublic void complete(String key,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseInfo info, JSONObject response) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"上传图片成功了\");\n\t\t\t\t\t\t\t\t\tSystem.out.println(key + \" \" + info\n\t\t\t\t\t\t\t\t\t\t\t+ \" \" + response);\n\n\t\t\t\t\t\t\t\t\tfromToMessage.message = RequestUrl.QiniuHttp + imgFileKey;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"图片在服务器上的位置是:\"+fromToMessage.message);\n\t\t\t\t\t\t\t\t\tMessageDao.getInstance().updateMsgToDao(fromToMessage);\n\t\t\t\t\t\t\t\t\t//发送新消息给服务器\n\t\t\t\t\t\t\t\t\tHttpManager.newMsgToServer(sp.getString(\"connecTionId\", \"\"),\n\t\t\t\t\t\t\t\t\t\t\tfromToMessage, new NewMessageResponseHandler(fromToMessage));\n\t\t\t\t\t\t\t\t}", "public interface UploadsImService {\n @Multipart\n @POST(\"/api\")\n Single<ResponseBody> postImage(@Part MultipartBody.Part image);\n}", "public interface ImageService {\n\n void saveImageFile(Long recipeId, MultipartFile imageFile);\n}", "Path fileToUpload();", "private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }", "public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;", "public void addImage(Bitmap bm) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bm.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] bytes = stream.toByteArray();\n try {\n File file = new File(this.getCacheDir(), \"image.jpg\");\n file.createNewFile();\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(bytes);\n fos.flush();\n fos.close();\n RequestBody rb = RequestBody.create(MediaType.parse(\"multipart/form-data\"), file);\n MultipartBody.Part body = MultipartBody.Part.createFormData(\"files\", file.getName(), rb);\n Url url = new Url();\n Call<ImageFile> imgCall = url.createInstanceofRetrofit().uploadImage(body);\n imgCall.enqueue(new Callback<ImageFile>() {\n\n @Override\n public void onResponse(Call<ImageFile> call, Response<ImageFile> response) {\n venueimage.setText(response.body().getFilename());\n }\n\n @Override\n public void onFailure(Call<ImageFile> call, Throwable t) {\n Toast.makeText(VenueAdd.this, t.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n } catch (Exception e) {\n Toast.makeText(VenueAdd.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "private void postImage(String fid, final String fileName) {\n\t\tJSONObject jsObject = new JSONObject();\n\t\tSharedPreferences myPrefs = getActivity().getSharedPreferences(\"myPrefs\",getActivity().MODE_PRIVATE);\n\t\ttry {\n\n\t\t\tjsObject.put(\"field_image\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"fid\", fid))));\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcd = new ConnectionDetector(getActivity());\n\n\t\t// Check if Internet present\n\t\tif (!cd.isConnectingToInternet()) {\n\t\t\t// Internet Connection is not present\n\t\t\talert.showAlertDialog(getActivity(),\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to working Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}else{\n\t\t\tnew UpdateLike(jsObject,myPrefs){\n\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\tAppUtil.initializeProgressDialog(getActivity(), \"Finalizing post...\", progressDialog);\n\t\t\t\t};\n\t\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\t\tAppUtil.cancelProgressDialog();\n\t\t\t\t\tinfalteImageOnCoverPhoto(fileName);\n\t\t\t\t};\n\t\t\t}.execute(\"http://www1.kitchengardens.in/svc/node/\"+garden_node_id);\n\t\t}\n\t}", "public void uploadPictureToParkById(int id, MultipartFile multipartFile, boolean enablePublicReadAccess) {\n Optional<DogPark> dogPark = dogParkRepository.findById(id);\n\n if (dogPark.isPresent()) {\n\n //Create a new image to store the URL of the file that is being created\n Image image = new Image();\n\n //Creating the file\n String fileName = multipartFile.getOriginalFilename();\n\n try {\n //creating the file in the server (temporarily)\n File file = new File(fileName);\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(multipartFile.getBytes());\n fos.close();\n\n for (int i = -1; i < dogPark.get().getImages().size(); i++) {\n\n if (i == dogPark.get().getImages().size() - 1) {\n fileName = dogPark.get().getName() + \"/\" + dogPark.get().getName() + (i + 1) + \".\" + FilenameUtils.getExtension(fileName);\n }\n }\n\n //Set the URL to the new image and connect with the correct dog park and save it to the repository\n image.setUrl(\"https://dogparks.s3.amazonaws.com/\" + fileName);\n image.setDogpark(dogPark.get());\n imageRepository.save(image);\n\n //Add the image to the dog park\n dogPark.get().getImages().add(image);\n\n PutObjectRequest putObjectReqeust = new PutObjectRequest(this.awsS3AudioBucket, fileName, file);\n\n if (enablePublicReadAccess) {\n putObjectReqeust.withCannedAcl(CannedAccessControlList.PublicRead);\n }\n\n this.amazonS3.putObject(putObjectReqeust);\n\n } catch (IOException | AmazonServiceException ex) {\n logger.error(\"error [\" + ex.getMessage() + \"] occurred while uploading [\" + fileName + \"] \");\n }\n }\n else {\n throw new DogParkNotFoundException();\n }\n }", "private Integer uploadURL(URL url) {\n \t\ttry {\n \t\t\tString contentType = url.openConnection().getContentType();\n \t\t\tif (contentType == null || !contentType.startsWith(\"image/\")) {\n \t\t\t\treturn null;\n \t\t\t}\n \n \t\t\tString name = url.getPath().substring(1);\n \t\t\tif (contentType.contains(\"png\")) {\n \t\t\t\tname += \".png\";\n \t\t\t} else if (contentType.contains(\"jpg\")\n \t\t\t\t\t|| contentType.contains(\"jpeg\")) {\n \t\t\t\tname += \".jpg\";\n \t\t\t} else if (contentType.contains(\"gif\")) {\n \t\t\t\tname += \".gif\";\n \t\t\t}\n \n\t\t\treturn apiFactory.getFileAPI().uploadImage(url, name);\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \n \t\t\treturn null;\n \t\t}\n \t}", "private void uploadFromDataStorage() {\n }", "public void uploadImage(int pos) throws InterruptedException {\n\t}", "@Override\n public void uploadFailed() {\n }", "private void chooseImageAndUpload() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), Common.PICK_IMAGE_REQUEST);\n\n }", "UploadInfo simpleUpload(SimpleFile file);", "@POST\n @Path(\"{id}/coverupload\")\n @Consumes(MediaType.MULTIPART_FORM_DATA)\n public Response uploadAttach(@PathParam(\"id\") Integer id, MultipartFormDataInput newcover) {\n Map<String, List<InputPart>> uploadForm = newcover.getFormDataMap();\n // Get file data to save\n List<InputPart> inputParts = uploadForm.get(\"file\");\n String filename = null;\n for (InputPart inputPart : inputParts) {\n // convert the uploaded file to inputstream and write it to disk\n InputStream inputStream = null;\n OutputStream out = null;\n try {\n inputStream = inputPart.getBody(InputStream.class, null);\n List<String> contDisp = inputPart.getHeaders().get(\"Content-Disposition\");\n for (String cd : contDisp) {\n if (cd.contains(\"filename\")) {\n filename = \"cover.jpg\";\n LOGGER.info(\"FILENAME : \" + filename);\n }\n }\n String path = conf.getMovieFS() + id + \"/\";\n File pathtest = new File(path);\n if (!pathtest.exists()) {\n if (!pathtest.mkdirs()) {\n LOGGER.error(\"While saving cover : \"\n + \"unable to create repository tmp dir => \" + path);\n }\n }\n File up = new File(path + filename);\n if (!up.createNewFile()) {\n \tif (up.exists()) {\n \t\tup.delete();\n \t\tif (!up.createNewFile()) {\n LOGGER.error(\"While saving cover : \" + \"unable to overwrite existing file => \"\n + up.getAbsolutePath());\n \t\t}\n \t} else {\n LOGGER.error(\"While saving cover : \" + \"unable to create new file => \"\n + up.getAbsolutePath());\n \t}\n }\n out = new FileOutputStream(up);\n\n int read = 0;\n byte[] bytes = new byte[2048];\n while ((read = inputStream.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n inputStream.close();\n out.flush();\n out.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover : \", e);\n return Response.ok(new JsonSimpleResponse(false), MediaType.APPLICATION_JSON).build();\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover - closing inputstream : \", e);\n }\n }\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover - closing outputstream : \", e);\n }\n }\n }\n }\n return Response.ok(new JsonSimpleResponse(true), MediaType.APPLICATION_JSON).build();\n }", "@Override\n protected void onPostExecute(String msg) {\n params.add(new BasicNameValuePair(\"image\", encodedString));\n // Trigger Image upload\n new upload_image().execute();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, final Intent data)\n {\n if (requestCode == Constants.CAMERA_PIC_REQUEST && resultCode == RESULT_OK)\n {\n try\n {\n //setup variables to send to server\n //bytearraystring, filename, orientation\n file = photoFile;\n ExifInterface exifInterface = new ExifInterface(file.getAbsolutePath());\n orientation = exifInterface.getAttribute(ExifInterface.TAG_ORIENTATION);\n\n bitmap = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), capturedImageUri);\n\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byteArray = byteArrayOutputStream.toByteArray();\n byteArrayString = Base64.encodeToString(byteArray, Base64.DEFAULT);\n fileName = file.getName() + \".jpg\";\n\n //upload data\n new HttpTasks(UPLOAD_IMAGE).execute();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n if (requestCode == Constants.FILE_CHOOSER && resultCode == RESULT_OK)\n {\n try\n {\n //get exif orientation from original file\n ExifInterface exifInterface = new ExifInterface(FileUtils.getRealPathFromURI(this, data.getData()));\n orientation = exifInterface.getAttribute(ExifInterface.TAG_ORIENTATION);\n\n //filename needed to upload\n filepath = data.getData().getPath();\n File actualFile = new File(filepath);\n fileName = actualFile.getName() + \".jpg\";\n\n //create cached file container\n file = new File(userCacheDir + \"/\" + fileName);\n file.createNewFile();\n FileOutputStream out = new FileOutputStream(file);\n\n// upload byte array to online db\n //convert bitmap to a byte array\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), data.getData());\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byteArray = byteArrayOutputStream.toByteArray();\n byteArrayString = Base64.encodeToString(byteArray, Base64.DEFAULT);\n\n //write bytearray to file container\n out.write(byteArray);\n ExifInterface newFileExif = new ExifInterface(file.getAbsolutePath());\n newFileExif.setAttribute(ExifInterface.TAG_ORIENTATION, orientation);\n newFileExif.saveAttributes();\n byteArrayOutputStream.close();\n\n out.close();\n //upload data\n new HttpTasks(UPLOAD_IMAGE).execute();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "@RequestMapping(value = {\"/register\"}, method = RequestMethod.POST)\r\n public String registerUser(@Valid FileBucket fileBucket, BindingResult result,\r\n ModelMap model, HttpServletRequest req) {\r\n\r\n MultipartFile[] files = fileBucket.getFiles();\r\n String originalImgPath = \"\";\r\n String resizedImgPath = \"\";\r\n //String serverFileName = \"\";\r\n String photoName = \"\";\r\n String itemViewName = \"\";\r\n String imgLocation = \"\";\r\n int width = 580;\r\n int height = 450;\r\n boolean saved = false;\r\n String serverFileName = \"\";\r\n\r\n FileBucket fb = new FileBucket();\r\n User user = new User();\r\n if (result.hasErrors()) {\r\n return \"registration\";\r\n }\r\n if (files != null && files.length > 0) {\r\n for (int i = 0; i < files.length; i++) {\r\n try {\r\n\r\n byte[] bytes = null;\r\n // Creating the directory to store file\r\n String rootPath = System.getProperty(\"catalina.home\");\r\n File dir = new File(rootPath + File.separator + \"tmpFiles\");\r\n if (!dir.exists()) {\r\n dir.mkdirs();\r\n }\r\n\r\n FilenameUtils fileUTIL = new FilenameUtils();\r\n\r\n String path = req.getServletContext().getRealPath(\"/image\");\r\n //String ext = fileUTIL.getExtension(file.getOriginalFilename());\r\n //String baseName = fileUTIL.getBaseName(file.getOriginalFilename());\r\n\r\n imgLocation = dir + File.separator;\r\n // get files name in the array\r\n if (i == 0) {\r\n photoName = files[i].getOriginalFilename();\r\n bytes = files[i].getBytes();\r\n serverFileName = imgLocation + photoName;\r\n System.out.println(\"photoName:: \" + photoName);\r\n } else if (i == 1) {\r\n itemViewName = files[i].getOriginalFilename();\r\n bytes = files[i].getBytes();\r\n serverFileName = imgLocation + itemViewName;\r\n System.out.println(\"itemViewName:: \" + itemViewName);\r\n }\r\n\r\n System.out.println(\"serverFileName :: \" + serverFileName);\r\n\r\n // resize image\r\n //utility.resize(originalImgPath, resizedImgPath, width, height);\r\n //create the file on server\r\n File serverFile = new File(serverFileName);\r\n BufferedOutputStream stream = new BufferedOutputStream(\r\n new FileOutputStream(serverFile));\r\n stream.write(bytes);\r\n stream.close();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n //System.out.println(\"bytes ::\" + bytes);\r\n user.setFirstName(fileBucket.getFirstName());\r\n user.setLastName(fileBucket.getLastName());\r\n user.setPhoneNumber(fileBucket.getPhoneNumber());\r\n user.setItemView(fileBucket.getItemView());\r\n user.setAddress(fileBucket.getAddress());\r\n user.setPassportPhotograph(photoName);\r\n user.setImgLocation(imgLocation);\r\n user.setImgName(photoName);\r\n user.setImgItemName(itemViewName);\r\n\r\n saved = userService.saveUser(user);\r\n\r\n } else {\r\n System.out.println(\"File is empty / No image uploaded\");\r\n }\r\n\r\n //model.addAttribute(\"user\", user);\r\n model.addAttribute(\"user\", fb);\r\n //model.addAttribute(\"success\", \"User \" + user.getFirstName() + \" \" + user.getLastName() + \" saved successfully\");\r\n //model.addAttribute(\"saved\", saved);\r\n\r\n //return \"adduser\";\r\n //return \"redirect:/adduser\";\r\n return \"redirect:/register\";\r\n }", "private void postImg(File index) {\n FileInputStream imgIn = null;\n byte[] imgData = new byte[(int)index.length()];\n try {\n imgIn = new FileInputStream(index);\n imgIn.read(imgData);\n\n BufferedOutputStream imgOut = new BufferedOutputStream(connectionSocket.getOutputStream());\n\n\n out.println(OK);\n out.println(htmlType);\n out.println(closed);\n out.println(\"Content-Length: \" + index.length());\n out.write(ENDLINE);\n out.flush();\n imgOut.write(imgData, 0, (int)index.length());\n imgOut.flush();\n\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(AddingPlace.this,\"image uploaded successfully\",Toast.LENGTH_LONG).show();\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n\nthrows ServletException, IOException {\n\nresponse.setContentType(\"text/html;charset=UTF-8\");\n\ntry (PrintWriter out = response.getWriter()) {\n\n// this tyr is created by me for the connection of database\n\ntry {\n\n// this is the path provide by me to save the image\n\nString savePath = \"C:\\\\Users\\\\Ratnesh Pandey\\\\eclipse-workspace\\\\kw\\\\WebContent\\\\images\" + File.separator + SAVE_DIR;\n\n/*in place of C: you can place a path where you need to save the image*/\n\n// this comment will pickup the image file and have convert it into file type\n\nFile fileSaveDir = new File(savePath);\n\nif (!fileSaveDir.exists()) {\n\nfileSaveDir.mkdir();\n\n}\n\n// this two comment will take the name and image form web page\n\nString userid= request.getParameter(\"userid\");\nString Heading= request.getParameter(\"Heading\");\nString content = request.getParameter(\"content\");\nPart part = request.getPart(\"file\");\n\n// this comment will extract the file name of image\n\nString fileName = extractFileName(part);\n\n// this will print the image name and user provide name\n\n/*out.println(fileName);\n\nout.println(\"\\n\" + userid);*/\n\n/*if you may have more than one files with same name then you can calculate\n\nsome random characters and append that characters in fileName so that it will\n\nmake your each image name identical.*/\n\npart.write(savePath + File.separator + fileName);\n\n/*\n\nYou need this loop if you submitted more than one file\n\nfor (Part part : request.getParts()) {\n\nString fileName = extractFileName(part);\n\npart.write(savePath + File.separator + fileName);\n\n}*/\n\n// connection to database\n\nClass.forName(\"com.mysql.jdbc.Driver\");\n\nConnection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/users\", \"root\", \"speedoflightis3x108\");\n\n// query to insert name and image name\n\nString query = \"INSERT INTO users.contribution(userid,Heading,content,photourl) values (?, ?, ?, ?)\";\n\nPreparedStatement pst;\n\npst = con.prepareStatement(query);\n\npst.setString(1, userid);\npst.setString(2, Heading);\npst.setString(3, content);\n\nString filePath = savePath + File.separator + fileName;\n\npst.setString(4, filePath);\n\npst.executeUpdate();\nresponse.sendRedirect(\"Home(ak).jsp\");\n\n} catch (Exception ex) {\n\nout.println(\"error\" + ex);\n\n}\n\n}\n\n}", "public interface FileService {\n\n void saveDistinct(File file, MultipartFile fileData);\n\n String saveHeadImage(User user, MultipartFile file) throws Exception;\n\n\n}", "@Override\n public void onSuccess (UploadTask.TaskSnapshot taskSnapshot){\n Toast.makeText(IncomeActivity.this, \"Image uploaded successfully\",\n Toast.LENGTH_SHORT).show();\n }", "public interface ImageUploadService {\n\n public ResponseInfo uploadFile(UploadFileVo uploadFileVo) ;\n}", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tbyte image[] = Global.File2byte(pathImage);\r\n\t\t\t\r\n\t\t\tTransfer.uploadImage(image, new TransferListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onSucceed(JSONObject obj) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tLog.e(\"upload\",obj.toString());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onFail(String desc) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t Log.e(\"upload\",desc);\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "private void sendImage(byte[] arr){\n MediaManager.get().upload(arr).option(\"tags\", ConnectionUtils.IMAGE_TAG).callback(new UploadCallback() {\n @Override\n public void onStart(String requestId) {\n MessageUtils.toast(ImageActivity.this, \"Uploading Image!\", 0);\n }\n\n @Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n }\n\n @Override\n public void onSuccess(String requestId, Map resultData) {\n MessageUtils.toast(ImageActivity.this, \"Image Uploaded!\", 0);\n mImageView.setImageURI(null);\n mParent.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onError(String requestId, ErrorInfo error) {\n MessageUtils.toast(ImageActivity.this, error.getDescription(), 1);\n mParent.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onReschedule(String requestId, ErrorInfo error) {\n }\n }).dispatch();\n }", "public void uploadImage() {\n\t\tif (fileChooser.showOpenDialog(btnUploadImage) == JFileChooser.APPROVE_OPTION)\n\t\t\t;\n\n\t\tfileChooser.addChoosableFileFilter(new FileNameExtensionFilter(\"Images\", \"jpg\", \"png\", \"gif\", \"bmp\"));\n\t\tif (fileChooser.getSelectedFile() != null) {\n\t\t\timage = new ImageIcon(fileChooser.getSelectedFile().getAbsolutePath());\n\t\t\t// Resize image to 100x100\n\t\t\timg = image.getImage();\n\t\t\tImage newimg = img.getScaledInstance(100, 100, java.awt.Image.SCALE_SMOOTH);\n\t\t\timage = new ImageIcon(newimg);\n\t\t}\n\t}", "public void uploadObject() {\n\n\t}", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImageURI = data.getData();\r\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\r\n\r\n Cursor cursor = getContentResolver().query(selectedImageURI,\r\n filePathColumn, null, null, null);\r\n cursor.moveToFirst();\r\n\r\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\r\n String picturePath = cursor.getString(columnIndex);\r\n cursor.close();\r\n\r\n selectedImage.setVisibility(View.VISIBLE);\r\n selectedImage.setImageBitmap(BitmapFactory.decodeFile(picturePath));\r\n\r\n //get the bytes from image that will be uploaded\r\n selectedImage.setDrawingCacheEnabled(true);\r\n selectedImage.buildDrawingCache();\r\n Bitmap bitmap = ((BitmapDrawable) selectedImage.getDrawable()).getBitmap();\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\r\n imageBytes = baos.toByteArray();\r\n }\r\n }", "private void createUpdateImage(Item item) throws Exception {\r\n //cria a imagem\r\n new Image().saveImage(item.getImagem(), item.getNome());\r\n \t}", "@Test\n void readImage() throws Exception {\n ResultActions resultActions = mockMvc.perform(get(\"/v1/file/image-byte\")\n .param(\"name\", \"icon.jpg\")\n .contentType(MediaType.TEXT_PLAIN_VALUE))\n .andDo(resultHandler -> {\n String path = writeFile(resultHandler.getResponse().getContentAsByteArray(), \".jpg\");\n logger.debug(\"Image File recorded locally at: \" + path);\n }\n );\n\n resultActions\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.IMAGE_JPEG_VALUE))\n ;\n }", "UploadInfo advancedUpload(AdvanceFile file);", "public void mo38841a(ImagesRequest imagesRequest) {\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n try {\n\n if (requestCode == RESULT_LOAD_ARTIST_IMAGE && resultCode == RESULT_OK && null != data) {\n\n selectedImage = data.getData();\n imageToUpload.setImageURI(selectedImage);\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);\n\n isPicture = true;\n } else {\n Toast.makeText(this, R.string.noImagePicked, Toast.LENGTH_LONG).show();\n }\n }catch (Exception e ){\n Log.e(\"error\", e.toString());\n Toast.makeText(this, R.string.stgWentWrong, Toast.LENGTH_LONG).show();\n }\n\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "public void createRecipeImage(FileUploadEvent event) {\r\n Image newImage = new Image();\r\n String destination = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\r\n String getParam = qm.get(\"recipeId\");\r\n Integer recipeID = Integer.parseInt(getParam);\r\n this.recipe = recipesEJB.findRecipe(recipeID);\r\n File file = new File(destination+\"uploads\"+File.separator+\"recipe\"+File.separator+recipeID);\r\n String abspath = file.getAbsolutePath()+ File.separator;\r\n if(!file.exists()){\r\n if(file.mkdirs());\r\n }\r\n //new name of the image\r\n List <Image> recipeImages = this.recipe.getImageGallery();\r\n Integer count = recipeImages.size();\r\n\r\n if(this.recipe.getImageGallery().get(0).getImagePath().equalsIgnoreCase(\"/resources/images/recipe_placeholder.png\") && count == 1){\r\n imageEJB.removeImage(this.recipe.getImageGallery().get(0));\r\n this.recipe.getImageGallery().remove(0);\r\n }else {\r\n count++;\r\n }\r\n String newImageName;\r\n if (event.getFile().getContentType().equalsIgnoreCase(\"image/jpeg\")) {\r\n newImageName = count + \".jpeg\";\r\n } else if (event.getFile().getContentType().equalsIgnoreCase(\"image/gif\")) {\r\n newImageName = count + \".gif\";\r\n } else {\r\n newImageName = count + \".png\";\r\n }\r\n // Do what you want with the file \r\n String newImagePath = \"/uploads/recipe/\"+recipeID+\"/\"+newImageName;\r\n try {\r\n copyFile(abspath,newImageName, event.getFile().getInputstream()); \r\n newImage = this.imageEJB.createImage(newImage);\r\n newImage.setCaption(\"This is the \"+this.recipe.getRecipeName()+\"'s recipe picture.\");\r\n newImage.setDescription(newImageName);\r\n newImage.setRecipe(this.recipe);\r\n newImage.setImagePath(newImagePath);\r\n newImage.setImageName(newImageName);\r\n newImage = this.imageEJB.editImage(newImage);\r\n this.recipe.getImageGallery().add(newImage);\r\n this.recipe = recipesEJB.editRecipe(recipe);\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Success!\", \"Your image was uploaded successfully.\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public String guardarImgPost(){\n \n File archivo=null;//Objeto para el manejo de os archivos\n InputStream in =null;//Objeto para el manejo del stream de datos del archivo\n //Se obtiene el codigo de usuario de la sesion actual\n String codUsuario=codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Se obtiene un codigo producto de la combinacion del codigo del usuario y de un numero aleatorio\n String codGenerado=new Utiles().generar(codUsuario);\n String extension=\"\";\n int i=0;\n //Extension del archivo ha subir\n extension=\".\"+FilenameUtils.getExtension(this.getObjImagen().getImagen().getFileName());\n \n \n try {\n //Pasa el buffer de datos en un array de bytes , finalmente lee cada uno de los bytes\n in=this.getObjImagen().getImagen().getInputstream();\n byte[] data=new byte[in.available()];\n in.read(data);\n \n //Crea un archivo en la ruta de publicacion\n archivo=new File(this.rutaImgPublicacion+codGenerado+extension);\n FileOutputStream out=new FileOutputStream(archivo);\n //Escribe los datos en el nuevo archivo creado\n out.write(data);\n \n System.out.println(\"Ruta de Path Absolute\");\n System.out.println(archivo.getAbsolutePath());\n \n //Cierra todas las conexiones\n in.close();\n out.flush();\n out.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n return \"none.jpg\";\n }\n //Retorna el nombre de la iamgen almacenada\n return codGenerado+extension;\n }", "public void addPicture() {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Upload your pic for this post\");\n file = chooser.showOpenDialog(null);\n if (file != null) {\n\n Image profilePicImage = new Image(file.toURI().toString());\n try {\n this.postPic = new FileInputStream(file).readAllBytes();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n postImage.setImage(profilePicImage);\n }\n }", "@FormUrlEncoded\n @POST(\"upload.php\")\n Call<ImageClass> uploadImage(@Field(\"title\") String title, @Field(\"image\") String image);", "public void uploadTemp(FileUploadEvent event) {\n setFileImage(event.getFile());\n getSelected().setUrlImage(event.getFile().getFileName());\n RequestContext.getCurrentInstance().update(\"image\");\n\n }", "@RequestMapping(\"/add\")\n @ResponseBody\n public String handleFileUpload(@RequestParam(\"file\") MultipartFile file) {\n String path = \"C:\\\\Users\\\\Administrator\\\\Desktop\\\\lostfound\\\\static\\\\img\";\n String fileName = file.getOriginalFilename();\n Calendar currTime = Calendar.getInstance();\n String time = String.valueOf(currTime.get(Calendar.YEAR))+String.valueOf((currTime.get(Calendar.MONTH)+1));\n String suffix = fileName.substring(file.getOriginalFilename().lastIndexOf(\".\"));\n suffix = suffix.toLowerCase();\n if(suffix.equals(\".jpg\") || suffix.equals(\".jpeg\") || suffix.equals(\".png\")){\n fileName = UUID.randomUUID().toString()+suffix;\n File targetFile = new File(path, fileName);\n if(!targetFile.getParentFile().exists()){\n targetFile.getParentFile().mkdirs();\n }\n long size = 0;\n try {\n file.transferTo(targetFile);\n size = file.getSize();\n } catch (Exception e) {\n e.printStackTrace();\n return\"上传失败\";\n }\n String fileUrl=\"/static\";\n fileUrl = fileUrl + \"/img/\" + fileName;\n return fileUrl;\n }else{\n return \"上传失败\";\n }\n }", "@RequestMapping(value = {\"/edit-user-{id}\"}, method = RequestMethod.POST)\r\n public String updateUser(@Valid FileBucket fileBucket, BindingResult result,\r\n ModelMap model, @PathVariable String id, HttpServletRequest req) {\r\n\r\n MultipartFile[] files = fileBucket.getFiles();\r\n String originalImgPath = \"\";\r\n String resizedImgPath = \"\";\r\n //String serverFileName = \"\";\r\n String photoName = \"\";\r\n String itemViewName = \"\";\r\n String imgLocation = \"\";\r\n int width = 580;\r\n int height = 450;\r\n boolean saved = false;\r\n String serverFileName = \"\";\r\n\r\n FileBucket fb = new FileBucket();\r\n User user = new User();\r\n if (result.hasErrors()) {\r\n return \"registration\";\r\n }\r\n if (files != null && files.length > 0) {\r\n for (int i = 0; i < files.length; i++) {\r\n try {\r\n\r\n byte[] bytes = null;\r\n // Creating the directory to store file\r\n String rootPath = System.getProperty(\"catalina.home\");\r\n File dir = new File(rootPath + File.separator + \"tmpFiles\");\r\n if (!dir.exists()) {\r\n dir.mkdirs();\r\n }\r\n\r\n FilenameUtils fileUTIL = new FilenameUtils();\r\n\r\n String path = req.getServletContext().getRealPath(\"/image\");\r\n //String ext = fileUTIL.getExtension(file.getOriginalFilename());\r\n //String baseName = fileUTIL.getBaseName(file.getOriginalFilename());\r\n\r\n imgLocation = dir + File.separator;\r\n // get files name in the array\r\n if (i == 0) {\r\n photoName = files[i].getOriginalFilename();\r\n bytes = files[i].getBytes();\r\n serverFileName = imgLocation + photoName;\r\n System.out.println(\"photoName:: \" + photoName);\r\n } else if (i == 1) {\r\n itemViewName = files[i].getOriginalFilename();\r\n bytes = files[i].getBytes();\r\n serverFileName = imgLocation + itemViewName;\r\n System.out.println(\"itemViewName:: \" + itemViewName);\r\n }\r\n\r\n System.out.println(\"serverFileName :: \" + serverFileName);\r\n\r\n // resize image\r\n //utility.resize(originalImgPath, resizedImgPath, width, height);\r\n //create the file on server\r\n File serverFile = new File(serverFileName);\r\n BufferedOutputStream stream = new BufferedOutputStream(\r\n new FileOutputStream(serverFile));\r\n stream.write(bytes);\r\n stream.close();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n System.out.println(\"fileBucket.getPhoneNumber() ::\" + fileBucket.getPhoneNumber());\r\n user.setId(fileBucket.getId());\r\n user.setFirstName(fileBucket.getFirstName());\r\n user.setLastName(fileBucket.getLastName());\r\n user.setPhoneNumber(fileBucket.getPhoneNumber());\r\n user.setItemView(fileBucket.getItemView());\r\n user.setAddress(fileBucket.getAddress());\r\n user.setPassportPhotograph(photoName);\r\n user.setImgLocation(imgLocation);\r\n user.setImgName(photoName);\r\n user.setImgItemName(itemViewName);\r\n\r\n saved = userService.updateUser(user);\r\n\r\n } else {\r\n System.out.println(\"File is empty / No image uploaded\");\r\n }\r\n\r\n //model.addAttribute(\"user\", user);\r\n model.addAttribute(\"user\", fb);\r\n // model.addAttribute(\"success\", \"User \" + user.getFirstName() + \" \" + user.getLastName() + \" saved successfully\");\r\n // model.addAttribute(\"saved\", saved);\r\n\r\n //return \"adduser\";\r\n \r\n return \"redirect:/register\";\r\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "java.lang.String getImage();", "public abstract String getFotoPath();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n try {\n // When an Image is picked\n if (requestCode == RESULT_LOAD_IMG && resultCode == RESULT_OK\n && null != data) {\n // Get the Image from data\n checkbit = 1;\n Uri selectedImage = data.getData();\n bitmap = scaleImage(this,selectedImage);\n origmap = bitmap;\n\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n // Get the cursor\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n // Move to first row\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n imgPath = cursor.getString(columnIndex);\n cursor.close();\n imgView.setImageBitmap(bitmap);\n\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n int amorpmint = c.get(Calendar.AM_PM);\n String amorpm;\n if (amorpmint == 0)\n {\n amorpm = \"AM\";\n } else {\n amorpm = \"PM\";\n }\n\n lastUpdated = df.format(c.getTime()) + \" \" + amorpm;\n SimpleDateFormat timef = new SimpleDateFormat(\"HH:mm\");\n time = timef.format(c.getTime()) + \" \" + amorpm;\n\n fileName = user + \"orig\";\n params = new ArrayList<>();\n // Put file name in Async Http Post Param which will used in Php web app\n params.add(new BasicNameValuePair(\"filename\", fileName));\n params.add(new BasicNameValuePair(\"username\", user));\n params.add(new BasicNameValuePair(\"Time\", time));\n params.add(new BasicNameValuePair(\"LastUpdated\", lastUpdated));\n\n } else {\n Toast.makeText(this, \"You haven't picked Image\",\n Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n Toast.makeText(this, \"Something went wrong\", Toast.LENGTH_LONG)\n .show();\n }\n\n }", "private void createNewImage(final String token, final GMImage image) throws JSONException {\n httpRequest.createImage(token, image.getJson().toString()).enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> res) {\n if (res.code() == 200) /* OK */ {\n // change sync state to modified\n image.setSyncState(GMTable.GMSyncState.SYNC);\n dbHelper.update(image);\n\n // notify\n notifyUploadSuccess();\n\n } else {\n notifyUploadFail();\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n t.printStackTrace();\n\n // notify fail after retry reach limit\n if (((Integer) image.getTag(TAG_RETRY)) >= GMGlobal.RETRY_LIMIT) {\n notifyUploadFail();\n }\n\n // retry upload image information\n new Retry() {\n @Override\n protected void handle(Object... params) {\n try {\n createNewImage((String) params[0], (GMImage) params[1]);\n } catch (JSONException e) {\n e.printStackTrace();\n notifyUploadFail();\n }\n }\n }.execute(token, image);\n }\n });\n }", "private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {\n String []imageTypes = new String[]{\".jpg\", \".png\", \".gif\"};\n\n if (imageFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n getFileLocation = imageFileChooser.getSelectedFile();\n\n String getImageType = getFileLocation.getName();\n getImageType = getImageType.substring(getImageType.indexOf(\".\"));\n\n if (checkImageType(getImageType, imageTypes)) {\n\n lblImage.setIcon( new ImageIcon(new ImageIcon(getFileLocation.getAbsolutePath()).getImage().getScaledInstance(lblImage.getWidth(), lblImage.getHeight(), Image.SCALE_DEFAULT)));\n txtfImageLocation2.setText(getFileLocation.getName());\n\n } else {\n JOptionPane.showMessageDialog(this, \"invalid file type\", \"upload\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(this, \"upload an image\", \"upload \", JOptionPane.ERROR_MESSAGE);\n }\n }", "public interface FileEngin {\n\n /**\n * 上传图片\n * @param fileList\n * @return\n */\n public String uploadImage(List<File> fileList);\n}", "@Override\n public int getUploaded() {\n return 0;\n }", "@RequestMapping(value = \"view/{menuId}\", method = RequestMethod.POST)\n public String imageupload(Model model, @PathVariable int menuId, @RequestParam(\"uploadFile\") MultipartFile uploadFile,\n RedirectAttributes redirectAttributes) {\n\n\n\n Menu menu = menuDao.findOne(menuId);\n model.addAttribute(\"title\", menu.getName());\n model.addAttribute(\"cheeses\", menu.getCheeses());\n model.addAttribute(\"menuId\", menu.getId());\n //add photo upload coding here.\n\n //need to get the file into the input stream.\n //String filename = uploadFile.toString();\n //uploadFile.getOriginalFilename();\n //File filename = new FileInputStream(uploadFile1);\n //String uploadFilename = uploadFile.getOriginalFilename();\n //Session session = sessionFactory.getSessionFactory().getCurrentSession();\n //File uploadfile = new File(uploadfile);\n //Blob fileblob = Hibernate.getLobCreator(session).createBlob(filename.getBytes()); //new FileInputStream(uploadfile), file1.length()\n\n //model.addAttribute(\"imagefile\",uploadFile.getOriginalFilename());\n //System.out.println(\"File is:\" + uploadfile.getOriginalFilename());\n\n return \"\";\n }", "public void uploadMultipart(String path, final String name) {\n //getting name for the image\n // String name = editText.getText().toString().trim();\n\n //getting the actual path of the image\n // String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, UPLOAD_URL)\n .addFileToUpload(path, \"image\") //Adding file\n .addParameter(\"name\", name) //Adding text parameter to the request\n .addParameter(\"alert\", mAlertId) //Adding text parameter to the request\n .addParameter(\"device\",\n android.os.Build.MODEL) //Adding text parameter to the request\n .addParameter(\"title\", currentCaptureDirectory.getName())\n .setNotificationConfig(new UploadNotificationConfig()).setMaxRetries(2)\n .setDelegate(new UploadStatusDelegate() {\n @Override\n public void onProgress(Context context, UploadInfo uploadInfo) {\n // your code here\n }\n\n @Override\n public void onError(Context context, UploadInfo uploadInfo,\n Exception exception) {\n // your code here\n }\n\n @Override\n public void onCompleted(Context context, UploadInfo uploadInfo,\n ServerResponse serverResponse) {\n Log.i(\" _ \", \" \");\n Log.d(TAG, \"JSON RESPONSE::: \" + serverResponse.toString());\n Log.d(TAG, \"JSON RESPONSE::: \" + serverResponse.getBodyAsString());\n Log.i(\" _ \", \" \");\n\n File photo = new File(currentCaptureDirectory, name);\n if (photo.exists()) photo.delete();\n\n if (mSendEmail) {\n mSendEmail = false;\n mEmailResetHandler.removeCallbacks(emailResetRunnable);\n mEmailResetHandler.postDelayed(emailResetRunnable, 1000 * 600);\n String link = mServerUrl + \"sendEmail.php?device=\" + mDeviceName +\n \"&name=\" + name + \"&title=\" +\n currentCaptureDirectory.getName();\n new updateData().execute(link);\n\n String link2 = mServerUrl + \"init.php?device=\" + mDeviceName;\n new updateData().execute(link2);\n\n mHandler.postDelayed(runnable, 6000);\n }\n\n // your code here\n // if you have mapped your server response to a POJO, you can easily get it:\n // YourClass obj = new Gson().fromJson(serverResponse.getBodyAsString(), YourClass.class);\n // File photo = new File(Environment.getExternalStorageDirectory(), name + \".jpg\");\n // if (photo.exists()) photo.delete();\n }\n\n @Override\n public void onCancelled(Context context, UploadInfo uploadInfo) {\n // your code here\n }\n }).startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Log.i(TAG, exc.getMessage());\n }\n }", "public void prepareData() throws Exception {\n for (int i = 0; i < this.f4804b.length; i++) {\n try {\n byte[] readFile = FileUtil.readFile(this.f4804b[i]);\n addPart(new String[]{String.format(\"Content-Disposition: form-data; name=\\\"%s_%d\\\"; filename=\\\"%s_%d.jpg\\\"\", new Object[]{this.f4803a, Integer.valueOf(i), this.f4803a, Integer.valueOf(i)}), \"Content-Type: image/webp\", String.format(\"Content-Length: %d\", new Object[]{Integer.valueOf(readFile.length)})}, readFile);\n } catch (IOException e) {\n }\n }\n }", "public static String uploadImage(Bitmap bitmap, String serverUri,\n String serverFolderUploads) {\n\n HttpURLConnection connection = null;\n DataOutputStream outputStream = null;\n\n String urlServer = serverUri;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n String charset = \"UTF-8\";\n String videoName;\n byte[] buffer;\n try {\n\n URL url = new URL(urlServer);\n connection = (HttpURLConnection) url.openConnection();\n\n // Allow Inputs & Outputs\n connection.setDoInput(true);\n connection.setDoOutput(true);\n connection.setUseCaches(false);\n\n videoName = UUID.randomUUID().toString() + \".mp4\";\n\n // Enable POST method\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"Accept-Charset\", charset);\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\",\n \"multipart/form-data;boundary=\" + boundary);\n\n outputStream = new DataOutputStream(connection.getOutputStream());\n outputStream.writeBytes(twoHyphens + boundary + lineEnd);\n outputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"\"\n + serverFolderUploads + \"\\\"\" + \"; filename=\\\"\" + videoName\n + \"\\\"\" + lineEnd);\n outputStream.writeBytes(lineEnd);\n\n buffer = ConvertBitMapToByteArray(bitmap);\n try {\n outputStream.write(buffer, 0, (int) getSizeInBytes(bitmap));\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n outputStream.writeBytes(lineEnd);\n outputStream.writeBytes(twoHyphens + boundary + twoHyphens\n + lineEnd);\n\n // Responses from the server (code and message)\n int serverResponseCode = connection.getResponseCode();\n String serverResponseMessage = connection.getResponseMessage();\n outputStream.flush();\n outputStream.close();\n if (serverResponseCode == 200 && serverResponseMessage.equals(\"OK\"))\n return videoName;\n else\n return \"\";\n } catch (Exception e) {\n e.printStackTrace();\n return \"\";\n }\n }", "private void uploadImage(final Bitmap bitmap) {\n if(bitmap!=null) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView responseText = findViewById(R.id.responseText);\n responseText.setText(\"Loading diagnosis...\");\n }\n });\n }\n\n VolleyMultipartRequest volleyMultipartRequest = new VolleyMultipartRequest(Request.Method.POST, URL,\n new Response.Listener<NetworkResponse>() {\n @Override\n public void onResponse(final NetworkResponse response) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n TextView responseText = findViewById(R.id.responseText);\n responseText.setText(json);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n e.getMessage();\n }\n }\n });\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"GotError\",\"\"+error.getMessage());\n }\n }) {\n\n\n @Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"image\", new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }\n };\n\n volleyMultipartRequest.setRetryPolicy(new DefaultRetryPolicy(0, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n //adding the request to volley\n Volley.newRequestQueue(this).add(volleyMultipartRequest);\n }", "boolean uploadImage() {\r\n\t\tJFileChooser inImg = new JFileChooser();\r\n\t\tint approved = inImg.showOpenDialog(mainFrame);\r\n\t\tif (approved == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile imf = inImg.getSelectedFile();\r\n\t\t\ttry {\r\n\t\t\t\talbum.put(album.size(), new Image(imf.getPath()));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Invalid File Path\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tmodel.addElement(album.get(album.size() - 1));\r\n\t\t\talbumList.setModel(model);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(DetailsForm.this, \"Image Uploaded Successfully\", Toast.LENGTH_LONG).show();\n }", "public void ImageUploadToServerFunction(){\r\n\r\n ByteArrayOutputStream byteArrayOutputStreamObject ;\r\n\r\n byteArrayOutputStreamObject = new ByteArrayOutputStream();\r\n\r\n // Converting bitmap image to jpeg format, so by default image will upload in jpeg format.\r\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStreamObject);\r\n\r\n byte[] byteArrayVar = byteArrayOutputStreamObject.toByteArray();\r\n\r\n final String ConvertImage = Base64.encodeToString(byteArrayVar, Base64.DEFAULT);\r\n\r\n class AsyncTaskUploadClass extends AsyncTask<Void,Void,String> {\r\n\r\n @Override\r\n protected void onPreExecute() {\r\n\r\n super.onPreExecute();\r\n\r\n // Showing progress dialog at image upload time.\r\n progressDialog = ProgressDialog.show(MakeRequestActivity.this,\"Image is Uploading\",\"Please Wait\",false,false);\r\n }\r\n\r\n @Override\r\n protected void onPostExecute(String string1) {\r\n\r\n super.onPostExecute(string1);\r\n\r\n // Dismiss the progress dialog after done uploading.\r\n progressDialog.dismiss();\r\n\r\n // Printing uploading success message coming from server on android app.\r\n Toast.makeText(MakeRequestActivity.this,string1,Toast.LENGTH_LONG).show();\r\n\r\n // Setting image as transparent after done uploading.\r\n postImage.setImageResource(android.R.color.transparent);\r\n\r\n\r\n }\r\n\r\n @Override\r\n protected String doInBackground(Void... params) {\r\n\r\n ImageProcessClass imageProcessClass = new ImageProcessClass();\r\n\r\n HashMap<String,String> HashMapParams = new HashMap<String,String>();\r\n\r\n HashMapParams.put(ImageNameFieldOnServer, GetImageNameFromEditText);\r\n\r\n HashMapParams.put(ImagePathFieldOnServer, ConvertImage);\r\n\r\n String FinalData = imageProcessClass.ImageHttpRequest(ImageUploadPathOnSever, HashMapParams);\r\n\r\n return FinalData;\r\n }\r\n }\r\n AsyncTaskUploadClass AsyncTaskUploadClassOBJ = new AsyncTaskUploadClass();\r\n\r\n AsyncTaskUploadClassOBJ.execute();\r\n }" ]
[ "0.68450016", "0.6574269", "0.65447223", "0.6417331", "0.6408286", "0.63889235", "0.6379927", "0.63696784", "0.63642883", "0.6360883", "0.6311289", "0.6290058", "0.627103", "0.6270475", "0.62668365", "0.6249821", "0.6248481", "0.62338305", "0.6212367", "0.6197936", "0.61870974", "0.6184834", "0.6134509", "0.6130915", "0.61225843", "0.61039174", "0.6095718", "0.6093395", "0.60871047", "0.6086883", "0.6086883", "0.6086447", "0.6077835", "0.6073547", "0.6070094", "0.6062999", "0.60571283", "0.60494566", "0.6044861", "0.60308975", "0.60303533", "0.6028956", "0.6018462", "0.601364", "0.6011842", "0.60108554", "0.60004103", "0.599835", "0.59923375", "0.5988586", "0.5973236", "0.5969883", "0.5961945", "0.594781", "0.59472305", "0.5929306", "0.59285814", "0.59275657", "0.5918339", "0.59116036", "0.5907072", "0.5886246", "0.58794355", "0.58793426", "0.58748597", "0.58732516", "0.587078", "0.58659554", "0.586528", "0.5858095", "0.5857338", "0.5856293", "0.58546644", "0.58542347", "0.5846838", "0.58406216", "0.5840258", "0.5836613", "0.58357507", "0.58338064", "0.5826945", "0.5825528", "0.5824112", "0.5823892", "0.58201146", "0.58178514", "0.5817669", "0.58122873", "0.58093053", "0.58041203", "0.580301", "0.58005136", "0.58004236", "0.57922584", "0.5792175", "0.57920986", "0.5781834", "0.5774464", "0.57731557", "0.57685775", "0.5763635" ]
0.0
-1
Generate all rulers map. Generate a HashMap(Emblem, Kingdom) such that String denotes emblem and Kingdom denotes object of the Kingdom with Cipher generated for its AnimalName
public Map<String, Kingdom> generateAllRulers() { Map<String, String> kingdomWithAnimal; kingdomWithAnimal = kingdomRepository.getRulersWithAnimal(); Map<String, Kingdom> kingdoms = new HashMap<>(); for (String emblem : kingdomWithAnimal.keySet()) { Kingdom kingdom = new Kingdom(emblem, kingdomWithAnimal.get(emblem)); kingdom.makeCipherFromAnimalName(); kingdoms.put(emblem, kingdom); } return kingdoms; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TreeMap<Character, Character> generateMap() {\r\n this.charMap = new TreeMap<Character, Character>();\r\n // generates an array of characters representing the alphabet\r\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\r\n\r\n for (int i=0; i<26; i++) {\r\n this.charMap.put(alphabet[i], alphabet[(i+key) % 26]);\r\n }\r\n\r\n return this.charMap;\r\n }", "private void calculateNGrams() {\n\t\t\n\t\t\n\t\t// determine n grams\n\t\tSet<Suffix> cityNames = properties.getCityNames();\n\t\tfor (Suffix cityName : cityNames) {\n\t\t\tString str = cityName.getStr();\n\t\t\tchar[] letters = new char[str.length()+4];\n\t\t\tletters[0] = sow;\n\t\t\tletters[1] = sow;\n\t\t\tletters[letters.length-2] = eow;\n\t\t\tletters[letters.length-1] = eow;\t\t\t\n\t\t\tstr.getChars(0, str.length(), letters, 2);\n\t\t\t\n\t\t\t// iterate over the letters of a city name\n\t\t\tfor (int i=2; i<letters.length; i++) {\n\t\t\t\t// 1: letter distribution (eow's are ignored)\n\t\t\t\tif (i < letters.length - 2) {\n\t\t\t\t\tInteger oldValueLetter = this.letterDistribution.get(letters[i]);\n\t\t\t\t\tif (oldValueLetter == null)\t\t\t\t\t\n\t\t\t\t\t\tthis.letterDistribution.put(letters[i], 1); // add the the new letter to the distribution\n\t\t\t\t\telse\t\t\t\t\t\n\t\t\t\t\t\tthis.letterDistribution.put(letters[i], oldValueLetter + 1); // increment counter\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t// 2: bigram distribution ([eow, eow] is ignored)\n\t\t\t\tif (i < letters.length - 1) {\n\t\t\t\t\tchar[] bigramArray = {letters[i-1], letters[i]};\n\t\t\t\t\tString bigram = String.copyValueOf(bigramArray);\n\t\t\t\t\tInteger oldValueBigram = this.bigramDistribution.get(bigram);\n\t\t\t\t\tif (oldValueBigram == null)\n\t\t\t\t\t\tthis.bigramDistribution.put(bigram, 1); // add the new bigram to the distribution\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.bigramDistribution.put(bigram, oldValueBigram + 1); // increment counter\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t// 3: trigram distribution\n\t\t\t\tchar[] trigramArray = {letters[i-2], letters[i-1], letters[i]};\n\t\t\t\tString trigram = String.copyValueOf(trigramArray);\n\t\t\t\tInteger oldValueTrigram = this.trigramDistribution.get(trigram);\n\t\t\t\tif (oldValueTrigram == null)\n\t\t\t\t\tthis.trigramDistribution.put(trigram, 1); // add the new trgram to the distribution\n\t\t\t\telse\n\t\t\t\t\tthis.trigramDistribution.put(trigram, oldValueTrigram + 1); // increment counter\n\t\t\t\t\n\t\t\t} // end iteration over letters\n\t\t\t\n\t\t\tthis.numberLetterTokens += str.length();\n\t\t\tthis.numberBigramTokens += str.length() + 1;\n\t\t\tthis.numberTrigramTokens += str.length() + 2;\n\t\t} // end iteration over city names\n\t}", "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 }", "public static void main(String[] args) {\n\r\n\t\tHashMap<String, String> diccionario = new HashMap<String, String>();\r\n\t\t\r\n\t\tdiccionario.put(\"hola\", \"hello\");\r\n\t\tdiccionario.put(\"perro\", \"dog\");\r\n\t\tdiccionario.put(\"gato\", \"cat\");\r\n\t\tdiccionario.put(\"antes\", \"before\");\r\n\t\tdiccionario.put(\"que\", \"what\");\r\n\t\tdiccionario.put(\"pantalla\", \"screen\");\r\n\t\tdiccionario.put(\"teclado\", \"keyboard\");\r\n\t\tdiccionario.put(\"raton\", \"mouse\");\r\n\t\tdiccionario.put(\"mochila\", \"bag\");\r\n\t\tdiccionario.put(\"puerta\", \"door\");\r\n\t\tdiccionario.put(\"clase\", \"class\");\r\n\t\tdiccionario.put(\"coche\", \"car\");\r\n\t\tdiccionario.put(\"pantalones\", \"trousers\");\r\n\t\tdiccionario.put(\"sombrero\", \"hat\");\r\n\t\tdiccionario.put(\"escaleras\", \"stairs\");\r\n\t\tdiccionario.put(\"mesa\", \"table\");\r\n\t\tdiccionario.put(\"silla\", \"chair\");\r\n\t\tdiccionario.put(\"hermano\", \"brother\");\r\n\t\tdiccionario.put(\"hermana\", \"sister\");\r\n\t\tdiccionario.put(\"padre\", \"father\");\r\n\t\tdiccionario.put(\"madre\", \"mother\");\r\n\t\t\r\n\t\tint contador = 0;\r\n\t\tint correctas = 0;\r\n\t\tint incorrectas = 0;\r\n\t\tString respuesta;\r\n\t\t\r\n\t\t//para recorrer un map fijándonos en el valor de la posición ...\r\n\t\t\r\n\t\tfor(int i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tint opcion = (int)(Math.random()*21); //21 palabras\r\n\r\n\t Iterator<String> it = diccionario.keySet().iterator();\r\n\t \r\n\t while(it.hasNext()){\r\n\t \r\n\t String obj = it.next();\r\n\t \r\n\t if(contador == opcion) {\r\n\t \tSystem.out.println(\"¿Cuál es la traducción de \"+obj+\"?\");\r\n\t \trespuesta = sc.next();\r\n\t \t\r\n\t \tif(respuesta.equalsIgnoreCase(diccionario.get(obj))) {\r\n\t \t\tSystem.out.println(\"Correcto!!\");\r\n\t \t\tcorrectas ++;\r\n\t \t\r\n\t \t}else {\r\n\t \t\tSystem.out.println(\"Ohh, incorrecto!!\");\r\n\t \t\tincorrectas ++;\r\n\t \t}\r\n\t }\r\n\t contador++;\r\n\t }\r\n\t contador = 0;\r\n\t\t}\r\n\t\t//////////////////////////////////////////////////////////////////////\r\n\t\t\r\n\t\tSystem.out.println(\"Has acertado \"+correctas+\" y has fallado \"+incorrectas);\r\n\t}", "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}", "private void initializeMaps() {\n\tcodon1 = new HashMap<String,String>();\n\tcodon3 = new HashMap<String,String>();\n\tiupac = new HashMap<String,String>();\n\t\n\tcodon1.put(\"AAA\",\"K\");\n\tcodon1.put(\"AAC\",\"N\");\n\tcodon1.put(\"AAG\",\"K\");\n\tcodon1.put(\"AAT\",\"N\");\n\tcodon1.put(\"ACA\",\"T\");\n\tcodon1.put(\"ACC\",\"T\");\n\tcodon1.put(\"ACG\",\"T\");\n\tcodon1.put(\"ACT\",\"T\");\n\tcodon1.put(\"AGA\",\"R\");\n\tcodon1.put(\"AGC\",\"S\");\n\tcodon1.put(\"AGG\",\"R\");\n\tcodon1.put(\"AGT\",\"S\");\n\tcodon1.put(\"ATA\",\"I\");\n\tcodon1.put(\"ATC\",\"I\");\n\tcodon1.put(\"ATG\",\"M\");\n\tcodon1.put(\"ATT\",\"I\");\n\tcodon1.put(\"CAA\",\"Q\");\n\tcodon1.put(\"CAC\",\"H\");\n\tcodon1.put(\"CAG\",\"Q\");\n\tcodon1.put(\"CAT\",\"H\");\n\tcodon1.put(\"CCA\",\"P\");\n\tcodon1.put(\"CCC\",\"P\");\n\tcodon1.put(\"CCG\",\"P\");\n\tcodon1.put(\"CCT\",\"P\");\n\tcodon1.put(\"CGA\",\"R\");\n\tcodon1.put(\"CGC\",\"R\");\n\tcodon1.put(\"CGG\",\"R\");\n\tcodon1.put(\"CGT\",\"R\");\n\tcodon1.put(\"CTA\",\"L\");\n\tcodon1.put(\"CTC\",\"L\");\n\tcodon1.put(\"CTG\",\"L\");\n\tcodon1.put(\"CTT\",\"L\");\n\tcodon1.put(\"GAA\",\"E\");\n\tcodon1.put(\"GAC\",\"D\");\n\tcodon1.put(\"GAG\",\"E\");\n\tcodon1.put(\"GAT\",\"D\");\n\tcodon1.put(\"GCA\",\"A\");\n\tcodon1.put(\"GCC\",\"A\");\n\tcodon1.put(\"GCG\",\"A\");\n\tcodon1.put(\"GCT\",\"A\");\n\tcodon1.put(\"GGA\",\"G\");\n\tcodon1.put(\"GGC\",\"G\");\n\tcodon1.put(\"GGG\",\"G\");\n\tcodon1.put(\"GGT\",\"G\");\n\tcodon1.put(\"GTA\",\"V\");\n\tcodon1.put(\"GTC\",\"V\");\n\tcodon1.put(\"GTG\",\"V\");\n\tcodon1.put(\"GTT\",\"V\");\n\tcodon1.put(\"TAA\",\"*\");\n\tcodon1.put(\"TAC\",\"Y\");\n\tcodon1.put(\"TAG\",\"*\");\n\tcodon1.put(\"TAT\",\"Y\");\n\tcodon1.put(\"TCA\",\"S\");\n\tcodon1.put(\"TCC\",\"S\");\n\tcodon1.put(\"TCG\",\"S\");\n\tcodon1.put(\"TCT\",\"S\");\n\tcodon1.put(\"TGA\",\"*\");\n\tcodon1.put(\"TGC\",\"C\");\n\tcodon1.put(\"TGG\",\"W\");\n\tcodon1.put(\"TGT\",\"C\");\n\tcodon1.put(\"TTA\",\"L\");\n\tcodon1.put(\"TTC\",\"F\");\n\tcodon1.put(\"TTG\",\"L\");\n\tcodon1.put(\"TTT\",\"F\");\n\n\tcodon3.put(\"AAA\",\"Lys\");\n\tcodon3.put(\"AAC\",\"Asn\");\n\tcodon3.put(\"AAG\",\"Lys\");\n\tcodon3.put(\"AAT\",\"Asn\");\n\tcodon3.put(\"ACA\",\"Thr\");\n\tcodon3.put(\"ACC\",\"Thr\");\n\tcodon3.put(\"ACG\",\"Thr\");\n\tcodon3.put(\"ACT\",\"Thr\");\n\tcodon3.put(\"AGA\",\"Arg\");\n\tcodon3.put(\"AGC\",\"Ser\");\n\tcodon3.put(\"AGG\",\"Arg\");\n\tcodon3.put(\"AGT\",\"Ser\");\n\tcodon3.put(\"ATA\",\"Ile\");\n\tcodon3.put(\"ATC\",\"Ile\");\n\tcodon3.put(\"ATG\",\"Met\");\n\tcodon3.put(\"ATT\",\"Ile\");\n\tcodon3.put(\"CAA\",\"Gln\");\n\tcodon3.put(\"CAC\",\"His\");\n\tcodon3.put(\"CAG\",\"Gln\");\n\tcodon3.put(\"CAT\",\"His\");\n\tcodon3.put(\"CCA\",\"Pro\");\n\tcodon3.put(\"CCC\",\"Pro\");\n\tcodon3.put(\"CCG\",\"Pro\");\n\tcodon3.put(\"CCT\",\"Pro\");\n\tcodon3.put(\"CGA\",\"Arg\");\n\tcodon3.put(\"CGC\",\"Arg\");\n\tcodon3.put(\"CGG\",\"Arg\");\n\tcodon3.put(\"CGT\",\"Arg\");\n\tcodon3.put(\"CTA\",\"Leu\");\n\tcodon3.put(\"CTC\",\"Leu\");\n\tcodon3.put(\"CTG\",\"Leu\");\n\tcodon3.put(\"CTT\",\"Leu\");\n\tcodon3.put(\"GAA\",\"Glu\");\n\tcodon3.put(\"GAC\",\"Asp\");\n\tcodon3.put(\"GAG\",\"Glu\");\n\tcodon3.put(\"GAT\",\"Asp\");\n\tcodon3.put(\"GCA\",\"Ala\");\n\tcodon3.put(\"GCC\",\"Ala\");\n\tcodon3.put(\"GCG\",\"Ala\");\n\tcodon3.put(\"GCT\",\"Ala\");\n\tcodon3.put(\"GGA\",\"Gly\");\n\tcodon3.put(\"GGC\",\"Gly\");\n\tcodon3.put(\"GGG\",\"Gly\");\n\tcodon3.put(\"GGT\",\"Gly\");\n\tcodon3.put(\"GTA\",\"Val\");\n\tcodon3.put(\"GTC\",\"Val\");\n\tcodon3.put(\"GTG\",\"Val\");\n\tcodon3.put(\"GTT\",\"Val\");\n\tcodon3.put(\"TAA\",\"*\");\n\tcodon3.put(\"TAC\",\"Tyr\");\n\tcodon3.put(\"TAG\",\"*\");\n\tcodon3.put(\"TAT\",\"Tyr\");\n\tcodon3.put(\"TCA\",\"Ser\");\n\tcodon3.put(\"TCC\",\"Ser\");\n\tcodon3.put(\"TCG\",\"Ser\");\n\tcodon3.put(\"TCT\",\"Ser\");\n\tcodon3.put(\"TGA\",\"*\");\n\tcodon3.put(\"TGC\",\"Cys\");\n\tcodon3.put(\"TGG\",\"Trp\");\n\tcodon3.put(\"TGT\",\"Cys\");\n\tcodon3.put(\"TTA\",\"Leu\");\n\tcodon3.put(\"TTC\",\"Phe\");\n\tcodon3.put(\"TTG\",\"Leu\");\n\tcodon3.put(\"TTT\",\"Phe\");\n\t\n\tiupac.put(\"-\",\"-\");\n\tiupac.put(\".\",\"-\");\n\tiupac.put(\"A\",\"AA\");\n\tiupac.put(\"B\",\"CGT\");\n\tiupac.put(\"C\",\"CC\");\n\tiupac.put(\"D\",\"AGT\");\n\tiupac.put(\"G\",\"GG\");\n\tiupac.put(\"H\",\"ACT\");\n\tiupac.put(\"K\",\"GT\");\n\tiupac.put(\"M\",\"AC\");\n\tiupac.put(\"N\",\"ACGT\");\n\tiupac.put(\"R\",\"AG\");\n\tiupac.put(\"S\",\"GC\");\n\tiupac.put(\"T\",\"TT\");\n\tiupac.put(\"V\",\"ACG\");\n\tiupac.put(\"W\",\"AT\");\n\tiupac.put(\"Y\",\"CT\");\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 }", "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}", "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}", "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 }", "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 void buildDictionary() throws IOException {\n\t\t\n \tSystem.out.println(\"Loading dictionary...\");\n \t\n \tBufferedReader input = new BufferedReader( new FileReader(entities) );\n \tMapDictionary<String> dictionary = new MapDictionary<String>();\t\n \tString aux = null;\n \t\n\t\twhile ((aux=input.readLine())!=null) {\t\t\t\n\t\t\tif (aux.length()==0)\n\t\t\t\tcontinue;\n\n\t\t\taux.replaceAll(\"([A-Z])\",\" $1\").trim();\t\t\t\n\t\t\tdictionary.addEntry(new DictionaryEntry<String>(aux,aux,CHUNK_SCORE));\n\t \n\t\t}\n\t\t\n chunker = new ExactDictionaryChunker(dictionary,IndoEuropeanTokenizerFactory.INSTANCE,true,true);\n System.out.println(\"Dictionary contains \" + dictionary.size() + \" entries.\");\n }", "public static void main (String[] args)\r\n {\n Geek g1 = new Geek(\"aditya\", 1);\r\n Geek g2 = new Geek(\"aditya\", 1);\r\n \r\n Map<Geek, String> map = new HashMap<Geek, String>();\r\n map.put(g1, \"CSE\");\r\n map.put(g2, \"IT\");\r\n \r\n for(Geek geek : map.keySet())\r\n {\r\n System.out.println(map.get(geek).toString());\r\n }\r\n \r\n }", "private void setUp() {\n\t\tString allLetter = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. 0123456789\";\n\t\tallChar = allLetter.toCharArray();\n\t\tshuffledChar = shuffle(allLetter.toCharArray());\n\t\tmap = new HashMap<Character, Character>();\n\t\tmapSetUp();\n\t}", "public void generateRandomMap() {\n\n\t}", "private void generateBack() {\n\t\tCharacter[] encodeChar = (Character[]) map.values().toArray(new Character[map.size()]);\n\t\tCharacter[] trueChar = (Character[]) map.keySet().toArray(new Character[map.size()]);\n\n\t\tString allencode = \"\";\n\t\tString allTrue = \"\";\n\n\t\tfor (int i = 0; i < encodeChar.length; i++) {\n\t\t\tallencode += encodeChar[i];\n\t\t\tallTrue += trueChar[i];\n\t\t}\n\n\t\tString code = \"import java.util.HashMap;\\n\" + \"import java.util.Map;\\n\" + \"import java.util.Scanner;\\n\"\n\t\t\t\t+ \"public class MyKey {\\n\"\n\t\t\t\t+ \"private static Map<Character, Character> map = new HashMap<Character, Character>();\\n\"\n\t\t\t\t+ \"private static char[] encodeChar = \\\"\" + allencode + \"\\\".toCharArray();\\n\"\n\t\t\t\t+ \"private static char[] trueChar = \\\"\" + allTrue + \"\\\".toCharArray();\\n\"\n\t\t\t\t+ \"private static void mapSetUp() {\\n\" + \"for (int i = 0; i < encodeChar.length; i++) {\\n\"\n\t\t\t\t+ \"map.put(encodeChar[i], trueChar[i]);\\n\" + \"}\\n\" + \"}\\n\"\n\t\t\t\t+ \"private static String decodeMessage(String message) {\\n\" + \"String decode = \\\"\\\";\\n\"\n\t\t\t\t+ \"for (int i = 0; i < message.length(); i++) {\\n\" + \"decode += map.get(message.charAt(i));\\n\" + \"}\\n\"\n\t\t\t\t+ \"return decode;\\n\" + \"}\\n\" + \"public static void main(String[] args){\\n\"\n\t\t\t\t+ \"Scanner sc = new Scanner(System.in);\\n\" + \"System.out.print(\\\"Input your encrypted message : \\\");\"\n\t\t\t\t+ \"String enMessage = sc.nextLine();\" + \"mapSetUp();\\n\"\n\t\t\t\t+ \"System.out.println(\\\"Decrypted message : \\\"+decodeMessage(enMessage));\\n\" + \"}}\";\n\t\tFile f = new File(\"MyKey.java\");\n\t\ttry {\n\t\t\tFileWriter fw = new FileWriter(f);\n\t\t\tBufferedWriter bf = new BufferedWriter(fw);\n\t\t\tbf.write(code);\n\t\t\tbf.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error about IO.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void generateCodes() {\n\t\tArrayList<Chest> chests = new ArrayList<Chest>();\n\t\tArrayList<Key> keys = new ArrayList<Key>();\n\n\t\tfor (Location location : board.getLocations().values()) {\n\t\t\tfor (Tile ta[] : location.getTiles()) {\n\t\t\t\tfor (Tile t : ta) {\n\t\t\t\t\tif (t.getGameObject() instanceof Chest) {\n\t\t\t\t\t\tchests.add((Chest) t.getGameObject());\n\t\t\t\t\t} else if (t.getGameObject() instanceof Key) {\n\t\t\t\t\t\tkeys.add((Key) t.getGameObject());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (keys.size() != chests.size()) {\n\t\t\tthrow new RuntimeException(\"must have same numer of keys and chests\");\n\t\t}\n\n\t\tint num = keys.size();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tint randy = (int) (Math.random() * keys.size());\n\t\t\tint orton = (int) (Math.random() * keys.size());\n\n\t\t\tkeys.get(randy).setCode(i);\n\t\t\tchests.get(orton).setCode(i);\n\t\t\tchests.get(orton).setContents(new Banana(\"Banana\"));\n\t\t\tkeys.remove(randy);\n\t\t\tchests.remove(orton);\n\t\t}\n\n\t}", "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 }", "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 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 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 GameMapHashMap() {\n HashMap<String, HashMap<String, String>> temporaryMap = new HashMap<>();\n instantiateIndividualRooms();\n\n temporaryMap.put(\"Atrium\", atrium);\n temporaryMap.put(\"Breakfast Nook\", breakfastNook);\n temporaryMap.put(\"Menagerie\", menagerie);\n temporaryMap.put(\"Conservatory\", conservatory);\n temporaryMap.put(\"Panic Room\", panicRoom);\n\n temporaryMap.put(\"Fire Swamps\", fireSwamps);\n temporaryMap.put(\"Hall\", hall);\n temporaryMap.put(\"Dining Room\", diningRoom);\n temporaryMap.put(\"Arcade\", arcade);\n temporaryMap.put(\"Observatory\", observatory);\n\n temporaryMap.put(\"Courtyard\", courtyard);\n temporaryMap.put(\"Library\", library);\n temporaryMap.put(\"Garden\", garden);\n temporaryMap.put(\"Laboratory\", laboratory);\n temporaryMap.put(\"Kitchen\", kitchen);\n\n rooms = Collections.unmodifiableMap(temporaryMap);\n }", "private void buildKeyMap() {\n\t\tcharMapKey = new HashMap<Character , Integer>();\n\t\tcharMapKey.put('a', 0);\n\t\tcharMapKey.put('b', 0);\n\t\tcharMapKey.put('c', 1);\n\t\tcharMapKey.put('d', 1);\n\t\tcharMapKey.put('e', 2);\n\t\tcharMapKey.put('f', 2);\n\t\tcharMapKey.put('g', 3);\n\t\tcharMapKey.put('h', 3);\n\t\tcharMapKey.put('i', 4);\n\t\tcharMapKey.put('j', 4);\n\t\tcharMapKey.put('k', 5);\n\t\tcharMapKey.put('l', 5);\n\t\tcharMapKey.put('m', 6);\n\t\tcharMapKey.put('n', 6);\n\t\tcharMapKey.put('o', 7);\n\t\tcharMapKey.put('p', 7);\n\t\tcharMapKey.put('q', 8);\n\t\tcharMapKey.put('r', 8);\n\t\tcharMapKey.put('s', 9);\n\t\tcharMapKey.put('t', 9);\n\t\tcharMapKey.put('u', 10);\n\t\tcharMapKey.put('v', 10);\n\t\tcharMapKey.put('w', 11);\n\t\tcharMapKey.put('x', 11);\n\t\tcharMapKey.put('y', 12);\n\t\tcharMapKey.put('z', 12);\n\t}", "private void createTurtleMap () {\n turtleInstructions.put(\"Forward\", new TurtleForward());\n turtleInstructions.put(\"Backward\", new TurtleBackward());\n turtleInstructions.put(\"Right\", new TurtleRight());\n turtleInstructions.put(\"Left\", new TurtleLeft());\n turtleInstructions.put(\"SetHeading\", new TurtleSetHeading());\n turtleInstructions.put(\"SetTowards\", new TurtleSetTowards());\n turtleInstructions.put(\"SetPosition\", new TurtleSetPosition());\n turtleInstructions.put(\"PenUp\", new TurtlePenUp());\n turtleInstructions.put(\"PenDown\", new TurtlePenDown());\n turtleInstructions.put(\"ShowTurtle\", new TurtleShowTurtle());\n turtleInstructions.put(\"HideTurtle\", new TurtleHideTurtle());\n turtleInstructions.put(\"Home\", new TurtleHome());\n turtleInstructions.put(\"ClearScreen\", new TurtleClearScreen());\n turtleInstructions.put(\"XCoordinate\", new TurtleXCor());\n turtleInstructions.put(\"YCoordinate\", new TurtleYCor());\n turtleInstructions.put(\"Heading\", new TurtleHeading());\n turtleInstructions.put(\"IsPenDown\", new TurtleIsPenDown());\n turtleInstructions.put(\"IsShowing\", new TurtleIsShowing()); \n displayInstructions.put(\"SetBackground\", new DisplaySetBackground());\n displayInstructions.put(\"SetPenColor\", new DisplaySetPenColor());\n displayInstructions.put(\"SetPenSize\", new DisplaySetPenSize());\n displayInstructions.put(\"SetShape\", new DisplaySetShape());\n displayInstructions.put(\"SetPalette\", new DisplaySetPalette());\n displayInstructions.put(\"GetPenColor\", new DisplayPenColor());\n displayInstructions.put(\"GetShape\", new DisplayShape());\n displayInstructions.put(\"Stamp\", new DisplayStamp());\n displayInstructions.put(\"ClearStamps\", new DisplayClearStamps());\n multiTurtleInstructions.put(\"ID\", new TurtleID());\n multiTurtleInstructions.put(\"Turtles\", new TurtleTurtles());\n multiTurtleInstructions.put(\"Tell\", new TurtleTellMulti());\n // multiTurtleInstructions.put(\"Ask\", new TurtleAsk());\n //multiTurtleInstructions.put(\"AskWith\", new TurtleAskWith());\n }", "private static Map<String, Set<String>> getReagentToPotionsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a reagent -> potions map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.reagentToPotionsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkReagentToPotionsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\n\t}", "public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }", "public static void main(String[] args) {\n String[] strs = {\"\",\"\"};\n Anagrams so = new Anagrams();\n System.out.print(so.anagrams_hashmap(strs));\n }", "public void generateKeys(){\n\t\t//Apply permutation P10\n\t\tString keyP10 = permutation(key,TablesPermutation.P10);\n\t\tresults.put(\"P10\", keyP10);\n\t\t//Apply LS-1\n\t\tString ls1L = leftShift(keyP10.substring(0,5),1);\n\t\tString ls1R = leftShift(keyP10.substring(5,10),1);\n\t\tresults.put(\"LS1L\", ls1L);\n\t\tresults.put(\"LS1R\", ls1R);\n\t\t//Apply P8 (K1)\n\t\tk1 = permutation(ls1L+ls1R, TablesPermutation.P8);\n\t\tresults.put(\"K1\", k1);\n\t\t//Apply LS-2\n\t\tString ls2L = leftShift(ls1L,2);\n\t\tString ls2R = leftShift(ls1R,2);\n\t\tresults.put(\"LS2L\", ls2L);\n\t\tresults.put(\"LS2R\", ls2R);\n\t\t//Apply P8 (K2)\n\t\tk2 = permutation(ls2L+ls2R, TablesPermutation.P8);\n\t\tresults.put(\"K2\", k2);\n\t}", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "public static void main(String[] args) {\n\t\tGnomenWald map = new GnomenWald();\n\t\tVillage v1 = new Village(\"Rochester\");\n\t\tGnome v1g1 = new Gnome(\"Thomas\", \"Red\", 1);\n\t\tGnome v1g2 = new Gnome(\"Jerry\", \"Blue\", 0);\n\t\tGnome v1g3 = new Gnome(\"Jordan\", \"Yellow\", 2);\n\t\tGnome v1g4 = new Gnome(\"Philips\", \"Purple\", 1);\n\t\tv1.addGnomes(v1g1); v1.addGnomes(v1g2); v1.addGnomes(v1g3); v1.addGnomes(v1g4);\n\t\tVillage v2 = new Village(\"Syracuse\");\n\t\tGnome v2g1 = new Gnome(\"Sarah\", \"Pink\", 3);\n\t\tGnome v2g2 = new Gnome(\"John\", \"Black\", 2);\n\t\tGnome v2g3 = new Gnome(\"Yelson\", \"White\", 1);\n\t\tGnome v2g4 = new Gnome(\"Jeremy\", \"Lightblue\", 4);\n\t\tv2.addGnomes(v2g1); v2.addGnomes(v2g2); v2.addGnomes(v2g3); v2.addGnomes(v2g4);\n\t\tVillage v3 = new Village(\"Ithaca\");\n\t\tGnome v3g1 = new Gnome(\"Frank\", \"Jet black\", 0);\n\t\tGnome v3g2 = new Gnome(\"Mark\", \"Brown\", 3);\n\t\tGnome v3g3 = new Gnome(\"Alan\", \"Cyan\", 0);\n\t\tGnome v3g4 = new Gnome(\"Ray\", \"Red\", 0);\n\t\tv3.addGnomes(v3g1); v3.addGnomes(v3g2); v3.addGnomes(v3g3); v3.addGnomes(v3g4);\n\t\tVillage v4 = new Village(\"New York\");\n\t\tGnome v4g1 = new Gnome(\"Jimmy\", \"White\", 2);\n\t\tGnome v4g2 = new Gnome(\"Joseph\", \"Red\", 2);\n\t\tGnome v4g3 = new Gnome(\"Amy\", \"Yellow\", 3);\n\t\tGnome v4g4 = new Gnome(\"Greenwich\", \"Green\", 1);\n\t\tv4.addGnomes(v4g1); v4.addGnomes(v4g2); v4.addGnomes(v4g3); v4.addGnomes(v4g4);\n\t\tVillage v5 = new Village(\"San Francisco\");\n\t\tGnome v5g1 = new Gnome(\"Bob\", \"Green\", 4);\n\t\tGnome v5g2 = new Gnome(\"Paul\", \"Pink\", 4);\n\t\tGnome v5g3 = new Gnome(\"Staple\", \"Jet Black\", 3);\n\t\tGnome v5g4 = new Gnome(\"Mary\", \"Purple\", 1);\n\t\tv5.addGnomes(v5g1); v5.addGnomes(v5g2); v5.addGnomes(v5g3); v5.addGnomes(v5g4);\n\t\t\n\t\tmap.addVillage(v1);\n\t\tmap.addVillage(v2);\n\t\tmap.addVillage(v3);\n\t\tmap.addVillage(v4);\n\t\tmap.addVillage(v5);\n\t\t\n\t\tmap.printVillages();\n\t\tv1.printGnomes();\n\t}", "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}", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void generateDictionaries()\n {\n // add routes to dictionary\n for (Route route : this.graph.getRoutes())\n {\n this.routeDict.put(route.source.getId() + \"-\" + route.destination.getId(), route.getDistance());\n }\n\n // add trips to dictionary\n for (Trip trip : this.tripList)\n {\n String key = trip.getSource().getId() + \"-\" + trip.getDestination().getId();\n\n if (this.tripDict.containsKey(key))\n {\n Set<Trip> tripsBetweenNodes = this.tripDict.get(key);\n tripsBetweenNodes.add(trip);\n }\n else\n {\n Set<Trip> tripsBetweenNodes = new TreeSet<Trip>(new TripDistanceComparator());\n tripsBetweenNodes.add(trip);\n\n this.tripDict.put(key, tripsBetweenNodes);\n }\n }\n\n this.tripList.clear();\n }", "public static Map<Integer, TaxCategory> newBrunswick() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(9.68, 0, 43835); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(14.82, 43835.01, 87671); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(16.52, 87671.01, 142534); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 3, cat3 ); //puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(17.84, 142534.01, 162383); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 4, cat4 ); //puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(20.3, 162383.01, 10000000); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 5, cat5 ); //puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "public HashMap<String, List<String>> getItemMap() {\r\n\r\n\t\thelmet_abilities.add(Game_constants.INTELLIGENCE);\r\n\t\thelmet_abilities.add(Game_constants.WISDOM);\r\n\t\thelmet_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tarmor_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tshield_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tring_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tring_abilities.add(Game_constants.STRENGTH);\r\n\t\tring_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tring_abilities.add(Game_constants.WISDOM);\r\n\t\tring_abilities.add(Game_constants.CHARISMA);\r\n\r\n\t\tbelt_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tbelt_abilities.add(Game_constants.STRENGTH);\r\n\r\n\t\tboots_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tboots_abilities.add(Game_constants.DEXTERITY);\r\n\r\n\t\tweapon_abilities.add(Game_constants.ATTACK_BONUS);\r\n\t\tweapon_abilities.add(Game_constants.DAMAGE_BONUS);\r\n\r\n\t\titem_map.put(Game_constants.HELMET, helmet_abilities);\r\n\t\titem_map.put(Game_constants.ARMOR, armor_abilities);\r\n\t\titem_map.put(Game_constants.SHIELD, shield_abilities);\r\n\t\titem_map.put(Game_constants.RING, ring_abilities);\r\n\t\titem_map.put(Game_constants.BELT, belt_abilities);\r\n\t\titem_map.put(Game_constants.BOOTS, boots_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_MELEE, weapon_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_RANGE, weapon_abilities);\r\n\r\n\t\treturn item_map;\r\n\r\n\t}", "public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<String, Byte> ret = new HashMap<String, Byte>();\n for(int i=0;i<types.length;i++){\n ret.put(names[i], types[i]);\n }\n return ret;\n }", "public static Map<Integer, TaxCategory> alberta() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10, 0, 131220); // Tax Category 1 for Alberta\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12,131220.01, 157464); // Tax Category 2 for Alberta\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(13, 157464.01, 209952); // Tax Category 3 for Alberta\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(14, 209952.01, 314928); // Tax Category 4 for Alberta\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(15, 314928.01, 10000000); // Tax Category 5 for Alberta\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private static Map<String, Set<String>> getPotionToReagentsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a potion -> reagents map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.potionToReagentsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkPotionToReagentsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\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 }", "private void populateDictionaryByLemmatizer() throws IOException {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n if (!(word.contains(\" \")||word.contains(\"+\") ||word.contains(\"\\\"\") ||word.contains(\"'\")||word.contains(\".\") ||word.contains(\":\") || word.contains(\"(\") || word.contains(\")\") ||word.contains(\"-\")|| word.contains(\";\"))) {\n String tokenizedWords[] = tokenize(word);\n\n if (tokenizedWords.length == 1) {\n List<String> stemmings = stanfordLemmatizer.lemmatize(word);\n\n for (int i = 0; i < stemmings.size(); i++) {\n if (!dictionaryTerms.containsKey(stemmings.get(i))) {\n dictionaryTerms.put(stemmings.get(i), tag);\n System.out.println(\"Stemming: \" + word + \"\\t\" + stemmings.get(i));\n }\n }\n }\n }\n }\n }", "private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}", "@Override\n\tpublic HashMap<Position, Node> generate(){\n\t\tNode tempNode;\n\t\tPosition tempPosition;\n\t\tif(map != null && map.isEmpty()){\n\t\t\tfor(int y=0; y<numNodesY; y++){\n\t\t\t\tfor(int x=0; x<numNodesX; x++){\n\t\t\t\t\ttempPosition = new Position(x*nodeDistance, \n\t\t\t\t\t\t\ty*nodeDistance);\n\t\t\t\t\ttempNode = new Node(field, tempPosition,\n\t\t\t\t\t\t\tnodeSignalStrength,\n\t\t\t\t\t\t\tagentLife,\n\t\t\t\t\t\t\trequestLife);\n\t\t\t\t\tmap.put(tempPosition, tempNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new HashMap<Position, Node>(map);\n\t}", "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 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}", "abstract Map<String, Integer> mapOfNamesToSalary();", "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 }", "public Mountaineering() {\n super(\"Mountaineering\", \"Enchanting Tables are crafted with emeralds instead of diamonds.\");\n\n emeraldEnch = new ShapedRecipe(ENCHANT_TABLE).shape(\" B \", \"EOE\", \"OOO\")\n .setIngredient('B', Material.BOOK)\n .setIngredient('E', Material.EMERALD)\n .setIngredient('O', Material.OBSIDIAN\n );\n\n diamondEnch = new ShapedRecipe(ENCHANT_TABLE).shape(\" B \", \"DOD\", \"OOO\")\n .setIngredient('B', Material.BOOK)\n .setIngredient('D', Material.DIAMOND)\n .setIngredient('O', Material.OBSIDIAN\n );\n }", "public static Map<Byte, String> genTypeToNameMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<Byte,String> ret = new HashMap<Byte, String>();\n for(int i=0;i<types.length;i++){\n ret.put(types[i], names[i]);\n }\n return ret;\n }", "public static HashMap<String,String> nextWord(){\r\n\t\t \r\n\t\tString q1 = \"paple\";\r\n\t\tString a1 = \"apple\";\r\n\t\tString q2 = \"roange\";\r\n\t\tString a2 = \"orange\";\r\n\t\t\r\n\t\tHashMap<String, String> hm = new HashMap<>();\r\n\t\thm.put(q1, a1);\r\n\t\thm.put(q2,a2);\r\n\t\treturn hm;\r\n\t}", "public RuleMap(){\n rules = new HashMap<Character, String>();\n }", "private void erstelleListenMap(){\n farbenMap = new TreeMap<>();\n symbolMap = new TreeMap<>();\n\n for(Symbol symbol:Symbol.values()){\n\n switch (symbol) // sortiert ihn in die entsprechende Liste ein\n {\n case ka_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,karos);\n break;\n case ks_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kreise);\n break;\n case kr_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kreuze);\n break;\n case st_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,sterne);\n break;\n case qu_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kleeblaetter);\n break;\n\n case ka_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,karos);\n break;\n case ks_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kreise);\n break;\n case kr_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kreuze);\n break;\n case st_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,sterne);\n break;\n case qu_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,karos);\n break;\n case ks_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kreise);\n break;\n case kr_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kreuze);\n break;\n case st_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,sterne);\n break;\n case qu_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,karos);\n break;\n case ks_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kreise);\n break;\n case kr_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kreuze);\n break;\n case st_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,sterne);\n break;\n case qu_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,karos);\n break;\n case ks_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kreise);\n break;\n case kr_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kreuze);\n break;\n case st_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,sterne);\n break;\n case qu_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,karos);\n break;\n case ks_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kreise);\n break;\n case kr_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kreuze);\n break;\n case st_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,sterne);\n break;\n case qu_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kleeblaetter);\n break;\n }\n\n }\n }", "public HashMap<String, String> storeNPC() {\n HashMap<String, String> npcMap = new HashMap<>();\n npcMap.put(BSChristiansen.getName(), BSChristiansen.getCurrentRoom().getShortDescription());\n npcMap.put(mysteriousCrab.getName(), mysteriousCrab.getCurrentRoom().getShortDescription());\n npcMap.put(josephSchnitzel.getName(), josephSchnitzel.getCurrentRoom().getShortDescription());\n return npcMap;\n }", "public static HashMap<String, Shelter> getMap() {\n return shelters;\n }", "public void generate()\n {\n System.out.println(\"Initial allocated space for Set: Not supported\");\n// System.out.println(\"Initial allocated space for Set: \" + theMap.capacity());\n final long startTime = TimeUtils.nanoTime();\n Mnemonic m = new Mnemonic(123456789L);\n// GridPoint2 gp = new GridPoint2(0, 0);\n for (int x = -width; x < width; x++) {\n for (int y = -height; y < height; y++) {\n// for (int z = -height; z < height; z++) {\n\n// long z = (x & 0xFFFFFFFFL) << 32 | (y & 0xFFFFFFFFL);\n// z = ((z & 0x00000000ffff0000L) << 16) | ((z >>> 16) & 0x00000000ffff0000L) | (z & 0xffff00000000ffffL);\n// z = ((z & 0x0000ff000000ff00L) << 8 ) | ((z >>> 8 ) & 0x0000ff000000ff00L) | (z & 0xff0000ffff0000ffL);\n// z = ((z & 0x00f000f000f000f0L) << 4 ) | ((z >>> 4 ) & 0x00f000f000f000f0L) | (z & 0xf00ff00ff00ff00fL);\n// z = ((z & 0x0c0c0c0c0c0c0c0cL) << 2 ) | ((z >>> 2 ) & 0x0c0c0c0c0c0c0c0cL) | (z & 0xc3c3c3c3c3c3c3c3L);\n// z = ((z & 0x2222222222222222L) << 1 ) | ((z >>> 1 ) & 0x2222222222222222L) | (z & 0x9999999999999999L);\n// theMap.put(z, null); // uses 23312536 bytes of heap\n// long z = szudzik(x, y);\n// theMap.put(z, null); // uses 18331216 bytes of heap?\n// unSzudzik(pair, z);\n// theMap.put(0xC13FA9A902A6328FL * x ^ 0x91E10DA5C79E7B1DL * y, null); // uses 23312576 bytes of heap\n// theMap.put((x & 0xFFFFFFFFL) << 32 | (y & 0xFFFFFFFFL), null); // uses 28555456 bytes of heap\n theMap.add(new Vector2(x - width * 0.5f, y - height * 0.5f)); // crashes out of heap with 720 Vector2\n// gp.set(x, y);\n// theMap.add(gp.hashCode());\n// long r, s;\n// r = (x ^ 0xa0761d65L) * (y ^ 0x8ebc6af1L);\n// s = 0xa0761d65L * (z ^ 0x589965cdL);\n// r -= r >> 32;\n// s -= s >> 32;\n// r = ((r ^ s) + 0xeb44accbL) * 0xeb44acc8L;\n// theMap.add((int)(r - (r >> 32)));\n\n// theMap.add(m.toMnemonic(szudzik(x, y)));\n }\n }\n// }\n// final GridPoint2 gp = new GridPoint2(x, y);\n// final int gpHash = gp.hashCode(); // uses the updated GridPoint2 hashCode(), not the current GDX code\n// theMap.put(gp, gpHash | 0xFF000000); //value doesn't matter; this was supposed to test ObjectMap\n //theMap.put(gp, (53 * 53 + x + 53 * y) | 0xFF000000); //this is what the hashCodes would look like for the current code\n \n //final int gpHash = x * 0xC13F + y * 0x91E1; // updated hashCode()\n //// In the updated hashCode(), numbers are based on the plastic constant, which is\n //// like the golden ratio but with better properties for 2D spaces. These don't need to be prime.\n \n //final int gpHash = 53 * 53 + x + 53 * y; // equivalent to current hashCode()\n long taken = TimeUtils.timeSinceNanos(startTime);\n System.out.println(taken + \"ns taken, about 10 to the \" + Math.log10(taken) + \" power.\");\n// System.out.println(\"Post-assign allocated space for Set: \" + theMap.capacity());\n System.out.println(\"Post-assign allocated space for Set: Not supported\");\n }", "public void llenarDiccionario(){\n String[] letras = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\n \"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\n \"5\",\"6\",\"7\",\"8\",\"9\",\" \"};\n String[] encriptado = {\"!\",\"]\",\"^\",\"æ\",\"ü\",\"×\",\"¢\",\"þ\",\"@\",\"§\",\"«\",\n \"A\",\"¥\",\"~\",\"c\",\"r\",\"z\",\"W\",\"8\",\"ç\",\"2\",\"L\",\"f\",\"&\",\"#\",\"[\",\",\",\n \"p\",\"Q\",\"K\",\"m\",\"s\",\"J\",\"V\",\"b\",\"U\",\"-\"};\n for (int i = 0; i < 36; i++) {\n diccionarioEncriptado.put(letras[i], encriptado[i]);\n }\n \n }", "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 HashMap name4() {\n\n\t HashMap hm = new HashMap();\n\t hm.put(\"firstName\", \"HARI\");\n\t hm.put(\"middleName\", \"SHYAMA\");\n\t hm.put(\"lastName\", \"SUNITA\");\n\t hm.put(\"firstYearInOffice\", \"1969\");\n\t hm.put(\"lastYearInOffice\", \"1974\");\n\t return hm;\n\n\t }", "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 }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "public void initialize() {\n\t\tString alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tint N = alphabet.length();\n\n\t\tRandom r = new Random();\n\t\tString key = \"\";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tkey+= alphabet.charAt(r.nextInt(N));\n\t\t}\n\t\tthis.key = key;\n\t}", "public void createDictionary() \n {\n dictionary = new HashMap<String, Map<String, String>>();\n \n addTranslations(\n \"EN\", // Language code\n \"OK\", \"Ok\",\n \"UPDATE\", \"Update\",\n \"OPEN\", \"Open\",\n \"CLOSE\", \"Close\",\n \"CANCEL\", \"Cancel\",\n \"MESSAGES\", \"Messages\",\n \"NO_MESSAGES_TO_DISPLAY\", \"No messages to display\",\n \"EVALUATE\", \"Evaluate\",\n \"RUN\", \"Run\",\n \"RUN_AS_ACTIVITY\", \"Run Activity\",\n \"OPEN_SCRIPT\", \"Open script\",\n \"START_SERVER\", \"Start server\",\n \"STOP_SERVER\", \"Stop server\",\n \"SHOW_MESSAGES\", \"Messages\",\n \"UPDATE_APP_SCRIPTS\", \"Update\",\n \"THIS_WILL_OVERWRITE_ALL_APP_SCRIPTS\", \"This will overwrite all application scripts!\",\n \"ENTER_FILE_OR_URL\", \"Enter file or url:\",\n \"UPDATE_APP_SCRIPTS_DONE\", \"Update complete!\",\n \"UPDATE_APP_SCRIPTS_DONE_RESTART\", \"Restart the application to make changes take effect\",\n \"QUIT_APP\", \"Quit\",\n \"CLOSE\", \"Close\",\n \"BE_KIND\", \"Be kind\",\n \"BE_KIND_MESSAGE\", \"Be a kind person\"\n );\n }", "private static Map<CryptoAlgorithm, String> createExactCipherMapping() {\n HashMap<CryptoAlgorithm, String> map = new HashMap<>();\n map.put(CryptoAlgorithm.AES_CBC, \"AES/CBC/PKCS5PADDING\");\n return Collections.unmodifiableMap(map);\n }", "private static Map getMapPotionIds() {\n/* 350 */ if (mapPotionIds == null) {\n/* */ \n/* 352 */ mapPotionIds = new LinkedHashMap<>();\n/* 353 */ mapPotionIds.put(\"water\", new int[1]);\n/* 354 */ mapPotionIds.put(\"awkward\", new int[] { 16 });\n/* 355 */ mapPotionIds.put(\"thick\", new int[] { 32 });\n/* 356 */ mapPotionIds.put(\"potent\", new int[] { 48 });\n/* 357 */ mapPotionIds.put(\"regeneration\", getPotionIds(1));\n/* 358 */ mapPotionIds.put(\"moveSpeed\", getPotionIds(2));\n/* 359 */ mapPotionIds.put(\"fireResistance\", getPotionIds(3));\n/* 360 */ mapPotionIds.put(\"poison\", getPotionIds(4));\n/* 361 */ mapPotionIds.put(\"heal\", getPotionIds(5));\n/* 362 */ mapPotionIds.put(\"nightVision\", getPotionIds(6));\n/* 363 */ mapPotionIds.put(\"clear\", getPotionIds(7));\n/* 364 */ mapPotionIds.put(\"bungling\", getPotionIds(23));\n/* 365 */ mapPotionIds.put(\"charming\", getPotionIds(39));\n/* 366 */ mapPotionIds.put(\"rank\", getPotionIds(55));\n/* 367 */ mapPotionIds.put(\"weakness\", getPotionIds(8));\n/* 368 */ mapPotionIds.put(\"damageBoost\", getPotionIds(9));\n/* 369 */ mapPotionIds.put(\"moveSlowdown\", getPotionIds(10));\n/* 370 */ mapPotionIds.put(\"diffuse\", getPotionIds(11));\n/* 371 */ mapPotionIds.put(\"smooth\", getPotionIds(27));\n/* 372 */ mapPotionIds.put(\"refined\", getPotionIds(43));\n/* 373 */ mapPotionIds.put(\"acrid\", getPotionIds(59));\n/* 374 */ mapPotionIds.put(\"harm\", getPotionIds(12));\n/* 375 */ mapPotionIds.put(\"waterBreathing\", getPotionIds(13));\n/* 376 */ mapPotionIds.put(\"invisibility\", getPotionIds(14));\n/* 377 */ mapPotionIds.put(\"thin\", getPotionIds(15));\n/* 378 */ mapPotionIds.put(\"debonair\", getPotionIds(31));\n/* 379 */ mapPotionIds.put(\"sparkling\", getPotionIds(47));\n/* 380 */ mapPotionIds.put(\"stinky\", getPotionIds(63));\n/* */ } \n/* */ \n/* 383 */ return mapPotionIds;\n/* */ }", "@Override\n public Set<String> makeGuess(char guess) throws GuessAlreadyMadeException {\n\n for(String word : myDictionary) {\n ArrayList<Integer> indices = new ArrayList<>();\n for (int i = 0; i < word.length(); i++) {\n if(word.charAt(i) == guess) {\n indices.add(i);\n }\n }\n boolean matchFound = false;\n for (Map.Entry<Pattern, Set<String>> entry : myMap.entrySet()) {\n Pattern myPattern = entry.getKey();\n Set<String> myStrings = entry.getValue();\n if(indices.equals(myPattern.ReturnIndices())) {\n myStrings.add(word);\n //myNewDictionary.add(word);\n matchFound = true;\n }\n\n }\n if(matchFound == false) {\n Pattern myNewPattern = new Pattern(word.length(), word, indices);\n Set<String> myNewString = new HashSet<>();\n myNewString.add(word);\n //myNewDictionary.add(word);\n myMap.put(myNewPattern, myNewString);\n }\n\n }\n this.myDictionary = RunEvilAlgorithm();\n this.myMap = new HashMap<>();\n //make a function to run evil algorithm\n return myDictionary;\n }", "private HashMap name5() \n\t {\n\n\t HashMap hm = new HashMap();\n\t hm.put(\"firstName\", \"HATI\");\n\t hm.put(\"middleName\", \"GHODA\");\n\t hm.put(\"lastName\", \"BAGHA\");\n\t hm.put(\"firstYearInOffice\", \"1963\");\n\t hm.put(\"lastYearInOffice\", \"1969\");\n\t return hm;\n\t }", "private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }", "public static void main(String[] args) {\n\t\tMap<String,Double> items = new HashMap<>();\r\n\t\t\r\n\t\titems.put(\"Toaster\",350.00);\t\t//inits elements into map [STRING == KEY; DOUBLE == VALUE]\r\n\t\titems.put(\"Dongle\", 5.99);\r\n\t\titems.put(\"Sham Wow\", 19.99);\r\n\t\titems.put(\"Flex Seal\",19.99);\r\n\t\t\r\n\t\tSet<String> setOKeys = items.keySet();\r\n\t\tint count = 0;\r\n\t\tfor(String key : items.keySet()){\r\n\t\t\tSystem.out.print(++count + \") \" + key + \": $\" /*+ items.get(key)USED IN NORMAL FORMAT; NEEDED TO UPDATE FOR 2 DECI POINTS see below*/);\r\n\t\t\tSystem.out.printf(\"%.2f\\n\", items.get(key));\t//printf; decimal format to help\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(items.containsKey(\"Sham Wow\"));\r\n\t\tSystem.out.println(items.containsValue(19.99));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//ANIMAL BOOK HASH MAP EXAMPLE\r\n\t\tMap<String, Integer> ani = new HashMap<>();\r\n\t\tani.put(\"Toucan\", 40);\r\n\t\tani.put(\"Lizard\", 7);\t\t\t//Stored by Integer value\r\n\t\tani.put(\"Wallaby\", 18);\r\n\t\t\r\n\t\tSystem.out.println(ani.get(\"Lizard\"));\r\n\t\t\r\n\t\tani.remove(\"Toucan\");\r\n\t\t\r\n\t\tSystem.out.println(ani); //toString Method is in the collections class automatically\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//TREE MAP\r\n\t\tSet<Character> letters = new TreeSet<>(); //LINKEDHASHSET will be unordered\r\n\t\tletters.add('b');\r\n\t\tletters.add('c');\r\n\t\tletters.add('a');\r\n\t\tletters.add('c');\t\t//duplicate REMOVED automatically\r\n\t\t\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tletters.remove('b');\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tSystem.out.println(letters.contains('f'));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLinkedList<String> food = new LinkedList<>(); //can do list-linked list, linked list-linked list\r\n\t\t\r\n\t\tfood.add(\"Sauerkraut\");\r\n\t\tfood.add(\"Carrots\");\r\n\t\tfood.add(\"Mud\");\r\n\t\tfood.add(1, \"Margarine\"); //at indx 1; Margarine\r\n\t\t\r\n\t\tCollections.sort(food); //method in collections class which sorts\r\n\t\tfood.toString();\r\n\t\t//food.clear(); clears list\r\n\t\t\r\n\t\tString marg = food.get(3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tQueue<String> cities = new PriorityQueue<>();\r\n\t\t\r\n\t\tcities.offer(\"Detroit\");\t\t//QUEUES 'OFFER'\r\n\t\tcities.offer(\"Los Angeles\");\r\n\t\tcities.offer(\"Vienna\");\r\n\t\tcities.offer(\"Windsor\");\r\n\t\t\r\n\t\tSystem.out.println(cities.peek()); //insertion order\r\n\t\tSystem.out.println(cities);\r\n\t\t\r\n\t\tStack<String> dishes = new Stack<>();\r\n\t\t\r\n\t\tdishes.add(\"Cereal bowl\");\r\n\t\tdishes.add(\"Lunch tray\");\r\n\t\tdishes.add(\"Pots and pans\");\r\n\t\tdishes.add(\"Dinner fork\");\r\n\t\t\r\n\t\tSystem.out.println(dishes.peek());\r\n\t\t\r\n\t\tdishes.pop();\r\n\t\tdishes.pop();\t\t//removing the oldest; fifo \r\n\t\t\r\n\t\tSystem.out.println(dishes);\r\n\t}", "Map<String, String> mo14888a();", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "public static Map<Integer, Integer> getRandomARs(int size) {\n Map<Integer, Integer> output = new HashMap<Integer, Integer>();\n Random rndm = new Random();\n while (output.size() < size) {\n int author = rndm.nextInt(40);\n int review = rndm.nextInt(5) + 1;\n output.put(author, review);\n }\n return output;\n }", "public static void main(String[] args) \n\t { \n\t\t \n\t//\t ScrabbleCheater11 cheat = new ScrabbleCheater11();\n\t//\t Dictionary11 dict = new Dictionary11(1,\"C:\\\\words\\\\words-279k.txt\");\n\t \n\t\t MyHashTable11 htable = new MyHashTable11(7591,\"src/lab11_scrabble/wordsList_collins2019.txt\"); \n\t \t\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"against\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"against\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"against\");\n\t \n\t \tSystem.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"airport\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"airport\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"airport\");\n\t \t\n\t \tSystem.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"between\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"between\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"between\");\n\n\t \tSystem.out.println();\n\t\t System.out.print(\"All the words in the bucket where the word \"+ \"\\\"married\\\"\" + \" is located: \");\n\t\t System.out.println();htable.getWordsFromSameBucket(\"married\");\n\t\t System.out.println();\n\t\t System.out.println();\n\t\t htable.findPermutation(\"married\");\n\t\t \n\t\t System.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"ashbdap\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"ashbdap\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"ashbdap\");\n\t \t\n\t \t//test remove and size()\n\t \tSystem.out.println(htable.remove(\"speaned\"));\n\t \tSystem.out.println(htable.get(\"speaned\"));\n\t \tSystem.out.println(htable.size());\n\t }", "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 }", "private void createHash() throws IOException\n\t{\n\t\tmap = new HashMap<String, ImageIcon>();\n\t\t\n\t\tfor(int i = 0; i < pokemonNames.length; i++)\n\t\t{\n\t\t\tmap.put(pokemonNames[i], new ImageIcon(getClass().getResource(fileLocations[i])));\n\t\t}\n\t}", "public static HashMap check() {\n HashMap<String, Double> distGen = new HashMap<>();\n for (int i = 0; i < hMap.size(); i++) {\n double dist = 0.0;\n\n /**\n * calculating eucledean distance\n * */\n\n for (int j = 0; j < hMap.get(genres[i]).length; j++) {\n dist = dist + (Math.pow((hMap.get(genres[i])[j] - newWordPercentages[j]), 2));\n }\n dist = Math.sqrt(dist);\n dist = Math.abs(dist);\n distGen.put(genres[i], dist);\n }\n\n return distGen;\n }", "private Map<Integer, Mdr5Record> makeCityMap(MapReader mr) {\n \t\tList<City> cities = mr.getCities();\n \n \t\tMap<Integer, Mdr5Record> cityMap = new LinkedHashMap<Integer, Mdr5Record>();\n \t\tfor (City c : cities) {\n \t\t\tint key = (c.getSubdivNumber() << 8) + (c.getPointIndex() & 0xff);\n \t\t\tassert key < 0xffffff;\n \t\t\tcityMap.put(key, new Mdr5Record(c));\n \t\t}\n \n \t\treturn cityMap;\n \t}", "private Map<String, String> getDirectory() {\n return new HashMap<>() {{\n put(\"Moran Lin\", \"1111111111\"); // 546*6*\n put(\"Ming Kho\", \"2222222222\"); // 546*6*\n put(\"Sam Haboush\", \"3333333333\"); // 4226874*7*\n put(\"Heidi Haboush\", \"4444444444\"); // 4226874*4*\n put(\"Hakeem Haboush\", \"5555555555\"); // 4226874*4*\n put(\"Amanda Holden\", \"6666666666\"); // 465336*2*\n put(\"Megan Fox\", \"7777777777\"); // 369*6*\n put(\"Kate Moss\", \"8888888888\"); // 6677*5*\n put(\"Sarah Louche\", \"9999999999\"); // 568243*7*\n put(\"Cameron Diaz\", \"0000000000\"); // 3429*2*\n// put(\"Heidi Klum\", \"1212121212\"); // 5586*4* doesn't exist in dictionary\n }};\n }", "public static void fill_map(){\n\t\tcategory_links_map.put(\"Categories\", \"Movies\");\n\t\tcategory_links_map.put(\"Actors\", \"Movies\");\n\t\tcategory_links_map.put(\"Movies\", \"Actors\");\n\t\tcategory_links_map.put(\"Artists\", \"Creations\");\n\t\tcategory_links_map.put(\"Creations\", \"Artists\");\n\t\tcategory_links_map.put(\"Countries\", \"Locations\");\n\t\tcategory_links_map.put(\"Locations\", \"Countries\");\n\t\tcategory_links_map.put(\"NBA players\", \"NBA teams\");\n\t\tcategory_links_map.put(\"NBA teams\", \"NBA players\");\n\t\tcategory_links_map.put(\"Israeli soccer players\", \"Israeli soccer teams\");\n\t\tcategory_links_map.put(\"Israeli soccer teams\", \"Israeli soccer players\");\n\t\tcategory_links_map.put(\"World soccer players\", \"World soccer teams\");\n\t\tcategory_links_map.put(\"World soccer teams\", \"World soccer players\");\n\t}", "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 static void main(String[] args) {\n List<String> words = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(\"google-10000-english-no-swears.txt\"))) {\n while (br.ready()) {\n words.add(br.readLine().toLowerCase());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n //send a message to rose with the word cookie and your team name to get the next clue\n List<String> cipherWords = new ArrayList<>(Arrays.asList(cipher.split(\" \")));\n\n\n HashMap<Character, List<String>> charOccurrences = new HashMap<>();\n //Add all words where a character occurs to a list then map that list to the character\n for (String cipherWord : cipherWords) {\n for (Character ch : cipherWord.toCharArray()) {\n for (String cipherWord2 : cipherWords) {\n if (cipherWord2.contains(ch.toString())) {\n if (charOccurrences.get(ch) == null) {\n charOccurrences.put(ch, (new ArrayList<>(Collections.singletonList(cipherWord2))));\n } else {\n if (!charOccurrences.get(ch).contains(cipherWord2)) {\n charOccurrences.get(ch).add(cipherWord2);\n }\n }\n }\n }\n }\n }\n HashMap<Character, List<Character>> possibleChars = new HashMap<>();\n //Map all characters to a list of all characters which it could possibly be\n for (Map.Entry<Character, List<String>> entry : charOccurrences.entrySet()) {\n Character key = entry.getKey();\n List<String> value = entry.getValue();\n\n List<List<Character>> lists = new ArrayList<>();\n\n for (String string : value) {\n List<Character> characterList = new ArrayList<>();\n for (String patternMatch : getMatches(string, words)) {\n if (!characterList.contains(patternMatch.charAt(string.indexOf(key)))) {\n characterList.add(patternMatch.charAt(string.indexOf(key)));\n }\n }\n lists.add(characterList);\n }\n possibleChars.put(key, findDupes(lists));\n }\n\n HashMap<Character, Character> keyMap = new HashMap<>();\n\n removeCharacter(possibleChars, keyMap, true);\n\n\n //Loop a bunch of times to eliminate things that characters cant be\n for (int x = 0; x < 10; x++) {\n HashMap<Character, List<Character>> tempMap = new HashMap<>(possibleChars);\n possibleChars.clear();\n for (Map.Entry<Character, List<String>> entry : charOccurrences.entrySet()) {\n Character key = entry.getKey();\n List<String> value = entry.getValue();\n\n List<List<Character>> lists = new ArrayList<>();\n\n for (String string : value) {\n List<Character> characterList = new ArrayList<>();\n for (String patternMatch : getMatchesWithLetters(string, keyMap, tempMap, words)) {\n if (!characterList.contains(patternMatch.charAt(string.indexOf(key)))) {\n characterList.add(patternMatch.charAt(string.indexOf(key)));\n }\n }\n lists.add(characterList);\n }\n possibleChars.put(key, findDupes(lists));\n }\n\n keyMap.clear();\n\n removeCharacter(possibleChars, keyMap, true);\n\n }\n\n System.out.println(cipher);\n //print with a lil bit of frequency analysis to pick most common word if word has multiple possible results\n for (String str : cipherWords) {\n String temp = \"\";\n List<String> matchedWords = getMatchesWithLetters(str, keyMap, possibleChars, words);\n if (matchedWords.size() > 1) {\n int highest = 0;\n for (int x = 1; x < matchedWords.size(); x++) {\n if (words.indexOf(matchedWords.get(highest)) > words.indexOf(matchedWords.get(x))) {\n highest = x;\n }\n }\n temp = matchedWords.get(highest);\n }\n\n if (matchedWords.size() == 1) { //if there only 1 possibility print it.\n System.out.print(matchedWords.get(0));\n System.out.print(\" \");\n } else { //if there's more than 1 print the most common one.\n System.out.print(temp);\n System.out.print(\" \");\n }\n }\n }", "public static Map<Integer, TaxCategory> britishColumbia() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(5.06, 0, 42184.00); // Tax Category 1 for BC\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(7.70, 42184.01, 84369.00); // Tax Category 2 for BC\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(10.50, 84369.01, 96866.00); // Tax Category 3 for BC\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(12.29, 96866.01, 117623.00); // Tax Category 4 for BC\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(14.70, 117623.01, 159483.00); // Tax Category 5 for BC\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\t\t\t\tTaxCategory cat6 = new TaxCategory(16.80, 159483.01, 222420.00); // Tax Category 6 for BC\n\t\t\t\tcategories.put( 6, cat6 );//puts both the key and the Taxcategory(value) into the hashmap for category 6\n\t\t\t\tTaxCategory cat7 = new TaxCategory(20.50, 222420.01, 10000000); // Tax Category 7 for BC\n\t\t\t\tcategories.put( 7, cat7 );//puts both the key and the Taxcategory(value) into the hashmap for category 7\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private static Map<Character, Color> createColorMap() {\n\n final Map<Character, Color> map = new HashMap<Character, Color>();\n map.put(' ', NO_COLOR);\n map.put(Block.I.getChar(), I_COLOR);\n map.put(Block.O.getChar(), O_COLOR);\n map.put(Block.J.getChar(), J_COLOR);\n map.put(Block.L.getChar(), L_COLOR);\n map.put(Block.Z.getChar(), Z_COLOR);\n map.put(Block.S.getChar(), S_COLOR);\n map.put(Block.T.getChar(), T_COLOR);\n return map;\n }", "private Map<String, Object> createDefaultMap() {\n Map<String, Object> result = new LinkedHashMap<>();\n result.put(\"stream_speed0\", 1);\n result.put(\"stream_start0\", 0);\n result.put(\"stream_end0\", 7);\n result.put(\"stream_speed1\", -2);\n result.put(\"stream_start1\", 15);\n result.put(\"stream_end1\", 19);\n\n result.put(\"fish_quantity\", numFishes);\n result.put(\"fish_reproduction\", 3);\n result.put(\"fish_live\", 10);\n result.put(\"fish_speed\", 2);\n result.put(\"fish_radius\", 4);\n\n result.put(\"shark_quantity\", numSharks);\n result.put(\"shark_live\", 20);\n result.put(\"shark_hungry\", 7);\n result.put(\"shark_speed\", 2);\n result.put(\"shark_radius\", 5);\n\n return result;\n }", "public abstract Map<String, Protein> getProteins();", "@Override\n public void createDeck(){\n for (char suit:standardSuits) {\n for (Map.Entry<Character, Integer> item:deckCards.entrySet()) {\n Card card = new Card(item.getKey(),item.getValue(),suit);\n deckOfCards.add(card);\n }\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\r\n\t\tRandom random = new Random();\r\n\t\tMap<String, String[][]> mapTM = new HashMap<String, String[][]>();\r\n\t\tMap<String, List<String>> map = new HashMap<String, List<String>>();\r\n\r\n\t\tArrayList<String> list1 = new ArrayList<String>();\r\n\t\tlist1.add(\"T\");\r\n\t\tlist1.add(\"E\");\r\n\t\tlist1.add(\"M\");\r\n\t\tlist1.add(\"P\");\r\n\t\tlist1.add(\"C\");\r\n\t\tlist1.add(\"SS\");\r\n\r\n\t\tArrayList<String> list2 = new ArrayList<String>();\r\n\t\tlist2.add(\"T\");\r\n\t\tlist2.add(\"E\");\r\n\t\tlist2.add(\"M\");\r\n\t\tlist2.add(\"P\");\r\n\t\tlist2.add(\"C\");\r\n\t\tlist2.add(\"SS\");\r\n\r\n\t\tArrayList<String> list3 = new ArrayList<String>();\r\n\t\tlist3.add(\"T\");\r\n\t\tlist3.add(\"E\");\r\n\t\tlist3.add(\"M\");\r\n\t\tlist3.add(\"P\");\r\n\t\tlist3.add(\"C\");\r\n\t\tlist3.add(\"SS\");\r\n\t\t\r\n\t\tArrayList<String> list4 = new ArrayList<String>();\r\n\t\tlist4.add(\"T\");\r\n\t\tlist4.add(\"Ex\");\r\n\t\tlist4.add(\"M\");\r\n\t\tlist4.add(\"Px\");\r\n\t\tlist4.add(\"C\");\r\n\t\tlist4.add(\"ScS\");\r\n\r\n\t\tArrayList<String> list5 = new ArrayList<String>();\r\n\t\tlist5.add(\"Tf\");\r\n\t\tlist5.add(\"E\");\r\n\t\tlist5.add(\"M\");\r\n\t\tlist5.add(\"Pd\");\r\n\t\tlist5.add(\"C\");\r\n\t\tlist5.add(\"SS\");\r\n\r\n\t\tArrayList<String> list6 = new ArrayList<String>();\r\n\t\tlist6.add(\"Tf\");\r\n\t\tlist6.add(\"E\");\r\n\t\tlist6.add(\"Mf\");\r\n\t\tlist6.add(\"P\");\r\n\t\tlist6.add(\"Cd\");\r\n\t\tlist6.add(\"SS\");\r\n\r\n\t\tmap.put(\"C1\", list1);\r\n\t\tmap.put(\"C2\", list2);\r\n\t\tmap.put(\"C3\", list3);\r\n\t\tmap.put(\"C4\", list4);\r\n\t\tmap.put(\"C5\", list5);\r\n\t\tmap.put(\"C6\", list6);\r\n\t\t\r\n\t\tList<String> keys = new ArrayList<String>(map.keySet());\r\n\t\tCollections.shuffle(keys);\r\n\r\n\t\tfor (Object string : keys) {\r\n\t\t\tint row = 6;\r\n\t\t\tint column = 8;\r\n\t\t\tint i = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tboolean reset =false;\r\n\t\t\tString[][] stringArray = new String[row][column];\r\n\t\t\tList<String> temp = map.get(string);\r\n\t\t\tCollections.shuffle(temp);\r\n\t\t\tfor (int iterator = 0; iterator < column; iterator++) {\r\n\t\t\t\t\r\n\t\t\t\tif(iterator >= temp.size()){\r\n\t\t\t\t\tint randomInteger = random.nextInt(temp.size());\r\n\t\t\t\t\tstringArray[i][j] = temp.get(randomInteger);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstringArray[i][j] = temp.get(iterator);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor(Object string01 : keys){\r\n\t\t\t\t\tif(mapTM.get(string01) != null && !string01.equals(string)){\r\n\t\t\t\t\t\tString[][] temp01 = mapTM.get(string01);\r\n\t\t\t\t\t\tif(temp01[i][j] != null && temp01[i][j].equals(stringArray[i][j])){\r\n\t\t\t\t\t\t\tj = 0;\r\n\t\t\t\t\t\t\tCollections.shuffle(temp);\r\n\t\t\t\t\t\t\titerator = -1;\r\n\t\t\t\t\t\t\treset = true;\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\tif(reset){\r\n\t\t\t\t\treset = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (j < column && j != column - 1) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t} else if (j == column - 1 && i != row - 1) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\tCollections.shuffle(temp);\r\n\t\t\t\t\titerator = -1;\r\n\t\t\t\t} else if (j == column - 1 && i == row - 1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmapTM.put((String) string, stringArray);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Map.Entry<String, String[][]> entry : mapTM.entrySet()) {\r\n\t\t\tSystem.out.println(entry.getKey());\r\n\t\t\tSystem.out.println(Arrays.deepToString(entry.getValue()));\r\n\t\t}\r\n\r\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 static Map<String, String> presToLogicalMap() {\n Map<String, String> rules = new HashMap<>();\n\n // PRESENTATION FORM TO LOGICAL FORM NORMALIZATION (presentation form is rarely used - but some UN documents have it).\n rules.put(\"\\\\ufc5e\", \"\\u0020\\u064c\\u0651\"); // ligature shadda with dammatan isloated\n rules.put(\"\\\\ufc5f\", \"\\u0020\\u064d\\u0651\"); // ligature shadda with kasratan isloated\n rules.put(\"\\\\ufc60\", \"\\u0020\\u064e\\u0651\"); // ligature shadda with fatha isloated\n rules.put(\"\\\\ufc61\", \"\\u0020\\u064f\\u0651\"); // ligature shadda with damma isloated\n rules.put(\"\\\\ufc62\", \"\\u0020\\u0650\\u0651\"); // ligature shadda with kasra isloated\n // Arabic Presentation Form-B to Logical Form\n rules.put(\"\\\\ufe80\", \"\\u0621\"); // isolated hamza\n rules.put(\"[\\\\ufe81\\\\ufe82]\", \"\\u0622\"); // alef with madda\n rules.put(\"[\\\\ufe83\\\\ufe84]\", \"\\u0623\"); // alef with hamza above\n rules.put(\"[\\\\ufe85\\\\ufe86]\", \"\\u0624\"); // waw with hamza above\n rules.put(\"[\\\\ufe87\\\\ufe88]\", \"\\u0625\"); // alef with hamza below\n rules.put(\"[\\\\ufe89\\\\ufe8a\\\\ufe8b\\\\ufe8c]\", \"\\u0626\"); // yeh with hamza above\n rules.put(\"[\\\\ufe8d\\\\ufe8e]\", \"\\u0627\"); // alef\n rules.put(\"[\\\\ufe8f\\\\ufe90\\\\ufe91\\\\ufe92]\", \"\\u0628\"); // beh\n rules.put(\"[\\\\ufe93\\\\ufe94]\", \"\\u0629\"); // teh marbuta\n rules.put(\"[\\\\ufe95\\\\ufe96\\\\ufe97\\\\ufe98]\", \"\\u062a\"); // teh\n rules.put(\"[\\\\ufe99\\\\ufe9a\\\\ufe9b\\\\ufe9c]\", \"\\u062b\"); // theh\n rules.put(\"[\\\\ufe9d\\\\ufe9e\\\\ufe9f\\\\ufea0]\", \"\\u062c\"); // jeem\n rules.put(\"[\\\\ufea1\\\\ufea2\\\\ufea3\\\\ufea4]\", \"\\u062d\"); // haa\n rules.put(\"[\\\\ufea5\\\\ufea6\\\\ufea7\\\\ufea8]\", \"\\u062e\"); // khaa\n rules.put(\"[\\\\ufea9\\\\ufeaa]\", \"\\u062f\"); // dal\n rules.put(\"[\\\\ufeab\\\\ufeac]\", \"\\u0630\"); // dhal\n rules.put(\"[\\\\ufead\\\\ufeae]\", \"\\u0631\"); // reh\n rules.put(\"[\\\\ufeaf\\\\ufeb0]\", \"\\u0632\"); // zain\n rules.put(\"[\\\\ufeb1\\\\ufeb2\\\\ufeb3\\\\ufeb4]\", \"\\u0633\"); // seen\n rules.put(\"[\\\\ufeb5\\\\ufeb6\\\\ufeb7\\\\ufeb8]\", \"\\u0634\"); // sheen\n rules.put(\"[\\\\ufeb9\\\\ufeba\\\\ufebb\\\\ufebc]\", \"\\u0635\"); // sad\n rules.put(\"[\\\\ufebd\\\\ufebe\\\\ufebf\\\\ufec0]\", \"\\u0636\"); // dad\n rules.put(\"[\\\\ufec1\\\\ufec2\\\\ufec3\\\\ufec4]\", \"\\u0637\"); // tah\n rules.put(\"[\\\\ufec5\\\\ufec6\\\\ufec7\\\\ufec8]\", \"\\u0638\"); // zah\n rules.put(\"[\\\\ufec9\\\\ufeca\\\\ufecb\\\\ufecc]\", \"\\u0639\"); // ain\n rules.put(\"[\\\\ufecd\\\\ufece\\\\ufecf\\\\ufed0]\", \"\\u063a\"); // ghain\n rules.put(\"[\\\\ufed1\\\\ufed2\\\\ufed3\\\\ufed4]\", \"\\u0641\"); // feh\n rules.put(\"[\\\\ufed5\\\\ufed6\\\\ufed7\\\\ufed8]\", \"\\u0642\"); // qaf\n rules.put(\"[\\\\ufed9\\\\ufeda\\\\ufedb\\\\ufedc]\", \"\\u0643\"); // kaf\n rules.put(\"[\\\\ufedd\\\\ufede\\\\ufedf\\\\ufee0]\", \"\\u0644\"); // ghain\n rules.put(\"[\\\\ufee1\\\\ufee2\\\\ufee3\\\\ufee4]\", \"\\u0645\"); // meem\n rules.put(\"[\\\\ufee5\\\\ufee6\\\\ufee7\\\\ufee8]\", \"\\u0646\"); // noon\n rules.put(\"[\\\\ufee9\\\\ufeea\\\\ufeeb\\\\ufeec]\", \"\\u0647\"); // heh\n rules.put(\"[\\\\ufeed\\\\ufeee]\", \"\\u0648\"); // waw\n rules.put(\"[\\\\ufeef\\\\ufef0]\", \"\\u0649\"); // alef maksura\n rules.put(\"[\\\\ufef1\\\\ufef2\\\\ufef3\\\\ufef4]\", \"\\u064a\"); // yeh\n rules.put(\"[\\\\ufef5\\\\ufef6]\", \"\\u0644\\u0622\"); // ligature: lam and alef with madda above\n rules.put(\"[\\\\ufef7\\\\ufef8]\", \"\\u0644\\u0623\"); // ligature: lam and alef with hamza above\n rules.put(\"[\\\\ufef9\\\\ufefa]\", \"\\u0644\\u0625\"); // ligature: lam and alef with hamza below\n rules.put(\"[\\\\ufefb\\\\ufefc]\", \"\\u0644\\u0627\"); // ligature: lam and alef\n\n return rules;\n\n }", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\t\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\tint langCount = 0;\r\n\t\t\tint kmerCount = 0;\r\n\t\t\tSet<Language> keys = getDb().keySet();\r\n\t\t\tfor (Language lang : keys) {\r\n\t\t\t\tlangCount++;\r\n\t\t\t\tsb.append(lang.name() + \"->\\n\");\r\n\t\t\t\t \r\n\t\t\t\t Collection<LanguageEntry> m = new TreeSet<>(getDb().get(lang).values());\r\n\t\t\t\t kmerCount += m.size();\r\n\t\t\t\t for (LanguageEntry le : m) {\r\n\t\t\t\t\t sb.append(\"\\t\" + le + \"\\n\");\r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tsb.append(kmerCount + \" total k-mers in \" + langCount + \" languages\"); \r\n\t\t\treturn sb.toString();\r\n\t\t\t}", "public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }", "public static void loadCharGerKeyWordToClassTable() {\n CharGerXMLTagNameToClassName.setProperty( \"Graph\", \"Graph\" );\n CharGerXMLTagNameToClassName.setProperty( \"Concept\", \"Concept\" );\n CharGerXMLTagNameToClassName.setProperty( \"Relation\", \"Relation\" );\n CharGerXMLTagNameToClassName.setProperty( \"Actor\", \"Actor\" );\n CharGerXMLTagNameToClassName.setProperty( \"TypeLabel\", \"TypeLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"CGType\", \"TypeLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"RelationLabel\", \"RelationLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"CGRelType\", \"RelationLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"Arrow\", \"Arrow\" );\n CharGerXMLTagNameToClassName.setProperty( \"GenSpecLink\", \"GenSpecLink\" );\n CharGerXMLTagNameToClassName.setProperty( \"Coref\", \"Coref\" );\n CharGerXMLTagNameToClassName.setProperty( \"Note\", \"Note\" );\n\n CharGerXMLTagNameToClassName.setProperty( \"graph\", \"Graph\" );\n CharGerXMLTagNameToClassName.setProperty( \"concept\", \"Concept\" );\n CharGerXMLTagNameToClassName.setProperty( \"relation\", \"Relation\" );\n CharGerXMLTagNameToClassName.setProperty( \"actor\", \"Actor\" );\n CharGerXMLTagNameToClassName.setProperty( \"typelabel\", \"TypeLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"relationlabel\", \"RelationLabel\" );\n CharGerXMLTagNameToClassName.setProperty( \"arrow\", \"Arrow\" );\n CharGerXMLTagNameToClassName.setProperty( \"genspeclink\", \"GenSpecLink\" );\n CharGerXMLTagNameToClassName.setProperty( \"coref\", \"Coref\" );\n CharGerXMLTagNameToClassName.setProperty( \"customedge\", \"CustomEdge\" );\n CharGerXMLTagNameToClassName.setProperty( \"note\", \"Note\" );\n }", "public void cargarHashMap() throws IOException {\r\n\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.BUTTERFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/butterfly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.AMOEBA,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/amoeba.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGDIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.WALL,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/wall.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIRT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/dirt.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EMPTY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/empty.jpg\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.PLAYER,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/rockford.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.ROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FIREFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/firefly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.TITANIUM,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/steel.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EXIT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/exit.gif\")));\r\n\t\t//imagenes.put(\r\n\t\t\t//\tBDTile.EXPLOSION,\r\n\t\t\t\t//toolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t//\t.getResource(\"resources/explosion.gif\")));\r\n\r\n\t}", "public static void toCipher() {\n\t\tString symbols = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t\tint current = 0;\n\t\tString cipher = \"\";\n\t\tMap<String, Character> map = new HashMap<String, Character>();\n\t\t\n\t\tfor (String[] page : pages) {\n\t\t\tfor (String key : page) {\n\t\t\t\tCharacter val = map.get(key);\n\t\t\t\tif (val == null) {\n\t\t\t\t\tval = symbols.charAt(current++);\n\t\t\t\t\tSystem.out.println(\"KEY/VAL: \" + key + \" = \" + val);\n\t\t\t\t\tSystem.out.println(\"VAL/KEY: \" + val + \" = \" + key);\n\t\t\t\t}\n\t\t\t\tmap.put(key, val);\n\t\t\t\tcipher += val;\n\t\t\t}\n\t\t\tSystem.out.println(cipher);\n\t\t\tcipher = \"\";\n\t\t}\n\t}", "public static void mainx(String[] args) {\n\t\tPrintWriter outputFile = null;\r\n\t\t\r\nSystem.out.println(\"Test Teacher Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"teacherdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>ZAK_B\");\r\n\t\toutputFile.println(\"<NAME>Zakaria Baani\");\r\n\t\toutputFile.println(\"<EMAIL>zakb@debug.fakecentury.edu\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>MAH_E\");\r\n\t\toutputFile.println(\"<NAME>Mahmoud Eid\");\r\n\t\toutputFile.println(\"<EMAIL>mahe@debug.fakecentury.edu\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>BRI_J\");\r\n\t\toutputFile.println(\"<NAME>Brian Jenson\");\r\n\t\toutputFile.println(\"<EMAIL>brij@debug.fakecentury.edu\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\tTeacherDictionary teachers = new TeacherDictionary();\r\n\t\tSystem.out.println(teachers);\r\n\t\t\r\n\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"classdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\nSystem.out.println(\"Test Room Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"roomdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>W101\");\r\n\t\toutputFile.println(\"<NAME>West 101\");\r\n\t\toutputFile.println(\"<CAPACITY>25\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>E2213\");\r\n\t\toutputFile.println(\"<NAME>East 2213\");\r\n\t\toutputFile.println(\"<CAPACITY>45\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>E1001\");\r\n\t\toutputFile.println(\"<NAME>East 1001\");\r\n\t\toutputFile.println(\"<CAPACITY>60\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\tRoomDictionary rooms = new RoomDictionary();\r\n\t\tSystem.out.println(rooms);\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * class\r\n\t\t * \r\n\t\t * <ENTRYSTART>\r\n\t\t * <TITLE>\r\n\t\t * <TEACHER>\r\n\t\t * <STUDENTCOUNT>\r\n\t\t * <STUDENTLIST>\r\n\t\t * <SCHEDULE>\r\n\t\t * <ENTRYEND>\r\n\t\t * \r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Test Class Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"classdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<TITLE>MATH 2081_1\");\r\n\t\toutputFile.println(\"<TEACHER>BRIAN_J\");\r\n\t\toutputFile.println(\"<SCHEDULE>MATH 2081_1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTCOUNT>15\");\r\n\t\toutputFile.println(\"<STUDENTLIST>CATHY4\");\r\n\t\toutputFile.println(\"<STUDENTLIST>DAN5\");\r\n\t\toutputFile.println(\"<STUDENTLIST>EVE6\");\r\n\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<TITLE>PHYS 1082_1\");\r\n\t\toutputFile.println(\"<TEACHER>MAHMOOD_E\");\r\n\t\toutputFile.println(\"<SCHEDULE>PHYS 1082_1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTCOUNT>20\");\r\n\t\toutputFile.println(\"<STUDENTLIST>FRANK7\");\r\n\t\toutputFile.println(\"<STUDENTLIST>GRACE8\");\r\n\t\toutputFile.println(\"<STUDENTLIST>HENRY9\");\r\n\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\t\t\toutputFile.println(\"<TITLE>CSCI 1082_2\");\r\n\t\t\t\toutputFile.println(\"<TEACHER>ZACH_B\");\r\n\t\t\t\toutputFile.println(\"<SCHEDULE>CSCI 1082_2\");\r\n\t\t\t\t\t\toutputFile.println(\"<STUDENTCOUNT>15\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>AARON1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>AMY2\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>BOB3\");\r\n\t\t\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\t///\r\n\t\t//DictionaryFile testDictionary = new DictionaryFile(\"classdictionary.txt\",\"ClassDictionary\");\r\n\t\tClassDictionary testDictionary = new ClassDictionary();\r\n//\t\tSystem.out.println(testDictionary.getEntryCount());\r\n//\t\tSystem.out.println(testDictionary.getOpenStatus());\r\n//\t\tSystem.out.println(testDictionary.isValid());\r\n\t\tSystem.out.println(testDictionary);\r\n\t\t\r\n\t\tCalendar calendar = new GregorianCalendar();\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHH\");\r\n\t\tSystem.out.println(df.format(calendar.getTime()));\r\n\r\n\t}", "private void generateCandies(){\n\t\tfor (int i = 0; i < 16; i++){\n\t\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tCandy candy = new Candy(coordX, coordY, i);\n\t\t\tcandies.put(i, candy);\n\t\t}\n\t}", "private void populateDictionaryBySynonyms() {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n ArrayList<String> synonyms = PyDictionary.findSynonyms(word);\n\n for (int i = 0; i < synonyms.size(); i++) {\n if (!dictionaryTerms.containsKey(synonyms.get(i))) {\n dictionaryTerms.put(synonyms.get(i), tag);\n }\n }\n }\n }", "private static Map generateKeyStrokeMappings() {\n Log.debug(\"Generating default keystroke mappings\");\n // character, keycode, modifiers\n int shift = InputEvent.SHIFT_MASK;\n //int alt = InputEvent.ALT_MASK;\n //int altg = InputEvent.ALT_GRAPH_MASK;\n int ctrl = InputEvent.CTRL_MASK;\n //int meta = InputEvent.META_MASK;\n // These are assumed to be standard across all keyboards (?)\n int[][] universalMappings = {\n { '\u001b', KeyEvent.VK_ESCAPE, 0 }, // No escape sequence exists\n { '\\b', KeyEvent.VK_BACK_SPACE, 0 },\n { '', KeyEvent.VK_DELETE, 0 }, // None for this one either\n { '\\n', KeyEvent.VK_ENTER, 0 },\n { '\\r', KeyEvent.VK_ENTER, 0 },\n };\n // Add to these as needed; note that this is based on a US keyboard\n // mapping, and will likely fail for others.\n int[][] mappings = {\n { ' ', KeyEvent.VK_SPACE, 0, },\n { '\\t', KeyEvent.VK_TAB, 0, },\n { '~', KeyEvent.VK_BACK_QUOTE, shift, },\n { '`', KeyEvent.VK_BACK_QUOTE, 0, },\n { '!', KeyEvent.VK_1, shift, },\n { '@', KeyEvent.VK_2, shift, },\n { '#', KeyEvent.VK_3, shift, },\n { '$', KeyEvent.VK_4, shift, },\n { '%', KeyEvent.VK_5, shift, },\n { '^', KeyEvent.VK_6, shift, },\n { '&', KeyEvent.VK_7, shift, },\n { '*', KeyEvent.VK_8, shift, },\n { '(', KeyEvent.VK_9, shift, },\n { ')', KeyEvent.VK_0, shift, },\n { '-', KeyEvent.VK_MINUS, 0, },\n { '_', KeyEvent.VK_MINUS, shift, },\n { '=', KeyEvent.VK_EQUALS, 0, },\n { '+', KeyEvent.VK_EQUALS, shift, },\n { '[', KeyEvent.VK_OPEN_BRACKET, 0, },\n { '{', KeyEvent.VK_OPEN_BRACKET, shift, },\n // NOTE: The following does NOT produce a left brace\n //{ '{', KeyEvent.VK_BRACELEFT, 0, },\n { ']', KeyEvent.VK_CLOSE_BRACKET, 0, },\n { '}', KeyEvent.VK_CLOSE_BRACKET, shift, },\n { '|', KeyEvent.VK_BACK_SLASH, shift, },\n { ';', KeyEvent.VK_SEMICOLON, 0, },\n { ':', KeyEvent.VK_SEMICOLON, shift, },\n { ',', KeyEvent.VK_COMMA, 0, },\n { '<', KeyEvent.VK_COMMA, shift, },\n { '.', KeyEvent.VK_PERIOD, 0, },\n { '>', KeyEvent.VK_PERIOD, shift, },\n { '/', KeyEvent.VK_SLASH, 0, },\n { '?', KeyEvent.VK_SLASH, shift, },\n { '\\\\', KeyEvent.VK_BACK_SLASH, 0, },\n { '|', KeyEvent.VK_BACK_SLASH, shift, },\n { '\\'', KeyEvent.VK_QUOTE, 0, },\n { '\"', KeyEvent.VK_QUOTE, shift, },\n };\n HashMap map = new HashMap();\n // Universal mappings\n for (int i=0;i < universalMappings.length;i++) {\n int[] entry = universalMappings[i];\n KeyStroke stroke = KeyStroke.getKeyStroke(entry[1], entry[2]);\n map.put(new Character((char)entry[0]), stroke);\n }\n\n // If the locale is not en_US/GB, provide only a very basic map and\n // rely on key_typed events instead\n Locale locale = Locale.getDefault();\n if (!Locale.US.equals(locale) && !Locale.UK.equals(locale)) {\n Log.debug(\"Not US: \" + locale);\n return map;\n }\n\n // Basic symbol/punctuation mappings\n for (int i=0;i < mappings.length;i++) {\n int[] entry = mappings[i];\n KeyStroke stroke = KeyStroke.getKeyStroke(entry[1], entry[2]);\n map.put(new Character((char)entry[0]), stroke);\n }\n // Lowercase\n for (int i='a';i <= 'z';i++) {\n KeyStroke stroke = \n KeyStroke.getKeyStroke(KeyEvent.VK_A + i - 'a', 0);\n map.put(new Character((char)i), stroke);\n // control characters\n stroke = KeyStroke.getKeyStroke(KeyEvent.VK_A + i - 'a', ctrl);\n Character key = new Character((char)(i - 'a' + 1));\n // Make sure we don't overwrite something already there\n if (map.get(key) == null) {\n map.put(key, stroke);\n }\n }\n // Capitals\n for (int i='A';i <= 'Z';i++) {\n KeyStroke stroke = \n KeyStroke.getKeyStroke(KeyEvent.VK_A + i - 'A', shift);\n map.put(new Character((char)i), stroke);\n }\n // digits\n for (int i='0';i <= '9';i++) {\n KeyStroke stroke = \n KeyStroke.getKeyStroke(KeyEvent.VK_0 + i - '0', 0);\n map.put(new Character((char)i), stroke);\n }\n return map;\n }", "private void init() {\n UNIGRAM = new HashMap<>();\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "@Override\n\tpublic Map<IAlgo, Integer> recommandAlgosContained() {\n\t\treturn Collections.EMPTY_MAP;\n\t}" ]
[ "0.64294463", "0.6170731", "0.61554164", "0.6036207", "0.59277564", "0.5866599", "0.58410376", "0.57860696", "0.57122445", "0.56905353", "0.56462526", "0.5626304", "0.5610704", "0.559591", "0.55425334", "0.55252093", "0.5438397", "0.54081154", "0.5407569", "0.54071116", "0.5406445", "0.53680974", "0.5350682", "0.53341085", "0.5321358", "0.5312291", "0.53093153", "0.53063864", "0.5296815", "0.5293868", "0.5263453", "0.5261494", "0.5246254", "0.5243209", "0.52278143", "0.5222244", "0.52217716", "0.52154225", "0.52097464", "0.52093804", "0.51750094", "0.5163754", "0.5134958", "0.51332104", "0.5117702", "0.50962317", "0.5089253", "0.5081196", "0.50711703", "0.5066218", "0.5065621", "0.50638926", "0.5045348", "0.50428396", "0.5029075", "0.50177765", "0.500781", "0.50053465", "0.50028443", "0.50015366", "0.49873197", "0.49819532", "0.4959749", "0.49411288", "0.49410605", "0.49333274", "0.49320728", "0.49308327", "0.4927737", "0.49168348", "0.49082628", "0.4907292", "0.4902284", "0.48976147", "0.48970675", "0.48969766", "0.48926955", "0.4884954", "0.48810488", "0.4878837", "0.48782378", "0.487579", "0.4866692", "0.48642695", "0.48623317", "0.4860418", "0.48561227", "0.4846545", "0.4837876", "0.4836574", "0.4830604", "0.48096725", "0.48040205", "0.48019195", "0.47947103", "0.47939873", "0.47933173", "0.47875464", "0.47866493", "0.47836307" ]
0.83074677
0
mGrowSeedlingsTimeScrollView = (PullToRefreshScrollView) findViewById(R.id.GrowSeedlingsTime_ScrollView);
@Override public void initView() throws Exception { mGrowSeedlingsTimeTextView = (TextView) findViewById(R.id.GrowSeedlingsTime_TextView); mGrowSeedlingsTimeRecyclerView = (RecyclerView) findViewById(R.id.GrowSeedlingsTime_RecyclerView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.pull_to_refresh_scrollview);\r\n\t\tinflater = LayoutInflater.from(this);\r\n\t\tmPullRefreshScrollView = (PullToRefreshScrollView) findViewById(R.id.pull_refresh_scrollview);\r\n\t\tmScrollView = mPullRefreshScrollView.getRefreshableView();\r\n\t\tView view = inflater.inflate(R.layout.text, null);\r\n\t\tmScrollView.addView(view);\r\n\t\t\r\n\t\tmScrollView.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_test);\r\n\t\tPullToRefreshScrollView pullToRefreshScrollView=(PullToRefreshScrollView) findViewById(R.id.test);\r\n\t\tScrollView scrollView=pullToRefreshScrollView.getRefreshableView();\r\n\t\t\r\n\t\tView v=getLayoutInflater().inflate(R.layout.commodities_layout, null);\r\n\t\tscrollView.addView(v);\r\n\t\t\r\n\t}", "@Override\n public void setEventListener(View view) {\n mSwipeRefreshLayout.setOnRefreshListener(this);\n// mProgressBarLoadMore = view.findViewById(R.id.pb_loadmore);\n// mLinearLayoutNoData = view.findViewById(R.id.layout_no_data);\n }", "@Override\n\tpublic void onDownPullRefresh() {\n\t\t\n\t}", "@Override\n public void onRefresh(PullRefreshLayout pullRefreshLayout) {\n pullRefreshLayout.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n refreshLayout.finishRefresh();\n }\n }, 2000);\n }", "private void setupView()\n {\n mPullToRefreshView = (PullToRefreshView)\n findViewById(R.id.main_pull_refresh_view);\n\n mListView = (ListView) findViewById(R.id.xlistView);\n\n }", "void onPull(int scrollY);", "protected void initSwipeRefresh(){\n\t\tif(mSwipeRefreshLayout == null){\n\t\t\tmSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.mswiperefreshlayout);\n\t\t\tmSwipeRefreshLayout.setColorSchemeResources(R.color.holo_blue_bright, \n\t\t R.color.holo_green_light, \n\t\t R.color.holo_orange_light, \n\t\t R.color.holo_red_light);\n\t\t\tmSwipeRefreshLayout.setOnRefreshListener(new OnRefreshListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onRefresh() {\n\t\t\t\t\tonSwipeRefreshLayoutRefresh();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_fragment__branches__ecet, container, false);\n recyclerView = view.findViewById(R.id.recyclebranch);\n\n p=view.findViewById(R.id.progress);\n retry=view.findViewById(R.id.retry);\n r=(SwipeRefreshLayout)view.findViewById(R.id.refreshcollege);\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n retry.setVisibility(View.INVISIBLE);\n\n r.setColorSchemeResources(R.color.cutdown);\n r.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n start(view);\n r.setRefreshing(false);\n }\n },2000);\n }\n });\n\n start(view);\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tweets_list, container, false);\n\n // find the PullToRefreshLayout to setup\n ptrLayout = (PullToRefreshLayout) view.findViewById(R.id.ptrLayout);\n lvTweets = (ListView) view.findViewById(R.id.lvTweets);\n\n tweetAdapter = new TweetAdapter(getActivity(), new ArrayList<Tweet>());\n lvTweets.setAdapter(tweetAdapter);\n\n // Now setup the PullToRefreshLayout\n setupPullToRefresh();\n\n buildTimeline(NO_LAST_TWEET_ID, NO_SINCE_ID);\n\n lvTweets.setOnScrollListener(new EndlessScrollListener() {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n onRequestMore();\n }\n });\n\n return view;\n }", "@Override\n\tprotected void onRefresh(View pullHeaderView) {\n\t\t\n\t}", "private void InitSwipeRefreshUI()\n {\n //Set on refresh functionality\n swipeRefreshLayout = getView().findViewById(R.id.swipeRefresh);\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { //This sets what function is called when we swipe down to refresh\n @Override\n public void onRefresh() {\n OnSwipeRefreshed();\n\n try {\n Field f = swipeRefreshLayout.getClass().getDeclaredField(\"mCircleView\");\n f.setAccessible(true);\n ImageView img = (ImageView)f.get(swipeRefreshLayout);\n\n RotateAnimation rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n rotate.setRepeatMode(Animation.INFINITE);\n rotate.setDuration(1000);\n rotate.setRepeatCount(5);\n rotate.setInterpolator(new LinearInterpolator());\n img.startAnimation(rotate);\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n });\n\n //Set Image of swipe refresh\n try {\n Field f = swipeRefreshLayout.getClass().getDeclaredField(\"mCircleView\");\n f.setAccessible(true);\n ImageView img = (ImageView)f.get(swipeRefreshLayout);\n img.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_amiv_logo_icon_bordered, null));\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n\n\t}", "@Override\r\n public void onRefresh(final PullToRefreshLayout pullToRefreshLayout) {\n pullToRefreshLayout.postDelayed(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n pullToRefreshLayout.refreshFinish(PullToRefreshLayout.SUCCEED);\r\n Toast.makeText(RefreshScrolloListViewActivity.this,\"上拉刷新成功\",Toast.LENGTH_SHORT).show();\r\n }\r\n }, 2000);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_main_story,null);\n mSwipeRefreshLayout = (SwipeRefreshLayout)view.findViewById(R.id.mainFragment_swipeRefreshLayout);\n\n mProgressDialog = new ProgressDialog(getActivity());\n mProgressDialog.setMessage(\"正在载入\");\n mProgressDialog.show();\n mSwipeRefreshLayout.setColorSchemeResources(android.R.color.holo_red_light);\n mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n fetchData();\n }\n });\n\n mSwipeRefreshLayout.setRefreshing(true);\n\n return view;\n }", "@Override\r\n public void onRefresh() {\n\r\n refreshContent();\r\n\r\n }", "private void setPullToRefreshContainer() {\n swipeContainer.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n queryStoriesFromUser();\n }\n });\n }", "@Override\n public void onRefresh() {\n Log.d(\"DEBUG\", \"swipe refresh called\");\n populateTimeline(1L,Long.MAX_VALUE - 1);\n }", "void onRefresh() {\n\t}", "public void onRefresh() {\n }", "@Override\n public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n }", "public abstract void pullToRefresh();", "@Override\r\n\tpublic void onRefresh() {\n\r\n\t}", "@Override\r\n public void onLoadMore(final PullToRefreshLayout pullToRefreshLayout) {\n pullToRefreshLayout.postDelayed(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n pullToRefreshLayout.loadmoreFinish(PullToRefreshLayout.SUCCEED);\r\n Toast.makeText(RefreshScrolloListViewActivity.this,\"下拉加载成功\",Toast.LENGTH_SHORT).show();\r\n }\r\n }, 2000);\r\n }", "@Override\n public void onRefresh(PullToRefreshBase<ListView> refreshView) {\n initListView();\n Toast.makeText(getContext(),\"刷新成功\",Toast.LENGTH_SHORT).show();\n\n }", "protected SwipeRefreshLayout getSwipeRefreshLayout(View parentView) {\n return (SwipeRefreshLayout) parentView.findViewById(R.id.swipe_container);\n }", "@Override\r\n\t\tpublic void onRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\tif (refreshView.isShownFooter()) {\r\n\t\t\t\t// 判断尾布局是否可见,如果可见执行上拉加载更多\r\n\t\t\t\t// 设置尾布局样式文字\r\n\t\t\t\tLoger.d(\"hyytest\", \"???????????????????????\");\r\n\t\t\t\tmPullRefreshListView.getLoadingLayoutProxy().setRefreshingLabel(\r\n\t\t\t\t\t\t\"正在加载\");\r\n\t\t\t\tmPullRefreshListView.getLoadingLayoutProxy().setPullLabel(\"加载更多\");\r\n\t\t\t\tmPullRefreshListView.getLoadingLayoutProxy().setReleaseLabel(\r\n\t\t\t\t\t\t\"释放开始加载\");\r\n\t\t\t\tif (NetworkService.networkBool) {\r\n\t\t\t\t\tpullUpFromSrv(\"aa\");\r\n\t\t\t\t\t// 模拟加载数据线程休息3秒\r\n\t\t\t\t\tnew AsyncTask<Void, Void, Void>() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tLong currenttime = System.currentTimeMillis();\r\n\t\t\t\t\t\t\twhile (!bPullUpStatus) {\r\n\t\t\t\t\t\t\t\tif ((System.currentTimeMillis() - currenttime) > App.WAITFORHTTPTIME+5000) {\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\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\tLoger.i(\"TEST\", \"pullUp置位成功!!\");\r\n\t\t\t\t\t\t\tbPullUpStatus = false;\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tprotected void onPostExecute(Void result) {\r\n\t\t\t\t\t\t\tsuper.onPostExecute(result);\r\n\t\t\t\t\t\t\t// 完成对下拉刷新ListView的更新操作\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\tmaddapter = new RepairCircleAdapter(forumtopicLists, PropertyRepairActivity.this,1);\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// 将下拉视图收起\r\n\t\t\t\t\t\t\tmPullRefreshListView.onRefreshComplete();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}.execute();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void onRefresh() {\n\n\t}", "@Override\n public void onRefresh() {\n OnSwipeRefreshed();\n\n try {\n Field f = swipeRefreshLayout.getClass().getDeclaredField(\"mCircleView\");\n f.setAccessible(true);\n ImageView img = (ImageView)f.get(swipeRefreshLayout);\n\n RotateAnimation rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n rotate.setRepeatMode(Animation.INFINITE);\n rotate.setDuration(1000);\n rotate.setRepeatCount(5);\n rotate.setInterpolator(new LinearInterpolator());\n img.startAnimation(rotate);\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onRefresh() {\n }", "@Override\r\n\t\t\tpublic void onRefresh() {\n\r\n\t\t\t}", "@Override\n\tpublic void onMyRefresh() {\n\t\t\n\t}", "@Override\n\tpublic void onMyRefresh() {\n\t\t\n\t}", "@Override\n\tprotected void findViewById() {\n\t\t\t\n\t\tmIndicator = (SimpleViewPagerIndicator) findViewById(R.id.id_stickynavlayout_indicator);\n\t\tmViewPager = (ViewPager) findViewById(R.id.id_stickynavlayout_viewpager);\n\t\t\n\t\tstickyNavLayout = (StickyNavLayout) findViewById(R.id.stickynavlayout);\n\t\t\n\t\tiv_user_logo = (ImageView) findViewById(R.id.iv_user_logo);\n\t\ttv_main_title = (TextView) findViewById(R.id.tv_main_title);\n\t\ttv_subtitle = (TextView) findViewById(R.id.tv_subtitle);\n\t\ttv_look_num = (TextView) findViewById(R.id.tv_look_num);\n\t\ttv_status = (TextView) findViewById(R.id.tv_status);\n\t\t\n\t\tiv_shuohua = (ImageView) findViewById(R.id.iv_shuohua);\n\t\tiv_operate = (ImageView) findViewById(R.id.iv_operate);\n\t}", "private void findViewById(){\n\t mDeleteBtn = (Button) findViewById(R.id.poster_delete_btn);\n\t mClearBtn = (Button) findViewById(R.id.poster_clear_btn);\n\t posterGridView = (GridView) findViewById(R.id.file_list_view);\n\t noPoster = (TextView)findViewById(R.id.no_poster);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_show_reported_question, container, false);\n\n listViewReportedQuestion = (ListView) view.findViewById(R.id.listViewReportedQuestion);\n arrayList = new ArrayList<ReportQuestionModel>();\n\n swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipeRefreshLayout);\n\n\n swipeRefreshLayout.setOnRefreshListener(this);\n swipeRefreshLayout.post(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(true);\n\n loadReportedQuestions();\n }\n }\n );\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tcontentView = inflater.inflate(R.layout.fragment_qiangcontent, null);\n\t\tmPullRefreshListView = (PullToRefreshListView)contentView\n\t\t\t\t.findViewById(R.id.pull_refresh_list);\n\t\t\n\t\tbt_fragment_arc_menu = (RayMenu) contentView.findViewById(R.id.bt_fragment_arc_menu);\n\t\t//初始化arc_menu并设置监听\n\t\t\t\t\t\tinitArcMenu(bt_fragment_arc_menu, ITEM_DRAWABLES);\n\t\t\t\t\n\t\tnetworkTips = (TextView)contentView.findViewById(R.id.networkTips);\n\t\tprogressbar = (ProgressBar)contentView.findViewById(R.id.progressBar);\n\t\tmPullRefreshListView.setMode(Mode.BOTH);\n\t\tmPullRefreshListView.setOnRefreshListener(new OnRefreshListener2<ListView>() {\n\n\t\t\t@Override\n\t\t\tpublic void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString label = DateUtils.formatDateTime(getActivity(), System.currentTimeMillis(),\n\t\t\t\t\t\tDateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL);\n\t\t\t\trefreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);\n\t\t\t\tmPullRefreshListView.setMode(Mode.BOTH);\n\t\t\t\tpullFromUser = true;\n\t\t\t\tmRefreshType = RefreshType.REFRESH;\n\t\t\t\tpageNum = 0;\n\t\t\t\tlastItemTime = getCurrentTime();\n\t\t\t\taddheaderview.Refresh();\n\t\t\t\tfetchData();\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tmRefreshType = RefreshType.LOAD_MORE;\n\t\t\t\tfetchData();\n\t\t\t}\n\t\t});\n\t\tmPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onLastItemVisible() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tactualListView = mPullRefreshListView.getRefreshableView();\n\t\tmListItems = new ArrayList<QiangYu>();\n\t\tmAdapter = new AIContentAdapter(mContext, mListItems,downloadManager);\n\t\tactualListView.setAdapter(mAdapter);\n\t\t//添加顶部广告轮播\n\t\taddheaderview=new HeaderViewpager(mContext, actualListView);\n\t\taddheaderview.addHeadView();\n\t\taddheaderview.startchange();\n\t\tif(mListItems.size() == 0){\n\t\t\tfetchData();\n\t\t}\n\t\tmPullRefreshListView.setState(State.RELEASE_TO_REFRESH, true);\n\t\tactualListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n//\t\t\t\tMyApplication.getInstance().setCurrentQiangYu(mListItems.get(position-1));\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(getActivity(), CommentActivity.class);\n\t\t\t\tintent.putExtra(\"data\", mListItems.get(position-2));\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().overridePendingTransition (R.anim.open_next, R.anim.close_main);\n\n\t\t\t}\n\t\t});\n\t\treturn contentView;\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n mContext = this;\n setContentView(R.layout.main);\n mScrollLayout = (ScrollLayout) findViewById(R.id.ScrollLayoutTest);\n initViews();\n }", "@Override\n public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n mListener.onHisRefresh();\n\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tLog.d(\"CookFragment\", \"onCreateView\");\n\t\treturn inflater.inflate(R.layout.pull_to_refresh, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n\n View rootView = inflater.inflate(R.layout.fragment_tutor_list, container, false);\n\n rv = (RecyclerView) rootView.findViewById(R.id.rvTutors);\n // rv.setHasFixedSize(true);\n rv.setLayoutManager(new LinearLayoutManager(getActivity()));\n swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipeRefreshLayout);\n\n\n id = this.getArguments().getString(\"session\");\n //Toast.makeText(getContext(),\"Session id \"+id,Toast.LENGTH_SHORT);\n\n connect2server = new getTutors(this.getActivity(), id, list);\n\n connect2server.delegate = this;\n connect2server.execute();\n\n\n swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,\n\n android.R.color.holo_green_light,\n\n android.R.color.holo_orange_light,\n\n android.R.color.holo_red_light);\n\n\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n // Refresh items\n refreshItems();\n }\n });\n\n\n\n return rootView;\n }", "@Override\n public void initView(Bundle savedInstanceState) {\n ButterKnife.inject(this);\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);\n slPostDetail.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {\n @Override\n public void onScrollChange(NestedScrollView v, int x, int y, int oldx, int oldy) {\n if (y <= 0) {\n tvTitle.setBackgroundColor(Color.argb((int) 0, 255, 255, 255));//AGB由相关工具获得,或者美工提供\n tvTitle.setTextColor(Color.argb((int) 0, 255, 255, 255));\n Log.e(\"111\", \"y <= 0\");\n } else if (y > 0 && y <= 50) {\n float scale = (float) y / 100;\n float alpha = (255 * scale);\n // 只是layout背景透明(仿知乎滑动效果)白色透明\n tvTitle.setBackgroundColor(Color.argb((int) alpha, 255, 255, 255));\n // 设置文字颜色,黑色,加透明度\n tvTitle.setTextColor(Color.argb((int) alpha, 0, 0, 0));\n Log.e(\"111\", \"y > 0 && y <= imageHeight\");\n } else {\n//\t\t\t\t\t\t\t白色不透明\n tvTitle.setBackgroundColor(Color.argb((int) 255, 255, 255, 255));\n // 设置文字颜色\n //黑色\n tvTitle.setTextColor(Color.argb((int) 255, 0, 0, 0));\n Log.e(\"111\", \"else\");\n }\n }\n });\n rlDetail.autoRefresh();\n ryComment.setNestedScrollingEnabled(false);\n rlDetail.setOnRefreshListener(new OnRefreshListener() {\n @Override\n public void onRefresh(@NonNull RefreshLayout refreshLayout) {\n GridLayoutManager gridLayoutManager = new GridLayoutManager(UserPostDetailActivity.this, 3);\n ryPostDetail.setLayoutManager(gridLayoutManager);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(UserPostDetailActivity.this);\n ryComment.setLayoutManager(linearLayoutManager);\n refreshLayout.finishRefresh(300);\n }\n });\n\n }", "private void initViews() {\n inflater = LayoutInflater.from(appContext);\n footView = inflater.inflate(R.layout.item_load_more, null);\n footView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n mLoadMoreButton = (Button) footView.findViewById(R.id.loadMore_button);\n progressActivity = (ProgressActivity) rootView.findViewById(R.id.shop_progress);\n //Go_UpButton = (ImageView) rootView.findViewById(R.id.float_imageButton);\n\n mHomePullToRefreshListView = (PullToRefreshRecyclerView) rootView.findViewById(R.id.shop_pullToRefreshListView);\n LinearLayoutManager layoutManager = new LinearLayoutManager(appContext);\n//\t\tStaggeredGridLayoutManager SGlayoutManager = new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL);\n mHomePullToRefreshListView.setLayoutManager(layoutManager);\n mRecViewCartAdapter = new RecViewGoodsSpAdapter(appContext, informationList, R.layout.list_goods);\n mHomePullToRefreshListView.setAdapter(mRecViewCartAdapter);\n mRecViewCartAdapter.addFooterView(footView);\n //mHomePullToRefreshListView.setPullToRefreshOverScrollEnabled(false);\n progressActivity.showLoading();\n loadOnlineInformationData();\n mHomePullToRefreshListView\n .setOnRefreshListener(new OnRefreshListener<RecyclerView>() {\n\n @Override\n public void onRefresh(\n PullToRefreshBase<RecyclerView> refreshView) {\n isEnabledScrollLast = true;\n footView.setVisibility(View.GONE);\n mLoadMoreButton.setVisibility(View.GONE);\n curpageIndex = 1;\n loadOnlineInformationData();\n }\n\n });\n\n // 不显示滚动到顶部/底部的阴影(减少绘制)\n mHomePullToRefreshListView.setOverScrollMode(View.OVER_SCROLL_NEVER);\n mHomePullToRefreshListView.setOnScrollListener(new OnRcvScrollListener() {\n\n @Override\n public void onScrolled(int distanceX, int distanceY) {\n // TODO Auto-generated method stub\n\n }\n\n @Override\n public void onScrollUp() {\n // TODO Auto-generated method stub\n Go_UpButton.setVisibility(View.GONE);\n }\n\n @Override\n public void onScrollDown() {\n // TODO Auto-generated method stub\n Go_UpButton.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onBottom() {\n // TODO Auto-generated method stub\n if (isEnabledScrollLast) {\n footView.setVisibility(View.VISIBLE);\n loadMoreInformationData();\n }\n }\n });\n Go_UpButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n //滚到顶部\n mHomePullToRefreshListView.getRefreshableView().smoothScrollToPosition(0);\n }\n });\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_distribution_norms_warning, container, false);\n unbinder = ButterKnife.bind(this,view);\n strToken = LoginPrefer.getObject(getContext()).access_token;\n strDriverID = LoginPrefer.getObject(getContext()).MaNhanVien;\n swipeRefreshLayout.setOnRefreshListener(this::onRefresh);\n swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary,\n android.R.color.holo_green_dark,\n android.R.color.holo_orange_dark,\n android.R.color.holo_blue_dark);\n\n getDisNormWarning(strDriverID);\n\n swipeRefreshLayout.post(new Runnable() {\n @Override\n public void run() {\n if (swipeRefreshLayout != null){\n swipeRefreshLayout.setRefreshing(true);\n getDisNormWarning(strDriverID);\n }\n\n }\n });\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_discover, container, false);\n refreshView = (SwipeRefreshLayout) root.findViewById(R.id.discover_refresh_layout);\n refreshView.setOnRefreshListener(this);\n recyclerView = (RecyclerView) root.findViewById(R.id.circle_discover_view);\n recyclerView.setHasFixedSize(true);\n layoutManager = new LinearLayoutManager(getContext());\n recyclerView.setLayoutManager(layoutManager);\n\n // set up adapter and its appearance animation\n recyclerView.setAdapter(adapter);\n\n return root;\n }", "@Override\n public void run() {\n BookInfo.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mSwipyRefreshLayout.setRefreshing(false);\n }\n });\n }", "@Override\n public void onRefresh() {\n if(!swipeRefreshLayout.isRefreshing()){\n swipeRefreshLayout.setRefreshing(true);\n }\n progressBar.setVisibility(View.GONE);\n listView.setVisibility(View.GONE);\n loadNotifications();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home, container, false);\n recycler_home = view.findViewById(R.id.recycler_home);\n swipe_refresh = view.findViewById(R.id.swipe_refresh);\n swipe_refresh.setProgressBackgroundColorSchemeColor(getResources().getColor(R.color.colorWhite));\n int col = getResources().getColor(R.color.colorAccent);\n swipe_refresh.setColorSchemeColors(col,col,col);\n progresbar_home = view.findViewById(R.id.progresbar_home);\n main_layout = view.findViewById(R.id.main_layout);\n no_data = view.findViewById(R.id.no_data);\n no_connection = view.findViewById(R.id.no_connection);\n loader = view.findViewById(R.id.loader);\n recycler_home.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));\n swipe_refresh.setOnRefreshListener(this);\n return view;\n }", "@Override\n public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n new DataTask().execute();\n }", "@Override\n public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n mListener.onHisRefresh();\n }", "@Override\n\tpublic void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\tupdateData1();\n\t}", "@Override\n protected void findView() {\n title = (TextView) findViewById(R.id.title_text);\n title.setText(\"消息\");\n alert = (TextView) findViewById(R.id.alert);\n next_button = (Button) findViewById(R.id.next_button);\n next_button.setVisibility(View.GONE);\n layout = (XtomRefreshLoadmoreLayout) findViewById(R.id.refreshLoadmoreLayout);\n left = (ImageButton) findViewById(R.id.back_button);\n mListView = (SwipeMenuListView) findViewById(R.id.listView);\n }", "@Override\n public void onRefresh() {\n }", "@Override\n public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n new DataTask().execute();\n }", "@Override\n public void onRefresh() {\n listView.setOnItemClickListener(null);\n getActivity().setProgressBarIndeterminateVisibility(true);\n Log.i(TAG,\"Refresh Call\");\n //fetchMovies();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Log.i(TAG,\"Fetch Movie Call\");\n swipeRefreshLayout.setRefreshing(false);\n fetchMovies();\n int index = listView.getFirstVisiblePosition();\n View v = listView.getChildAt(0);\n int top = (v == null) ? 0 : v.getTop();\n listView.setSelectionFromTop(index, top);\n }\n }, 2000);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_pending, container, false);\n\n SharedPreferences sharedPreferences = getActivity().getSharedPreferences(\"User\", Context.MODE_PRIVATE);\n token = \"Bearer \" + sharedPreferences.getString(\"Token\", \"\");\n\n recyclerView = view.findViewById(R.id.recyclerView);\n\n\n swipeRefreshLayout = view.findViewById(R.id.swipe);\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n getData();\n }\n }, 1000);\n }\n });\n\n getData();\n\n\n return view;\n }", "@Override\n public void onRefresh() {\n requestSoal();\n swipeRefreshLayout.setRefreshing(false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_movies_list, container, false);\n mLayoutManager = new LinearLayoutManager(getActivity());\n mRecyclerView = (RecyclerView) view.findViewById(R.id.recycle_view);\n mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipe_refresh_widget);\n mSwipeRefreshLayout.setOnRefreshListener(this);\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setHasFixedSize(true);\n mRecyclerView.setItemAnimator(new DefaultItemAnimator());\n mAdapter = new MoviesAdapter(getActivity().getApplicationContext());\n mAdapter.setOnItemClickListener(mOnItemClickListener);\n mRecyclerView.setAdapter(mAdapter);\n mRecyclerView.addOnScrollListener(mOnScrollListener);\n onRefresh();\n return view;\n }", "public void setupScrollViewAdapter(){\n scrollViewAdapter = new ArrayAdapter<Integer>(this, android.R.layout.simple_list_item_1, currentNotifications);\n notifcationIdView.setAdapter(scrollViewAdapter);\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n\n mScrollView = (ScrollView) findViewById(R.id.scroll_view);\n mScrollContent = (ViewGroup) findViewById(R.id.content);\n\n mPager = new ScrollViewPager(mScrollView, mScrollContent);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view =inflater.inflate(R.layout.fragment_center_things, null);\n\t\tlv_things = (PullToRefreshListView) view.findViewById(R.id.lv_mycenter_things);\n\t\tfor(int i=0;i<5;i++){\n\t\t\tHashMap<String,Object> map =new HashMap<String, Object>();\n\t\t\tmap.put(\"test\", \"test\"+i);\n\t\t\tdata.add(map);\n\t\t}\n\t\tString[] from={};\n\t\tint[] to={};\n\t\tSimpleAdapter adapter = new SimpleAdapter(getActivity(), data, R.layout.info_item, from, to);\n\t\tlv_things.setAdapter(adapter);\n\t\tlv_things.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tstartTalkActivity();\n\t\t\t}\n\t\t});\n\t\treturn view;\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tif(!createFlag) {\r\n\t\t\tTool.resetPullRefreshView(mPullRefreshScrollView);\r\n\t\t} else {\r\n\t\t\tcreateFlag = false;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\tloadData();\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\thomeFrgRootView = inflater.inflate(R.layout.fragment_home, container, false);\n\n\t\tactionBar = getActivity().getActionBar();\n\n\t\tif(!actionBar.isShowing()){\n\t\t\tactionBar.show();\n\t\t}\n\t\tswipeLayout = (SwipeRefreshLayout) homeFrgRootView.findViewById(R.id.swipe_container);\n\t\tswipeLayout.setColorScheme(android.R.color.holo_blue_bright, \n\t\t\t\tandroid.R.color.holo_green_light, \n\t\t\t\tandroid.R.color.holo_orange_light, \n\t\t\t\tandroid.R.color.holo_red_light);\n\n\t\tswipeLayout.setOnRefreshListener(new OnRefreshListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(isRefreshEnabled()){\n\t\t\t\t\tsetRefreshEnabled(false);\n\t\t\t\t\tfetchGardenDetails(homeFrgRootView,true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\trand=new Random(1000);\n\n\t\tinitImageLoader(getActivity());\n\n\t\t/*ImageLoader.getInstance().clearMemoryCache();\n\t\tImageLoader.getInstance().clearDiskCache();*/\n\n\n\t\tmProgress=(ProgressBar)homeFrgRootView.findViewById(R.id.profileProgress);\n\n\t\tnoPostsTxtView=(TextView)homeFrgRootView.findViewById(R.id.noPoststxt);\n\n\t\tsetRefreshEnabled(false);\n\n\t\tImageView mRefreshImg=(ImageView)homeFrgRootView.findViewById(R.id.refreshImg);\n\t\tmRefreshImg.setVisibility(View.GONE);\n\t\t/*mRefreshImg.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tif(isRefreshEnabled()){\n\t\t\t\t\tsetRefreshEnabled(false);\n\t\t\t\t\tfetchGardenDetails();\n\t\t\t\t}\n\t\t\t}\n\t\t});*/\n\n\t\tImageView openStatusDialog=(ImageView)homeFrgRootView.findViewById(R.id.openStatusDialog);\n\t\topenStatusDialog.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tstatusAlert =new StatusAlert();\n\t\t\t\tstatusAlert.setCancelable(true);\n\t\t\t\tstatusAlert.show(fm, \"status_open\");\n\t\t\t}\n\t\t});\n\n\n\t\ttypFace=Typeface.createFromAsset(getActivity().getAssets(), \"Roboto-Medium.ttf\");\n\t\ttypFaceDescription=Typeface.createFromAsset(getActivity().getAssets(), \"Roboto-Light.ttf\");\n\t\ttypfaceProfile=Typeface.createFromAsset(getActivity().getAssets(), \"Roboto-BoldItalic.ttf\");\n\n\t\tpostsListView=(ListView)homeFrgRootView.findViewById(R.id.profile_post_list);\n\n\t\tfinal RelativeLayout statuslyt=(RelativeLayout)homeFrgRootView.findViewById(R.id.statusLyt);\n\n\n\n\t\tpostsListView.setOnScrollListener(new OnScrollListener() {\n\t\t\tprivate int mLastFirstVisibleItem;\n\t\t\t@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\t\t\tint visibleItemCount, int totalItemCount) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(firstVisibleItem==0){\n\t\t\t\t\tswipeLayout.setEnabled(true);\n\t\t\t\t}else{\n\t\t\t\t\tswipeLayout.setEnabled(false);\n\t\t\t\t}\n\n\t\t\t\tif(mLastFirstVisibleItem<firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING DOWN\",\"TRUE\");\n\t\t\t\t\tAnimation slideUp = AnimationUtils.loadAnimation(getActivity(), R.anim.slide_up);\n\t\t\t\t\tstatuslyt.startAnimation(slideUp);\n\n\t\t\t\t}\n\t\t\t\tif(mLastFirstVisibleItem>firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING UP\",\"TRUE\");\n\t\t\t\t}\n\t\t\t\tmLastFirstVisibleItem=firstVisibleItem;\n\t\t\t}\n\t\t});\n\n\t\tfetchGardenDetails(homeFrgRootView,false);\n\n\t\t//\t\tstatusLayoutHandle(rootView);\n\n\t\treturn homeFrgRootView;\n\t}", "@SuppressWarnings(\"deprecation\")\n\tprotected void refreshActivityContents() {\n\t\t// Build scrollview, the primary viewgroup\n\t\tScrollView scrollView = new ScrollView(this);\n\t\tFrameLayout.LayoutParams scrollParams = new ScrollView.LayoutParams(\n\t\t\t\tLayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);\n\t\tscrollView.setLayoutParams(scrollParams);\n\t\tscrollView.addView(buildTable());\n\t\tsetContentView(scrollView);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_all_ads, container, false);\n\n\n progressBar=view.findViewById(R.id.allAds_progressBar);\n allAds_swiperefreshlayout=view.findViewById(R.id.allAds_swiperefreshlayout);\n\n ///jsut dumy data for test\n\n\n FillData(view);\n\n HandleLoadingAds();\n\n RefreshData();\n\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.message_list_layout);\n findview();\n setActionBar();\n setPullRefreshView();\n iQueryLetterPage();\n }", "@Override\n\t\t\t\tpublic void onPullDownToRefresh(PullToRefreshBase refreshView) {\n\n\t\t\t\t\tcurrentPage = \"0\";\n\t\t\t\t\t\n\t\t\t\t\tnextPage = \"1\";\n\t\t\t\t\t\n\t\t\t\t\tdetailListView.removeAllViews();\n\t\t\t\t\t\n\t\t\t\t\tdraw();\n\t\t\t\t\t\n\t\t\t\t}", "private void setRefreshing() {\n mSwipe.setProgressViewOffset(false, 0, (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24, getResources().getDisplayMetrics()));\n mSwipe.setRefreshing(true);\n }", "@Override\n public void onRefresh() {\n mSwipeRefreshLayout.setRefreshing(false);\n\n }", "@Override\n\t\t\t\tpublic void onPullUpToRefresh(PullToRefreshBase refreshView) {\n\n\t\t\t\t\tif (nextPage != null && !nextPage.equals(\"\") && !nextPage.equals(\"0\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdraw();\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\tscrollView.onRefreshComplete();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "private void SetRefreshUI(boolean isRefreshing){\n swipeRefreshLayout.setRefreshing(isRefreshing);\n\n if(!isRefreshing)\n return;\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(false);\n }\n }, 1000*15);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_gun_firing, container, false);\n clipSpinner = (Spinner)view.findViewById(R.id.spinner_clips);\n clipSpinner.setOnItemSelectedListener(this);\n modeSpinner = (Spinner)view.findViewById(R.id.spinner_mode);\n modeSpinner.setOnItemSelectedListener(this);\n Switch sw = (Switch)view.findViewById(R.id.switch_smart_gun);\n sw.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n otherClick(v);\n }\n });\n sw = (Switch)view.findViewById(R.id.switch_wireless);\n sw.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n otherClick(v);\n }\n });\n Button btn = (Button)view.findViewById(R.id.btn_reset_recoil);\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n otherClick(v);\n }\n });\n\n TextView tv = (TextView)view.findViewById(R.id.text_wound_penalty);\n tv.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n woundPenaltyClick(v);\n }\n });\n\n btn = (Button)view.findViewById(R.id.btn_fire);\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n fire();\n }\n });\n\n refresh = (SwipeRefreshLayout)view.findViewById(R.id.swipeRefresh);\n refresh.setOnRefreshListener(this);\n\n if(gunIndex >= 0) {\n updateView(view);\n }\n return view;\n }", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mView = inflater.inflate(R.layout.fragment_read, container, false);\n setRetainInstance(true);\n\n booksRef = FirebaseDatabase.getInstance().getReference().child(\"Book Requests\");\n\n gridLayoutManager = new GridLayoutManager(getActivity(), 2, LinearLayoutManager.VERTICAL, false);\n booksContainer = mView.findViewById(R.id.read_booksContainer);\n booksContainer.setHasFixedSize(true);\n booksContainer.setLayoutManager(gridLayoutManager);\n\n swipeRefreshLayout = mView.findViewById(R.id.mostPopularContainer);\n\n loadBooks();\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n loadBooks();\n swipeRefreshLayout.setRefreshing(false);\n }\n });\n\n return mView;\n }", "protected void setSwipeRefreshLayout(View view) {\n mSwipeRefreshLayout = view.findViewById(R.id.fragment_notifications_today_swipe);\n mSwipeRefreshLayout.setOnRefreshListener(this);\n mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary,\n SWIPE_REFRESH_COLOUR_1,\n SWIPE_REFRESH_COLOUR_2,\n SWIPE_REFRESH_COLOUR_3);\n }", "private void stopRefresh(){\n if(mPullRefreshing==true){\n mPullRefreshing=false;\n resetHeaderHeight();\n }\n }", "@Override\r\n\tprotected void findViewById() {\n\r\n\t}", "@Override\n public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n refresh = true;\n PageIndex = 1;\n list.clear();\n listHeader.clear();\n listmoney.clear();\n users.setLimit(12);\n getDate();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_five, container, false);\n ButterKnife.bind(this,view);\n mSwipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);\n mSwipeRefreshLayout.setEnabled(false);\n return view;\n }", "@Override\n\tprotected void findViewById() {\n\n\t}", "@Override\n protected void findViewById() {\n ivGraffit = (ImageView) findView(R.id.ivGraffit);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View ret = inflater.inflate(R.layout.fragment_xin_ren, container, false);\n recyclerView = (RecyclerView) ret.findViewById(R.id.xinren_recyclerView);\n swipeRefreshLayout = (SwipeRefreshLayout) ret.findViewById(R.id.xinren_swipeRefreshLayout);\n initSwipeRefreshLayout();\n initAdapter();\n initData();\n initData();\n\n return ret;\n\n }", "@Override\n public void onRefresh() {\n fetchPosts();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = (FrameLayout) inflater.inflate(R.layout.fragment_seniman_list_tawaran, container, false);\n recyclerView = (RecyclerView) rootView.findViewById(R.id.fragment_seniman_list_tawaran_recyclerview);\n adapter = new ListTawaranAdapter(getContext(), eventList, SenimanListTawaranFragment.this);\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n recyclerView.setAdapter(adapter);\n\n final FrameLayout rootViewFinal = rootView;\n\n mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.fragment_seniman_list_tawaran_swipeRefreshLayout);\n\n mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n getEvents();\n }\n });\n\n getEvents();\n\n // Inflate the layout for this fragment\n return rootView;\n }", "private void refreshView(){\n\t\tMain.scroll.setViewportView(container);\n\t\t// setez scrollul jos\n\t\tMain.scroll.getVerticalScrollBar().setValue(Main.scroll.getVerticalScrollBar().getMaximum());\n\t}", "@Override\n public void onRefresh() {\n swipeRefreshLayout.setRefreshing(false);\n\n evento = MainActivity.evento;\n\n ImageView collapsingToolbarImage = (ImageView) findViewById(R.id.header);\n collapsingToolbarImage.setImageBitmap(evento.getImagenBitmap());\n\n net.opacapp.multilinecollapsingtoolbar.CollapsingToolbarLayout collapsingToolbar = (net.opacapp.multilinecollapsingtoolbar.CollapsingToolbarLayout) findViewById(R.id.collapse_toolbar);\n collapsingToolbar.setTitle(evento.getNombre());\n\n String[] separadorFecha_Hora_Inicio = evento.getFecha_inicio().split(\" \");\n String[] separadorFecha_Inicio = separadorFecha_Hora_Inicio[0].split(\"-\");\n int mesInicio = Integer.parseInt(separadorFecha_Inicio[1])-1;\n fechaInicio.setText(separadorFecha_Inicio[0] + \" de \" + listaMeses[mesInicio] + \" del \" + separadorFecha_Inicio[2] + \" a las \" + separadorFecha_Hora_Inicio[1]);\n\n String[] separadorFecha_Hora_Fin = evento.getFecha_fin().split(\" \");\n String[] separadorFecha_Fin = separadorFecha_Hora_Fin[0].split(\"-\");\n int mesFin = Integer.parseInt(separadorFecha_Fin[1])-1;\n fechaFin.setText(\"Hasta el \" + separadorFecha_Fin[0] + \" de \" + listaMeses[mesFin] + \" del \" + separadorFecha_Fin[2] + \" a las \" + separadorFecha_Hora_Fin[1]);\n\n Picasso.with(this).load(evento.getUsuarioCreador().getImagenUrl()).into(imagenCreadorEvento);\n\n nombreCreadorEvento.setText(evento.getUsuarioCreador().getNombre());\n\n descripcion.setText(evento.getDescripcion());\n\n indicadorPromociones.setText(R.string.cargando_promociones);\n indicadorPromociones.setTextColor(Color.BLACK);\n indicadorPromociones.setGravity(Gravity.CENTER_HORIZONTAL);\n listaPromociones.clear();\n RecyclerPromocionesAdapter_DescripcionEvento adapter_p = new RecyclerPromocionesAdapter_DescripcionEvento(listaPromociones);\n final LinearLayoutManager linearLayoutManager_p = new LinearLayoutManager(DescripcionEvento.this, LinearLayoutManager.HORIZONTAL,false);\n recyclerViewPromociones.setLayoutManager(linearLayoutManager_p);\n recyclerViewPromociones.setAdapter(adapter_p);\n solicitudPromocionesAsociadas();\n\n indicadorAsistentes.setText(R.string.cargando_asistentes);\n indicadorAsistentes.setTextColor(Color.BLACK);\n indicadorAsistentes.setGravity(Gravity.CENTER_HORIZONTAL);\n listaAsistentes.clear();\n RecyclerAsistentesAdapter_DescripcionEvento adapter_a = new RecyclerAsistentesAdapter_DescripcionEvento(listaAsistentes);\n final LinearLayoutManager linearLayoutManager_a = new LinearLayoutManager(DescripcionEvento.this, LinearLayoutManager.HORIZONTAL,false);\n recyclerViewAsistentes.setLayoutManager(linearLayoutManager_a);\n recyclerViewAsistentes.setAdapter(adapter_a);\n solicitudListaAsistentes();\n\n indicadorImagenesAnteriores.setText(R.string.cargando_imagenes_anteriores);\n indicadorImagenesAnteriores.setTextColor(Color.BLACK);\n indicadorImagenesAnteriores.setGravity(Gravity.CENTER_HORIZONTAL);\n listaImagenesAnteriores.clear();\n RecyclerImagenesAnterioresAdapter_DescripcionEvento adapter_i = new RecyclerImagenesAnterioresAdapter_DescripcionEvento(listaImagenesAnteriores);\n final LinearLayoutManager linearLayoutManager_i = new LinearLayoutManager(DescripcionEvento.this, LinearLayoutManager.HORIZONTAL,false);\n recyclerViewImagenesAnteriores.setLayoutManager(linearLayoutManager_i);\n recyclerViewImagenesAnteriores.setAdapter(adapter_i);\n solicitudImagenesAnterioresDelEvento();\n\n comprobarAsistencia();\n\n String uriMapaEstatico = \"https://maps.googleapis.com/maps/api/staticmap?center=\"+evento.getLatitud()+\",\"+evento.getLongitud()+\"&zoom=16&size=600x300&markers=color:red%7C\"+evento.getLatitud()+\",\"+evento.getLongitud()+\"&key=\"+MAP_API_KEY+\"&sensor=true\";\n Picasso.with(DescripcionEvento.this).load(uriMapaEstatico).resize(mapa.getWidth(),mapa.getHeight()).into(mapa);\n\n localizacion.setText(PlaceAPI.getCompleteAddressString(evento.getLatitud(),evento.getLongitud(),this));\n\n lugar.setText(evento.getLugar());\n\n }", "@Override\n\tpublic void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\tupdateData2();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_buddy_profile_individual, container, false);\n myBuddyLocation = view.findViewById(R.id.textView_MyBuddyLocation);\n myBuddyHeartRate = view.findViewById(R.id.myBuddyHeartRate);\n TimerTask task = new TimerTask(){\n @Override\n public void run(){\n\n //Get Buddy(ies) location from database and display here\n //(1) Get the username of the user\n sharedPref = getActivity().getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n String defaultValue = getResources().getString(R.string.username);\n String username =sharedPref.getString(getString(R.string.username), defaultValue);\n\n mBuddyLocationTask = new GetBuddyLocation(username);\n mBuddyLocationTask.execute((Void) null);\n\n mBuddyHrTask = new GetBuddyHr(username);\n mBuddyHrTask.execute((Void) null);\n }\n\n };\n\n new Timer().scheduleAtFixedRate(task,0,1000);\n /*\n final SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipelayout);\n swipeRefreshLayout.setColorSchemeResources(R.color.refresh,R.color.refresh1,R.color.refresh2);\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n swipeRefreshLayout.setRefreshing(true);\n (new Handler()).postDelayed(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(false);\n\n }\n },3000);\n }\n });*/\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_team, container, false);\n\n swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swiperefresh);\n swipeRefreshLayout.setOnRefreshListener(\n new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n HttpsDataSynchronizer dataSynchronizer = new HttpsDataSynchronizer(getContext(),\n TeamFragment.this);\n dataSynchronizer.execute();\n }\n }\n );\n\n\n positionsDbHelper = new PositionsDbHelper(getContext());\n db = positionsDbHelper.getReadableDatabase();\n\n final String[] fromColumns = {PositionsDbHelper.COLUMN_NAME_USER};\n\n final int[] toViews = {R.id.lm_list_desc};\n\n\n final Cursor cursor = db.query(PositionsDbHelper.TABLE_NAME,\n PROJECTION,\n null,\n null,\n null,\n null,\n null);\n\n\n mAdapter = new PositionCursorAdapter(getActivity(),\n R.layout.pos_row,\n cursor, fromColumns, toViews);\n\n listView = (ListView) view.findViewById(R.id.lm_list);\n LinearLayout emptyText = (LinearLayout) view.findViewById(android.R.id.empty);\n listView.setEmptyView(emptyText);\n listView.setAdapter(mAdapter);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_products, container, false);\n\n // Get refreshLayout\n refreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipeRefresh);\n refreshLayout.setOnRefreshListener(this);\n\n recyclerViewInit(view);\n\n interactor = new ProductsListInteractor(getActivity().getApplicationContext(), this);\n interactor.requestProducts();\n\n return view;\n\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tif (savedInstanceState != null) {\r\n\t\t\tlastTime = savedInstanceState.getInt(\"lastTime\");\r\n\t\t\tLog.d(\"\", \"lastTime\" + lastTime);\r\n\t\t}\r\n\r\n\t\tView view = inflater.inflate(R.layout.fragment_text, container, false);\r\n\t\t// ListView listView = (ListView) view.findViewById(R.id.textlsit_view);\r\n\t\t// 获取标题事件,增加电极,进行 心小心炫富显示的功能\r\n\t\tView titleView = view.findViewById(R.id.textlist_title);\r\n\t\ttitleView.setOnClickListener(this);\r\n\r\n\t\tPullToRefreshListView refreshListView = (PullToRefreshListView) view\r\n\t\t\t\t.findViewById(R.id.textlsit_view);\r\n\t\trefreshListView.setOnRefreshListener(this);\r\n\t\trefreshListView.setMode(Mode.BOTH);\r\n\r\n\t\tListView listView = refreshListView.getRefreshableView();\r\n\t\tlistView.setOnItemClickListener(this);\r\n\t\tList<String> strings = new LinkedList<String>();\r\n\t\tstrings.add(\"java\");\r\n\t\tstrings.add(\"java1\");\r\n\t\tstrings.add(\"java11\");\r\n\t\tstrings.add(\"java111\");\r\n\t\tstrings.add(\"java1111\");\r\n\t\tstrings.add(\"java11111\");\r\n\t\tstrings.add(\"java2\");\r\n\t\tstrings.add(\"java22\");\r\n\t\tstrings.add(\"java2223\");\r\n\t\tstrings.add(\"java3\");\r\n\t\tstrings.add(\"java34\");\r\n\t\tstrings.add(\"java324\");\r\n\t\tstrings.add(\"java23423\");\r\n\t\tstrings.add(\"java546\");\r\n\t\tstrings.add(\"java56\");\r\n\t\tstrings.add(\"java7\");\r\n\t\tstrings.add(\"java8\");\r\n\t\tstrings.add(\"java444\");\r\n\t\tstrings.add(\"java4653\");\r\n\t\t// 添加列表上的快速工具条(Header)\r\n\t\tView header = inflater.inflate(R.layout.textlist_header_tools,\r\n\t\t\t\tlistView, false);\r\n\t\tlistView.addHeaderView(header);\r\n\r\n\t\tView quickPublish = header.findViewById(R.id.quick_tools_piblish);\r\n\t\tquickPublish.setOnClickListener(this);\r\n\r\n\t\tView quickReview = header.findViewById(R.id.quick_tools_review);\r\n\t\tquickReview.setOnClickListener(this);\r\n\r\n\t\tList<TestEntity> entities = DataStore.getInatance().getTextEntities();\r\n\t\t// if (entities == null) {\r\n\t\t// entities = new LinkedList<TestEntity>();\r\n\t\t// }\r\n\r\n\t\t// ArrayAdapter<String> adapter = new\r\n\t\t// ArrayAdapter<String>(getActivity(),\r\n\t\t// android.R.layout.simple_list_item_1, strings);\r\n\t\t// entities = new LinkedList<TestEntity>();\r\n\r\n\t\tadapter = new EssayAdapter(getActivity(), entities);\r\n\t\tadapter.setListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif (v instanceof TextView) {\r\n\t\t\t\t\tString string = (String)v.getTag();\r\n\t\t\t\t\tif (string!=null) {\r\n\t\t\t\t\t\tint position = Integer.parseInt(string);\r\n\t\t\t\t\t\tIntent intent = new Intent(getActivity(), EssayDetailActivity.class);\r\n\r\n\t\t\t\t\t\tintent.putExtra(\"currentEssayPosition\", position);\r\n\t\t\t\t\t\tintent.putExtra(\"category\", requestCategory);\r\n\t\t\t\t\t\tstartActivity(intent);\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});\r\n\t\tlistView.setAdapter(adapter);\r\n\t\tlistView.setOnScrollListener(this);\r\n\t\t// TODO 获取ListView并且设置数据(以后需要有PullToRefresh进行完善)\r\n\t\t// 获取快速的工具条(发布和审核),用于列表的滚动显示和隐藏\r\n\t\tquickTols = view.findViewById(R.id.textlist_quick_tools);\r\n\r\n\t\tquickTols.setVisibility(View.INVISIBLE);\r\n\t\t// 设置悬浮的工具条,两个点击事件\r\n\t\tquickPublish = header.findViewById(R.id.quick_tools_piblish);\r\n\t\tquickPublish.setOnClickListener(this);\r\n\r\n\t\tquickReview = header.findViewById(R.id.quick_tools_review);\r\n\t\tquickReview.setOnClickListener(this);\r\n\r\n\t\t// 获取新条目通知控件,每次跟新数据要显示,过一段时间隐藏\r\n\t\ttextNotify = view.findViewById(R.id.textlist_new_notify);\r\n\t\ttextNotify.setVisibility(View.INVISIBLE);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.timing_source_resolution);\r\n\r\n f_benchmarkOutput = (TextView) findViewById(R.id.TextViewTSR);\r\n f_scrollOutput = (ScrollView) findViewById(R.id.scrollViewTSR);\r\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n mPostsRecyclerView = view.findViewById(R.id.rvPosts);\n mSwipeContainer = view.findViewById(R.id.swipeContainer);\n\n mSwipeContainer.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n mAdapter.clear();\n queryPosts();\n mSwipeContainer.setRefreshing(false);\n }\n });\n\n mPosts = new ArrayList<>();\n\n mAdapter = new PostsAdapter(getContext(), mPosts, false);\n mPostsRecyclerView.setAdapter(mAdapter);\n\n setLayout();\n\n queryPosts();\n }", "@Override\n public void onRefresh() {\n mSwipeRefreshLayout.setRefreshing(false);\n }", "protected void initViews() {\n mViewList.setLayoutManager(initLayoutManager());\n\n\n mAdapter = initAdapter();\n mAdapter.init(mViewList, isPageEnabled());\n mViewList.setItemAnimator(new DefaultItemAnimator());\n mViewList.addItemDecoration(new DividerItemDecoration(mViewList.getContext(), LinearLayoutManager.VERTICAL));\n // mEmptyTips = (TextView) findViewById(R.id.empty_propt);\n mEmptyTips.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n if (CUtil.isNetworkConnected(mViewList.getContext())) {\n mSwipeRefreshLayout.setRefreshing(true);\n requestData(0, false);\n } else {\n// Toast.makeText(mTitleView.getContext(), R.string.network_not_connection, Toast.LENGTH_SHORT).show();\n showToast(getResources().getString(R.string.network_not_connection));\n }\n\n }\n });\n\n mAdapter.setPagingableListener(new BasePageAdapter.Pagingable() {\n\n @Override\n public void onLoadMoreItems() {\n // TODO Auto-generated method stub\n if (mAdapter.hasMoreItems()) {\n requestData(mAdapter.getItems() == null ? 0 : mAdapter.getItems().size(), false);\n } else {\n mAdapter.onFinishLoading(false);\n }\n }\n });\n\n // TitleBarMovableTouchListener touchListener = new\n // TitleBarMovableTouchListener(this.getActivity().findViewById(R.id.activity_title));\n // mViewList.setOnTouchListener(touchListener);\n mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_widget);\n mSwipeRefreshLayout.setOnRefreshListener(this);\n mSwipeRefreshLayout.setEnabled(isSwipeRefreshLayoutEnabled());\n mSwipeRefreshLayout.setColorSchemeResources(R.color.swipe_refrsh_color1, R.color.swipe_refrsh_color2,\n R.color.swipe_refrsh_color3, R.color.swipe_refrsh_color4);\n mViewList.setAdapter(mAdapter);\n mHandler.sendEmptyMessageDelayed(MSG_REQUEST_DATA, FIRST_INIT_DELAY);\n\n }", "public interface OnRefreshListener {\r\n void onRefresh(RefreshLayout var1);\r\n}", "private void initWidgets(View view) {\n recyclerView = view.findViewById(R.id.recyclerView);\n mAddCommentText = view.findViewById(R.id.addCommentText);\n mAddComment = view.findViewById(R.id.add);\n mClose = view.findViewById(R.id.close);\n swipeRefreshLayout = view.findViewById(R.id.swipe);\n\n final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n linearLayoutManager.setReverseLayout(true);\n recyclerView.setLayoutManager(linearLayoutManager);\n initCommentAdapter();\n\n HelpMethods.closeKeyboard(getActivity());\n\n asyncFlag = true;\n asyncTask = new mAsyncTask();\n asyncTask.execute();\n\n mAddComment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String text = mAddCommentText.getText().toString();\n\n if (text.trim().isEmpty()) {\n Toast.makeText(getContext(), getString(R.string.COMMENT_TEXT), Toast.LENGTH_SHORT).show();\n\n } else {\n\n int current_user_id = HelpMethods.checkSharedPreferencesForUserId(getContext());\n if (current_user_id != getContext().getResources().getInteger(R.integer.defaultValue)) {\n // addNewComment(post_id, current_user_id, text, TimeMethods.getUTCdatetimeAsString());\n\n CommentMethodsHandler.addNewComment(post_id, current_user_id, text, TimeMethods.getUTCdatetimeAsString(), new CommentMethodsHandler.OnAddingNewCommentsListener() {\n @Override\n public void onSuccessListener() {\n Toast.makeText(getContext(), \"comment added\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onServerException(String ex) {\n\n }\n\n @Override\n public void onFailureListener(String ex) {\n\n }\n });\n mAddCommentText.setText(\"\");\n HelpMethods.closeKeyboard2(getView(), getContext());\n }\n }\n }\n });\n\n\n swipeRefreshLayout.setOnRefreshListener(new SwipyRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh(SwipyRefreshLayoutDirection direction) {\n Log.d(\"MainActivity\", \"Refresh triggered at \"\n + (direction == SwipyRefreshLayoutDirection.BOTTOM ? \"top\" : \"bottom\"));\n\n if (direction == SwipyRefreshLayoutDirection.BOTTOM) {\n //CommentMethodsHandler.getTop10Comments(post_id,0,new );\n datetime = TimeMethods.getUTCdatetimeAsString();\n g1(post_id, 0);\n swipeRefreshLayout.setRefreshing(false);\n } else if (direction == SwipyRefreshLayoutDirection.TOP) {\n //CommentMethodsHandler.getTop10Comments(adapter.getItemCount());\n g1(post_id, adapter.getItemCount());\n swipeRefreshLayout.setRefreshing(false);\n }\n }\n });\n\n\n mClose.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // disableAsyncTask();\n dismiss();\n }\n });\n\n }" ]
[ "0.7310283", "0.6927071", "0.6623141", "0.6608901", "0.6568297", "0.6566055", "0.6564458", "0.64261913", "0.63617074", "0.63165075", "0.6316304", "0.63128597", "0.6290266", "0.6282638", "0.6236551", "0.6228457", "0.62199664", "0.6190374", "0.6151451", "0.6125457", "0.6069757", "0.6048386", "0.6038549", "0.6035727", "0.6035412", "0.6029204", "0.6009442", "0.6006271", "0.5998425", "0.59962386", "0.5988914", "0.597102", "0.597102", "0.59400034", "0.5930876", "0.59174955", "0.59135056", "0.5912131", "0.59081763", "0.5894942", "0.5880686", "0.588017", "0.5873756", "0.5870144", "0.58694386", "0.58605504", "0.58370167", "0.58212316", "0.58198786", "0.5808115", "0.5804748", "0.5804306", "0.58039814", "0.580171", "0.58012307", "0.5799711", "0.57975256", "0.57875186", "0.5770345", "0.5764016", "0.57596487", "0.57590765", "0.5745701", "0.5745661", "0.5745649", "0.5724194", "0.57181925", "0.57104534", "0.5699688", "0.56830555", "0.5682594", "0.5682593", "0.56799906", "0.56700486", "0.56700486", "0.56700486", "0.56647974", "0.56644255", "0.56600016", "0.5649455", "0.56424403", "0.564018", "0.5637112", "0.56340677", "0.56320703", "0.5632045", "0.5617224", "0.5616074", "0.56152606", "0.561428", "0.5609789", "0.56073165", "0.56062317", "0.5603443", "0.5599281", "0.55919087", "0.55819094", "0.55774045", "0.5572422", "0.557229" ]
0.5697267
69
This method will be executed once the timer is over
@Override public void run() { Intent i = new Intent(Splash.this, MainActivity.class); startActivity(i); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTimer() {\n\t\t\n\t}", "private void startTime()\n {\n timer.start();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\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\toutOfTime = true;\n\t\t\t}", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n return;\r\n }", "@Override\n public void run() {\n time_ = (int) (System.currentTimeMillis() - startTime_) / 1000;\n updateUI();\n\n if (time_ >= maxTime_) {\n // Log.v(VUphone.tag, \"TimerTask.run() entering timeout\");\n handler_.post(new Runnable() {\n public void run() {\n report(true);\n }\n });\n }\n }", "public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}", "@Override\r\n public void timePassed() {\r\n }", "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }", "public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n updatePlayerHealthUI();\n }\n }, delay, period);\n }", "public void resetTimerComplete() {\n\t\tsetStartingTime(0);\n\t}", "@Override\n public void timePassed() {\n }", "public void countTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t}", "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 TimerMethod() {\n this.runOnUiThread(Timer_Tick);\n }", "public void timer()\n {\n if(exists == true)\n { \n if(counter < 500) \n { \n counter++; \n } \n else \n { \n Greenfoot.setWorld(new Test()); \n exists = false; \n } \n } \n }", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "public void resetTimer(){\n timerStarted = 0;\n }", "private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tThread.sleep(this.timerTime);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.timerFinished = true;\n\t}", "private void countTime()\n {\n time--;\n showTime();\n if (time == 0)\n {\n showEndMessage();\n Greenfoot.stop();\n }\n }", "public void start() {timer.start();}", "private void runTimer() {\n\n // Handler\n final Handler handler = new Handler();\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n if (playingTimeRunning) {\n playingSecs++;\n }\n\n handler.postDelayed(this, 1000);\n }\n });\n\n }", "public void onSupperTimeout() {\r\n }", "public void run()\r\n {\n \tm_Handler.sendEmptyMessage(JMSG_TIMER);\r\n }", "public void EndTimer() {\n\t\tCount.End();\n\t}", "public void run() {\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }", "public void startTimer() {\n mStatusChecker.run();\n }", "public void setTimeouted() {\n this.timeouted = true;\n }", "private void timerstart() {\n timer = new Timer(timer1, new ActionListener(){ \n \tpublic void actionPerformed(ActionEvent ae){\n \t\tcheckMatch();\n \t}});\n timer.start();\n timer.setRepeats(false);\n }", "private void setTimer() {\r\n timer = new Timer(TIMER_DELAY, new ActionListener() {\r\n public void actionPerformed(ActionEvent ae) {\r\n action();\r\n }\r\n });\r\n }", "private void timerFired() {\n\t\t\n\t\tArrayList<CedView> tempList = _pendingRefresh;\n\t\t_pendingRefresh = new ArrayList<>();\n\t\t\n\t\tfor (CedView view : tempList) {\n\t\t\tview.refresh();\n\t\t}\n\t\ttempList = null;\n\t}", "public void act() \n {\n updateTimerDisplay();\n if(timeCounter < 3600){\n timeCounter++;\n \n }else{\n timeElapsed++;\n timeCounter = 0;\n }\n checkHighScore();\n checkRegScore();\n\n }", "@Override\n public void run() {\n if (timerValidFlag)\n gSeconds++;\n Message message = new Message();\n message.what = 1;\n handler.sendMessage(message);\n }", "public void resetTimer() {\n\t\tsetStartingTime(System.currentTimeMillis());\t\n\t\tthis.progressBar.setForeground(Color.black);\n\t\tlogger.fine(\"Set normal timer with data: \" + this.toString());\n\n\t}", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "public void StartTimer() {\n\t\tCount = new Timer();\n\t}", "@Override\n public void startTimeLoop() {\n MyLog.log(\"startTimeLoop::\");\n // handler.sendEmptyMessage(5);\n }", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "private float resetTimer() {\r\n final float COUNTDOWNTIME = 10;\r\n return COUNTDOWNTIME;\r\n }", "public static void initTimer(){\r\n\t\ttimer = new Timer();\r\n\t timer.scheduleAtFixedRate(new TimerTask() {\r\n\t public void run() {\r\n\t \t//se o player coletar todas os lixos, o tempo para\r\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }\r\n\t\t}, 1000, 1000);\r\n\t}", "public void startTimer() {\n startTime = System.currentTimeMillis();\n }", "private void initTimer(){\r\n\t\ttimer = new Timer() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public void resume()\r\n {\r\n\t timer.start();\r\n }", "private void countdown(){\n timer = new CountDownTimer(timeLeft, 1000) {\n @Override\n public void onTick(long millisUntilFinished) {\n timeLeft = millisUntilFinished;\n updateTimerView();\n }\n @Override\n public void onFinish() {\n timeLeft = 0;\n updateTimerView();\n checkAnswer();\n }\n }.start();\n }", "@Override\r\n\tpublic void freezeTimer() {\n\t\t\r\n\t}", "private void onPingingTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n try\r\n {\r\n myConnectionManipulatorLock.lock();\r\n try\r\n {\r\n // Send the ping message.\r\n myUnderlyingOutputChannel.sendMessage(myPreserializedPingMessage);\r\n\r\n // Schedule the next ping.\r\n myPingingTimer.change(myPingFrequency);\r\n }\r\n finally\r\n {\r\n myConnectionManipulatorLock.unlock();\r\n }\r\n }\r\n catch (Exception err)\r\n {\r\n // The sending of the ping message failed - the connection is broken.\r\n cleanAfterConnection(true, true);\r\n }\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }", "void hp_counter()\n {\n T=new Timer();\n T.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //decrement the HP by delay of a second\n if(hp_value>0) {\n redball.setText(hp_value + \"\");\n hp_value--;\n }\n //you have lost and the game will reset\n else if(hp_value<=0)\n {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(lost);\n toast.show();\n //\n resetValues();\n }\n }\n });\n }\n }, 1000, 1000);\n\n }", "public void createTimer() {\n timer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (animal.changeScore()) {\n setNumber(animal.getPoints());\n }\n if (animal.getStop()) {\n System.out.println(\"Game Ended\");\n background.stopMusic();\n stop();\n background.stop();\n\n ArrayList list = null;\n try {\n list = scoreFile.sortFile(animal.getPoints());\n } catch (IOException e) {\n e.printStackTrace();\n }\n popUp(list);\n }\n }\n };\n }", "private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_TIME));\n \t}", "@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tif (now > lastTimeCall + 1_000_000_001) {\n\t\t\t\t\tduration = duration.subtract(Duration.seconds(1));\n\n\t\t\t\t\tint remainingSeconds = (int) duration.toSeconds();\n\t\t\t\t\tint min = (remainingSeconds) / SECONDS_PER_MINUTE;\n\t\t\t\t\tint sec = (remainingSeconds) % SECONDS_PER_MINUTE;\n\n\t\t\t\t\tif (min == 0 && sec == 0) {\n\t\t\t\t\t\ttimer.stop();\n\t\t\t\t\t\tgameStage.hide();\n\t\t\t\t\t\tGameController.gameBgm.stop();\n\t\t\t\t\t\tSystem.out.println(\"Times up\");\n\t\t\t\t\t\t// show final score\n\t\t\t\t\t\t//TimesUpSubScene timesUp = new TimesUpSubScene();\n\n\n\t\t\t\t\t}\n\t\t\t\t\ttimerLabel.textProperty().setValue(String.format(\"%02d\", min) + \" : \" + String.format(\"%02d\", sec));\n\t\t\t\t\tlastTimeCall = now;\n\t\t\t\t}\n\n\t\t\t}", "void idleStoryCountdown() {\n\n idleSaveStoryToArchiveHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n// Log.i(\"Annoying Handler\", \"Ach\");\n// commentaryInstruction.setInputHandler(idleSaveStoryToArchiveHandler);\n// commentaryInstruction.onPlay(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.recorddone1), true, ArchiveMainMenu.class, \"RecordStory\");\n }\n }, 120000);\n }", "public void timer() {\r\n date.setTime(System.currentTimeMillis());\r\n calendarG.setTime(date);\r\n hours = calendarG.get(Calendar.HOUR_OF_DAY);\r\n minutes = calendarG.get(Calendar.MINUTE);\r\n seconds = calendarG.get(Calendar.SECOND);\r\n //Gdx.app.debug(\"Clock\", hours + \":\" + minutes + \":\" + seconds);\r\n\r\n buffTimer();\r\n dayNightCycle(false);\r\n }", "private void onResponseTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n cleanAfterConnection(true, true);\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }", "public void timer()\n {\n timer += .1; \n }", "protected void timer_tick(ActionEvent e) {\n\t\thour = time / 3600;\r\n\t\tminute = time % 3600 / 60;\r\n\t\tsecond = time % 3600 % 60;\r\n\t\tlblCountDown.setText(\"剩余时间:\" + stringTime(hour) + \":\" + stringTime(minute) + \":\" + stringTime(second));\r\n\t\tif (time == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t\ttimeOut();\r\n\t\t}\r\n\t\ttime--;\r\n\t}", "@Override\n public void run() {\n textTimer.setText(String.valueOf(currentTime));\n }", "TimerStatus onTimer();", "@Override\r\n public void run() {\n d7++;\r\n if (d7 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP7_EXPIRE});\r\n }\r\n }", "public void onTimerEvent();", "private void startTimer(){\n scoreboard.disableStart(true);\n timer.scheduleAtFixedRate(new TimerTask(){\n @Override\n public void run(){\n Platform.runLater(new Runnable(){\n @Override\n public void run() {\n scoreboard.updateTime();\n }\n });\n }\n },0,1000);\n }", "protected void onTimeout() {\n }", "@Override\n public void onTimeout(TimeValue timeout) {\n run();\n }", "private void startTimer() {\n\n //call renewWord function once the timer is on\n renewWord();\n countDownTimer = new MyCountDown(totalTimeCountInMilliseconds, 50);\n countDownTimer.start();\n }", "@Override\n\tpublic void enter() {\n\t\tTemperatureControllerContext.instance().showFanOn();\n\t\ttimer = new Timer(this, 10);\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n timer = new Timer();\n TimerTask timeOutTask = new TimerTask() {\n @Override\n public void run() {\n timeOut(); }\n };\n timer.schedule(timeOutTask, main_screen.logoutTime);\n }", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "private void setEndTimer() {\n vertx.setTimer(10, id -> testComplete());\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n timer.start();\n if (!gameOver) {\n checkApple();\n checkCollision();\n move();\n }\n repaint();\n\n }", "@Override\n public void run() {\n while(timerFlag){\n\n if(count == 700){\n\n if(timer_count == true) {\n //TODO 업데이트가 되어 오면 true로 변경경\n break;\n }\n else if(timer_count ==false)\n {\n /* MainActivity.getInstance().showToastOnWorking(\"제어가 되지 않았습니다.\");*/\n\n //timer\n Message msg = timercountHandler.obtainMessage();\n msg.what = 1;\n msg.obj = getResources().getString(R.string.not_controled);//\"제어가 동작하지 않았습니다.\";\n timercountHandler.sendMessage(msg);\n count = 0;\n\n Message msg1 = timercountHandler.obtainMessage();\n msg1.what = 2;\n timercountHandler.sendMessage(msg1);\n\n// deviceUIsetting();\n break;\n }\n }\n\n count++;\n// Log.d(TAG,\"count : \" + count);\n\n try {\n Thread.sleep(CONTROL_OPTIONS_TIMEOUT);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n }\n }", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "private void setNewTimer() {\n if (!isSetNewTimerThreadEnabled) {\n return;\n }\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new TimerTask() {\n\n @Override\n public void run() {\n // Send the message to the handler to update the UI of the GameView\n GameActivity.this.handler.sendEmptyMessage(UPDATE);\n\n // For garbage collection\n System.gc();\n }\n\n }, 0, 17);\n }", "public void onFinish() {\n\n Log.i(\"Done!\", \"Coundown Timer Finished\");\n\n }", "private void timerReset() {\n playing = true;\n now_playing_progress_bar.setMax((int) thisSong.getLengthMilliseconds());\n timer_startTime = System.currentTimeMillis();\n timerHandler.postDelayed(timerRunnable, 0);\n }", "public void run(){\n SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\"); \n Date date = new Date(); \n \n String formatted_date = formatter.format((date)); \n \n if(TimeInRange(formatted_date)){\n \n String DailyReport = BuildDailyReport();\n String InventoryReport = BuildInventoryReport();\n \n sprinter.PrintDailyReport(DailyReport);\n sprinter.PrintInventoryReport(InventoryReport);\n \n } \n \n //Cancel current.\n timer.cancel();\n \n //Start a newone.\n TimerDevice t = new TimerDevice();\n \n }", "public void resume()\r\n {\n timerStart(); // ...Restarts the update timer.\r\n }", "public void newTurnCountdown() {\n newTurn = true;\n newTurnTimer = 77;\n }", "@Override\n\tpublic void run() {\n\t\tlogger.info(\"Timer for the initialization expired\");\n\t\tif(logic.getCurrentPlayer() != null) {\n\t\t\tlogic.setBonusBar(0, player.getPlayerID());\n\t\t}\n\t\telse {\n\t\t\tlogic.setLeaderCard(0, player.getPlayerID());\n\t\t}\n\t}", "void startUpdateTimer();", "public void timePassed() {\r\n\r\n }", "public void pause(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t}", "private void timerEnd(){\n if (timerCounter >= iconSet.getTotalTargetCounter()){\n System.out.println(\"end\");\n swingTimer.stop();\n int totalTargetHits = 0;\n totalTargetHits = iconSet.getTargetHitsCounter();\n JOptionPane.showMessageDialog(null,\"Thank you for participating in our study! \\n You scored \" + totalTargetHits + \" targets.\");\n }\n }", "@Override // se crea una clase anonima donde se implementa el metodo run porque Timer task implementa la interfaz runnable\r\n public void run() {\r\n System.out.println(\"Tarea realizada en: \" + new Date() + \" nombre del Thread: \"\r\n + Thread.currentThread().getName()); //retorna el nombre del hilo actual\r\n System.out.println(\"Finaliza el tiempo\");\r\n timer.cancel(); // termina este timer descartando cualquier tarea programada actual\r\n }", "public void timePassed(double dt) {\r\n // Currently- nothing\r\n }", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "public void timePassed() {\r\n }", "public void timePassed() {\r\n }", "public void run() //call game over method \r\n {\r\n gui.display(\"The time limit has been reached. The game is now over!\");\r\n \r\n try { //try catch for Thread.sleep in gameOver()\r\n gameOver();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n\n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "@Override\n protected void swimAction(long timer){}", "public void overDraw() {\r\n\t\t\r\n\t\tisDrawCalled = false;\r\n\t\t\r\n\t\tLog.d(\"core\", \"Scheduler: All step done in \" + \r\n\t\t\t\t(System.currentTimeMillis() - logTimerMark) + \" ms;\");\r\n\t\t\r\n\t\tint delay = 3;\r\n\t\tstartWork(delay);\r\n\t}", "@Override\n protected boolean isFinished() {\n if (_timer.get() > 1.0) {\n return true;\n }\n return false;\n }", "public void run()\n \t\t{\n \t\t\t//Update the timer label\n \t\t\tsetTime();\n \t\t}" ]
[ "0.71115804", "0.6954622", "0.6905265", "0.6879765", "0.6850487", "0.68336254", "0.6831002", "0.682973", "0.6821518", "0.6820399", "0.6798942", "0.67315245", "0.6688736", "0.6682395", "0.66743344", "0.6645581", "0.6644891", "0.66430765", "0.6639218", "0.66315025", "0.6628547", "0.66179895", "0.66104364", "0.6607976", "0.66027915", "0.6588903", "0.65809935", "0.6575842", "0.65719354", "0.6567964", "0.65567386", "0.6552574", "0.65497893", "0.65079015", "0.6501258", "0.6493546", "0.64909065", "0.6490137", "0.6488833", "0.6486635", "0.6486391", "0.6486391", "0.6478825", "0.6478101", "0.6467625", "0.6464352", "0.6455808", "0.64532775", "0.6452783", "0.644424", "0.6431397", "0.6429678", "0.64116", "0.64017576", "0.6401647", "0.6399526", "0.63869244", "0.63861805", "0.6369525", "0.63574404", "0.6357262", "0.63420594", "0.6326489", "0.63216937", "0.63112104", "0.6308734", "0.62982243", "0.62867343", "0.6285485", "0.6278752", "0.6276017", "0.6274682", "0.6270346", "0.6262029", "0.6254699", "0.62494457", "0.6235584", "0.623548", "0.6234796", "0.62321526", "0.6227475", "0.62208617", "0.6220294", "0.62191224", "0.6217658", "0.6213081", "0.6209054", "0.6204084", "0.6202526", "0.6198769", "0.6196856", "0.61896396", "0.61896396", "0.61870486", "0.6185716", "0.6185541", "0.61816436", "0.61740214", "0.6173018", "0.6169418", "0.61653066" ]
0.0
-1
/ compiled from: constants
public interface ComposerPluginGetters$ProvidesPluginHasUserEditedContentGetter { @Nullable ComposerPluginGetters$BooleanGetter aq(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String constant();", "String getConstant();", "private Constants() {\n\n }", "private Constants() {\n }", "private Constants() {\n }", "private LabelUtilsConstants() {}", "private Constantes() {\r\n\t\t// No way\r\n\t}", "public interface Constants extends ShareConstants {\n String FASTDEX_DIR = \"fastdex\";\n String PATCH_DIR = \"patch\";\n String TEMP_DIR = \"temp\";\n String DEX_DIR = \"dex\";\n String OPT_DIR = \"opt\";\n String RES_DIR = \"res\";\n}", "public interface Constants {\n\n final public static String TAG = \"[PracticalTest02Var04]\";\n\n final public static boolean DEBUG = true;\n\n final public static String EMPTY_STRING = \"\";\n\n final public static String QUERY_ATTRIBUTE = \"query\";\n\n final public static String SCRIPT_TAG = \"script\";\n final public static String SEARCH_KEY = \"wui.api_data =\\n\";\n\n final public static String CURRENT_OBSERVATION = \"current_observation\";\n\n}", "public interface Constants {\r\n public static final String APPLE_PRODUCT_CODE = \"APP1456\";\r\n public static final String ORANGE_PRODUCT_CODE = \"ORG3456\";\r\n public static final Double APPLE_PRODUCT_PRICE = 0.60;\r\n public static final Double ORANGE_PRODUCT_PRICE = 0.25;\r\n public static final int MAGIC_NUMBER_ZERO = 0;\r\n public static final int MAGIC_NUMBER_TWO = 2;\r\n public static final int MAGIC_NUMBER_THREE = 3;\r\n public static final int MAGIC_NUMBER_FIVE = 5;\r\n public static final int MAGIC_NUMBER_SEVEN = 7;\r\n public static final int MAGIC_NUMBER_NINE = 9;\r\n}", "private Constants(){\n }", "public Constants() {\n }", "java.lang.String getConstantValue();", "public interface Constants\n{\n\tString EMAIL = \"email\";\n\tString RECORD_ID = \"_id\";\n\tString ENTRY_DATE = \"entryDate\";\n\tString DATE_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssXXX\";\n\tString LEADS = \"leads\";\n}", "public interface JCConstants {\n /**\n *\n */\n public final static String[] OP_LEFT = new String[] {\n \"\", \"(\"};\n public final static String[] OP_COMPARE = new String[] {\n \"\", \" = \", \" > \", \" >= \", \" < \", \" <= \", \" <> \", \" LIKE \",\" 包含 \"};\n public final static String[] OP_RIGHT = new String[] {\n \"\", \")\"};\n public final static String[] OP_CONN = new String[] {\n \"\", \"并且\", \"或者\"};\n\n public static final String[] COL_NAMES = {\n \"左(\", \"比较项目\", \"比较符\", \"比较值\", \"右)\", \"连接符\"};\n\n public static final String FILE_NAME = \"wizard.xml\";\n public static final String COBJ_ROOT_NAME = \"BaseConditionObjects\";\n\n public static final int DEFAULT_ROW_HEIGHT = 20;\n\n public static final String COLUMN_NAME_PREFIX=\"Column_\";\n}", "public interface Constants {\n\t\n\t/** The Constant SPACE_CHAR of type Character of one empty space. */\n\tstatic final char SPACE_CHAR = ' ';\n\t\n\t/** The Constant LETTER_O of type Character which holds mark X. */\n\tstatic final char LETTER_O = 'O';\n\t\n\t/** The Constant LETTER_X of type Character which holds mark O. */\n\tstatic final char LETTER_X = 'X';\n}", "Map<String, Constant> getConstantMap();", "public interface Constants {\n\n /*TODO KEY VALUE 参数*/\n String BUNDLE = \"bundle\";\n\n /*TODO APP 渠道*/\n String APP_SHANXI = \"SHANXI\";\n}", "public interface Constants {\n\n /**\n * 资源路径\n */\n String CONTENT_RESOURCES_PATH = \"content\";\n\n /**\n * 名师头像地址\n */\n String TEACHER_HEADE_IMG_PATH = \"teacher\";\n\n /**\n * 证书保存地址\n */\n String CERTIFICATE_IMG_PATH = \"certificate\";\n\n\n /**\n * 舞谱上传地址目录\n */\n String DANCE_BOOK_PATH = \"dance_book\";\n}", "public interface COSConstants {\n\n public static final String CLOTHO_PATH_PREFIX = \"/clotho\";\n public static final String GIRLITY_PATH_PREFIX = \"/girlity\";\n public static final String PACKAGE_PATH_PREFIX = CLOTHO_PATH_PREFIX+ \"/package\";\n public static final String SPLASH_PATH_PREFIX = GIRLITY_PATH_PREFIX+ \"/splash\";\n}", "public interface LibraryConstant {\n\n public interface LanguageConstant {\n\n public static String JAVA=\"JAVA\";\n public static String C=\"C\";\n public static String CPP=\"C++\";\n }\n\n public interface StyleConstant {\n\n //pre-defined Styles\n\n public static final String NORMAL=\"NORMAL\";\n public static final String BOLD=\"BOLD\";\n public static final String ITALIC=\"ITALIC\";\n public static final String UNDERLINE=\"UNDERLINE\";\n public static final String SUPERSCRIPT=\"SUPERSCRIPT\";\n public static final String SUBSCRIPT=\"SUBSCRIPT\";\n\n\n }\n}", "public static void main(String[] args) {\n System.out.println(MY_CONST);\n }", "public interface Constants {\n\tpublic interface Paths { \n\t\tfinal String ELASTIC_PUSH_CONTROLLER_PATH = \"/elastic\" ; \n\t\tfinal String SAVE_TRANSACTION = \"/save\"; \n\t\tfinal String SAVE_TARGETS = \"/saveTargets\";\n\t\tfinal String SAVE_FEEDBACK = \"/saveFeedback\"; \n\t\tfinal String SAVE_FEEDBACK_RESPONSE = \"/v1/saveFeedback\"; \n\t}\n\t\n\tpublic static String SUCCESS= \"success\";\n\tpublic static int UNAUTHORIZED_ID = 401;\n\tpublic static int SUCCESS_ID = 200;\n\tpublic static int FAILURE_ID = 320;\n\tpublic static String UNAUTHORIZED = \"Invalid credentials. Please try again.\";\n\tpublic static String PROCESS_FAIL = \"Process failed, Please try again.\";\n\n}", "public interface Constants {\n\n String CURRENT_SCORE = \"CURRENT_SCORE\";\n\n String HIGH_SCORES = \"HIGH_SCORES\";\n\n String DB_WRITER = \"DB_WRITER\";\n\n String DB_READER = \"DB_READER\";\n\n String DB_HELPER = \"DB_HELPER\";\n\n\n}", "public interface MyConstant {\n\tpublic boolean DEBUG = true;\n\n}", "public interface Constants {\n final public static String TAG = \"[PracticalTest02Var03]\";\n\n final public static boolean DEBUG = true;\n\n final public static String WEB_SERVICE_ADDRESS = \"http://services.aonaware.com/DictService/DictService.asmx/Define\";\n\n final public static String EMPTY_STRING = \"\";\n\n final public static String QUERY_ATTRIBUTE = \"word\";\n\n final public static String SCRIPT_TAG = \"WordDefinition\";\n final public static String SEARCH_KEY = \"wui.api_data =\\n\";\n\n final public static String CURRENT_OBSERVATION = \"current_observation\";\n}", "private ApplicationConstants(){\n\t\t//not do anything \n\t}", "public interface MyConstants {\n String ISPROCTECTED =\"isProctected\";\n String SAFENUMBER = \"safenumber\";\n String SIMNUMBER = \"simnumber\";\n String SPFILE = \"config\";\n String PASSWORD = \"password\";\n String ISSETUP = \"isSetup\";\n}", "public interface Constants {\n public static final int CASE_ZERO = 0;\n public static final int CASE_ONE = 1;\n\n}", "private Constants() {\n\t\tthrow new AssertionError();\n\t}", "Const\ngetConstSym();", "public interface Constants {\n String PATH_SEPARATOR = \"/\";\n String ROOT_DIRECTORY_SYMBOL = \"/\";\n String COMMAND_OPTION_PREFIX = \"-\";\n String SESSION_CLEAR = \"session clear\";\n}", "private ZipConstants() {}", "private USBConstant() {\r\n\r\n\t}", "private LevelConstants() {\n\t\t\n\t}", "public String toString() {\n return super.toString() + \" (\" + constants.size() + \" constants)\";\n }", "public interface Constants {\n\n String KEY_BOOK_INFO = \"key_book_info\";\n\n}", "public interface Constant {\n\n String JWT_SECRET = \"jwtsecret\";\n\n long EXP_TIME_LENGTH = 86400000;\n}", "public interface Constants {\n String NA = \"NA\";\n}", "private Const() {\n }", "public interface Constants {\r\n\r\n\tpublic final static int UP = 1000;\r\n\tpublic final static int DOWN = 1001;\r\n\tpublic final static int RIGHT = 1002;\r\n\tpublic final static int LEFT = 1003;\r\n\t\r\n\t\r\n\tpublic final static int EMPTY = 0;\r\n\tpublic final static int ROAD = 1;\r\n\tpublic final static int TOWER = 2;\r\n\tpublic final static int NPC = 3;\r\n\tpublic final static int NPC_GENERATOR = 4;\r\n\tpublic final static int CASTLE = 5;\r\n\tpublic final static int LANDSCAPE = 6;\r\n\t\r\n\tpublic final static int LANDSCAPE_TREE_1 = 61;\r\n\tpublic final static int LANDSCAPE_TREE_2 = 62;\r\n\tpublic final static int LANDSCAPE_TREE_3 = 63;\r\n\t\r\n\tpublic final static int FIELD_END = 7;\r\n\t\r\n}", "private FTConfigConstants() {\n }", "public static ConstantExpression constant(Object value) { throw Extensions.todo(); }", "public interface Constants {\n String API_LINK_TEXT = \"API_LINK\";\n String USER_ID = \"user_id\";\n String MAPS_KEY = \"AIzaSyBgktirlOODUO9zWD-808D7zycmP7smp-Y\";\n String NEWS_API = \"https://newsapi.org/v1/articles?source=national-geographic&sortBy=top&apiKey=79a22c366b984f11b09d11fb9476d33b\";\n}", "public interface Constants {\n String NA = \"NA\";\n String ARG_USERS=\"user\";\n String SENDER_ID =\"fro9SbG2Eic:APA91bHzUBA35xjcDP7TXu5uG3JetLMENHfJpfKnRjS02-y8W4n1ZonIn9HYNAwjV8F3uiOAV2gXparORINEEps3t0kCZHI2rutU33DaUlDeGJYrKDK_fG9HCdXAq1gNHtfmfqHGDBve\" ;\n}", "LWordConstant createLWordConstant();", "private Constants() {\n throw new AssertionError();\n }", "public ConstantProduct() {\n constProperty = \"constant\";\n constProperty2 = \"constant2\";\n }", "public interface DefccConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int MODULE_TKN = 11;\n /** RegularExpression Id. */\n int CLASS_TKN = 12;\n /** RegularExpression Id. */\n int INCLUDE_TKN = 13;\n /** RegularExpression Id. */\n int BYTE_TKN = 14;\n /** RegularExpression Id. */\n int BOOLEAN_TKN = 15;\n /** RegularExpression Id. */\n int INT_TKN = 16;\n /** RegularExpression Id. */\n int LONG_TKN = 17;\n /** RegularExpression Id. */\n int FLOAT_TKN = 18;\n /** RegularExpression Id. */\n int DOUBLE_TKN = 19;\n /** RegularExpression Id. */\n int STRING_TKN = 20;\n /** RegularExpression Id. */\n int BUFFER_TKN = 21;\n /** RegularExpression Id. */\n int VECTOR_TKN = 22;\n /** RegularExpression Id. */\n int MAP_TKN = 23;\n /** RegularExpression Id. */\n int LBRACE_TKN = 24;\n /** RegularExpression Id. */\n int RBRACE_TKN = 25;\n /** RegularExpression Id. */\n int LT_TKN = 26;\n /** RegularExpression Id. */\n int GT_TKN = 27;\n /** RegularExpression Id. */\n int SEMICOLON_TKN = 28;\n /** RegularExpression Id. */\n int COMMA_TKN = 29;\n /** RegularExpression Id. */\n int DOT_TKN = 30;\n /** RegularExpression Id. */\n int CSTRING_TKN = 31;\n /** RegularExpression Id. */\n int IDENT_TKN = 32;\n /** RegularExpression Id. */\n int IDENT_TKN_W_DOT = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int WithinOneLineComment = 1;\n /** Lexical state. */\n int WithinMultiLineComment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"module\\\"\",\n \"\\\"class\\\"\",\n \"\\\"include\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"int\\\"\",\n \"\\\"long\\\"\",\n \"\\\"float\\\"\",\n \"\\\"double\\\"\",\n \"\\\"string\\\"\",\n \"\\\"buffer\\\"\",\n \"\\\"vector\\\"\",\n \"\\\"map\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"<CSTRING_TKN>\",\n \"<IDENT_TKN>\",\n \"<IDENT_TKN_W_DOT>\",\n };\n\n}", "private PuzzleConstants() {\n // not called\n }", "private DVSTestConstants()\n {\n\n }", "public interface KeyValueConst {\n\n String PUBLIC_KEY = \"PublicKey\";\n String PRIVATE_KEY = \"PrivateKey\";\n}", "public interface Constants {\n\n final public static String[] actionTypes = {\n \"ro.pub.cs.systems.eim.practicaltest01.actionType1\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType2\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType3\"\n };\n\n}", "@Override\n\tpublic void setConstant(InterpreteConstants c) {\n\t\t\n\t}", "Rule EnumConst() {\n return Sequence(\n \"= \",\n IntConstant(),\n WhiteSpace());\n }", "public interface MainConst extends NetUrl_Const {\n\t/**\n\t * 当为true时为商业模式,此时异常不抛出,日志不打印。关闭所有开发痕迹。\n\t */\n\tpublic final static boolean DEVS_BUSINESS_MODEL = false;\n\n\t/**\n\t * true时打印日志。<br/>\n\t * false不打印日志。\n\t */\n\tpublic final static boolean DEVS_PRINT_LOG = true;\n\t/**\n\t * true时抛出异常\n\t */\n\tpublic final static boolean DEVS_THROW_ALL_EXCEPTION = true;\n\n\t/**\n\t * app_token\n\t */\n\tpublic final static String APP_APP_TOKEN = \"readyGo1408.app_token@bj-china\";\n\t/**\n\t * MD5加密盐\n\t */\n\tpublic final static String APP_MD5_TOKEN = \"readyGo1408.md5@bj-china\";\n\t/**\n\t * 硬件平台,安卓平台\n\t */\n\tpublic final static String APP_PLATFORM = \"2\";\n}", "public interface Constants {\n int STATE_AGREE = 1;\n int STATE_DISAGREE = 2;\n}", "public String constant() {\n\t\tString tmp = methodBase().replaceAll(\"([a-z])([A-Z])\",\"$1_$2\");\n\t\treturn tmp.toUpperCase();\n\t}", "Rule Const() {\n // Push 1 ConstNode onto the value stack\n StringVar constName = new StringVar(\"\");\n return Sequence(\n \"const \",\n FieldType(),\n Identifier(),\n actions.pop(),\n ACTION(constName.set(match())),\n \"= \",\n ConstValue(),\n Optional(ListSeparator()),\n WhiteSpace(),\n push(new IdentifierNode(constName.get())),\n actions.pushConstNode());\n }", "public static Constants getConstants() {\n return constants;\n }", "public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}", "public interface Constants {\n int SERVER_PORT = 6001;\n String LOCALHOST = \"127.0.0.1\";\n\n String DEFAULT_PHONE_NUMBER = \"+380965354234\";\n\n}", "Stream<ConstantDefinition> constants();", "public void gen_const() {\r\n X86.emit1(\".quad\", new X86.GLabel(toString()));\r\n }", "private ArrayList<Constant> importConstants(File f) throws FileNotFoundException, IOException\r\n\t{\r\n\t\tArrayList<Constant> constants = new ArrayList<>();\r\n\t\tPattern equPattern = Pattern.compile(\"\\\\s+EQU\\\\s+\");\r\n\t\tPattern constdefPattern = Pattern.compile(\"^\\\\tconst_def\\\\s*\");\r\n\t\tPattern constPattern = Pattern.compile(\"^\\\\tconst\\\\s+\");\r\n\t\tPattern constskipPattern = Pattern.compile(\"^\\\\tconst_skip\\\\s*\");\r\n\t\tPattern constnextPattern = Pattern.compile(\"^\\\\tconst_next\\\\s+\");\r\n\t\t\r\n\t\tint count = -1;\r\n\t\tint step = 1;\r\n\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(f)))\r\n\t\t{\r\n\t\t\twhile (reader.ready())\r\n\t\t\t{\r\n\t\t\t\tString line = reader.readLine();\r\n\t\t\t\tString backup = line;\r\n\t\t\t\tline = this.commentPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\tline = this.trailingWhitespacePattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\r\n\t\t\t\tif (equPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] args = equPattern.split(line, 2);\r\n\t\t\t\t\tif (args.length != 2) continue; //throw new IllegalArgumentException(\"The line \\\"\" + line + \"\\\" does not compile\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint value;\r\n\t\t\t\t\tif (args[1].startsWith(\"$\")) value = Integer.parseInt(args[1].substring(1), 16);\r\n\t\t\t\t\telse if (args[1].equals(\"const_value\")) value = count;\r\n\t\t\t\t\telse value = Integer.parseInt(args[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tconstants.add(new Constant(args[0], value));\r\n\t\t\t\t}\r\n\t\t\t\telse if (constdefPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tline = constdefPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\tif (line.equals(\"\")) count = 0;\r\n\t\t\t\t\telse if (this.commaSeparatorPattern.matcher(line).find())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString[] args = this.commaSeparatorPattern.split(line);\r\n\t\t\t\t\t\tif (args.length > 2) throw new IOException(\"Too many arguments provided to const_def: \" + backup);\r\n\t\t\t\t\t\tcount = Integer.parseInt(args[0]);\r\n\t\t\t\t\t\tstep = Integer.parseInt(args[1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse count = Integer.parseInt(line);\r\n\t\t\t\t}\r\n\t\t\t\telse if (constPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (count == -1) throw new IllegalStateException();\r\n\t\t\t\t\tline = constPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\tconstants.add(new Constant(line, count));\r\n\t\t\t\t\tcount += step;\r\n\t\t\t\t}\r\n\t\t\t\telse if (constskipPattern.matcher(line).find()) count += step;\r\n\t\t\t\telse if (constnextPattern.matcher(line).find())\r\n\t\t\t\t{\r\n\t\t\t\t\tline = constnextPattern.matcher(line).replaceFirst(\"\");\r\n\t\t\t\t\tint newCount = Integer.parseInt(line);\r\n\t\t\t\t\tif (newCount < count) throw new IOException(\"const value cannot decrease: \" + backup);\r\n\t\t\t\t\tcount = newCount;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn constants;\r\n\t}", "public interface Const {\n String SERVER_NAME = \"http://xxx.kenit.net/\";\n String SERVER_PATH = \"http://xxx.kenit.net/androidpart/\";\n String GET_PRODUCT_FILE = \"getproduct.php\";\n}", "public String toString(){\n \treturn isConstant ? \"const \" + type : \"var \" + type;\n }", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "public int getConstant() {\n\t\treturn magicConstant;\n\t}", "public interface SourceConstants {\n\t\n\tfinal String BEAN_SUFFIX = \"Bean\";\n\tfinal String ACTION_SUFFIX = \"Action\";\n\tfinal String AMPERCEND = \"&\";\n\n\t\n\t\n\tfinal String HTML_BEGIN = \"<html xmlns=\\\"http://www.w3c.org/1999/xhtml\\\" xmlns:f=\\\"http://java.sun.com/jsf/core\\\" xmlns:h=\\\"http://java.sun.com/jsf/html\\\" xmlns:p=\\\"http://primefaces.org/ui\\\">\";\n\tfinal String HTML_CLOSE = \"</html>\"; \n\t\n\tfinal String HEAD_BEGIN = \"<h:head>\";\n\tfinal String HEAD_CLOSE = \"</h:head>\";\n\n\tfinal String BODY_BEGIN = \"<h:body>\";\n\tfinal String BODY_CLOSE = \"</h:body>\";\n\n\tfinal String FORM_BEGIN = \"<h:form>\";\n\tfinal String FORM_CLOSE = \"</h:form>\";\n\t\n\tfinal String CENTER = \"<center>\";\n\n\n}", "public String toCode()\n {\n return \"TermConstant.getConstant(\" + index + \")\";\n }", "public List<String> getConstants() {\n return constants;\n }", "public interface PreprocessorConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP2 = 1;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP3 = 2;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP4 = 3;\n /** RegularExpression Id. */\n int PEDAGOGICALMARKUP_INVISIBLE_ALL = 4;\n /** RegularExpression Id. */\n int KEEP_SPACE = 9;\n /** RegularExpression Id. */\n int CSTYLECOMMENTSTART = 10;\n /** RegularExpression Id. */\n int NEWLINE = 11;\n /** RegularExpression Id. */\n int LINECOMMENTSTART = 12;\n /** RegularExpression Id. */\n int STARTDIRECTIVE = 13;\n /** RegularExpression Id. */\n int PPINCLUDE = 19;\n /** RegularExpression Id. */\n int PPIF = 20;\n /** RegularExpression Id. */\n int PPIFDEF = 21;\n /** RegularExpression Id. */\n int PPIFNDEF = 22;\n /** RegularExpression Id. */\n int PPELIF = 23;\n /** RegularExpression Id. */\n int PPELSE = 24;\n /** RegularExpression Id. */\n int PPENDIF = 25;\n /** RegularExpression Id. */\n int PPDEFINE = 26;\n /** RegularExpression Id. */\n int PPUNDEF = 27;\n /** RegularExpression Id. */\n int PPLINE = 28;\n /** RegularExpression Id. */\n int PPERROR = 29;\n /** RegularExpression Id. */\n int PPPRAGMA = 30;\n /** RegularExpression Id. */\n int UNEXPECTED = 31;\n /** RegularExpression Id. */\n int DQFILENAME = 32;\n /** RegularExpression Id. */\n int AQFILENAME = 33;\n /** RegularExpression Id. */\n int KEEP_KEYWORD = 34;\n /** RegularExpression Id. */\n int KEEP_NCONST = 35;\n /** RegularExpression Id. */\n int INT = 36;\n /** RegularExpression Id. */\n int INTSUFFIX = 37;\n /** RegularExpression Id. */\n int FLOATCONST = 38;\n /** RegularExpression Id. */\n int LOCAL_FLOATCONST = 39;\n /** RegularExpression Id. */\n int DIGITS = 40;\n /** RegularExpression Id. */\n int EXPPART = 41;\n /** RegularExpression Id. */\n int KEEP_ACONST = 42;\n /** RegularExpression Id. */\n int CHARACTER = 43;\n /** RegularExpression Id. */\n int STRING = 44;\n /** RegularExpression Id. */\n int SIMPLEESCAPESEQ = 45;\n /** RegularExpression Id. */\n int OCTALESCAPESEQ = 46;\n /** RegularExpression Id. */\n int HEXESCAPESEQ = 47;\n /** RegularExpression Id. */\n int UCODENAME = 48;\n /** RegularExpression Id. */\n int HEXQUAD = 49;\n /** RegularExpression Id. */\n int HEXDIG = 50;\n /** RegularExpression Id. */\n int KEEP_ID = 51;\n /** RegularExpression Id. */\n int KEEP_REST = 52;\n\n /** Lexical state. */\n int AFTERINCLUDE = 0;\n /** Lexical state. */\n int DIRECTIVE0 = 1;\n /** Lexical state. */\n int IN_C_COMMENT = 2;\n /** Lexical state. */\n int IN_LINE_COMMENT = 3;\n /** Lexical state. */\n int IN_PEDAGOGICAL_COMMENT = 4;\n /** Lexical state. */\n int MIDLINE = 5;\n /** Lexical state. */\n int DEFAULT = 6;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<PEDAGOGICALMARKUP2>\",\n \"<PEDAGOGICALMARKUP3>\",\n \"\\\"/*#\\\"\",\n \"\\\"/*#I\\\"\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 8>\",\n \"<KEEP_SPACE>\",\n \"\\\"/*\\\"\",\n \"<NEWLINE>\",\n \"\\\"//\\\"\",\n \"\\\"#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 15>\",\n \"\\\"*/\\\"\",\n \"<token of kind 17>\",\n \"<token of kind 18>\",\n \"\\\"include\\\"\",\n \"\\\"if\\\"\",\n \"\\\"ifdef\\\"\",\n \"\\\"ifndef\\\"\",\n \"\\\"elif\\\"\",\n \"\\\"else\\\"\",\n \"\\\"endif\\\"\",\n \"\\\"define\\\"\",\n \"\\\"undef\\\"\",\n \"\\\"line\\\"\",\n \"\\\"error\\\"\",\n \"\\\"pragma\\\"\",\n \"<UNEXPECTED>\",\n \"<DQFILENAME>\",\n \"<AQFILENAME>\",\n \"<KEEP_KEYWORD>\",\n \"<KEEP_NCONST>\",\n \"<INT>\",\n \"<INTSUFFIX>\",\n \"<FLOATCONST>\",\n \"<LOCAL_FLOATCONST>\",\n \"<DIGITS>\",\n \"<EXPPART>\",\n \"<KEEP_ACONST>\",\n \"<CHARACTER>\",\n \"<STRING>\",\n \"<SIMPLEESCAPESEQ>\",\n \"<OCTALESCAPESEQ>\",\n \"<HEXESCAPESEQ>\",\n \"<UCODENAME>\",\n \"<HEXQUAD>\",\n \"<HEXDIG>\",\n \"<KEEP_ID>\",\n \"<KEEP_REST>\",\n };\n\n}", "default Constant getConstant(ConstantName constantName) {return (Constant) constantName;}", "private void checkIfConstant()\r\n/* 23: */ {\r\n/* 24: 49 */ boolean isConstant = true;\r\n/* 25: 50 */ int c = 0;\r\n/* 26: 50 */ for (int max = getChildCount(); c < max; c++)\r\n/* 27: */ {\r\n/* 28: 51 */ SpelNode child = getChild(c);\r\n/* 29: 52 */ if (!(child instanceof Literal)) {\r\n/* 30: 53 */ if ((child instanceof InlineList))\r\n/* 31: */ {\r\n/* 32: 54 */ InlineList inlineList = (InlineList)child;\r\n/* 33: 55 */ if (!inlineList.isConstant()) {\r\n/* 34: 56 */ isConstant = false;\r\n/* 35: */ }\r\n/* 36: */ }\r\n/* 37: */ else\r\n/* 38: */ {\r\n/* 39: 59 */ isConstant = false;\r\n/* 40: */ }\r\n/* 41: */ }\r\n/* 42: */ }\r\n/* 43: 63 */ if (isConstant)\r\n/* 44: */ {\r\n/* 45: 64 */ List<Object> constantList = new ArrayList();\r\n/* 46: 65 */ int childcount = getChildCount();\r\n/* 47: 66 */ for (int c = 0; c < childcount; c++)\r\n/* 48: */ {\r\n/* 49: 67 */ SpelNode child = getChild(c);\r\n/* 50: 68 */ if ((child instanceof Literal)) {\r\n/* 51: 69 */ constantList.add(((Literal)child).getLiteralValue().getValue());\r\n/* 52: 70 */ } else if ((child instanceof InlineList)) {\r\n/* 53: 71 */ constantList.add(((InlineList)child).getConstantValue());\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 74 */ this.constant = new TypedValue(Collections.unmodifiableList(constantList));\r\n/* 57: */ }\r\n/* 58: */ }", "public interface Constants {\n \n public static String LOG_TAG = \"iyokan_parts\";\n}", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\"?\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public interface BaseConstant {\n\n //=======数据来源=========//\n /**\n * 微信公众号\n */\n Integer SOURCE_TYPE_WECHAT=1;\n /**\n * 后台\n */\n Integer SOURCE_TYPE_WEB=2;\n /**\n * APP\n */\n Integer SOURCE_TYPE_APP=3;\n //=======数据来源end=========//\n}", "public interface Constants {\n\n String IMAGE_DOWNLOAD_LINK = \"http://appsculture.com/vocab/images/\";\n\n}", "public interface Constants {\n public static final short NET_MASK_MAX_LENGTH = 32;\n}", "protected NConstants() {\n }", "interface ExtConstants {\n public static final String[] IMAGE_EXTENSIONS = { \".tiff\", \".tif\", \".gif \", \".jpeg\", \".jpg\" };\n}", "public interface Constant {\n String INDEX_URL=\"https://raw.githubusercontent.com/sujit0892/meeting/master/meeting-xml/index.xml\";\n String MEETING_TAG=\"meeting\";\n String NAME_TAG=\"name\";\n String VENUE_TAG=\"venue\";\n String START_DATE=\"start-date\";\n String XML_URL=\"url\";\n String END_DATE=\"end-date\";\n String DESCRIPTION_TAG=\"description\";\n\n}", "public interface GoConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int integer_literal = 8;\n /** RegularExpression Id. */\n int floating_literal = 9;\n /** RegularExpression Id. */\n int boolean_literal = 10;\n /** RegularExpression Id. */\n int string_literal = 11;\n /** RegularExpression Id. */\n int numbers = 12;\n /** RegularExpression Id. */\n int valid_characters = 13;\n /** RegularExpression Id. */\n int double_quotes_in_string = 14;\n /** RegularExpression Id. */\n int back_slash = 15;\n /** RegularExpression Id. */\n int tabulations = 16;\n /** RegularExpression Id. */\n int addition = 17;\n /** RegularExpression Id. */\n int subtraction = 18;\n /** RegularExpression Id. */\n int multiplication = 19;\n /** RegularExpression Id. */\n int division = 20;\n /** RegularExpression Id. */\n int remainder = 21;\n /** RegularExpression Id. */\n int increment = 22;\n /** RegularExpression Id. */\n int decrement = 23;\n /** RegularExpression Id. */\n int equal = 24;\n /** RegularExpression Id. */\n int not_equal = 25;\n /** RegularExpression Id. */\n int greater_than = 26;\n /** RegularExpression Id. */\n int less_than = 27;\n /** RegularExpression Id. */\n int greater_than_or_equal = 28;\n /** RegularExpression Id. */\n int less_than_or_equal = 29;\n /** RegularExpression Id. */\n int bitwise_and = 30;\n /** RegularExpression Id. */\n int bitwise_inclusive_or = 31;\n /** RegularExpression Id. */\n int bitwise_exclusive_or = 32;\n /** RegularExpression Id. */\n int left_shift = 33;\n /** RegularExpression Id. */\n int right_shift = 34;\n /** RegularExpression Id. */\n int and = 35;\n /** RegularExpression Id. */\n int or = 36;\n /** RegularExpression Id. */\n int not = 37;\n /** RegularExpression Id. */\n int assignment = 38;\n /** RegularExpression Id. */\n int dynamic_assignment = 39;\n /** RegularExpression Id. */\n int addition_assignment = 40;\n /** RegularExpression Id. */\n int subtraction_assignment = 41;\n /** RegularExpression Id. */\n int multiplication_assignment = 42;\n /** RegularExpression Id. */\n int division_assignment = 43;\n /** RegularExpression Id. */\n int remainder_assignment = 44;\n /** RegularExpression Id. */\n int bitwise_and_assignment = 45;\n /** RegularExpression Id. */\n int bitwise_inclusive_or_assignment = 46;\n /** RegularExpression Id. */\n int bitwise_exclusive_or_assignment = 47;\n /** RegularExpression Id. */\n int left_shift_assignment = 48;\n /** RegularExpression Id. */\n int right_shift_assignment = 49;\n /** RegularExpression Id. */\n int opening_round_brackets = 50;\n /** RegularExpression Id. */\n int closing_round_brackets = 51;\n /** RegularExpression Id. */\n int opening_curly_brackets = 52;\n /** RegularExpression Id. */\n int closing_curly_brackets = 53;\n /** RegularExpression Id. */\n int opening_square_brackets = 54;\n /** RegularExpression Id. */\n int closing_square_brackets = 55;\n /** RegularExpression Id. */\n int semicolon = 56;\n /** RegularExpression Id. */\n int colon = 57;\n /** RegularExpression Id. */\n int dot = 58;\n /** RegularExpression Id. */\n int comma = 59;\n /** RegularExpression Id. */\n int double_quotes = 60;\n /** RegularExpression Id. */\n int quotes = 61;\n /** RegularExpression Id. */\n int rw_break = 62;\n /** RegularExpression Id. */\n int rw_default = 63;\n /** RegularExpression Id. */\n int rw_func = 64;\n /** RegularExpression Id. */\n int rw_interface = 65;\n /** RegularExpression Id. */\n int rw_select = 66;\n /** RegularExpression Id. */\n int rw_case = 67;\n /** RegularExpression Id. */\n int rw_defer = 68;\n /** RegularExpression Id. */\n int rw_go = 69;\n /** RegularExpression Id. */\n int rw_map = 70;\n /** RegularExpression Id. */\n int rw_struct = 71;\n /** RegularExpression Id. */\n int rw_chan = 72;\n /** RegularExpression Id. */\n int rw_else = 73;\n /** RegularExpression Id. */\n int rw_goto = 74;\n /** RegularExpression Id. */\n int rw_package = 75;\n /** RegularExpression Id. */\n int rw_switch = 76;\n /** RegularExpression Id. */\n int rw_const = 77;\n /** RegularExpression Id. */\n int rw_fallthrough = 78;\n /** RegularExpression Id. */\n int rw_if = 79;\n /** RegularExpression Id. */\n int rw_range = 80;\n /** RegularExpression Id. */\n int rw_type = 81;\n /** RegularExpression Id. */\n int rw_continue = 82;\n /** RegularExpression Id. */\n int rw_for = 83;\n /** RegularExpression Id. */\n int rw_import = 84;\n /** RegularExpression Id. */\n int rw_return = 85;\n /** RegularExpression Id. */\n int rw_var = 86;\n /** RegularExpression Id. */\n int dt_uint8 = 87;\n /** RegularExpression Id. */\n int dt_uint16 = 88;\n /** RegularExpression Id. */\n int dt_uint32 = 89;\n /** RegularExpression Id. */\n int dt_uint64 = 90;\n /** RegularExpression Id. */\n int dt_int8 = 91;\n /** RegularExpression Id. */\n int dt_int16 = 92;\n /** RegularExpression Id. */\n int dt_int32 = 93;\n /** RegularExpression Id. */\n int dt_int64 = 94;\n /** RegularExpression Id. */\n int dt_float32 = 95;\n /** RegularExpression Id. */\n int dt_float64 = 96;\n /** RegularExpression Id. */\n int dt_complex64 = 97;\n /** RegularExpression Id. */\n int dt_complex128 = 98;\n /** RegularExpression Id. */\n int dt_byte = 99;\n /** RegularExpression Id. */\n int dt_rune = 100;\n /** RegularExpression Id. */\n int dt_uint = 101;\n /** RegularExpression Id. */\n int dt_int = 102;\n /** RegularExpression Id. */\n int dt_uintptr = 103;\n /** RegularExpression Id. */\n int dt_string = 104;\n /** RegularExpression Id. */\n int dt_bool = 105;\n /** RegularExpression Id. */\n int main = 106;\n /** RegularExpression Id. */\n int library_fmt = 107;\n /** RegularExpression Id. */\n int rw_printf = 108;\n /** RegularExpression Id. */\n int rw_scanf = 109;\n /** RegularExpression Id. */\n int id = 110;\n /** RegularExpression Id. */\n int invalid_string = 111;\n /** RegularExpression Id. */\n int invalid_string_import = 112;\n /** RegularExpression Id. */\n int invalid_string_import_1 = 113;\n /** RegularExpression Id. */\n int invalid_string_import_2 = 114;\n /** RegularExpression Id. */\n int is_not_id = 115;\n /** RegularExpression Id. */\n int invalid_character = 116;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\r\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"<integer_literal>\",\n \"<floating_literal>\",\n \"<boolean_literal>\",\n \"<string_literal>\",\n \"<numbers>\",\n \"<valid_characters>\",\n \"\\\"\\\\\\\\\\\\\\\"\\\"\",\n \"\\\"\\\\\\\\\\\"\",\n \"<tabulations>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"&\\\"\",\n \"\\\"|\\\"\",\n \"\\\"^\\\"\",\n \"\\\"<<\\\"\",\n \"\\\">>\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"!\\\"\",\n \"\\\"=\\\"\",\n \"\\\":=\\\"\",\n \"\\\"+=\\\"\",\n \"\\\"-=\\\"\",\n \"\\\"*=\\\"\",\n \"\\\"/=\\\"\",\n \"\\\"%=\\\"\",\n \"\\\"&=\\\"\",\n \"\\\"|=\\\"\",\n \"\\\"^=\\\"\",\n \"\\\"<<=\\\"\",\n \"\\\">>=\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\":\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"\\\\\\'\\\"\",\n \"\\\"break\\\"\",\n \"\\\"default\\\"\",\n \"\\\"func\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"select\\\"\",\n \"\\\"case\\\"\",\n \"\\\"defer\\\"\",\n \"\\\"go\\\"\",\n \"\\\"map\\\"\",\n \"\\\"struct\\\"\",\n \"\\\"chan\\\"\",\n \"\\\"else\\\"\",\n \"\\\"goto\\\"\",\n \"\\\"package\\\"\",\n \"\\\"switch\\\"\",\n \"\\\"const\\\"\",\n \"\\\"fallthrough\\\"\",\n \"\\\"if\\\"\",\n \"\\\"range\\\"\",\n \"\\\"type\\\"\",\n \"\\\"continue\\\"\",\n \"\\\"for\\\"\",\n \"\\\"import\\\"\",\n \"\\\"return\\\"\",\n \"\\\"var\\\"\",\n \"\\\"uint8\\\"\",\n \"\\\"uint16\\\"\",\n \"\\\"uint32\\\"\",\n \"\\\"uint64\\\"\",\n \"\\\"int8\\\"\",\n \"\\\"int16\\\"\",\n \"\\\"int32\\\"\",\n \"\\\"int64\\\"\",\n \"\\\"float32\\\"\",\n \"\\\"float64\\\"\",\n \"\\\"complex64\\\"\",\n \"\\\"complex128\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"rune\\\"\",\n \"\\\"uint\\\"\",\n \"\\\"int\\\"\",\n \"\\\"uintptr\\\"\",\n \"\\\"string\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"main\\\"\",\n \"\\\"fmt\\\"\",\n \"\\\"Printf\\\"\",\n \"\\\"Scanf\\\"\",\n \"<id>\",\n \"<invalid_string>\",\n \"<invalid_string_import>\",\n \"<invalid_string_import_1>\",\n \"<invalid_string_import_2>\",\n \"<is_not_id>\",\n \"<invalid_character>\",\n };\n\n}", "public interface constants {\n String BREAK1=\"α\";\n String BREAK2=\"Σ\";\n String BREAK3=\"æ\";\n}", "public void testExecPluginConstants() throws Exception {\n\t\tassertConstant( \"execRootURIs\", \"EXEC_ROOT_URIS\", ExecPlugin.class);\n\t}", "@Override\n public boolean isConstant() {\n return false;\n }", "@Override\n\tpublic void buildConstants(JDefinedClass cls) {\n\n\t}", "private RBACConstants() {\r\n }", "public interface SQL_CONSTANTS {\n\t\tstatic final String JDBC_DRIVER = \"com.mysql.jdbc.Driver\";\n\t\tstatic final String DB_URL = \"jdbc:mysql://localhost/EMP\";\n\t\tstatic final String USER = \"username\";\n\t\tstatic final String PASSWORD = \"password\";\n\t}", "private MainConst() {\n super(\"\");\n }", "@Override\n\tpublic InterpreteConstants constant() {\n\t\treturn null;\n\t}", "public interface STConstant {\n\n /** The base resource path for this application. */\n String BASE_RES_PATH = \"/com/sandy/stocktracker/\" ;\n\n /** The date format used for NSE EOD dates in the CSV files. */\n SimpleDateFormat DATE_FMT = new SimpleDateFormat( \"dd-MMM-yyyy\" ) ;\n\n /** The time format used for ITD title displays and general time displays. */\n SimpleDateFormat TIME_FMT = new SimpleDateFormat( \"HH:mm:ss\" ) ;\n\n /** The the expanded time format. */\n SimpleDateFormat DATE_TIME_FMT = new SimpleDateFormat( \"dd-MMM-yyyy HH:mm:ss\" ) ;\n\n /** The prefix for drop values indicating the drop value as scrip name. */\n String DROP_VAL_SCRIP = \"SCRIP:\" ;\n\n /** The application config key against which the install directory is specified. */\n String CFG_KEY_INSTALL_DIR = \"pluto.install.dir\" ;\n\n /** The application config key against which biz start hour is specified. */\n String CFG_KEY_NSE_BIZ_START_HR = \"nse.business.start.time\" ;\n\n /** The application config key against which biz end hour is specified. */\n String CFG_KEY_NSE_BIZ_END_HR = \"nse.business.end.time\" ;\n\n /** The number of days for which to show old news. */\n String CFG_KEY_NUM_OLD_DAYS_NEWS = \"news.display.num.days\" ;\n}", "public interface VerificationConst {\n\t/**\n\t * Минимальные габариты зала\n\t */\n\tpublic static final int MIN_SECTOR_DIMENSIONS = 1000;\n\t/**\n\t * минимальные габариты стеллажа\n\t */\n\tpublic static final int MIN_RACK_DIMENSIONS = 10;\n\t/**\n\t * минимальные габариты полки стеллажа\n\t */\n\tpublic static final int MIN_RACK_SHELF_DIMENSIONS = 5;\n}", "WordConstant createWordConstant();", "public interface Constants {\r\n\r\n /** The factory. */\r\n FieldFactory FACTORY = new FieldFactoryImpl();\r\n\r\n /** The 64 K chunk size */\r\n int _64K = 40 * 40 * 40;\r\n\r\n /** The Aligned 64 compiler */\r\n Aligned64Compiler ALIGNED64 = new Aligned64Compiler();\r\n\r\n /** Number of Elements to be READ */\r\n int ELEMENTS_READ = _64K;\r\n\r\n /** Number of Elements to be Written */\r\n int ELEMENTS_WRITTEN = _64K;\r\n\r\n /** The packed compiler*/\r\n CompilerBase PACKED = new PackedCompiler();\r\n\r\n /** The * iterations. */\r\n int _ITERATIONS = 20;\r\n\r\n /** The read iterations. */\r\n int READ_ITERATIONS = _ITERATIONS;\r\n\r\n /** The read union iterations. */\r\n int READ_ITERATIONS_UNION = _ITERATIONS;\r\n\r\n /** The write iterations non-transactional. */\r\n int WRITE_ITERATIONS_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write iterations transactional. */\r\n int WRITE_ITERATIONS_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations non-transactional. */\r\n int WRITE_ITERATIONS_UNION_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations transactional. */\r\n int WRITE_ITERATIONS_UNION_TRANSACTIONAL = _ITERATIONS;\r\n\r\n}", "public interface ConstantsKey {\n// Values\n String TEXT_FONT_STYLE_NAME=\"WorkSans_Regular.ttf\";\n// Urls\n String BASE_URL=\"http://test.code-apex.com/codeapex_project/index.php/api/user/\";\n String BASEURL =\"baseurl\" ;\n// Keys\n}", "private CommonUIConstants()\n {\n }", "public interface Constants {\n\n\t// /**\n\t// * Version string to identify library (e.g., in EXIficientGUI)\n\t// */\n\t// public static final String VERSION = \"1.0.0-SNAPSHOT\";\n\n\t/**\n\t * <p>\n\t * W3C EXI Namespace URI\n\t * </p>\n\t * \n\t * <p>\n\t * Defined to be \"<code>http://www.w3.org/2009/exi</code>\".\n\t */\n\tpublic static final String W3C_EXI_NS_URI = \"http://www.w3.org/2009/exi\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:base64Binary\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_BASE64BINARY = \"base64Binary\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:hexBinary\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_HEXBINARY = \"hexBinary\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:boolean\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_BOOLEAN = \"boolean\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:dateTime\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_DATETIME = \"dateTime\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:time\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_TIME = \"time\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:date\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_DATE = \"date\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:gYearMonth\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_GYEARMONTH = \"gYearMonth\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:gYear\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_GYEAR = \"gYear\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:gMonthDay\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_GMONTHDAY = \"gMonthDay\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:gDay\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_GDAY = \"gDay\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:gMonth\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_GMONTH = \"gMonth\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:decimal\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_DECIMAL = \"decimal\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:float and xsd:double\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_DOUBLE = \"double\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:integer\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_INTEGER = \"integer\";\n\n\t/**\n\t * <p>\n\t * W3C EXI local-name for datatype xsd:string, xsd:anySimpleType and all\n\t * types derived by union\n\t * </p>\n\t */\n\tpublic static final String W3C_EXI_LN_STRING = \"string\";\n\n\t/**\n\t * XML Reader feature\n\t */\n\tpublic static final String W3C_EXI_FEATURE_BODY_ONLY = \"http://www.w3.org/exi/features/exi-body-only\";\n\n\t/**\n\t * Initial Entries in String Table Partitions\n\t */\n\t/* \"\", empty string */\n\tpublic static final String[] PREFIXES_EMPTY = { \"\" };\n\tpublic static final String[] LOCAL_NAMES_EMPTY = {};\n\t/* \"http://www.w3.org/XML/1998/namespace\" */\n\tpublic static String[] PREFIXES_XML = { \"xml\" };\n\tpublic static String[] LOCAL_NAMES_XML = { \"base\", \"id\", \"lang\", \"space\" };\n\t/* \"http://www.w3.org/2001/XMLSchema-instance\", xsi */\n\tpublic static String[] PREFIXES_XSI = { \"xsi\" };\n\tpublic static String[] LOCAL_NAMES_XSI = { \"nil\", \"type\" };\n\t/* \"http://www.w3.org/2001/XMLSchema\", xsd */\n\tpublic static String[] PREFIXES_XSD = {};\n\tpublic static String[] LOCAL_NAMES_XSD = { \"ENTITIES\", \"ENTITY\", \"ID\",\n\t\t\t\"IDREF\", \"IDREFS\", \"NCName\", \"NMTOKEN\", \"NMTOKENS\", \"NOTATION\",\n\t\t\t\"Name\", \"QName\", \"anySimpleType\", \"anyType\", \"anyURI\",\n\t\t\t\"base64Binary\", \"boolean\", \"byte\", \"date\", \"dateTime\", \"decimal\",\n\t\t\t\"double\", \"duration\", \"float\", \"gDay\", \"gMonth\", \"gMonthDay\",\n\t\t\t\"gYear\", \"gYearMonth\", \"hexBinary\", \"int\", \"integer\", \"language\",\n\t\t\t\"long\", \"negativeInteger\", \"nonNegativeInteger\",\n\t\t\t\"nonPositiveInteger\", \"normalizedString\", \"positiveInteger\",\n\t\t\t\"short\", \"string\", \"time\", \"token\", \"unsignedByte\", \"unsignedInt\",\n\t\t\t\"unsignedLong\", \"unsignedShort\" };\n\n\t/**\n\t * \n\t */\n\tpublic static final String EMPTY_STRING = \"\";\n\t// public static final StringValue EMPTY_STRING_VALUE = new\n\t// StringValue(Constants.EMPTY_STRING);\n\n\tpublic static final String XSI_SCHEMA_LOCATION = \"schemaLocation\";\n\tpublic static final String XSI_NONAMESPACE_SCHEMA_LOCATION = \"noNamespaceSchemaLocation\";\n\n\tpublic static final String XML_NS_PREFIX = XMLConstants.XML_NS_PREFIX; // \"xml\"\n\tpublic static final String XML_NULL_NS_URI = XMLConstants.NULL_NS_URI; // \"\"\n\tpublic static final String XML_DEFAULT_NS_PREFIX = XMLConstants.DEFAULT_NS_PREFIX; // \"\"\n\tpublic static final String XML_NS_ATTRIBUTE_NS_URI = XMLConstants.XMLNS_ATTRIBUTE_NS_URI; // \"http://www.w3.org/2000/xmlns/\"\n\tpublic static final String XML_NS_ATTRIBUTE = XMLConstants.XMLNS_ATTRIBUTE; // \"xmlns\"\n\tpublic static final String XML_NS_URI = XMLConstants.XML_NS_URI; // \"http://www.w3.org/XML/1998/namespace\"\n\tpublic static final String XML_SCHEMA_INSTANCE_NS_URI = XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI; // \"http://www.w3.org/2001/XMLSchema-instance\"\n\tpublic static final String XML_SCHEMA_NS_URI = XMLConstants.W3C_XML_SCHEMA_NS_URI; // \"http://www.w3.org/2001/XMLSchema\"\n\n\tpublic static final String XSI_PFX = \"xsi\";\n\tpublic static final String XSI_TYPE = \"type\";\n\tpublic static final String XSI_NIL = \"nil\";\n\n\tpublic static final String COLON = \":\";\n\n\tpublic static final String XSD_LIST_DELIM = \" \";\n\tpublic static final char XSD_LIST_DELIM_CHAR = ' ';\n\tpublic static final char[] XSD_LIST_DELIM_CHAR_ARRAY = { ' ' };\n\n\t// public static final String CDATA_START = \"<![CDATA[\";\n\t// public static final char[] CDATA_START_ARRAY = CDATA_START.toCharArray();\n\t// public static final String CDATA_END = \"]]>\";\n\t// public static final char[] CDATA_END_ARRAY = CDATA_END.toCharArray();\n\n\tpublic static final String XSD_ANY_TYPE = \"anyType\";\n\n\tpublic static final String XSD_BOOLEAN_TRUE = \"true\";\n\tpublic static final String XSD_BOOLEAN_1 = \"1\";\n\tpublic static final String XSD_BOOLEAN_FALSE = \"false\";\n\tpublic static final String XSD_BOOLEAN_0 = \"0\";\n\n\tpublic static final char[] XSD_BOOLEAN_TRUE_ARRAY = XSD_BOOLEAN_TRUE\n\t\t\t.toCharArray();\n\tpublic static final char[] XSD_BOOLEAN_1_ARRAY = XSD_BOOLEAN_1\n\t\t\t.toCharArray();\n\tpublic static final char[] XSD_BOOLEAN_FALSE_ARRAY = XSD_BOOLEAN_FALSE\n\t\t\t.toCharArray();\n\tpublic static final char[] XSD_BOOLEAN_0_ARRAY = XSD_BOOLEAN_0\n\t\t\t.toCharArray();\n\n\tpublic static final String DECODED_BOOLEAN_TRUE = XSD_BOOLEAN_TRUE;\n\tpublic static final String DECODED_BOOLEAN_FALSE = XSD_BOOLEAN_FALSE;\n\tpublic static final char[] DECODED_BOOLEAN_TRUE_ARRAY = DECODED_BOOLEAN_TRUE\n\t\t\t.toCharArray();\n\tpublic static final char[] DECODED_BOOLEAN_FALSE_ARRAY = DECODED_BOOLEAN_FALSE\n\t\t\t.toCharArray();\n\n\tpublic static final int NOT_FOUND = -1;\n\n\t/*\n\t * Block & Channel settings Maximal Number of Values (per Block / Channel)\n\t */\n\tpublic static final int MAX_NUMBER_OF_VALUES = 100;\n\tpublic static final int DEFAULT_BLOCK_SIZE = 1000000;\n\n\t/*\n\t * StringTable settings\n\t */\n\tpublic static final int DEFAULT_VALUE_MAX_LENGTH = -1; // unbounded\n\tpublic static final int DEFAULT_VALUE_PARTITON_CAPACITY = -1; // unbounded\n\n\t/*\n\t * Float & Double Values\n\t */\n\tpublic static final String FLOAT_INFINITY = \"INF\";\n\tpublic static final String FLOAT_MINUS_INFINITY = \"-INF\";\n\tpublic static final String FLOAT_NOT_A_NUMBER = \"NaN\";\n\n\tpublic static final char[] FLOAT_INFINITY_CHARARRAY = FLOAT_INFINITY\n\t\t\t.toCharArray();\n\tpublic static final char[] FLOAT_MINUS_INFINITY_CHARARRAY = FLOAT_MINUS_INFINITY\n\t\t\t.toCharArray();\n\tpublic static final char[] FLOAT_NOT_A_NUMBER_CHARARRAY = FLOAT_NOT_A_NUMBER\n\t\t\t.toCharArray();\n\n\t/* -(2^14) == -16384 */\n\tpublic static final int FLOAT_SPECIAL_VALUES = -16384;\n\tpublic static final int FLOAT_MANTISSA_INFINITY = 1;\n\tpublic static final int FLOAT_MANTISSA_MINUS_INFINITY = -1;\n\tpublic static final int FLOAT_MANTISSA_NOT_A_NUMBER = 0;\n\n\t/* -(2^14-1) == -16383 */\n\tpublic static final long FLOAT_EXPONENT_MIN_RANGE = -16383;\n\t/* 2^14-1 == 16383 */\n\tpublic static final long FLOAT_EXPONENT_MAX_RANGE = 16383;\n\t/* -(2^63) == -9223372036854775808L */\n\tpublic static final long FLOAT_MANTISSA_MIN_RANGE = -9223372036854775808L;\n\t/* 2^63-1 == 9223372036854775807L */\n\tpublic static final long FLOAT_MANTISSA_MAX_RANGE = 9223372036854775807L;\n\n}", "public double[] constants() {\n return new double[]{a1, a2, b0, b1, b2};\n }", "public interface TriggerUtilConstants {\n\n public static final int DEFAULT_MAX_BUFFERS = 1000;\n public static final int DEFAULT_BUFFER_BLEN = 32000;\n}" ]
[ "0.7335371", "0.72507477", "0.69007605", "0.68740755", "0.68740755", "0.6666067", "0.66506064", "0.65966326", "0.6579748", "0.6573902", "0.65716964", "0.6551089", "0.6549508", "0.6521765", "0.6502086", "0.648024", "0.6455892", "0.6452229", "0.6420681", "0.6417415", "0.6414288", "0.64083326", "0.63876873", "0.6381912", "0.637787", "0.63724464", "0.6365511", "0.6364371", "0.63509005", "0.63281727", "0.6312208", "0.63112444", "0.6297779", "0.62822187", "0.6258506", "0.6227756", "0.62124205", "0.6183231", "0.61787987", "0.6168928", "0.61576474", "0.6148247", "0.6142733", "0.6137435", "0.61247355", "0.611228", "0.6109449", "0.60870296", "0.60755765", "0.60695225", "0.6049252", "0.6037939", "0.6034175", "0.60332984", "0.60283685", "0.6027038", "0.60095793", "0.5997356", "0.59937084", "0.5986304", "0.59831196", "0.5980785", "0.59697556", "0.59664613", "0.5959277", "0.59585214", "0.5955985", "0.5954272", "0.5930528", "0.5927102", "0.5924592", "0.5923083", "0.59219235", "0.5921893", "0.59205073", "0.5917296", "0.5906601", "0.59049684", "0.59043336", "0.588667", "0.58859515", "0.5882975", "0.5882113", "0.5878804", "0.5876926", "0.5874372", "0.58716184", "0.58608145", "0.5860082", "0.5857708", "0.5850935", "0.5847544", "0.5843496", "0.5839683", "0.5837236", "0.5834524", "0.5831483", "0.58279634", "0.5824671", "0.5819547", "0.5818058" ]
0.0
-1
TODO Autogenerated method stub
public boolean isSelectedIndex(int index) { return tablecolselectmodel.isSelectedIndex(index); }
{ "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
TODO Autogenerated method stub
public boolean isSelectionEmpty() { return tablecolselectmodel.isSelectionEmpty(); }
{ "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
TODO Autogenerated method stub
@Override public void paint(Graphics g, JComponent c) { super.paint(g, c); JTable table = (JTable) c; // 对于单元格.要合并 Enumeration<Mergeinfo> en = tablevdef.getMergeinfos() .elements(); while (en.hasMoreElements()) { Mergeinfo minfo = en.nextElement(); // 合并 Rectangle minrect = table.getCellRect(minfo.startrow, minfo.startcolumn+1, false); Rectangle maxrect = table.getCellRect(minfo.startrow + minfo.rowcount - 1, minfo.startcolumn + minfo.columncount - 1+1, false); Rectangle cellRect = minrect.union(maxrect); Color oldc = g.getColor(); g.setColor(Color.WHITE); g.fillRect(cellRect.x, cellRect.y, cellRect.width, cellRect.height); // 画单元格 TableCellRenderer renderer = table.getCellRenderer( minfo.startrow, minfo.startcolumn+1); Component component = table.prepareRenderer(renderer, minfo.startrow, minfo.startcolumn+1); rendererPane.paintComponent(g, component, table, cellRect.x, cellRect.y, cellRect.width, cellRect.height, true); g.setColor(oldc); } }
{ "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
Execute the rewrite rule and return code.
public int execute();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "URI rewrite(URI uri);", "public final ANTLRv3Parser.rewrite_return rewrite() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_return retval = new ANTLRv3Parser.rewrite_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token rew2=null;\r\n Token rew=null;\r\n Token preds=null;\r\n List list_rew=null;\r\n List list_preds=null;\r\n List list_predicated=null;\r\n ANTLRv3Parser.rewrite_alternative_return last =null;\r\n\r\n RuleReturnScope predicated = null;\r\n CommonTree rew2_tree=null;\r\n CommonTree rew_tree=null;\r\n CommonTree preds_tree=null;\r\n RewriteRuleTokenStream stream_SEMPRED=new RewriteRuleTokenStream(adaptor,\"token SEMPRED\");\r\n RewriteRuleTokenStream stream_REWRITE=new RewriteRuleTokenStream(adaptor,\"token REWRITE\");\r\n RewriteRuleSubtreeStream stream_rewrite_alternative=new RewriteRuleSubtreeStream(adaptor,\"rule rewrite_alternative\");\r\n\r\n \tToken firstToken = input.LT(1);\r\n\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:354:2: ( (rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) |)\r\n int alt72=2;\r\n int LA72_0 = input.LA(1);\r\n\r\n if ( (LA72_0==REWRITE) ) {\r\n alt72=1;\r\n }\r\n else if ( (LA72_0==69||LA72_0==76||LA72_0==91) ) {\r\n alt72=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 72, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt72) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:354:4: (rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:354:4: (rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative )*\r\n loop71:\r\n do {\r\n int alt71=2;\r\n int LA71_0 = input.LA(1);\r\n\r\n if ( (LA71_0==REWRITE) ) {\r\n int LA71_1 = input.LA(2);\r\n\r\n if ( (LA71_1==SEMPRED) ) {\r\n alt71=1;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n switch (alt71) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:354:5: rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative\r\n \t {\r\n \t rew=(Token)match(input,REWRITE,FOLLOW_REWRITE_in_rewrite2577); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_REWRITE.add(rew);\r\n\r\n \t if (list_rew==null) list_rew=new ArrayList();\r\n \t list_rew.add(rew);\r\n\r\n\r\n \t preds=(Token)match(input,SEMPRED,FOLLOW_SEMPRED_in_rewrite2581); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_SEMPRED.add(preds);\r\n\r\n \t if (list_preds==null) list_preds=new ArrayList();\r\n \t list_preds.add(preds);\r\n\r\n\r\n \t pushFollow(FOLLOW_rewrite_alternative_in_rewrite2585);\r\n \t predicated=rewrite_alternative();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_rewrite_alternative.add(predicated.getTree());\r\n \t if (list_predicated==null) list_predicated=new ArrayList();\r\n \t list_predicated.add(predicated.getTree());\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop71;\r\n }\r\n } while (true);\r\n\r\n\r\n rew2=(Token)match(input,REWRITE,FOLLOW_REWRITE_in_rewrite2593); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_REWRITE.add(rew2);\r\n\r\n\r\n pushFollow(FOLLOW_rewrite_alternative_in_rewrite2597);\r\n last=rewrite_alternative();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_rewrite_alternative.add(last.getTree());\r\n\r\n // AST REWRITE\r\n // elements: last, rew2, preds, predicated, rew\r\n // token labels: rew2\r\n // rule labels: retval, last\r\n // token list labels: rew, preds\r\n // rule list labels: predicated\r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_rew2=new RewriteRuleTokenStream(adaptor,\"token rew2\",rew2);\r\n RewriteRuleTokenStream stream_rew=new RewriteRuleTokenStream(adaptor,\"token rew\", list_rew);\r\n RewriteRuleTokenStream stream_preds=new RewriteRuleTokenStream(adaptor,\"token preds\", list_preds);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n RewriteRuleSubtreeStream stream_last=new RewriteRuleSubtreeStream(adaptor,\"rule last\",last!=null?last.tree:null);\r\n RewriteRuleSubtreeStream stream_predicated=new RewriteRuleSubtreeStream(adaptor,\"token predicated\",list_predicated);\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 356:9: -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last)\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:356:12: ( ^( $rew $preds $predicated) )*\r\n while ( stream_preds.hasNext()||stream_predicated.hasNext()||stream_rew.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:356:12: ^( $rew $preds $predicated)\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(stream_rew.nextNode(), root_1);\r\n\r\n adaptor.addChild(root_1, stream_preds.nextNode());\r\n\r\n adaptor.addChild(root_1, stream_predicated.nextTree());\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n stream_preds.reset();\r\n stream_predicated.reset();\r\n stream_rew.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:356:40: ^( $rew2 $last)\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(stream_rew2.nextNode(), root_1);\r\n\r\n adaptor.addChild(root_1, stream_last.nextTree());\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:358:2: \r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "void checkRewrite(\n SqlValidator validator,\n String query,\n String expectedRewrite);", "protected boolean processRule(HttpServletRequest request, HttpServletResponse response, \r\n\t\t\tRedirectRule rule, String targetURL) \r\n\t\t\tthrows ServletException, IOException {\r\n\t\t\r\n\t\tString finalURL = getFinalURL(request, response, rule, targetURL);\r\n\t\t\r\n\t\tif (rule instanceof RedirectAction) {\r\n\t\t\tRedirectAction redirectRule = (RedirectAction)rule;\r\n\t\t\tif (redirectRule.cache != null) {\r\n\t\t\t\tresponse.addHeader(\"Cache-Control\", redirectRule.cache);\r\n\t\t\t}\r\n\t\t\tif (redirectRule.permanent == true) {\r\n\t\t\t\tresponse.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);\r\n\t\t\t\tresponse.addHeader(\"Location\", finalURL);\r\n\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tresponse.sendRedirect(finalURL);\r\n\t\t\t}\r\n\r\n\t\t\tif (logRedirects == true) {\r\n\t\t\t\tfilterConfig.getServletContext().log(filterName + \": \" +\r\n\t\t\t\t\t\t\"Redirected '\" + getRequestURI(request) + \"' to '\" + finalURL + \"'\");\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t} else if (rule instanceof ForwardAction) {\r\n\t\t\tRequestDispatcher reqDisp = request.getRequestDispatcher(targetURL);\r\n\t\t\treqDisp.forward(request, response);\r\n\t\t\t\r\n\t\t\tif (logRedirects == true) {\r\n\t\t\t\tfilterConfig.getServletContext().log(filterName + \": \" +\r\n\t\t\t\t\t\t\"Forwarded '\" + getRequestURI(request) + \"' to '\" + targetURL + \"'\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public abstract int execute();", "public void rewrite() throws FitsException, IOException;", "public int replaceRule(String key, Map ph, XQueue in) {\n int id = ruleList.getID(key);\n if (id == 0) // can not replace the default rule\n return -1;\n else if (id > 0) { // for a normal rule\n if (ph == null || ph.size() <= 0)\n throw(new IllegalArgumentException(\"Empty property for rule\"));\n if (!key.equals((String) ph.get(\"Name\"))) {\n new Event(Event.ERR, name + \": name not match for rule \" + key +\n \": \" + (String) ph.get(\"Name\")).send();\n return -1;\n }\n if (getStatus() == NODE_RUNNING)\n throw(new IllegalStateException(name + \" is in running state\"));\n long tm = System.currentTimeMillis();\n long[] meta = new long[RULE_TIME+1];\n long[] ruleInfo = ruleList.getMetaData(id);\n Map rule = initRuleset(tm, ph, meta);\n if (rule != null && rule.containsKey(\"Name\")) {\n StringBuffer strBuf = ((debug & DEBUG_DIFF) <= 0) ? null :\n new StringBuffer();\n Map h = (Map) ruleList.set(id, rule);\n if (h != null) {\n MessageFilter filter = (MessageFilter) h.remove(\"Filter\");\n if (filter != null)\n filter.clear();\n AssetList list = (AssetList) h.remove(\"TaskList\");\n if (list != null)\n cleanupTasks(list);\n h.clear();\n }\n tm = ruleInfo[RULE_PID];\n for (int i=0; i<RULE_TIME; i++) { // update metadata\n switch (i) {\n case RULE_SIZE:\n break;\n case RULE_COUNT:\n if (tm == meta[RULE_PID]) // same rule type\n break;\n default:\n ruleInfo[i] = meta[i];\n }\n if ((debug & DEBUG_DIFF) > 0)\n strBuf.append(\" \" + ruleInfo[i]);\n }\n if ((debug & DEBUG_DIFF) > 0)\n new Event(Event.DEBUG, name + \"/\" + key + \" ruleInfo:\" +\n strBuf).send();\n return id;\n }\n else\n new Event(Event.ERR, name + \" failed to init rule \"+key).send();\n }\n else if (cfgList != null && cfgList.containsKey(key)) {\n return super.replaceRule(key, ph, in);\n }\n return -1;\n }", "@Override\n\tpublic void processResult(int rc, String path, Object ctx, Stat stat) {\n\t\tSystem.out.println(\"rc:\" + rc);\n\t\tif (rc == 0) {\n\t\t\tSystem.out.println(\"SUCCESS\");\n\t\t}\n\t}", "protected abstract Builder processSpecificRoutingRule(Builder rb);", "public void rewrite(){\n\t\t//SROEL2DatalogRewriter rewriter = new SROEL2DatalogRewriter();\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\t//Rewriting for global context.\n\t\tRLGlobal2DatalogRewriter globalrewriter = new RLGlobal2DatalogRewriter();\n\t\tdatalogGlobal = globalrewriter.rewrite(inputCKR.getGlobalOntology());\n\t\t//System.out.println(\"Rewriting program for global context complete.\");\n\t\t\n\t\t//Computation of set of contexts and associations to modules\n\t\tcomputeSets(datalogGlobal);\n\t\t//System.out.println(\"Set of contexts and modules associations computed.\");\n\t\t\n\t\t//Computation of local contexts knowledge bases.\n\t\tcomputeLocalKB();\n\t\t\n\t\t//Rewriting for local contexts knowledge bases.\n\t\tRLLocal2DatalogRewriter localrewriter = new RLLocal2DatalogRewriter();\n\t\t\n\t\tdatalogLocal = new LinkedList<DLProgram>();\n\t\tfor (String c : contextsSet) {\n\t\t\t//System.out.println(\"Rewriting program for \" + c.replaceAll(\"\\\"\", \"\"));\n\t\t\tlocalrewriter.setContextID(c.replaceAll(\"\\\"\", \"\"));\n\t\t\tdatalogLocal.add(localrewriter.rewrite(contextsOntologies.get(c)));\n\t\t}\n\t\t\n\t\t//for (OWLOntology o : inputCKR.getLocalOntology()) {\n\t\t//\tlocalrewriter.setLocalID(\"c\");\n\t\t//\t//o.getOWLOntologyManager().addAxioms(o, inputCKR.getGlobalOntology().getAxioms());\n\t\t//\t\n\t\t//\tdatalogLocal.add(localrewriter.rewrite(o));\n\t\t//\t//System.out.println(datalogLocal.getLast().getStatements().size());\n\t\t//}\n\t\t\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\trewritingTime = endTime - startTime;\n\n\t\t//System.out.println(\"Rewriting completed in \" + rewritingTime + \" ms.\");\n\t\t//System.out.println(datalogGlobal.getStatements().size());\n\t\t\n\t\t//Compute CKR Program.\n\t\tdatalogCKR = new DLProgram();\n\t\n\t\tdatalogCKR.addAll(datalogGlobal.getStatements());\n\t\tfor (DLProgram dlProgram : datalogLocal) {\n\t\t\tdatalogCKR.addAll(dlProgram.getStatements());\t\n\t\t}\n\t\t//Add local inference rules.\n\t\tdatalogCKR.addAll(DeductionRuleset.getPloc());\n\t\t//Add local propagation rules.\n\t\tdatalogCKR.addAll(DeductionRuleset.getPd());\n\t\t\n\t\t//StringReader reader = new StringReader(\"hasModule(X,Y) :- triple(X, \\\"hasModule\\\", Y, \\\"g\\\").\");\n\t\t//DLProgramParser dlProgramParser = new DLProgramParser(reader);\n\t\t//try {\n\t\t//\tdatalogCKR.addAll(dlProgramParser.program().getStatements());\n\t\t//} catch (ParseException e) {\n\t\t//\te.printStackTrace();\n\t\t//}\n\t}", "@Test\n\tpublic void testExecuteRuleNewSyntaxWithWriteLine() throws Exception {\n\n\t\tIRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties);\n\t\tIRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory();\n\n\t\tEnvironmentalInfoAO environmentalInfoAO = irodsFileSystem.getIRODSAccessObjectFactory()\n\t\t\t\t.getEnvironmentalInfoAO(irodsAccount);\n\t\tIRODSServerProperties props = environmentalInfoAO.getIRODSServerPropertiesFromIRODSServer();\n\n\t\tif (!props.isTheIrodsServerAtLeastAtTheGivenReleaseVersion(\"rods3.0\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tRuleProcessingAO ruleProcessingAO = accessObjectFactory.getRuleProcessingAO(irodsAccount);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"myTestRule {\\n\");\n\t\tsb.append(\" writeString(*Where, *StringIn);\\n\");\n\t\tsb.append(\"writeLine(*Where,\\\"cheese\\\");\\n\");\n\t\tsb.append(\"}\\n\");\n\t\tsb.append(\"INPUT *Where=\\\"stdout\\\", *StringIn=\\\"string\\\"\\n\");\n\t\tsb.append(\"OUTPUT ruleExecOut\");\n\t\tString ruleString = sb.toString();\n\t\tRuleInvocationConfiguration context = new RuleInvocationConfiguration();\n\t\tcontext.setIrodsRuleInvocationTypeEnum(IrodsRuleInvocationTypeEnum.IRODS);\n\t\tcontext.setEncodeRuleEngineInstance(true);\n\t\tIRODSRuleExecResult result = ruleProcessingAO.executeRule(ruleString, null, context);\n\t\tAssert.assertNotNull(\"null result from rule execution\", result);\n\n\t}", "public ExtendedIterator execute(TriplePattern query, InfGraph infGraph, Finder data, HashSet firedRules) {\r\n RDFSInfGraph bRr = (RDFSInfGraph)infGraph;\r\n if (query.getSubject().isVariable()) {\r\n // Find all things of type resource\r\n return new ResourceRewriteIterator(bRr.findRawWithContinuation(body, data));\r\n } else {\r\n // Just check for a specific resource\r\n Node subj = query.getSubject();\r\n TriplePattern pattern = new TriplePattern(subj, null, null);\r\n String var = \"s\";\r\n ExtendedIterator it = bRr.findRawWithContinuation(pattern, data);\r\n if (!it.hasNext()) {\r\n pattern = new TriplePattern(null, null, subj);\r\n var = \"o\";\r\n it = bRr.findRawWithContinuation(pattern, data);\r\n if (!it.hasNext()) {\r\n pattern = new TriplePattern(null, subj, null);\r\n var = \"p\";\r\n it = bRr.findRawWithContinuation(pattern, data);\r\n }\r\n }\r\n BRWRule rwrule = new BRWRule(new TriplePattern(Node.createVariable(var), TYPE, RESOURCE), body);\r\n return new RewriteIterator(it, rwrule);\r\n }\r\n }", "public void add_rule(Rule rule) throws Exception;", "public RewriteResult<A, ?> all(final TypeRewriteRule rule, final boolean recurse, final boolean checkIndex) {\n return RewriteResult.nop(this);\n }", "@Test\n\tpublic void testExecuteRuleNewSyntaxWithWriteLineV2() throws Exception {\n\n\t\tIRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties);\n\t\tIRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory();\n\n\t\tEnvironmentalInfoAO environmentalInfoAO = irodsFileSystem.getIRODSAccessObjectFactory()\n\t\t\t\t.getEnvironmentalInfoAO(irodsAccount);\n\t\tIRODSServerProperties props = environmentalInfoAO.getIRODSServerPropertiesFromIRODSServer();\n\n\t\tif (!props.isTheIrodsServerAtLeastAtTheGivenReleaseVersion(\"rods3.0\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tRuleProcessingAO ruleProcessingAO = accessObjectFactory.getRuleProcessingAO(irodsAccount);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"myTestRule {\\n\");\n\t\tsb.append(\"writeString(\\\"stdout\\\", *StringIn);\\n\");\n\t\tsb.append(\"}\\n\");\n\t\tsb.append(\"INPUT *StringIn=\\\"1\\\"\\n\");\n\t\tsb.append(\"OUTPUT ruleExecOut\");\n\t\tString ruleString = sb.toString();\n\n\t\tRuleInvocationConfiguration context = new RuleInvocationConfiguration();\n\t\tcontext.setIrodsRuleInvocationTypeEnum(IrodsRuleInvocationTypeEnum.IRODS);\n\t\tcontext.setEncodeRuleEngineInstance(true);\n\t\tIRODSRuleExecResult result = ruleProcessingAO.executeRule(ruleString, null, context);\n\t\tAssert.assertNotNull(\"null result from rule execution\", result);\n\n\t}", "public Address runAddressRules(Address addr) throws RuleException, BusinessException;", "public final TreeToNFAConverter.rewrite_return rewrite() throws RecognitionException {\n\t\tTreeToNFAConverter.rewrite_return retval = new TreeToNFAConverter.rewrite_return();\n\t\tretval.start = input.LT(1);\n\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:335:2: ( ^( REWRITES ( ^( REWRITE ( . )* ) )* ) |)\n\t\t\tint alt41=2;\n\t\t\tint LA41_0 = input.LA(1);\n\t\t\tif ( (LA41_0==REWRITES) ) {\n\t\t\t\talt41=1;\n\t\t\t}\n\t\t\telse if ( (LA41_0==ALT||LA41_0==EOB) ) {\n\t\t\t\talt41=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tif (state.backtracking>0) {state.failed=true; return retval;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 41, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt41) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:335:4: ^( REWRITES ( ^( REWRITE ( . )* ) )* )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,REWRITES,FOLLOW_REWRITES_in_rewrite672); if (state.failed) return retval;\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return retval;\n\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:336:4: ( ^( REWRITE ( . )* ) )*\n\t\t\t\t\t\tloop40:\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tint alt40=2;\n\t\t\t\t\t\t\tint LA40_0 = input.LA(1);\n\t\t\t\t\t\t\tif ( (LA40_0==REWRITE) ) {\n\t\t\t\t\t\t\t\talt40=1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (alt40) {\n\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:337:5: ^( REWRITE ( . )* )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( grammar.getOption(\"output\")==null )\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.grammarError(ErrorManager.MSG_REWRITE_OR_OP_WITH_NO_OUTPUT_OPTION,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t grammar, ((GrammarAST)retval.start).getToken(), currentRuleName);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmatch(input,REWRITE,FOLLOW_REWRITE_in_rewrite690); if (state.failed) return retval;\n\t\t\t\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return retval;\n\t\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:344:15: ( . )*\n\t\t\t\t\t\t\t\t\tloop39:\n\t\t\t\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\t\t\t\tint alt39=2;\n\t\t\t\t\t\t\t\t\t\tint LA39_0 = input.LA(1);\n\t\t\t\t\t\t\t\t\t\tif ( ((LA39_0 >= ACTION && LA39_0 <= XDIGIT)) ) {\n\t\t\t\t\t\t\t\t\t\t\talt39=1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if ( (LA39_0==UP) ) {\n\t\t\t\t\t\t\t\t\t\t\talt39=2;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tswitch (alt39) {\n\t\t\t\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:344:15: .\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tmatchAny(input); if (state.failed) return retval;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\t\t\t\tbreak loop39;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return retval;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tbreak loop40;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return retval;\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:348:2: \n\t\t\t\t\t{\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public static void createMappingRules(String serviceId) throws URISyntaxException {\n String metricId = \"\";\n Metrics metrics = getThreeScaleApiService().listMetric(serviceId);\n Metric metric = metrics.getMetric();\n logger.info(\"metricId name: \" + metric.getName());\n if (metric.getName().equalsIgnoreCase(\"Hits\")) {\n metricId = String.valueOf(metric.getId());\n }\n\n logger.info(\"metricId : \" + metricId);\n\n MappingRulesParameters mp = new MappingRulesParameters();\n mp.setPattern(\"/\");\n mp.setDelta(\"1\");\n mp.setMetric_id(metricId);\n mp.setHttp_method(\"POST\");\n\n MappingRule rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n //now create mapping rule for PUT under metric \"hit\"\n mp.setHttp_method(\"PUT\");\n rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n //now create mapping rule for PATCH under metric \"hit\"\n mp.setHttp_method(\"PATCH\");\n rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n //now create mapping rule for DELETE under metric \"hit\"\n mp.setHttp_method(\"DELETE\");\n rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n }", "void checkRule(String rule) throws IOException;", "private boolean rewrite(RewriteInfo ri) {\n\t\tif (ri.replacement != null) {\r\n\t\t\t// ... and possible root generic procs calls ...\r\n\t\t\tif (canGenericOperatorsBeRewrite(ri.expr)) {\r\n\t\t\t\t// ... and all subviews calls ...\r\n\t\t\t\tif (this.canViewsBeRewritten(this.virtChains.get(ri.expr))) {\r\n\r\n\t\t\t\t\t// first rewrite root virtual objects procedure ...\r\n\t\t\t\t\tthis.rewriteVirtualObjectsProcedure(ri.expr, ri.replacement);\r\n\t\t\t\t\t// ... then we can rewrite the whole view\r\n\t\t\t\t\tthis.rewriteView(ri, this.virtChains.get(ri.expr));\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public final ANTLRv3Parser.rule_return rule() throws RecognitionException {\r\n rule_stack.push(new rule_scope());\r\n ANTLRv3Parser.rule_return retval = new ANTLRv3Parser.rule_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token modifier=null;\r\n Token arg=null;\r\n Token rt=null;\r\n Token DOC_COMMENT39=null;\r\n Token string_literal40=null;\r\n Token string_literal41=null;\r\n Token string_literal42=null;\r\n Token string_literal43=null;\r\n Token char_literal45=null;\r\n Token string_literal46=null;\r\n Token char_literal51=null;\r\n Token char_literal53=null;\r\n ANTLRv3Parser.id_return id44 =null;\r\n\r\n ANTLRv3Parser.throwsSpec_return throwsSpec47 =null;\r\n\r\n ANTLRv3Parser.optionsSpec_return optionsSpec48 =null;\r\n\r\n ANTLRv3Parser.ruleScopeSpec_return ruleScopeSpec49 =null;\r\n\r\n ANTLRv3Parser.ruleAction_return ruleAction50 =null;\r\n\r\n ANTLRv3Parser.altList_return altList52 =null;\r\n\r\n ANTLRv3Parser.exceptionGroup_return exceptionGroup54 =null;\r\n\r\n\r\n CommonTree modifier_tree=null;\r\n CommonTree arg_tree=null;\r\n CommonTree rt_tree=null;\r\n CommonTree DOC_COMMENT39_tree=null;\r\n CommonTree string_literal40_tree=null;\r\n CommonTree string_literal41_tree=null;\r\n CommonTree string_literal42_tree=null;\r\n CommonTree string_literal43_tree=null;\r\n CommonTree char_literal45_tree=null;\r\n CommonTree string_literal46_tree=null;\r\n CommonTree char_literal51_tree=null;\r\n CommonTree char_literal53_tree=null;\r\n RewriteRuleTokenStream stream_DOC_COMMENT=new RewriteRuleTokenStream(adaptor,\"token DOC_COMMENT\");\r\n RewriteRuleTokenStream stream_RET=new RewriteRuleTokenStream(adaptor,\"token RET\");\r\n RewriteRuleTokenStream stream_BANG=new RewriteRuleTokenStream(adaptor,\"token BANG\");\r\n RewriteRuleTokenStream stream_FRAGMENT=new RewriteRuleTokenStream(adaptor,\"token FRAGMENT\");\r\n RewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\r\n RewriteRuleTokenStream stream_87=new RewriteRuleTokenStream(adaptor,\"token 87\");\r\n RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,\"token 74\");\r\n RewriteRuleTokenStream stream_88=new RewriteRuleTokenStream(adaptor,\"token 88\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleTokenStream stream_76=new RewriteRuleTokenStream(adaptor,\"token 76\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n RewriteRuleSubtreeStream stream_exceptionGroup=new RewriteRuleSubtreeStream(adaptor,\"rule exceptionGroup\");\r\n RewriteRuleSubtreeStream stream_throwsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule throwsSpec\");\r\n RewriteRuleSubtreeStream stream_ruleScopeSpec=new RewriteRuleSubtreeStream(adaptor,\"rule ruleScopeSpec\");\r\n RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule optionsSpec\");\r\n RewriteRuleSubtreeStream stream_altList=new RewriteRuleSubtreeStream(adaptor,\"rule altList\");\r\n RewriteRuleSubtreeStream stream_ruleAction=new RewriteRuleSubtreeStream(adaptor,\"rule ruleAction\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:2: ( ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )?\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: ( DOC_COMMENT )?\r\n int alt15=2;\r\n int LA15_0 = input.LA(1);\r\n\r\n if ( (LA15_0==DOC_COMMENT) ) {\r\n alt15=1;\r\n }\r\n switch (alt15) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: DOC_COMMENT\r\n {\r\n DOC_COMMENT39=(Token)match(input,DOC_COMMENT,FOLLOW_DOC_COMMENT_in_rule870); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_DOC_COMMENT.add(DOC_COMMENT39);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:3: (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )?\r\n int alt17=2;\r\n int LA17_0 = input.LA(1);\r\n\r\n if ( (LA17_0==FRAGMENT||(LA17_0 >= 86 && LA17_0 <= 88)) ) {\r\n alt17=1;\r\n }\r\n switch (alt17) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:5: modifier= ( 'protected' | 'public' | 'private' | 'fragment' )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:14: ( 'protected' | 'public' | 'private' | 'fragment' )\r\n int alt16=4;\r\n switch ( input.LA(1) ) {\r\n case 87:\r\n {\r\n alt16=1;\r\n }\r\n break;\r\n case 88:\r\n {\r\n alt16=2;\r\n }\r\n break;\r\n case 86:\r\n {\r\n alt16=3;\r\n }\r\n break;\r\n case FRAGMENT:\r\n {\r\n alt16=4;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 16, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt16) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:15: 'protected'\r\n {\r\n string_literal40=(Token)match(input,87,FOLLOW_87_in_rule880); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_87.add(string_literal40);\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:27: 'public'\r\n {\r\n string_literal41=(Token)match(input,88,FOLLOW_88_in_rule882); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_88.add(string_literal41);\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:36: 'private'\r\n {\r\n string_literal42=(Token)match(input,86,FOLLOW_86_in_rule884); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_86.add(string_literal42);\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:46: 'fragment'\r\n {\r\n string_literal43=(Token)match(input,FRAGMENT,FOLLOW_FRAGMENT_in_rule886); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_FRAGMENT.add(string_literal43);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_id_in_rule894);\r\n id44=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id44.getTree());\r\n\r\n if ( state.backtracking==0 ) {((rule_scope)rule_stack.peek()).name = (id44!=null?input.toString(id44.start,id44.stop):null);}\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:160:3: ( '!' )?\r\n int alt18=2;\r\n int LA18_0 = input.LA(1);\r\n\r\n if ( (LA18_0==BANG) ) {\r\n alt18=1;\r\n }\r\n switch (alt18) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:160:3: '!'\r\n {\r\n char_literal45=(Token)match(input,BANG,FOLLOW_BANG_in_rule900); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_BANG.add(char_literal45);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:161:3: (arg= ARG_ACTION )?\r\n int alt19=2;\r\n int LA19_0 = input.LA(1);\r\n\r\n if ( (LA19_0==ARG_ACTION) ) {\r\n alt19=1;\r\n }\r\n switch (alt19) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:161:5: arg= ARG_ACTION\r\n {\r\n arg=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule909); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(arg);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:162:3: ( 'returns' rt= ARG_ACTION )?\r\n int alt20=2;\r\n int LA20_0 = input.LA(1);\r\n\r\n if ( (LA20_0==RET) ) {\r\n alt20=1;\r\n }\r\n switch (alt20) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:162:5: 'returns' rt= ARG_ACTION\r\n {\r\n string_literal46=(Token)match(input,RET,FOLLOW_RET_in_rule918); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RET.add(string_literal46);\r\n\r\n\r\n rt=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule922); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(rt);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:3: ( throwsSpec )?\r\n int alt21=2;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( (LA21_0==89) ) {\r\n alt21=1;\r\n }\r\n switch (alt21) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:3: throwsSpec\r\n {\r\n pushFollow(FOLLOW_throwsSpec_in_rule930);\r\n throwsSpec47=throwsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_throwsSpec.add(throwsSpec47.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:15: ( optionsSpec )?\r\n int alt22=2;\r\n int LA22_0 = input.LA(1);\r\n\r\n if ( (LA22_0==OPTIONS) ) {\r\n alt22=1;\r\n }\r\n switch (alt22) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:15: optionsSpec\r\n {\r\n pushFollow(FOLLOW_optionsSpec_in_rule933);\r\n optionsSpec48=optionsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_optionsSpec.add(optionsSpec48.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:28: ( ruleScopeSpec )?\r\n int alt23=2;\r\n int LA23_0 = input.LA(1);\r\n\r\n if ( (LA23_0==SCOPE) ) {\r\n alt23=1;\r\n }\r\n switch (alt23) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:28: ruleScopeSpec\r\n {\r\n pushFollow(FOLLOW_ruleScopeSpec_in_rule936);\r\n ruleScopeSpec49=ruleScopeSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_ruleScopeSpec.add(ruleScopeSpec49.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:43: ( ruleAction )*\r\n loop24:\r\n do {\r\n int alt24=2;\r\n int LA24_0 = input.LA(1);\r\n\r\n if ( (LA24_0==AT) ) {\r\n alt24=1;\r\n }\r\n\r\n\r\n switch (alt24) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:43: ruleAction\r\n \t {\r\n \t pushFollow(FOLLOW_ruleAction_in_rule939);\r\n \t ruleAction50=ruleAction();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_ruleAction.add(ruleAction50.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop24;\r\n }\r\n } while (true);\r\n\r\n\r\n char_literal51=(Token)match(input,74,FOLLOW_74_in_rule944); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_74.add(char_literal51);\r\n\r\n\r\n pushFollow(FOLLOW_altList_in_rule946);\r\n altList52=altList();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_altList.add(altList52.getTree());\r\n\r\n char_literal53=(Token)match(input,76,FOLLOW_76_in_rule948); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_76.add(char_literal53);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:165:3: ( exceptionGroup )?\r\n int alt25=2;\r\n int LA25_0 = input.LA(1);\r\n\r\n if ( ((LA25_0 >= 81 && LA25_0 <= 82)) ) {\r\n alt25=1;\r\n }\r\n switch (alt25) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:165:3: exceptionGroup\r\n {\r\n pushFollow(FOLLOW_exceptionGroup_in_rule952);\r\n exceptionGroup54=exceptionGroup();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_exceptionGroup.add(exceptionGroup54.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: arg, RET, id, ruleScopeSpec, throwsSpec, ruleAction, altList, optionsSpec, exceptionGroup, rt\r\n // token labels: arg, rt\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_arg=new RewriteRuleTokenStream(adaptor,\"token arg\",arg);\r\n RewriteRuleTokenStream stream_rt=new RewriteRuleTokenStream(adaptor,\"token rt\",rt);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 166:6: -> ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:9: ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(RULE, \"RULE\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n adaptor.addChild(root_1, modifier!=null?adaptor.create(modifier):null);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:67: ( ^( ARG[$arg] $arg) )?\r\n if ( stream_arg.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:67: ^( ARG[$arg] $arg)\r\n {\r\n CommonTree root_2 = (CommonTree)adaptor.nil();\r\n root_2 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(ARG, arg)\r\n , root_2);\r\n\r\n adaptor.addChild(root_2, stream_arg.nextNode());\r\n\r\n adaptor.addChild(root_1, root_2);\r\n }\r\n\r\n }\r\n stream_arg.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:86: ( ^( 'returns' $rt) )?\r\n if ( stream_RET.hasNext()||stream_rt.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:86: ^( 'returns' $rt)\r\n {\r\n CommonTree root_2 = (CommonTree)adaptor.nil();\r\n root_2 = (CommonTree)adaptor.becomeRoot(\r\n stream_RET.nextNode()\r\n , root_2);\r\n\r\n adaptor.addChild(root_2, stream_rt.nextNode());\r\n\r\n adaptor.addChild(root_1, root_2);\r\n }\r\n\r\n }\r\n stream_RET.reset();\r\n stream_rt.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:9: ( throwsSpec )?\r\n if ( stream_throwsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_throwsSpec.nextTree());\r\n\r\n }\r\n stream_throwsSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:21: ( optionsSpec )?\r\n if ( stream_optionsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_optionsSpec.nextTree());\r\n\r\n }\r\n stream_optionsSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:34: ( ruleScopeSpec )?\r\n if ( stream_ruleScopeSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_ruleScopeSpec.nextTree());\r\n\r\n }\r\n stream_ruleScopeSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:49: ( ruleAction )*\r\n while ( stream_ruleAction.hasNext() ) {\r\n adaptor.addChild(root_1, stream_ruleAction.nextTree());\r\n\r\n }\r\n stream_ruleAction.reset();\r\n\r\n adaptor.addChild(root_1, stream_altList.nextTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:169:9: ( exceptionGroup )?\r\n if ( stream_exceptionGroup.hasNext() ) {\r\n adaptor.addChild(root_1, stream_exceptionGroup.nextTree());\r\n\r\n }\r\n stream_exceptionGroup.reset();\r\n\r\n adaptor.addChild(root_1, \r\n (CommonTree)adaptor.create(EOR, \"EOR\")\r\n );\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n rule_stack.pop();\r\n }\r\n return retval;\r\n }", "@Override\n\tpublic String execute() throws Exception {\n\n\t\tProfilingHelper p_helper = new ProfilingHelper();\n\t\ttry {\n\t\t\tp_helper.deleteResearches(rModel);\n\t\t\treturn SUCCESS;\n\t\t} catch (Exception e) {\n\t\t\treturn INPUT;\n\t\t}\n\t}", "public boolean rewriteable();", "@Override\n public void handle(HttpExchange httpExchange) throws IOException {\n //Create a empty list of all rules\n List<Rule> ruleList = null;\n\n try {\n //Retrieve all rules from the database\n ruleList = dbManager.getAllRules();\n } catch (SQLException e) {\n MultiLogger.severe(\"SQLException at web server: \" + e.getMessage());\n sendError(httpExchange, \"Internal database error.\");\n return;\n }\n\n //Create a JSON object that will be returned finally\n JSONObject mainJSONObject = new JSONObject();\n //Create a JSON array in which the rules will be stored and which will be attached to the json object\n JSONArray ruleJSONArray = new JSONArray();\n\n //JSON object that is used to store every single rule\n JSONObject ruleJSONObject;\n\n //Iterate over all rules in the list\n for (Rule rule : ruleList) {\n //Create new JSON object\n ruleJSONObject = new JSONObject();\n\n //Store the current rule in the JSON object\n ruleJSONObject.put(\"name\", rule.getName());\n ruleJSONObject.put(\"trigger\", rule.getTriggerClass());\n ruleJSONObject.put(\"action\", rule.getActionMethod());\n ruleJSONObject.put(\"timestamp\", rule.getTime().getTime());\n ruleJSONObject.put(\"enabled\", rule.isEnabled());\n\n //Add the rule JSON object to the array\n ruleJSONArray.add(ruleJSONObject);\n }\n\n //Add the array to the main (parent) JSON object together with a success response\n mainJSONObject.put(\"rules\", ruleJSONArray);\n mainJSONObject.put(\"error\", false);\n\n //Send the main JSON object as response\n writeResponse(httpExchange, mainJSONObject);\n }", "Object execute(StatefulRuleSession session) throws InvalidRuleSessionException, InvalidHandleException, RemoteException;", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "@Override\r\n\tpublic PlanInfo executeRules(CitizenInfo indvInfo) {\n\t\tPlanInfo planInfo = null;\r\n\t\ttry {\r\n\t\t\tInputStream is = getClass().getResourceAsStream(\"/com/ed/rules/SNAP.drl\");\r\n\t\t\tReader reader = new InputStreamReader(is);\r\n\r\n\t\t\tPackageBuilder packageBuilder = new PackageBuilder();\r\n\t\t\tpackageBuilder.addPackageFromDrl(reader);\r\n\r\n\t\t\torg.drools.core.rule.Package rulesPackage = packageBuilder.getPackage();\r\n\r\n\t\t\tRuleBase ruleBase = RuleBaseFactory.newRuleBase();\r\n\t\t\truleBase.addPackage(rulesPackage);\r\n\r\n\t\t\t// Firing Rules\r\n\t\t\tWorkingMemory workingMemory = ruleBase.newStatefulSession();\r\n\t\t\tworkingMemory.insert(indvInfo);\r\n\t\t\tworkingMemory.fireAllRules();\r\n\t\t\tplanInfo = indvInfo.getPlanInfo();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn planInfo;\r\n\t}", "private int getRuleIndex(String rule){\n\t\tfor(int i=0; i<ConditionTree.length;i++){\n\t\t\tif(rule.equals(ConditionTree[i][0])){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public ReplaceAllRewritingRule(String queryPattern, String rewrite,\n boolean caseSensitive, boolean stopOnMatch)\n {\n super(queryPattern, rewrite, caseSensitive, stopOnMatch);\n }", "@Test\n public void updateUnknownRule() throws Exception {\n RuleEntity rule = new RuleEntity();\n rule.setPackageName(\"junitPackage\");\n rule.setStatus(Status.INACTIVE);\n rule.setRuleName(\"junitRuleName\");\n rule.setRule(Base64.getEncoder().encodeToString(\"jUnit Rule Contents\".getBytes()));\n /*\n * update it\n */\n rule.setRule(Base64.getEncoder().encodeToString(\"jUnit UPDATED Rule Contents\".getBytes()));\n HttpEntity<RuleEntity> entity = new HttpEntity<RuleEntity>(rule);\n ResponseEntity<TranslatedExceptionMessage> updateResponse = template.exchange(\n base.toString() + \"/1234\",\n HttpMethod.PUT,\n entity,\n TranslatedExceptionMessage.class, rule);\n\n Assert.assertEquals(\"checking for 404\", NOT_FOUND, updateResponse.getStatusCode());\n Assert.assertEquals(\"checking for not found message\",\n \"rule 1234 not found in database on update\",\n updateResponse.getBody().getMessage());\n }", "public abstract void recompileRun(int opcode);", "private void applyRules(GraphModification modifications) throws DataNormalizationException {\n\t\ttry {\n\t\t\tgetDirtyConnection();\n\n\t\t\tIterator<DataNormalizationRule> i = rules.iterator();\n\n\t\t\t/**\n\t\t\t * Ensure that the graph is either transformed completely or not at all\n\t\t\t */\n\t\t\t//getDirtyConnection().adjustTransactionLevel(EnumLogLevel.TRANSACTION_LEVEL);\n\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tDataNormalizationRule rule = i.next();\n\n\t\t\t\ttry {\n\t\t\t\t\tperformRule(rule, modifications);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(String.format(Locale.ROOT, \"Debugging of rule %d failed: %s\", rule.getId(), e.getMessage()));\n\t\t\t\t\tthrow new DataNormalizationException(e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//getDirtyConnection().commit();\n\t\t} catch (DatabaseException e) {\n\t\t\tthrow new DataNormalizationException(e);\n\t\t//} catch (SQLException e) {\n\t\t//\tthrow new DataNormalizationException(e);\n\t\t}\n\t}", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "@Override\n\tpublic int doExecution(final HshContext context) throws Exception {\n\t\tif(getChildCount()>1)\n\t\t\tthrow new RuntimeException(\"pipes not implementd\");\n\n\t\tint result=0;\n\t\tfor(final L1Node child : this)\n\t\t\tresult=NodeTraversal.executeSubtree(child, context);\n\t\t// if banged swap result true/false\n\t\tif(isBanged())\n\t\t\treturn result==0?1:0;\n\t\treturn result;\n\t}", "public Integer perform (IExpression left, IExpression right);", "@Override\n\tpublic void reportRuleInvocation(Rule rule, Triple triple, DataObject dataObject) {\n\t\t\n\t}", "public ModelResponse execute() throws ModelException\n\t{\n\t\tassert myModel != null;\n\n\t\tif (! configured)\n\t\t{\n\t\t\tthrow new ModelException(\"Model request not configured\");\n\t\t}\n\n\t\tModel newModel = null;\n\n\t\ttry\n\t\t{\n\t\t\tnewModel = (Model) getService(Model.ROLE, myModel, getContext());\n\n\t\t\tCommand redirect = validate(newModel);\n\t\t\tModelResponse res = null;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (redirect == null)\n\t\t\t\t{\n\t\t\t\t\tres = newModel.execute(this);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres = redirect.execute(this, createResponse());\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ee)\n\t\t\t{\n\t\t\t\t/* Any error during the actual execute is stored */\n\t\t\t\tif (res == null)\n\t\t\t\t{\n\t\t\t\t\tres = createResponse();\n\t\t\t\t}\n\n\t\t\t\tres.addError(\"Exception during model execution\", ee);\n\t\t\t}\n\n\t\t\tif (res == null)\n\t\t\t{\n\t\t\t\tres = createResponse();\n\t\t\t}\n\n\t\t\treturn afterExecute(res, newModel.getConfiguration());\n\t\t}\n\t\tcatch (Exception ce)\n\t\t{\n\t\t\tthrow new ModelException(\"Could not run model '\" + myModel + \"' for role '\" + Model.ROLE + \"'\", ce);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tsvcDelegate.releaseServices();\n\t\t}\n\t}", "@SustainScreen(name = \"Rule Index\", description = \"Index of all business rules in the system\", module = SustainModule.RULE)\n public ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {\n return onSearch(mapping, form, request, response);\n }", "private void applyOrSaveRules() {\n final boolean enabled = Api.isEnabled(this);\n final Context ctx = getApplicationContext();\n\n Api.generateRules(ctx, Api.getApps(ctx, null), true);\n\n if (!enabled) {\n Api.setEnabled(ctx, false, true);\n setDirty(false);\n return;\n }\n Api.updateNotification(Api.isEnabled(getApplicationContext()), getApplicationContext());\n new RunApply().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "@Override\r\n public boolean invokeRuleMethod(BusinessRule rule) {\r\n boolean result = super.invokeRuleMethod(rule);\r\n cleanErrorMessages();\r\n return result;\r\n }", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "protected boolean processCommand(HttpServletRequest request, HttpServletResponse response) \r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\tString uri = getRequestURI(request);\r\n\t\t\r\n\t\tif (uri.endsWith(\"/redirect-filter\")) {\r\n\t\t\tString cmd = request.getParameter(\"c\");\r\n\t\t\tif (cmd != null && cmd.equals(\"reload\") && reloadConfig == true) {\r\n\t\t\t\tloadConfiguration();\r\n\t\t\t\tresponse.setContentType(\"text/plain\");\r\n\t\t\t\tresponse.getWriter().println(filterName + \": Loaded \" + \r\n\t\t\t\t\t\tredirectRules.size() + \" rule(s).\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public abstract int apply(int lhs, int rhs);", "public int getReferentialActionUpdateRule();", "String execute(HttpServletRequest req, HttpServletResponse res);", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "public MethodBuilder rule(String rule) {\n\t\tthis.rule = rule;\n\t\treturn this;\n\t}", "RewrittenStatement rewrite(String sql, Binding params);", "public MatchResult exec(String input) {\n this.input = input;\n return exec();\n }", "@Override\r\n\tpublic boolean process() {\r\n\t\t// TODO: check all permissions here\r\n\t\tif (_actionKey.equalsIgnoreCase(READ)) {\r\n\t\t\treturn read();\r\n\t\t} else if (_actionKey.equalsIgnoreCase(CREATE)) {\r\n\t\t\treturn create();\r\n\t\t} else if (_actionKey.equalsIgnoreCase(DELETE)) {\r\n\t\t\treturn delete();\r\n\t\t} else if (_actionKey.equalsIgnoreCase(UPDATE)) {\r\n\t\t\treturn update();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "int updateByPrimaryKey(DrpCommissionRule record);", "public static boolean logRuleExecution(String ruleName){\n MDC.put(\"EVENTTYPE\",\"RULEEXECUTION\");\n logger.info(ruleName);\n return true;\n }", "public T execute() {\n return GraalCompiler.compile(this);\n }", "@Override\n\tpublic void reportLookupRuleInvocation(Rule rule, String label,\n\t\t\tString code, VocabularyMatchResult result)\n\t\t\tthrows Exception {\n\t\t\n\t}", "private void postProcess(StringBuffer result, NFRuleSet ruleSet)\n/* */ {\n/* 1766 */ if (this.postProcessRules != null) {\n/* 1767 */ if (this.postProcessor == null) {\n/* 1768 */ int ix = this.postProcessRules.indexOf(\";\");\n/* 1769 */ if (ix == -1) {\n/* 1770 */ ix = this.postProcessRules.length();\n/* */ }\n/* 1772 */ String ppClassName = this.postProcessRules.substring(0, ix).trim();\n/* */ try {\n/* 1774 */ Class<?> cls = Class.forName(ppClassName);\n/* 1775 */ this.postProcessor = ((RBNFPostProcessor)cls.newInstance());\n/* 1776 */ this.postProcessor.init(this, this.postProcessRules);\n/* */ }\n/* */ catch (Exception e)\n/* */ {\n/* 1780 */ if (DEBUG) { System.out.println(\"could not locate \" + ppClassName + \", error \" + e.getClass().getName() + \", \" + e.getMessage());\n/* */ }\n/* 1782 */ this.postProcessor = null;\n/* 1783 */ this.postProcessRules = null;\n/* 1784 */ return;\n/* */ }\n/* */ }\n/* */ \n/* 1788 */ this.postProcessor.process(result, ruleSet);\n/* */ }\n/* */ }", "private boolean updateRuleCache(Context context,Map ruleInfoMap) throws Exception\r\n {\r\n \t String strNewExpression = null;\r\n \t boolean bsucceed = true;\r\n\r\n \t String strRuleId = (String)ruleInfoMap.get(SELECT_ID);\r\n \t DomainObject domRuleObj = DomainObject.newInstance(context,strRuleId);\r\n \t String strRuleType = (String) ruleInfoMap.get(DomainConstants.SELECT_TYPE);\r\n \t String strDVAttrVal = (String) ruleInfoMap.get(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n \t String strRuleComplexity = (String) ruleInfoMap.get(ConfigurationConstants.SELECT_RULE_COMPLEXITY);\r\n\r\n try{\r\n \t /* Depending upon the Rule Type Left and Right expression\r\n \t * attributes will be computed\r\n \t */\r\n \t StringList sLOfExpAttr = new StringList();\r\n\r\n \t if(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_BOOLEAN_COMPATIBILITY_RULE)\r\n \t\t\t || strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_MARKETING_PREFERENCE)\r\n \t\t\t || strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_PRODUCT_COMPATIBILITY_RULE)\r\n \t\t\t || strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_INCLUSION_RULE)){\r\n\r\n \t\t sLOfExpAttr.add(ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION);\r\n \t\t sLOfExpAttr.add(ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION);\r\n\r\n \t }else if(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_QUANTITY_RULE)){\r\n\r\n \t\t sLOfExpAttr.add(ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION);\r\n \t }\r\n\r\n \t mqlLogRequiredInformationWriter(\"Rule Info :: \"+ ruleInfoMap + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Type of Rule :: \"+ strRuleType + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Rule Complexity :: \"+ strRuleComplexity + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Design Variant Attribute Value :: \"+ strDVAttrVal + \"\\n\");\r\n\r\n \t StringList RelationshipSelect = new StringList(ConfigurationConstants.SELECT_ID);\r\n \t RelationshipSelect.addElement(\"torel.id\");\r\n \t RelationshipSelect.addElement(\"to.id\");\r\n \t RelationshipSelect.addElement(\"torel.physicalid\");\r\n \t RelationshipSelect.addElement(\"to.physicalid\");\r\n \t RelationshipSelect.addElement(SELECT_PHYSICALID);\r\n\r\n \t RelationshipSelect.addElement(ConfigurationConstants.SELECT_ATTRIBUTE_SEQUENCE_ORDER);\r\n \t RelationshipSelect.addElement(SELECT_ATTRIBUTE_TOKEN);\r\n\r\n\r\n \t StringList sLRelationshipWhere = new StringList();\r\n \t sLRelationshipWhere.addElement(\"from.id\" + \"==\" + strRuleId);\r\n\r\n\r\n \t //Compute the LE and RE attributes and set attribute values accordingly\r\n \t for(int iCntExpAttr=0;iCntExpAttr<sLOfExpAttr.size() ;iCntExpAttr++){\r\n\r\n\t \t//StringList of RE Rel( delete token AND,OR,NOT specific related rel ids ) to be deleted\r\n\t\t\tStringList sLRERelIdsToBeDeleted = new StringList();\r\n\r\n \t\tString strExpAttr = (String)sLOfExpAttr.get(iCntExpAttr);\r\n\r\n \t\t//Get the LE or RE Rel ids\r\n \t\tStringList sLOfExp = new StringList();\r\n \t String ExpSelect = \"from[\"+ strExpAttr+ \"].id\";\r\n\r\n \t if((StringList)ruleInfoMap.get(ExpSelect)!=null){\r\n \t \tsLOfExp = (StringList)ruleInfoMap.get(ExpSelect);\r\n \t }\r\n\r\n \t mqlLogRequiredInformationWriter(\"Expression is :: \"+ ExpSelect + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Expression Value :: \"+ sLOfExp + \"\\n\");\r\n\r\n\t\t\tMapList mLOfExpToSideRelInfo = new MapList();\r\n\r\n\t\t\tfor(int iCnt=0;iCnt<sLOfExp.size();iCnt++) {\r\n\t\t\t\tString strRelId = (String)sLOfExp.get(iCnt);\r\n\r\n\t\t\t\t//Get the Rel Id info\r\n\t\t\t\tDomainRelationship domRelId = new DomainRelationship(strRelId);\r\n\t\t\t\tMap mRelData = domRelId.getRelationshipData(context,RelationshipSelect);\r\n\t\t\t\t/*\"Sequence Order\" is stored in StringList format...\r\n\t\t\t\t converted to String as this is used further in \"addSortKey\" method*/\r\n\t\t\t\tif(!((StringList)mRelData.get(SELECT_ATTRIBUTE_SEQUENCE_ORDER)).isEmpty()){\r\n\t\t\t\t\tmRelData.put(\"attribute[\"+ATTRIBUTE_SEQUENCE_ORDER +\"]\",\r\n\t\t\t\t\t\t\t ((StringList)mRelData.get(SELECT_ATTRIBUTE_SEQUENCE_ORDER)).get(0));\r\n \t\t\t }\r\n\r\n\t\t\t\tmLOfExpToSideRelInfo.add(mRelData);\r\n\t\t\t}\r\n\r\n \t\t //Need to sort the Map on the basis of \"Sequence Number\" attribute value in ascending order\r\n \t\t\t StringBuffer strBuffer = new StringBuffer(200);\r\n\t\t\t\tstrBuffer = strBuffer.append(STR_ATTRIBUTE)\r\n\t\t\t\t\t\t\t.append(OPEN_BRACE)\r\n\t\t\t\t\t\t\t.append(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER)\r\n\t\t\t\t\t\t\t.append(CLOSE_BRACE);\r\n\r\n\t\t\t\tmLOfExpToSideRelInfo.addSortKey(strBuffer.toString(), \"ascending\", \"integer\");\r\n\t\t\t\tmLOfExpToSideRelInfo.sort();\r\n\r\n \t\t StringBuffer strExpBuffer = new StringBuffer();\r\n\r\n \t\t mqlLogRequiredInformationWriter(\"Exp To Side Rel Info :: \"+ mLOfExpToSideRelInfo + \"\\n\");\r\n \t\t for(int m=0;m<mLOfExpToSideRelInfo.size();m++){\r\n\r\n \t\t\t Map mpInfo = new HashMap();\r\n \t\t\t mpInfo = (Map) mLOfExpToSideRelInfo.get(m);\r\n\r\n \t\t\t String strToken =\"\";\r\n \t\t\t String strPhysicalId =\"\";\r\n \t\t\t String strToRelPhyId =\"\";\r\n \t\t\t String strToPhyId =\"\";\r\n \t\t\t String strRERelId =\"\";\r\n\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(SELECT_ATTRIBUTE_TOKEN)).isEmpty()){\r\n \t\t\t\t strToken = (String)((StringList)mpInfo.get(SELECT_ATTRIBUTE_TOKEN)).get(0);\r\n \t\t\t\t strRERelId = (String)((StringList)mpInfo.get(\"id\")).get(0);\r\n \t\t\t\t mqlLogRequiredInformationWriter(\"Existing RE Rel to be deleted for this Rule:: \"+ strRERelId + \"\\n\");\r\n \t\t\t\t sLRERelIdsToBeDeleted.add(strRERelId);\r\n \t\t\t }\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(\"physicalid\")).isEmpty()){\r\n \t\t\t\t strPhysicalId = (String)((StringList)mpInfo.get(\"physicalid\")).get(0);\r\n \t\t\t }\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(\"torel.physicalid\")).isEmpty()){\r\n \t\t\t\tstrToRelPhyId = (String)((StringList)mpInfo.get(\"torel.physicalid\")).get(0);\r\n \t\t\t }\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(\"to.physicalid\")).isEmpty()){\r\n \t\t\t\t strToPhyId = (String)((StringList)mpInfo.get(\"to.physicalid\")).get(0);\r\n \t\t\t }\r\n\r\n \t\t\t mqlLogRequiredInformationWriter(\"Token value if any :: \"+ strToken + \"\\n\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Physical Id of LE/RE :: \"+ strPhysicalId + \"\\n\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Rel Physical Id of 'To side' of LE/RE Rel :: \"+ strToRelPhyId + \"\\n\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Obj Physical Id of 'To side' of LE/RE Rel :: \"+ strToPhyId + \"\\n\\n\");\r\n\r\n \t\t\t //Append the AND,OR,(,),NOT\r\n \t\t\t if(strToken!=null && strToken.length()!=0){\r\n \t\t\t\t strExpBuffer = strExpBuffer.append(strToken).append(SYMB_SPACE);\r\n \t\t\t }else{\r\n \t\t\t\t //Add to the String for attribute\r\n \t\t\t\t if(strToRelPhyId!=null && strToRelPhyId.length()!=0) {\r\n \t\t\t\t\t strExpBuffer = strExpBuffer.append(\"R\")\r\n \t\t\t\t\t .append(strToRelPhyId)\r\n \t\t\t\t\t .append(SYMB_SPACE);\r\n \t\t\t\t }else if(strToPhyId!=null && strToPhyId.length()!=0) {\r\n \t\t\t\t\t strExpBuffer = strExpBuffer.append(\"B\")\r\n \t\t\t\t\t .append(strToPhyId)\r\n \t\t\t\t\t .append(SYMB_SPACE);\r\n \t\t\t\t }\r\n \t\t\t }\r\n \t\t }\r\n\r\n \t\t strNewExpression = strExpBuffer.toString();\r\n \t\t StringBuffer strBuf= new StringBuffer();\r\n\r\n \t\t if(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_MARKETING_PREFERENCE)\r\n \t\t\t\t && strExpAttr.equalsIgnoreCase(ConfigurationConstants.ATTRIBUTE_RIGHT_EXPRESSION)){\r\n \t\t\t StringList slRtExpTokenised = FrameworkUtil.split(strNewExpression, SYMB_SPACE);\r\n \t\t\t for(int i=0;i<slRtExpTokenised.size();i++){\r\n \t\t\t\t String strElement = (String) slRtExpTokenised.get(i);\r\n \t\t\t\t if(!strElement.trim().isEmpty())\r\n \t\t\t\t strBuf.append(strElement).append(SYMB_SPACE).append(\"AND\").append(SYMB_SPACE);\r\n \t\t\t }\r\n \t\t\t String strMPRRExpressionFinal = strBuf.toString();\r\n\r\n \t\t\t if (strMPRRExpressionFinal.endsWith(\" AND \")) {\r\n \t\t\t\t int i = strMPRRExpressionFinal.lastIndexOf(\" AND \");\r\n \t\t\t\t strNewExpression = strMPRRExpressionFinal.substring(0, i);\r\n \t\t\t }\r\n \t\t }\r\n \t\t mqlLogRequiredInformationWriter(\"Set attribute values on Rule Id start :: \"+\"\\n\");\r\n \t\t mqlLogRequiredInformationWriter(\"Rule Attribute :: \"+ strExpAttr + \"\\n\");\r\n \t\t mqlLogRequiredInformationWriter(\"Value of Attribute :: \"+ strNewExpression + \"\\n\\n\");\r\n \t\t domRuleObj.setAttributeValue(context, strExpAttr, strNewExpression);\r\n \t\t mqlLogRequiredInformationWriter(\"Set Attribute values on Rule Id done :: \"+\"\\n\");\r\n\r\n \t\t //If Rule Type = Inclusion Rule then only update the below Attribute\r\n \t\t\tif(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_INCLUSION_RULE)\r\n \t\t\t\t && strDVAttrVal!=null\r\n \t\t\t\t && !strDVAttrVal.equals(\"\")\r\n \t\t\t\t && !strDVAttrVal.isEmpty()){\r\n\r\n \t\t\t\tif(strRuleComplexity!=null && strRuleComplexity.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_SIMPLE)){\r\n \t\t\t\t\t mqlLogRequiredInformationWriter(\"Rule Complexity :: \"+ strRuleComplexity + \"\\n\");\r\n \t\t\t\t\t String strDVVal = \"\";\r\n \t \t\t StringBuffer sBDVPhyIds = new StringBuffer();\r\n \t \t\t StringTokenizer newValueTZ = new StringTokenizer(strDVAttrVal, \",\");\r\n \t \t\t\t while(newValueTZ.hasMoreElements()) {\r\n \t \t\t\t\tstrDVVal = newValueTZ.nextToken();\r\n\r\n \t \t\t\t\tDomainObject domDVId = new DomainObject(strDVVal);\r\n \t \t\t\t\tString strDVPhyId =\"\";\r\n \t \t\t\t\tif(domDVId.exists(context)){\r\n \t \t\t\t\t\tstrDVPhyId= domDVId.getInfo(context, SELECT_PHYSICALID);\r\n \t \t\t\t\t\tsBDVPhyIds.append(strDVPhyId);\r\n \t \t\t\t\t\tsBDVPhyIds.append(\",\");\r\n \t \t\t\t\t}else{\r\n \t \t\t\t\t\tmqlLogRequiredInformationWriter(\"\\n\\n\\n\"\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+\"This Design Variant doesn't exist now\"\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+ strDVVal\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+\"\\n\"\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+\"\\n\");\r\n \t \t\t\t\t}\r\n \t \t\t\t}\r\n \t \t\t\t if(sBDVPhyIds!=null && sBDVPhyIds.length()!=0){\r\n \t \t\t\t\t String strDVPhyId = sBDVPhyIds.toString().substring(0,sBDVPhyIds.length()-1);\r\n \t \t\t\t\t mqlLogRequiredInformationWriter(\"Attrubute 'Design Variant' value to be set as :: \"+ strDVPhyId + \"\\n\");\r\n \t \t\t\t\t domRuleObj.setAttributeValue(context, ConfigurationConstants.ATTRIBUTE_DESIGNVARIANTS, strDVPhyId );\r\n \t \t\t\t }\r\n \t\t\t\t}\r\n \t\t }\r\n\r\n \t\t\t//To delete the RE rel\r\n \t\t\tif(!sLRERelIdsToBeDeleted.isEmpty()){\r\n \t\t\t\tmqlLogRequiredInformationWriter(\"List of Rel Ids to be deleted :: \"+ sLRERelIdsToBeDeleted + \"\\n\");\r\n \t \t\t\tdisconnectRel(context, sLRERelIdsToBeDeleted);\r\n \t \t\t mqlLogRequiredInformationWriter(\"Rel id's deletion done.\" + \"\\n\");\r\n \t\t\t}\r\n\r\n \t }\r\n }catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n \t bsucceed = false;\r\n \t throw new FrameworkException(\"reCompute Expression Attributes failed \" + e.getMessage());\r\n }\r\n\r\n \t return bsucceed;\r\n }", "WebActionResponse processWebAction(String actionName, RequestContext rc) {\n WebActionHandlerRef webActionRef = webObjectRegistry.getWebActionHandlerRef(actionName);\n\n if (webActionRef == null) {\n throw new SnowException(Error.NO_WEB_ACTION, \"WebAction\", actionName);\n }\n\n // --------- Invoke Method --------- //\n Object result = null;\n try {\n result = methodInvoker.invokeWebHandler(webActionRef, rc);\n } catch (Throwable t) {\n throw Throwables.propagate(t);\n }\n // --------- /Invoke Method --------- //\n\n WebActionResponse response = new WebActionResponse(result);\n return response;\n }", "protected boolean applyImpl() throws Exception\n {\n MBeanServer mbeanServer = (MBeanServer) getCorrectiveActionContext()\n .getContextObject(CorrectiveActionContextConstants.Agent_MBeanServer);\n ObjectName objectName = (ObjectName) getCorrectiveActionContext()\n .getContextObject(CorrectiveActionContextConstants.MBean_ObjectName);\n\n Object result = mbeanServer.invoke(objectName, m_methodName, m_parameters, m_signature);\n\n return matchesDesiredResult(result);\n }", "@RequestMapping(value=\"/rebuilditemindex.htm\")\n\t@ResponseBody\n\tpublic String reBuildIndex(){\n\t\ttry{\n\t\t\tthis.itemService.reBuildIndex();\n\t\t\treturn \"success\";\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn \"exception\";\n\t\t}\n\t}", "@Override()\n public ResultCode doToolProcessing()\n {\n // Create the proxy request handler that will be used to forward requests to\n // a remote directory.\n final ProxyRequestHandler proxyHandler;\n try\n {\n proxyHandler = new ProxyRequestHandler(createServerSet());\n }\n catch (final LDAPException le)\n {\n err(\"Unable to prepare to connect to the target server: \",\n le.getMessage());\n return le.getResultCode();\n }\n\n\n // Create the log handler to use for the output.\n final Handler logHandler;\n if (outputFile.isPresent())\n {\n try\n {\n logHandler = new FileHandler(outputFile.getValue().getAbsolutePath());\n }\n catch (final IOException ioe)\n {\n err(\"Unable to open the output file for writing: \",\n StaticUtils.getExceptionMessage(ioe));\n return ResultCode.LOCAL_ERROR;\n }\n }\n else\n {\n logHandler = new ConsoleHandler();\n }\n logHandler.setLevel(Level.INFO);\n logHandler.setFormatter(new MinimalLogFormatter(\n MinimalLogFormatter.DEFAULT_TIMESTAMP_FORMAT, false, false, true));\n\n\n // Create the debugger request handler that will be used to write the\n // debug output.\n LDAPListenerRequestHandler requestHandler =\n new LDAPDebuggerRequestHandler(logHandler, proxyHandler);\n\n\n // If a code log file was specified, then create the appropriate request\n // handler to accomplish that.\n if (codeLogFile.isPresent())\n {\n try\n {\n requestHandler = new ToCodeRequestHandler(codeLogFile.getValue(), true,\n requestHandler);\n }\n catch (final Exception e)\n {\n err(\"Unable to open code log file '\",\n codeLogFile.getValue().getAbsolutePath(), \"' for writing: \",\n StaticUtils.getExceptionMessage(e));\n return ResultCode.LOCAL_ERROR;\n }\n }\n\n\n // Create and start the LDAP listener.\n final LDAPListenerConfig config =\n new LDAPListenerConfig(listenPort.getValue(), requestHandler);\n if (listenAddress.isPresent())\n {\n try\n {\n config.setListenAddress(\n InetAddress.getByName(listenAddress.getValue()));\n }\n catch (final Exception e)\n {\n err(\"Unable to resolve '\", listenAddress.getValue(),\n \"' as a valid address: \", StaticUtils.getExceptionMessage(e));\n return ResultCode.PARAM_ERROR;\n }\n }\n\n if (listenUsingSSL.isPresent())\n {\n try\n {\n config.setServerSocketFactory(\n createSSLUtil(true).createSSLServerSocketFactory());\n }\n catch (final Exception e)\n {\n err(\"Unable to create a server socket factory to accept SSL-based \" +\n \"client connections: \", StaticUtils.getExceptionMessage(e));\n return ResultCode.LOCAL_ERROR;\n }\n }\n\n listener = new LDAPListener(config);\n\n try\n {\n listener.startListening();\n }\n catch (final Exception e)\n {\n err(\"Unable to start listening for client connections: \",\n StaticUtils.getExceptionMessage(e));\n return ResultCode.LOCAL_ERROR;\n }\n\n\n // Display a message with information about the port on which it is\n // listening for connections.\n int port = listener.getListenPort();\n while (port <= 0)\n {\n try\n {\n Thread.sleep(1L);\n }\n catch (final Exception e)\n {\n Debug.debugException(e);\n\n if (e instanceof InterruptedException)\n {\n Thread.currentThread().interrupt();\n }\n }\n\n port = listener.getListenPort();\n }\n\n if (listenUsingSSL.isPresent())\n {\n out(\"Listening for SSL-based LDAP client connections on port \", port);\n }\n else\n {\n out(\"Listening for LDAP client connections on port \", port);\n }\n\n // Note that at this point, the listener will continue running in a\n // separate thread, so we can return from this thread without exiting the\n // program. However, we'll want to register a shutdown hook so that we can\n // close the logger.\n //shutdownListener = new LDAPDebuggerShutdownListener(listener, logHandler);\n // Runtime.getRuntime().addShutdownHook(shutdownListener);\n\n return ResultCode.SUCCESS;\n }", "void execute(String link) throws CrawlerWorkerException;", "public abstract boolean execute(ActionContext actionContext)\n throws Exception;", "@Override\n public boolean execute() {\n String url = \"\";\n String name, content;\n try {\n this.checkNumArgs();\n url = arguments.get(0);\n this.checkRedirectionParam();\n content = fetcher.getURLContent(url);\n name = getFileName(url);\n if (fs.getCurrWorkDir().findChild(name)!=null) {\n StandardError.displayError(\"cannot create \" + name+\" because \"\n + \" there already \"\n + \"exist file with this name\");\n return false;\n }\n // create file with the string from the input method and \n // file name then attach it to cwd\n File<String> file = new File<String>(name, content, \n this.fs.getCurrWorkDir());\n // check if the file is actually added\n if (fs.getCurrWorkDir().findChild(name)==null) {\n StandardError.displayError(\"cannot create \" + name+\" because \"\n + \"of the illegal\"\n + \"characters\");\n return false;\n }\n \n } catch (MalformedURLException e) {\n StandardError.displayError(url + \" is not a valid url\");\n return false;\n } catch (IOException e) {\n StandardError.displayError(\"an error occured when reading this url\");\n return false;\n } catch (InvalidArgumentSizeException e) {\n StandardError.displayError(\"get needs only the url as argument\");\n return false;\n } catch (CanNotRedirectException e) {\n StandardError.displayError(\"redirection params are wrong:\" \n + e.getMessage());\n return false;\n }\n return true;\n }", "public boolean execute(int i) {\n result.add(nodeMap.get(i));\n return true; // return true here to continue receiving results\n }", "@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response) {\n String handler = MapReduceServlet.getHandler(request);\n if (handler.startsWith(CONTROLLER_PATH)) {\n if (!checkForTaskQueue(request, response)) {\n return;\n }\n handleController(request, response);\n } else if (handler.startsWith(MAPPER_WORKER_PATH)) {\n if (!checkForTaskQueue(request, response)) {\n return;\n }\n handleMapperWorker(request, response);\n } else if (handler.startsWith(START_PATH)) {\n // We don't add a GET handler for this one, since we're expecting the user \n // to POST the whole XML specification.\n // TODO(frew): Make name customizable.\n // TODO(frew): Add ability to specify a redirect.\n handleStart(\n ConfigurationXmlUtil.getConfigurationFromXml(request.getParameter(\"configuration\")),\n \"Automatically run request\", request);\n } else if (handler.startsWith(COMMAND_PATH)) {\n if (!checkForAjax(request, response)) {\n return;\n }\n handleCommand(handler.substring(COMMAND_PATH.length() + 1), request, response);\n } else {\n throw new RuntimeException(\n \"Received an unknown MapReduce request handler. See logs for more detail.\");\n }\n }", "public void rewriteMRCKR(){\n\t\t\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\t//Rewriting for global context.\n\t\tMRGlobal2DatalogRewriter globalrewriter = new MRGlobal2DatalogRewriter();\n\t\tdatalogGlobal = globalrewriter.rewrite(inputCKR.getGlobalOntology());\n\t\t//System.out.println(\"Rewriting program for global context complete.\");\n\t\t\t\t\n\t\t//Get set of contexts and associations to modules from globalrewriter\n\t\tcontextsSet = globalrewriter.getContextsSet();\n\t\thasModuleAssociations = globalrewriter.getHasModuleAssociations();\n\t\t//System.out.println(\"Set of contexts and modules associations computed.\");\n\t\t\n\t\t//Computation of local contexts knowledge bases.\n\t\tcomputeLocalKB();\n\t\t\t\t\n\t\t//Rewriting for local contexts knowledge bases.\n\t\tMRLocal2DatalogRewriter localrewriter = new MRLocal2DatalogRewriter();\n\t\t\t\t\n\t\tdatalogLocal = new LinkedList<DLProgram>();\n\t\tfor (String c : contextsSet) {\n\t\t\t//System.out.println(\"Rewriting program for \" + c.replaceAll(\"\\\"\", \"\"));\n\t\t\tlocalrewriter.setContextID(c.replaceAll(\"\\\"\", \"\"));\n\t\t\t\n\t\t\tdatalogLocal.add(localrewriter.rewrite(contextsOntologies.get(c)));\n\t\t}\n\t\t\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\trewritingTime = endTime - startTime;\n \n\t\t//System.out.println(\"Rewriting completed in \" + rewritingTime + \" ms.\");\n\t\t//System.out.println(datalogGlobal.getStatements().size());\n\t\t\n\t\t//Compute CKR Program.\n\t\tdatalogCKR = new DLProgram();\n\t \n\t\tdatalogCKR.addAll(datalogGlobal.getStatements());\n\t\t\n\t\tfor (DLProgram dlProgram : datalogLocal) {\n\t\t\tdatalogCKR.addAll(dlProgram.getStatements());\t\n\t\t}\n\t\t\n\t\t//Add local inference rules.\n\t\tdatalogCKR.addAll(MRDeductionRuleset.getPrl());\n\t\tdatalogCKR.addAll(MRDeductionRuleset.getPeval());\n\t\t\n\t\t//Add local propagation rules.\n\t\tdatalogCKR.addAll(MRDeductionRuleset.getPd());\t\t\n\t}", "public BPState execute(X86CondJmpInstruction ins, BPPath path, List<BPPath> pathList, X86TransitionRule rule) {\n\t\treturn null;\n\t}", "void rules(ContainerRequestContext requestContext, List<PathSegment> pathSegments, MultivaluedMap<String, String> parameters) throws SQLException;", "@Test\n public void tenRedirect() throws Exception {\n UrlPattern up1 = urlPathEqualTo(\"/\" + REDIRECT);\n redirectWireMock.stubFor(get(up1)\n .withQueryParam(\"r\", matching(\"[0-9]+\"))\n .willReturn(aResponse()\n .withStatus(HttpServletResponse.SC_FOUND)\n .withTransformer(\"redirect\", \"redirects\", 10)));\n\n UrlPattern up2 = urlEqualTo(\"/\" + TEST_FILE_NAME);\n redirectWireMock.stubFor(get(up2)\n .willReturn(aResponse()\n .withBody(CONTENTS)));\n\n Download t = makeProjectAndTask();\n t.src(redirectWireMock.url(REDIRECT) + \"?r=10\");\n File dst = newTempFile();\n t.dest(dst);\n execute(t);\n\n assertThat(dst).usingCharset(StandardCharsets.UTF_8).hasContent(CONTENTS);\n\n redirectWireMock.verify(10, getRequestedFor(up1));\n redirectWireMock.verify(1, getRequestedFor(up2));\n }", "public int getRuleId() {\n\t\treturn ruleId;\n\t}", "void setRule(Rule rule);", "public boolean mayHaveRewrite() { return false; }", "@Override\n public String execute() throws Exception {\n return SUCCESS;\n }", "public StatRes execut() {\n\t\tif (res.getFileName().endsWith(\".xml\") || res.getFileName().endsWith(\".mxml\")) {\n\t\t\tparseLog2();\n\t\t\tres.calcStat();\n\t\t}\n\t\treturn res;\n\t}", "public int eval() {\n\t\t\treturn eval(expression.root);\n\t\t}", "@Override\r\n\tpublic boolean manipulate() {\n\t\tStatement statement = mp.getStatement();\r\n\t\tStatement ingredStatementCopy = (Statement) ASTNode.copySubtree(statement.getAST(), ingredStatement);\r\n\t\trewriter.replace(statement, ingredStatementCopy, null);\r\n\t\treturn true;\r\n\t}", "public void compute() {\r\n this.host = \".*\";\r\n this.hostPattern = new Pattern(host);\r\n // staticDir\r\n if (action.startsWith(\"staticDir:\")) {\r\n if (!method.equalsIgnoreCase(\"*\") && !method.equalsIgnoreCase(\"GET\")) {\r\n Logger.warn(\"Static route only support GET method\");\r\n return;\r\n }\r\n if (!this.path.endsWith(\"/\") && !this.path.equals(\"/\")) {\r\n Logger.warn(\"The path for a staticDir route must end with / (%s)\", this);\r\n this.path += \"/\";\r\n }\r\n this.pattern = new Pattern(\"^\" + path + \"({resource}.*)$\");\r\n this.staticDir = action.substring(\"staticDir:\".length());\r\n } else {\r\n // URL pattern\r\n // Is there is a host argument, append it.\r\n if (!path.startsWith(\"/\")) {\r\n String p = this.path;\r\n this.path = p.substring(p.indexOf(\"/\"));\r\n this.host = p.substring(0, p.indexOf(\"/\"));\r\n\r\n Matcher m = new Pattern(\".*\\\\{({name}.*)\\\\}.*\").matcher(host);\r\n\r\n if (m.matches()) {\r\n String name = m.group(\"name\");\r\n hostArg = new Arg();\r\n hostArg.name = name;\r\n }\r\n this.host = this.host.replaceFirst(\"\\\\{.*\\\\}\", \"\");\r\n this.hostPattern = new Pattern(host);\r\n }\r\n String patternString = path;\r\n patternString = customRegexPattern.replacer(\"\\\\{<[^/]+>$1\\\\}\").replace(patternString);\r\n Matcher matcher = argsPattern.matcher(patternString);\r\n while (matcher.find()) {\r\n Route.Arg arg = new Arg();\r\n arg.name = matcher.group(2);\r\n arg.constraint = new Pattern(matcher.group(1));\r\n args.add(arg);\r\n }\r\n\r\n patternString = argsPattern.replacer(\"({$2}$1)\").replace(patternString);\r\n this.pattern = new Pattern(patternString);\r\n // Action pattern\r\n patternString = action;\r\n patternString = patternString.replace(\".\", \"[.]\");\r\n for (Route.Arg arg : args) {\r\n if (patternString.contains(\"{\" + arg.name + \"}\")) {\r\n patternString = patternString.replace(\"{\" + arg.name + \"}\", \"({\" + arg.name + \"}\" + arg.constraint.toString() + \")\");\r\n actionArgs.add(arg.name);\r\n }\r\n }\r\n actionPattern = new Pattern(patternString, REFlags.IGNORE_CASE);\r\n }\r\n }", "@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }", "public void rewriteDLR(){\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\t//Rewriting for global context.\n\t\tDLRGlobal2DatalogRewriter globalrewriter = new DLRGlobal2DatalogRewriter();\n\t\tdatalogGlobal = globalrewriter.rewrite(inputCKR.getGlobalOntology());\n\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\trewritingTime = endTime - startTime;\n\t\t\n\t\t//Compute DKB Program.\n\t\tdatalogCKR = new DLProgram();\n\t\n\t\tdatalogCKR.addAll(datalogGlobal.getStatements());\n\n\t\t//Add local propagation rules.\n\t\tdatalogCKR.addAll(DLRDeductionRuleset.getPd());\n\t}", "public int handle(Request req, int handlerCode) throws IOException{\n if (fileCache == null) return Interceptor.CONTINUE;\n \n if (handlerCode == Interceptor.RESPONSE_PROCEEDED && fileCache.isEnabled()){\n String docroot = SelectorThread.getWebAppRootPath();\n MessageBytes mb = req.requestURI();\n String uri = req.requestURI().toString(); \n fileCache.add(FileCache.DEFAULT_SERVLET_NAME,docroot,uri,\n req.getResponse().getMimeHeaders(),false); \n } else if (handlerCode == Interceptor.REQUEST_LINE_PARSED) {\n ByteChunk requestURI = req.requestURI().getByteChunk(); \n if (fileCache.sendCache(requestURI.getBytes(), requestURI.getStart(),\n requestURI.getLength(), channel,\n keepAlive(req))){\n return Interceptor.BREAK; \n }\n } \n return Interceptor.CONTINUE;\n }", "@SetSearchIndexDirty\n public ResponseContext execute() {\n logger.debug(\"+\");\n RequestContext request = getRequestContext();\n User user = request.getSession().getUser();\n Connection conn = null;\n try {\n super.checkPermission(user);\n checkRequest(request);\n conn = DBHelper.getConnection();\n conn.setAutoCommit(false);\n Long listId = request.getLong(INPUT_LIST_ID);\n Long listItemId = request.getLong(INPUT_LIST_ITEM_ID);\n Long moveToListId = request.getLong(INPUT_MOVE_TO_ID);\n String items = request.getParameter(INPUT_LIST_ITEMS);\n isMove = \"true\".equals(request.getParameter(INPUT_IS_MOVE));\n List list = List.findById(conn, listId);\n List moveToList = List.findById(conn, moveToListId);\n checkPermission(user, list, moveToList);\n if (items != null && items.length() > 0)\n copyItems(conn, items, user, moveToListId);\n else\n copyItem(conn, listItemId, user, moveToListId);\n conn.commit();\n }\n catch (Exception ex) {\n logger.error(\"Cannot process request\", ex);\n DBHelper.rollback(conn);\n }\n finally {\n DBHelper.close(conn);\n }\n GetListCommand command = new GetListCommand();\n command.setRequestContext(request);\n logger.debug(\"-\");\n return command.execute();\n }", "public Rule call()\n \t{\n \t\treturn sequence(id(),\n \t\t\t\tfirstOf(\n \t\t\t\tsequence(enforcedSequence(PAR_L, optional(args()), PAR_R), optional(closure())), //params & opt. closure\n \t\t\t\tclosure())); // closure only\n \t}", "public R getRule() {\n return this.rule;\n }", "public abstract boolean process();", "@Override\n public void execute() {\n\n if(!isValid){\n System.out.println(invalidReasonString);\n return;\n }\n\n\n Path filteredFilesRoot = Path.of(pathToDir,filteredFilesRootDirectory);\n\n try {\n\n if (Files.exists(filteredFilesRoot) && Files.isDirectory(filteredFilesRoot)){\n emptyDirectory(filteredFilesRoot.toFile());\n Files.delete(filteredFilesRoot);\n } else if (Files.isRegularFile(filteredFilesRoot)){\n Files.delete(filteredFilesRoot);\n }\n\n Files.createDirectory(filteredFilesRoot);\n\n List<Path> filteredFiles = PostProcessor.filterRootDirectory(pathToDir,maxFileSize,keywords);\n\n copyFiles(filteredFilesRoot,filteredFiles);\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n\n }", "private void parseRule(Node node) {\r\n if (switchTest) return;\r\n parse(node.right());\r\n }", "@Test\n\tpublic void testSimpleOneRuleFailExecution() {\n\n\t\tSkRuleBase rule = buildThings(ONE_RULE_FAIL_FILE_NAME, SkRuleBase.class, \"rule\");\n\n\t\tSkRuleMaster master = new SkRuleMaster.Builder().addRule(rule)\n\t\t\t\t.build();\n\t\tSkRuleRunner runner = master.getRuleRunner();\n\n\t\ttry {\n\t\t\trunner.setValue(\"THIS_MACRO_DOES_NOT_EXIST\", \"X\");\n\t\t\trule.run(runner);\n\t\t\tAssert.fail(\"We should have thrown an error.\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(String.format(\"We expected this error : '%s'\", e.toString()));\n\t\t}\n\t\trunner.setValue(\"MILK.QTY\", 2);\n\t\trule.run(runner);\n\t}", "private void setCurrentRule(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][1].equals(\"-\")){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t}\n\t}\n}", "@Test\n public void ruleIndexTest() {\n // TODO: test ruleIndex\n }", "private Op rewriteOp1(final Op1 op1) {\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n op1.getSubOp().visit(rewriter);\n return rewriter.getResult();\n }", "public Indexer crawl() \n\t{\n\t\t// This redirection may effect performance, but its OK !!\n\t\tSystem.out.println(\"Crawling: \"+u.toString());\n\t\treturn crawl(crawlLimitDefault);\n\t}", "private int R() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase '(':\n\t\t\tcase ')':\n\t\t\tcase END_MARKER:\n\t\t\t\t// R -> epsilon\n\t\t\t\treturn 1;\n\t\t\tcase '0':\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9':\n\t\t\t\t// R -> C\n\t\t\t\treturn C();\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}", "public String execute() throws Exception {\n\t\treturn SUCCESS;\r\n\t}", "public String execute() throws Exception {\n\t\treturn SUCCESS;\r\n\t}", "public final void rule__Index__ExpressionAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18305:1: ( ( ruleExpression ) )\r\n // InternalGo.g:18306:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:18306:2: ( ruleExpression )\r\n // InternalGo.g:18307:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIndexAccess().getExpressionExpressionParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIndexAccess().getExpressionExpressionParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public Object execute(DynamicObject regExp, String input) {\n TruffleObject flags = compiledRegexAccessor.flags(JSRegExp.getCompiledRegex(regExp));\n boolean global = flagsAccessor.global(flags);\n boolean sticky = ecmaScriptVersion >= 6 && flagsAccessor.sticky(flags);\n long lastIndex = getLastIndex(regExp);\n if (global || sticky) {\n if (invalidLastIndex.profile(lastIndex < 0 || lastIndex > input.length())) {\n setLastIndex(regExp, 0);\n return getEmptyResult();\n }\n } else {\n lastIndex = 0;\n }\n\n TruffleObject result = executeIgnoreLastIndex(regExp, input, lastIndex);\n if (match.profile(regexResultAccessor.isMatch(result))) {\n context.setRegexResult(result);\n if (stickyProfile.profile(sticky && regexResultAccessor.captureGroupStart(result, 0) != lastIndex)) {\n // matcher should never have advanced that far!\n setLastIndex(regExp, 0);\n return getEmptyResult();\n }\n if (global || sticky) {\n setLastIndex(regExp, regexResultAccessor.captureGroupEnd(result, 0));\n }\n if (ecmaScriptVersion < 6) {\n return result;\n }\n return getMatchResult(result, input);\n } else {\n if (ecmaScriptVersion < 8 || global || sticky) {\n setLastIndex(regExp, 0);\n }\n return getEmptyResult();\n }\n }", "private int processNormalRequest( boolean allowCache ) throws ServerException {\r\n\r\n\t\tif ( request.getMethod().equals( Request.PUT ) ) {\r\n\t\t\treturn processPUT();\r\n\t\t} else if ( isScript( request.getURI() ) ) {\r\n\t\t\treturn executeScript();\r\n\t\t} else {\r\n\t\t\treturn retrieveStaticDocument( allowCache );\r\n\t\t}\r\n\t}", "public abstract int execUpdate(String query) ;" ]
[ "0.53448486", "0.52864486", "0.5005573", "0.4902034", "0.48168167", "0.47135568", "0.47076944", "0.4667987", "0.46640688", "0.4642244", "0.46328473", "0.46090364", "0.45814273", "0.45706573", "0.45419705", "0.4531", "0.45232347", "0.45164007", "0.45121592", "0.45067757", "0.44700366", "0.44638965", "0.445111", "0.44247797", "0.44176435", "0.44141778", "0.43980464", "0.4393473", "0.43782374", "0.43713248", "0.43668178", "0.43631107", "0.43477732", "0.433277", "0.43283355", "0.4304563", "0.4297864", "0.42899635", "0.42897725", "0.4283927", "0.42822072", "0.4258425", "0.42570254", "0.42435968", "0.42398027", "0.4220617", "0.42084", "0.42062822", "0.41829672", "0.4182933", "0.41776475", "0.41758898", "0.41739568", "0.4170543", "0.41647452", "0.4150379", "0.4146242", "0.41395068", "0.41375867", "0.41360345", "0.4133466", "0.4126991", "0.41250047", "0.40936062", "0.40925837", "0.40719047", "0.40694988", "0.40674534", "0.40625376", "0.4061249", "0.40609506", "0.4056457", "0.40512714", "0.40442544", "0.40408963", "0.40394276", "0.40359333", "0.40345633", "0.4022183", "0.40170985", "0.40166703", "0.4016604", "0.40098011", "0.40046445", "0.4001302", "0.3995013", "0.39858526", "0.39784074", "0.39733654", "0.39699566", "0.39677176", "0.3963864", "0.39610633", "0.39527348", "0.39499545", "0.39499545", "0.39480785", "0.39456996", "0.3941959", "0.3938966" ]
0.45501125
14
getter du nom du player
public String getName(){return this.aName;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPlayerName();", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "String getName(){\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }", "String getName() {\n return getStringStat(playerName);\n }", "public String getPlayerName() {\n return name; \n }", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "String getPlayer();", "public String getPlayerName() {\n return this.playerName;\n }", "public String getPlayerName() {\n \treturn playername;\n }", "abstract public String getNameFor(Player player);", "public String getPlayerName() {\n\t\treturn name;\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getName(Player p) {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getName(){\n\t\treturn players.get(0).getName();\n\t}", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "public String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayer() {\r\n return player;\r\n }", "String player1GetName(){\n return player1;\n }", "java.lang.String getGameName();", "java.lang.String getGameName();", "String player2GetName(){\n return player2;\n }", "public String getPlayerName(){\n return this.playerName;\n\n }", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }", "public String getPlayer() {\n return p;\n }", "String getNewPlayerName();", "private String getPlayerName(int i) {\n\t\tSystem.out.println(\"\\nEnter Player \"+i+\"'s Name:\");\n\t\treturn GetInput.getInstance().aString();\n\t}", "public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }", "public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n }\n }", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "String randomPlayer1GetName(){\n return randomPlayer1;\n }", "private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }", "String getPlayerName() {\r\n EditText editText = (EditText) findViewById(R.id.name_edit_text_view);\r\n return editText.getText().toString();\r\n }", "public String getFullPlayerName(Player otherPlayer) {\n return this.fullPlayerName;\n }", "public String getNewPlayerName() {\n return newPlayerName;\n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "String getName() ;", "public String getPlayerName() {\n/* 100 */ return this.scorePlayerName;\n/* */ }", "public String getPlayerTitle(Player player)\n \t{\n \t\tif (player == null)\n \t\t\treturn \"\";\n \n \t\tFPlayer me = FPlayers.i.get(player);\n \t\tif (me == null)\n \t\t\treturn \"\";\n \n \t\treturn me.getTitle().trim();\n \t}", "public String getPlayerName2(){\n\t\treturn playerName2;\n\t}", "public String getPlayerName(UUID id) {\n return playerRegistry.get(id);\n }", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public String getPlayerName(){\n return player1Score > player2Score ? player1Name : player2Name;\n }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "private String getFirstPlayer() {\n\t\treturn firstPlayer;\n\t}", "public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}", "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();" ]
[ "0.8703004", "0.8493328", "0.8425902", "0.8423101", "0.83808124", "0.83722436", "0.83263874", "0.82846624", "0.8282493", "0.8227095", "0.82222766", "0.8207941", "0.8191605", "0.81876874", "0.8183228", "0.8176676", "0.8174575", "0.8174575", "0.8083846", "0.806301", "0.80622166", "0.80587894", "0.802264", "0.79256916", "0.7889715", "0.78894913", "0.78508216", "0.77836776", "0.77836776", "0.77102333", "0.76788276", "0.7649455", "0.75880814", "0.75750166", "0.7544692", "0.7474198", "0.7456601", "0.7455846", "0.74542314", "0.7419901", "0.73962754", "0.73799366", "0.7378358", "0.7377632", "0.7345277", "0.7314908", "0.7295207", "0.7283271", "0.7260676", "0.72025687", "0.72022486", "0.71769667", "0.71641946", "0.7154941", "0.7130822", "0.7118711", "0.71158284", "0.7090762", "0.7073513", "0.70566446", "0.70416045", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774", "0.70202774" ]
0.0
-1
setter permattant de modifier le nom du player
public void setName(final String pName){this.aName = pName;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "void setName(String name) {\n setStringStat(name, playerName);\n }", "public void setName(String name)\n {\n playersName = name;\n }", "public void setPlayerName(String name){\n\t\tplayerName = name;\n\t\trepaint();\n\t}", "public void setPlayer1Name(String name){\n player1 = name;\n }", "Player(String name){\n\t\tthis.name = name;\n\t}", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public void setPlayerName(String name) {\n\t\tsuper.setPlayerName(name);\n\t}", "public String getPlayerName() {\n return name; \n }", "public void setPlayer2Name(String name){\n player2 = name;\n }", "public Builder setPlayerName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n playerName_ = value;\n onChanged();\n return this;\n }", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "public void setPlayerName(String newName) {\n if(newName == null) {\n return;\n }\n props.setProperty(\"name\", newName);\n saveProps();\n }", "void setPlayer1Name(String name) {\n if (!name.isEmpty()) {\n this.player1.setName(name);\n }\n }", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n \treturn playername;\n }", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }", "public void setPlayerName()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your name: \");\r\n\t\tname = in.nextLine();\r\n\t}", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "@Override\r\n\t\tpublic void dmr_setPlayingName(String str) throws RemoteException {\n\r\n\t\t}", "String getName(){\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n\t\treturn name;\n\t}", "String getNewPlayerName();", "public String getNewPlayerName() {\n return newPlayerName;\n }", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return this.playerName;\n }", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "public void setNames() {\n\t\tPlayer1 = \"COMPUTER\";\n\t\tPlayer2 = JOptionPane.showInputDialog(null, \"Enter your Name:\");\n\t\tnames_set = true;\n\t}", "public void setName( final String name ) throws RemoteException {\r\n playerState.name = name;\r\n }", "public void updateName(Player player)\n {\n String oldName = playerLabel.getText();\n playerLabel.setText(player.getName());\n if (player.getName().equalsIgnoreCase(\"Disconnesso\"))\n {\n waiting(player.getName());\n }\n }", "public void setPlayerName(String playerName) {\n this.playerName = playerName;\n }", "public void setPlayerName2(String name){\n\t\tplayerName2 = name;\n\t\trepaint();\n\t}", "public void setFullPlayerName(String fullPlayerName) {\n this.fullPlayerName = fullPlayerName;\n\n if (this.textDrawable != null)\n this.textDrawable.setText(fullPlayerName);\n\n if (this.gameScreenFullPlayerName != null) {\n String[] strTemp = { fullPlayerName };\n this.gameScreenFullPlayerName.setText(strTemp);\n }\n }", "public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }", "String getPlayerName();", "public void setPlayerName(String newName) {\n\t\tname = newName;\n\t}", "Player(String playerName) {\n this.playerName = playerName;\n }", "@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\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 String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "void setHighscoreName(String _playerName) {\n String name = _playerName;\n\n System.out.println(name + \"Game\");\n if (name == null) {\n //create Scanner\n Scanner input = new Scanner(System.in);\n //prompt the user to enter the name their highscore\n System.out.println(\"\");\n System.out.println(\"Please enter your highscore name:\");\n name = input.next();\n }\n// String name = playerName;\n if (!(name.length() <= 16)) {\n String substringOfName = name.substring(0, 15);\n score.setName(substringOfName);\n } else {\n score.setName(name);\n }\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "String getName() {\n return getStringStat(playerName);\n }", "public void AskName(String input){\r\n\t\tplayerName = input;\r\n\t}", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public String getPlayerName(){\n return this.playerName;\n\n }", "@Override\n\tpublic void setData(String playerName) {\n\t\tthis.currentPlayerName = playerName;\n\t\t\n\t}", "public void setPlayerName(String[] currentMsg, Player plr){\r\n\t\t\r\n\t\tString name = plr.getName();\r\n\t\tRandom rand = new Random();\r\n\t\tString substitute = \"Player\"+rand.nextInt(99);\r\n\t\t\r\n\t\tif(currentMsg.length>1){\r\n\t\t\tif(name == null){\r\n\t\t\t\tif(currentMsg[1].equals(\"null\"))\r\n\t\t\t\t\tplr.setName(substitute);\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\tplr.setName(currentMsg[1]);\r\n\t\t\t}else{\r\n\t\t\t\tsendAllPlayers(serverMessage(name+\" is now \" + currentMsg[1]+\"!\"), lobby.getLobbyPlayers());\r\n\t\t\t\tname = currentMsg[1];\t\r\n\t\t\t\tplr.setName(name);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tplr.setName(substitute);\r\n\t\t}\r\n\t\t\t\r\n\t\tlobby.updateNames();\r\n \tsendNameInfoToAll();\r\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "void setUpPlayerNames() {\n playerName.setText(this.player1.getName());\n computerName.setText(this.computer.getName());\n }", "public void setName(final String name) {\n\t\tGuard.ArgumentNotNullOrEmpty(name, \"name\");\n\t\t\n\t\tthis.name = name;\n\t\t\n\t\tif (bukkitPlayer != null) {\n\t\t\tbukkitPlayer.setDisplayName(name);\n\t\t\tbukkitPlayer.setCustomName(name);\n\t\t\tbukkitPlayer.setPlayerListName(name);\n\t\t}\n\t\tdb.updateField(this, \"name\", name);\n\t}", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "public void setName(String n){ name=n; }", "boolean setPlayer(String player);", "void setGameName(String gameName);", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "public String getName(Player p) {\n\t\treturn name;\n\t}", "public void setPlayerTurnName(){\n game.setPlayerTurn();\n String playerTurnName = game.getPlayerTurnName();\n playerturntextID.setText(playerTurnName + \" : Turn !!\");\n }", "public void setName(String name) {\n characterName = name;\n }", "public Player(String name) {\r\n this.name = name;\r\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "abstract public String getNameFor(Player player);", "public static void SetPlayerNames () {\n for (int i = 0; i < player_count; i++) {\r\n\r\n // PROMPT THE USER\r\n System.out.print(\"Player \" + (i+1) + \", enter your name: \");\r\n\r\n // INSTANTIATE A NEW PLAYER USING THE NAME THAT'S PROVIDED\r\n player[i] = new Player(input.nextLine());\r\n\r\n // IF THE PLAYER DOESN'T ENTER A NAME, CALL THEM \"BIG BRAIN\"\r\n if (player[i].name.length() == 0) {\r\n player[i].name = \"Big Brain\";\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n }\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n }", "public String getPlayer() {\r\n return player;\r\n }", "@Override\n\tpublic void setDisplayName(TangentPlayer pl) {\n\t\tgetPlayer().setDisplayName(pl.getName());\n\t}", "public void setNames(){\n System.out.println();\n System.out.println(\"Welcome! Please set your username!\");\n for(int i = 0; i < players.size(); i ++){\n Player player = players.get(i);\n player.rename(\"Dealer Jack\");\n for(int j = 0; j < i; j ++){\n while(player.getName().equals(players.get(j).getName())){\n System.out.println(\"Username taken! Please enter another name!\");\n player.setName(\"player\" + (i + 1));\n player.rename(\"Dealer Jack\");\n }\n }\n }\n }", "public void setName (String n) {\n name = n;\n }", "public void setName(String n) {\r\n name = n;\r\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "public void setName(String name) {\n monsterName = name;\n }", "public void setName(String name) {\n monsterName = name;\n }", "public static void setName(String n){\n\t\tname = n;\n\t}", "public void setName(java.lang.String value);", "public void setName(java.lang.String value);", "String player1GetName(){\n return player1;\n }", "void setName(String name_);", "public void setPlayerName(String playerName) {\n\t\tthis.playerName = playerName;\n\t}", "public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }", "String player2GetName(){\n return player2;\n }", "public void setWinningText(String player) {\n names.setText(player +\" WINS!!!\");\n }", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void setName(String value) {\n this.name = value;\n }", "public void setName (String name){\n \n boyName = name;\n }", "public void AskName(){\r\n\t\tSystem.out.println(\"Player 2, please enter your name: \\nPredictable Computer\");\r\n\t\tplayerName = \"Predictable Computer\";\r\n\t}", "public void setName(String newname){\n name = newname; \n }", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "public void setName(String inName)\n {\n\tname = inName;\n }", "public void setName(String value) {\n\t\tname = value;\n\t}", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public final void setName(String name) {_name = name;}", "public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }", "public void setName (String Name);", "public void setName (String Name);", "public void setName (String Name);" ]
[ "0.8342215", "0.8238597", "0.800021", "0.79452723", "0.78524655", "0.77827", "0.7751192", "0.75429404", "0.7510743", "0.7496635", "0.7479326", "0.74726796", "0.7434952", "0.74168843", "0.73951", "0.7392306", "0.7371084", "0.73609143", "0.73476446", "0.7344283", "0.7337815", "0.7335138", "0.7318881", "0.7304303", "0.730359", "0.7292799", "0.72891355", "0.7261175", "0.725419", "0.725419", "0.72179645", "0.7206398", "0.71836406", "0.71794885", "0.71687216", "0.7159474", "0.7130743", "0.71210384", "0.7092713", "0.70783424", "0.7074387", "0.70530254", "0.70527893", "0.70445085", "0.7043705", "0.7025884", "0.7025817", "0.7022437", "0.70184183", "0.70053333", "0.700417", "0.6998771", "0.6991409", "0.6981706", "0.6975151", "0.6962208", "0.69591177", "0.6957141", "0.6942917", "0.6941038", "0.6932547", "0.6912008", "0.6900984", "0.6895365", "0.6888937", "0.6883145", "0.6873489", "0.68380755", "0.68195534", "0.6808481", "0.68017966", "0.67840576", "0.678391", "0.67796886", "0.67778033", "0.6767963", "0.6767963", "0.67474365", "0.6745097", "0.6745097", "0.67431396", "0.6743008", "0.6723388", "0.6718294", "0.6700697", "0.6698581", "0.6686809", "0.66862833", "0.6667596", "0.6666097", "0.6664358", "0.6661958", "0.66593915", "0.66514033", "0.6646098", "0.6637786", "0.6636283", "0.66321397", "0.6624714", "0.6624714", "0.6624714" ]
0.0
-1
getter du poid max que peut porter le player
public double getStrong(){return this.aStrong;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxPlayers() {\n return maxPlayers;\n }", "protected final int getMax() {\n\treturn(this.max);\n }", "public int getMaximumPlayers() {\n return maximumPlayers;\n }", "public int getMaxPlayers() {\n\t\treturn maxPlayers;\n\t}", "public int getMaximum() {\r\n return max;\r\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "int getMaximum();", "public int getMax(){\n return tab[rangMax()];\n }", "public abstract int getMaximumValue();", "public Point getMax () {\r\n\r\n\treturn getB();\r\n }", "int getMax();", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "protected final Comparable getMax()\r\n {\r\n return myMax;\r\n }", "public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }", "public int getOpponentMaxRating() {\n return getIntegerProperty(\"MaxRating\");\n }", "public int donnePoidsMax() { return this.poidsMax; }", "public double getMaximum() {\n return (max);\n }", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "public int getMaxHP() {\n return maxHP;\n }", "int getMax( int max );", "public int getMax() {\n\t\treturn mMax;\n\t}", "public Integer max() {\n return this.max;\n }", "@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }", "public long getMax() {\n return m_Max;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMax()\n {\n return 0;\n }", "public int getMaximumPlayers() {\n return getOption(ArenaOption.MAXIMUM_PLAYERS);\n }", "public Integer getMax() {\n\t\t\tif (hotMinMax) {\n\t\t\t\tConfigValue rawMinMax = new ConfigValue();\n\t\t\t\ttry {\n\t\t\t\t\trawSrv.getCfgMinMax(name, rawMinMax);\n\t\t\t\t\t// TODO: FIX HERE\n\t\t\t\t\treturn 100;\n\t\t\t\t} catch (TVMException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn new Integer(max);\n\t\t\t}\n\t\t\t// ....\n\t\t\treturn 100;\n\t\t}", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "@In Integer max();", "@In Integer max();", "public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }", "@Override\n\tpublic int getMaxID() {\n\t\tResultSet resultSet = null;\n\t\tint max = 0;\n\t\ttry {\n\t\t\tresultSet = DBManager.getInstance().readFromDB(\"SELECT max(planeid) from fleet\");\n\t\t\tresultSet.next();\n\t\t\tmax = resultSet.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(max == 0) {\n\t\t\treturn 999;\n\t\t}\n\t\treturn max;\n\t}", "double getMax();", "double getMax();", "public byte get_max() {\n return (byte)getSIntBEElement(offsetBits_max(), 8);\n }", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public int getMaximum() {\n return this.iMaximum;\n }", "public int getPuntajeMaximo() {\n\t\ttry {\r\n\t\t\treturn juego.getPuntajeMaximo();\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public int getChromNum()\r\n {\r\n return max;\r\n }", "public long getPropertyVolumeMax()\n {\n return iPropertyVolumeMax.getValue();\n }", "public int getMineMaxAmmo() {\r\n\t\t\r\n\t\t// Code kann nur bei Verwendung von eea verwendet werden, sonst muss er geloescht werden!\r\n\t\t// Auch bei Verwendung von eea muss diese Methode erweitert werden.\r\n\r\n\t\tList<Entity> entities = new ArrayList<Entity>();\r\n\r\n\t\tentities = StateBasedEntityManager.getInstance().getEntitiesByState(Tanks.GAMEPLAYSTATE);\r\n\r\n\t\t//TODO\r\n\r\n\t\treturn -1;\r\n\t}", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public float maxSpeed();", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "public int getMaxCompleted() {\n\t\tint max = -1;\n\t\tfor (Integer i : playerVisible)\n\t\t\tmax = Math.max(max, i);\n\t\treturn max;\n\t}", "public int getMaxIntValue();", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }", "public Quantity<Q> getMax() {\n return max;\n }", "int max();", "public long getPropertyVolumeMax();", "public int getMaxSpeed() {\n return MaxSpeed;\n }", "@Override\n\tpublic long getMaxnum() {\n\t\treturn _esfTournament.getMaxnum();\n\t}", "public double getMaxHp() {\n return maxHp;\n }", "public int getMaxValue() {\n return maxValue;\n }", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }", "@JSProperty(\"max\")\n double getMax();", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public Contenedor getContenedorMaximo()\n {\n Contenedor maxCont = null;\n int maxPeso ;\n\n maxPeso = 0;\n\n for (Contenedor c : this.losContenedores){\n if (c.peso > maxPeso)\n {\n maxPeso = c.peso;\n maxCont = c;\n }\n }\n\n return maxCont;\n }", "public CoreComponentTypes.apis.ebay.BasicAmountType getMpMax() {\r\n return mpMax;\r\n }", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();" ]
[ "0.77077395", "0.75727516", "0.7534493", "0.7486466", "0.7380823", "0.73745334", "0.73745334", "0.73745334", "0.73043746", "0.7304159", "0.72919595", "0.7272722", "0.7270852", "0.7233556", "0.7226381", "0.7226381", "0.7207207", "0.72071284", "0.71705973", "0.7147573", "0.7130188", "0.7110447", "0.7110447", "0.7110447", "0.7110447", "0.7110447", "0.7110447", "0.7073032", "0.7063883", "0.705883", "0.70546603", "0.70499367", "0.70446086", "0.7042345", "0.70388395", "0.70388395", "0.70388395", "0.7038821", "0.70380694", "0.70380694", "0.7029027", "0.7029027", "0.7029027", "0.7028453", "0.7028453", "0.7028453", "0.702627", "0.70209193", "0.70076853", "0.69966805", "0.6993461", "0.6993461", "0.6974067", "0.69714904", "0.69500846", "0.69500846", "0.69394505", "0.69259715", "0.69099283", "0.6901029", "0.6893903", "0.68837714", "0.6875873", "0.6875378", "0.6873765", "0.6869365", "0.6869365", "0.6869365", "0.68683916", "0.6867864", "0.6867864", "0.68626076", "0.68471736", "0.68465537", "0.68456817", "0.6840957", "0.68394035", "0.68325746", "0.6827904", "0.6812609", "0.6811777", "0.68047154", "0.68036747", "0.68019044", "0.68005115", "0.67869216", "0.67869216", "0.67869216", "0.6784385", "0.6784385", "0.6784385", "0.6784318", "0.67838794", "0.67812866", "0.67719084", "0.6768993", "0.6765391", "0.6765391", "0.6765391", "0.6765391", "0.6765391" ]
0.0
-1
setter permattant de modifier le poid max que la player peut transporter
public void setStrong(final double pStrong){this.aStrong = pStrong;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMax(int max) { this.max = new SimplePosition(false,false,max); }", "public void setMax ( Point max ) {\r\n\r\n\tsetB ( max );\r\n }", "protected final void setMax(Comparable max)\r\n {\r\n myMax = max;\r\n }", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "void setMaximum(int max);", "public int getMaxPlayers() {\n return maxPlayers;\n }", "public int getMaximumPlayers() {\n return maximumPlayers;\n }", "public int donnePoidsMax() { return this.poidsMax; }", "@Raw\n private void setMaxVelocity(double max){\n \tif (!isValidMaxVelocity(max)) this.maxVelocity = SPEED_OF_LIGHT;\n \telse this.maxVelocity = max;\n }", "public void setMaximum(Number max) {\n this.max = max;\n }", "public void setMaxSpeed() {\n\t\tspeed = MAX_SPEED;\n\t}", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setMaxPlayers(int maxPlayers) {\n\t\tthis.maxPlayers = maxPlayers;\n\t}", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00008000;\n maxMP_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic int getMaxSpeed() {\n\t\treturn super.getMaxSpeed();\n\t}", "protected final int getMax() {\n\treturn(this.max);\n }", "public int getMaxPlayers() {\n\t\treturn maxPlayers;\n\t}", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000040;\n maxMP_ = value;\n onChanged();\n return this;\n }", "@Override\n public double getMaxSpeed() {\n return myMovable.getMaxSpeed();\n }", "public void setMaxSpeed(double maxSpeed) {\r\n this.maxSpeed = maxSpeed;\r\n }", "public void SetMaxVal(int max_val);", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000080;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Player(int max_inventory){\n this.max_inventory = max_inventory;\n }", "public void setMaxSpeed(float max_speed)\n\t{\n\t\tthis.max_speed = max_speed;\n\t}", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public void setMaximumPoints(int maximum);", "void setMaxValue();", "public void setMaxSpeed(int MaxSpeed) {\n this.MaxSpeed = MaxSpeed;\n }", "public void setMaxUnit(int max) {\n maxUnit = max;\n }", "public float maxSpeed();", "public int getMaxSpeed() {\n return MaxSpeed;\n }", "@JSProperty(\"max\")\n void setMax(double value);", "protected void setMaxManaPerLevel(double maxManaPerLevel) \r\n\t{\tthis.maxManaPerLevel = maxManaPerLevel;\t}", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public double getMaxSpeed() {\r\n return maxSpeed;\r\n }", "public void setMaximumPlayers(int maximumPlayers) {\n setOptionValue(ArenaOption.MAXIMUM_PLAYERS, maximumPlayers);\n }", "public float maxTorque();", "public void setMaxSpeed(int maxSpeed) {\n\t\tthis.maxSpeed = maxSpeed;\n\t}", "public int getMaxValue(){\n\t\treturn maxValue;\n\t}", "public void setMaxAmount(int max) {\n _max = max;\n }", "public void setMaxAlturaCM(float max);", "public void setPlayerMaxHealth(Player player) {\n int health=16+(player.getLevel()/2);\n if(health>40) health=40;\n // player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, player.getLevel(), true));\n player.setMaxHealth(health);\n }", "public int getMaxTime() { return _maxTime; }", "public void setMaxSpeed(double value) {\n super.setMaxSpeed(value);\n }", "protected final Comparable getMax()\r\n {\r\n return myMax;\r\n }", "public void setMax( float max )\n { \n this.max = max;\n show_text();\n }", "public void setMax(int max)\n\t{\n\t\tif (max < 0)\n\t\t\tthrow new IllegalArgumentException(\"max < 0\");\n\t\tthis.max = max;\n\t}", "private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }", "public int getMaxHP() {\n return maxHP;\n }", "public M csmiPlaceMax(Object max){this.put(\"csmiPlaceMax\", max);return this;}", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "private int mobLimitPlacer(){\n if (gameWorld == GameWorld.NORMAL) return\n Api.getConfigManager().getWorldMobLimit();\n else return\n Api.getConfigManager().getNetherMobLimit();\n }", "public int getMaxValue() {\n return maxValue;\n }", "public int getOpponentMaxRating() {\n return getIntegerProperty(\"MaxRating\");\n }", "public void setMaxSpeed(double speed){\n\t\tthis.speed = speed;\n\t}", "public void setMaxTime(int aMaxTime)\n{\n // Set max time\n _maxTime = aMaxTime;\n \n // If time is greater than max-time, reset time to max time\n if(getTime()>_maxTime)\n setTime(_maxTime);\n}", "public void setVieMax(int vieMax) {\n\t\tthis.vieMax = vieMax;\n\t\tthis.setVie(vieMax);\n\t}", "public CoreComponentTypes.apis.ebay.BasicAmountType getMpMax() {\r\n return mpMax;\r\n }", "public void setMaxValue(int x) {\r\n\t\tmaxValue = x;\r\n\t}", "public void set_max(byte value) {\n setSIntBEElement(offsetBits_max(), 8, value);\n }", "public double getMaximum() {\n return (max);\n }", "public static void setMaxAu(int max) {\n\t\tmaxAu = max;\n\t}", "@Override\n\tpublic long getMaxnum() {\n\t\treturn _esfTournament.getMaxnum();\n\t}", "protected void setMaxHealthPerLevel(double maxHealthPerLevel) \r\n\t{\tthis.maxHealthPerLevel = maxHealthPerLevel;\t}", "public void setMaxTransfer(double maxTransfer) {\n\t\tthis.maxTransfer = maxTransfer;\n\t}", "@Basic @Raw @Immutable\n public double getMaxVelocity(){\n return this.maxVelocity = SPEED_OF_LIGHT;\n }", "public abstract int getMaximumValue();", "public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getVitesseMax()\t{\r\n \treturn this.vitesseMax;\r\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public float getMaxMana()\n {\n return maxMana;\n }", "public Builder setMaxHP(int value) {\n bitField0_ |= 0x00000020;\n maxHP_ = value;\n onChanged();\n return this;\n }", "public boolean overMax() {\n if (this.levelMessage.getDoubleParameter() > this.configuration.getMaximalLimitLevel()) {\n return true;\n }\n return false;\n }", "@Override\n public void setMaxSpeed(double ms) throws InvalidDataException {\n myMovable.setMaxSpeed(ms);\n }", "public float setYMax(){\n\t\tif (game.getDifficulty() == 0)\n\t\t\treturn 72;\n\t\telse if (game.getDifficulty() == 1)\n\t\t\treturn 108;\n\t\telse\n\t\t\treturn 144;\n\t}", "public boolean setPropertyBalanceMax(long aValue);", "public double getMaxSpeedValue() {\n return maxSpeedValue;\n }" ]
[ "0.72449976", "0.70118433", "0.697942", "0.6884454", "0.68815815", "0.684662", "0.6775668", "0.67748004", "0.6752992", "0.6745357", "0.66935086", "0.66479623", "0.66479623", "0.6605975", "0.66001713", "0.65934974", "0.6591238", "0.6584206", "0.65702796", "0.656776", "0.65597594", "0.6556506", "0.65549195", "0.65300685", "0.64971185", "0.64941406", "0.64941406", "0.6492017", "0.6490977", "0.6489214", "0.64598846", "0.6453522", "0.6442374", "0.6436889", "0.64327884", "0.6428665", "0.64170206", "0.64170206", "0.64170206", "0.64169943", "0.6416545", "0.6416545", "0.63886344", "0.63886344", "0.63886344", "0.6387464", "0.6387464", "0.6387464", "0.6386235", "0.63797474", "0.6375582", "0.63612413", "0.63507104", "0.63504153", "0.6347951", "0.63477933", "0.63415885", "0.6339723", "0.6339429", "0.6323709", "0.6319732", "0.62934136", "0.6290524", "0.6287167", "0.62859124", "0.62798023", "0.62798023", "0.62798023", "0.6273152", "0.6272742", "0.62711245", "0.6262556", "0.6257751", "0.62541723", "0.6240443", "0.6200417", "0.6197011", "0.6191168", "0.6189448", "0.61870897", "0.61816484", "0.61786485", "0.61639833", "0.61635697", "0.61600953", "0.6157885", "0.6157885", "0.6150077", "0.61486506", "0.61486506", "0.61486506", "0.61475503", "0.61475503", "0.6147207", "0.61421835", "0.61394197", "0.6132763", "0.6130037", "0.61272436", "0.6121379", "0.6119222" ]
0.0
-1
getter permettant de connaitre le poid que le player porte
public double getWeight(){return this.aWeight;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPlayer()\n {\n return this.player;\n }", "public String getPlayer() {\n return p;\n }", "public int getPlayerId();", "public Player getPlayer() {\n return p;\n }", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public int getPlayerID() {\r\n return playerID;\r\n }", "public int getPlayerID() {\n return playerID;\n }", "public Player getPlayer1(){\n return jugador1;\n }", "public Player getPlayer2(){\n return jugador2;\n }", "public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}", "int getPlayerId();", "int getPlayerId();", "public Player getPlayer();", "public Player getPlayer();", "public ServerPlayer getP1() {\r\n\t\treturn p1;\r\n\t}", "public Player getHost() {\r\n return roomHost;\r\n }", "Player getPlayer();", "public int getPlayersPiece() {\n return playersPiece;\n }", "public byte getPlayerId() {\n return playerId;\n }", "public Integer getPlayerId() {\n return PlayerId;\n }", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "public Player getPlayer() { return player;}", "public int getPlayerNumber() {\n return playerNumber;\n }", "public Player getPlayer() { return player; }", "protected Player getPlayer() { return player; }", "public int getPlayerNumber() {\n\t\tint playerNumber=super.getPlayerNumber();\n\t\treturn playerNumber;\n\t}", "public Player getPlayer() {\n\t\treturn p;\n\t}", "public Player getPlayer() {\r\n return player;\r\n }", "public String getPlayer() {\r\n return player;\r\n }", "public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}", "public long getPlayerId() {\n return playerId_;\n }", "public int getPlayerNumber() {\n return this.playerNumber;\n }", "public Player getPlayer(){\r\n return player;\r\n }", "public Player getP1() {\n return p1;\n }", "public ServerPlayer getP2() {\r\n\t\treturn p2;\r\n\t}", "public Player getPlayer() {\n return (roomPlayer);\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getP2() {\n return p2;\n }", "public Player getPlayer() {\n return player;\n }", "String getPlayer();", "public long getPlayerId() {\n return playerId_;\n }", "long getPlayerId();", "public int getId() {\n return playerId;\n }", "public String getPlayerID() {\n return playerID;\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public int getPlayerId() {\r\n\t\treturn playerId;\r\n\t}", "java.lang.String getPlayerId();", "public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}", "public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}", "Player getDormantPlayer();", "@Override\n\tpublic Player getHost() {\n\t\treturn host;\n\t}", "public void connectToServerPVP() {\n\n\t\ttry \n\t\t{\n\t\t\tSocket socket = new Socket(host, 8001);\n\t\t\tfromServer = new DataInputStream(socket.getInputStream());\n\t\t\ttoServer = new DataOutputStream(socket.getOutputStream());\n\n\t\t\ttoServer.writeInt(vsPLAYER);\n\n\t\t} catch (IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tThread thread = new Thread(new clientHandlingPlayer(fromServer, toServer));\n\t\tthread.start();\n\t}", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public EpicPlayer getEpicPlayer(){ return epicPlayer; }", "public String getId() {\n\t\treturn this.playerid;\n\t}", "public int getActivePlayer() {\n return activePlayer;\n }", "public int getPlayerID() {\n\t\treturn playerID;\n\t}", "public PlayerID getID()\r\n\t{\r\n\t\treturn ID;\r\n\t}", "public Player getOtherPlayer() {\n if (getCurrentPlayer().getNumber() == 1) {\n return joueur2;\n } else {\n return joueur1;\n }\n }", "public int activePlayer() {\n return this.activePlayer;\n }", "public int getNumPlayers(){\n return m_numPlayers;\n }", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public int getPort(){\r\n return localPort;\r\n }", "public int getPort(){\r\n return localPort;\r\n }", "public Strider getPlayer() {\n return player;\n }", "BPlayer getPlayer(Player player);", "public String getOtherPlayer() {\n return otherPlayer;\n }", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public void OnPlayer(Joueur joueur);", "public int getCurrentPlayer() {\n return player;\n }", "public int getPlayerNumber() {\n\t\tif(this.player == null) return 0;\n\t\telse return this.player.number;\n\t}", "private int getPortaServidor() throws ChatException{\n //Le a porta a partir do objeto properties\n String portaStr = props.getProperty(PROP_PORT);\n //A porta deve ter sido definida\n if(portaStr == null){\n throw new ChatException(\"A porta do servidor não foi definida.\");\n }\n try{\n //A porta deve poder ser convertida para um número inteiro\n int porta = Integer.parseInt(portaStr);\n //A porta deve estar num intervalo entre 1 e 65635\n if (porta < 1 || porta > 65635){\n throw new ChatException(\"A porta não está num intervalo válido.\");\n }\n //Retorna a porta lida\n return porta;\n }catch(NumberFormatException e){\n throw new ChatException(\"A porta não é um número válido.\");\n }\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "public Player getPlayer() {\n return me;\n }", "public ServerPlayer whoWon() {\r\n\t\tif (winner(CROSS)) {\r\n\t\t\treturn getP1();\r\n\t\t} else if (winner(NOUGHT)) {\r\n\t\t\treturn getP2();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Player getToTeleportTo(){\n\t\treturn toTeleportTo;\n\t}", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "public short getPlayerID() {\n\n return m_playerID;\n }", "public String getPlayerId() {\n\t\treturn playerId;\n\t}", "public char getPlayer() {\n return player;\n }", "public abstract Player getOpponent();", "private int otherPlayer() {\n return (currentPlayer == 1 ? 2 : 1);\n }", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "public Player getTeleporter(){\n\t\treturn teleporter;\n\t}", "public Player getPlayerInTurn();", "public int getPlayerNumber() {\n\t\treturn playerNumber;\n\t}", "public int getPlayerNumber() {\n\t\treturn playerNumber;\n\t}", "public AbstractGameObject getPlayer() {\n return this.player;\n }", "int remoteTp(Player p1, Player p2);", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "Player getSelectedPlayer();", "public int getPlayerPosition(int player)\n {\n return players[player];\n }", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}" ]
[ "0.6802932", "0.6736888", "0.6677206", "0.65981895", "0.65719473", "0.6534729", "0.6533822", "0.6499648", "0.64765036", "0.6465022", "0.645609", "0.64289576", "0.64289576", "0.6422191", "0.6422191", "0.6399422", "0.6380993", "0.6352194", "0.63453984", "0.6336543", "0.6328574", "0.63271403", "0.6324403", "0.6318888", "0.62772053", "0.62737423", "0.6271503", "0.62689877", "0.62668794", "0.62663764", "0.62603664", "0.6258486", "0.62527066", "0.6250984", "0.62328136", "0.62317944", "0.6203634", "0.62010473", "0.62010473", "0.62010473", "0.62010473", "0.62010473", "0.6197751", "0.6178045", "0.6177242", "0.6169913", "0.61619943", "0.6161161", "0.6151542", "0.61333257", "0.6116222", "0.6105689", "0.60904616", "0.60826313", "0.60826313", "0.60781515", "0.6070103", "0.60603225", "0.60524017", "0.6006889", "0.5991339", "0.59720767", "0.5968787", "0.596033", "0.5953964", "0.59244287", "0.59224045", "0.59145284", "0.5912745", "0.5912745", "0.5911998", "0.59025156", "0.58953834", "0.58906466", "0.58906466", "0.5884782", "0.58836263", "0.5880082", "0.58733666", "0.58650535", "0.5859793", "0.5857173", "0.58569336", "0.58557445", "0.58549476", "0.58518624", "0.58440787", "0.5838175", "0.5835712", "0.5831679", "0.5829688", "0.5829063", "0.5824375", "0.5824375", "0.582202", "0.58217275", "0.58180106", "0.5815282", "0.5814471", "0.5806215", "0.5806215" ]
0.0
-1
setter permattant de modifier le poid que le player transporte a l'intant t
public void setWeight(final double pWeight){this.aWeight = pWeight;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "@Override\n public void antidote(Player p) {\n LOG.wtf(this.getClass().getSimpleName(), \"ANTIDOTE SET TO \" + p.toString());\n }", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "private void transportPara() {\n int[] para = bottom_screen.transportPara();\n Attack_Menu.setHp_1(para[0]);\n Attack_Menu.setHp_2(para[1]);\n Attack_Menu.setDamage_1(para[2]);\n Attack_Menu.setDamage_2(para[3]);\n Attack_Menu.setHit_1(para[4]);\n Attack_Menu.setHit_2(para[5]);\n Attack_Menu.setCrit_1(para[6]);\n Attack_Menu.setCrit_2(para[7]);\n Attack_Menu.setTurn_1(para[8]);\n Attack_Menu.setTurn_2(para[9]);\n }", "public void setP1(Player p1) {\n this.p1 = p1;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(SuperMario mario){\r\n this.mario = mario;\r\n }", "public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}", "public void setOwner(Player player) {\n owner = player;\n }", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "protected void setMove(int t){\r\n\t\tthis.move = t;\r\n\t}", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public void setP1(ServerPlayer p1) {\r\n\t\tthis.p1 = p1;\r\n\t}", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "boolean teleport(Player p1, Player p2, boolean change);", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "public void setPlayer(Player p){\r\n playerModel=p; \r\n jEnemigoDatos.setText(p.getEnemy().getName());\r\n /*if(p.getBadConsequence()==null)\r\n jMalRolloDatos.setText(\"No\");\r\n else\r\n jMalRolloDatos.setText(\"Si\");*/\r\n if(p.isDead())\r\n jMuertoDatos.setText(\"Si\");\r\n else\r\n jMuertoDatos.setText(\"No\");\r\n \r\n jNivelDatos.setText(p.getLevels()+\"\");\r\n jCombatLevelDatos.setText(p.getCombatLevel()+\"\");\r\n jNombreDatos.setText(p.getName());\r\n if(p.canISteal())\r\n jRobarDatos.setText(\"Si\");\r\n else\r\n jRobarDatos.setText(\"No\");\r\n \r\n jNSectDatos.setText(Integer.toString(CultistPlayer.getTotalCultistPlayer()));\r\n \r\n if(playerModel.getClass() == CultistPlayer.class){\r\n jSectarioDatos.setText(\"Si\");\r\n //String text=(CultistPlayer)playerModel.getMyCultist().getGainedLevels()+\"\";\r\n //jSectarioDatos.setText(\"\"+(CultistPlayer)playerModel.getGainedLevels());\r\n \r\n }else\r\n jSectarioDatos.setText(\"No\");\r\n \r\n /*if(playerModel.getBadConsequence().isEmpty())\r\n pendingBadView1.setVisiblePending(false);\r\n else*/\r\n pendingBadView1.setVisiblePending(true);\r\n pendingBadView1.limpiar();\r\n \r\n // A continuación se actualizan sus tesoros \r\n fillTreasurePanel (jpVisibles, playerModel.getVisibleTreasures()); \r\n fillTreasurePanel (jpOcultos, playerModel.getHiddenTreasures()); \r\n btRobar.setEnabled(playerModel.canISteal());\r\n manejarBotones(true);\r\n repaint(); \r\n revalidate();\r\n }", "@Override\n\tpublic void ontick(Player p) {\n\t\tp.pos = move; // port to move vector\n\t\t\n\t\tfor(Effect ef:p.effects){\n\t\t\tef.ttl = 1;\n\t\t}\n\t}", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: */ {\r\n/* 146:166 */ this.puntoDeVenta = puntoDeVenta;\r\n/* 147: */ }", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "void setPlayerId(int playerId);", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "public void setPlayer(int play)\n {\n this.player=play;\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}", "public void setP2(Player p2) {\n this.p2 = p2;\n }", "@Override\r\n public void hallarPerimetro() {\r\n this.perimetro = this.ladoA*3;\r\n }", "@Override\r\n\tpublic void efectoPersonaje(Jugador uno) {\r\n\t\tthis.player = uno;\r\n\t\tSystem.out.println(\"Efecto\" + activado);\r\n\t\tif (activado) {\r\n\r\n\t\t\tactivarContador = true;\r\n\t\t\tSystem.out.println(\"EMPEZO CONTADOR\");\r\n\r\n\t\t\tif (player instanceof Verde) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR VERDE\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t} else if (player instanceof Morado) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR MORADO\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}", "public void setSecondTrustedPlayer(@Nullable AnimalTamer player);", "public void setPotion(int p) {\n setStat(p, potion);\n }", "public void setTransportista(int transportista){\n this.transportista = transportista;\n }", "public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}", "public void setStrat(boolean player, int strat){\n\tif (player){\n\t p1.loadStrat(strat);\n\t}\n\tp2.loadStrat(strat);\n }", "private void setCurrentTurnpike(Point t){\n\t\t\n\t\t_currentTurnpikeStart = t;\n\t\n\t}", "@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "public void setCurrent(ServerPlayer p) {\n\t\tthis.current = p;\n\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "private void transferCommunalPile() {\n this.roundWinner.addToDeck(communalPile);\n communalPile = new Pile();\n }", "public void setUnit(Unit newUnit){\r\n tacUnit = newUnit;\r\n }", "protected void setFirstPlayer(TennisPlayer tennisPlayer) {\r\n this.firstPlayer = tennisPlayer;\r\n }", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "@Override\r\n\tpublic void setTheOwner(Player owner) {\n\t\t\r\n\t}", "public void setPed(int value) {\n this.ped = value;\n }", "public void setSpawned() {\n spawned = 1;\n setChanged();\n notifyObservers(1);\n }", "@Override\n\tpublic void attiva(Player player) {\n\n\t}", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public static void setPedido(Pedido pPedido){\n\t\tmiPedido = pPedido;\n\t}", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void spitIntakeCargo(){\n shoot.set(SPIT_INTAKE);\n }", "protected void setSecondPlayer(TennisPlayer tennisPlayer) {\r\n this.secondPlayer = tennisPlayer;\r\n }", "public void setP2(ServerPlayer p2) {\r\n\t\tthis.p2 = p2;\r\n\t}", "public void trap(Player player) {\n this.velocity = Vector3.Zero;\n this.owner = player;\n }", "public void setPiece(Piece p) {\n\tpiece = p;\n }", "public void setPosition(Position p);", "public void setOpponent(Player p) {\n\t\tthis.opponent = p;\n\t}", "public void setPiece(Tetrimino piece)\n {\n this.piece = piece;\n }", "@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }", "public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}", "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}", "void setPosition(Tile t);", "public void setPlayer(ViewerManager2 player) {\n this.player = player;\n // the player is needed to be existent befor starting up the remote Server\n //startRemoteServer();\n\n }", "public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }", "public void setAntagonistPlayer(Player antagonistPlayer) {\n this.antagonistPlayer = antagonistPlayer;\n startGame();\n }", "private void setPlayer() {\n player = Player.getInstance();\n }", "public void setValue(Player player, T value) {\n\t\tsetValue(player.getUniqueId(), value);\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public void setPiston(boolean x){\n armPiston.set(x);\n }", "void setPosition(Position p);", "public static void setPerson_to_play(int aPerson_to_play)\n {\n person_to_play = aPerson_to_play;\n }", "public void setPlayer(final AbstractGameObject player) {\n this.player = player;\n this.cameraHelper.setTarget(this.player);\n }", "public void setOppositePlayer(Player P){\n this.oppositePlayer = P;\n }", "public void setPuntos(int puntaje) {\n this.puntos = puntaje;\n }", "public abstract void setPeticion(\n\t\tco.com.telefonica.atiempo.ejb.eb.PeticionLocal aPeticion);", "public void setPlayerNumber(int num) {\n playerNum = num;\n }", "void playerPositionChanged(Player player);", "protected void setPosition(Position p) {\n\t\tposition = p;\n\t}", "void setVida(int vida)\n\t{\n\t\t// variable declarada anteriormente igual a la declarada en el set\n\t\tthis.vida = vida;\n\t}", "boolean setPlayer(String player);", "@Override\n\tpublic void modificada(Mao m, Participante p) {\n\t\t\n\t}", "@SuppressWarnings(\"deprecation\")\n\tpublic void player_move(Player p) {\n\t\tif (w.getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.PISTON_BASE) {\n\t\t\tp.setVelocity(new Vector(0, 0.75, 0));\n\t\t\tp.playSound(p.getLocation(), Sound.PISTON_EXTEND, 1, 1);\n\t\t} else \tif (w.getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.PISTON_STICKY_BASE) {\n\t\t\tp.setVelocity(new Vector(0, 0.75, 0));\n\t\t\tp.playSound(p.getLocation(), Sound.PISTON_EXTEND, 1, 1);\n\t\t} else if (w.getBlockAt(p.getLocation()).getType() == Material.CARPET) {\n\t\t\tBlock b = w.getBlockAt(p.getLocation());\n\t\t\tsynchronized (timers) {\n\t\t\t\ttimers.put(b.getData(), 6);\n\t\t\t}\n\t\t\tgameTick();\n\t\t}\n\t}", "public void setControllable(Rowdy player) {\r\n\t\tthis.player = player;\r\n\t}", "public void setoPlayer(Player oPlayer) {\n\t\tthis.oPlayer = oPlayer;\n\t}", "public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}", "public void transferPatty(Patty p)\r\n {\r\n if (stillRunning)\r\n {\r\n // stop cooking it\r\n p.cooking = false;\r\n p.draggable = false;\r\n \r\n // change the img to a 150x15 rectangle of the right color (side view)\r\n GreenfootImage newPattyImage = new GreenfootImage(150, 15);\r\n newPattyImage.setColor(pickPattyColor(p));\r\n newPattyImage.fillRect(0, 0, 150, 15);\r\n p.setImage(newPattyImage);\r\n \r\n // put it in the right place\r\n p.setLocation(prepTable.burger.getX(), prepTable.burger.getY());\r\n \r\n // remove it from the grill\r\n grill.patties[p.index] = null;\r\n \r\n // put it on the table\r\n prepTable.burger.patty = p;\r\n }\r\n }", "public void setAnio(int p) { this.anio = p; }", "public void setOnline(int pos){\n }", "public void setPos(Punto pos) {\n\t\tthis.pos = pos;\n\t}", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public void modifier(Etudiant t) {\n\t\tdao.modifier(t);\r\n\t}", "@Override\n public boolean use(Player p) {\n // Increase energy cap.\n p.setEnergyCap(p.getEnergyCap() + ENERGY_CAP_INCREASE);\n \n if (p.getEnergyCap() > ENERGY_RESTORE + p.getEnergy()) {\n // Replenish energy.\n p.setEnergy(ENERGY_RESTORE + p.getEnergy());\n\n // Otherwise set energy to max of capacity.\n } else {\n p.setEnergy(p.getEnergyCap());\n }\n return true;\n }", "void setMover(Mover mover);" ]
[ "0.7300903", "0.7035023", "0.6673602", "0.6655566", "0.65744066", "0.6535357", "0.64839196", "0.6379298", "0.6326822", "0.6315619", "0.63040495", "0.6297912", "0.6295042", "0.62814903", "0.62264854", "0.61813545", "0.6172205", "0.6153691", "0.61495215", "0.6137422", "0.61339444", "0.6132982", "0.6126733", "0.6126145", "0.6111041", "0.61016226", "0.61000276", "0.60992616", "0.60876733", "0.6087147", "0.6043075", "0.6014731", "0.6013458", "0.59732306", "0.59647775", "0.595469", "0.59384966", "0.5933739", "0.59326327", "0.59255385", "0.5921431", "0.5908932", "0.59088206", "0.58871126", "0.58842885", "0.5882648", "0.58767784", "0.58630484", "0.58594745", "0.5847205", "0.58471465", "0.5838635", "0.58233106", "0.5822756", "0.58006597", "0.57989764", "0.5797486", "0.57958686", "0.5794053", "0.5791522", "0.57708955", "0.57700425", "0.576724", "0.5757397", "0.57088506", "0.57082564", "0.5708101", "0.5704091", "0.56999046", "0.5697511", "0.5690898", "0.56882995", "0.5682319", "0.5681163", "0.5679262", "0.56772125", "0.5676733", "0.56735903", "0.56652904", "0.5657531", "0.56539106", "0.56475794", "0.56456906", "0.5623101", "0.56194514", "0.56154376", "0.5611462", "0.5608867", "0.56074625", "0.5605906", "0.5605517", "0.55872643", "0.5582215", "0.5566695", "0.5558664", "0.55566067", "0.5555098", "0.5550677", "0.55475765", "0.55374765", "0.5533992" ]
0.0
-1
getter permettant de connaitre la localisation du player
public Room getLocalisation(){return this.aLocalisation;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPlayer();", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public String getPlayer() {\r\n return player;\r\n }", "Player getPlayer();", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public String getPlayer() {\n return p;\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "public Player getPlayer();", "public Player getPlayer();", "public static String getLocale(Player player)\n {\n Object ep = null;\n try\n {\n ep = getMethod(\"getHandle\", player.getClass()).invoke(player, (Object[]) null);\n }\n catch (IllegalAccessException | IllegalArgumentException| InvocationTargetException e)\n {\n e.printStackTrace();\n }\n Field f = null;\n try\n {\n f = ep.getClass().getDeclaredField(\"locale\");\n }\n catch (NoSuchFieldException | SecurityException e)\n {\n e.printStackTrace();\n }\n f.setAccessible(true);\n String language = null;\n try\n {\n language = (String) f.get(ep);\n }\n catch (IllegalArgumentException | IllegalAccessException e)\n {\n e.printStackTrace();\n }\n return language;\n }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "String getPlayerName();", "public String getLoadPlayerType1(){\n return m_LoadPlayerType1;\n }", "protected Player getPlayer() { return player; }", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "public String getPlayerName(){\n return this.playerName;\n\n }", "public String getPlayerName() {\n \treturn playername;\n }", "Player currentPlayer();", "public String getPlayerName() {\n return name; \n }", "public Player getPlayer() { return player;}", "public String getLoadPlayerType2(){\n return m_LoadPlayerType2;\n }", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "public Player getPlayer() { return player; }", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "public String getOtherPlayer() {\n return otherPlayer;\n }", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "Location getPlayerLocation();", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "public Player getPlayer() {\r\n return player;\r\n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public Player getPlayer() {\n return player;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "String player1GetName(){\n return player1;\n }", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public Player getPlayer(){\r\n return player;\r\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "String getName(){\n\t\treturn playerName;\n\t}", "String player2GetName(){\n return player2;\n }", "public Player getPlayer() {\n return player;\n }", "public int getCurrentPlayer() {\n return player;\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public Player getPlayer1(){\n return jugador1;\n }", "public String getPlayerName() {\n return this.playerName;\n }", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "String getLocalization();", "private void setPlayer() {\n player = Player.getInstance();\n }", "private String GetPlayerString_UI()\n {\n String ret = GetPlayerString_UI(mPositionComboBox.getSelectedItem().toString());\n return ret;\n }", "String getName() {\n return getStringStat(playerName);\n }", "public UUID getPlayerUuid() { return uuid; }", "public static Player getArtist(){return artist;}", "public Player getPlayer() {\n return p;\n }", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "@Nonnull\n Location getPlayerLocation();", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public static String getOtherPlayer(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n return prefs.getString(\"OtherPlayer\", \"nothing\");\n }", "public Player getPlayer2(){\n return jugador2;\n }", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public int getPlayer()\n {\n return this.player;\n }", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public void initPlayer();", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public String getLocalString() {\r\n return localizedString;\r\n }", "public String getLocal() {\n\t\treturn this.local;\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "public String getPlayerName2(){\n\t\treturn playerName2;\n\t}", "public java.lang.String getPlayImage() {\n return localPlayImage;\n }", "private String getFirstPlayer() {\n\t\treturn firstPlayer;\n\t}", "public String getPlayerID() {\n return playerID;\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public PlayerTypes getPlayerType();", "PlayerState getPlayerState() {\n return playerState;\n }", "public void loadCurrentPlayer() {\n\t\tScanner sc;\n\t\tFile file = new File(\"data/current_player\");\n\t\tif(file.exists()) {\n\t\t\ttry {\n\t\t\t\tsc = new Scanner(new File(\"data/current_player\"));\n\t\t\t\tif(sc.hasNextLine()) {\n\t\t\t\t\tString player = sc.nextLine();\n\t\t\t\t\t_currentPlayer= player;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_currentPlayer = null;\n\t\t\t\t}\n\t\t\t} catch (FileNotFoundException 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\telse {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\t\t_currentPlayer = null;\n\t\t}\n\t}", "public PlayerData getPlayerData() {\n return player;\n }", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "public String getServerLocale(){\n return this.serverLocale;\n }", "public PlayerProfile getPlayer(P player){\n\n if(playerMap.containsKey(player)){\n //Player is safe to send\n return playerMap.get(player);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s data, but it's not available\");\n return null;\n }\n }", "java.lang.String getPlayerId();", "@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "Player getSelectedPlayer();", "public String getPlayerType() {\r\n return playerType;\r\n\t}", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "@Override\n public final void initialize(final URL url,\n final ResourceBundle resourceb) {\n final Player player = GameContext.instance().getPlayer();\n nameLabel.setText(player.getName());\n pilotLabel.setText(Integer.toString(player.getPilotLevel()));\n fighterLabel.setText(Integer.toString(player.getFighterLevel()));\n traderLabel.setText(Integer.toString(player.getTraderLevel()));\n engineerLabel.setText(Integer.toString(player.getEngineerLevel()));\n investorLabel.setText(Integer.toString(player.getInvestorLevel()));\n }", "public final Player getPlayer() {\n return player;\n }", "public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}", "Player getDormantPlayer();", "boolean InitialisePlayer (String path_name);", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}" ]
[ "0.7183292", "0.692079", "0.692079", "0.6836798", "0.6645082", "0.6640085", "0.6622904", "0.6612598", "0.64578116", "0.64578116", "0.64521754", "0.6429105", "0.6427511", "0.6387723", "0.6381069", "0.63356084", "0.6321966", "0.6304819", "0.6244622", "0.62340313", "0.6219719", "0.62123454", "0.62122685", "0.620036", "0.6194354", "0.6172421", "0.61606604", "0.6152525", "0.6147763", "0.61442214", "0.6140015", "0.6103542", "0.610043", "0.610043", "0.61000615", "0.6098875", "0.60934055", "0.60705674", "0.60705674", "0.60705674", "0.60705674", "0.60705674", "0.6057182", "0.6055921", "0.6052937", "0.6034351", "0.6032215", "0.60307795", "0.60296375", "0.6018001", "0.6003781", "0.6001078", "0.5992578", "0.5980908", "0.59740716", "0.5962626", "0.59583294", "0.5949699", "0.5945522", "0.59333646", "0.5927954", "0.5925609", "0.5924221", "0.59177387", "0.59124565", "0.590488", "0.5899689", "0.5899083", "0.5895408", "0.58745927", "0.58727527", "0.58721215", "0.58670586", "0.58610815", "0.58547455", "0.5840972", "0.5838358", "0.58256805", "0.5817556", "0.58137256", "0.5811984", "0.580985", "0.580009", "0.5787061", "0.5779744", "0.5771829", "0.5767125", "0.5766375", "0.57652736", "0.57602906", "0.5750874", "0.5750035", "0.573629", "0.57335144", "0.57316226", "0.5727932", "0.5722017", "0.5720789", "0.57124543", "0.57027817" ]
0.6489944
8
setter permattant de modifier la Room dans laquel le player ce trouve
public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public void setCurrentRoom(Room newRoom) {\n playerRoom = newRoom;\n }", "public void setRoom(Room room) {\n currentRoom = room;\n }", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "public void setCurrentRoom(Room setRoom)\n {\n currentRoom = setRoom;\n }", "void setRoom(int inRoom) {\n \t\tgraphics.setRoom(inRoom);\n \t}", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "public void updateRoom(Room room);", "public synchronized void setRoom(String room) {\n this.room = room;\n }", "public void setRoom(Room room) {\n this.selectedRoom = room;\n }", "public void setRoom(java.lang.CharSequence value) {\n this.room = value;\n }", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void setPlayer(Player p){\r\n playerModel=p; \r\n jEnemigoDatos.setText(p.getEnemy().getName());\r\n /*if(p.getBadConsequence()==null)\r\n jMalRolloDatos.setText(\"No\");\r\n else\r\n jMalRolloDatos.setText(\"Si\");*/\r\n if(p.isDead())\r\n jMuertoDatos.setText(\"Si\");\r\n else\r\n jMuertoDatos.setText(\"No\");\r\n \r\n jNivelDatos.setText(p.getLevels()+\"\");\r\n jCombatLevelDatos.setText(p.getCombatLevel()+\"\");\r\n jNombreDatos.setText(p.getName());\r\n if(p.canISteal())\r\n jRobarDatos.setText(\"Si\");\r\n else\r\n jRobarDatos.setText(\"No\");\r\n \r\n jNSectDatos.setText(Integer.toString(CultistPlayer.getTotalCultistPlayer()));\r\n \r\n if(playerModel.getClass() == CultistPlayer.class){\r\n jSectarioDatos.setText(\"Si\");\r\n //String text=(CultistPlayer)playerModel.getMyCultist().getGainedLevels()+\"\";\r\n //jSectarioDatos.setText(\"\"+(CultistPlayer)playerModel.getGainedLevels());\r\n \r\n }else\r\n jSectarioDatos.setText(\"No\");\r\n \r\n /*if(playerModel.getBadConsequence().isEmpty())\r\n pendingBadView1.setVisiblePending(false);\r\n else*/\r\n pendingBadView1.setVisiblePending(true);\r\n pendingBadView1.limpiar();\r\n \r\n // A continuación se actualizan sus tesoros \r\n fillTreasurePanel (jpVisibles, playerModel.getVisibleTreasures()); \r\n fillTreasurePanel (jpOcultos, playerModel.getHiddenTreasures()); \r\n btRobar.setEnabled(playerModel.canISteal());\r\n manejarBotones(true);\r\n repaint(); \r\n revalidate();\r\n }", "public void setRoom(String room) {\n\t\tthis.room = room;\n\t}", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setRmTable(Rooms value);", "void setCurrentRoom(boolean b) throws IOException {\n currentRoom = b;\n\n if (currentRoom) {\n currentRoomLoop();\n }\n }", "public void setCurrentRoom(Room room)\n {\n addRoomHistory(currentRoom); //this adds room to history log before changing currentRoom\n currentRoom = room; //changes the currentRoom to the new room player enters\n }", "public void setPlayer(SuperMario mario){\r\n this.mario = mario;\r\n }", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void setRoomID(int value) {\n this.roomID = value;\n }", "private void setRoomId(long value) {\n \n roomId_ = value;\n }", "public void setGame() {\n }", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public export.serializers.avro.DeviceInfo.Builder setRoom(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.room = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public void setOwner(Player player) {\n owner = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void moveToRoom(Rooms room) {\n this.currentRoom = room;\n }", "public void setRoom(String room) {\r\n this.room = room == null ? null : room.trim();\r\n }", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "public void setRoom(Room room) {\n int roomNumber = room.getRoomNumber();\n if (room.getRoomNumber() > internalList.size()) {\n setRoomForRoomNumberLessThanNumberOfRooms(room);\n } else {\n setRoomForRoomNumberMoreThanNumberOfRooms(room);\n }\n }", "public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}", "public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}", "public void setRoomid(Integer newVal) {\n if ((newVal != null && this.roomid != null && (newVal.compareTo(this.roomid) == 0)) || \n (newVal == null && this.roomid == null && roomid_is_initialized)) {\n return; \n } \n this.roomid = newVal; \n roomid_is_modified = true; \n roomid_is_initialized = true; \n }", "void setRoomId(String roomId);", "public void setRoomId(int value) {\n this.roomId = value;\n }", "void update(Room room);", "public int getRoom(){\n\t\treturn room;\n\t}", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "void setPlayerId(int playerId);", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}", "public ViewRoom(Room r) {\n initComponents();\n this.room = r;\n this.workoutNum = 0;\n updateRoom();\n \n }", "public void setPlayerPosition(Player player) {\n if (player.getPositionX() < 0 && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //left exit to right entry\n player.position.x = screenWidth - wallSize - player.getRadius();\n player.position.y = player.getPositionY();\n } else if ((player.getPositionX() > screenWidth / 2 - doorSize && player.getPositionX() < screenWidth / 2 + doorSize) && player.getPositionY() < 0) {\n //top exit to bottom entry\n player.position.x = player.getPositionX();\n player.position.y = screenHeight - wallSize - player.getRadius();\n } else if (player.getPositionX() > screenWidth && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //right exit to left entry\n player.position.x = wallSize + player.getRadius();\n player.position.y = player.getPositionY();\n } else {\n //bottom exit to top entry\n player.position.x = player.getPositionX();\n player.position.y = wallSize + player.getRadius();\n }\n }", "public Room getRoom()\r\n {\r\n return room;\r\n }", "public void setBuildingRoom(Room buildingRoom) {\n this.buildingRoom = buildingRoom;\n }", "public Player(){\n\t\tthis.cell = 0;\n\t}", "public Room() {\n\t\twall=\"\";\n\t\tfloor=\"\";\n\t\twindows=0;\n\t}", "public Room getRoom()\n {\n return currentRoom;\n }", "public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}", "void setAsRoom(MasarData gameData){\n gameData.getGameContainer().getInput().removeAllListeners();\n\n if(this.roomType == GAMEROOM){\n for(MasarSystem system: this.gameData.getSystemList()){\n this.clickManager.addClickable(new SystemClickable(system, this.gameData));\n }\n }\n if(this.clickManager != null){\n gameData.getGameContainer().getInput().addMouseListener(clickManager);\n }\n\n this.gameData.setCurrentRoom(this);\n }", "public void setSpace(int position, Box player){\r\n\t\tboard[position - 1] = player;\r\n\t\t\r\n\t}", "public void changeActiveMonster(){\n //todo\n }", "public void setUserLocation(Room setRoom)\n {\n\n // Gets each person from the characters' array list.\n for(Person person: characters){\n\n // Check if found the player.\n if(person.getName().equals(PLAYER)){\n\n // sets the location of the player to the specifed room.\n person.setLocation(setRoom);\n }\n }\n }", "private void setPlayer() {\n player = Player.getInstance();\n }", "public void setId(int newId) {\n roomId = newId;\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}", "public void setRoomid(int newVal) {\n setRoomid(new Integer(newVal));\n }", "public final void setRoom(java.lang.String room)\r\n\t{\r\n\t\tsetRoom(getContext(), room);\r\n\t}", "public Room getRoom(){\n\t\treturn this.room;\n\t}", "public void setRoomID(byte id)\r\n\t {\r\n\t this.id = id;\r\n\t }", "public void setPosition(Position pos);", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void setUnit(Unit newUnit){\r\n tacUnit = newUnit;\r\n }", "public void setPosition(Position p);", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "public void setRoomstid(Long newVal) {\n if ((newVal != null && this.roomstid != null && (newVal.compareTo(this.roomstid) == 0)) || \n (newVal == null && this.roomstid == null && roomstid_is_initialized)) {\n return; \n } \n this.roomstid = newVal; \n roomstid_is_modified = true; \n roomstid_is_initialized = true; \n }", "@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }", "public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }", "public Room getRoom() {\n return currentRoom;\n }", "public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}", "public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }", "public void setPlayer(int play)\n {\n this.player=play;\n }", "void setPosition(Position p);", "@Override\r\n\tpublic void efectoPersonaje(Jugador uno) {\r\n\t\tthis.player = uno;\r\n\t\tSystem.out.println(\"Efecto\" + activado);\r\n\t\tif (activado) {\r\n\r\n\t\t\tactivarContador = true;\r\n\t\t\tSystem.out.println(\"EMPEZO CONTADOR\");\r\n\r\n\t\t\tif (player instanceof Verde) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR VERDE\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t} else if (player instanceof Morado) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR MORADO\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Player()\n {\n inventory = new ArrayList<Item>();\n currentRoom=0;\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "void setPosition(Position position);", "void setPosition(Position position);", "public Room getStartRoom(){\n return startRoom;\n }", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "public void setRoom(int next)\n\t{\n\t\tiCurrentRoom = next;\n\t\t\n\t}", "public Mumie(Room room, Player p) {\r\n\t\tsuper(room, p);\r\n\t\tattackDamage = (-10);\r\n\t\tattackRange = 10;\r\n\t\tsenseRange = 70;\r\n\t\tspeed = 0.005f;\r\n\t\tcurrentRoom = room;\r\n\t\tplayer = p;\r\n\t\tmonsterSpecificCooldown = 1000;\r\n\t\tmonsterSpecificValue = 750;\r\n\t}", "boolean setPlayer(String player);", "public abstract void setPosition(Position position);", "@Override\r\n\tpublic void setTheOwner(Player owner) {\n\t\t\r\n\t}", "public Player(){\n reset();\n }", "public String getRoomLetter() {\n return oldRoomLetter;\n }", "public void setHost(Player roomHost) {\r\n this.roomHost = roomHost;\r\n }", "public String getRoom() {\r\n return room;\r\n }" ]
[ "0.8107048", "0.7120226", "0.69256735", "0.68664867", "0.6824983", "0.67722017", "0.66917664", "0.6631715", "0.66261625", "0.6522823", "0.64409256", "0.64070946", "0.6352508", "0.6311116", "0.6308012", "0.62077105", "0.61185956", "0.61013454", "0.6065289", "0.60518736", "0.604863", "0.6045367", "0.6023992", "0.6022299", "0.60122395", "0.59893996", "0.59888655", "0.5984018", "0.59782034", "0.5974254", "0.5966533", "0.5965057", "0.5938626", "0.59287405", "0.59287", "0.59273565", "0.59187865", "0.589302", "0.58763546", "0.58665997", "0.58473885", "0.5819094", "0.58190507", "0.5816059", "0.58115286", "0.5804888", "0.5803714", "0.5792543", "0.5792379", "0.57834065", "0.5772322", "0.57571787", "0.5756583", "0.57543445", "0.5745125", "0.5741354", "0.571861", "0.57088494", "0.5704503", "0.5697396", "0.56851447", "0.5674002", "0.5668135", "0.56672937", "0.5662497", "0.56616664", "0.5659151", "0.56425154", "0.5640281", "0.5639264", "0.56355834", "0.563483", "0.56282127", "0.5622777", "0.5618551", "0.56153476", "0.5605209", "0.5605152", "0.5604928", "0.5595438", "0.5593582", "0.55863905", "0.55814373", "0.55801046", "0.55716103", "0.55652356", "0.556459", "0.55519485", "0.55519485", "0.5551364", "0.55445325", "0.5534228", "0.55322176", "0.55291003", "0.55250204", "0.552313", "0.5521717", "0.55173", "0.55148387", "0.5514422" ]
0.5664771
64
getter permettant de connaitre la precedente localisation du player
public Room getLastRoom(){return this.aLastRooms.pop();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPlayer();", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public String getPlayer() {\r\n return player;\r\n }", "Player getPlayer();", "public String getPlayer() {\n return p;\n }", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getPlayer();", "public Player getPlayer();", "public Room getLocalisation(){return this.aLocalisation;}", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "protected Player getPlayer() { return player; }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "public Player getPlayer() { return player;}", "String getPlayerName();", "Player currentPlayer();", "public Player getPlayer() { return player; }", "public String getPlayerName(){\n return this.playerName;\n\n }", "public String getPlayerName() {\n \treturn playername;\n }", "public String getLoadPlayerType1(){\n return m_LoadPlayerType1;\n }", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "public String getOtherPlayer() {\n return otherPlayer;\n }", "public Player getPlayer() {\r\n return player;\r\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public Player getPlayer(){\r\n return player;\r\n }", "public Player getPlayer1(){\n return jugador1;\n }", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "Location getPlayerLocation();", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public int getCurrentPlayer() {\n return player;\n }", "public String getPlayerName() {\n return name; \n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public Player getPlayer() {\n return p;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "public int getPlayer()\n {\n return this.player;\n }", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public String getLoadPlayerType2(){\n return m_LoadPlayerType2;\n }", "public Player getPlayer2(){\n return jugador2;\n }", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "public PlayerProfile getPlayer(P player){\n\n if(playerMap.containsKey(player)){\n //Player is safe to send\n return playerMap.get(player);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s data, but it's not available\");\n return null;\n }\n }", "public static String getLocale(Player player)\n {\n Object ep = null;\n try\n {\n ep = getMethod(\"getHandle\", player.getClass()).invoke(player, (Object[]) null);\n }\n catch (IllegalAccessException | IllegalArgumentException| InvocationTargetException e)\n {\n e.printStackTrace();\n }\n Field f = null;\n try\n {\n f = ep.getClass().getDeclaredField(\"locale\");\n }\n catch (NoSuchFieldException | SecurityException e)\n {\n e.printStackTrace();\n }\n f.setAccessible(true);\n String language = null;\n try\n {\n language = (String) f.get(ep);\n }\n catch (IllegalArgumentException | IllegalAccessException e)\n {\n e.printStackTrace();\n }\n return language;\n }", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "String player1GetName(){\n return player1;\n }", "public String getLocal() {\n\t\treturn this.local;\n\t}", "public UUID getPlayerUuid() { return uuid; }", "@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }", "String player2GetName(){\n return player2;\n }", "public String getPlayerName() {\n return this.playerName;\n }", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "String getName(){\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "private void setPlayer() {\n player = Player.getInstance();\n }", "public static String getOtherPlayer(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n return prefs.getString(\"OtherPlayer\", \"nothing\");\n }", "private String getFirstPlayer() {\n\t\treturn firstPlayer;\n\t}", "String getName() {\n return getStringStat(playerName);\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "@Nonnull\n Location getPlayerLocation();", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }", "int getPlayerLocation(Player p) {\n\t\t\treturn playerLocationRepo.get(p);\n\t\t}", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}", "public String getPlayerID() {\n return playerID;\n }", "public String getPlayerName2(){\n\t\treturn playerName2;\n\t}", "Player getSelectedPlayer();", "public PlayerData getPlayerData() {\n return player;\n }", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "java.lang.String getPlayerId();", "public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}", "protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public static Player getArtist(){return artist;}", "Player getDormantPlayer();", "PlayerState getPlayerState() {\n return playerState;\n }", "public Player getPlayer() {\n return humanPlayer;\n }", "public Player getPlayer() {\n\t\treturn p;\n\t}", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "BPlayer getPlayer(Player player);", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}", "public final Player getPlayer() {\n return player;\n }", "private String GetPlayerString_UI()\n {\n String ret = GetPlayerString_UI(mPositionComboBox.getSelectedItem().toString());\n return ret;\n }" ]
[ "0.71383584", "0.6959551", "0.6959551", "0.6815839", "0.6704125", "0.66883343", "0.65594", "0.65556", "0.65556", "0.6532347", "0.6477366", "0.64442444", "0.6386986", "0.6368826", "0.633201", "0.6324206", "0.63151205", "0.6313455", "0.63063747", "0.6293248", "0.62919873", "0.6290838", "0.6283375", "0.62561786", "0.6253492", "0.6248594", "0.62331295", "0.62318414", "0.62296104", "0.6211972", "0.62026435", "0.6199886", "0.6182069", "0.6182069", "0.6182069", "0.6182069", "0.6182069", "0.61676866", "0.61549085", "0.6152337", "0.6137532", "0.6136291", "0.6126991", "0.6118801", "0.6117343", "0.6114132", "0.6106131", "0.61053616", "0.607303", "0.60646576", "0.60607207", "0.60304976", "0.60304976", "0.60222155", "0.6009693", "0.59950703", "0.5986151", "0.5976422", "0.59506965", "0.5950109", "0.5926582", "0.5926441", "0.5907388", "0.590431", "0.5889393", "0.58833885", "0.58803606", "0.58800024", "0.5879112", "0.58777285", "0.5876097", "0.5872702", "0.5869667", "0.5859597", "0.5857737", "0.5853615", "0.5848381", "0.5847893", "0.583596", "0.5834317", "0.58312136", "0.5827644", "0.58246446", "0.5823181", "0.5822671", "0.58214384", "0.5818549", "0.5818248", "0.58131284", "0.5805835", "0.58057034", "0.5803832", "0.5803832", "0.5803832", "0.5803832", "0.5803832", "0.5803832", "0.5803832", "0.579726", "0.5795923", "0.57832015" ]
0.0
-1
setter permattant de modifier le Room precedante ou ce trouver le player en l'ajoutant a la pile des Room precedante
public void setLastRoom(final Room pLastRoom){this.aLastRooms.push(pLastRoom);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void setPlayer(Player p){\r\n playerModel=p; \r\n jEnemigoDatos.setText(p.getEnemy().getName());\r\n /*if(p.getBadConsequence()==null)\r\n jMalRolloDatos.setText(\"No\");\r\n else\r\n jMalRolloDatos.setText(\"Si\");*/\r\n if(p.isDead())\r\n jMuertoDatos.setText(\"Si\");\r\n else\r\n jMuertoDatos.setText(\"No\");\r\n \r\n jNivelDatos.setText(p.getLevels()+\"\");\r\n jCombatLevelDatos.setText(p.getCombatLevel()+\"\");\r\n jNombreDatos.setText(p.getName());\r\n if(p.canISteal())\r\n jRobarDatos.setText(\"Si\");\r\n else\r\n jRobarDatos.setText(\"No\");\r\n \r\n jNSectDatos.setText(Integer.toString(CultistPlayer.getTotalCultistPlayer()));\r\n \r\n if(playerModel.getClass() == CultistPlayer.class){\r\n jSectarioDatos.setText(\"Si\");\r\n //String text=(CultistPlayer)playerModel.getMyCultist().getGainedLevels()+\"\";\r\n //jSectarioDatos.setText(\"\"+(CultistPlayer)playerModel.getGainedLevels());\r\n \r\n }else\r\n jSectarioDatos.setText(\"No\");\r\n \r\n /*if(playerModel.getBadConsequence().isEmpty())\r\n pendingBadView1.setVisiblePending(false);\r\n else*/\r\n pendingBadView1.setVisiblePending(true);\r\n pendingBadView1.limpiar();\r\n \r\n // A continuación se actualizan sus tesoros \r\n fillTreasurePanel (jpVisibles, playerModel.getVisibleTreasures()); \r\n fillTreasurePanel (jpOcultos, playerModel.getHiddenTreasures()); \r\n btRobar.setEnabled(playerModel.canISteal());\r\n manejarBotones(true);\r\n repaint(); \r\n revalidate();\r\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "public void setCurrentRoom(Room newRoom) {\n playerRoom = newRoom;\n }", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void setGame() {\n }", "public void setPlayer(SuperMario mario){\r\n this.mario = mario;\r\n }", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public void setOwner(Player player) {\n owner = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }", "public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}", "public void setCurrentRoom(Room setRoom)\n {\n currentRoom = setRoom;\n }", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "public void setRoom(Room room) {\n currentRoom = room;\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public void setPlayerPosition(Player player) {\n if (player.getPositionX() < 0 && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //left exit to right entry\n player.position.x = screenWidth - wallSize - player.getRadius();\n player.position.y = player.getPositionY();\n } else if ((player.getPositionX() > screenWidth / 2 - doorSize && player.getPositionX() < screenWidth / 2 + doorSize) && player.getPositionY() < 0) {\n //top exit to bottom entry\n player.position.x = player.getPositionX();\n player.position.y = screenHeight - wallSize - player.getRadius();\n } else if (player.getPositionX() > screenWidth && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //right exit to left entry\n player.position.x = wallSize + player.getRadius();\n player.position.y = player.getPositionY();\n } else {\n //bottom exit to top entry\n player.position.x = player.getPositionX();\n player.position.y = wallSize + player.getRadius();\n }\n }", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "private void setJail(Player currentPlayer){\n currentPlayer.setCurrentPosition(10);\n currentPlayer.setJail(true);\n }", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "void setRoom(int inRoom) {\n \t\tgraphics.setRoom(inRoom);\n \t}", "@Override\r\n\tpublic void efectoPersonaje(Jugador uno) {\r\n\t\tthis.player = uno;\r\n\t\tSystem.out.println(\"Efecto\" + activado);\r\n\t\tif (activado) {\r\n\r\n\t\t\tactivarContador = true;\r\n\t\t\tSystem.out.println(\"EMPEZO CONTADOR\");\r\n\r\n\t\t\tif (player instanceof Verde) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR VERDE\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t} else if (player instanceof Morado) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR MORADO\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setOnline(int pos){\n }", "public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "private void setPlayer() {\n player = Player.getInstance();\n }", "public void defender(){setModopelea(1);}", "public void setPlayer(ViewerManager2 player) {\n this.player = player;\n // the player is needed to be existent befor starting up the remote Server\n //startRemoteServer();\n\n }", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void setPlayer(int play)\n {\n this.player=play;\n }", "protected void setMove(int _move)\t\t{\tmove = _move;\t\t}", "public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}", "void setPlayerId(int playerId);", "public void modifier(){\r\n try {\r\n //affectation des valeur \r\n echeance_etudiant.setIdEcheanceEtu(getViewEtudiantInscripEcheance().getIdEcheanceEtu()); \r\n \r\n echeance_etudiant.setAnneeaca(getViewEtudiantInscripEcheance().getAnneeaca());\r\n echeance_etudiant.setNumetu(getViewEtudiantInscripEcheance().getNumetu());\r\n echeance_etudiant.setMatricule(getViewEtudiantInscripEcheance().getMatricule());\r\n echeance_etudiant.setCodeCycle(getViewEtudiantInscripEcheance().getCodeCycle());\r\n echeance_etudiant.setCodeNiveau(getViewEtudiantInscripEcheance().getCodeNiveau());\r\n echeance_etudiant.setCodeClasse(getViewEtudiantInscripEcheance().getCodeClasse());\r\n echeance_etudiant.setCodeRegime(getViewEtudiantInscripEcheance().getCodeRegime());\r\n echeance_etudiant.setDrtinscri(getViewEtudiantInscripEcheance().getInscriptionAPaye());\r\n echeance_etudiant.setDrtforma(getViewEtudiantInscripEcheance().getFormationAPaye()); \r\n \r\n echeance_etudiant.setVers1(getViewEtudiantInscripEcheance().getVers1());\r\n echeance_etudiant.setVers2(getViewEtudiantInscripEcheance().getVers2());\r\n echeance_etudiant.setVers3(getViewEtudiantInscripEcheance().getVers3());\r\n echeance_etudiant.setVers4(getViewEtudiantInscripEcheance().getVers4());\r\n echeance_etudiant.setVers5(getViewEtudiantInscripEcheance().getVers5());\r\n echeance_etudiant.setVers6(getViewEtudiantInscripEcheance().getVers6()); \r\n \r\n //modification de l'utilisateur\r\n echeance_etudiantFacadeL.edit(echeance_etudiant); \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur de modification capturée : \"+e);\r\n } \r\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }", "void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}", "@Override\n public void setPlayerDoneEliminating(Player player, boolean value) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneEliminating\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneEliminating\");\n }\n\n }", "public void setP1(Player p1) {\n this.p1 = p1;\n }", "public PlayerSet getPlayer(){\n return definedOn;\n }", "public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}", "public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}", "public void setPlayerGrid(){\n\t\tplayerGrid = new Grid(true);\n\t\tsetShips(playerGrid,playerBattleShipsList,0);//2\n\t}", "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 static void setScoreBoard(Player p) {\n\t\n}", "public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}", "public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }", "@Override\r\n\tpublic void setTheOwner(Player owner) {\n\t\t\r\n\t}", "public void updatePlayerLocation() {requires new property on gamestate object\n //\n }", "private void setCommand(String cr, String player) {\n try {\n int c = _board.col(cr);\n int r = _board.row(cr);\n Piece p = Piece.setValueOf(player);\n _board.set(c, r, p, p.opposite());\n } catch (IllegalArgumentException excp) {\n error(\"Invalid arguments to set: %s, %s\", cr, player);\n System.out.println();\n }\n }", "public void setPapeles(int avenida, int calle, int cant);", "public Player getPlayer1(){\n return jugador1;\n }", "@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }", "boolean setPlayer(String player);", "private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }", "public void setPlayer1Name(String name){\n player1 = name;\n }", "public Player(){\n\t\tthis.cell = 0;\n\t}", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void setOffline(int pos){\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "public void turnoUsuario(){\r\n System.out.println(\"Turno: \"+ entrenador1.getNombre());\r\n if(evaluarAccion(this.pokemon_activo1, this.pokemon_activo2).equals(\"Cambiar\")){\r\n System.out.println(\"Usuario eligio Cambiar Pokemon\");\r\n pokemon_activo1.setConfuso(false);\r\n pokemon_activo1.setDormido(false);\r\n if(getEquipo1()[0].getDebilitado() == false && getEquipo1()[0]!=pokemon_activo1){\r\n pokemon_activo1 = getEquipo1()[0]; \r\n }\r\n else if(getEquipo1()[1].getDebilitado() == false && getEquipo1()[1]!=pokemon_activo1){\r\n pokemon_activo1 = getEquipo1()[1]; \r\n }\r\n else if(getEquipo1()[2].getDebilitado() == false && getEquipo1()[2]!=pokemon_activo1){\r\n pokemon_activo1 = getEquipo1()[2]; \r\n }\r\n else if(getEquipo1()[3].getDebilitado() == false && getEquipo1()[3]!=pokemon_activo1){\r\n pokemon_activo1 = getEquipo1()[3]; \r\n }\r\n else if(getEquipo1()[4].getDebilitado() == false && getEquipo1()[4]!=pokemon_activo1){\r\n pokemon_activo1 = getEquipo1()[4]; \r\n }\r\n else if(getEquipo1()[5].getDebilitado() == false && getEquipo1()[5]!=pokemon_activo1){\r\n pokemon_activo1 = getEquipo1()[5]; \r\n }\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n setLabelEstados(0);\r\n setLabelEstados(1);\r\n this.turno = 1;\r\n }\r\n else if(evaluarAccion(this.pokemon_activo1, this.pokemon_activo2).equals(\"Atacar\")){\r\n System.out.println(\"Usuario eligio Atacar\");\r\n inflingirDaño(pokemon_activo1.getMovimientos()[(int)(Math.random()*4)], pokemon_activo2, pokemon_activo1);\r\n if(pokemon_activo2.getVida_restante() <= 0){\r\n pokemon_activo2.setVida_restante(0);\r\n pokemon_activo2.setDebilitado(true);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador1.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n System.out.println(equipo1[0].getVida_restante()+ \" \"+equipo1[1].getVida_restante()+ \" \"+equipo1[2].getVida_restante()+ \" \"+equipo1[3].getVida_restante()+ \" \"+equipo1[4].getVida_restante()+ \" \"+equipo1[5].getVida_restante());\r\n System.out.println(equipo2[0].getVida_restante()+ \" \"+equipo2[1].getVida_restante()+ \" \"+equipo2[2].getVida_restante()+ \" \"+equipo2[3].getVida_restante()+ \" \"+equipo2[4].getVida_restante()+ \" \"+equipo2[5].getVida_restante());\r\n JOptionPane.showMessageDialog(this.vc, equipo1[0].getVida_restante()+ \" \"+equipo1[1].getVida_restante()+ \" \"+equipo1[2].getVida_restante()+ \" \"+equipo1[3].getVida_restante()+ \" \"+equipo1[4].getVida_restante()+ \" \"+equipo1[5].getVida_restante()+\"\\n\"+ equipo2[0].getVida_restante()+ \" \"+equipo2[1].getVida_restante()+ \" \"+equipo2[2].getVida_restante()+ \" \"+equipo2[3].getVida_restante()+ \" \"+equipo2[4].getVida_restante()+ \" \"+equipo2[5].getVida_restante(), \"Estadisticas finales(vida)\", JOptionPane.INFORMATION_MESSAGE);\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador1);\r\n combate.setPerdedor(entrenador2);\r\n this.termino = true;\r\n }\r\n else if(getEquipo1()[0].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[0]; \r\n }\r\n else if(getEquipo1()[1].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[1]; \r\n }\r\n else if(getEquipo1()[2].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[2]; \r\n }\r\n else if(getEquipo1()[3].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[3]; \r\n }\r\n else if(getEquipo1()[4].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[4]; \r\n }\r\n else if(getEquipo1()[5].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[5]; \r\n } \r\n vc.setjL_nombrepokemon1(pokemon_activo2.getPseudonimo());\r\n vc.setjL_especie1(pokemon_activo2.getNombre_especie());\r\n }\r\n vc.setjL_especie2(pokemon_activo2.getNombre_especie());\r\n vc.setjL_nombrepokemon2(pokemon_activo2.getPseudonimo());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n setLabelEstados(0);\r\n setLabelEstados(1);\r\n this.turno = 1;\r\n }\r\n \r\n }", "public void setMovement(){\n\t\tfloat distance = GameManager.getInstance().getGameCamera().getWidth();\n\t\tfloat durationTime = distance/this.speed;\n\t\t\n\t\tmoveX = new MoveByModifier(durationTime, -(this.xInicial-this.xFinal), 0);\n\t\t\n\t\tthis.registerEntityModifier(moveX);\n\t}", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }", "public void updatePlayer() {\n if(this.hasCam) {\n this.camDir.set(cam.getDirection()).multLocal(0.3f);\n this.camLeft.set(cam.getLeft()).multLocal(0.2f);\n //initialize the walkDirection value so it can be recalculated\n walkDirection.set(0,0,0);\n if (this.left) {\n this.walkDirection.addLocal(this.camLeft);\n }\n if (this.right) {\n this.walkDirection.addLocal(this.camLeft.negate());\n }\n if (this.up) {\n this.walkDirection.addLocal(this.camDir);\n }\n if (this.down) {\n this.walkDirection.addLocal(this.camDir.negate());\n }\n this.mobControl.setWalkDirection(this.walkDirection);\n //player.get\n cam.setLocation(this.mobControl.getPhysicsLocation().add(0,1.5f,0));\n this.setRootPos(this.mobControl.getPhysicsLocation().add(0,-0.75f,0));\n this.setRootRot(this.camDir, this.camLeft);\n }\n // If the actor control does not have ownership of cam, do nothing\n }", "public void setMine()\n {\n mine = true;\n }", "public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }", "public void changeActiveMonster(){\n //todo\n }", "public void setPosition(Position p);", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "public void setInGame() {\n this.inGame = true;\n }", "public boolean setPlayerToMove(Player aNewPlayerToMove)\n {\n boolean wasSet = false;\n if (aNewPlayerToMove != null)\n {\n playerToMove = aNewPlayerToMove;\n wasSet = true;\n }\n return wasSet;\n }", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "private void transportPara() {\n int[] para = bottom_screen.transportPara();\n Attack_Menu.setHp_1(para[0]);\n Attack_Menu.setHp_2(para[1]);\n Attack_Menu.setDamage_1(para[2]);\n Attack_Menu.setDamage_2(para[3]);\n Attack_Menu.setHit_1(para[4]);\n Attack_Menu.setHit_2(para[5]);\n Attack_Menu.setCrit_1(para[6]);\n Attack_Menu.setCrit_2(para[7]);\n Attack_Menu.setTurn_1(para[8]);\n Attack_Menu.setTurn_2(para[9]);\n }", "public void setSpawned() {\n spawned = 1;\n setChanged();\n notifyObservers(1);\n }", "public Room getStartRoom(){\n return startRoom;\n }", "public void change_hero_pos() {\n\t\tif (labirinto.getLab()[heroi.getX_coord()][heroi.getY_coord()] == 'O')\n\t\t\theroi.setShielded(true);\n\t\tif (heroi.isArmado())\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'A');\n\t\telse\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'H');\n\t}", "private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}", "public void setMotivoLlamadoAtencion(MotivoLlamadoAtencion motivoLlamadoAtencion)\r\n/* 119: */ {\r\n/* 120:127 */ this.motivoLlamadoAtencion = motivoLlamadoAtencion;\r\n/* 121: */ }", "public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}", "public void setWon(){\n won = true;\n }", "public synchronized void setRoom(String room) {\n this.room = room;\n }", "private void setPlayerInformations() {\n\t\t\t\n\t\t\t\n\t\t}", "private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }", "public void setMove(int move){\n this.move = move;\n }", "public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}", "public void moverIzquierda() {\n estado = EstadosPersonaje.IZQUIERDA;\n mover(new Vector2(-1, 0));\n }", "@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }" ]
[ "0.7484507", "0.6844734", "0.661712", "0.64695364", "0.64130914", "0.63191247", "0.62611", "0.6229222", "0.6217014", "0.6181307", "0.60927963", "0.60915065", "0.60908836", "0.60384065", "0.6017711", "0.6016615", "0.6012553", "0.5982648", "0.59786874", "0.59642905", "0.5960063", "0.59343654", "0.5925957", "0.5923558", "0.58762085", "0.5867989", "0.58544236", "0.5839529", "0.5818805", "0.5810017", "0.58096915", "0.5800289", "0.58000255", "0.57948405", "0.5788564", "0.5764079", "0.5761844", "0.57599896", "0.57598525", "0.57559353", "0.5744471", "0.5739401", "0.5727295", "0.5725097", "0.5718658", "0.5710591", "0.5705957", "0.5702341", "0.5699753", "0.5691876", "0.56914383", "0.5690953", "0.56817204", "0.56641716", "0.566207", "0.5659705", "0.56593055", "0.5655203", "0.56536216", "0.5636678", "0.5626301", "0.5613498", "0.55908656", "0.55901355", "0.5583287", "0.55823606", "0.55803204", "0.5580196", "0.5577077", "0.555285", "0.5547218", "0.55465734", "0.55464256", "0.55344343", "0.5533117", "0.5514074", "0.55114037", "0.55032986", "0.55030525", "0.55025434", "0.54956347", "0.5491019", "0.5484044", "0.5481739", "0.5478918", "0.5477022", "0.5474695", "0.5471892", "0.5468863", "0.54662186", "0.5463652", "0.54626125", "0.5457155", "0.54528135", "0.5450599", "0.5446265", "0.5445115", "0.5444211", "0.54415137", "0.54352266", "0.5433346" ]
0.0
-1
Methode permetant de savoir si la liste des Room precedante est vide
public boolean lastRoomsIsEmpty(){return this.aLastRooms.empty();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void guardarCambios(View v){\n\n ArrayList<ENListaCompra> miL = DespenBD.getListasVisibles();\n ENListaCompra lCompra = miL.get(miL.size()-posicion-1);\n\n System.out.println(\"Posician: \"+posicion);\n System.out.println(\"Nombre: \"+lCompra.getNombre());\n\n DespenBD.editarLista(lCompra.getNombre(),lCompra.getFecha(),etNombre.getText().toString(), etFecha.getText().toString());\n //lCompra.setNombre();\n\n /* for (ENListaCompra lc: miL) {\n //misListas.add(0, new MisListas(\"\"+lc.getNombre(),\"\"+lc.getFecha()));\n System.out.println(\"imprime: \" + lc.getNombre());\n }*/\n\n Intent i = new Intent(this, ListasCompra.class );\n //i.putExtra(\"nombre\", \"\" + etNombre.getText());\n //i.putExtra(\"accion\", \"editar\");\n startActivity(i);\n\n finish();\n\n }", "public void reiniciarLista(){\n lista_inicializada = false;\n }", "public boolean finListe(){\n\treturn true;\n}", "public boolean InsererRDV(){\r\n\t\t\r\n\t\tArrayList<Object []>RdvMaj = new ArrayList<Object []>();\r\n\t\tArrayList<Object []>RdvNouveau = new ArrayList<Object []>();\r\n\t\t\r\n\t\tint i;\r\n\t\tfor(i=0; i< listeRdvCrud.size(); i++){\r\n\t\t\tif(listeRdvCrud.get(i)[5].toString().compareTo(\"NEW\") == 0 ){\r\n\t\t\t\tRdvNouveau.add(listeRdvCrud.get(i));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tRdvMaj.add(listeRdvCrud.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tboolean ok = MajRDV(RdvMaj);\r\n\t\tboolean ok1 = insererNouveauRDV(RdvNouveau);\r\n\t\t\r\n\t\treturn ok && ok1;\r\n\t}", "public boolean listeVide()\n\t{\n\t\tif (premier==null){\n\t\treturn true;}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public void saveListe()\n\t{\n\t\tdevis=getDevisActuel();\n//\t\tClient client=clientListController.getClient();\n//\t\tdevis.setCclient(client.getCclient());\n//\t\tdevis.setDesAdresseClient(client.getDesAdresse());\n//\t\tdevis.setCodePostalClient(client.getCodePostal());\n\t\tgetClientOfDevis(clientListController.findClientById(devis.getCclient()));\n\t\t\n\t\tdevis.setMtTotalTtc(devis.getMtTotalTtc().setScale(3, BigDecimal.ROUND_UP));\n\t\tdevis.setMtTotalTva(devis.getMtTotalTva().setScale(3, BigDecimal.ROUND_UP));\n\t\tdevis.setNetApayer(devis.getNetApayer().setScale(3, BigDecimal.ROUND_UP));\n\t\t\n\t\tif(listedetailarticles!=null)\n\t\t\tlistedetaildevis=listedetailarticles;\n\t\tif(devisListeController.modif==true)\n\t\t{\n\t\t\tList<DetailDevisClient>list=findDetailOfDevis(devis.getCdevisClient());\n\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t{\n\t\t\t\tremove(list.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\tdevisInit=devis;\n\t\tdevisListeController.save();\n\t\t\n\t\t/*if(listedetailarticles!=null)\n\t\t\tlistedetaildevis=listedetailarticles;\n\t\t\n\t\tif(devisListeController.modif==true)\n\t\t{\n\t\t\tList<DetailDevisClient>list=findDetailOfDevis(dc.getCdevisClient());\n\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t{\n\t\t\t\tremove(list.get(i));\n\t\t\t}\n\t\t}*/\n\t\t\n\t\tdetailDevisClientService.saveList(listedetaildevis);\n\t\t\n\t\t\n\t\t/*listedetaildevisStatic.clear();\n\t\tfor(DetailDevisClient ddc :listedetaildevis)\n\t\t{\n\t\t\tlistedetaildevisStatic.add(ddc);\n\t\t}*/\n\t\tdetailDevis=new DetailDevisClient();\n\t\t\n\t\t\n\t\t//listedetailarticles.clear();\n\t\t/*listedetaildevis.clear();\n\t\tdevisListeController.setDevis(new DevisClient());\n\t\tRequestContext context = RequestContext.getCurrentInstance();\n\t\tcontext.update(\"formPrincipal\");\n\t\t*/\n\t\t\n\t\ttry {\n\t\t\tPDF();\n\t\t} catch (JRException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\tfinally{\n\t\t\t//nouveauDevis();\n\t\t}\n\t\t\n\t\tFacesContext.getCurrentInstance().addMessage\n\t\t(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Detail Devis Enregistré!\", null));\n\t\t//nouveauDevis();\n\t}", "public static boolean isSaved() {\n PortabilityKnowhowListViewOperation temp = ClipBoardEntryFacade\n .getEntry();\n if (temp == null) {\n return false;\n }\n ClipBoardEntryFacade.setEntry(temp);\n return true;\n }", "private Boolean modificaListaElettorale(Lista listaElettorale) {\n\n\t\t//carica la lista delle liste elettorali \n\t\tArrayList<Lista> listaListeElettorali = this.listaListeElettorali();\n\n\t\tfor (int i = 0; i < listaListeElettorali.size(); i++) {\n\t\t\t//se la lista esiste settala\n\t\t\tif (listaElettorale.getNomeLista().equalsIgnoreCase(listaListeElettorali.get(i).getNomeLista())) {\n\t\t\t\tlistaListeElettorali.set(i, listaElettorale);\n\t\t\t}\n\t\t}\n\t\t//memorizzo la lista nel db\n\t\tmemorizzaListaElettorale(listaListeElettorali);\n\n\t\treturn true;\n\t}", "@Override\n\tprotected void onPause() {\n\t\tlist_lanmu = getChangeA(list);\n \tdbmanager.deleteDataTable(\"lanmu\"); \n \t//将变更后的A列表存放到lanmu表中\n \tif(list_lanmu.size()>0 && list_lanmu != null){\n \t\tfor(Lanmu lanmu : list_lanmu){\n \t\t\tdbmanager.addProduct(lanmu);\n \t\t}\n \t}\n \t//将整体变化的栏目列表更新到数据库中\n \tif(list != null && list.size() > 0){\n \t\tdbmanager.deleteDataTable(\"totle_lanmu\");\n \tfor(String a :list){\n \t\tdbmanager.addTotle_lanmu(a);\n \t}\n \t}\n \tSystem.out.println(\"do finish!\");\n\t\tsuper.onPause();\n\t}", "public static boolean estaVacia(ArrayList lista){\n if(lista.isEmpty()){\n System.out.println(\"No hay usuarios u objetos registrados por el momento\");\n return true;\n }\n else{\n return false;\n }\n }", "@Override\r\n\tpublic Spitter save(Spitter unsaved) {\n\t\tlist.add(unsaved);\r\n\t\treturn null;\r\n\t}", "@Override\n public boolean save()\n {\n return false;\n }", "public ListeSave getListeSave() {\n\t\tif(listeSave==null){\n\t\t\tlisteSave = new ListeSave();\n\t\t}\n\t\treturn listeSave;\n\t}", "public void preencherDisponibilidadesOferta() {\n\n //List<Disponibilidade> disponibilidades;\n List<Disp> disponibilidades;\n \n if (oferta != null) {\n //disponibilidades = new ArrayList<>(oferta.getDisponibilidades());\n disponibilidades = new ArrayList<>(oferta.getDispo());\n } else {\n disponibilidades = new ArrayList<>();\n }\n //dispDataModel = new DisponibilidadeDataModel(disponibilidades);\n dispDataModel = new DispDataModel(disponibilidades);\n }", "private void pulsarItemMayus(){\n if (mayus) {\n mayus = false;\n texto_frases = texto_frases.toLowerCase();\n }\n else {\n mayus = true;\n texto_frases = texto_frases.toUpperCase();\n }\n fillList(false);\n }", "@Override\n\tpublic boolean updateItem(DetallePedido detallePedido) throws Exception {\n\t\treturn false;\n\t}", "private boolean seleccionarItemEnListado(){\n\t\t\n\t\tint indice = this.getUltIdDoc();\n\t\tif (indice > -1){ //solo si se eligió un doc\n\t\t\tif ((indice+1) > tablaDocs.getItemCount()){ //se pasa de la cantidad de elemento en la lista, poner el de mas arriba en su lugar\n\t\t\t\tthis.setUltIdDoc(tablaDocs.getItemCount()-1);\n\t\t\t\tindice = this.getUltIdDoc(); \n\t\t\t}\n\t\t\ttablaDocs.setSelection(indice); \n\t\t\tlistaDocumentos.setSelection(indice);\n\t\t}\n\t\treturn true;\n\t}", "public void saveExisting() {\r\n Part modifiedPart = null;\r\n for (Part part : Inventory.getAllParts()) {\r\n if (Integer.parseInt(iDfield.getText()) == part.getId()) {\r\n modifiedPart = part;\r\n }\r\n }\r\n if (modifiedPart instanceof Outsourced && inHouseSelected) {\r\n replacePart(modifiedPart);\r\n\r\n } else if (modifiedPart instanceof InHouse && !inHouseSelected) {\r\n replacePart(modifiedPart);\r\n } else {\r\n modifiedPart.setName(nameField.getText());\r\n modifiedPart.setStock(Integer.parseInt(invField.getText()));\r\n modifiedPart.setPrice(Double.parseDouble(priceField.getText()));\r\n modifiedPart.setMax(Integer.parseInt(maxField.getText()));\r\n modifiedPart.setMin(Integer.parseInt(minField.getText()));\r\n if (inHouseSelected) {\r\n ((InHouse) modifiedPart).setMachineId(Integer.parseInt(machineOrCompanyField.getText()));\r\n } else {\r\n ((Outsourced) modifiedPart).setCompanyName(machineOrCompanyField.getText());\r\n }\r\n\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), modifiedPart);\r\n }\r\n\r\n }", "void checkPermanentStorageData() {\n if (!isAlive()) {\n Log.e(LOG_TAG, \"checkPermanentStorageData : the session is not anymore active\");\n return;\n }\n\n // When the data are extracted from a persistent storage,\n // some fields are not retrieved :\n // They are used to retrieve some data\n // so add the missing links.\n Collection<RoomSummary> summaries = mStore.getSummaries();\n for (RoomSummary summary : summaries) {\n if (null != summary.getLatestRoomState()) {\n summary.getLatestRoomState().setDataHandler(this);\n }\n }\n }", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "@Override\n public boolean isDirty()\n {\n return false;\n }", "public void setRoomList (ArrayList<ItcRoom> roomList)\r\n\t {\r\n\t //this.roomList = roomList;\r\n\t }", "public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }", "public void setRoomList(ArrayList<RoomList> RoomList) {\r\n this.RoomList = RoomList;\r\n }", "public boolean save() {\n return false;\n }", "public void populerListView() {\n Turnering valgtTurnering;\n valgtTurnering = fp_kombo_turnering.getSelectionModel().getSelectedItem();\n valgtTurnering.hentParti();\n for (Parti p: valgtTurnering.hentParti()) {\n fp_liste_parti.getItems().add(p);\n }\n this.partierLastet = true;\n this.fp_knapp_velg_parti.setDisable(false);\n this.fp_knapp_søk_parti.setDisable(false);\n }", "public boolean checkRoom(List<Room> list, int value){\n boolean exists = false;\n for (Room r : list){\n if(r.getId() == value)\n exists = true;\n }\n return exists;\n }", "@Override\n\t\tpublic Parcelable saveState() {\n\t\t\treturn null;\n\t\t}", "public abstract boolean depleteItem();", "@Override\n public boolean isDirty() {\n return false;\n }", "@Override\r\n protected void onSaveInstanceState(Bundle outState) {\r\n super.onSaveInstanceState(outState);\r\n outState.putParcelable(SAVED_ADAPTER_ITEMS, Parcels.wrap(mRoomRecyclerview.getItems()));\r\n outState.putStringArrayList(SAVED_ADAPTER_KEYS, mRoomRecyclerview.getKeys());\r\n }", "public void resetLastRoom(){this.aLastRooms.clear();}", "@Override\n\tpublic boolean supprimer(List<EmploieType> entites) {\n\t\treturn false;\n\t}", "public boolean ajoutPolygone(Polygone p) {\n if(this.list.contains(p)){\n return false;\n }\n else {\n return this.list.add(p);\n }\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public void enleverlaDerniereObs() {\n\n\t\tobstaclesList.remove(obstaclesList.size()-1);\n\t}", "public static void processLeaveRoomCommand(String leavePlayerName) throws IOException {\n\n Map<String, Socket> clientMap = Main.getClientMap();\n CopyOnWriteArrayList<Room> roomList = Main.getWaitRoomList();\n\n for (Room room : roomList) {\n //System.out.println(\"dd\"+Arrays.binarySearch(room.getPlayersName(), leavePlayerName));\n if (Arrays.binarySearch(room.getPlayersName(), leavePlayerName)==0) { //房間主人離開\n System.out.println(\"Host leave\");\n String[] roomPlayers = room.getPlayersName();\n\n Set<Map.Entry<String, Socket>> entrySet = clientMap.entrySet();\n\n for (int i = 1; i < roomPlayers.length; i++) { //找該房間其他人的socket,送roomDisbandCommand\n\n for (Map.Entry<String, Socket> stringSocketEntry : entrySet) {\n if (stringSocketEntry.getKey().equals(roomPlayers[i])) {\n\n Socket socket = stringSocketEntry.getValue();\n ObjectOutputStream otherClientOut = new ObjectOutputStream(socket.getOutputStream());\n RoomDisbandCommand roomDisbandCommand = new RoomDisbandCommand();\n otherClientOut.writeObject(roomDisbandCommand);\n }\n }\n }\n\n roomList.remove(room);\n Main.setWaitRoomList(roomList);\n break;\n } else if (Arrays.asList(room.getPlayersName()).contains(leavePlayerName)) { //非房間主人離開\n System.out.println(\"Not host leave\");\n\n ArrayList<String> list = new ArrayList<>(Arrays.asList(room.getPlayersName().clone()));\n //List<String> list = Arrays.asList(room.getPlayersName().clone());\n list.remove(leavePlayerName);\n //room.setPlayersName((String[]) list.toArray());\n room.setPlayersName((String[])list.toArray(new String[list.size()]));\n\n Main.setWaitRoomList(roomList);\n\n sendRoomPlayerCommand(room, leavePlayerName);\n break;\n }\n }\n\n }", "private void savePlayers() {\r\n this.passive_players.stream()\r\n .filter(E -> E.isChanged())\r\n .forEach(e -> {\r\n e.save();\r\n });\r\n }", "private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = this.getDataInizio();\n dataFine = this.getDataFine();\n panServizi = this.getPanServizi();\n ok = panServizi.checkListino(dataInizio, dataFine);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return ok;\n }", "public boolean inputdata(AddData list) {\n ContentValues values = new ContentValues();\n values.put(kolom_1, list.getTodo());\n values.put(kolom_2, list.getDesc());\n values.put(kolom_3, list.getPrior());\n long hasil = db.insert(nama_tabel, null, values);\n //kondisi\n if (hasil==-1) {\n return false;\n }else {\n return true;\n }\n }", "@Override\n public void setAllDoneEliminatingChangedListener() {\n database.getReference(gameCodeRef).child(\"AllDoneEliminating\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String stringValue = String.valueOf(snapshot.getValue());\n if (!stringValue.equals(null) && !stringValue.equals(\"null\")){\n Boolean value = (Boolean) snapshot.getValue();\n if (value){\n Controller.getInstance().allPlayersDoneEliminating();\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "@Override\n public void onChanged(List<EspecieDAO.NombreEspecie> nombreEspecies) {\n arrayNombreEspecies.clear();\n\n switch (accion) {\n case Constantes.GUARDAR:\n for (int i = 0; i < nombreEspecies.size(); i++) {\n arrayNombreEspecies.add(i, nombreEspecies.get(i).getNombreEspecie());\n }\n break;\n\n case Constantes.ACTUALIZAR:\n /**En caso de ser una actualización se busca el valor que coincide con la lista para\n * seleccionarlo y asi asegurarnos que el usuario vea el valor que tenia guardado previamente\n * */\n for (int i = 0; i < nombreEspecies.size(); i++) {\n if (nombreEspecies.get(i).getNombreEspecie().equals(especie)) {\n postionItemEspecie = i + 1; //Obtenemos el id del item\n }\n arrayNombreEspecies.add(i, nombreEspecies.get(i).getNombreEspecie());\n }\n break;\n }\n\n /**Independientemente si es una actualizacion o un se esta guardando una nueva mascota siempre se agrega\n * un valor por defecto en la primera posicion del array. Adememas positionItemEspecie se utiliza para\n * seleccionar un elemente en caso de que la accion se guardar el valor de este es de 0*/\n arrayNombreEspecies.add(0, \"Seleccione especie\");\n\n /**Al utilizar este metodo se ejecuta el llamado a onItemSelected utilizado par determinar, las razas de las\n * especies\n * */\n spiEspecie.setSelection(postionItemEspecie);\n\n }", "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 }", "public boolean saveEvent(String gameTitle, Event oldEvent, Event newEvent) {\n\n boolean saved = false;\n\n Game thisGame = MainModel.getInstance().getGame(gameTitle);\n\n Event eventThatAlreadyExist = thisGame.getEvent(newEvent.getName());\n Log.d(\"saveEvent\", \"eventThatAlreadyExist: \"+eventThatAlreadyExist.getName());\n //alreadyExistInGames E' TRUE SE ESISTE GIA' IN QUESTO GIOCO UN EVENTO CON QUEL NOME\n boolean alreadyExistInGames = (eventThatAlreadyExist.getName() != null);\n //modifyingExistingGame E' TRUE SE STO MODIFICANDO UN EVENTO GIA' ESISTENTE\n boolean modifyingExistingGame = (oldEvent != null);\n\n Log.d(\"saveEvent\", \"alreadyExistInGames: \"+ alreadyExistInGames + \" \" + newEvent.getName());\n Log.d(\"saveEvent\", \"modifyingExistingGame: \"+ modifyingExistingGame);\n\n if(alreadyExistInGames && modifyingExistingGame) {\n\n\n\n thisGame.removeEvent(oldEvent);\n thisGame.addEvent(newEvent);\n //MainModel.getInstance().writeGamesJson();\n saved = true;\n }\n else if(!alreadyExistInGames && !modifyingExistingGame) {\n\n Log.d(\"saveEvent\", \"Added new Event\");\n thisGame.addEvent(newEvent);\n //MainModel.getInstance().writeGamesJson();\n saved = true;\n }\n else if(modifyingExistingGame & !alreadyExistInGames) {\n\n Log.d(\"saveEvent\", \"Sto modificando un evento esistente\");\n Log.d(\"saveEvent\", \"Removed old event: \"+ oldEvent.getName() + \", added new Event: \" + newEvent.getName());\n thisGame.removeEvent(oldEvent);\n boolean b = thisGame.addEvent(newEvent);\n if(b)\n Log.d(\"saveEvent\", \"Evento salvato\");\n else\n Log.d(\"saveEvent\", \"Evento non salvato\");\n\n saved = true;\n\n }\n else {\n Log.d(\"saveEvent\", \"Error saving new Event or overwritting the existing one\");\n }\n\n return saved;\n }", "@Override\n public void onSaveInstanceState(@NonNull Bundle outState) {\n super.onSaveInstanceState(outState);\n if(departureListItems != null){\n outState.putSerializable(SAVED_INSTANCE_DEPARTURES, new ArrayList<>(departureListItems));\n }\n }", "public static boolean guardarCancionLista(int id_cancion, int id_lista){ \n\t boolean resultado = false;\n\t \n try {\n \t \n \t manager = Connection.connectToMysql();\n \t manager.getTransaction().begin();\n \t \n \t Lista l = manager.find(Lista.class, id_lista);\n \t Cancion c = manager.find(Cancion.class, id_cancion);\n\n \t List<Lista> lista_canciones = c.getListas();\n \t \n \t if(enLista(lista_canciones, l)) {\n \t\t lista_canciones.add(l);\n \t c.setListas(lista_canciones);\n \t resultado = true;\n \t }\n \t \n \n manager.getTransaction().commit();\n \n }catch (Exception ex) {\n System.out.println(ex);\n }\n \n return resultado;\n }", "@Override\n public boolean update(Revue objet) {\n return false;\n }", "public void guardarModosTransporteSeleccionados( View view ){\r\n\t\tSet<String> modosTransporteSeleccionados = this.adapterListaModosTransporte.getItemsSeleccionados();\r\n\t\tSet<String> modosTransportePref = this.adapterListaModosTransporte.getItemsPreferencias();\r\n\t\tfor ( String modoTransporteSeleccionado : modosTransporteSeleccionados ){\r\n\t\t\tmodosTransportePref.add( modoTransporteSeleccionado );\r\n\t\t}\r\n\t\t\r\n\t\tSharedPreferences prefActuales = getSharedPreferences( \"com.example.conteos_preferences\", MODE_PRIVATE );\r\n\t\tEditor editor = prefActuales.edit();\r\n\t\teditor.remove( CLAVE_MODOS_TRANSPORTE );\t//(1)\r\n\t\teditor.apply();\t\t\t\t\t\t\t\t//(2)\r\n\t\teditor.putStringSet( CLAVE_MODOS_TRANSPORTE, modosTransportePref );\t//(3)\r\n\t\teditor.commit();\r\n\t\t//Toast.makeText( getApplicationContext(), \"Items Saved: \\n\" + Arrays.toString( modosTransportePref.toArray() ), Toast.LENGTH_LONG ).show();\t\t\r\n\t\t//Toast.makeText( getApplicationContext(), \"Items Restored from pref: \\n\" + Arrays.toString( prefActuales.getStringSet( CLAVE_MODOS_TRANSPORTE, null ).toArray() ), Toast.LENGTH_LONG ).show();\r\n\t\tfinish();\r\n\t}", "public void livrosLidos(Livro livro){\n\n Boolean enviar = true;\n\n LivroLido livrol = new LivroLido();\n\n //setando o valor do id livro lid\n livrol.setIdLivro(livro.getId());\n\n //saber se o livro já foi enviado\n if(myBooksDb.daoLivrosLidos().idLivros(livro.getId()) == livro.getId()){\n enviar = false;\n Toast.makeText(getContext(),\"O livro já se encontra em livros lidos\", Toast.LENGTH_SHORT).show();\n }\n //verificar se o livro esta em outra tela\n else if(myBooksDb.daoLivroLer().idLivros(livro.getId()) == livro.getId()){\n enviar = false;\n tranferirLidos(livro.getId(),livrol);\n }\n\n if(enviar == true){\n myBooksDb.daoLivrosLidos().inserir(livrol);\n }\n\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot nodeRooms) {\n if(!nodeRooms.hasChild(code)){\n // non esiste nelle rooms una room con il codice inserito\n DataSnapshot roomToHaveAccess = nodeRooms.child(code);\n createRoom(load,code,nickname,roomToHaveAccess);\n\n } else {\n //esiste nelle rooms una room con il codice inserito\n showErrorMessage(getResources().getString(R.string.error_exist_room));\n }\n }", "public boolean unreserve(Reservation res){\n //remove from internal lists\n listR.remove(res);\n //set that to null\n res = null;\n\n //return true if res is null\n if(res == null){\n return true;\n }\n return false;\n }", "public void addRoomList(Detail list) {\n\t\t\tRoomList = list;\r\n\t\t}", "private void guardar() {\r\n\t\tif(Gestion.isModificado() && Gestion.getFichero()!=null){\r\n\t\t\ttry {\r\n\t\t\t\tGestion.escribir(Gestion.getFichero());\r\n\t\t\t\tGestion.setModificado(false);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(Gestion.isModificado() && Gestion.getFichero()==null){\r\n\t\t\tguardarComo();\r\n\t\t}\r\n\t\telse if(frmLigaDeFtbol.getTitle()==\"Liga de Fútbol\" && !Gestion.isModificado())\r\n\t\t\tguardarComo();\r\n\t}", "public boolean guardar()\r\n\t{\r\n\t\treturn false;\r\n\t}", "boolean removAble(InputItem item);", "public void saveListPosition(String name) {\n // Storing login value as TRUE\n\n\n // Storing name in pref\n editor.putString(POSITION, name);\n\n // Login Date\n //editor.putString(KEY_DATE, date);\n\n // commit changes\n editor.commit();\n }", "private void guardarEstadoObjetosUsados() {\n }", "public static void testEmprunt() throws DaoException {\r\n EmpruntDao empruntDao = EmpruntDaoImpl.getInstance();\r\n LivreDao livreDao = LivreDaoImpl.getInstance();\r\n MembreDao membreDao = MembreDaoImpl.getInstance();\r\n\r\n List<Emprunt> list = new ArrayList<Emprunt>();\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n 'Emprunts' list: \" + list);\r\n\r\n list = empruntDao.getListCurrent();\r\n System.out.println(\"\\n Current 'Emprunts' list: \" + list);\r\n\r\n list = empruntDao.getListCurrentByMembre(5);\r\n System.out.println(\"\\n Current 'Emprunts' list by member: \" + list);\r\n\r\n list = empruntDao.getListCurrentByLivre(3);\r\n System.out.println(\"\\n Current 'Emprunts' list by book: \" + list);\r\n\r\n Emprunt test = empruntDao.getById(5);\r\n System.out.println(\"\\n Selected 'Emprunt' : \" + test);\r\n\r\n empruntDao.create(1, 4, LocalDate.now());\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n List updated with one creation: \" + list);\r\n\r\n\r\n int id_book = livreDao.create(\"My Book\", \"My Autor\", \"123456\");\r\n Livre test_livre = new Livre();\r\n test_livre = livreDao.getById(id_book);\r\n int idMember = membreDao.create(\"Rodrigues\", \"Henrique\", \"ENSTA\", \"henrique@email.fr\", \"+33071234567\", Abonnement.VIP);\r\n Membre test_membre = new Membre();\r\n test_membre = membreDao.getById(idMember);\r\n test = new Emprunt(2, test_membre, test_livre, LocalDate.now(), LocalDate.now().plusDays(60));\r\n empruntDao.update(test);\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n List updated: \" + list);\r\n //System.out.println(\"\\n \" + test_livre.getId() + \" \" + test_membre.getId());\r\n\r\n\r\n int total = empruntDao.count();\r\n System.out.println(\"\\n Number of 'emprunts' in DB : \" + total);\r\n\r\n }", "private boolean hasRoom(int index) {\r\n\t\t\tfor (int i = index; i < data.length; i++) {\r\n\t\t\t\tif (data[i] == null)\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "public void EditList(Balanza mimaterial, int position) {\n this.list.set(position, mimaterial); //envia a la tabla los datos que tiene mi material en la posicion position \n this.reloadTable();//llama a la metodo reloadtable que borra la tabla completa y la carga de nuevo \n }", "@Override public boolean hasNext() {\n return !pila.esVacia();\n }", "private void save(JTour jTour){\n if(jTour.save()>0){\n for(JPlace jPlace : jTour.getPlaces()){\n if(jPlace.save() > 0){\n //u principu bi trebala biti samo jedna lokacija u placu\n jPlace.getLocations().get(0).save();\n }\n }\n }\n\n }", "public synchronized boolean insertarVelocidadNoEnviada() {\n\tboolean r = true;\n\n\tif (arrayLecturas.isEmpty()) {\n\t // Envio lecturas de viento desde la BBDD Local.\n\t conDB.enviarRegSensoresBBDD();\n\t}\n\t// Envio lecturas de viento desde memoria\n\tIterator<LecturasSensor> itea = arrayLecturas.iterator();\n\twhile (itea.hasNext()) {\n\t LecturasSensor lec = itea.next();\n\n\t r = IR.hiloescucha.connDB.insertaregviento(lec.getNombreSensor(),\n\t\t lec.getVelocidadAnemometro(), lec.getFecha());\n\n\t if (r == true) {\n\t\t// Una vez enviada la lectura, la borro de la BBDD Local.\n\t\tconDB.borrarRegistrosBBDD(lec);\n\t\t// Una vez enviada la lectura, la borro de memoria,\n\t\titea.remove();\n\t }\n\t}\n\treturn r;\n }", "@Override\n public boolean isValid() {\n return isAdded() && !isDetached();\n }", "public boolean addRoom(String name, String id, String description, String enterDescription){\n for(int i = 0; i < rooms.size(); i++){\n Room roomAti = (Room)rooms.get(i);\n if(roomAti.id.equals(id)){\n return false;\n }\n }\n rooms.add(new Room(name, id, description, enterDescription));\n return true;\n }", "public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}", "public boolean reset() {\n pouchesUsed.clear();\n int id;\n RSItem[] items = inventory.getItems();\n for (RSItem item : items) {\n id = item.getID();\n if (id > 5508 && id < 5516) {\n pouchesUsed.add(new Pouch(id));\n }\n }\n return true;\n }", "private void saveLocations(){\n\n final LocationsDialog frame = this;\n WorkletContext context = WorkletContext.getInstance();\n\n LocationsTableModel model = (LocationsTableModel) locationsTable.getModel();\n final HashMap<Integer, Location> dirty = model.getDirty();\n\n\n for(Integer id : dirty.keySet()) {\n Location location = dirty.get(id);\n\n\n if (!Helper.insert(location, \"Locations\", context)) {\n System.out.print(\"insert failed!\");\n }\n\n }// end for\n\n model.refresh();\n\n }", "public void livrosLer(Livro livro){\n\n Boolean enviar = true;\n\n LivroLer livroLer = new LivroLer();\n\n //setando o valor do id livroler\n livroLer.setIdLivro(livro.getId());\n\n //for para saber se o livro já foi enviado para livros lidos\n if(myBooksDb.daoLivroLer().idLivros(livro.getId()) == livro.getId()){\n enviar = false;\n Toast.makeText(getContext(),\"O livro já se encontra em meus livros\", Toast.LENGTH_SHORT).show();\n }\n //verificar se o livro esta em outra tela\n else if(myBooksDb.daoLivrosLidos().idLivros(livro.getId()) == livro.getId()){\n enviar = false;\n tranferirLer(livro.getId(),livroLer);\n }\n\n if(enviar == true){\n myBooksDb.daoLivroLer().inserir(livroLer);\n }\n\n }", "public boolean isDirty();", "public void onSaveListen() {\n _gamesList.get(_gamePos).getPlayers().add(playerName);\n // Increment the number of players that have joined the game\n _gamesList.get(_gamePos).setNumPlayers(_gamesList.get(_gamePos).getNumPlayers() + 1);\n\n TextView playersBlock = (TextView) findViewById(R.id.playersBlock);\n playersBlock.setText(\"\");\n List<String> players = _gamesList.get(_gamePos).getPlayers();\n for(int i = 0; i < players.size(); i++) {\n Log.d(\"GamePlayerSize\", Integer.toString(_gamesList.get(_gamePos).getPlayers().size()));\n if (i < players.size() - 1) {\n playersBlock.append(players.get(i) + \", \");\n }\n else {\n // Don't put a comma after the last one\n playersBlock.append(players.get(i));\n }\n }\n\n // Update the shared preferences with the edited game\n SharedPreferences gamesPref = this.getSharedPreferences(GAMES_FILE, MODE_PRIVATE);\n Gson gson = new Gson();\n\n SharedPreferences.Editor prefsEditor = gamesPref.edit();\n\n // Convert the games list into a json string\n String json = gson.toJson(_gamesList);\n Log.d(\"MainActivity\", json);\n\n // Update the _gamesMasterList with the modified _game\n prefsEditor.putString(GAME_KEY, json);\n prefsEditor.commit();\n\n Context context = getApplicationContext();\n CharSequence text = \"You have joined the game!\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public void ouvrirListe(){\n\t\n}", "public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }", "public boolean isSaved() {\n\t\treturn !sitePanel.isDataModified();\n\t}", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "private void onDoneClicked() {\n\n// if(flag == 1)\n// {\n if (items.size() > 0) {\n\n\n //insertion method\n String title = mEtTitle.getText().toString();\n String itemString = RemainderItems.convertItemsListToString(items);\n RemainderItems notes = new RemainderItems();\n\n notes.title = title;\n notes.items = itemString;\n\n dbhelper.insertDataToDatabase(notes, dbhelper.getWritableDatabase());\n\n Toast.makeText(CheckboxNoteActivity.this, \"Retrieved Item Size = \" + retrievedItems.size(), Toast.LENGTH_SHORT).show();\n }\n\n // }\n\n// else{\n// String title = mEtTitle.getText().toString();\n// String content = mEtNotes.getText().toString();\n// RemainderItems newContent = new RemainderItems();\n// newContent.title = title;\n// newContent.items = content;\n// notedbhelper.insertNote(newContent,notedbhelper.getWritableDatabase());\n// }\n\n }", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tPedidoDTO pedDTO = venda.util.Global.pedidoGlobalDTO;\n\t\tpedDTO.setInfAdicional(txtInfAdicional.getText().toString());\n\t\tvenda.util.Global.pedidoGlobalDTO = pedDTO;\t\n if (pedDTO.getBaixado() != 1)\n\t\t\tpedBRL.Update(pedDTO);\n\t\t\n\t}", "public static boolean testDaoLireVisiteur() {\n boolean ok = true;\n ArrayList<Visiteur> lesVisiteurs = new ArrayList<Visiteur>();\n try {\n lesVisiteurs = daoVisiteur.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des visiteurs\");\n for (Visiteur unVisiteur: lesVisiteurs){\n System.out.println(unVisiteur);\n }\n return ok;\n }", "@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}", "public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }", "public boolean isSaved() {\n\t\treturn name != null;\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 setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMonth) + \"/\" +startDay+ \"/\" + startYear;\n roomEndDate = convertMonthToDigit(endMonth) + \"/\" +endDay+ \"/\" + endYear; \n \n System.out.println(\"\\nSaving reservation\");\n System.out.println(\"roomStartDate\" + roomStartDate);\n System.out.println(\"roomEndDate:\" + roomEndDate);\n \n //Searching the reserved room number in the hotel rooms\n for(int i=0;i<selRoomCount;i++){\n for(int i2=0;i2<roomCounter;i2++){\n if(myHotel[i2].getRoomNum() == tempRooms[i]){ \n //if room number from array is equal to selected room number by guest\n System.out.println(\"Room Found:\"+tempRooms[i]); \n \n myHotel[i2].setOccupantID(guestID);\n myHotel[i2].setAvailability(false);\n myHotel[i2].setOccupant(guest[guestIndex].getName());\n myHotel[i2].setStartDate(roomStartDate);\n myHotel[i2].setEndDate(roomEndDate);\n }\n }\n }\n \n updateRoomChanges_DB(); //apply changes to the database\n \n //Updates room preference of the current guest \n String sqlstmt = \"UPDATE APP.GUEST \"\n + \" SET ROOMPREF = '\" + guest[guestIndex].getPref()\n + \"' WHERE ID = \"+ guest[guestIndex].getAccountID();\n \n CallableStatement cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n cs.close(); \n }", "public void guardarBloqueSeleccionado(){\n\t\tif(bloqueSeleccionadoEditar.getIdbloques() == 0){\n\t\t\tbloquesFacade.create(bloqueSeleccionadoEditar);\n\t\t}else{\n\t\t\tbloquesFacade.edit(bloqueSeleccionadoEditar);\n\t\t}\n\t\tdataListBloques = bloquesFacade.findByLike(\"SELECT B FROM Bloques B ORDER BY B.nombre\");\n\t}", "private void insertOrUpdateItem(){\n Toaster toaster = new Toaster(getContext());\n DBManager dbManager = new DBManager(getContext());\n if((Afegir.getText() == getText(R.string.actualitza) && updateItem(dbManager)) ||\n (Afegir.getText() == getText(R.string.afegir) && insertItem(dbManager))){\n\n ((MainActivity) getActivity()).swapFrameLayoutVisibility(true);\n ((MainActivity) getActivity()).refreshListView();\n toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.commit_insert).toString(), null);\n reset(true);\n }\n\n else toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.reboke_action).toString(), getContext().getDrawable(R.drawable.ic_error_vector));\n }", "public boolean isRoomstidModified() {\n return roomstid_is_modified; \n }", "@Override\n public void onStop() {\n super.onStop();\n lista.get(posizione).setContatti(contacts);\n SharedPreferences sharedPreferences = getContext().getSharedPreferences(\"shared preferences\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(lista);\n editor.putString(\"task list\", json);\n editor.apply();\n }", "public void actualizacionEstadoDireccion(boolean b, String s) {\n for (DatosEspecUi datosEspecUi : datosEspecUiList) {\n // Log.d(TAG, \"actualizacionEstadoDireccion : \" + datosEspecUi.getId() + \" Second Id : \" + s);\n if (datosEspecUi.getId().equals(s)) {\n Log.d(TAG, \"actualizacionEstadoDireccionTRUE : \" + datosEspecUi.getId() + \" Second Id : \" + s +\n \" / DESCRIPCION : \"+datosEspecUi.getDescripcion());\n datosEspecUi.setEstado(b);\n continue;\n }\n continue;\n }\n notifyDataSetChanged();\n }", "@Override\n\tpublic void posSave() {\n\t\tfor(ItemRequisicionEta tmpItm : itemsAgregados) {\n\t\t\ttmpItm.setReqEtapa(instance);\n\t\t\tgetEntityManager().persist(tmpItm);\n\t\t}\n\t\tgetEntityManager().refresh(etapaRepCliHome.getInstance());\n\t}", "private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }", "public void setLastRoom(final Room pLastRoom){this.aLastRooms.push(pLastRoom);}", "private void armarListaCheck() {\n listaCheck = new ArrayList();\n listaCheck.add(chkBici);\n listaCheck.add(chkMoto);\n listaCheck.add(chkAuto);\n }", "boolean updateItems() {\n return updateItems(selectedIndex);\n }", "public boolean MajRDV(ArrayList<Object []> rdvMaj){\r\n\t\tint i;\r\n\t\tfor (i = 0; i<rdvMaj.size(); i++){\r\n\t\t\tif(!creerObjetAssurerLecon(rdvMaj.get(i)).update(BDD.db)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean alterarIDItemCardapio(){\n\t\tif(\tid_item_pedido \t\t> 0 && //Verifica se o item do pedido informado é maior que zero, se existe, se não está fechado, verifica se o item do cardapio informado existe e se está disponível\r\n\t\t\tconsultar().size() \t> 0 && \r\n\t\t\tconsultar().get(5)\t.equals(\"Aberto\")/* &&\r\n\t\t\titem_cardapio.consultar().size()>0 &&\r\n\t\t\titem_cardapio.consultar().get(4).equals(\"Disponível\")*/\r\n\t\t\t){\r\n\t\t\t\r\n\t\t\treturn new Item_Pedido_DAO().alterarIDItemCardapio(id_item_pedido, id_item_cardapio);\t\t\t\r\n\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "private void getNewVacunas(){\n mNewVacunas = estudioAdapter.getListaNewVacunasSinEnviar();\n //ca.close();\n }", "public boolean checkListNull() {\n\t\treturn ((drawerItems == null) ? true : false);\n\t}", "@Override\n protected boolean beforeSave(boolean newRecord) {\n if (newRecord){\n\n // Me aseguro de tener la organización correcta\n MZOrdenPago ordenPago = (MZOrdenPago) this.getZ_OrdenPago();\n this.setAD_Org_ID(ordenPago.getAD_Org_ID());\n\n if (this.getZ_GeneraOrdenPago_ID() <= 0){\n this.setZ_GeneraOrdenPago_ID(((MZOrdenPago) this.getZ_OrdenPago()).getZ_GeneraOrdenPago_ID());\n }\n if (this.getC_BPartner_ID() <= 0){\n this.setC_BPartner_ID(((MZOrdenPago) this.getZ_OrdenPago()).getC_BPartner_ID());\n }\n }\n\n // Si selecciono un item de medio de pago ya emitido, cargo datos del mismo en esta linea.\n if ((newRecord) || (is_ValueChanged(X_Z_OrdenPagoMedio.COLUMNNAME_Z_MedioPagoItem_ID))){\n if (this.getZ_MedioPagoItem_ID() > 0){\n MZMedioPagoItem medioPagoItem = (MZMedioPagoItem) this.getZ_MedioPagoItem();\n if (medioPagoItem.isEmitido()){\n\n if (this.getDateEmitted() == null) this.setDateEmitted(medioPagoItem.getDateEmitted());\n if (this.getDueDate() == null) this.setDueDate(medioPagoItem.getDueDate());\n if ((this.getTotalAmt() == null) || (this.getTotalAmt().compareTo(Env.ZERO) <= 0)) this.setTotalAmt(medioPagoItem.getTotalAmt());\n\n if ((!this.getDateEmitted().equals(medioPagoItem.getDateEmitted())) || (!this.getDueDate().equals(medioPagoItem.getDueDate()))\n || (this.getTotalAmt().compareTo(medioPagoItem.getTotalAmt()) != 0)){\n log.saveError(\"ATENCIÓN\", \"No es posible modificar datos de este medio de pago ya que el mismo esta emitido.\");\n return false;\n }\n\n /*\n this.setDateEmitted(medioPagoItem.getDateEmitted());\n this.setDueDate(medioPagoItem.getDueDate());\n this.setTotalAmt(medioPagoItem.getTotalAmt());\n\n */\n }\n }\n }\n\n // Valido fecha de emision debe ser siempre menor a fecha de vencimiento.\n if ((this.getDateEmitted() != null) && (this.getDueDate() != null)){\n if (this.getDueDate().before(this.getDateEmitted())){\n log.saveError(\"ATENCIÓN\", \"La fecha de Vencimiento debe ser mayor o igual a la fecha de Emisión.\");\n return false;\n }\n }\n\n // Valido importe del medio de pago mayor a cero\n if ((this.getTotalAmt() == null) && (this.getTotalAmt().compareTo(Env.ZERO) <= 0)){\n log.saveError(\"ATENCIÓN\", \"Debe indicar importe mayor a cero para este medio de pago.\");\n }\n\n return true;\n }" ]
[ "0.6404481", "0.6283092", "0.62420356", "0.586543", "0.5857742", "0.5824678", "0.57918775", "0.57238376", "0.5655503", "0.5642564", "0.55886024", "0.5569311", "0.55669296", "0.5515503", "0.5470896", "0.5466987", "0.54669017", "0.54582727", "0.54549056", "0.5440212", "0.541933", "0.5418275", "0.5409232", "0.54076743", "0.54068685", "0.5400757", "0.5396741", "0.5382324", "0.5373382", "0.53725797", "0.5358695", "0.53527874", "0.5338691", "0.5326451", "0.5320413", "0.53075314", "0.5293479", "0.529266", "0.52911067", "0.52864486", "0.528315", "0.5279557", "0.52650446", "0.5258539", "0.52548134", "0.5253491", "0.5246391", "0.5237179", "0.5234035", "0.52308244", "0.5230349", "0.5228803", "0.522702", "0.5225362", "0.52241313", "0.52239496", "0.52213883", "0.5219897", "0.521544", "0.5214109", "0.52131367", "0.5211057", "0.5210135", "0.5208462", "0.520351", "0.51871896", "0.5184006", "0.5177729", "0.517643", "0.51693773", "0.516682", "0.5166365", "0.51632345", "0.51586723", "0.5155585", "0.5155294", "0.51543707", "0.5154105", "0.5151662", "0.5146457", "0.514203", "0.5141874", "0.51401", "0.51395303", "0.5136731", "0.51365197", "0.51267755", "0.51263356", "0.5123918", "0.5112635", "0.510906", "0.5105628", "0.51017696", "0.5101551", "0.5098214", "0.50978845", "0.50930774", "0.50926214", "0.5091815", "0.5086871" ]
0.55562705
13
methode permettant de vider la liste des Room precedante
public void resetLastRoom(){this.aLastRooms.clear();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}", "public void populateRooms(){\n }", "public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "public List<Room> findAllRooms();", "public ArrayList getRooms();", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public LinkedList getList() {\n\treturn this.roomList;\n}", "@Override\n public List<UserRoom> getUserRoomList() {\n logger.info(\"Start getUserRoomList\");\n List<UserRoom> userRoomList = new ArrayList<>();\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.SELECT_FROM_USER_ROOM);\n rs = preparedStatement.executeQuery();\n while (rs.next()) {\n userRoomList.add(myResultSet(rs));\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed getUserRoomList\");\n return userRoomList;\n }", "private void displayListOfRooms() {\n DatabaseReference roomsRef = FirebaseDatabase.getInstance().getReference(\"Rooms\");\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update rooms every time there's a change\n updateRooms(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public List<Room> getRooms() {\n return rooms;\n }", "@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "private void setRooms() {\r\n\t\tAccountBean bean = new AccountBean();\r\n\t\tbean.setCf(Session.getSession().getCurrUser().getAccount().getCf());\r\n\t\tRoomController ctrl = RoomController.getInstance();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tthis.myRooms=FXCollections.observableArrayList(ctrl.getMyRooms(bean));\r\n\t\t}\r\n\t\tcatch (DatabaseException ex1) {\r\n\t\t\tJOptionPane.showMessageDialog(null,ex1.getMessage(),ERROR, JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void ouvrirListe(){\n\t\n}", "public void setRoomList (ArrayList<ItcRoom> roomList)\r\n\t {\r\n\t //this.roomList = roomList;\r\n\t }", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}", "public void addRoomList(Detail list) {\n\t\t\tRoomList = list;\r\n\t\t}", "private List<String> retrieveObjectsInRoom(Room room) {\n List<String> retirevedInRoom = new ArrayList<>();\n for (String object : room.getObjects()) {\n if (wantedObjects.contains(object)) {\n retirevedInRoom.add(object);\n }\n }\n return retirevedInRoom;\n }", "@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\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\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}", "public void setRoomList(ArrayList<RoomList> RoomList) {\r\n this.RoomList = RoomList;\r\n }", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "List<ExamRoom> selectAll();", "public List<Room> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\treturn session.createCriteria(Room.class).list();\n\n\t}", "protected ArrayList<Long> getRoomMembers() {\n\treturn roomMembers;\n }", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "@Override\n public Object getItem(int arg0) {\n Log.d(TAG, \"getItem: \"+fromName.get(arg0));\n return rooms.get(arg0);\n }", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "public interface RoomListModel {\n void getRoomListData(Callback<RoomEntity> callback, int count, int page, int groupId);\n}", "public ChatRoomTableModel getRoomlist() {\n\t\treturn roomlist;\n\t}", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}", "public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }", "@Override\r\n\tpublic void OnRoomListNotify(List<stRoomInfo> roomlist) {\n\t\tString roomsID[] = new String[roomlist.size()];\r\n\t\tint roomsType[] = new int[roomlist.size()];\r\n\t\tint counts[] = new int[roomlist.size()];\r\n\t\tint j = 0;\r\n\t\tfor (Iterator<stRoomInfo> i = roomlist.iterator(); i.hasNext();)\r\n\t\t{ \r\n\t\t\tstRoomInfo userinfoRef = i.next(); \r\n\t\t\troomsID[j] = String.valueOf(userinfoRef.getRoomid());\r\n\t\t\troomsType[j] = userinfoRef.getRoomtype().ordinal();\r\n\t\t\tcounts[j] = userinfoRef.getNum();\r\n\t\t\tj++;\r\n\t\t} \r\n\t\t\r\n\t\tRoomListResult(roomsID,roomsType,counts);\r\n\t\t\t\r\n\t}", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "public void viewReservationList(RoomList roomList) {\n\t\tSystem.out.println(\"\");\t\t\t\t\t\t\t\t\t\t\n\t\tSystem.out.println(\"\\t\\tRESERVATION LIST\t\t\t\t \");\n\t\tSystem.out.println(\"**********************************************\\n\");\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//search for all the rooms in the room list\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if a room is not empty(it has at least one guest)\n\t\t\t\tr.reservationList(r);\t\t\t\t\t\t\t\t//gets all the guests in non empty rooms\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n**********************************************\\n\");\n\t}", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();", "public List<Room> getCurrentRooms() {\n return currentRooms;\n }", "public ArrayList<Room> getRooms() {\n return rooms;\n }", "public interface RoomDaoCustom {\n\n /**\n * @return the list of rooms whose light is on\n */\n List<Room> listWithLightOn();\n\n /**\n * @return the list of rooms whose light is off\n */\n List<Room> listWithLightOff();\n\n /**\n * @return the list of rooms whose ringer is on\n */\n List<Room> listWithRingerOn();\n\n /**\n * @return the list of rooms whose ringer is off\n */\n List<Room> listWithRingerOff();\n}", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "public KListObject<KAssurer_lecon> chargerListeRDVEleve(int id){\r\n\t\tint idAgenda;\r\n\t\t\r\n\t\tKListObject<KAssurer_lecon> Kliste =new KListObject<KAssurer_lecon>(KAssurer_lecon.class);\r\n\t\tKAssurer_lecon lecon = null;\r\n\t\tKListObject<KAgenda> Kliste1 =new KListObject<KAgenda>(KAgenda.class);\r\n\t\tKliste1.loadFromDb(BDD.db,\"select * from agenda where id in (select idAgenda from assurer_lecon where ideleve =\"+id+\") \" +\r\n\t\t\t\t\"order by date_agenda asc, heure_agenda asc\");\r\n\t\t\r\n\t\tfor(int i = 0; i<Kliste1.count(); i++){\r\n\t\t\tidAgenda = ((Integer)Kliste1.get(i).getId());\r\n\t\t\tlecon = new KAssurer_lecon();\r\n\t\t\ttry {\r\n\t\t\t\tlecon.loadOne(BDD.db,\" idAgenda = \"+idAgenda+\" and idEleve =\"+id);\r\n\t\t\t\tKliste.add(lecon);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace(); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Kliste;\r\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 List<Mobibus> darMobibus();", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "Room getRoom();", "Room getRoom();", "@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "private void getTravelItems() {\n String[] columns = Columns.getTravelColumnNames();\n Cursor travelCursor = database.query(TABLE_NAME, columns, null, null, null, null, Columns.KEY_TRAVEL_ID.getColumnName());\n travelCursor.moveToFirst();\n while (!travelCursor.isAfterLast()) {\n cursorToTravel(travelCursor);\n travelCursor.moveToNext();\n }\n travelCursor.close();\n }", "public void populerListView() {\n Turnering valgtTurnering;\n valgtTurnering = fp_kombo_turnering.getSelectionModel().getSelectedItem();\n valgtTurnering.hentParti();\n for (Parti p: valgtTurnering.hentParti()) {\n fp_liste_parti.getItems().add(p);\n }\n this.partierLastet = true;\n this.fp_knapp_velg_parti.setDisable(false);\n this.fp_knapp_søk_parti.setDisable(false);\n }", "public static void testEmprunt() throws DaoException {\r\n EmpruntDao empruntDao = EmpruntDaoImpl.getInstance();\r\n LivreDao livreDao = LivreDaoImpl.getInstance();\r\n MembreDao membreDao = MembreDaoImpl.getInstance();\r\n\r\n List<Emprunt> list = new ArrayList<Emprunt>();\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n 'Emprunts' list: \" + list);\r\n\r\n list = empruntDao.getListCurrent();\r\n System.out.println(\"\\n Current 'Emprunts' list: \" + list);\r\n\r\n list = empruntDao.getListCurrentByMembre(5);\r\n System.out.println(\"\\n Current 'Emprunts' list by member: \" + list);\r\n\r\n list = empruntDao.getListCurrentByLivre(3);\r\n System.out.println(\"\\n Current 'Emprunts' list by book: \" + list);\r\n\r\n Emprunt test = empruntDao.getById(5);\r\n System.out.println(\"\\n Selected 'Emprunt' : \" + test);\r\n\r\n empruntDao.create(1, 4, LocalDate.now());\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n List updated with one creation: \" + list);\r\n\r\n\r\n int id_book = livreDao.create(\"My Book\", \"My Autor\", \"123456\");\r\n Livre test_livre = new Livre();\r\n test_livre = livreDao.getById(id_book);\r\n int idMember = membreDao.create(\"Rodrigues\", \"Henrique\", \"ENSTA\", \"henrique@email.fr\", \"+33071234567\", Abonnement.VIP);\r\n Membre test_membre = new Membre();\r\n test_membre = membreDao.getById(idMember);\r\n test = new Emprunt(2, test_membre, test_livre, LocalDate.now(), LocalDate.now().plusDays(60));\r\n empruntDao.update(test);\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n List updated: \" + list);\r\n //System.out.println(\"\\n \" + test_livre.getId() + \" \" + test_membre.getId());\r\n\r\n\r\n int total = empruntDao.count();\r\n System.out.println(\"\\n Number of 'emprunts' in DB : \" + total);\r\n\r\n }", "Collection<Room> getRooms() throws DataAccessException;", "public void refreshList() {\n PartDAO partDAO = new PartDAO();\n for (Part p : partDAO.getAll()) {\n if (p.getStockLevel() > 0) {\n Label partLabel = new Label(\"ID: \" + p.getPartID() + \" / Name: \" + p.getName() + \" / Stock: \" + p.getStockLevel());\n partHashMap.put(partLabel.getText(), p);\n partList.getItems().add(partLabel);\n }\n }\n Customer customer = new Customer();\n CustomerDAO customerDAO = new CustomerDAO();\n for(Customer c: customerDAO.getAll()) {\n if(jobReference.getJob().getCustomerID() == Integer.parseInt(c.getCustomerID())) {\n customer.setFirstName(c.getFirstName());\n customer.setLastName(c.getLastName());\n break;\n }\n }\n if(jobReference.getJob().getRegistrationID() == null) {\n jobDetailsLbl.setText(\"Date: \" + jobReference.getJob().getDateBookedIn() + \" / Name: \" + customer.getFirstName() + \" \" + customer.getLastName() + \" / Part-only job\");\n }\n else {\n jobDetailsLbl.setText(\"Date: \" + jobReference.getJob().getDateBookedIn() + \" / Name: \" + customer.getFirstName() + \" \" + customer.getLastName() + \" / Car ID: \" + jobReference.getJob().getRegistrationID());\n }\n stockUsedField.setText(\"1\");\n }", "public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }", "public void onRoomLoad() {\n\n }", "public ArrayList<Item> getRoomItems() {\n return (roomItems);\n }", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "List<ParqueaderoEntidad> listar();", "@Override\r\n\tpublic List<EquipoCompetencia> listar() {\n\t\treturn null;\r\n\t}", "List<Room> selectRoomList(@Param(\"building\") String building);", "@Override\n public List<Venda> listar() {\n String sql = \"SELECT v FROM venda v\";\n TypedQuery<Venda> query = em.createQuery(sql, Venda.class);\n List<Venda> resultList = query.getResultList();\n\n return resultList;\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public ArrayList<GameRoom> execute() {\n\t\tif(GameRooms.rooms == null) {\n\t\t\tGameRooms.rooms = new ArrayList<GameRoom>();\n\t\t}\n\t\treturn GameRooms.rooms;\n\t}", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "public void seeReservation(RoomList roomList){\n\t\tSystem.out.println(\"What is the name of the guest you wish to check a reservation for ?\");\n\t\tkeyboard.nextLine();\n\t\tString name = keyboard.nextLine();\n\t\tRoom room = null;\n\t\t\n\t\tfor(Room r: roomList.getList()){\n\t\t\tif(!r.isEmpty(r)) {\n\t\t\troom = r.findRoomByName(r, name);\n\t\t\troom.getGuestNames(room);\n\t\t\t}\n\t\t}\n\t}", "public void listeDesEmpruntsEnCours();", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "public void genLists() {\n\t\tItem noitem = new Item(\"nothing\", \"You don't see that here.\", \"no_item\", \"\", true);\r\n\t\titems.put(noitem.getId(), noitem);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//DataInputStream in = new DataInputStream(new FileInputStream(ITEM_FILE));\r\n\t\t\tDataInputStream in = new DataInputStream(getClass().getResourceAsStream(ITEM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tItem new_item = Item.readItem(in);\r\n\t\t\t\t\titems.put(new_item.getId(), new_item);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t\tin = new DataInputStream(getClass().getResourceAsStream(ROOM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tRoom new_room = Room.readRoom(in, items);\r\n\t\t\t\t\trooms.put(new_room.getId(), new_room);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tplayer.setCurrentRoom(getRoom(\"start\"));\r\n\t}", "public List<ViewEtudiantInscriptionEcheance> rechercheEtudiantInscripEcheanceParNomEtPrenom(){ \r\n try{ \r\n setListRechercheEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findEtudInscripByNonEtPrenomWithJocker(getViewEtudiantInscripEcheance().getNomEtPrenom())); \r\n }catch (Exception ex) {\r\n System.err.println(\"Erreur capturée : \"+ex);\r\n }\r\n return listRechercheEtudiantInscripEcheance;\r\n }", "private void setUpList() {\n\t\tRoomItemAdapter adapter = new RoomItemAdapter(getApplicationContext(),\n\t\t\t\trName, rRate);\n\t\tlistView.setAdapter(adapter);\n\n\t\tlistView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\thandleClick(position);\n\t\t\t}\n\t\t});\n\t}", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public List<Vendedor> listarVendedor();", "public List<String> getData1() {\n List<String> arr=new ArrayList<String>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"select * from \" + TABLE_NAME +\" ORDER BY \" + POSITIONNO + \" ASC\",null);\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n String name = cursor.getString(cursor.getColumnIndex(ROOMNAME));\n\n arr.add(name);\n cursor.moveToNext();\n }\n }\n\n return arr;\n }", "@Override\n\tpublic List<Marca> listaporitem() {\n\t\treturn marcadao.listaporitem();\n\t}", "@Override\n public int getCount() {\n Log.d(TAG, \"getCount: size\" +fromName.size());\n return rooms.size();\n }", "private void requestRoomList() {\n String get_list_data = Network.GET_CROUP_LIST_DATA;\n\n JSONObject params = new JSONObject();\n\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.POST, AppConfig.GROUP_LIST_URL, params,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n\n boolean error = response.getBoolean(Network.TAG_ERROR);\n\n\n if (!error) {\n\n final List<String[]> roomList = new LinkedList<>();\n\n JSONArray rooms = response.getJSONArray(Network.TAG_ROOMS);\n\n for (int i = 0; i < rooms.length(); i++) {\n\n JSONObject room = rooms.getJSONObject(i);\n\n if (room.has(Network.TAG_NAME) && !room.isNull(Network.TAG_NAME)) {\n\n Room roomObject = new Room();\n\n roomObject.setId(room.getString(Network.TAG_USER_ID));\n roomObject.setName(room.getString(Network.TAG_NAME));\n\n mRoomList.add(roomObject);\n\n String count = String.valueOf(room.getInt(Network.TAG_COUNT));\n roomList.add(new String[]{room.getString(Network.TAG_NAME), count});\n }\n\n }\n\n mListView.setAdapter(new ArrayAdapter<String[]>(\n RoomListActivity.this,\n android.R.layout.simple_list_item_2,\n android.R.id.text1,\n roomList) {\n\n\n @Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n // Must always return just a View.\n View view = super.getView(position, convertView, parent);\n\n // If you look at the android.R.layout.simple_list_item_2 source, you'll see\n // it's a TwoLineListItem with 2 TextViews - text1 and text2.\n //TwoLineListItem listItem = (TwoLineListItem) view;\n String[] entry = roomList.get(position);\n TextView text1 = (TextView) view.findViewById(android.R.id.text1);\n TextView text2 = (TextView) view.findViewById(android.R.id.text2);\n text1.setText(entry[0]);\n text2.setText(getString(R.string.joined) + entry[1]);\n return view;\n }\n\n\n });\n\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent joinIntent = new Intent(RoomListActivity.this, JoinGroupActivity.class);\n\n joinIntent.putExtra(AppConfig.EXTRA_ROOM_ID, mRoomList.get(position).getId());\n\n joinIntent.putExtra(AppConfig.EXTRA_ROOM_NAME, mRoomList.get(position).getName());\n startActivity(joinIntent);\n }\n });\n\n if (roomList.isEmpty()) {\n\n mEmptyList.setVisibility(View.VISIBLE);\n }else {\n mEmptyList.setVisibility(View.GONE);\n }\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"LoginError:\" + error.getMessage());\n\n }\n });\n\n // Adding request to request queue\n VolleySingleton.getInstance().addToRequestQueue(request, get_list_data);\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "@Override\n public int getItemCount() {\n return restrooms.size();\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n roomsList.clear();\n Iterable<DataSnapshot> rooms = dataSnapshot.getChildren();\n for (DataSnapshot snapshot : rooms) {\n roomsList.add(snapshot.getKey());\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(RoomChoice.this,\n android.R.layout.simple_list_item_1, roomsList);\n listView.setAdapter(adapter);\n }\n }", "@Override\n public List<Room> findRooms(int offset, int limit, String orderBy) throws AppException {\n log.info(\"#findRooms offset = \" + offset + \" limit = \" + limit + \" orderBy = \" + orderBy);\n Connection con = null;\n PreparedStatement ps;\n ResultSet rs;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n ps = con.prepareStatement(SELECT_ROOMS);\n log.info(\"orderBy = \" + orderBy);\n switch (orderBy) {\n case(\"price\"):\n ps = con.prepareStatement(SELECT_ROOMS_PRICE);\n break;\n case(\"size\"):\n ps = con.prepareStatement(SELECT_ROOMS_SIZE);\n break;\n case(\"class\"):\n ps = con.prepareStatement(SELECT_ROOMS_CLASS);\n break;\n case(\"status\"):\n ps = con.prepareStatement(SELECT_ROOMS_STATUS);\n }\n int k = 1;\n ps.setInt(k++, limit);\n ps.setInt(k, offset);\n log.info(\"ps = \" + ps);\n rs = ps.executeQuery();\n rooms = new ArrayList<>();\n while (rs.next()) {\n rooms.add(extractRoom(con, rs));\n }\n con.commit();\n log.info(\"rooms = \" + rooms);\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem findRooms\");\n throw new AppException(\"Cannot find rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public void consultarListasPersonas(){\n SQLiteDatabase db = conn.getReadableDatabase();\n Personal personal = null;\n listaPersonales = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM personal\", null);\n while(cursor.moveToNext()){\n personal = new Personal();\n personal.setId(cursor.getInt(0));\n personal.setNombre(cursor.getString(1));\n personal.setApellido(cursor.getString(2));\n personal.setHoraEntrada(cursor.getInt(3));\n personal.setHoraSalida(cursor.getInt(4));\n personal.setId_laboratorio(cursor.getInt(5));\n listaPersonales.add(personal);\n }\n db.close();\n obtenerLista();\n }", "@Override\r\n\tpublic List<TypeModePaiement> listeAll() {\n\t\tList<TypeModePaiement> list = repository.findAll();\r\n\t\treturn list;\r\n\t}", "@Override\n //Metodo para retornar una lista de los equipos que avanzan\n public List<Equipo> getEquiposQueAvanzan(){\n List<Equipo> equipos = new ArrayList<>();\n //Recorremos la lista de partidos de la etapa mundial\n for (Partido partidito : getPartidos()){\n /*Si en el partido que estamos parados gano el local, agregamos ese equipo\n local a la lista de equipos*/\n if (partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getLocal());\n }\n /*Si NO gano el local, agregamos el equipo visitante a la lista de equipos*/\n if (!partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getVisitante());\n }\n }\n //Retornamos la nueva lista con los equipos que avanzan\n return equipos;\n }", "public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }", "@RequestMapping(value = \"/vacantrooms\", method = RequestMethod.GET)\n public ArrayList<Room> vacantRooms(){\n ArrayList<Room> listroom = DatabaseRoom.getVacantRooms();\n return listroom;\n }", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "public Rooms getRmTable();", "@Override\n public List<Programador> list() {\n return memoryDataBank;//To change body of generated methods, choose Tools | Templates.\n }", "@Transactional\r\n\tpublic List<Room> getReservable(Integer posti, LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.getPosti(posti);\r\n\t\tl.removeAll(this.getReservedFromTo(from, to));\r\n\t\treturn l;\r\n\t}", "public Room getLocalisation(){return this.aLocalisation;}", "public void setRoomCards() {\n List<RoomCard> roomCards = new ArrayList<RoomCard>(); // empty list for the new roomCards\n Data data = new Data(\"data.json\"); // get data from file\n JSONObject roomData = (JSONObject) ((JSONObject) data.getJsonData().get(\"OriginalBoard\")).get(\"Rooms\"); // get the room data from data\n for (String keyStr : roomData.keySet()) {\n String roomName = String.valueOf(((JSONObject) roomData.get(keyStr)).get(\"name\")); // get room name from data\n if (!roomName.equals(\"X\")) {// if room isn't named X\n roomCards.add(new RoomCard(roomName)); // add room to list\n }\n }\n // assign the list into its class variable\n this.roomCards = roomCards;\n }", "@Transactional\r\n\tpublic List<Room> getPosti(Integer posti){\r\n\t\treturn this.roomRepository.findByPosti(posti);\r\n\t}", "private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }" ]
[ "0.6927393", "0.6779225", "0.6665606", "0.6654849", "0.65720665", "0.65048325", "0.6500146", "0.6473996", "0.6473047", "0.6459462", "0.6419169", "0.6386586", "0.63848627", "0.6339667", "0.6329025", "0.63188434", "0.6309927", "0.6276832", "0.62631404", "0.62470937", "0.619108", "0.61832905", "0.61381155", "0.61362493", "0.61331093", "0.6112128", "0.6094804", "0.608393", "0.60815173", "0.6080396", "0.60723734", "0.60582507", "0.60395396", "0.60321206", "0.6029599", "0.6018334", "0.6018193", "0.6016022", "0.60137796", "0.6008588", "0.60017055", "0.6000327", "0.59982544", "0.5979455", "0.59788656", "0.59654874", "0.5965329", "0.59591967", "0.5954968", "0.5952115", "0.5949554", "0.5949554", "0.5938598", "0.593773", "0.59326804", "0.5925457", "0.59181404", "0.59103715", "0.5908179", "0.5908028", "0.5907398", "0.59067", "0.5894485", "0.5889381", "0.5881329", "0.5878773", "0.5870823", "0.58584327", "0.58511114", "0.5849474", "0.58347857", "0.58326846", "0.58304423", "0.58294874", "0.5828714", "0.5826153", "0.58256596", "0.58018184", "0.579989", "0.5798825", "0.579754", "0.57923424", "0.57892483", "0.5787282", "0.57870144", "0.57834816", "0.5783257", "0.57817847", "0.5777429", "0.57693654", "0.57578355", "0.575634", "0.5755184", "0.57520473", "0.5738142", "0.573561", "0.5723074", "0.5721101", "0.57197744", "0.5718908", "0.57179654" ]
0.0
-1
methode permettant de mettre un item en plus dans l'inventaire du player
public void takeItem(final String pStringItem, final Item pItem){this.aItemsList.takeItem(pStringItem,pItem);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean addPlayerItem(PlayerItem playerItem);", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}", "public void addItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() + item.getCount());\r\n return;\r\n }\r\n }\r\n inventoryItems.add(item);\r\n }", "boolean addSteam(ItemStack me, int amount, EntityPlayer player);", "@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }", "@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\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\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\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\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\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\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\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\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\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\tMethods.removeColor(\r\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\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.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\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.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\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.getEnchantmentCategory(\r\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\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\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\"T1\")) {\r\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\tlore1.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T2\")) {\r\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\tlore2.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T3\")) {\r\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\tlore3.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T4\")) {\r\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\tlore4.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T5\")) {\r\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\tlore5.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T6\")) {\r\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\tlore6.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\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\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\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\t\t\t\t\t}\r\n\t\t\t\t\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\t\t\t}\r\n\t\t\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\t}\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}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\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\tMethods.removeColor(\r\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\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.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\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.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\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.getEnchantmentCategory(\r\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\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\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\"T1\")) {\r\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\tlore1.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T2\")) {\r\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\tlore2.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T3\")) {\r\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\tlore3.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T4\")) {\r\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\tlore4.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T5\")) {\r\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\tlore5.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T6\")) {\r\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\tlore6.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\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\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\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\t\t\t\t\t}\r\n\t\t\t\t\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\t\t\t}\r\n\t\t\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\t}\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}\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}\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}\r\n\t\t}\r\n\t}", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public void carry(Item item)\n {\n\n // Check if item to be added doesn't go over carry limit.\n if (!((getPerson(PLAYER).getWeight() + item.getWeight()) > getPerson(PLAYER).getCarryLimit())){\n getPerson(PLAYER).getInventory().getItems().add(item); \n\n removeRoomItem(item);\n System.out.println();\n System.out.println(item.getName() + \" has been added to your bag.\");\n System.out.println(\"You are carrying \" + getPerson(PLAYER).getWeight()+ \"kg.\");\n }\n else {\n System.out.println(\"Your bag is too heavy to add more items.\");\n }\n\n }", "public int getAddItems(int totalCollected, int totalItemInGame);", "@Override\n public Item vendItem(Item item) {\n allItems.put(item.getItemId(), item);\n return item;\n }", "@Override\n\tpublic boolean inventory(Player player, Item item, int opcode) {\n\t\treturn false;\n// Clan channel = ClanRepository.get(player.clan);\n// if (channel == null) {\n// player.send(new SendMessage(\"You need to be in a clan to do this!\"));\n// return true;\n// }\n// player.inventory.remove(item);\n// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));\n// channel.showcaseItems.add(showcaseReward.getId());\n// player.send(new SendMessage(\"Inside the box you found \" + showcaseReward.getName() + \"! Showcase size: \" + channel.showcaseItems.size() + \"/28\", SendMessage.MessageColor.DARK_PURPLE));\n// return true;\n\t}", "public int addItem(Item i);", "@Override\n\tpublic void onHit(WorldObj obj, Items item) {\n\t\t\n\t\tcounter++;\n\t}", "@Override\n public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) \n {\n if (item.itemID == mod_TFmaterials.RubyPickaxe.itemID)\n {\n \t//player.addStat(mod_TFmaterials.RubyPickAchieve, 1);\n \tplayer.addStat(mod_TFmaterials.RubyPickAchieve, 1);\n }\n }", "public void withdrawAll() {\r\n for (int i = 0; i < container.capacity(); i++) {\r\n Item item = container.get(i);\r\n if (item == null) {\r\n continue;\r\n }\r\n int amount = owner.getInventory().getMaximumAdd(item);\r\n if (item.getCount() > amount) {\r\n item = new Item(item.getId(), amount);\r\n container.remove(item, false);\r\n owner.getInventory().add(item, false);\r\n } else {\r\n container.replace(null, i, false);\r\n owner.getInventory().add(item, false);\r\n }\r\n }\r\n container.update();\r\n owner.getInventory().update();\r\n }", "private void givePlayer(ItemStack item,EntityPlayer entityplayer){\n ItemStack itemstack3 = entityplayer.inventory.getItemStack();\n if(itemstack3 == null){\n \tentityplayer.inventory.setItemStack(item);\n }\n else if(NoppesUtilPlayer.compareItems(itemstack3, item, false, false)){\n\n int k1 = item.stackSize;\n if(k1 > 0 && k1 + itemstack3.stackSize <= itemstack3.getMaxStackSize())\n {\n itemstack3.stackSize += k1;\n }\n }\n }", "private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMode() && \n (item.getName().equals(\"Helmet\")\n || item.getName().equals(\"Shield\")\n || item.getName().equals(\"Armour\"))){\n this.defenseNum = 0;\n System.out.println(\"This shop has 0 defensive item left.\");\n }\n if (item.getPrice() > gold) {\n System.out.println(\"You don't have enough money.\");\n }\n loadItem(item.getName());\n world.getCharacter().setGold(gold - item.getPrice());\n System.out.println(\"You have bought Item : \" + item.getName() + \".\");\n }", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "public int addItem(Item item, int n) {\r\n if(isContradicting(item)){\r\n System.out.println(CONTRADICTING_MSG1+ item.getType()+CONTRADICTING_MSG2);\r\n return CONTRADICTING;\r\n }\r\n if (super.addItem(item, n) == ZERO) {\r\n if (unitMap.containsKey(item.getType())) {\r\n if ((n+ unitMap.get(item.getType()))* item.getVolume() > capacity * FIFTY_PERCENT) {\r\n return checkNewN(item,n, true);\r\n }\r\n //if less then 50%\r\n else {\r\n unitMap.put(item.getType(),unitMap.get(item.getType()) + n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n //item not in map:\r\n else{\r\n if ((item.getVolume() * n) > capacity * 0.5){\r\n return checkNewN(item,n, false);\r\n }\r\n //if less then 50\r\n else {\r\n unitMap.put(item.getType(), n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n }\r\n //no place in locker:\r\n else return NO_ITEMS_ADDED;\r\n }", "public abstract boolean canAddItem(Player player, Item item, int slot);", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public interface Item {\n\t/**\n\t * Use the item on the player. If it's gold, it is added to his inventory. Else, it directly modify the player stats.\n\t * @param character - the player ( a monster cannot use an item) who's using an item\n\t * @return the player with his new stats due to the item\n\t */\n\tpublic Character isUsedBy(Character character);\n}", "public boolean use(Inventory i, Player p);", "public boolean updatePlayerItem(PlayerItem playerItem);", "void add(Item item);", "@SideOnly(Side.CLIENT)\n/* */ public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List, boolean par4) {\n/* 59 */ if (GuiScreen.isShiftKeyDown()) {\n/* 60 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome1.lore\"));\n/* 61 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome2.lore\"));\n/* 62 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome3.lore\"));\n/* 63 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 64 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome4.lore\"));\n/* 65 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome5.lore\"));\n/* 66 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 67 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome6.lore\"));\n/* 68 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome7.lore\"));\n/* 69 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome8.lore\"));\n/* 70 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 71 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome9.lore\"));\n/* 72 */ } else if (GuiScreen.isCtrlKeyDown()) {\n/* 73 */ par3List.add(StatCollector.translateToLocal(\"item.FRVisPerSecond.lore\"));\n/* 74 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRAerCost.lore\") + (AerCost / 100.0D * 10.0D));\n/* 75 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRTerraCost.lore\") + (TerraCost / 100.0D * 10.0D));\n/* 76 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRIgnisCost.lore\") + (IgnisCost / 100.0D * 10.0D));\n/* 77 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRPerditioCost.lore\") + (PerditioCost / 100.0D * 10.0D));\n/* */ } else {\n/* */ \n/* 80 */ par3List.add(StatCollector.translateToLocal(\"item.FRShiftTooltip.lore\"));\n/* 81 */ par3List.add(StatCollector.translateToLocal(\"item.FRViscostTooltip.lore\"));\n/* */ } \n/* */ \n/* 84 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* */ }", "@Override\n public void addItem(ItemType item) {\n if (curArrayIndex > items.length - 1) {\n System.out.println(item.getDetails() + \" - This bin is full. Item cannot be added!\");\n }\n else if (item.getWeight() + curWeight <= maxWeight) {\n curWeight += item.getWeight();\n items[curArrayIndex++] = item;\n }\n else {\n System.out.println(item.getDetails() + \" - Overweighted. This item cannot be added!\");\n }\n if (item.isFragile()) {\n setLabel(\"Fragile - Handle with Care\");\n }\n\n }", "public void addItem(Item item) {\n if (winner(item)) {\n listItems.add(item);\n }\n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}", "@Override\n public void onSmelting(EntityPlayer player, ItemStack item) \n {\n \n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }", "public static void addItem(Item item)\n {\n inventory.add(item);\n if(!(item.getRoomNumber() == -1 || item.getEventNumber() == -1))\n {\n Map.getRoom(item.getRoomNumber()).getEvent(item.getEventNumber()).enable();\n }\n }", "public void useItem(Item i)\n\t{\n\t\tString name = i.getName();\n\t\tPlayer player = GameController.getPlayer();\n\t\t\n\t\tswitch(name)\n\t\t{\n\t\tcase \"Polar Pop\":\n\t\t\tplayer.addHealth(30);\n\t\t\tTextHandler.displayText(\"Mmm, tastes like root beer. You restored 30 HP.\");\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Klondike Bar\":\n\t\t\tplayer.addHealth(50);\n\t\t\tTextHandler.displayText(\"What would you dooOOOoooo, for a klondike bar? Ha. You restored 50 HP.\");\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Big tiddy goth GF\":\n\t\t\tplayer.setHealth(player.getMaxHealth());\n\t\t\tplayer.setMana(player.getMaxMana());\n\t\t\tplayer.setXp(player.getMaxXp());\n\t\t\tTextHandler.displayText(\"Very scrumptious. You have regained all life and mana, and have even gained a new level\");\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tTextHandler.displayText(\"There is no use for \" + name + \".\");\n\t\t}\n\t}", "public void pickUp(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (roomItems.contains(item)) {\n\t\t\tif (checkCapacity(item)) {\n\t\t\t\tsuper.addItem(item);\n\t\t\t\troom.removeItem(item);\n\t\t\t\tSystem.out.println(\"Picked up \" + item);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Not enough capacity.\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"No item '\" + itemName + \"' in the room.\");\n\t\t}\n\t}", "public Inventory<T> add(final T item) {\n if (item == null) {\n return this;\n }\n final HashMap<T, Integer> freshMap = new HashMap<>(items);\n freshMap.put(item, items.get(item) + 1);\n return new Inventory<T>(enums, Collections.unmodifiableMap(freshMap));\n }", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }", "public void increment() {\n items++;\n }", "abstract void applyItem(JuggernautPlayer player, int level);", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "@Override\r\n public int getItemQuantity() {\n return this.quantity;\r\n }", "public void onInventoryChanged();", "public void takeItem(String name, Player player)\n {\n int i=items.size()-1;\n while(i>=0){\n if(items.get(i).getName().equals(name))\n {\n player.addItem(items.get(i));\n System.out.println(\"You take the \"+items.get(i).getName()+\"!\");\n items.remove(i);\n return;\n }\n i--;\n }\n System.out.println(\"Action failed. Review your input and try again!\");\n }", "@Override\n @Test\n public void equipAnimaTest() {\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.equipItem(anima);\n assertFalse(sorcererAnima.getItems().contains(anima));\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.addItem(anima);\n sorcererAnima.equipItem(anima);\n assertEquals(anima,sorcererAnima.getEquippedItem());\n }", "public void softAddItem(ItemStack item, Player player){\n\t\tHashMap<Integer,ItemStack> excess = player.getInventory().addItem(item);\n\t\tfor( Map.Entry<Integer, ItemStack> me : excess.entrySet() ){\n\t\t\tplayer.getWorld().dropItem(player.getLocation(), me.getValue() );\n\t\t}\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void addItem(Item newItem) {\n for (Item i : inventory) {\n if (newItem.getClass().equals(i.getClass())) {\n i.setQuantity(i.getQuantity() + newItem.getQuantity());\n return;\n }\n }\n inventory.add(newItem);\n }", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void use(Consume item)\r\n {\r\n int gain = item.getRating();\r\n health += gain;\r\n \r\n if (health > maxHealth)\r\n health = maxHealth;\r\n \r\n say(\"I gained \" + gain + \" health by using \" + item.getName() + \" and now have \" + health + \"/\" + maxHealth);\r\n \r\n items.remove(item);\r\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tfinal int position = (Integer) v.getTag();\n\t\tfinal MyItem mItem = rows.get(position);\n\t\tfinal MyItemManager mngr = new MyItemManager(MyItemAdapter.mContext);\n\t\tVibrator vibe = (Vibrator) mContext\n\t\t\t\t.getSystemService(Context.VIBRATOR_SERVICE);\n\t\tMediaPlayer mp = MediaPlayer.create(this.mContext, R.raw.explosion_2);\n\t\tLog.d(\"MyItemAdapter.onClick\", \"Item id: \" + mItem.getId()\n\t\t\t\t+ \"\\n Item Name :\" + mItem.getName() + \"mItem charges: \"\n\t\t\t\t+ mItem.getItemCharges());\n\t\tLog.i(\"onclick:\", \"position is: \" + v.getTag());\n\t\tswitch (v.getId()) {\n\t\tcase R.id.bFire:\n\t\t\tif (mItem.getItemCharges() > 0) {\n\t\t\t\tLog.d(\"MyItemAdapter.onClick\", \"bFire Clicked\");\n\t\t\t\tmp.start();\n\t\t\t\tvibe.vibrate(100);\n\t\t\t\tmngr.fireCharge(mItem);\n\t\t\t\trows.get(position).setItemCharges(mItem.getItemCharges() - 1);\n\t\t\t\tmngr.close();\n\t\t\t\trefresh(rows);\n\t\t\t} else if (mItem.getItemCharges() <= 0) {\n\t\t\t\tLog.d(\"MyItemAdapter\", \"Item Charges <=0\");\n\t\t\t\tQustomDialogBuilder alert = new QustomDialogBuilder(mContext);\n\t\t\t\talert.setTitle(\"No More Charges!!\");\n\t\t\t\talert.setMessage(\"Do you want to reload the item?\");\n\t\t\t\talert.setTitleColor(\"#ff0101\");\n\t\t\t\talert.setDividerColor(\"#ff0101\");\n\t\t\t\talert.setPositiveButton(\"Yes\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t// Add charges\n\t\t\t\t\t\t\t\tenterCharges(mContext, mItem);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\talert.setNegativeButton(\"No\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t// Canceled.\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tfinal AlertDialog dialog = alert.create();\n\t\t\t\tdialog.show();\n\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase R.id.bDelete:\n\t\t\tLog.d(\"MyItemAdapter.onClick\", \"bDelete Clicked\");\n\t\t\tQustomDialogBuilder alert = new QustomDialogBuilder(\n\t\t\t\t\tMyItemAdapter.mContext);\n\t\t\talert.setTitle(\"Confirm Item Deletion\");\n\t\t\talert.setMessage(\"Are you sure you want to delete item ?\");\n\t\t\talert.setTitleColor(\"#ff0101\");\n\t\t\talert.setDividerColor(\"#ff0101\");\n\t\t\talert.setPositiveButton(\"Yes\",\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t// Add charges\n\t\t\t\t\t\t\tmngr.deleteItem(mItem.getId());\n\t\t\t\t\t\t\trows.remove(position);\n\t\t\t\t\t\t\trefresh(rows);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\talert.setNegativeButton(\"No\",\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t// Canceled.\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tfinal AlertDialog dialog = alert.create();\n\t\t\tdialog.show();\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "public void useItem(int num) {\r\n\t\tif (num < currentPlayer.getConsumables().size()) {\r\n\t\t\tString item = currentPlayer.getConsumables().get(num);\r\n\t\t\t// Find corresponding name\r\n\t\t\tif (item.contentEquals(\"LargeHealing\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Large Health Potion** :gift_heart:\",true);\r\n\t\t\t\tupdateHealth(currentPlayer,2);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t} else if (item.contentEquals(\"SmallHealing\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Small Health Potion** :heartpulse:\",true);\r\n\t\t\t\tupdateHealth(currentPlayer,1);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t} else if (item.contentEquals(\"Swift\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Potion of Swiftness** :ice_skate:\",true);\r\n\t\t\t\tcurrentPlayer.updateBoots(1);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t} else if (item.contentEquals(\"Strength\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Potion of Strength** :muscle:\",true);\r\n\t\t\t\tcurrentPlayer.updateSwords(2);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t}\r\n\t\t}\r\n\t\tupdateInfo(currentPlayer, false);\r\n\t\tupdatePlayArea(currentPlayer, false);\r\n\t}", "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }", "public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }", "Items(double cost){\n\tthis.cost=cost;\n\titemId++;\n\tcurrentID=itemId;\n}", "public void carry(Item item) {\n\t\trocketWeight += item.getWeight();\n\t}", "public void checkItem() {\n Entity t = BombermanGame.checkCollisionItem(this.rectangle);\n if (t instanceof SpeedItem) {\n speed ++;\n ((SpeedItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof FlameItem) {\n flame = true;\n ((FlameItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof BombItem) {\n max_bomb ++;\n ((BombItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof Portal) {\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n }", "InventoryItem getInventoryItem();", "@Override\n\t\t\t\t\tpublic void update(float delta) {\n\t\t\t\t\t\tUpdateItem(delta);\n\t\t\t\t\t}", "@Override\n public void onSmelting(EntityPlayer player, ItemStack item) {\n }", "@Override\n\tpublic int use() {\n\t\treturn Game.getInstance().getPlayer().equip(this);\n\t}", "@Override\r\n public void updatedSaleInventory(ItemAndQuantity lastItem) {\r\n }", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "@FXML\n\tpublic void useItem(ActionEvent event){\n\t\t\tString itemName=\"\";\n\t\t\titemName = itemselect.getText();\n\t\t\n\t\t\tif(itemName.equals(\"\")) {\t// Checks if selected item is blank\n\t\t\t\n\t\t\t\tevents.appendText(\"Select an item from the Inventory box before clicking this button!\\n\");\t\n\t\t\t\treturn;\n\t\t\t\n\t\t\t} else {\t// Begins getting item information\n\t\t\t\tItem i;\n\t\t\t\tint x;\n\t\t\t\ti=Item.getItem(ItemList, itemName);\t// Get item from the item list\n\t\t\t\t\n\t\t\t\tif(i == null) {\t// Check if the item isnt found in the item list\n\t\t\t\t\t\n\t\t\t\t\tevents.appendText(\"Item not Found!\\n\");\n\t\t\t\t\titemselect.setText(\"\");\n\t\t\t\t\titemStats.setText(\"\");\n\t\t\t\t} else {\t// Check what type of item was used\n\t\t\t\t\tif(i.getStat().equals(\"HP\")) {\n\t\t\t\t\t\tint y=p.getHP()+i.getChange();\n\t\t\t\t\t\tif(y>p.getMaxHP()) {\n\t\t\t\t\t\t\tp.setHP(p.getMaxHP());\n\t\t\t\t\t\t\tevents.appendText(\"Health Restored to Full!\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setHP(y);\n\t\t\t\t\t\tevents.appendText(\"Health Restored by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t\t}else if(i.getStat().equals(\"DMG\")) {\n\t\t\t\t\tp.setDMG(p.getDMG()+i.getChange());\n\t\t\t\t\tgdmg.setText(\"\"+p.getDMG());\n\t\t\t\t\tevents.appendText(\"Damage Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t}else {\n\t\t\t\t\tif(p.getEV()+i.getChange()>100) {\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + (100-p.getEV())+\", Max Evasion is 100\\n\");\n\t\t\t\t\t\tp.setEV(100);\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t}else {\n\t\t\t\t\t\tp.setEV(p.getEV()+i.getChange());\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Remove the item from the inventory\n\t\t\t\tx=Inventory.indexOf(i);\n\t\t\t\tInventory.remove(x);\n\t\t\t\tinventoryList.getItems().remove(x);\n\t\t\t\titemselect.setText(\"\");\n\t\t\t\titemStats.setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }", "public String getDescription() {return \"Use an item in your inventory\"; }", "public void nextItem() {\n\t\tif(currentPlayingItem==null) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (playMode) {\n\t\t\tcase PLAY_MODE_REPEAT_ONE:\n\t\t\t\tplayItem(currentPlayingItem);\n\t\t\t\treturn;\n\t\t\tcase PLAY_MODE_SHUFFLE:\n\t\t\t\trandomItem();\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tPlayableItem nextItem = currentPlayingItem.getNext(playMode==PLAY_MODE_REPEAT_ALL);\n\t\tif(nextItem==null) {\n\t\t\tif(!isPlaying()) wakeLockRelease();\n sendBroadcast(new Intent(\"com.andreadec.musicplayer.newsong\")); // Notify the activity that there are no more songs to be played\n updateNotification();\n\t\t} else {\n\t\t\tplayItem(nextItem);\n\t\t}\n\t}", "public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public void addItem(Carryable g) {\r\n if (numItems < MAX_CART_ITEMS)\r\n cart[numItems++] = g;\r\n }", "private void updateShop(List<ItemType> items, int level) {\n\t\tfor (ItemType item : items) {\n\t\t\tString text = item.getTextureString();\n\t\t\ttext = item instanceof SpecialType ? text\n\t\t\t\t\t: text.substring(0, text.length() - 1)\n\t\t\t\t\t\t\t+ Integer.toString(level);\n\t\t\tTexture texture = textureManager.getTexture(text);\n\t\t\tImageButton button = generateItemButton(texture);\n\n\t\t\tbutton.addListener(new ClickListener() {\n\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\tstatus.setText(item.getName());\n\t\t\t\t\tif (selectedHero == null) {\n\t\t\t\t\t\tstatus.setText(\"Unsuccessful shopping, No hero exist.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectedHero.getHealth() <= 0) {\n\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\"Your Commander is dead. Can't buy anything.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tboolean enoughResources = checkCost(selectedHero.getOwner(),\n\t\t\t\t\t\t\titem);\n\t\t\t\t\tif (enoughResources) {\n\t\t\t\t\t\tif (item instanceof WeaponType) {\n\t\t\t\t\t\t\tWeapon weapon = new Weapon((WeaponType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(weapon);\n\t\t\t\t\t\t\tstatus.setText(boughtString + weapon.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Weapon) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else if (item instanceof ArmourType) {\n\t\t\t\t\t\t\tArmour armour = new Armour((ArmourType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(armour);\n\t\t\t\t\t\t\tstatus.setText(boughtString + armour.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Armour) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tboolean transactSuccess;\n\t\t\t\t\t\t\tSpecial special = new Special((SpecialType) item);\n\t\t\t\t\t\t\ttransactSuccess = selectedHero\n\t\t\t\t\t\t\t\t\t.addItemToInventory(special);\n\t\t\t\t\t\t\tif (transactSuccess) {\n\t\t\t\t\t\t\t\tstatus.setText(boughtString + special.getName()\n\t\t\t\t\t\t\t\t\t\t+ \"(Special) for \"\n\t\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\t\t\"Unsuccessful Shopping, can only hold 4 specials\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedHero.setStatsChange(true);\n\t\t\t\t\t\ttransact(selectedHero.getOwner(), item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString mes = \"Not enough resources.\";\n\t\t\t\t\t\tstatus.setText(mes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprivate boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tscrollTable.add(button).width(iconSize).height(iconSize).top();\n\t\t\tString stats = getItemStats(item, level);\n\t\t\tString cost = getItemCost(item, level);\n\t\t\tscrollTable.add(new Label(stats, skin)).width(iconSize).top()\n\t\t\t\t\t.left();\n\t\t\tscrollTable.add(new Label(cost, skin)).width(iconSize).top().left();\n\t\t\tscrollTable.row();\n\t\t}\n\t}", "protected int addItemAdditionalFunctionality(Item item, int n)\r\n {\r\n double ratio =\r\n (double)(this.getInventory().get(item.getType()) * item.getVolume()) / this.getCapacity();\r\n return ratio > PERCENT_50 ? this.transferItemsToLTS(item) : VALID_VALUE;\r\n }", "public void buy(Item item) {\n // remove money from wallet\n try { \n wallet.removeMoney(item.getPrice());\n // remove item from room\n currentRoom.removeItem(item);\n // add item to inventory\n addToInventory(item);\n } catch (IllegalArgumentException e) {\n System.err.println(\"You don't have enough money to purchase \" + item.getDescription());\n }\n\n\n }", "private void addPlayerSheild() {\n this.playerShield += 1;\n }", "private void onLoad(Item item) {\n ImageView view = new ImageView(item.getIcon());\n addDragEventHandlers(view, DRAGGABLE_TYPE.ITEM, unequippedInventory, equippedItems);\n addEntity(item, view);\n unequippedInventory.getChildren().add(view);\n System.out.println(\"Get new Item \" + item.getName() + \" in Inventory\");\n }", "@Test\n\tpublic void testPickUpItem() {\n\t\tSquare square = new Square();\n\t\tItem item = new LightGrenade();\n\t\t\n\t\tsquare.addItem(item);\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tassertEquals(0, player.getAllItems().size());\n\t\tassertFalse(player.hasItem(item));\n\t\t\n\t\tplayer.pickUp(item);\n\t\tassertTrue(player.hasItem(item));\n\t}", "private void handleIncQuestrelatedItem(Item item) {\r\n\t\t\tif(item.getQuestId() == this.getCurrentQuest().getId()) {\r\n\t\t\t\tthis.getCurrentQuest().incrementProgress();\r\n\t\t\t}\r\n\t\t\tif(!(this.getCurrentQuest().isCompleted()) && this.getCurrentQuest().getProgress() >= this.getCurrentQuest().getGoal()) {\r\n\t\t\t\tthis.getCurrentQuest().setQuestCompleted(true);\r\n\t\t\t\tthis.getCurrentQuest().setSendMessageNext(true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t}", "public Purchase buyItem(Item item) {\n\t\tKeybladeWielder player = (KeybladeWielder) this.actorService.findByPrincipal();\n\t\t// Solo lo podremos comprar si disponemos del Munny que cuesta el item\n\t\tAssert.isTrue(item.getMunnyCost() <= player.getMaterials().getMunny());\n\t\tAssert.isTrue(item.getOnSell() == true);\n\t\tPurchase p = this.purchaseService.create();\n\t\tDate currentDate = new Date(System.currentTimeMillis() - 100);\n\n\t\tp.setPlayer(player);\n\t\tp.setPurchaseDate(currentDate);\n\t\tp.setItem(item);\n\t\tplayer.getMaterials().setMunny(player.getMaterials().getMunny() - item.getMunnyCost());\n\n\t\t// Hacemos set de la que sera la fecha en la que el objeto expirara\n\t\tDate expirationDate = new Date(currentDate.getTime() + p.getItem().getExpiration() * 24 * 60 * 60 * 1000);\n\t\tp.setExpirationDate(expirationDate);\n\n\t\tthis.purchaseService.save(p);\n\n\t\tthis.keybladeWielderService.save(player);\n\n\t\treturn p;\n\n\t}", "boolean useItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n String nameOfItem = \"\";\n String useItem = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n useItem = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\") && inventory.getUseable(nameOfItem)) {\n\n System.out.println(\"You have dropped: \" + nameOfItem);\n inventory.removeItemInventory(nameOfItem);\n player.setEnergy(player.getEnergy() + 20);\n player.setHealth(player.getHealth() + 5);\n\n return true;\n }\n return false;\n }", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "public int addItemStack(ItemStack itemStack) {\n Item item = itemStack.getItem();\n int amount = itemStack.getAmount();\n int added = 0;\n\n List<ItemStack> itemStacksToRemove = new ArrayList<>();\n for (ItemStack itemStack1 : this.ITEMS) {\n if (itemStack1.getItem() == item) {\n amount += itemStack1.getAmount();\n itemStacksToRemove.add(itemStack1);\n }\n }\n\n // clear inventory\n for (ItemStack itemStack1 : itemStacksToRemove)\n this.ITEMS.remove(itemStack1);\n\n System.out.println(String.format(\"Total amount of %s: %d\", item.getName(), amount));\n\n int stack_size = item.getMaxStack();\n int stacks = amount / stack_size;\n int last_stack = amount % stack_size;\n\n System.out.println(String.format(\"Stack size: %d, full stacks: %s, last stack: %d, inv size: %d, inv full: %d\", stack_size, stacks, last_stack, this.getSize(), this.ITEMS.size()));\n\n // add full stacks\n for (int i = 0; i < stacks; i++) {\n if (this.ITEMS.size() > this.getSize())\n break;\n\n System.out.println(\"Added full stack\");\n this.ITEMS.add(new ItemStack(item, stack_size));\n added += stack_size;\n }\n\n // add last (not full) stack\n if (last_stack != 0 && this.ITEMS.size() < this.getSize()) {\n System.out.println(\"Added partial stack\");\n this.ITEMS.add(new ItemStack(item, last_stack));\n added += last_stack;\n }\n\n for (InventoryChangedEvent listener : listeners)\n listener.onInventoryChanged(this);\n\n return added;\n }", "public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }", "SimpleInventory getOpenedInventory(Player player);", "public int addItem(Itemset i);", "public void addItem(Item item) {\r\n\t\tif (items.containsKey(item)) {\r\n\t\t\titem.increaseCount();\r\n\t\t\titems.put(item, item.getCount());\r\n\t\t} else {\r\n\t\t\titems.put(item, item.getCount());\r\n\t\t}\r\n\t}", "public void fireOnItemAddedToInventoryCommands();", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public void addPotion() {\n setPotion(getPotion() + 1);\n }", "private void sellItem(ShopItem item) {\n if (!world.ifHasItem(item.getName())) {\n System.out.println(\"You don't have Item : \" + item.getName());\n return;\n }\n world.removeItem(item.getName());\n int gold = world.getCharacter().getGold().get();\n world.getCharacter().setGold(gold + item.getPrice());\n System.out.println(\"You have sold Item : \" + item.getName());\n }", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }" ]
[ "0.7008324", "0.69481593", "0.6892321", "0.6701589", "0.6651188", "0.6619957", "0.65541893", "0.65334404", "0.6526463", "0.65051705", "0.6497016", "0.648562", "0.64810866", "0.6439577", "0.64294934", "0.6407539", "0.64052975", "0.63667285", "0.636522", "0.63563293", "0.6341557", "0.6321222", "0.63145036", "0.6308685", "0.63062567", "0.63042367", "0.63040113", "0.62941396", "0.628355", "0.6272609", "0.6269422", "0.62645024", "0.6263538", "0.62609965", "0.62566966", "0.62474936", "0.62462246", "0.6243569", "0.6239654", "0.6239197", "0.62210524", "0.621974", "0.62131155", "0.6205734", "0.6186964", "0.6179657", "0.6177598", "0.61760557", "0.6175422", "0.6163808", "0.6161748", "0.61562634", "0.6154612", "0.61509746", "0.61438864", "0.6142333", "0.6129878", "0.61120176", "0.61068976", "0.6106186", "0.61011505", "0.6097019", "0.6087896", "0.60839844", "0.60748667", "0.6074765", "0.6074392", "0.60743713", "0.6065361", "0.60649973", "0.60600895", "0.6059465", "0.6058004", "0.6057935", "0.60457426", "0.6036486", "0.6033348", "0.60191876", "0.6015563", "0.60129696", "0.60107756", "0.60010064", "0.59986943", "0.5995025", "0.59909254", "0.59895974", "0.5989343", "0.5982455", "0.5977339", "0.59745693", "0.59722465", "0.59712905", "0.59709936", "0.59690493", "0.5966888", "0.5961081", "0.59608847", "0.59592426", "0.5959139", "0.5946133", "0.59446716" ]
0.0
-1
methode permettant de retirer un item de l'inventaire du player
public void dropItem(final String pStringItem){this.aItemsList.dropItem(pStringItem);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InventoryItem getInventoryItem();", "public PlayerItem getPlayerItemById(int playerItemId);", "SimpleInventory getOpenedInventory(Player player);", "ItemStack getItem();", "ItemStack getEggItem(IGeneticMob geneticMob);", "@SideOnly(Side.CLIENT)\r\n public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)\r\n {\r\n return Item.getItemFromBlock(MainRegistry.blockCampfireUnlit);\r\n }", "public Items getItem(String name)\n {\n return Inventory.get(name);\n }", "private void grabItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryAdd(itemFound, currentRoom);\n }\n }", "public List<PlayerItem> getAllPlayerItemById(Player player);", "public List<PlayerItem> getSpecific(int playerItemId);", "public Item getItem() { \n return myItem;\n }", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\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\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\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\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\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\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\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\tMethods.removeColor(\r\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\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.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\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.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\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.getEnchantmentCategory(\r\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\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\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\"T1\")) {\r\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\tlore1.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T2\")) {\r\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\tlore2.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T3\")) {\r\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\tlore3.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T4\")) {\r\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\tlore4.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T5\")) {\r\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\tlore5.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T6\")) {\r\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\tlore6.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\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\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\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\t\t\t\t\t}\r\n\t\t\t\t\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\t\t\t}\r\n\t\t\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\t}\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}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\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\tMethods.removeColor(\r\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\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.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\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.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\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.getEnchantmentCategory(\r\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\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\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\"T1\")) {\r\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\tlore1.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T2\")) {\r\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\tlore2.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T3\")) {\r\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\tlore3.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T4\")) {\r\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\tlore4.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T5\")) {\r\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\tlore5.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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} else if (tier\r\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.contains(\r\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\"T6\")) {\r\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\tlore6.add(0, Methods\r\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.color(ench));\r\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\tcontinue;\r\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\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\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\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\t\t\t\t\t}\r\n\t\t\t\t\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\t\t\t}\r\n\t\t\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\t}\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}\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}\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}\r\n\t\t}\r\n\t}", "public boolean use(Inventory i, Player p);", "public Item getItem(int itemIndex){\n\t\treturn inventoryItems[itemIndex];\n\t}", "List<InventoryItem> getInventory();", "@Override\n\tpublic boolean inventory(Player player, Item item, int opcode) {\n\t\treturn false;\n// Clan channel = ClanRepository.get(player.clan);\n// if (channel == null) {\n// player.send(new SendMessage(\"You need to be in a clan to do this!\"));\n// return true;\n// }\n// player.inventory.remove(item);\n// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));\n// channel.showcaseItems.add(showcaseReward.getId());\n// player.send(new SendMessage(\"Inside the box you found \" + showcaseReward.getName() + \"! Showcase size: \" + channel.showcaseItems.size() + \"/28\", SendMessage.MessageColor.DARK_PURPLE));\n// return true;\n\t}", "Collection<Item> getInventory();", "void openInventory(Player player, SimpleInventory inventory);", "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "ItemStack get(final Player player) {\r\n\t\tthis.update(player);\r\n\r\n\t\treturn this.playerHasTool ? this.getToolWhenHas() : this.getToolWhenHasnt();\r\n\t}", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public Item getItemBack(Player character) {\n itemPlacedRoom = false;\n Item item = character.items.get(character.getItemOwned2().getName());\n if(item != null) {\n if(canReceiveItem(character) == true) {\n items.put(item.getName(), item);\n } else {\n currentRoom.addItem(item);\n itemPlacedRoom = true;\n }\n character.setItemOwned2(null);\n }\n return item;\n }", "@Override\n public Object getItem(int arg0) {\n Log.d(TAG, \"getItem: \"+fromName.get(arg0));\n return rooms.get(arg0);\n }", "public boolean addPlayerItem(PlayerItem playerItem);", "private Item findItemById(String curId, Inventory invent){\n\t\tif (invent == null) return null;\n\t\tfor (Item item : invent){\n\t\t\tif (item.getId().equals(curId)){\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int getITEM() {\r\n return item;\r\n }", "public Product getProduct(int i){\n return inventory.get(i);\n }", "public String getDescription() {return \"Use an item in your inventory\"; }", "@Override\n public ItemStack getButtonItem(Player player) {\n ItemStack superItem = super.getButtonItem(player);\n\n superItem.setDurability(durability);\n\n return superItem;\n }", "@Override\n\tpublic void openInventory(EntityPlayer player) {\n\t\t\n\t}", "@Override\n\tpublic void openInventory(EntityPlayer player) {\n\t\t\n\t}", "public Item getItemById(Integer itemId);", "public void onInventoryChanged();", "public interface IsInventoryItem extends IsSceneSpriteObject, hasUserActions {\n\n\n\t/** KeepHeld mode - normally a item is dropped back into the inventory after use.\n\t * This mode determines if it should be kept held on certain conditions **/\n\tpublic enum KeepHeldMode {\n\t\tnever,onuse\n\t}\n\n\n\tpublic InventoryPanelCore getNativeInventoryPanel();\n\n\n\tpublic void setPopedUp(Boolean settothis);\n\n\tpublic boolean isPopedUp();\n\n\n\tpublic void setKeepHeldMode(KeepHeldMode mode);\n\tpublic KeepHeldMode getKeepHeldMode();\n\n\n\n\n\t/**\n\t * returns the name of the inventory item associated with this icon\n\t * this should be the same as .sceneobjectsstate().objectsname\n\t * @return\n\t */\n\tpublic String getName();\n\n\t/**\n\t * should trigger a popup to pop if there is one\n\t */\n\tpublic void triggerPopup();\n\n\n\tpublic IsInventoryItemPopupContent getPopup();\n\n\n\t/**\n\t * This gets the widget that represents the visuals needed for a popup\n\t * For GWT apps, this will be something that implements \"asWidget()\"\n\t * @return\n\t */\n\t//public Object getPopupImpl();\n\n\n\tpublic enum IconMode {\t\t\n\t\tImage,Text,CaptionedImage\t\t\n\t}\n\n\n\tpublic SceneObject getAssociatedSceneObject();\n\n\tvoid updateState(InventoryObjectState sceneObjectData, boolean runOnLoad, boolean repositionObjectsRelativeToThis);\n\n\n\t//subclasses have to override these to provide their own more specific types\n\t@Override\t\n\tpublic InventoryObjectState getObjectsCurrentState();\n\n\t@Override\n\tpublic InventoryObjectState getTempState();\n\n\t@Override\n\tpublic InventoryObjectState getInitialState();\n\n\n\t/**\n\t * Setws the popup to appear at a specific zindex\n\t * @param expectedZIndex\n\t */\n\tpublic void setFixedZdepth(int expectedZIndex);\n\n\n\tpublic void setPopupsBackgroundToTransparent();\n\n\n\t/**\n\t * In future inventorys might have two or more modes that visually represent them (ie, text or text and image).\n\t * This might enable gameplay such as selecting a concept from a text list\n\t * @param currentInventoryMode\n\t */\n\tpublic void setIconMode(IconMode currentInventoryMode);\n\n\n\t/**\n\t * should trigger the inventorys onItemAdded commands - first local then global\n\t */\n\tpublic void fireOnItemAddedToInventoryCommands();\n\n\n\t/**\n\t * fired if the item is picked up\n\t * @param b\n\t */\n\tpublic void triggerPickedUp(boolean b);\n\n\n\tpublic void triggerPutDown();\n\t\n\n\n\t\n\n\n\n\n}", "public interface Item {\n\t/**\n\t * Use the item on the player. If it's gold, it is added to his inventory. Else, it directly modify the player stats.\n\t * @param character - the player ( a monster cannot use an item) who's using an item\n\t * @return the player with his new stats due to the item\n\t */\n\tpublic Character isUsedBy(Character character);\n}", "public TransactionResponse buyEnchantFromItem() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\ttry {\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\tif (price != 123456789) {\r\n \t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\tacc.depositAccount(price, tradePartner.getName());\r\n \t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\tim.removeEnchantment(giveItem, ench);\r\n \t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"PURCHASE_ENCHANTMENT_CHEST_MESSAGE\"), 1, calc.twoDecimals(price), hyperObject.getName(), tradePartner.getName()), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, 0.0, tradePartner.getName(), \"chestshop\");\r\n \t\t\t\t\t\t\ttradePartner.sendMessage(L.f(L.get(\"CHEST_ENCHANTMENT_BUY_NOTIFICATION\"), 1, calc.twoDecimals(price), hyperObject.getName(), p));\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyChestEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', owner='\" + tradePartner.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "@Override\n\t\tprotected JSONObject doInBackground(DatabaseConnection... params) {\n\t\t\treturn params[0].EquipItem(warrior_user, warrior_rightHand, warrior_leftHand, warrior_head, warrior_body, warrior_leg);\n\t\t}", "List<InventoryItem> getInventory(String username);", "public int getKeyBuyItem() {\r\n return getKeyShoot();\r\n }", "public Inventory searchForItem (TheGroceryStore g, Inventory i, String key);", "@SideOnly(Side.CLIENT)\n\t public Item getItem(World wordl, int x, int y, int z)\n\t {\n//\t return this.blockMaterial == Material.iron ? Items.iron_door : Items.wooden_door;\n\t \t return MGHouseItems.item_boat_door;\n\t }", "public int getKeySellItem() {\r\n return getKeyShoot();\r\n }", "public PlayerInventory load(Player player) {\n return new PlayerInventory(\n player,\n repository.byPlayer(player)\n .stream()\n .map(\n entity -> new LoadedItem(\n entity,\n service.retrieve(entity.itemTemplateId(), entity.effects())\n )\n )\n .collect(Collectors.toList())\n );\n }", "public static Item getItem(String itemName)\n {\n Item temp = null;\n for (Item inventory1 : inventory) {\n if (inventory1.getName().equals(itemName)) {\n temp = inventory1;\n }\n }\n return temp;\n }", "private void itemDecode(Player player) {\n\t\tPlayerInventory inventory = player.getInventory();\n\t\tItemStack heldItem = inventory.getItemInMainHand();\n\n\t\tif(heldItem.getItemMeta() instanceof BookMeta) {\n\t\t\tBookMeta meta = (BookMeta) heldItem.getItemMeta();\n\t\t\tif(meta.hasPages()) {\n\t\t\t\tList<String> data = meta.getPages();\n\t\t\t\tItemStack decode = CryptoSecure.decodeItemStack(data);\n\t\t\t\t\n\t\t\t\tif(decode != null) {\n\t\t\t\t\tinventory.addItem(decode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn;\n\t\t}\n\t}", "public static String getItemOn(Player p) {\r\n\t\tString on = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn on;\r\n\t}", "public PlayerInventory getInventory ( ) {\n\t\treturn extract ( handle -> handle.getInventory ( ) );\n\t}", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "@Override\n public Item getItemBySlot(Integer itemSlot) {\n return dao.getItemBySlot(itemSlot);\n }", "public Item checkForItem(String name) {\r\n Item output = null;\r\n for (Item item : inventory) {\r\n String check = item.getName().replaceAll(\" \", \"\");\r\n if (name.equals(check.toLowerCase())) {\r\n output = item;\r\n }\r\n }\r\n for (Item item : potionInventory) {\r\n String check = item.getName().replaceAll(\" \", \"\");\r\n if (name.equals(check.toLowerCase())) {\r\n output = item;\r\n }\r\n }\r\n return output;\r\n }", "public Item getPlayerItem(String stringItem){\r\n Item itemToReturn = null;\r\n for(Item item: playerItem){\r\n if(item.getName().contains(stringItem)){\r\n itemToReturn = item;\r\n }\r\n }\r\n return itemToReturn;\r\n }", "public Object get(String itemName);", "public Item getPlayerItem(String stringItem){\n Item itemToReturn = null;\n for(Item item: playerItem){\n if(item.getName().contains(stringItem)){\n itemToReturn = item;\n }\n }\n return itemToReturn;\n }", "public Inventory getInventory(){\n return inventory;\n }", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "@Override\n\tpublic int use() {\n\t\treturn Game.getInstance().getPlayer().equip(this);\n\t}", "@Override\n\tpublic void openInventory() {\n\t\t\n\t}", "@Override\n public Item vendItem(Item item) {\n allItems.put(item.getItemId(), item);\n return item;\n }", "@Override\r\n\tpublic Object getItem(int arg0) \r\n\t{\n\t\treturn channels.get(arg0);\r\n\t}", "@Override\n @Test\n public void equipAnimaTest() {\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.equipItem(anima);\n assertFalse(sorcererAnima.getItems().contains(anima));\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.addItem(anima);\n sorcererAnima.equipItem(anima);\n assertEquals(anima,sorcererAnima.getEquippedItem());\n }", "private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}", "public Item getItem() { return this; }", "public boolean updatePlayerItem(PlayerItem playerItem);", "public Inventory getEnchantInventory(Player p){\n Inventory inv = Bukkit.createInventory(null, 27, \"Enchant Pickaxe\");\n for(CustomEnchantment ce : enchants.keySet()){\n ItemStack item = new ItemStack(ce.getIcon());\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(ce.getColor() + ce.getDisplayName());\n List<String> lore = new ArrayList<>();\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Current Level: \" + Changeables.CHAT_INFO + getEnchantLevel(ce, p));\n lore.add(Changeables.CHAT + \"Max Level: \" + Changeables.CHAT_INFO + ce.getMaxLevel());\n lore.add(Changeables.CHAT + \"Current Price: \" + Changeables.CHAT_INFO + ce.getPrice(getEnchantLevel(ce, p)));\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Left Click to \" + Changeables.CHAT_INFO + \" Buy 1\");\n lore.add(Changeables.CHAT + \"Right Click to \" + Changeables.CHAT_INFO + \" Buy Max\");\n meta.setLore(lore);\n item.setItemMeta(meta);\n inv.setItem(enchants.get(ce), item);\n }\n\n\n\n\n\n return inv;\n }", "public Item getItem() {\n return item;\n }", "@Override\n public Object getItem(int arg0) {\n return arg0;\n }", "@Override\n public Object getItem(int arg0) {\n return arg0;\n }", "@Override\n public Object getItem(int arg0) {\n return arg0;\n }", "private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "public List<PlayerItem> getAll();", "ICpItem getCpItem();", "public interface IItem {\n // Which hotbar slot the item is stored in\n int getItemID();\n\n // Path to the item image\n String getItemImage();\n\n // Activates the item\n void activate();\n}", "@Test\n\tpublic void testPickUpItem() {\n\t\tSquare square = new Square();\n\t\tItem item = new LightGrenade();\n\t\t\n\t\tsquare.addItem(item);\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tassertEquals(0, player.getAllItems().size());\n\t\tassertFalse(player.hasItem(item));\n\t\t\n\t\tplayer.pickUp(item);\n\t\tassertTrue(player.hasItem(item));\n\t}", "public Item getItem(String name) {\r\n \t\treturn persistenceManager.getItem(name);\r\n \t}", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "private void takeItem(Command command) \n { \n if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What are you trying to take?\"); \n return; \n } \n \n String itemName = command.getSecondWord();\n String secondName = itemName + \"2\";\n \n Item thisItem = currentRoom.getItem(itemName);\n Item secondItem = currentRoom.getItem(secondName);\n \n if (thisItem == null) {\n Logger.Log(\"There isn't a \" + itemName + \"in here!\");\n }\n else if (player.inventory.containsKey(itemName)){\n Logger.Log(\"You take another \" + itemName + \" and put it in your backpack.\");\n player.addItem(secondName, secondItem); \n }\n else if (player.inventory.containsKey(itemName)&&(player.inventory.containsKey(secondName))){\n Logger.Log(\"You don't need any more \" + itemName + \"s!\");\n }\n else { \n Logger.Log(\"You take the \" + itemName + \" and put it in your backpack.\");\n player.addItem(itemName, thisItem);\n } \n \n }", "public Item giveItem(String itemName, Player character) {\n Item item = items.remove(itemName);\n if(item != null) {\n character.items.put(item.getName(), item);\n }\n return item;\n }", "private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "public ItemStack getItem() {\n return this.item;\n }", "public void takeItem(String name, Player player)\n {\n int i=items.size()-1;\n while(i>=0){\n if(items.get(i).getName().equals(name))\n {\n player.addItem(items.get(i));\n System.out.println(\"You take the \"+items.get(i).getName()+\"!\");\n items.remove(i);\n return;\n }\n i--;\n }\n System.out.println(\"Action failed. Review your input and try again!\");\n }", "@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\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\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}", "boolean useItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n String nameOfItem = \"\";\n String useItem = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n useItem = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\") && inventory.getUseable(nameOfItem)) {\n\n System.out.println(\"You have dropped: \" + nameOfItem);\n inventory.removeItemInventory(nameOfItem);\n player.setEnergy(player.getEnergy() + 20);\n player.setHealth(player.getHealth() + 5);\n\n return true;\n }\n return false;\n }", "@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "public Item getItem() {\n return item;\n }", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn data.get(arg0);\r\n\t}", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "@Override\n public void onSmelting(EntityPlayer player, ItemStack item) \n {\n \n }", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryItemProto getInventoryItemData() {\n if (inventoryItemCase_ == 3) {\n return (POGOProtos.Rpc.HoloInventoryItemProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryItemProto.getDefaultInstance();\n }", "@Override\n public Object getItem(int arg0) {\n return getItem(arg0);\n }", "public Item getItem() {\n\t\treturn item;\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "boolean hasOpenedInventory(Player player);", "private Item findItemByPos(String pos, Inventory invent){\n\t\tif (invent == null) return null;\n\t\tfor (Item item : invent){\n\t\t\tif (item.getInventoryPosition().equals(pos)){\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Object getItem(int arg0) {\n\t\treturn arg0;\n\t}" ]
[ "0.80171984", "0.74003685", "0.73866194", "0.7094956", "0.6959896", "0.6921937", "0.6863878", "0.6860223", "0.6809792", "0.6735869", "0.6699232", "0.6682574", "0.6646263", "0.6597779", "0.65195286", "0.6510692", "0.65018576", "0.6499649", "0.64809906", "0.6471452", "0.6453528", "0.64330333", "0.642108", "0.63866264", "0.6348645", "0.6330142", "0.6315705", "0.6309379", "0.63016164", "0.6301388", "0.6299949", "0.6281766", "0.6281766", "0.62812054", "0.6278904", "0.62773746", "0.62699735", "0.62354916", "0.6222703", "0.6218248", "0.6217011", "0.621684", "0.621539", "0.6209973", "0.6209065", "0.6200193", "0.61858946", "0.61824447", "0.6175664", "0.6173788", "0.6171662", "0.6165928", "0.6157834", "0.6156619", "0.6151707", "0.6150575", "0.6145926", "0.6135845", "0.6135165", "0.61331916", "0.61319155", "0.6129453", "0.6116671", "0.6111775", "0.6110119", "0.6107775", "0.6105414", "0.6098037", "0.6098037", "0.6098037", "0.60951716", "0.6094753", "0.6093259", "0.6092457", "0.60923684", "0.60917264", "0.60906875", "0.60898787", "0.60868114", "0.60859734", "0.6082271", "0.60745925", "0.60734856", "0.60699475", "0.6069702", "0.6069612", "0.60626775", "0.6061818", "0.60612786", "0.60488164", "0.6046149", "0.603591", "0.6035056", "0.60308176", "0.60288155", "0.6026321", "0.6024394", "0.6024394", "0.6022771", "0.6022671", "0.6021854" ]
0.0
-1