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
Create a new Rectangle with the specified length and width. Cannot be negative or exceed max int value
public Rectangle(int length, int width) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Rectangle(int length, int width)\n {\n this.length = length;\n this.width = width;\n\n }", "Rectangle(int l, int w)\n {\n\tlength = l;\n\twidth = w;\n }", "public Rectangle(double width, double length) {\n\t\tthis.width = width;\n\t\tthis.length = length;\n\t}", "public Rectangle(int recLength, int recWidth) {\n super(recLength, recWidth);\n System.out.println(\"\\nA rectangle is being created!\\n\");\n }", "Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }", "Rectangle(int width, int height){\n area = width * height;\n }", "Rectangle() {\r\n\t\tlength = 1.0;\r\n\t\twidth = 1.0;\r\n\t}", "public int rectangle(int length, int width) {\r\n\t\tif(length<0 || width<0) {\r\n\t\t\treturn -1; //Negative values\r\n\t\t}else if (length>10000 || width>10000) {\r\n\t\t\treturn -2; //Length/width exceeds limit\r\n\t\t}\r\n\t\treturn length * width;\r\n\t}", "public Rectangle (String aName, int aLength, int aWidth) {\n\t\tname = aName;\n\t\tlength = aLength;\n\t\twidth = aWidth;\n\t}", "public int rectangle (int length, int width){\n int areaRec=length*width;\n return areaRec;\n }", "public Rectangle(Integer width, Integer height) {\n super(300, 100, \"red\",null);\n this.width = width;\n this.height = height;\n control = new Control(this);\n }", "public Rectangle()\n {\n length = 1;\n width = 1;\n count++;\n }", "Rectangle(){\n height = 1;\n width = 1;\n }", "public Rectangle(double width, double height) {\r\n this.width = width;\r\n this.height = height;\r\n }", "public Rectangle() {\n this.length = 0;\n this.width = 0;\n\n }", "public Rectangle(double newWidth, double newHeight) {\n\t\tif (width >= 0 && height >= 0) {\n\t\t\twidth = newWidth;\n\t\t\theight = newHeight;\n\t\t}\n\t\t\t\n\t}", "public Rectangle(Point center, int length){\n super(4);\n if(length <= 0)\n throw new IllegalArgumentException(\"Length cannot be negative or zero.\");\n width = length; \n height = length; \n int centerX = center.getX(); //stores the x of the center point\n int centerY = center.getY(); //stores the y of the center point\n int distanceFromCenter = length / 2; //stores the distance from the center point each line will be\n topLine = new Line(centerX - distanceFromCenter, centerY - distanceFromCenter, centerX + distanceFromCenter, centerY - distanceFromCenter);\n rightLine = new Line(centerX + distanceFromCenter, centerY - distanceFromCenter, centerX + distanceFromCenter, centerY + distanceFromCenter);\n bottomLine = new Line(centerX + distanceFromCenter, centerY + distanceFromCenter, centerX - distanceFromCenter, centerY + distanceFromCenter);\n leftLine = new Line(centerX - distanceFromCenter, centerY + distanceFromCenter, centerX - distanceFromCenter, centerY - distanceFromCenter);\n referencePoint = topLine.getFirstPoint();\n }", "public Rectangle() {\n\t\tthis.width = 1;\n\t\tthis.hight = 1;\n\t\tcounter++;\n\t}", "public Rectangle() {\n\t\twidth = 1;\n\t\theight = 1;\n\t}", "Rectangle(int width, int height){\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "public RectangleObject(double width, double height) {\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t}", "public Rectangle() {\n this(50, 40);\n }", "public void createRectangle(double x, double y, double width, double height) {\r\n GRect rectangle = new GRect(x, y, width, height);\r\n rectangle.setFilled(true);\r\n rectangle.setFillColor(Color.GRAY);\r\n rectangle.setColor(Color.WHITE);\r\n add(rectangle);\r\n }", "public Rectangle(int w, int h) {\n\t\tthis.width = w;\n\t\tthis.height = h;\n\t}", "protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}", "public Rectangle(String id, double height, double width) {\n\t\tsuper(id);\n\t\t\n\t\t// Initialized here for local use\n\t\tthis.height = height;\n\t\tthis.width = width;\n\t\t\n\t\t// Adds these variables to the array \"sideLengths\" \n\t\tthis.sideLengths.add(height);\n\t\tthis.sideLengths.add(height);\n\t\tthis.sideLengths.add(width);\n\t\tthis.sideLengths.add(width);\n\t}", "void createRectangles();", "private Geometry createRectangle(double x, double y, double w, double h) {\n Coordinate[] coords = {\n new Coordinate(x, y), new Coordinate(x, y + h),\n new Coordinate(x + w, y + h), new Coordinate(x + w, y),\n new Coordinate(x, y)\n };\n LinearRing lr = geometry.getFactory().createLinearRing(coords);\n\n return geometry.getFactory().createPolygon(lr, null);\n }", "public static int area_rectangle(int length, int width){\n\t\t// A = l * w\n\t\tint area;\n\t\tarea = length * width;\n\t\treturn area;\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void invalidRectangleWidthNotGreaterThan0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, -50, 100));\n }", "public Rectangle() {\n super();\n properties = new HashMap<String, Double>();\n properties.put(\"Width\", null);\n properties.put(\"Length\", null);\n }", "public Rectangle() {\n x = 0;\n y = 0;\n width = 0;\n height = 0;\n }", "public Rectangle(Point upperLeft, double width, double height) {\n this.upperLeft = upperLeft;\n this.width = width;\n this.height = height;\n }", "public FrustRectangle(int x, int y, int maxX, int maxY, int width, int height) {\n super(x, y, maxX, maxY);\n if (width < 0) {\n width = 0;\n }\n if (height < 0) {\n height = 0;\n }\n this.width = width;\n this.height = height;\n }", "public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}", "public PDRectangle createRetranslatedRectangle()\n {\n PDRectangle retval = new PDRectangle();\n retval.setUpperRightX( getWidth() );\n retval.setUpperRightY( getHeight() );\n return retval;\n }", "public RectangleFromGeometricObject(double width, double height) {\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t}", "public RectangleShape(int xCoord, int yCoord, int widthOfRect, int heightOfRect)\n {\n System.out.println(\"setting x to: \"+ xCoord+\" & setting y to: \"+ yCoord);\n x = xCoord;\n y = yCoord;\n width = widthOfRect;\n height = heightOfRect;\n }", "public Rectangle(int x, int y, int w, int h) {\n this.x = x;\n this.y = y;\n this.size = new Dimension(w, h);\n }", "public void setBoundaries(int length, int width) {\n\t\tBOUNDS_LENGTH = length;\n\t\tBOUNDS_WIDTH = width;\n\t}", "public Shape(int width, int height) {\r\n\r\n\t\t// Shape width and height should not be greater than the sheet width and height\r\n\t\tif (width > Sheet.SHEET_WIDTH || height > Sheet.SHEET_HEIGHT) {\r\n\t\t\tthrow new IllegalArgumentException(\"Shape width or height is not valid\");\r\n\t\t}\r\n\r\n\t\tthis.sWidth = width;\r\n\t\tthis.sHeight = height;\r\n\t}", "public PDRectangle()\n {\n this(0.0f, 0.0f, 0.0f, 0.0f);\n }", "Rectangle()\n {\n this(1.0,1.0);\n }", "public CustomRectangle() { }", "Length createLength();", "Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "MyRectangle(double height, double width, MyColor color) {\n\t\tsuper(color);\n\t\tthis.height=height;\n\t\tthis.width=width;\n\t}", "public Rectangle(double x, double y, double width, double height) {\n super(x, y, width, height);\n }", "public Rectangle(int x, int y, int width, int height, Color colour) {\n\t\tsuper(x,y,width,height,colour);\n\t}", "void setBounds(Rectangle rectangle);", "public Range(int length) {\n assert (length != 0);\n this.name = null;\n this.first = 0;\n this.last = length - 1;\n this.stride = 1;\n this.length = length;\n }", "public Rectangle toRectangle()\r\n {\r\n return new Rectangle(x, y, width, height);\r\n }", "private Texture createRectangularTexture(int width, int height) {\r\n\t\tPixmap pixmap = new Pixmap(width, height, Pixmap.Format.RGBA8888);\r\n\t\tpixmap.setColor(Color.CLEAR);\r\n\t\tpixmap.fillRectangle(0,0, pixmap.getWidth(), pixmap.getHeight());\r\n\t\treturn new Texture(pixmap);\r\n\t}", "public void fillRectangle(int x, int y, int width, int height);", "public Wall(Point loc,int _length) {\n\t\tlocation=loc;\n\t\tlength=_length;\n\t\timage = new Rectangle(loc.getX(),loc.getY(),10,_length);\n\t\timage.setFill(Color.WHITE);\n\t}", "public DrawingArea(int width, int height) {\n\t\tthis.initialize(width, height);\n\t}", "public Rectangle(int x, int y, int width, int height, Color color) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.color = color;\n }", "public static void drawRectangle(double width, double height) {\n gl.glPushMatrix();\n gl.glScaled(width, height, 1);\n gl.glBegin(GL.GL_TRIANGLE_FAN);\n gl.glVertex3d(-0.5, -0.5, 0);\n gl.glVertex3d(0.5, -0.5, 0);\n gl.glVertex3d(0.5, 0.5, 0);\n gl.glVertex3d(-0.5, 0.5, 0);\n gl.glEnd();\n gl.glPopMatrix();\n }", "@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}", "@Test\r\n\tpublic void testLength() {\r\n\t\tassertEquals(LENGTH, validRectangle.length());\r\n\t}", "void createRectangle(Rect r, int[] color){\n noStroke();\n fill(color[0],color[1],color[2]);\n rect(r.x,r.y,r.width,r.height);\n }", "@Test(expected = IllegalArgumentException.class)\n public void invalidRectangleHeightNotGreaterThan0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, -100));\n }", "Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }", "public void setBounds(Rectangle b);", "public RoomDimension(double lengthOfRoom, double widthOfRoom) {\n\t\tthis.lengthOfRoom = lengthOfRoom;\n\t\tthis.widthOfRoom = widthOfRoom;\n\t}", "public Rectangle(float w, float h, float x, float y, float r, float g, float b, String n, int s, int e) {\n super(x, y, r, g, b, n, s, e);\n this.width = w;\n this.height = h;\n }", "public double areaOfRect(double length, double width){\r\n // calculate area\r\n double answer = length * width;\r\n // send back the answer\r\n return answer;\r\n }", "public Rectangle getBounds(){\r\n return new Rectangle(x, y, w, w);\r\n }", "public Dimension(int height, int length) {\n\t\tthis.height = height;\n\t\tthis.length = length;\n\t}", "private static int getSquareOfRoom(int length, int width) {\n return length * width;\n }", "public static int perimeterOfRectangle(int length, int width) {\n return 2 * (length + width);\n }", "public static Rectangle toRectangle(int[] rect) {\r\n\t\tRectangle result = new Rectangle(rect[0], rect[1], rect[2], rect[3]);\r\n\t\treturn result;\r\n\t}", "public Plain(int width) {\n this.width = width;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, -51, 100));\n }", "public RMRect bounds() { return new RMRect(x(), y(), width(), height()); }", "public Paddle(int screenWidth, int screenHeight){\n myScreenWidth = screenWidth;\n myScreenHeight = screenHeight;\n initialXLocation = myScreenWidth / 2 - myLength / 2;\n initialYLocation = myScreenHeight/2 + initialYLocationAdjustment;\n\n myRectangle = new Rectangle(initialXLocation, initialYLocation, PADDLE_LENGTH, PADDLE_HEIGHT);\n myRectangle.setFill(PADDLE_COLOR);\n }", "public Rectangle() {\n }", "public Rectangle() {\n }", "LengthConstraint createLengthConstraint();", "int getBoundsWidth();", "public void fillRectangle(RectangleShape rectangle);", "public Bounds(double x, double y, double width, double height) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}", "private Block(Location topLeft, short length, short width) {\n\t\tif (length<=0 || width<=0){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse if (topLeft==null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tthis.topLeft = topLeft;\n\t\tthis.length = length;\n\t\tthis.width = width;\n\t}", "public void setMaxPaddleLength(){\n myRectangle.setWidth(myScreenWidth - SIDEBAR_WIDTH);\n }", "public Square(int w)\n {\n width = w;\n }", "public int getRangeWidth();", "@Override\r\n\tpublic Board createBoard(long width, long height)\r\n\t{\r\n\t\treturn new Board(width, height);\r\n\t}", "public MyRectangle getRectangle() {\n\t\treturn new MyRectangle(x, y, width, height);\n\t}", "public ConstRect(final Coords upperLeft, final int width, final int height)\r\n {\r\n x = upperLeft.getX();\r\n y = upperLeft.getY();\r\n this.width = width;\r\n this.height = height;\r\n }", "private GRect makeRect(int x, int y) {\r\n\t\treturn (new GRect(x, y, RECT_WIDTH, RECT_HEIGHT));\r\n\t}", "private void createRectangles() {\r\n rectangles.clear();\r\n for (int i = 0; i < gridSize * gridSize; i++) {\r\n Rectangle r = new Rectangle(rectangleSize, rectangleSize, Color.BLUE);\r\n r.setStroke(Color.BLACK);\r\n rectangles.add(r);\r\n }\r\n }", "public Rect(int xPos,int yPos,int rectWidth,int rectHeight,Color rectColor) {\n \tsuper(rectColor);\n \tx = xPos;\n \ty = yPos;\n \twidth = rectWidth;\n \theight = rectHeight;\n }", "public void resetPaddleWidth(){\n myRectangle.setWidth(myLength);\n }", "public Rectangle(final String[] input) {\r\n this.startX = Integer.parseInt(input[INPUT1]);\r\n this.startY = Integer.parseInt(input[INPUT2]);\r\n this.height = Integer.parseInt(input[INPUT3]);\r\n this.width = Integer.parseInt(input[INPUT4]);\r\n super.setStrokeColor(Integer.parseInt(input[INPUT5].substring(1), HEX));\r\n super.setStrokeOpacity(Integer.parseInt(input[INPUT6]));\r\n super.setFillColor(Integer.parseInt(input[INPUT7].substring(1), HEX));\r\n super.setFillOpacity(Integer.parseInt(input[INPUT8]));\r\n }", "public Rectangle () {\n\t\t\n\t}", "void buildRectangles(){\n background(255);\n for(int i=0;i<arr.length;i++){\n noStroke();\n Rect r=new Rect(40+i*80,400,75,-arr[i]*20,color1);\n createRectangle(r,color1);\n }\n }", "private static void addRectangle(String[] input) throws NumberFormatException, IncorrectParametersException{\n if (input.length == 5){\n try{\n int x1 = Integer.parseInt(input[1]); \n int y1 = Integer.parseInt(input[2]);\n int x2 = Integer.parseInt(input[3]); \n int y2 = Integer.parseInt(input[4]);\n try{\n canvas.createRectangle(x1, y1, x2, y2);\n System.out.println(canvas.render());\n } catch (NullPointerException ex) {\n System.out.println(\"Initialise a new canvas first!\");\n }\n } catch (NumberFormatException ex) {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n }\n } else {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n throw new IncorrectParametersException(\"\");\n }\n }", "void addBounds(int x, int y, int width, int height);", "public DrawingArea(int width, int height, int cpWidth) {\n super(null);\n this.width = width - cpWidth;\n this.height = height;\n setBounds(cpWidth, 0, this.width, this.height);\n originX = this.width/2;\n originY = this.height/2;\n setBackground(Color.white);\n drawingArea = createImage(this.width, this.height);\n }" ]
[ "0.8042752", "0.7782588", "0.7478395", "0.73861116", "0.7311035", "0.7308159", "0.7216392", "0.71689105", "0.7096978", "0.7025644", "0.69678634", "0.6947489", "0.6896244", "0.685502", "0.68427724", "0.6801628", "0.6764412", "0.66877586", "0.6669231", "0.66047543", "0.6535147", "0.6520332", "0.6491478", "0.6487585", "0.64616966", "0.6460012", "0.64526904", "0.6406929", "0.6395393", "0.6389292", "0.6377129", "0.6327629", "0.6301276", "0.6252842", "0.6174448", "0.6171722", "0.6124855", "0.6089159", "0.6088839", "0.607441", "0.60539144", "0.6027974", "0.60169846", "0.5984575", "0.5979745", "0.5961391", "0.5961391", "0.59511954", "0.5925369", "0.5907556", "0.5905195", "0.5877995", "0.58775", "0.5838083", "0.5835478", "0.5809654", "0.5783754", "0.5781954", "0.5780745", "0.5774118", "0.5767769", "0.57606626", "0.5757727", "0.5743461", "0.5707907", "0.56962997", "0.568596", "0.567182", "0.5664997", "0.5662544", "0.5652565", "0.5651632", "0.56415486", "0.56335676", "0.56285423", "0.56255716", "0.5625174", "0.56217015", "0.56217015", "0.5619631", "0.5598118", "0.55934286", "0.55910015", "0.5553464", "0.55500036", "0.55495185", "0.55378586", "0.5521135", "0.551961", "0.5513017", "0.5512949", "0.5507159", "0.55070305", "0.5505553", "0.5505231", "0.5500649", "0.5498606", "0.54972947", "0.549535", "0.5484407" ]
0.81955814
0
The length of this Rectangle.
public int length() { return length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double length()\n {\n return this.getR();\n }", "public double getLength() {\r\n\t\t\treturn length;\r\n\t\t}", "public double getLength() {\r\n\t\treturn length;\r\n\t}", "public double getLength() {\n\t\treturn length;\n\t}", "public double get_length() {\n\t\treturn _length;\n\t}", "public double getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public double getLength(){\r\n\t\treturn length;\r\n\t}", "public double getLength() {\r\n return length;\r\n }", "public double getLength() {\n return length;\n }", "public int getWidth() {\n return ((int) this.rectangle.getWidth());\n }", "public int getLength() {\n return this.sideLength;\n }", "public int getLength() {\n return mySize.getLength();\n }", "protected int length() { return FormatTools.getRasterLength(lengths); }", "public int getLength() {\r\n\t\treturn length;\r\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength() {\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public double getLength()\n {\n return length;\n }", "public double Length() {\n return OCCwrapJavaJNI.Units_Dimensions_Length(swigCPtr, this);\n }", "public int getLength() {\n return length_;\n }", "public int getLength() {\n\t\treturn this.length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength() {\n return length;\n }", "public double getLength() {\r\n \tif (this.x2 >= this.x1) {\r\n \t\tif (this.y1 >= this.y2) {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x2 - this.x1), 2) + Math.pow((this.y1 - this.y2), 2));\r\n \t\t} else {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x2 - this.x1), 2) + Math.pow((this.y2 - this.y1), 2));\r\n \t\t}\r\n \t} else if(this.x2 < this.x1) {\r\n \t\tif (this.y1 < this.y2) {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x1 - this.x2), 2) + Math.pow((this.y2 - this.y1), 2));\r\n \t\t} else {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x1 - this.x2), 2) + Math.pow((this.y2 - this.y1), 2));\r\n \t\t}\r\n \t}\r\n \treturn(length);\r\n }", "public double length() {\n return Math.sqrt(\n (Math.pow(getX(), 2)) +\n (Math.pow(getY(), 2)) +\n (Math.pow(getZ(), 2))\n );\n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "public Double getLength()\n {\n return length;\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public double length()\n\t{\n\t\treturn Math.sqrt(x*x + y*y);\n\t}", "public int getLength() {\n return this.length;\n }", "public int getLength() {\n return this.length;\n }", "public double getLength()\n {\n return Math.sqrt( Math.pow((x2-x1),2.0) + Math.pow((y2-y1),2.0) );\n }", "public double length() {\n\t\treturn Math.sqrt(x * x + y * y + z * z + w * w);\n\t}", "public int getLength() {\n return length;\n }", "public int getLength() {\n return length;\n }", "public double getLength();", "public int getLength(){\n\t\treturn length;\n\t}", "public int getLength(){\n\t\treturn length;\n\t}", "public int getArea()\n {\n return this.length * this.width;\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public double length() {\n\t\treturn startPoint.distance(endPoint);\n\t}", "@Override\r\n public double getArea() {\r\n return (length * width);\r\n }", "@Override\n\tpublic double getArea() {\n\t\treturn width * length;\n\t}", "public int getLength() {\n return length_;\n }", "public double getLength() {\n return count;\n }", "public double length()\n {\n return Math.sqrt(this.lengthsq());\n }", "public double length () {\n return Math.sqrt(lengthSquared());\n }", "@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }", "public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}", "public double length(){\n return end.distance(getStart());\n }", "@Override\r\n\t\tpublic int recArea() {\n\t\t\treturn length*width;\r\n\t\t}", "public double getBaseLength() {\n return baseLength;\n }", "protected int getLength() {\n\t\treturn this.length;\n\t}", "public int getLength()\n {\n\treturn length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public double getArea() {\n\t\treturn height * length;\n\t}", "public float length() {\r\n\t\treturn (float) Math.sqrt((x * x) + (y * y));\r\n\t}", "public double getArea() {\n return this.length * this.width;\n }", "public final float length() {\n\t\treturn (float)Math.sqrt(X * X + Y * Y);\n\t}", "public long length() {\n return length;\n }", "public int getLength() { return length;\t}", "public double getRectWidth() {\n double baseWidth = Hex.INNER_DIAMETER * hexWidth;\n double offset = Hex.INNER_RADIUS * (hexHeight - 1);\n return baseWidth + offset;\n }", "public double getLength()\r\n {\r\n return this.lengthCapacity;\r\n }", "public int length()\n\t{\n\t\treturn length;\n\t}", "public byte getLength() {\n return this.length;\n }", "public float length() {\n return (float) Math.sqrt(x*x + y*y);\n }", "public double drawLength() { return drawLength; }", "protected int getLength() {\n return length;\n }", "Length getWidth();", "public int getLength()\n {\n return length;\n }", "public int length() {\n \t \n \t //return the length\n \t return(len);\n }", "@Override\n public Integer length() {\n return myLength;\n }", "public int getLength() {\n \t\treturn lengthAsBits;\n \t}", "float getLength();", "float getLength();", "public long length() {\n\tint nBits;\n\tlong x, y;\n\tlong length = 7 + Math.max(minBitsS(toFixed(getTranslateX())),\n\t\t\t\t minBitsS(toFixed(getTranslateY())));\n\tif (hasScale()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getScaleX())),\n\t\t\t\t minBitsS(toFixed(getScaleY())));\n\t}\n\tif (hasRotate()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getRotate1())),\n\t\t\t\t minBitsS(toFixed(getRotate2())));\n\t}\n\treturn length;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}", "public int rectangleCount() {\n return this.root.rectangleCount();\n }", "public int getBBoxLength()\r\n {\r\n return theBBoxLength;\r\n }", "public double length() {\n return Vecteur.add(this.OB, this.OA.opposé()).length();\n }", "@Override\n\tpublic Integer getLen() {\n\t\treturn this.len;\n\t}", "public double getLength(){\n return length;\n }", "public double lenght() {\r\n\t\treturn Math.sqrt(this.x * this.x +\r\n\t\t\t\t\t\t this.y * this.y +\r\n\t\t\t\t\t\t this.z * this.z);\r\n\t}", "abstract double getLength();", "public int length() {\n\t\treturn size;\r\n\t}" ]
[ "0.78912044", "0.783988", "0.77809507", "0.77574867", "0.77375394", "0.7704805", "0.7610046", "0.7586281", "0.75535053", "0.75149524", "0.75099576", "0.7470886", "0.7446349", "0.7365825", "0.7347227", "0.7317833", "0.7317833", "0.7317833", "0.7317833", "0.7317833", "0.7317833", "0.73093164", "0.73027", "0.73027", "0.7299939", "0.7292129", "0.7288144", "0.72862935", "0.7279245", "0.7254385", "0.7254385", "0.72535306", "0.7246027", "0.7228241", "0.72222984", "0.7206322", "0.7196654", "0.7196654", "0.7196654", "0.71929294", "0.7192632", "0.7192632", "0.71863896", "0.71712464", "0.7145226", "0.7145226", "0.71442574", "0.712898", "0.712898", "0.71264863", "0.71189123", "0.71189123", "0.71136254", "0.7097403", "0.70939136", "0.7080937", "0.7074437", "0.7073118", "0.7066616", "0.70578074", "0.7047284", "0.70380324", "0.70326865", "0.70323867", "0.7031482", "0.7025681", "0.70234406", "0.70234406", "0.70234406", "0.7019589", "0.7016396", "0.7008057", "0.7004876", "0.69970125", "0.69812316", "0.6971946", "0.69713575", "0.6966701", "0.6958702", "0.6953605", "0.69499815", "0.6947048", "0.6944183", "0.6941472", "0.6936964", "0.69362944", "0.6934831", "0.6898601", "0.6898601", "0.6881462", "0.6880375", "0.6880375", "0.6877059", "0.68760055", "0.68496186", "0.68436134", "0.6841942", "0.6822292", "0.6817312", "0.68160015" ]
0.6884875
89
The width of this Rectangle.
public int width() { return width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWidth() {\n return ((int) this.rectangle.getWidth());\n }", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return this._width;\n }", "public int getWidth()\n\t{\n\t\treturn this._width;\n\t}", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n\t\t\treturn width;\n\t\t}", "public double getWidth() {\n\t\t\treturn width.get();\n\t\t}", "public double getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public double getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public Integer getWidth() {\n\t\t\treturn width;\n\t\t}", "public int getWidth()\r\n\t{\r\n\t\treturn mWidth;\r\n\t}", "public int getWidth() {\n return mWidth;\n }", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n return this.width;\n }", "public int getWidth() {\n return this.width;\n }", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn mWidth;\n\t}", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\r\n\t\treturn this.width;\r\n\t}", "public final float getWidth() {\n return mWidth;\n }", "public double getWidth()\r\n {\r\n return width;\r\n }", "public double getWidth () {\n return width;\n }", "public int getWidth() {\n\t\treturn this.width;\n\t}", "public int getWidth() {\n\t\treturn this.width;\n\t}", "public final int getWidth(){\n return width_;\n }", "public int getWidth()\n {\n return this.width;\n }", "public float getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth(){\n\t\treturn width;\n\t}", "public float getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public double getWidth()\n {\n return width;\n }", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "public int getWidth() {\r\n return Width;\r\n }", "public int getWidth() {\n return width_;\n }", "final public double getWidth()\n\t{\n\t\treturn width;\n\t}", "public Integer getWidth()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.width, null);\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public float getWidth() {\n return width;\n }", "public int getWidth()\r\n\t{\r\n\t\treturn WIDTH;\r\n\t}", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n return (int) Math.round(width);\n }", "public SVGLength getWidth() {\n return width;\n }", "public float getWidth() {\n return this.width;\n }", "@Override\n\tpublic int getWidth() {\n\t\treturn this.width;\n\t}", "public String getWidth() {\n return width;\n }", "public Integer getWidth() {\n return this.width;\n }", "public double getWidth() {\n\treturn width;\n }", "public double getRectWidth() {\n double baseWidth = Hex.INNER_DIAMETER * hexWidth;\n double offset = Hex.INNER_RADIUS * (hexHeight - 1);\n return baseWidth + offset;\n }", "public int getWidth(){\n return this.width;\n }", "private double getWidth() {\n\t\treturn width;\n\t}", "public int getWidth()\n {\n\treturn width;\n }", "@java.lang.Override\n public long getWidth() {\n return width_;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public int width() {\r\n\t\treturn this.width;\r\n\t}", "public int width() {\n\t\treturn _width;\n\t}" ]
[ "0.8742477", "0.83549273", "0.83524334", "0.8327747", "0.83178884", "0.8304112", "0.82717454", "0.8269367", "0.8261633", "0.8255315", "0.8255315", "0.8255315", "0.82516897", "0.82516897", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82366306", "0.8232998", "0.8232711", "0.8232711", "0.8225863", "0.8225863", "0.8225863", "0.8217445", "0.8205436", "0.8199616", "0.81974983", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.81868696", "0.8180364", "0.8176612", "0.8176612", "0.81737244", "0.81737244", "0.816653", "0.81628597", "0.8159912", "0.8156853", "0.81487226", "0.8145447", "0.81396383", "0.81396383", "0.81280106", "0.8125168", "0.81240976", "0.8120403", "0.81189", "0.8107979", "0.81031394", "0.81004506", "0.80837566", "0.8077666", "0.8076356", "0.80574816", "0.8049796", "0.8049796", "0.8049796", "0.80374104", "0.8033303", "0.8029164", "0.8029164", "0.8021204", "0.8016069", "0.80062693", "0.7998869", "0.7971816", "0.7971192", "0.79680103", "0.79661506", "0.7948718", "0.7920664", "0.79205304", "0.79199475", "0.7917196", "0.79108775", "0.7901538", "0.7901538", "0.78741807", "0.7872673" ]
0.0
-1
The area of this Rectangle.
public int area() { area = width()*height(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double area() {\n\t\treturn width * height;\n\t}", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "public double getArea() {\n\t\treturn height * length;\n\t}", "public Rectangle getArea() {\n return area;\n }", "public double area() {\n return (width * height);\n }", "public double getArea() {\n return this.length * this.width;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}", "@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "public double getArea() {\n\t\treturn this.area;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}", "public int getArea()\n {\n return this.length * this.width;\n }", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }", "@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}", "@Override\n\tpublic double getArea() {\n\t\treturn width * length;\n\t}", "public int area()\n\t{\n\t\treturn length*width;\n\t}", "public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }", "@Override\r\n public double area() {\n return height*width;\r\n }", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "public double getArea()\r\n\t{\r\n\t\treturn(super.getHeight()*super.getWidth());\r\n\t}", "public double area() {\n\t\treturn width*length;\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}", "public double get_Area() {\n return this.Area;\n }", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}", "public double area(){\n return (base*height) / 2;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn width*length;\n\t}", "double getArea() {\n return width * height;\n }", "public double getArea()\n {\n return area;\n }", "@Override\n public double getArea() {\n return width * width;\n }", "public float getArea() {\n return area;\n }", "public double getArea() {\n\t\treturn this.radius * this.radius * Math.PI;\n\t}", "public double calcArea() {\r\n\t\tdouble area = length * width;\r\n\t\treturn area;\r\n\t}", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public double getArea();", "public double getArea();", "public double getArea();", "public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}", "public int getArea() {\n\t\treturn area;\n\t}", "public double area()\n {\n double area = length * width;\n //System.out.println(area);\n return area;\n }", "@Override\n public double area() {\n return width * length;\n }", "public double getArea(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return (getWidth() * getHeight());\n }", "@Override\r\n public double getArea() {\r\n return (length * width);\r\n }", "@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }", "double getArea();", "double getArea();", "@Override\r\n public double getArea() {\r\n return (0.5 * (base * height));\r\n }", "double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }", "public double getArea() {\n\t\treturn 6.0 * this.edgelen * this.edgelen;\n\t}", "public final double getArea() {\n\t\treturn (area < 0) ? computeArea() : area;\n\t}", "@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }", "public double areaRectangulo() {\n double area = altura * ancho;\n return area;\n }", "public double getArea() {\n\t\treturn Math.sqrt(3) * this.edgelen * this.edgelen;\n\t}", "public double area()\r\n {\r\n float dx = tr.getX() - bl.getX();\r\n float dy = tr.getY() - bl.getY();\r\n return dx*dy;\r\n }", "@Override\n\tpublic double computeArea()\n\t{\n\t\treturn\n\t\t\t\tthis.length * this.width;\n\t}", "public float area() {\n return (base * haltura / 2);\r\n }", "public double area() {\n\t\treturn Math.PI*r*r;\n\t}", "public double getArea (){\n int area = length * length;\n System.out.println(area);\n return area;\n }", "public float area() {\n return (getBase() * getAltura() )/ 2;\n }", "public double area() {\n return Math.PI * r * r;\n }", "@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}", "@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}", "@Override\n public double area()\n {\n\treturn (double) length * width;\n }", "static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }", "public float getArea(){\n return area;\n\t}", "@Override\n\tpublic double area() {\n\t\t\n\t\tdouble area = (Math.PI * Math.pow(radius, 2));\n\t\treturn area;\n\t\t\n\t}", "public String getArea() {\n return this.area;\n }", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public abstract float getArea();", "public double getArea() {\n return ((radius * radius) * Math.PI);\n }", "@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }", "public double getArea()\r\n\t{\r\n\t\tdouble area = Math.PI*(Math.pow(radius, 2));\r\n\t\treturn area;\r\n\t}", "@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "public String getArea() {\n\t\treturn area;\n\t}", "double getArea(){\n return height*width;\n }", "public int getArea()\n {\n return area;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}", "@Override\n\tpublic double area() {\n\t\treturn Shape.PI*radius*radius;\n\t}", "public String getArea() {\n return area;\n }", "public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}", "public double findArea(){\n\t\tdouble area= (0.5*(length * width));\n\t\treturn area;\n\t}", "protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public float area()\n {\n return Math.abs(signedArea());\n }", "public double getAreaRatio() {\n\n return getArea() / (2 * (getX() + getY()) * getThickness());\n }", "public double getArea()\n\t{\n\t\tdouble area = Math.PI * Math.pow(radius, 2); \n\t\treturn area;\n\t}", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public double getArea(){\n double p = (side1 + side2 + side3) / 2;\n return Math.sqrt(p * (p - side1) * (p - side2) * (p - side3));\n }", "public double getArea() {\n return x * y;\n }", "public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }" ]
[ "0.8429908", "0.8407416", "0.8325246", "0.8304792", "0.8269528", "0.8240969", "0.8240559", "0.8210367", "0.81979877", "0.8192064", "0.8192064", "0.8173266", "0.8167483", "0.8105898", "0.80762064", "0.80729634", "0.8052404", "0.8040829", "0.80293477", "0.8029115", "0.8021094", "0.8019334", "0.79964405", "0.79906", "0.79744095", "0.79613465", "0.7957944", "0.7926974", "0.7916252", "0.7897469", "0.7884118", "0.78622967", "0.78622967", "0.78619045", "0.7836338", "0.78166926", "0.78159076", "0.7796393", "0.77795756", "0.7763291", "0.774021", "0.774021", "0.774021", "0.77390194", "0.7723347", "0.7721937", "0.76975507", "0.76974773", "0.7686212", "0.7678417", "0.76628256", "0.76628256", "0.7623513", "0.7608016", "0.76041144", "0.75746894", "0.7565381", "0.75385284", "0.75154835", "0.75049096", "0.74934584", "0.7484018", "0.74603003", "0.74558395", "0.74345106", "0.743141", "0.7429732", "0.74272573", "0.74187493", "0.7405032", "0.7400539", "0.7391232", "0.7390061", "0.7385917", "0.7366374", "0.7358186", "0.73528814", "0.73389685", "0.7338724", "0.7338122", "0.7337525", "0.7322972", "0.73224396", "0.73171186", "0.7315167", "0.7299833", "0.7293759", "0.7291156", "0.7264592", "0.7264592", "0.7264592", "0.72612405", "0.7254573", "0.7251506", "0.72466314", "0.72466314", "0.72466314", "0.72333014", "0.7223641", "0.7223024" ]
0.8017618
22
The perimeter of this Rectangle.
public int perimeter() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double Perimeter() {\r\n \treturn((getLength() * 2) + (getWidth() * 2));\r\n }", "@Override\r\n\tpublic double perimeter() {\n\t\t\r\n\t\tdouble result;\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tresult = (width + height) * 2;\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public double getPerimeter() {\n\t\treturn sideLength * 8;\n\t}", "public double getPerimeter() {\n\t\treturn (super.getPerimeter()+height)*2;\r\n\t}", "@Override\r\n\tpublic double getPerimeter() {\r\n\t\treturn 2 * (width + height);\r\n\t}", "@Override\r\n\tpublic double getPerimeter() {\r\n\t\treturn 2 * (width + height);\r\n\t}", "public int getPerimeter()\n {\n return 2 * (this.length + this.width);\n }", "public double perimeter() {\n return 2 * Math.PI * r;\n }", "@Override\r\n public double perimeter() {\n return (height+width)*2;\r\n }", "public static double getPerimeter() {\n\t\treturn perimeter;\n\t}", "@Override\n\tpublic double getPerimeter() {\n\t\treturn width + width + length + length;\n\t}", "int perimeter() {\r\n\t\tint perimeter = 2 * (getLength()) + (getBreath());\r\n\t\treturn (perimeter);\r\n\t}", "@Override\n\tpublic double perimeter() {\n\t\t\n\t\treturn circumference();\n\t\t\n\t}", "public int perimeter()\n\t{\n\t\treturn 2*(length+width);\n\t}", "double getPerimeter() {\n return width + width + height + height;\n }", "@Override\n\tpublic double getPerimeter() {\n\t\treturn 2*(width+length);\n\t}", "@Override\n public double getPerimeter() {\n return 4 * ((int) this.radiusX + (int) this.radiusY - (4 - Math.PI) * ((int) this.radiusX * (int) this.radiusY) / ((int) this.radiusX + (int) this.radiusY));\n }", "public double perimeter()\n {\n double perimeter = (length * 2) + (width * 2);\n //System.out.println(perimeter);\n return perimeter;\n }", "protected double getPerimeter()\r\n {\r\n return ( 2 + Math.sqrt( 2.0 ) ) * getSide();\r\n }", "@Override\n public double perimeter() {\n return 2 * (width + length);\n }", "public double getPerimeter(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return 2*( getHeight() + getWidth());\n }", "public double perimeter(){\n perimeter = calcSide(x1,y1,x2,y2)+calcSide(x2,y2,x3,y3)+calcSide(x3,y3,x1,y1);\n \n \n \n return perimeter;\n \n \n }", "public double getPerimeter(){\r\n\t\t\r\n\t\tdouble obim = 2 * PI * this.radius;\r\n\t\t\r\n\t\treturn obim;\r\n\t}", "static Double computePerimeter() {\n // Perimeter is 2(height) + 2(width)\n Double perimeter = height*2 + width*2;\n return perimeter;\n }", "public double getPerimeter();", "public double getPerimeter();", "public double perimeter();", "public int getPerimeter()\t{\n//\t\treturn 2 * x + 2 * y;\n\t\treturn x + y + width + height;\n\t}", "@Override\r\n\tpublic double getPerimeter() {\n\t\treturn (this.side1 + this.side2 + this.base);\r\n\t}", "@Override\r\n public double getPerimeter() {\r\n double perimeter=2*(length+breadth);\r\n return perimeter;\r\n }", "@Override\n\tpublic double perimeter() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "public double getPerimeter() {\n return 2 * radius * Math.PI;\n }", "@Override\n public double perimeter()\n {\n\treturn (double) (2 * length + 2 * width);\n }", "double getPerimeter();", "double getPerimeter();", "double getPerimeter();", "double getPerimeter();", "@Override\n\tpublic double calculatePerimeter() {\n\t\treturn 2* Shape.PI * r;\n\t}", "public double getPerimeter(){\n\t\tdouble p;\n\t\tp=getside1()+getside2()+getside3();\n\t\treturn p;\n\t}", "public double Perimeter() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Perimeter(swigCPtr, this);\n }", "@Override\n\tpublic double getPerimeter() {\n\t\treturn 8 * side;\n\t}", "@Override\n\tpublic double getPerimeter() {\n\t\treturn this.N * getSide();\n\t}", "@Override\n\tpublic double getperimeter() {\n\t\treturn 2*width+2*length;\n\t}", "public int getPerimeter()\n\t{\n\t\treturn (int) (Math.PI * radius * 2);\n\t}", "@Override\n\tpublic double getPerimeter()\n\t{\n\t\tdouble perimeter = radius*2*pi;\n\t\treturn perimeter;\n\t}", "public double calculatePerimeter()\n {\n return 2 * Math.PI * radius;\n }", "public double basePerimeter()\r\n {\r\n double basePerimeter = (radius * 2) * Math.PI;\r\n return basePerimeter;\r\n }", "@Override\n\tpublic double calPerimeter() {\n\t\treturn 2*Math.PI*radius;\n\t}", "public double calculatePerimeter() {\r\n return 2 * PI * radius;\r\n }", "double getPerimeter(){\n return 2*height+width;\n }", "public abstract float getPerimeter();", "@Override\n\tpublic float perimeter() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "@Override\n\tpublic double perimeter() {\n\t\treturn edge*4;\n\t}", "double perimeter();", "public double calcPerimeter()\n\t{\n\t\treturn (double) oneside * 4;\n\t}", "public double getPerimeter(){\n return side1 + side2 + side3;\n }", "@Override\n\tpublic double getPerimeter() {\n\t\treturn side1 + side2 + side3;\n\t}", "@Override\n\tpublic double calcPerimeter() {\n\t\treturn 2*(x+y);\n\t}", "public double getPerimeter(){\n return 0;\n }", "public void setPerimeter() {\n\t\tthis.perimeter= 2*(height+width);\n\t}", "@Override\r\n public double getPerimeter() {\n double Perimeter = 2*Math.PI*radius;\r\n DecimalFormat df2 = new DecimalFormat(\"0.00\");\r\n return Double.parseDouble(df2.format(Perimeter));\r\n\r\n }", "public double perimeter ()\r\n {\r\n return v1.distanceTo(v2)+v2.distanceTo(v3)+v3.distanceTo(v1);\r\n }", "public double getPerimeter(){\n this.fperimeter = getSide() * 4;\n return fperimeter ;\n\n }", "@Override\r\n\tpublic void calcPerimeter() {\n\t\t\r\n\t}", "@Override\n public double getPerimeter() {\n return a + b + c;\n }", "synchronized public Polygon getPerimeter() {\n \t\tif (null == p || p[0].length < 2) return new Polygon();\n \n \t\t// local pointers, since they may be transformed\n \t\tint n_points = this.n_points;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Object[] ob = getTransformedData();\n \t\t\tp = (double[][])ob[0];\n \t\t\tn_points = p[0].length;\n \t\t}\n \t\tint[] x = new int[n_points];\n \t\tint[] y = new int[n_points];\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tx[i] = (int)p[0][i];\n \t\t\ty[i] = (int)p[1][i];\n \t\t}\n \t\treturn new Polygon(x, y, n_points);\n \t}", "@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }", "@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}", "@Test\r\n\tpublic void testPerimeter() {\r\n\t\tint perimeter = LENGTH + WIDTH + LENGTH + WIDTH;\r\n\t\tassertEquals(perimeter, validRectangle.perimeter());\r\n\t}", "public abstract double calculatePerimeter();", "public abstract double calculatePerimeter();", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "public static int perimeterOfRectangle(int length, int width) {\n return 2 * (length + width);\n }", "public double getArea() {\n\t\treturn this.radius * this.radius * Math.PI;\n\t}", "public double getArea() {\n return this.length * this.width;\n }", "public double area() {\n\t\treturn width * height;\n\t}", "public void perimeter() {\n\t\tSystem.out.println(\"Square perimeter\");\n\t}", "public double area() {\n return (width * height);\n }", "public double getArea()\n\t{\n\t\t//Pi R^2\n\t\treturn (Math.PI * radius * radius);\n\t}", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "@Override\n\tpublic double calPerimeter() {\n\t\treturn a+b+c;\n\t}", "public double area() {\n\t\treturn Math.PI*r*r;\n\t}", "public static double perimeter(double length, double sideCount) {\n return (length * sideCount);\n }", "public double sideArea()\r\n {\r\n double sideArea = slantHeight() * radius * Math.PI;\r\n return sideArea;\r\n }", "public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}", "public double getAreaRatio() {\n\n return getArea() / (2 * (getX() + getY()) * getThickness());\n }", "public double getArea() {\n return ((radius * radius) * Math.PI);\n }", "public void calcPerimeter(){\n perimeter=side1+side2+side3;\n }", "public Rectangle getPerimetro() {\n return new Rectangle(getPosX(), getPosY(), getAncho(), getAlto());\n }", "public double area() {\n return Math.PI * r * r;\n }", "public double getArea(){\n\t\treturn radius*radius*Math.PI;\n\t}", "public double getArea(){\r\n\t\t\r\n\t\tdouble povrsina = PI * this.radius * this.radius; \r\n\t\t\r\n\t\treturn povrsina;\r\n\t}", "@Override\n\tpublic void perimeter(double x,double y) {\n double p = y*x;\n System.out.println(\"The circle's perimeter is \"+p);\n\t}", "public double area() {\n return 2 * Math.PI * radius;\n }", "public int getArea()\n {\n return this.length * this.width;\n }", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }" ]
[ "0.87249374", "0.8545247", "0.85304666", "0.8517368", "0.85048705", "0.85048705", "0.84930605", "0.8459574", "0.84461224", "0.8439824", "0.8426415", "0.8417244", "0.8390179", "0.8389253", "0.83593476", "0.83553946", "0.8347556", "0.834081", "0.83328706", "0.8324865", "0.8296336", "0.8287123", "0.8262188", "0.82531035", "0.8247076", "0.8247076", "0.8246039", "0.8189098", "0.8170459", "0.8167596", "0.8167022", "0.81483746", "0.8128179", "0.8068862", "0.8068862", "0.8068862", "0.8068862", "0.80453014", "0.7982044", "0.79764456", "0.7962603", "0.7957335", "0.7928284", "0.7913918", "0.78947264", "0.7884331", "0.78660524", "0.78623927", "0.7857881", "0.7803072", "0.77861613", "0.77841574", "0.77602106", "0.7677573", "0.76703393", "0.763333", "0.76293284", "0.7622697", "0.759044", "0.7580533", "0.7500571", "0.7494649", "0.74220616", "0.73817915", "0.7338919", "0.7267365", "0.72266316", "0.7198662", "0.7187964", "0.71286505", "0.7095145", "0.7095145", "0.7059801", "0.70358336", "0.7007616", "0.69937766", "0.6966674", "0.69591886", "0.69539076", "0.6953822", "0.69487476", "0.69345677", "0.69335175", "0.69024754", "0.68879664", "0.68865275", "0.6881228", "0.68583006", "0.68437326", "0.6843683", "0.6833796", "0.6822386", "0.68146807", "0.67834395", "0.67804986", "0.6775763", "0.6761068", "0.6752788", "0.6752755", "0.67359245" ]
0.8012168
38
A role that provides access to the roles which perform file system operations.
public interface IFileSysOperationsFactory { public IPathCopier getCopier(boolean requiresDeletionBeforeCreation); public IImmutableCopier getImmutableCopier(); public IPathRemover getRemover(); public IPathMover getMover(); /** * Tries to find the <code>ssh</code> executable. * * @return <code>null</code> if not found. */ public File tryFindSshExecutable(); /** * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned. */ public String tryGetIncomingRsyncExecutable(); /** * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned. */ public String tryGetOutgoingRsyncExecutable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataInputStream openFile(String roleFile) throws IOException {\n return Util.open(\"/role/\" + roleFile);\n //#endif\n }", "public interface IGetFilePermission extends FileOperation\n{\n /**\n * A Map of keys (user@domain) and a string of the permission\n * type (i.e. read, write, etc) is retruned. If the permission\n * is sticky, a (I) is appended to the permssion string.\n * @return\n */\n public Map<String, Object> getPermissionTable();\n\n public boolean isInherited();\n}", "@Test\n public void testListStatusACL() throws IOException {\n String testfilename = \"testFileACL\";\n String childDirectoryName = \"testDirectoryACL\";\n TEST_DIR.mkdirs();\n File infile = new File(TEST_DIR, testfilename);\n final byte[] content = \"dingos\".getBytes();\n\n try (FileOutputStream fos = new FileOutputStream(infile)) {\n fos.write(content);\n }\n assertEquals(content.length, infile.length());\n File childDir = new File(TEST_DIR, childDirectoryName);\n childDir.mkdirs();\n\n Configuration conf = new Configuration();\n ConfigUtil.addLink(conf, \"/file\", infile.toURI());\n ConfigUtil.addLink(conf, \"/dir\", childDir.toURI());\n conf.setBoolean(Constants.CONFIG_VIEWFS_MOUNT_LINKS_AS_SYMLINKS, false);\n try (FileSystem vfs = FileSystem.get(FsConstants.VIEWFS_URI, conf)) {\n assertEquals(ViewFileSystem.class, vfs.getClass());\n FileStatus[] statuses = vfs.listStatus(new Path(\"/\"));\n\n FileSystem localFs = FileSystem.getLocal(conf);\n FileStatus fileStat = localFs.getFileStatus(new Path(infile.getPath()));\n FileStatus dirStat = localFs.getFileStatus(new Path(childDir.getPath()));\n\n for (FileStatus status : statuses) {\n if (status.getPath().getName().equals(\"file\")) {\n assertEquals(fileStat.getPermission(), status.getPermission());\n } else {\n assertEquals(dirStat.getPermission(), status.getPermission());\n }\n }\n\n localFs.setPermission(new Path(infile.getPath()),\n FsPermission.valueOf(\"-rwxr--r--\"));\n localFs.setPermission(new Path(childDir.getPath()),\n FsPermission.valueOf(\"-r--rwxr--\"));\n\n statuses = vfs.listStatus(new Path(\"/\"));\n for (FileStatus status : statuses) {\n if (status.getPath().getName().equals(\"file\")) {\n assertEquals(FsPermission.valueOf(\"-rwxr--r--\"),\n status.getPermission());\n assertFalse(status.isDirectory());\n } else {\n assertEquals(FsPermission.valueOf(\"-r--rwxr--\"),\n status.getPermission());\n assertTrue(status.isDirectory());\n }\n }\n }\n }", "public interface IFileSystem {\n\n /** */\n String TOP_DIRECTORY_ONLY = \"TopDirectoryOnly\";\n /** */\n String ALL_DIRECTORIES = \"AllDirectories\";\n\n /**\n * Gets a value indicating whether the file system is read-only or\n * read-write.\n *\n * @return true if the file system is read-write.\n */\n boolean canWrite();\n\n /**\n * Gets a value indicating whether the file system is thread-safe.\n */\n boolean isThreadSafe();\n\n /**\n * Gets the root directory of the file system.\n */\n DiscDirectoryInfo getRoot();\n\n /**\n * Copies an existing file to a new file.\n *\n * @param sourceFile The source file.\n * @param destinationFile The destination file.\n */\n void copyFile(String sourceFile, String destinationFile) throws IOException;\n\n /**\n * Copies an existing file to a new file, allowing overwriting of an\n * existing file.\n *\n * @param sourceFile The source file.\n * @param destinationFile The destination file.\n * @param overwrite Whether to permit over-writing of an existing file.\n */\n void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;\n\n /**\n * Creates a directory.\n *\n * @param path The path of the new directory.\n */\n void createDirectory(String path) throws IOException;\n\n /**\n * Deletes a directory.\n *\n * @param path The path of the directory to delete.\n */\n void deleteDirectory(String path) throws IOException;\n\n /**\n * Deletes a directory, optionally with all descendants.\n *\n * @param path The path of the directory to delete.\n * @param recursive Determines if the all descendants should be deleted.\n */\n void deleteDirectory(String path, boolean recursive) throws IOException;\n\n /**\n * Deletes a file.\n *\n * @param path The path of the file to delete.\n */\n void deleteFile(String path) throws IOException;\n\n /**\n * Indicates if a directory exists.\n *\n * @param path The path to test.\n * @return true if the directory exists.\n */\n boolean directoryExists(String path) throws IOException;\n\n /**\n * Indicates if a file exists.\n *\n * @param path The path to test.\n * @return true if the file exists.\n */\n boolean fileExists(String path) throws IOException;\n\n /**\n * Indicates if a file or directory exists.\n *\n * @param path The path to test.\n * @return true if the file or directory exists.\n */\n boolean exists(String path) throws IOException;\n\n /**\n * Gets the names of subdirectories in a specified directory.\n *\n * @param path The path to search.\n * @return list of directories.\n */\n List<String> getDirectories(String path) throws IOException;\n\n /**\n * Gets the names of subdirectories in a specified directory matching a\n * specified search pattern.\n *\n * @param path The path to search.\n * @param searchPattern The search string to match against.\n * @return list of directories matching the search pattern.\n */\n List<String> getDirectories(String path, String searchPattern) throws IOException;\n\n /**\n * Gets the names of subdirectories in a specified directory matching a\n * specified search pattern, using a value to determine whether to search\n * subdirectories.\n *\n * @param path The path to search.\n * @param searchPattern The search string to match against.\n * @param searchOption Indicates whether to search subdirectories.\n * @return list of directories matching the search pattern.\n */\n List<String> getDirectories(String path, String searchPattern, String searchOption) throws IOException;\n\n /**\n * Gets the names of files in a specified directory.\n *\n * @param path The path to search.\n * @return list of files.\n */\n List<String> getFiles(String path) throws IOException;\n\n /**\n * Gets the names of files in a specified directory.\n *\n * @param path The path to search.\n * @param searchPattern The search string to match against.\n * @return list of files matching the search pattern.\n */\n List<String> getFiles(String path, String searchPattern) throws IOException;\n\n /**\n * Gets the names of files in a specified directory matching a specified\n * search pattern, using a value to determine whether to search\n * subdirectories.\n *\n * @param path The path to search.\n * @param searchPattern The search string to match against.\n * @param searchOption Indicates whether to search subdirectories.\n * @return list of files matching the search pattern.\n */\n List<String> getFiles(String path, String searchPattern, String searchOption) throws IOException;\n\n /**\n * Gets the names of all files and subdirectories in a specified directory.\n *\n * @param path The path to search.\n * @return list of files and subdirectories matching the search pattern.\n */\n List<String> getFileSystemEntries(String path) throws IOException;\n\n /**\n * Gets the names of files and subdirectories in a specified directory\n * matching a specified search pattern.\n *\n * @param path The path to search.\n * @param searchPattern The search string to match against.\n * @return list of files and subdirectories matching the search pattern.\n */\n List<String> getFileSystemEntries(String path, String searchPattern) throws IOException;\n\n /**\n * Moves a directory.\n *\n * @param sourceDirectoryName The directory to move.\n * @param destinationDirectoryName The target directory name.\n */\n void moveDirectory(String sourceDirectoryName, String destinationDirectoryName) throws IOException;\n\n /**\n * Moves a file.\n *\n * @param sourceName The file to move.\n * @param destinationName The target file name.\n */\n void moveFile(String sourceName, String destinationName) throws IOException;\n\n /**\n * Moves a file, allowing an existing file to be overwritten.\n *\n * @param sourceName The file to move.\n * @param destinationName The target file name.\n * @param overwrite Whether to permit a destination file to be overwritten.\n */\n void moveFile(String sourceName, String destinationName, boolean overwrite) throws IOException;\n\n /**\n * Opens the specified file.\n *\n * @param path The full path of the file to open.\n * @param mode The file mode for the created stream.\n * @return The new stream.\n */\n SparseStream openFile(String path, FileMode mode) throws IOException;\n\n /**\n * Opens the specified file.\n *\n * @param path The full path of the file to open.\n * @param mode The file mode for the created stream.\n * @param access The access permissions for the created stream.\n * @return The new stream.\n */\n SparseStream openFile(String path, FileMode mode, FileAccess access) throws IOException;\n\n /**\n * Gets the attributes of a file or directory.\n *\n * @param path The file or directory to inspect.\n * @return The attributes of the file or directory.\n */\n Map<String, Object> getAttributes(String path) throws IOException;\n\n /**\n * Sets the attributes of a file or directory.\n *\n * @param path The file or directory to change.\n * @param newValue The new attributes of the file or directory.\n */\n void setAttributes(String path, Map<String, Object> newValue) throws IOException;\n\n /**\n * Gets the creation time (in local time) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @return The creation time.\n */\n long getCreationTime(String path) throws IOException;\n\n /**\n * Sets the creation time (in local time) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @param newTime The new time to set.\n */\n void setCreationTime(String path, long newTime) throws IOException;\n\n /**\n * Gets the creation time (in UTC) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @return The creation time.\n */\n long getCreationTimeUtc(String path) throws IOException;\n\n /**\n * Sets the creation time (in UTC) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @param newTime The new time to set.\n */\n void setCreationTimeUtc(String path, long newTime) throws IOException;\n\n /**\n * Gets the last access time (in local time) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @return The last access time.\n */\n long getLastAccessTime(String path) throws IOException;\n\n /**\n * Sets the last access time (in local time) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @param newTime The new time to set.\n */\n void setLastAccessTime(String path, long newTime) throws IOException;\n\n /**\n * Gets the last access time (in UTC) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @return The last access time.\n */\n long getLastAccessTimeUtc(String path) throws IOException;\n\n /**\n * Sets the last access time (in UTC) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @param newTime The new time to set.\n */\n void setLastAccessTimeUtc(String path, long newTime) throws IOException;\n\n /**\n * Gets the last modification time (in local time) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @return The last write time.\n */\n long getLastWriteTime(String path) throws IOException;\n\n /**\n * Sets the last modification time (in local time) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @param newTime The new time to set.\n */\n void setLastWriteTime(String path, long newTime) throws IOException;\n\n /**\n * Gets the last modification time (in UTC) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @return The last write time.\n */\n long getLastWriteTimeUtc(String path) throws IOException;\n\n /**\n * Sets the last modification time (in UTC) of a file or directory.\n *\n * @param path The path of the file or directory.\n * @param newTime The new time to set.\n */\n void setLastWriteTimeUtc(String path, long newTime) throws IOException;\n\n /**\n * Gets the length of a file.\n *\n * @param path The path to the file.\n * @return The length in bytes.\n */\n long getFileLength(String path) throws IOException;\n\n /**\n * Gets an object representing a possible file.\n *\n * The file does not need to exist.\n *\n * @param path The file path.\n * @return The representing object.\n */\n DiscFileInfo getFileInfo(String path) throws IOException;\n\n /**\n * Gets an object representing a possible directory.\n *\n * The directory does not need to exist.\n *\n * @param path The directory path.\n * @return The representing object.\n */\n DiscDirectoryInfo getDirectoryInfo(String path) throws IOException;\n\n /**\n * Gets an object representing a possible file system object (file or\n * directory).\n *\n * The file system object does not need to exist.\n *\n * @param path The file system path.\n * @return The representing object.\n */\n DiscFileSystemInfo getFileSystemInfo(String path) throws IOException;\n\n /**\n * Reads the boot code of the file system into a byte array.\n *\n * @return The boot code, or {@code null} if not available.\n */\n byte[] readBootCode() throws IOException;\n\n /**\n * Size of the Filesystem in bytes\n */\n long getSize() throws IOException;\n\n /**\n * Used space of the Filesystem in bytes\n */\n long getUsedSpace() throws IOException;\n\n /**\n * Available space of the Filesystem in bytes\n */\n long getAvailableSpace() throws IOException;\n\n}", "public FolderRole getRole() {\n return FolderRole.UNKNOWN;\n }", "public interface AccessManager {\n\n /**\n * predefined action constants\n */\n public String READ_ACTION = javax.jcr.Session.ACTION_READ;\n public String REMOVE_ACTION = javax.jcr.Session.ACTION_REMOVE;\n public String ADD_NODE_ACTION = javax.jcr.Session.ACTION_ADD_NODE;\n public String SET_PROPERTY_ACTION = javax.jcr.Session.ACTION_SET_PROPERTY;\n\n public String[] READ = new String[] {READ_ACTION};\n public String[] REMOVE = new String[] {REMOVE_ACTION};\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param parentState The node state of the next existing ancestor.\n * @param relPath The relative path pointing to the non-existing target item.\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(NodeState parentState, Path relPath, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param itemState\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(ItemState itemState, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n\n /**\n * Returns true if the existing item with the given <code>ItemId</code> can\n * be read.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Returns true if the existing item state can be removed.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRemove(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the subject of the current context is granted access\n * to the given workspace.\n *\n * @param workspaceName name of workspace\n * @return <code>true</code> if the subject of the current context is\n * granted access to the given workspace; otherwise <code>false</code>.\n * @throws NoSuchWorkspaceException if a workspace with the given name does not exist.\n * @throws RepositoryException if another error occurs\n */\n boolean canAccess(String workspaceName) throws NoSuchWorkspaceException, RepositoryException;\n}", "@Test\r\n public void testReadForAuthorizedUser() {\n System.out.println(\"Test : Alice can read her own file\");\r\n System.out.println();\r\n String userId = \"Alice\";\r\n String filePath = \"/home/Alice/shared/Af1.txt\";\r\n File file = new File (\"/home/Alice/shared/Af1.txt\", \"Alice\", \"Af1.txt\");\r\n List<File> fileList = FileList.getFileList();\r\n fileList.add(file);\r\n\r\n try {\r\n assertNotNull(service.readFile(userId, filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n System.out.println();\r\n }", "public interface FileSystem {\n\n /**\n * Add the specified file system entry (file or directory) to this file system\n *\n * @param entry - the FileSystemEntry to add\n */\n public void add(FileSystemEntry entry);\n\n /**\n * Return the List of FileSystemEntry objects for the files in the specified directory path. If the\n * path does not refer to a valid directory, then an empty List is returned.\n *\n * @param path - the path of the directory whose contents should be returned\n * @return the List of FileSystemEntry objects for all files in the specified directory may be empty\n */\n public List listFiles(String path);\n\n /**\n * Return the List of filenames in the specified directory path. The returned filenames do not\n * include a path. If the path does not refer to a valid directory, then an empty List is\n * returned.\n *\n * @param path - the path of the directory whose contents should be returned\n * @return the List of filenames (not including paths) for all files in the specified directory\n * may be empty\n * @throws AssertionError - if path is null\n */\n public List listNames(String path);\n\n /**\n * Delete the file or directory specified by the path. Return true if the file is successfully\n * deleted, false otherwise. If the path refers to a directory, it must be empty. Return false\n * if the path does not refer to a valid file or directory or if it is a non-empty directory.\n *\n * @param path - the path of the file or directory to delete\n * @return true if the file or directory is successfully deleted\n * @throws AssertionError - if path is null\n */\n public boolean delete(String path);\n\n /**\n * Rename the file or directory. Specify the FROM path and the TO path. Throw an exception if the FROM path or\n * the parent directory of the TO path do not exist; or if the rename fails for another reason.\n *\n * @param fromPath - the source (old) path + filename\n * @param toPath - the target (new) path + filename\n * @throws AssertionError - if fromPath or toPath is null\n * @throws FileSystemException - if the rename fails.\n */\n public void rename(String fromPath, String toPath);\n\n /**\n * Return the formatted directory listing entry for the file represented by the specified FileSystemEntry\n *\n * @param fileSystemEntry - the FileSystemEntry representing the file or directory entry to be formatted\n * @return the the formatted directory listing entry\n */\n public String formatDirectoryListing(FileSystemEntry fileSystemEntry);\n\n //-------------------------------------------------------------------------\n // Path-related Methods\n //-------------------------------------------------------------------------\n\n /**\n * Return true if there exists a file or directory at the specified path\n *\n * @param path - the path\n * @return true if the file/directory exists\n * @throws AssertionError - if path is null\n */\n public boolean exists(String path);\n\n /**\n * Return true if the specified path designates an existing directory, false otherwise\n *\n * @param path - the path\n * @return true if path is a directory, false otherwise\n * @throws AssertionError - if path is null\n */\n public boolean isDirectory(String path);\n\n /**\n * Return true if the specified path designates an existing file, false otherwise\n *\n * @param path - the path\n * @return true if path is a file, false otherwise\n * @throws AssertionError - if path is null\n */\n public boolean isFile(String path);\n\n /**\n * Return true if the specified path designates an absolute file path. What\n * constitutes an absolute path is dependent on the file system implementation.\n *\n * @param path - the path\n * @return true if path is absolute, false otherwise\n * @throws AssertionError - if path is null\n */\n public boolean isAbsolute(String path);\n\n /**\n * Build a path from the two path components. Concatenate path1 and path2. Insert the file system-dependent\n * separator character in between if necessary (i.e., if both are non-empty and path1 does not already\n * end with a separator character AND path2 does not begin with one).\n *\n * @param path1 - the first path component may be null or empty\n * @param path2 - the second path component may be null or empty\n * @return the path resulting from concatenating path1 to path2\n */\n public String path(String path1, String path2);\n\n /**\n * Returns the FileSystemEntry object representing the file system entry at the specified path, or null\n * if the path does not specify an existing file or directory within this file system.\n *\n * @param path - the path of the file or directory within this file system\n * @return the FileSystemEntry containing the information for the file or directory, or else null\n */\n public FileSystemEntry getEntry(String path);\n\n /**\n * Return the parent path of the specified path. If <code>path</code> specifies a filename,\n * then this method returns the path of the directory containing that file. If <code>path</code>\n * specifies a directory, the this method returns its parent directory. If <code>path</code> is\n * empty or does not have a parent component, then return an empty string.\n * <p/>\n * All path separators in the returned path are converted to the system-dependent separator character.\n *\n * @param path - the path\n * @return the parent of the specified path, or null if <code>path</code> has no parent\n * @throws AssertionError - if path is null\n */\n public String getParent(String path);\n\n}", "protected String getRoleFileName() \n\t{\n\t\treturn roleFileName;\n\t}", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "@Override\n\tpublic void apply( final ApplyFn fn ) throws AccessDeniedException;", "public abstract List<File> listFiles() throws AccessException;", "public interface FileService extends PublicService {\n\n /**\n * Retrieves reference to a file by fileName\n */\n FileReference getFile(String fileName);\n \n /**\n * Creates a reference for a new file.\n * Use FileReference.getOutputStream() to set content for the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileName\n * @param toolId - optional parameter\n * @return\n */\n FileReference createFile(String fileName, String toolId);\n \n /**\n * Deletes the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileReferece\n */\n void deleteFile(FileReference fileReferece);\n \n /**\n * Returns a url to the file\n * Property WebSecurityUtil.DBMASTER_URL (dbmaster.url) is used as a prefix\n */\n URL toURL(FileReference fileReferece);\n}", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "public abstract boolean isDirectory() throws AccessException;", "public void doFolder_permissions(RunData data, Context context)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());\n\t\tParameterParser params = data.getParameters();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\t// get the current collection id and the related site\n\t\tString collectionId = params.getString(\"collectionId\"); //(String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tString title = \"\";\n\t\ttry\n\t\t{\n\t\t\ttitle = ContentHostingService.getProperties(collectionId).getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t}\n\t\tcatch (PermissionException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notread\"));\n\t\t}\n\t\tcatch (IdUnusedException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notfindfol\"));\n\t\t}\n\n\t\t// the folder to edit\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(collectionId));\n\t\tstate.setAttribute(PermissionsHelper.TARGET_REF, ref.getReference());\n\n\t\t// use the folder's context (as a site) for roles\n\t\tString siteRef = SiteService.siteReference(ref.getContext());\n\t\tstate.setAttribute(PermissionsHelper.ROLES_REF, siteRef);\n\n\t\t// ... with this description\n\t\tstate.setAttribute(PermissionsHelper.DESCRIPTION, rb.getString(\"setpermis\") + \" \" + title);\n\n\t\t// ... showing only locks that are prpefixed with this\n\t\tstate.setAttribute(PermissionsHelper.PREFIX, \"content.\");\n\n\t\t// get into helper mode with this helper tool\n\t\tstartHelper(data.getRequest(), \"sakai.permissions.helper\");\n\n\t}", "private GitLabFolderAuthorization(GitLabFolderACL acl) {\n this.folderACL = acl;\n }", "@Override\n\tpublic boolean isRole() {\n\t\treturn true;\n\t}", "public interface IReadDirectory {\n\n /**\n * List all files existing in the given directory.\n * \n * @param directory\n * @return file list\n * @throws FindException\n */\n List<File> list(String directory) throws FindException;\n\n}", "ISModifyProvidedRole createISModifyProvidedRole();", "VerbRole getRole();", "SecurityRole getRole();", "public String getRole() { return this.role; }", "public Role() {\r\n\t\tpermissions = new ArrayList<Permission>();\r\n\t}", "@Override\n public boolean isRole() {\n return false;\n }", "@Test\n public void accessDeniedFile() throws CommandException {\n ExportCommand command = new ExportCommand(\".txt\", \"C:/Windows/a\");\n command.setData(model, null, null, null);\n if (os.indexOf(\"win\") > 0) {\n assertEquals(command.execute(), new CommandException(MESSAGE_ACCESS_DENIED));\n }\n }", "private void allowWalletFileAccess() {\n if (Constants.TEST) {\n Io.chmod(walletFile, 0777);\n }\n\n }", "public interface VFSFile extends VFSEntry {\n /**\n * Get current length of this file.\n *\n * @return current length of file\n * @throws IOException I/O exception happened during operation\n */\n int getLength() throws IOException;\n\n /**\n * Set current read/write pointer of file relative to file start.\n *\n * @param offsetFromStart offset from beginning of file\n */\n void seek(int offsetFromStart);\n\n /**\n * Read block of data from file. Read operation starts from current pointer in file, then pointer advances to next\n * byte after last successfully read byte.\n *\n * @param buffer destination buffer to read into\n * @param bufferOffset offset in destination buffer where read bytes must be placed\n * @param length length of bytes to read from file\n * @return amount of successfully read bytes, -1 if there are no more bytes left in file\n * @throws IOException I/O exception happened during operation\n */\n int read(byte[] buffer, int bufferOffset, int length) throws IOException;\n\n /**\n * Write block of data to file, expanding it if necessary. Write operation starts from current pointer in file, then pointer advances to next\n * byte after last successfully written byte. File must be opened for write for this method to succeed.\n *\n * @param buffer source buffer to read bytes from\n * @param bufferOffset offset in source buffer from where bytes must be written to file\n * @param length length of bytes to write to file\n * @throws IOException I/O exception happened during operation\n */\n void write(byte[] buffer, int bufferOffset, int length) throws IOException;\n}", "public interface FileUtils {\n /**\n * {@link org.apache.commons.io.FileUtils#copyDirectoryToDirectory(java.io.File, java.io.File)}\n *\n * @param from Source path\n * @param to Target directory path\n */\n void copyDirectoryToDirectory(File from, File to) throws IOException;\n\n /**\n * {@link org.apache.commons.io.FileUtils#copyFileToDirectory(java.io.File, java.io.File)}\n *\n * @param from Source path\n * @param to Target directory path\n */\n void copyFileToDirectory(File from, File to) throws IOException;\n\n /**\n * {@link java.nio.file.Files#createDirectories(java.nio.file.Path,\n * java.nio.file.attribute.FileAttribute[])}\n *\n * @param path Path to create\n */\n void createDirectories(Path path) throws IOException;\n\n /**\n * {@link java.nio.file.Files#createTempDirectory(\n * String, java.nio.file.attribute.FileAttribute[])}\n *\n * @param dirPrefix prefix of temporary directory\n * @return Path to created directory\n */\n Path createTempDirectory(String dirPrefix) throws IOException;\n\n /**\n * {@link org.apache.commons.io.FileUtils#deleteQuietly(java.io.File)}\n *\n * @param file File to delete\n * @return true iff directory was deleted\n */\n boolean deleteQuietly(File file);\n\n /**\n * {@link java.nio.file.Files#exists(java.nio.file.Path, java.nio.file.LinkOption...)}\n *\n * @param path path to check\n * @return true iff exists\n */\n boolean exists(Path path);\n\n /**\n * {@link java.nio.file.Files#isDirectory(java.nio.file.Path, java.nio.file.LinkOption...)}\n *\n * @param path path to check\n * @return true iff path is a directory\n */\n boolean isDirectory(Path path);\n\n /**\n * {@link java.lang.ProcessBuilder}\n *\n * @param command command to run\n * @param pwdFile working directory of the process\n * @return process running the command\n */\n Process runCommand(List<String> command, File pwdFile) throws IOException;\n\n /**\n * {@link java.nio.file.Files#write(java.nio.file.Path, Iterable, java.nio.charset.Charset,\n * java.nio.file.OpenOption...)}\n *\n * @param path Path of file to write to.\n * @param content String to be written to file.\n */\n void write(Path path, String content) throws IOException;\n}", "public void setRole(java.lang.String value) {\n this.role = value;\n }", "@Override\n\tpublic boolean isReadable() {\n\t\treturn (Files.isReadable(this.path) && !Files.isDirectory(this.path));\n\t}", "public void addRole(String roleName) throws UnsupportedOperationException;", "@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}", "private boolean hasExternalStorageReadWritePermission() {\n return ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED\n && ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;\n }", "@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}", "public Byte getRole() {\n return role;\n }", "public static boolean isReadStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public RoleAccess() {\n }", "public ACL getACL() {\n return folderACL;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }", "public java.util.ArrayList getEditRoles() {\n\tjava.util.ArrayList roles = new java.util.ArrayList();\n\troles.add(\"administrator\");\n\troles.add(\"StorageManager\");\n\treturn roles;\n}", "public interface PermissionService {\n List<User> findRoleUsers(String roleId);\n\n void roleAssignUsers(String roleId, String assignUsers, String removeUsers);\n\n void roleAssignMenu(String roleId, String menuIds);\n\n List<Menu> findRoleMenus(String roleId);\n}", "@Override\n public void findFiles_hdfs_native() throws Exception {\n assumeTrue( !isWindows() );\n super.findFiles_hdfs_native();\n }", "@Override\n public boolean isDir() { return true; }", "@FunctionalInterface\n private interface RoleChecker {\n public void checkAndRedirect(String role, String redirectAddress) throws IOException;\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n int write = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED && write == PackageManager.PERMISSION_DENIED) {\n return true;\n } else {\n\n //If permission is not granted returning false\n return false;\n }\n }", "private static void store(final String username, final Role role, final String relPath)\n\t{\n\t\tif (username == null) return;\n\t\tList<Access> accesses = new ArrayList<Access>();\n\t\tif (username2accesses.containsKey(username))\n\t\t{\n\t\t\taccesses = username2accesses.get(username);\n\t\t}\n\t\tfinal Access access = new Access(username, role, relPath);\n\t\taccesses.add(access);\n\t\tusername2accesses.put(username, accesses);\n\t}", "private static void checkAccess(File directory, boolean isWriteable) throws IOException {\n if(!directory.exists()) {\n if(directory.mkdirs()) {\n logger.debug(\"Created directory [{}]\", directory.getCanonicalPath());\n } else {\n throw new IOException(\"Could not create directory \" +\n \"[\"+directory.getCanonicalPath()+\"], \" +\n \"make sure you have the proper \" +\n \"permissions to create, read & write \" +\n \"to the file system\");\n }\n }\n // Find if we can write to the record root directory\n if(!directory.canRead())\n throw new IOException(\"Cant read from : \"+directory.getCanonicalPath());\n if(isWriteable) {\n if(!directory.canWrite())\n throw new IOException(\"Cant write to : \"+directory.getCanonicalPath());\n }\n }", "@Override\n protected String getDirPath() {\n throw new UnsupportedOperationException();\n }", "public String getRole() {\n return this.role;\n }", "@Override\n\tpublic boolean isWritable() {\n\t\treturn (Files.isWritable(this.path) && !Files.isDirectory(this.path));\n\t}", "private boolean isReadStorageAllowed() {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private FileManager() {}", "public String getRole() {\r\n return role;\r\n }", "public interface DirectoryService {\n\n List<File> searchByName(String name);\n\n List<File> searchByExtension(String extension);\n\n Long getDirectorySize(File directory, boolean recursive);\n\n void appendLinesToFile(File file, List<String> lines);\n\n void zip(File fileToZip);\n\n void unZip(File fileToZip);\n\n void delete(File toDelete);\n}", "public void setRole(String role) {\r\n this.role = role;\r\n }", "public interface FilesystemConstants extends Serializable {\n\n /** Read only. */\n int O_RDONLY = 00;\n /** Write only. */\n int O_WRONLY = 01;\n /** Read and write. */\n int O_RDWR = 02;\n}", "@Override\r\n\tpublic String definedRole() {\n\t\treturn DEF_ROLE;\r\n\t}", "private boolean isFileAccessible() {\n\t\ttry {\n\t\t\tif (!new File(fileUpload.getFilePath()).exists())\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t} catch (SecurityException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public interface FileUploadService {\n\t\n\t/*\n\t * ******************** Create related methods *********************/\n\t\n\t/**\n\t * Create a new fileUpload and set the current user as owner and manager.\n\t * @param fileUpload\n\t * @return\n\t * @throws AppException\n\t */\n\tpublic Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;\n\t\n\t@PreAuthorize(\"hasPermission(#fileUpload, 'write') or hasRole('ROLE_ADMIN')\")\n\tpublic void uploadFile(InputStream uploadedInputStream,\n\t\t\tString uploadedFileLocation) throws AppException;\n\n\t/*\n\t * Create multiple fileUploads as ROOT, testing purposes only.\n\t */\n\t@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void createFileUploads(List<FileUpload> fileUploads) throws AppException;\n\n\t/*\n\t * ******************* Read related methods ********************\n\t */\n\t/**\n\t *\n\t * @param orderByInsertionDate\n\t * - if set, it represents the order by criteria (ASC or DESC)\n\t * for displaying fileUploads\n\t * @param numberDaysToLookBack\n\t * - if set, it represents number of days to look back for fileUploads,\n\t * null\n\t * @return list with fileUploads corresponding to search criteria\n\t * @throws AppException\n\t */\n\t//Enable post filter to restrict read access to a collection\n\t//@PostFilter(\"hasPermission(filterObject, 'READ')\"\n\tpublic List<FileUpload> getFileUploads(int numberOfFileUploads, Long startIndex) throws AppException;\n\t\n\t/**\n\t * Returns a fileUpload given its id\n\t *\n\t * @param id\n\t * @return\n\t * @throws AppException\n\t */\n\t\n\t//Enable the following line of code to restrict read access to a single object.\n\t//@PostAuthrorize(\"hasPermission(returnObject, 'read')\")\n\tpublic FileUpload getFileUploadById(Long id) throws AppException;\n\t\n\t@PreAuthorize(\"hasPermission(#fileUpload, 'read') or hasPermission(#form, 'write') or hasRole('ROLE_ADMIN')\")\n\tpublic File getUploadFile(FileUpload fileUpload, Form form) throws AppException;\n\n\t/*\n\t * ******************** Update related methods **********************\n\t */\n\t@PreAuthorize(\"hasPermission(#fileUpload, 'write') or hasRole('ROLE_ADMIN')\")\n\tpublic void updateFullyFileUpload(FileUpload fileUpload) throws AppException;\n\n\t@PreAuthorize(\"hasPermission(#fileUpload, 'write') or hasRole('ROLE_ADMIN')\")\n\tpublic void updatePartiallyFileUpload(FileUpload fileUpload) throws AppException;\n\n\t/*\n\t * ******************** Delete related methods **********************\n\t */\n\n\t@PreAuthorize(\"hasPermission(#fileUpload, 'delete') or hasPermission(#form, 'write') or hasRole('ROLE_ADMIN')\")\n\tpublic void deleteFileUpload(FileUpload fileUpload, Form form) throws AppException;\n\t/** removes all fileUploads\n\t * DO NOT USE, IMPROPERLY UPDATES ACL_OBJECT table\n\t * Functional but does not destroy old acl's which doesnt hurt anything\n\t * but they will take up space if this is commonly used */\n\t@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void deleteFileUploads();\n\t\n\n\t/*\n\t * ******************** Helper methods **********************\n\t */\n\t// TODO: This also should not exist, or it should be changed to\n\t// private/protected. Redundant\n\t// Could be made a boolean so it was not a security vulnerability\n\tpublic FileUpload verifyFileUploadExistenceById(Long id);\n\n\tpublic int getNumberOfFileUploads();\n\t\t\n}", "public UserFileSystemService getUserFileSystemService() {\r\n\t\treturn userFileSystemService;\r\n\t}", "public void testFilesDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"files\");\n assertEquals(file, new File(rootBlog.getFilesDirectory()));\n assertTrue(file.exists());\n }", "private static native int native_chmod( String path, int mode );", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }", "private FileUtil() {}", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "public String getRole() {\r\n\t\treturn role;\r\n\t}", "ResourceRole createResourceRole();", "protected FileSystem getFileSystem() {\n return _fileSystem;\n }", "public interface IRole extends INameable, IDisable, IDocumentable, IStringable {\n\n void addPermission(IPermission permision);\n\n void removePermission(IPermission permision);\n\n void addPermissions(IPermission... permisions);\n\n void removePermissions(IPermission... permisions);\n\n void addPermissions(List<IPermission> permisions);\n\n void removePermissions(List<IPermission> permisions);\n\n IPermission[] getPermissionArray();\n\n List<IPermission> getPermissionList();\n\n Set<IPermission> getPermissionSet();\n\n List<String> getPermissionString();\n\n}", "ISModifyRequiredRole createISModifyRequiredRole();", "public interface RoleService {\n public List<Role> selectRole() throws Exception;\n public Role addRole(Role role) throws Exception;\n public void deleteRole(Role role) throws Exception;\n public void updateRole(Role role) throws Exception;\n public List<RolePermission> selectRolePermission(int id) throws Exception;\n public void allocatePermission(Role role) throws Exception;\n}", "private boolean requrstpermission(){\r\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED){\r\n return true;\r\n }\r\n else {\r\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, IMAGEREQUESTCODE);\r\n return false;\r\n }\r\n }", "@Override\n\tpublic String getAuthority() {\n\t\treturn role;\n\t}", "private void checkPermission(){\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n MY_READ_EXTERNAL_STORAGE);\n }else{\n playVideoWithIntent();\n }\n }", "@Test(groups = \"role\", priority = 1)\n public void testRoleAdd() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient.roleAdd(rootRole).get();\n this.authDisabledAuthClient.roleAdd(userRole).get();\n }", "public void setRole(String role) {\r\n this.role = role;\r\n }", "@Test\r\n public void testUnauthorizedShare() {\n System.out.println(\"Test : Bob cannot share Alice's file with Carl if the file has not been shared with Bob\");\r\n System.out.println();\r\n String userId = \"Bob\";\r\n String filePath = \"/home/Carl/shared/Cf1.txt\";\r\n String targetUserId = \"Alice\";\r\n String owner = \"Carl\";\r\n String fileName = \"Cf1.txt\";\r\n List<File> fileList = FileList.getFileList();\r\n File file = new File(filePath, owner, fileName);\r\n fileList.add(file);\r\n try {\r\n service.shareFile(userId, targetUserId, filePath);\r\n } catch (UnauthorizedException e) {\r\n Assert.assertTrue(e instanceof UnauthorizedException);\r\n } catch (Throwable t) {\r\n Assert.assertFalse(\"Other exception caught\", true);\r\n t.printStackTrace();\r\n }\r\n System.out.println();\r\n\r\n }", "public String getRole()\n\t{\n\t\treturn role;\n\t}", "public java.lang.String getRole() {\n return role;\n }", "String computeRole();", "public SysPermissionRoleRecord() {\n super(SysPermissionRole.SYS_PERMISSION_ROLE);\n }", "private static void setPermission(Path path) throws JulongChainException {\n if(System.getProperty(SYSTEM_PROP_OS).contains(SYSTEM_PROP_VALUE_WINDOWS)) {\n return;\n }\n\n Set<PosixFilePermission> filePermissions = new HashSet<>();\n filePermissions.add(PosixFilePermission.OWNER_READ);\n filePermissions.add(PosixFilePermission.OWNER_WRITE);\n filePermissions.add(PosixFilePermission.OWNER_EXECUTE);\n filePermissions.add(PosixFilePermission.GROUP_READ);\n filePermissions.add(PosixFilePermission.GROUP_EXECUTE);\n filePermissions.add(PosixFilePermission.OTHERS_READ);\n filePermissions.add(PosixFilePermission.OTHERS_EXECUTE);\n try {\n Files.setPosixFilePermissions(path, filePermissions);\n } catch (IOException e) {\n throw new JulongChainException(\"set directory\" + path + \" permission failed \" + e.getMessage());\n }\n }", "@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}", "public static void denyAccess(String folder) throws Exception\r\n {\r\n String drive = \"\";\r\n for(int i=0;i<folder.length();i++)\r\n {\r\n if(folder.charAt(i)=='\\\\')\r\n {\r\n drive = folder.substring(0, i);\r\n break;\r\n }\r\n }\r\n String directory = \"\";\r\n String fileName = \"\";\r\n for(int i=folder.length()-1;i>=0;i--)\r\n {\r\n if(folder.charAt(i)=='\\\\')\r\n {\r\n fileName = folder.substring(i+1);\r\n directory = folder.substring(0,i);\r\n break;\r\n }\r\n }\r\n String user = fetchUserName();\r\n Runtime r = Runtime.getRuntime();\r\n\tr.exec(\"cmd /c start cmd.exe /K \\\"\"+drive+\"&&cd \"+directory+\"&&icacls \\\"\"+fileName+\"\\\" /deny \"+user+\":W&&exit\\\"\");\r\n r.exec(\"cmd /c start cmd.exe /K \\\"\"+drive+\"&&cd \"+directory+\"&&icacls \\\"\"+fileName+\"\\\" /deny \"+user+\":R&&exit\\\"\");\r\n \r\n /* \r\n Process p = Runtime.getRuntime().exec(drive);\r\n p.waitFor();\r\n p = Runtime.getRuntime().exec(\"cd \"+directory);\r\n \r\n \r\n p=Runtime.getRuntime().exec(\"icacls \"+fileName+\" /deny \"+user+\":W\"); \r\n p.waitFor(); \r\n p = Runtime.getRuntime().exec(\"icacls \"+fileName+\" /deny \"+user+\":R\");\r\n p.waitFor();\r\n */\r\n }", "@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }", "private void changeExecPermission(String permission, String filePath) {\n\t\t// TODO Auto-generated method stub\n\t\t// change permission to the uploaded science app for execute\n\t\t//String command = \"sudo chmod +\" + permission + \" \" + filePath;\n\t\tString command = \"chmod +\" + permission + \" \" + filePath;\n\t\ttry {\n\t\t\t// Create a Runtime instance.\n\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t// Execute the command.\n\t\t\tProcess p1 = rt.exec(command);\n\t\t\tSystem.out.println(command);\n\t\t\t// Read the input stream.\n\t\t\tInputStream instd = p1.getInputStream();\n\t\t\t// Create a buffered reader\n\t\t\tBufferedReader buf_reader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(instd));\n\t\t\t// Declare a temporary variable to contain a line.\n\t\t\tString line = \"\";\n\t\t\t// Declare a temporary variable to store a line count.\n\t\t\t// Begin to read each line from given output (or given file).\n\t\t\twhile ((line = buf_reader.readLine()) != null) {\n\t\t\t\t// Increment line count.\n\t\t\t\t// System.out.println(line);\n\t\t\t}\n\t\t\t// Close the buffered reader instance.\n\t\t\tbuf_reader.close();\n\t\t\t// Let's wait for the Runtime instance to be done.\n\t\t\tp1.waitFor();\n\n\t\t\tInputStream errstd = p1.getErrorStream();\n\t\t\tBufferedReader buf_err_reader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(errstd));\n\t\t\twhile ((line = buf_err_reader.readLine()) != null) {\n\t\t\t\tSystem.err.println(line);\n\t\t\t}\n\t\t\tbuf_err_reader.close();\n\t\t} catch (Exception ex) {\n\t\t\t// ex.printStackTrace();\n\t\t\t// Print out any message when an error(s) occurs.\n\t\t\tSystem.err.println(ex.getMessage());\n\t\t}\n\t}", "public static void grantAccess(String folder) throws Exception\r\n {\r\n String drive = \"\";\r\n for(int i=0;i<folder.length();i++)\r\n {\r\n if(folder.charAt(i)=='\\\\')\r\n {\r\n drive = folder.substring(0, i);\r\n break;\r\n }\r\n }\r\n String directory = \"\";\r\n String fileName = \"\";\r\n for(int i=folder.length()-1;i>=0;i--)\r\n {\r\n if(folder.charAt(i)=='\\\\')\r\n {\r\n fileName = folder.substring(i+1);\r\n directory = folder.substring(0,i);\r\n break;\r\n }\r\n }\r\n String user = fetchUserName();\r\n Runtime r = Runtime.getRuntime();\r\n\tr.exec(\"cmd /c start cmd.exe /K \\\"\"+drive+\"&&cd \"+directory+\"&&icacls \\\"\"+fileName+\"\\\" /grant \"+user+\":R&&exit\\\"\");\r\n r.exec(\"cmd /c start cmd.exe /K \\\"\"+drive+\"&&cd \"+directory+\"&&icacls \\\"\"+fileName+\"\\\" /grant \"+user+\":W&&exit\\\"\");\r\n }", "@Test\n public void accessDeniedFolder() throws CommandException {\n ExportCommand command = new ExportCommand(\".txt\", \"C:/Windows/a\");\n command.setData(model, null, null, null);\n if (os.indexOf(\"win\") > 0) {\n assertEquals(command.execute(), new CommandException(MESSAGE_ACCESS_DENIED));\n }\n }", "String getRole();", "String getRole();", "public RoleElements getRoleAccess() {\n\t\treturn pRole;\n\t}", "boolean isWritePermissionGranted();", "@Override\r\n\tpublic int addRole(Role role) {\n\t\treturn 0;\r\n\t}", "public DirectoryFileLocator() {\r\n this(System.getProperty(\"user.dir\"));\r\n }", "public void setRole(String role)\n {\n _role=role;\n }", "public boolean isReadOnly() {\n String apath = folder.getAbsolutePath();\n if (apath.startsWith(Base.getExamplesPath()) ||\n apath.startsWith(Base.getLibrariesPath()) ||\n apath.startsWith(Base.getSketchbookLibrariesPath())) {\n return true;\n\n // canWrite() doesn't work on directories\n //} else if (!folder.canWrite()) {\n } else {\n // check to see if each modified code file can be written to\n for (int i = 0; i < codeCount; i++) {\n if (code[i].isModified() &&\n code[i].fileReadOnly() &&\n code[i].fileExists()) {\n //System.err.println(\"found a read-only file \" + code[i].file);\n return true;\n }\n }\n //return true;\n }\n return false;\n }", "public void setRole(String role) {\n this.role = role;\n }", "public Object run() {\n boolean success = true;\n if( !sdirectory.isDirectory() )\n success = false;\n String[] list = sdirectory.list();\n // Some JVMs return null for File.list() when the directory is empty\n if( list != null )\n {\n for( int i = 0; i < list.length; i++ )\n {\n File entry = new File( sdirectory, list[i] );\n if( entry.isDirectory() )\n {\n if( !changeDirectoryToReadOnly(entry) )\n success = false;\n }\n else {\n if( !entry.setReadOnly() )\n success = false;\n }\n }\n }\n return new Boolean(success);\n }" ]
[ "0.5779621", "0.5714304", "0.5657885", "0.5555128", "0.5432628", "0.5413887", "0.5355799", "0.52904373", "0.5251887", "0.5229592", "0.52131325", "0.51815194", "0.51619077", "0.51247644", "0.50764656", "0.5063212", "0.5022163", "0.500868", "0.4961124", "0.49575093", "0.4946987", "0.49410376", "0.49344867", "0.49250233", "0.49232152", "0.4902251", "0.48984522", "0.48615646", "0.48523813", "0.48481", "0.48470065", "0.48453686", "0.48400328", "0.48306805", "0.4828769", "0.48278788", "0.4823539", "0.4823475", "0.481614", "0.48090285", "0.48072588", "0.48027647", "0.480234", "0.48013097", "0.48003134", "0.47999746", "0.47872996", "0.478647", "0.47854015", "0.47851697", "0.47824737", "0.47755805", "0.4770922", "0.4768973", "0.4768067", "0.4767644", "0.47536325", "0.47533026", "0.47491914", "0.47482896", "0.4746884", "0.47465628", "0.47455388", "0.47436458", "0.47337037", "0.4724492", "0.47241238", "0.47202128", "0.4716441", "0.47136852", "0.47122315", "0.47053412", "0.47037354", "0.4703122", "0.46998852", "0.46960503", "0.46936572", "0.46928126", "0.46906254", "0.4689632", "0.46826193", "0.4674697", "0.4672378", "0.46714017", "0.46706957", "0.4669343", "0.46651813", "0.46635252", "0.46627367", "0.46617892", "0.46585274", "0.46585274", "0.4657325", "0.46571314", "0.46527043", "0.46518883", "0.4651398", "0.46510583", "0.4650808", "0.46496397" ]
0.48206338
38
Tries to find the ssh executable.
public File tryFindSshExecutable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void sshCommandCanBeExecuted() throws Exception {\n allowGlobalCapabilities(REGISTERED_USERS, GlobalCapability.ACCESS_DATABASE);\n\n for (String root : COMMANDS.keySet()) {\n for (String command : COMMANDS.get(root)) {\n // We can't assert that adminSshSession.hasError() is false, because using the --help\n // option causes the usage info to be written to stderr. Instead, we assert on the\n // content of the stderr, which will always start with \"gerrit command\" when the --help\n // option is used.\n String cmd = String.format(\"gerrit%s%s %s\", root.isEmpty() ? \"\" : \" \", root, command);\n log.debug(cmd);\n adminSshSession.exec(String.format(\"%s --help\", cmd));\n String response = adminSshSession.getError();\n assertWithMessage(String.format(\"command %s failed: %s\", command, response))\n .that(response)\n .startsWith(cmd);\n }\n }\n }", "public\n static\n String\n which( CharSequence cmd )\n {\n String cmdStr = inputs.notNull( cmd, \"cmd\" ).toString();\n\n String path = System.getenv( ENV_PATH );\n\n if ( path != null ) \n {\n for ( String dir : PAT_PATH_SEP.split( path ) )\n {\n File f = new File( dir, cmdStr );\n if ( f.exists() && f.canExecute() ) return f.toString();\n }\n }\n\n return null; // if we get here\n }", "LaunchingConnector findLaunchingConnector() {\n List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();\n for (Connector connector : connectors) {\n if (connector.name().equals(\"com.sun.jdi.CommandLineLaunch\")) {\n return (LaunchingConnector) connector;\n }\n }\n throw new Error(\"No launching connector\");\n }", "String getExecutable();", "public String tryGetIncomingRsyncExecutable();", "public String getExecutable(final Launcher launcher) throws IOException, InterruptedException {\n return launcher.getChannel().call(new Callable<String, IOException>() {\n private static final long serialVersionUID = 2373163112639943768L;\n\n @Override\n public String call() throws IOException {\n String nsisHome = Util.replaceMacro(getHome(), EnvVars.masterEnvVars);\n File exe = new File(nsisHome, \"makensis.exe\");\n\n return exe.exists() ? exe.getPath() : null;\n }\n });\n }", "public String getExecutable();", "public String tryGetOutgoingRsyncExecutable();", "public static String getExecutable() {\n \texecutable = getProperty(\"executable\");\n \tif (executable == null) executable = \"dot\";\n \treturn executable;\n }", "@Test(groups = \"Integration\")\n public void testIsSshableWhenTrue() throws Exception {\n assertTrue(host.isSshable());\n }", "File getExecutable();", "@Test(groups = \"Integration\")\n public void testSshExecCommands() throws Exception {\n OutputStream outStream = new ByteArrayOutputStream();\n String expectedName = Os.user();\n host.execCommands(MutableMap.of(\"out\", outStream), \"mysummary\", ImmutableList.of(\"whoami; exit\"));\n String outString = outStream.toString();\n \n assertTrue(outString.contains(expectedName), outString);\n }", "@Test(groups = \"Integration\")\n public void testSshExecScript() throws Exception {\n OutputStream outStream = new ByteArrayOutputStream();\n String expectedName = Os.user();\n host.execScript(MutableMap.of(\"out\", outStream), \"mysummary\", ImmutableList.of(\"whoami; exit\"));\n String outString = outStream.toString();\n \n assertTrue(outString.contains(expectedName), outString);\n }", "public Boolean whichCmd(String s){\n if (s.charAt(0) == '!' || s.charAt(0) == '?'){\n return cmd.get(s.substring(0,1)).apply(s.substring(1));\n }\n else return histOrPile(s);\n }", "public interface JavaExecutableLocator {\n public String javaExecutable();\n}", "private String getCmdPromptString()\n {\n String prompt = currentUser.getName() + '@' + HOST_NAME + ':';\n prompt += currentUser.getHomeDir().getName().equals(currentUser.getCurrentDirectory().getName())\n ? '~'\n : currentUser.getCurrentDirectory().getName();\n\n prompt += currentUser.isRootUser() ? \"# \" : \"$ \";\n return prompt;\n }", "boolean isExecutable();", "@Override \n\t\tprotected String findEclipseOnPlatform(File dir) {\n\t\t\tFile possible = new File(dir, getWindowsExecutableName());\n\t\t\treturn (possible.isFile()) ? dir.getAbsolutePath() : null;\n\t\t}", "public SSHConnection getSSHConnection() {return _sshConnection;}", "private static String getDockerPath() {\n final String dockerPath = \"/usr/bin/docker\"; // path on Ubuntu\n File f = new File(dockerPath);\n if (f.exists() && !f.isDirectory()) {\n return dockerPath;\n }\n\n // path on Mac\n return \"/usr/local/bin/docker\";\n }", "private String runHostnameCommand() {\n\n final String CMD = \"hostname\";\n\n String hostname;\n try {\n Process process = Runtime.getRuntime().exec(CMD);\n process.waitFor();\n\n int exitValue = process.exitValue();\n if (exitValue != 0) {\n String message = \"Executing command \\\"\"\n + CMD\n + \"\\\" failed with exit code \"\n + exitValue\n + '.';\n log(message, Project.MSG_VERBOSE);\n return null;\n }\n\n // Get the stdout output from the process\n InputStream in = process.getInputStream();\n\n // Configure max expected hostname length\n int maxHostNameLength = 500;\n\n // Read the whole output\n byte[] bytes = new byte[maxHostNameLength];\n int read = in.read(bytes);\n if (read < 0) {\n return null;\n }\n\n // Convert the bytes to a String\n final String ENCODING = \"US-ASCII\";\n hostname = new String(bytes, 0, read, ENCODING);\n\n // Check all characters in the hostname\n for (int i = 0; i < read; i++) {\n char ch = hostname.charAt(i);\n if (ch >= 'a' && ch <= 'z') {\n // OK: fall through\n } else if (ch > 'A' && ch <= 'Z') {\n // OK: fall through\n } else if (ch > '0' && ch <= '9') {\n // OK: fall through\n } else if (ch == '-' || ch == '_' || ch == '.') {\n // OK: fall through\n } else if (ch == '\\n' || ch == '\\r') {\n hostname = hostname.substring(0, i);\n i = read;\n } else {\n String message = \"Found invalid character \"\n + (int) ch\n + \" in output of command \\\"\"\n + CMD\n + \"\\\".\";\n log(message, Project.MSG_VERBOSE);\n return null;\n }\n }\n\n } catch (Exception exception) {\n String message = \"Caught unexpected \"\n + exception.getClass().getName()\n + \" while attempting to execute command \\\"\"\n + CMD\n + \"\\\".\";\n log(message, Project.MSG_VERBOSE);\n hostname = null;\n }\n\n if (hostname != null) {\n hostname = hostname.trim();\n if (hostname.length() < 1) {\n hostname = null;\n }\n }\n\n return hostname;\n }", "public static void main(String args[]) {\n try {\n // Setup a logfile\n /*Handler fh = new FileHandler(\"example.log\");\n fh.setFormatter(new SimpleFormatter());\n Logger.getLogger(\"com.sshtools\").setUseParentHandlers(false);\n Logger.getLogger(\"com.sshtools\").addHandler(fh);\n Logger.getLogger(\"com.sshtools\").setLevel(Level.ALL);*/\n // Configure J2SSH (This will attempt to install the bouncycastle provider\n // under jdk 1.3.1)\n ConfigurationLoader.initialize(false);\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(System.in));\n System.out.print(\"Connect to host? \");\n String hostname = reader.readLine();\n // Make a client connection\n SshClient ssh = new SshClient();\n // Connect to the host\n ssh.connect(hostname);\n PublicKeyAuthenticationClient pk = new PublicKeyAuthenticationClient();\n // Get the users name\n System.out.print(\"Username? \");\n String username = reader.readLine();\n pk.setUsername(username);\n // Get the private key file\n System.out.print(\"Path to private key file? \");\n String filename = reader.readLine();\n // Open up the private key file\n SshPrivateKeyFile file =\n SshPrivateKeyFile.parse(new File(filename));\n // If the private key is passphrase protected then ask for the passphrase\n String passphrase = null;\n if (file.isPassphraseProtected()) {\n System.out.print(\"Enter passphrase? \");\n passphrase = reader.readLine();\n }\n // Get the key\n SshPrivateKey key = file.toPrivateKey(passphrase);\n pk.setKey(key);\n // Try the authentication\n int result = ssh.authenticate(pk);\n // Evaluate the result\n if (result == AuthenticationProtocolState.COMPLETE) {\n // The connection is authenticated we can now do some real work!\n SessionChannelClient session = ssh.openSessionChannel();\n if (!session.requestPseudoTerminal(\"vt100\", 80, 24, 0, 0, \"\")) {\n logger.info(\"Failed to allocate a pseudo terminal\");\n }\n if (session.startShell()) {\n InputStream in = session.getInputStream();\n OutputStream out = session.getOutputStream();\n IOStreamConnector input =\n new IOStreamConnector(System.in, session.getOutputStream());\n IOStreamConnector output =\n new IOStreamConnector(session.getInputStream(), System.out);\n output.getState().waitForState(IOStreamConnectorState.CLOSED);\n }\n else {\n logger.info(\"Failed to start the users shell\");\n }\n ssh.disconnect();\n }\n if (result == AuthenticationProtocolState.PARTIAL) {\n logger.info(\"Further authentication requried!\");\n }\n if (result == AuthenticationProtocolState.FAILED) {\n logger.info(\"Authentication failed!\");\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static String[] getRunScriptCommand(File script) {\n\t\tString absolutePath = script.getAbsolutePath();\n\t\treturn WINDOWS ? new String[] { \"cmd\", \"/c\", absolutePath } : new String[] { \"/bin/bash\", absolutePath };\n\t}", "public DeviceDescriptionSSHDetails getSshDetails() {\n return sshDetails;\n }", "public MyPowerHost findHostForVm(Vm vm) {\n\t\t//找到第一个合适的host就返回\n\t\tfor (MyPowerHost host : this.<MyPowerHost> getHostList()) {\n\t\t\tif (host.isSuitableForVm(vm)) {\n\t\t\t\treturn host;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static boolean cygwinInstalled() {\n return System.getenv(\"CYGWIN\") != null;\n }", "public String getJVMExecutablePath();", "SSHExecChannel(SSHConnection sshConnection)\n {\n // Check input.\n if (sshConnection == null) {\n String msg = MsgUtils.getMsg(\"TAPIS_NULL_PARAMETER\", \"SSHExecChannel\", \"sshConnection\");\n throw new TapisRuntimeException(msg);\n }\n _sshConnection = sshConnection;\n }", "private static String testConnection(String ipAddress, String username, String password) throws IOException\n {\n Pattern successfulSSH = Pattern.compile(\"Desktop\");\n\n JSch jsch = new JSch();\n com.jcraft.jsch.Session session = null;\n String result = \"\";\n\n try\n {\n session = jsch.getSession(username, ipAddress, 22);\n session.setPassword(password);\n\n // Avoid asking for key confirmation\n Properties prop = new Properties();\n prop.put(\"StrictHostKeyChecking\", \"no\");\n session.setConfig(prop);\n session.connect();\n\n // SSH Channel\n ChannelExec channel = (ChannelExec) session.openChannel(\"exec\");\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n channel.setOutputStream(stream);\n\n // Execute command\n channel.setCommand(\"ls -lart\");\n channel.connect(1000);\n java.lang.Thread.sleep(500);\n\n result = stream.toString();\n\n Matcher matcher = successfulSSH.matcher(result);\n if (matcher.find())\n result = \"Successfully connected!\";\n else\n result = \"Failed to connect!\";\n }\n catch (JSchException ex)\n {\n String s = ex.toString();\n System.out.println(s);\n result = \"Invalid credentials!\";\n }\n catch (InterruptedException ex)\n {\n String s = ex.toString();\n System.out.println(s);\n result = \"Connection interrupted!\";\n }\n finally\n {\n if (session != null)\n session.disconnect();\n return result;\n }\n }", "private ILaunch findLaunch() throws CoreException {\n ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n for (ILaunch launch : manager.getLaunches()) {\n\n // TODO: figure out a more correct way of doing this\n if ( launch.getLaunchMode().equals(ILaunchManager.DEBUG_MODE)\n && launch.getLaunchConfiguration() != null\n && launch.getLaunchConfiguration().getAttribute(\"launchable-adapter-id\", \"\")\n .equals(\"com.amazonaws.eclipse.wtp.elasticbeanstalk.launchableAdapter\")\n && launch.getLaunchConfiguration().getAttribute(\"module-artifact\", \"\")\n .contains(moduleToPublish.getName()) ) {\n return launch;\n }\n }\n return null;\n }", "protected abstract Executable getExecutable();", "public void executeSshScript(String hostname, String username, String password)\n throws SshException, IOException, InterruptedException, TelnetException\n {\n String shellPrompt = \">\";\n String shellPrompt1 = \":\";\n\n // initialize and create new Ssh instance\n SshParameters sshParams = new SshParameters(hostname,username,password);\n Ssh ssh = new Ssh(sshParams);\n\n // register this class to receive Ssh events\n ssh.addSshListener(this);\n\n // create new script object and bind to the given ssh object\n SshScript script = new SshScript(ssh);\n\n \n\n// Scanner sn = new Scanner(System.in);\n// FileWriter f = new FileWriter(\"write.txt\");\n\n// PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(sn.getOutputStream())), true);\n\n\n /* SshTask task2 = new SshTask(shellPrompt, \"equwxyb11\", shellPrompt);\n\t script.addTask(task2);*/\n\n // add tasks to script object\n script.addTask(new SshTask(shellPrompt, \"show host\", shellPrompt));\n script.addTask(new SshTask(shellPrompt, \"ssh ssgpun\", shellPrompt1));\n script.addTask(new SshTask(shellPrompt1, \"equwxyb11\", shellPrompt));\n script.addTask(new SshTask(shellPrompt, \"net 10.136.197.82\", shellPrompt1));\n script.addTask(new SshTask(shellPrompt1, \"els\", shellPrompt1));\n script.addTask(new SshTask(shellPrompt1, \"dec@12345\", shellPrompt));\n \n script.addTask(new SshTask(shellPrompt, \"telnet 10.228.128.33\", shellPrompt1));\n script.addTask(new SshTask(\">\", \"username\", \":\"));\n\n /*\n// String hostname_t = \"10.0.0.2\";\n String loginPrompt = \"login name:\";\n String passwordPrompt = \"password:\";\n\n // create new TelnetSession instance providing hostname as argument\n TelnetSession session = new TelnetSession(\"10.228.128.33\");\n\n // set the expected login prompt\n session.setLoginPrompt(loginPrompt);\n\n // set the expected password prompt\n session.setPasswordPrompt(passwordPrompt);\n\n // set the expected shell prompt\n session.setShellPrompt(\":\");\n\n // connect and login using supplied username and password\n session.connect(\"switchind\", \"Indore123\");\n*/\n // send command to telnet server and wait for shell prompt\n /* session.send(\"cd /user/logs\");\n\n // send command to telnet server and wait for shell prompt\n session.send(\"rm *.log\");\n\n // send command to telnet server and DO NOT wait for shell prompt\n session.sendNoWait(\"exit\");\n\n // close connection with telnet server\n session.disconnect();\n\n*/\n// TelnetTask tt = new TelnetTask(shellPrompt1, \"switchind\", shellPrompt1);\n\n// script.addTask(new SshTask(shellPrompt1, \"switchind\", shellPrompt1));\n// script.addTask(new SshTask(shellPrompt1, \"Indore123\", \"\\\\\"));\n\n // connect to SSH server and execute script\n ssh.connect();\n\n // wait until last task is complete\n while(!script.isComplete()) {\n try {\n Thread.sleep(500);\n } catch(Exception e) {\n \t System.err.println(e.getMessage());\n }\n }\n\n // disconnect from server\n// ssh.disconnect();\n\n/* String loginPrompt = \":\";\n String passwordPrompt = \":\";\n\n // create new TelnetSession instance providing hostname as argument\n TelnetSession session = new TelnetSession(\"10.228.128.33\");\n\n // set the expected login prompt\n session.setLoginPrompt(loginPrompt);\n\n // set the expected password prompt\n session.setPasswordPrompt(passwordPrompt);\n\n // set the expected shell prompt\n session.setShellPrompt(\":\");\n\n // connect and login using supplied username and password\n session.connect(\"switchind\", \"Indore123\");*/\n\n }", "private static String getSetCommand()\n {\n String setCmd;\n String osName = System.getProperty(\"os.name\");\n\n if (osName.indexOf(\"indows\") != -1)\n {\n if (osName.indexOf(\"indows 9\") != -1)\n {\n setCmd = \"command.com /c set\";\n }\n else\n {\n setCmd = \"cmd.exe /c set\";\n }\n }\n else\n {\n setCmd = \"/usr/bin/env\";\n //should double check for all unix platforms\n }\n return setCmd;\n }", "public void startExpectSSH() throws JSchException, IOException {\n\t channel = session.openChannel(\"shell\");\n\t expect = new Expect(channel.getInputStream(),channel.getOutputStream());\n\t channel.connect();\t\n\t}", "java.lang.String getRemoteHost();", "public String checkR_HOME(String path) throws FileNotFoundException {\n\t\tboolean trustRPath = false;\n\t\tif (OS.startsWith(\"Mac\")) {\n\t\t\ttrustRPath = rExist(path + \"/R\") || rExist(path + \"/bin/R\");\n\t\t\tif(!trustRPath) {\n\t\t\t\tpath = \"/Library/Frameworks/R.framework/Resources\";\n\t\t\t\ttrustRPath = rExist(path + \"/R\");\n\t\t\t}\n\t\t\tif(!trustRPath) {\n\t\t\t\tpath = \"/opt/local/lib/R\";\n\t\t\t\ttrustRPath = rExist(path + \"/bin/R\");\n\t\t\t}\n\t\t} else if (OS.startsWith(\"Windows\")) {\n\t\t\tif (path == null) {\n\t\t\t\tpath = RegQuery(\"HKLM\\\\SOFTWARE\\\\R-core\\\\R /v InstallPath\");\n\t\t\t\tif (path == null)\n\t\t\t\t\tpath = \"\";\n\t\t\t}\n\t\t\ttrustRPath = rExist(path + \"\\\\bin\\\\R.exe\"); \n\t\t} else if (OS.startsWith(\"Linux\")) {\n\t\t\tif (path == null) {\n\t\t\t\tpath = \"/usr/lib/R\";\n\t\t\t}\n\t\t\ttrustRPath = rExist(path);\n//\t\t\tlink: /usr/bin/R -> /usr/lib/R/bin/R\n//\t\t\tno link: /usr/lib/R/R -> /usr/lib/R/bin/R \n//\t\t R_HOME is /usr/lib/R\n\t\t}\n\t\tif (!trustRPath)\n\t\t\tthrow new FileNotFoundException(\"Incorrect R_HOME path: \" + path);\n\t\tlogger.debug(\"R_HOME = \" + path);\n\t\treturn path;\n\t}", "public final String getHostname(final EnvVars envVars) {\n String[] UNIX_OS = {\"mac\", \"linux\", \"freebsd\", \"sunos\"};\n String hostname = null;\n\n // Check hostname configuration from Jenkins\n hostname = getDescriptor().getHostname();\n if ( (hostname != null) && isValidHostname(hostname) ) {\n logger.fine(String.format(\"Using hostname set in 'Manage Plugins'. Hostname: %s\", hostname));\n return hostname;\n }\n\n // Check hostname using jenkins env variables\n if ( envVars.get(\"HOSTNAME\") != null ) {\n hostname = envVars.get(\"HOSTNAME\").toString();\n }\n if ( (hostname != null) && isValidHostname(hostname) ) {\n logger.fine(String.format(\"Using hostname found in $HOSTNAME host environment variable. Hostname: %s\", hostname));\n return hostname;\n }\n\n // Check OS specific unix commands\n String os = getOS();\n if ( Arrays.asList(UNIX_OS).contains(os) ) {\n // Attempt to grab unix hostname\n try {\n String[] cmd = {\"/bin/hostname\", \"-f\"};\n Process proc = Runtime.getRuntime().exec(cmd);\n InputStream in = proc.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n StringBuilder out = new StringBuilder();\n String line;\n while ( (line = reader.readLine()) != null ) {\n out.append(line);\n }\n\n hostname = out.toString();\n } catch (Exception e) {\n logger.severe(e.getMessage());\n }\n\n // Check hostname\n if ( (hostname != null) && isValidHostname(hostname) ) {\n logger.fine(String.format(\"Using unix hostname found via `/bin/hostname -f`. Hostname: %s\", hostname));\n return hostname;\n }\n }\n\n // Check localhost hostname\n String out = null;\n try {\n hostname = Inet4Address.getLocalHost().getHostName().toString();\n } catch (UnknownHostException e) {\n logger.fine(String.format(\"Unknown hostname error received for localhost. Error: %s\", e));\n }\n if ( (hostname != null) && isValidHostname(hostname) ) {\n logger.fine(String.format(\"Using hostname found via Inet4Address.getLocalHost().getHostName(). Hostname: %s\", hostname));\n return hostname;\n }\n\n // Never found the hostname\n if ( (hostname == null) || \"\".equals(hostname) ) {\n logger.warning(\"Unable to reliably determine host name. You can define one in \" +\n \"the 'Manage Plugins' section under the 'Datadog Plugin' section.\");\n }\n return null;\n }", "protected String execute(String command)\n {\n if (this.isValid()) { \n try { \n JSch jsch = new JSch(); \n jsch.addIdentity(this.privatekey, this.publickey, this.passphrase.getBytes()); \n\n Session session = jsch.getSession(this.user, this.host, this.port);\n session.setConfig(\"StrictHostKeyChecking\", \"no\");\n session.connect();\n\n ChannelExec channel = (ChannelExec)session.openChannel(\"exec\");\n channel.setCommand(command);\n channel.setErrStream(System.err);\n InputStream in = channel.getInputStream(); \n channel.connect();\n\n byte[] data = new byte[1024];\n StringBuilder stdout = new StringBuilder();\n while(true) {\n while (in.available() > 0) {\n int read = in.read(data,0 ,1024);\n if (read < 0) \n break; \n stdout.append(new String(data, 0, read ));\n }\n if (channel.isClosed()) {\n if (in.available() > 0)\n continue;\n break;\n }\n Thread.sleep(500); // I absolutely don't of this is too much or less\n }\n int code = channel.getExitStatus();\n\n LOGGER.debug(\"exit code: \" + code + \" message: \" + stdout); \n\n channel.disconnect();\n session.disconnect();\n return stdout.toString();\n } \n catch (JSchException | IOException | InterruptedException ex) {\n LOGGER.error(ex.getMessage(), ex);\n }\n }\n \n return \"\";\n }", "boolean hasRemoteHost();", "public interface IFileSysOperationsFactory\n{\n public IPathCopier getCopier(boolean requiresDeletionBeforeCreation);\n\n public IImmutableCopier getImmutableCopier();\n\n public IPathRemover getRemover();\n\n public IPathMover getMover();\n\n /**\n * Tries to find the <code>ssh</code> executable.\n * \n * @return <code>null</code> if not found.\n */\n public File tryFindSshExecutable();\n\n /**\n * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned.\n */\n public String tryGetIncomingRsyncExecutable();\n\n /**\n * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned.\n */\n public String tryGetOutgoingRsyncExecutable();\n}", "@Test(groups = \"Integration\")\n public void testIsSshableWhenFalse() throws Exception {\n byte[] unreachableIp = new byte[] {123,123,123,123};\n SshMachineLocation unreachableHost = new SshMachineLocation(MutableMap.of(\"address\", InetAddress.getByAddress(\"unreachablename\", unreachableIp)));\n assertFalse(unreachableHost.isSshable());\n }", "String getDefaultRemote(String _default_) throws GitException, InterruptedException;", "public static boolean isCommand(String s) {\n \treturn commands.containsKey(s.toLowerCase());\n }", "public static String getDefaultExecutableName(String providedOS) {\n \t\tString theOS = providedOS;\n \t\tif (theOS == null) {\n \t\t\tEnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());\n \t\t\ttheOS = info.getOS();\n \t\t}\n \t\tif (theOS.equalsIgnoreCase(\"win32\")) //$NON-NLS-1$\n \t\t\treturn \"eclipse.exe\"; //$NON-NLS-1$\n \t\tif (theOS.equalsIgnoreCase(\"macosx\")) //$NON-NLS-1$\n \t\t\treturn \"Eclipse.app\"; //$NON-NLS-1$\n \t\t//FIXME Is this a reasonable default for all non-Windows platforms?\n \t\treturn \"eclipse\"; //$NON-NLS-1$\n \t}", "public void executeSshPassShellScript() {\n\n\t\tString executableScriptCommand = null;\n\t\tArrayList<String> sshResultArray;\n\t\tArrayList<String> listExecuteCmdArray = new ArrayList<String>();\n\t\tlistExecuteCmdArray.add(targetScriptFilePath.toString());\n\t\tlistExecuteCmdArray.add(newNode.getIpAddress());\n\t\tlistExecuteCmdArray.add(newNode.getUserName());\n\t\tlistExecuteCmdArray.add(newNode.getPassword());\n\t\tString actionCmd = createSshCommand(diskName, byteSize, blockCount );\n\t\tlog.debug(\"actionCmd :\" + actionCmd);\n\t\tlistExecuteCmdArray.add(actionCmd);\n\t\tSshpassClientConnection sshpassConn = new SshpassClientConnection();\n\t\tsshResultArray = sshpassConn.executeProcess(listExecuteCmdArray);\n\t\tlistExecuteCmdArray.remove(4);\n\t\tlistExecuteCmdArray.clear();\n\n\t}", "int commandFor(String s) throws AmbiguousException\t\t\t{ return determineCommand(g_commandArray, s, CMD_UNKNOWN);\t}", "public String detectOsPath(String os) {\n\t\tif (os==null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (os.contains(\"win\") || os.contains(\"Win\") || os.contains(\"WIN\")) {\n\t\t\tthis.defaultFileOutputLocation = System.getProperty(\"user.home\") + \"\\\\Desktop\\\\convertedProducts\";\n\t\t\t\n\t\t\treturn WIN;\n\t\t}\n\t\tif (os.contains(\"mac\") || os.contains(\"Mac\") || os.contains(\"MAC\") || os.contains(\"IOS\") || os.contains(\"iOS\")) {\n\t\t\tthis.defaultFileOutputLocation = System.getProperty(\"user.home\") + \"/Desktop/convertedProducts\";\n\t\t\t\n\t\t\treturn MAC;\n\t\t}\n\t\tif (os.contains(\"nix\") || os.contains(\"aix\") || os.contains(\"nux\") || os.contains(\"unt\") || os.contains(\"UNT\") || os.contains(\"sunos\")) {\n\t\t\tthis.defaultFileOutputLocation = System.getProperty(\"user.home\") + \"/Desktop/convertedProducts\";\n\t\t\t\n\t\t\treturn UNIX;\n\t\t}\n\t\treturn null;\n\t}", "public static String getHostname() throws IOException {\n\n String line;\n StringBuilder result = new StringBuilder();\n Process p = Runtime.getRuntime().exec(\"hostname\");\n\n BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n while ((line = br.readLine()) != null) result.append(line);\n\n br.close();\n\n return result.toString();\n }", "public static File getUpdateCenterLauncher(File asInstallRoot) {\n File result = null;\n if(asInstallRoot != null && asInstallRoot.exists()) {\n File updateCenterBin = new File(asInstallRoot, \"updatecenter/bin\"); // NOI18N\n if(updateCenterBin.exists()) {\n String launcher = \"updatetool\"; // NOI18N\n if(Utilities.isWindows()) {\n launcher += \".BAT\"; // NOI18N\n }\n File launcherPath = new File(updateCenterBin, launcher);\n result = (launcherPath.exists()) ? launcherPath : null;\n }\n }\n return result;\n }", "private Object[] execCommand(String command) throws FileSystemUtilException\r\n\t{\r\n\t\tOutputStream out;\r\n\t\tInputStream in;\r\n\t\t\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":execCommand()\");\r\n\t\ttry \r\n\t\t{\t\t\t\r\n\t\t\tchannel = session.openChannel(\"exec\");\r\n\t\t\tlogger.debug(\"channel is opened\");\r\n\t\t} \r\n\t\tcatch (JSchException e) \r\n\t\t{\t\t\t\r\n\t\t\tlogger.debug(\"JSchException :: excepion Reaseon ::\",e);\r\n\t\t\tthrow new FileSystemUtilException(\"EL0005\",null,Level.ERROR,e);\t\t\t\r\n\t\t}\r\n\r\n\t\t((ChannelExec) channel).setCommand(command);\r\n\t\t//get I/O streams for remote scp\r\n\t\ttry \r\n\t\t{\r\n\t\t\tout = channel.getOutputStream();\r\n\t\t\tlogger.debug(\"execCommand :: Output stream ::\"+out);\r\n\t\t} \r\n\t\tcatch (IOException ie) \r\n\t\t{\r\n\t\t\tlogger.debug(\"IOException :: excepion $#### Reaseon ::\",ie);\r\n\t\t\tthrow new FileSystemUtilException(\"EL0006\",null,Level.ERROR,ie);\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tin = channel.getInputStream();\r\n\t\t} \r\n\t\tcatch (IOException ie) \r\n\t\t{\r\n\t\t\tlogger.debug(\"IOException :: excepion reassss Reaseon ::\",ie);\r\n\t\t\tthrow new FileSystemUtilException(\"EL0007\",null,Level.ERROR,ie);\r\n\t\t}\r\n\t\ttry \r\n\t\t{\r\n\t\t\tlogger.debug(\"excuting command \"+command);\r\n\t\t\tchannel.connect();\r\n\t\t\tlogger.debug(\"executed command \"+command);\r\n\t\t} \r\n\t\tcatch (JSchException jse) \r\n\t\t{\r\n\t\t\tlogger.debug(\"JSchException :: excepion reassss Reaseon ::\",jse);\r\n\t\t\tthrow new FileSystemUtilException(\"EL0008\",null,Level.ERROR,jse);\r\n\t\t}\r\n\r\n\t\tObject iostreams[]={out,in};\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":execCommand()\");\r\n\t\treturn iostreams;\t\t\r\n\t}", "private static String getCommand(File file) {\n if (OperatingSystemDetector.isMac()) return String.format(\"open %s\", file);\n if (OperatingSystemDetector.isWindows()) return String.format(\"cmd /c start %s\", file);\n if (OperatingSystemDetector.isLinux()) return String.format(\"xdg-open %s\", file);\n return \"\";\n }", "public boolean getExists() {\n try {\n return getExecutable(new Launcher.LocalLauncher(new StreamTaskListener(new NullStream()))) != null;\n } catch(IOException ex) {\n return false;\n } catch(InterruptedException e) {\n return false;\n }\n }", "public static boolean launch(File file) throws IOException {\n\n String cmd = getCommand(file);\n if (!cmd.isEmpty()) {\n Runtime.getRuntime().exec(cmd);\n return true;\n } else {\n // Unknown OS, try Java awt \"Desktop\" approach\n if (Desktop.isDesktopSupported()) {\n Desktop.getDesktop().open(file);\n return true;\n }\n }\n\n return false;\n }", "public abstract String getLaunchCommand();", "private static boolean grabCommand() {\n\t\tif (input.hasNextLine()) {\n\t\t\tString temp = input.nextLine();\n\t\t\tcommand = temp.substring(0, 2);\n\t\t\tif (command.equals(\"SC\"))\n\t\t\t\tcode = temp.substring(3, temp.length()).trim();\n\t\t\treturn true;\n\t\t} else return false;\n\t}", "String getRemoteHostName();", "String getAbsolutePathWithinSlingHome(String relativePath);", "private String locateFile(String fileName) {\n\t\tString file = null;\n\t\tURL fileURL = ClassLoader.getSystemResource(fileName);\n\t\tif (fileURL != null) {\n\t\t\tfile = fileURL.getFile();\n\t\t} else\n\t\t\tSystem.err.println(\"Unable to locate file \" + fileName);\n\t\treturn file;\n\t}", "@ApiModelProperty(value = \"Optional SSH username to override username specified in environment\")\n public String getSshUsername() {\n return sshUsername;\n }", "public int findPantechHome(boolean isSimple) {\r\n \tfinal String szHome[] = {\"com.pantech.simplehome\", \"com.pantech.launcher2\"};\r\n \tint iIndex = 0;\r\n\t\tint mode = isSimple ? 0 : 1;\r\n \t\r\n \tfor (DisplayResolveInfo info : mList) {\r\n \t\tif ((info.ri != null) &&\r\n \t\t\t(info.ri.activityInfo != null) && \r\n \t\t\t(info.ri.activityInfo.packageName != null))\r\n \t\t{\r\n\t \t\tif (szHome[mode].equals(info.ri.activityInfo.packageName)) {\r\n\t \t\t\treturn iIndex;\r\n\t \t\t} // End of if\r\n \t\t} // End of if\r\n \t\tiIndex++;\r\n \t} // End of for\r\n \treturn -1;\r\n }", "public boolean findServerByHostName() {\n\t\tboolean success = false;\n\t\tthis.serverName = textUI.getString(\"What is the hostname of the server?\");\n\t\t\n\t\ttry {\n\t\t\tthis.serverAddress = NetworkLayer.getAdressByName(this.serverName); \n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\ttextUI.showError(\"Something went wrong while searching for host \" + this.serverName \n\t\t\t\t\t+ \": \" + e.getLocalizedMessage());\n\t\t} \n\t\t\n\t\treturn success;\n\t}", "private static String nativeLocationInJar() {\n\t\tString OS = System.getProperty(\"os.name\");\n\t\tString arch = System.getProperty(\"os.arch\");\n\t\tlog.info(\"Found OS={}, arch={}\", OS, arch);\n\t\tString key = OS+\"_\"+arch;\n\t\tswitch(key)\n\t\t{\n\t\tcase \"Linux_amd64\":\n\t\t\treturn \"native/MANIFEST.Linux_amd64\";\n\t\tcase \"Windows 7_amd64\":\n\t\tcase \"Windows 8_amd64\":\n\t\tcase \"Windows 8.1_amd64\":\n\t\t\treturn \"native/MANIFEST.Windows_amd64\";\n\t\t}\n\t\tlog.error(\"No matching native library for {}\", key);\n\t\tthrow new Error(\"No matching native library for \"+key);\n\t}", "public static String getCommand(String cmd) throws IOException {\n Scanner s = new Scanner(Runtime.getRuntime().exec(cmd).getInputStream()).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "public void connectSSH() throws Exception{\n\t log.info(\"Trying to connect to the device \"+deviceIP+\" via SSH ....\\n\");\n\t try{\n\t\t session = jsch.getSession(deviceName, deviceIP);\n\t\t session.setPassword(devicePassword);\n\t\t session.setConfig(\"StrictHostKeyChecking\", \"no\");\n\t\t session.connect(60 * 1000); \n\t\t if(session.isConnected())\n\t\t \tlog.info(\"Successfully connected to device \"+deviceIP+\"\\n\");\n\t\t else{\n\t\t \tlog.error(\"Unable to connect to device \"+deviceIP+\" possibly because of wrong passowrd or username\\n\");\n\t\t \tthrow new Exception(\"UnableToConnectToTheDeviceBecauseOfInvalidUsernameOrPassword\");\n\t\t }\n\t\t \n\t }catch(Exception e){\n\t\t log.error(\"Unable to connect to the device \"+deviceIP+\"\\n\");\n\t\t throw new Exception(\"UnableToConnectToTheDevice\");\n\t }\n }", "protected abstract String getExecutableKey();", "private String searchForInitFileName() {\n String homeDirectoryInitFileName =\n System.getProperty(\"user.home\") + File.separatorChar + DEFAULT_INIT_FILE_NAME;\n String currentDirectoryInitFileName =\n System.getProperty(\"user.dir\") + File.separatorChar + DEFAULT_INIT_FILE_NAME;\n String systemPropertyInitFileName = System.getProperty(INIT_FILE_PROPERTY);\n\n String[] initFileNames =\n {systemPropertyInitFileName, currentDirectoryInitFileName, homeDirectoryInitFileName};\n\n for (String initFileName : initFileNames) {\n if (IOUtils.isExistingPathname(initFileName)) {\n return initFileName;\n }\n }\n\n return null;\n }", "private boolean checkToolOnHost(ArrayList<SimpleEntry> toolCheck) throws TNotFoundEx{\n\t\tint result=13;\n\t\tString cmd=\"\";\n\t\tboolean pass=true;\n\t\tfor(SimpleEntry s: toolCheck){\n\t\t\tcmd = s.getValue().toString();\n\t\t\tresult = this.commando.executeProcessListPrintOP(cmd, false);\n\n\t\t\t\tif (result != 0){\n\t\t\t\t\tOutBut.printError(\"Tool \"+s.getKey().toString()+\" does not exist on the host, please install it first\");\n\t\t\t\t\tpass=false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn pass;\n\t}", "public String getRemoteCommand() {\n return agentConfig.getRemoteCommand();\n }", "public CommandPack executeCommandClient(String s) throws NullPointerException, NoSuchElementException {\n\n int index = s.indexOf(' ');\n\n String commandName;\n String keyWords;\n\n if (index > -1) {\n commandName = s.substring(0, index);\n keyWords = s.substring(index + 1);\n } else {\n commandName = s;\n keyWords = \"\";\n }\n try {\n\n if (history.size() > 5) {\n history.poll();\n }\n history.add(commandName);\n commands.get(commandName).onCall(keyWords);\n\n } catch (NullPointerException e) {\n System.out.println(\"There is no such command\");\n return null;\n } catch (IOException e) {\n System.out.println(\"we don't have a permission to interact with a file (or an unknown error occurred)\");\n return null;\n }\n return (new CommandPack(commandName, additionalOutputToServer, currentUserInfo));\n }", "private String checkUserLibDir() {\n\t\t// user .libPaths() to list all paths known when R is run from the \n\t\t// command line\n \tif (!runRCmd(\"R -e \\\".libPaths()\\\" -s\")) {\n \t\tlogger.error(\"Could not detect user lib path.\");\n \t} else {\n \t\t// split on '\"'. This gives irrelevant strings, but those will\n \t\t// not match a user.home anyway\n \t\tString[] parts = status.split(\"\\\\\\\"\");\n \t\tString userHome = System.getProperty(\"user.home\");\n \t\tlogger.debug(\"user.home: \" + userHome);\n \t\tfor (int i=0; i<parts.length; i++) {\n \t\t\tString part = parts[i];\n \t\t\t// The replacement for front-slashes for windows systems.\n \t\t\tif (part != null && part.startsWith(userHome) || part.replace(\"/\", \"\\\\\").startsWith(userHome)) {\n \t\t\t\t// OK, we found the first lib path in $HOME\n \t\t\t\treturn part;\n \t\t\t}\n \t\t}\n \t}\n\t\treturn null;\n }", "protected String getSquawkExecutable() {\n return \"squawk\" + env.getPlatform().getExecutableExtension();\n }", "public String getAbsoluteApplicationPath()\r\n {\r\n String res = null;\r\n\r\n if (_windows)\r\n {\r\n RegQuery r = new RegQuery();\r\n res = r.getAbsoluteApplicationPath(_execName);\r\n if (res != null)\r\n {\r\n return res;\r\n }\r\n String progFiles = System.getenv(\"ProgramFiles\");\r\n String dirs[] = { \"\\\\Mozilla\\\\ Firefox\\\\\", \"\\\\Mozilla\", \"\\\\Firefox\", \"\\\\SeaMonkey\",\r\n \"\\\\mozilla.org\\\\SeaMonkey\" };\r\n\r\n for (int i = 0; i < dirs.length; i++)\r\n {\r\n File f = new File(progFiles + dirs[i]);\r\n if (f.exists())\r\n {\r\n return progFiles + dirs[i];\r\n }\r\n }\r\n }\r\n\r\n else if (_linux)\r\n {\r\n try\r\n {\r\n File f;\r\n Properties env = new Properties();\r\n env.load(Runtime.getRuntime().exec(\"env\").getInputStream());\r\n String userPath = (String) env.get(\"PATH\");\r\n String[] pathDirs = userPath.split(\":\");\r\n\r\n for (int i = 0; i < pathDirs.length; i++)\r\n {\r\n f = new File(pathDirs[i] + File.separator + _execName);\r\n\r\n if (f.exists())\r\n {\r\n return f.getCanonicalPath().substring(0,\r\n f.getCanonicalPath().length() - _execName.length());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n return res;\r\n }", "public boolean isOSLinux() {\n\t\tboolean result = false;\n\t\tString linuxEnvKey = \"HOME\";\n\t\tString linuxValue = \"/\";\n\t\tif(System.getenv(linuxEnvKey) != null) {\n\t\t\tif(System.getenv(linuxEnvKey).startsWith(linuxValue)) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public RemoteJenkinsServer findRemoteHost(final String displayName) {\n RemoteJenkinsServer match = null;\n\n for (final RemoteJenkinsServer host : this.getDescriptor().remoteSites) {\n // if we find a match, then stop looping\n if (displayName.equals(host.getDisplayName())) {\n match = host;\n break;\n }\n }\n\n return match;\n }", "private void setHostsFileIfGivenElseDisableChecking(final JSch jsch) throws JSchException {\n if (StringUtils.isNotEmpty(SFTPExportServiceImpl.this.knownHostsFileLocation)) {\n jsch.setKnownHosts(SFTPExportServiceImpl.this.knownHostsFileLocation);\n } else {\n JSch.setConfig(\"StrictHostKeyChecking\", \"no\");\n }\n }", "String getCmdForExternalTool(ObjectStorage storage, Alias alias,\r\n String sqlFile);", "public int execute(String cmd, OutputStream outStream, OutputStream errStream) \n throws IOException, TapisException\n {\n // Check call-specific input.\n if (outStream == null) {\n _sshConnection.close();\n String msg = MsgUtils.getMsg(\"TAPIS_NULL_PARAMETER\", \"execute\", \"outStream\");\n throw new IOException(msg);\n }\n if (errStream == null) {\n _sshConnection.close();\n String msg = MsgUtils.getMsg(\"TAPIS_NULL_PARAMETER\", \"execute\", \"errStream\");\n throw new IOException(msg);\n }\n \n // See if we still have a connection and session, if not restart one.\n if (_sshConnection.isClosed()) _sshConnection.restart();\n \n // Create and configure the execution channel.\n int exitCode = -1; // default value when no remote code returned \n var session = _sshConnection.getSession();\n if (session == null) {\n _sshConnection.close(); // probably not strictly necessary\n String msg = MsgUtils.getMsg(\"TAPIS_SSH_NO_SESSION\");\n throw new TapisException(msg);\n }\n \n // Create the channel.\n ChannelExec channel;\n try {channel = session.createExecChannel(cmd);}\n catch (Exception e) {\n _sshConnection.close();\n String msg = MsgUtils.getMsg(\"TAPIS_SSH_CHANNEL_CREATE_ERROR\", \n _sshConnection.getHost(), _sshConnection.getUsername(), e.getMessage());\n throw new TapisException(msg);\n }\n channel.setOut(outStream);\n channel.setErr(errStream);\n \n // Issue the command and let execution exception flow to caller.\n try { \n // Open the channel.\n channel.open().verify(_sshConnection.getTimeouts().getOpenChannelMillis());\n \n // Send the command and close its stream.\n try (OutputStream pipedIn = channel.getInvertedIn()) {\n pipedIn.write(cmd.getBytes());\n pipedIn.flush();\n }\n \n // Wait for the channel to close.\n channel.waitFor(_closedSet, _sshConnection.getTimeouts().getExecutionMillis());\n Integer status = channel.getExitStatus();\n if (status != null) exitCode = status;\n } \n finally {channel.close(true);} // double down by closing immediately\n \n // Return the remote exit code or the default value.\n return exitCode;\n }", "String getInstallRoot();", "private static void checkTouchpoint(DBConnection dbConnection,int id, String sshUserName, String sshUserPass, String server, boolean status) throws JSchException, IOException, InterruptedException{\n\t\t\n\t\tString owner= \"\";\t\t\n\t\tString sw = \"\";\n\t\tString swVersion= \"\";\n\t\tString os= \"\";\n\t\tString oracle= \"\";\n\t\tString jboss=\"\";\n\t\tString java=\"\";\n\t\t\t\n\t\t\n\n\t\tSSHClient tpHostSSHClient = new SSHClient();\n\t\t\n\t\tif (status){\n\t\n\t\t\t// Connect to the server\n\t\t\ttpHostSSHClient.connect(sshUserName, sshUserPass, server, SSH_PORT);\n\t\t\t\n\t\t\t//OS Version\n\t\t\tint exitCode = tpHostSSHClient.send(\"uname -a\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"uname -a failed with exit code: \" + exitCode);\n\t\t\tos = ServerStatusUtils.parseOS(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t\t//Check if Assure is installed\n\t\t\ttpHostSSHClient.send(\"cat /etc/passwd | grep assure | awk -F: '{ print $1 }'\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"cat /etc/passwd | grep assure | awk -F: '{ print $1 }' a failed with exit code: \" + exitCode);\n\t\t\tsw=ServerStatusUtils.swInstalled(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t\t//Assure Version\n\t\t\ttpHostSSHClient.send(\"assure version\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"assure version failed with exit code: \" + exitCode);\n\t\t\tswVersion=ServerStatusUtils.parseAssureVersion(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t\t//Owner\n\t\t\ttpHostSSHClient.send(\"cat /etc/motd |grep Current |cut -d \\\\[ -f 2 |cut -d \\\\] -f 1\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"Check for owner failed with exit code: \" + exitCode);\n\t\t\towner=ServerStatusUtils.parseOwner(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t\t//Oracle\n\t\t\ttpHostSSHClient.send(\"$ORACLE_HOME/bin/sqlplus -v |grep SQL\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"Check for Oracle Version failed with exit code: \" + exitCode);\n\t\t\toracle=ServerStatusUtils.parseOracle(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t\t//Jboss\n\t\t\ttpHostSSHClient.send(\" ls /opt/arantech/current/ |grep jboss- |grep -v client\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"Check for Jboss failed with exit code: \" + exitCode);\n\t\t\tjboss=ServerStatusUtils.parseJboss(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t\t//Java\n\t\t\ttpHostSSHClient.send(\"java -version\");\n\t\t\tAssert.assertFalse(exitCode != 0, \"Check for Oracle Version failed with exit code: \" + exitCode);\n\t\t\tjava=ServerStatusUtils.parseJava(tpHostSSHClient.getLastResponse());\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tServerStatusUtils.statusWriter(dbConnection, id, server, (status)?\"alive\":\"stopped\", os, sw, swVersion, owner, oracle, jboss, java);\n\n\t}", "public static File findJKindJar() {\n\n\t\tFile jar = findJKindJar(System.getenv(\"JKIND_HOME\"));\n\t\tif (jar != null) {\n\t\t\treturn jar;\n\t\t}\n\n\t\tjar = findJKindJar(System.getenv(\"PATH\"));\n\t\tif (jar != null) {\n\t\t\treturn jar;\n\t\t}\n\n\t\tthrow new JKindException(\"Unable to find jkind.jar in JKIND_HOME or on system PATH\");\n\t}", "public synchronized void start() throws IOException {\n if (isStarted()) {\n throw new IllegalStateException(\"The program has already been started and must be stopped before restarting\");\n }\n // Ensure that the project isn't running from a previous instance.\n runStop();\n Thread launcher = new Thread(() -> {\n try {\n final Shell gripShell = new Shell.Safe(details.createSSHShell());\n gripShell.exec(\"nohup \" + deploymentCommands.getJARLaunchCommand(coreJar.getName(), projectFile.getName()) + \" &\",\n new NullInputStream(0L),\n stdOut.get(),\n stdErr.get());\n } catch (IOException e) {\n throw new IllegalStateException(\"The program failed to start\", e);\n } finally {\n // This thread is done, shut it down.\n synchronized (this) {\n sshThread = Optional.empty();\n }\n eventBus.post(new StartedStoppedEvent(this));\n }\n }, \"SSH Monitor Thread\");\n launcher.setUncaughtExceptionHandler((thread, exception) -> {\n eventBus.post(new UnexpectedThrowableEvent(exception, \"Failed to start the remote instance of the application\"));\n try {\n runStop();\n } catch (IOException e) {\n eventBus.post(new UnexpectedThrowableEvent(e, \"Failed to stop the remote instance of the program\"));\n }\n });\n launcher.setDaemon(true);\n launcher.start();\n this.sshThread = Optional.of(launcher);\n eventBus.post(new StartedStoppedEvent(this));\n }", "public static IPath findProgramLocation(String prog, String pathsStr) {\n \t\tif (prog.trim().length()==0 || pathsStr.trim().length()==0)\n \t\t\treturn null;\n \n \t\tString locationStr = null;\n \t\tString[] dirs = pathsStr.split(File.pathSeparator);\n \n \t\t// try to find \"prog.exe\" or \"prog.com\" on Windows\n \t\tif (Platform.getOS().equals(Platform.OS_WIN32)) {\n \t\t\tfor (String dir : dirs) {\n \t\t\t\tIPath dirLocation = new Path(dir);\n \t\t\t\tFile file = null;\n \n \t\t\t\tfile = dirLocation.append(prog+\".exe\").toFile(); //$NON-NLS-1$\n \t\t\t\tif (file.isFile() && file.canRead()) {\n \t\t\t\t\tlocationStr = file.getAbsolutePath();\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfile = dirLocation.append(prog+\".com\").toFile(); //$NON-NLS-1$\n \t\t\t\tif (file.isFile() && file.canRead()) {\n \t\t\t\t\tlocationStr = file.getAbsolutePath();\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// check \"prog\" on Unix and Windows too (if was not found) - could be cygwin or something\n \t\t// do it in separate loop due to performance and correctness of Windows regular case\n \t\tif (locationStr==null) {\n \t\t\tfor (String dir : dirs) {\n \t\t\t\tIPath dirLocation = new Path(dir);\n \t\t\t\tFile file = null;\n \t\t\t\t\n \t\t\t\tfile = dirLocation.append(prog).toFile();\n \t\t\t\tif (file.isFile() && file.canRead()) {\n \t\t\t\t\tlocationStr = file.getAbsolutePath();\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tif (locationStr!=null)\n \t\t\treturn new Path(locationStr);\n \n \t\treturn null;\n \t}", "private static void testRunHardcodedCmd() {\n\t\tString[] cmdArray = { \"./runAsUser/runAsUser.exe\", \"c:\\\\procesos\", \"martin.zaragoza@ACCUSYSARGBSAS\", \"Marzo2015\", \"\\\"C:\\\\WINDOWS\\\\system32\\\\cmd.exe\\\"\",\n\t\t\t\t\"\\\"/c a.exe 1\\\"\" };\n\t\ttry {\n\t\t\tFile wrkDir = new File(\"c:\\\\procesos\");\n\n\t\t\tProcess process = Runtime.getRuntime().exec(cmdArray, null, wrkDir);\n\t\t\tprintStdout(process.getInputStream());\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n\tpublic void testIPV6WithInterface() throws MalformedURIException {\n\t\tURI uri = new URI(\"ssh://[fe80::212:79ff:fe89:c900%5]\");\n\t\tAssert.assertEquals(\"ssh\", uri.getScheme());\n\t\tAssert.assertEquals(\"[fe80::212:79ff:fe89:c900%5]\", uri.getHost());\n\t\tAssert.assertEquals(-1, uri.getPort());\n\t\tAssert.assertEquals(null, uri.getUserinfo());\n\t}", "public static String getToolchainExecPath(MakeConfiguration conf) {\n String execPath = conf.getLanguageToolchain().getDir().getValue();\n\n if('/' != File.separatorChar)\n execPath = execPath.replace(File.separatorChar, '/');\n\n if('/' != execPath.charAt(execPath.length() - 1))\n execPath += '/';\n\n return execPath;\n }", "public Object execute(String cmd) {\n\t\tObject retval = null;\n\t\tClass[] parameterTypes = new Class[] { CommandInterpreter.class };\n\t\tObject[] parameters = new Object[] { this };\n\t\tboolean executed = false;\n\t\tint size = commandProviders.length;\n\t\tfor (int i = 0; !executed && (i < size); i++) {\n\t\t\ttry {\n\t\t\t\tObject target = commandProviders[i];\n\t\t\t\tMethod method = target.getClass().getMethod(\"_\" + cmd, parameterTypes); //$NON-NLS-1$\n\t\t\t\tretval = method.invoke(target, parameters);\n\t\t\t\texecuted = true; // stop after the command has been found\n\t\t\t}\n\t\t\tcatch (NoSuchMethodException ite) {\n\t\t\t\t// keep going - maybe another command provider will be able to\n\t\t\t\t// execute this command\n\t\t\t}\n\t\t\tcatch (InvocationTargetException ite) {\n\t\t\t\texecuted = true; // don't want to keep trying - we found the\n\t\t\t\t// method but got an error\n\t\t\t\tprintStackTrace(ite.getTargetException());\n\t\t\t}\n\t\t\tcatch (Exception ee) {\n\t\t\t\texecuted = true; // don't want to keep trying - we got an error\n\t\t\t\t// we don't understand\n\t\t\t\tprintStackTrace(ee);\n\t\t\t}\n\t\t}\n\t\t// if no command was found to execute, display help for all registered\n\t\t// command providers\n\t\tif (!executed) {\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tCommandProvider commandProvider = (CommandProvider) commandProviders[i];\n\t\t\t\t\tout.print(commandProvider.getHelp());\n\t\t\t\t\tout.flush();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ee) {\n\t\t\t\t\tprintStackTrace(ee);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// call help for the more command provided by this class\n\t\t\tout.print(getHelp());\n\t\t\tout.flush();\n\t\t}\n\t\treturn retval;\n\t}", "public static String testHome()\n {\n if (testHome == null)\n {\n //See if we set it as a property using TestLauncher\n testHome = System.getProperty (\"jacorb.test.home\");\n\n //Try to find it from the run directory\n if (testHome == null)\n {\n URL url = TestUtils.class.getResource(\"/.\");\n\n String result = url.toString();\n if (result.matches(\"file:/.*?\"))\n {\n result = result.substring (5, result.length() - 9);\n }\n String relativePath=\"/classes/\";\n if (!pathExists(result, relativePath))\n {\n throw new RuntimeException (\"cannot find test home\");\n }\n testHome = osDependentPath(result);\n }\n }\n return testHome;\n }", "public String exec(String cmd) throws IOException {\n\t\tSocket socket = null;\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t\tInputStream in = socket.getInputStream();\n\t\t\tOutputStream out = socket.getOutputStream();\n\t\t\tProtocolSupport.send(\"host:transport:\" + serial, in, out);\n\n\t\t\tProtocolSupport.send(\"shell:\" + cmd, in, out);\n\t\t\tint i = -1;\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\twhile ((i = in.read()) != -1) {\n\t\t\t\tsb.append((char) i);\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}", "public final CommandInvoker<?, ?> resolveInvoker(String line) throws CommandException {\n return resolveCommand(line).getInvoker();\n }", "private Command findCommand( String commandName )\n {\n Command command = null;\n CommandLine[] commands = commandList;\n\n for (int cmd = 0; cmd < commandList.length; ++cmd)\n {\n if (commandList[cmd].equals( commandName ))\n {\n command = commandList[cmd].command;\n break;\n }\n }\n\n return (command);\n }", "@Override\n\tpublic String execute(ShellSession session, String... arguments) \n\t{\n\t\tCommand command = Shell.findCommand(arguments[0]);\n\t\tif (command != null)\n\t\t\treturn command.getHelp();\n\t\telse\n\t\t\treturn \"no command with the name \" + arguments[0];\n\t}", "public static Process executeCommand(String myCommand) throws IOException {\n if (SystemUtils.IS_OS_MAC) {\n return Runtime.getRuntime()\n .exec(new String[]{\"/bin/bash\", \"-c\", myCommand});\n }\n return Runtime.getRuntime().exec(myCommand);\n }", "private String help(final String hUrl) {\n \tif (hUrl.startsWith(\"http://\")) {\n\t \tDisplay.getDefault().asyncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tBioclipsePlatformManager bioclipse = new BioclipsePlatformManager();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbioclipse.openURL(new URL(hUrl));\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(e);\n\t\t\t\t\t} catch (BioclipseException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t \t});\n\t\t\treturn \"\";\n \t} else {\n \t\treturn hUrl;\n \t}\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static <T> T executeWithCommand(String host, String user, char[] pemPrivateKey, String command,\r\n\t\t\tCommandProcessor processor, long timeoutMs) throws IOException {\r\n\t\thasText(host, \"SSH2 command host must not be empty.\");\r\n\t\thasText(user, \"SSH2 command user must not be empty.\");\r\n\t\tnotNull(pemPrivateKey, \"SSH2 command pemPrivateKey must not be null.\");\r\n\t\tnotNull(processor, \"SSH2 command processor must not be null.\");\r\n\r\n\t\tConnection conn = null;\r\n\t\tSession session = null;\r\n\t\ttry {\r\n\t\t\tconn = new Connection(host);\r\n\t\t\tif (log.isDebugEnabled()) {\r\n\t\t\t\tlog.debug(\"SSH2 command connect to {}@{}\", user, host);\r\n\t\t\t}\r\n\t\t\t// Connect.\r\n\t\t\tconn.connect();\r\n\r\n\t\t\t// Authentication with pub-key.\r\n\t\t\tisTrue(conn.authenticateWithPublicKey(user, pemPrivateKey, null), String\r\n\t\t\t\t\t.format(\"Failed to SSH2 authenticate with %s@%s privateKey(%s)\", user, host, new String(pemPrivateKey)));\r\n\r\n\t\t\t// Session & send command.\r\n\t\t\tsession = conn.openSession();\r\n\t\t\tif (log.isInfoEnabled()) {\r\n\t\t\t\tlog.info(\"SSH2 sending command to {}@{}, ({})\", user, host, command);\r\n\t\t\t}\r\n\t\t\tsession.execCommand(command, \"UTF-8\");\r\n\r\n\t\t\t// Wait for completed by condition.\r\n\t\t\tsession.waitForCondition((CLOSED | EOF | TIMEOUT), timeoutMs);\r\n\r\n\t\t\t// Customize process.\r\n\t\t\treturn (T) processor.process(session);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (nonNull(session)) {\r\n\t\t\t\t\tsession.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e2) {\r\n\t\t\t\tlog.error(\"\", e2);\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (nonNull(conn)) {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e2) {\r\n\t\t\t\tlog.error(\"\", e2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "public String getToolCommand();", "public String pwd() throws IOException, TapisException\n {\n final int capacity = 256;\n var output = new ByteArrayOutputStream(capacity);\n var rc = execute(\"pwd\", output);\n if (rc != 0) {\n String msg = MsgUtils.getMsg(\"TAPIS_SSH_EXEC_CMD_ERROR\", \"pwd\", \n _sshConnection.getHost(), _sshConnection.getUsername(), rc);\n throw new TapisException(msg);\n }\n return new String(output.toByteArray());\n }", "public static void setExecutable(final String pathname) throws GrassExecutionException {\r\n\r\n final String version = System.getProperty(\"java.version\").substring(0, 3);\r\n final Float f = Float.valueOf(version);\r\n if (f.floatValue() < (float) 1.6) {\r\n if (Sextante.isUnix() || Sextante.isMacOSX()) {\r\n try {\r\n Runtime.getRuntime().exec(\"chmod +x \" + pathname);\r\n }\r\n catch (final IOException e) {\r\n throw new GrassExecutionException();\r\n }\r\n }\r\n }\r\n else {\r\n if (Sextante.isUnix() || Sextante.isMacOSX()) {\r\n new File(pathname).setExecutable(true);\r\n }\r\n }\r\n }", "public void execute_windowsDriverExtracted() {\n DownloadSelectNotesCommand command = new DownloadSelectNotesCommand(INCORRECT_USERNAME,\n INCORRECT_PASSWORD, INCORRECT_MODULE_CODE);\n String intendedFileLocation = System.getProperty(\"user.dir\")\n + \"/\" + DownloadAllNotesCommand.WINDOWS_CHROME_DRIVER_DIRECTORY;\n File windowsDriverDir = new File(intendedFileLocation);\n intendedFileLocation += \"/\" + DownloadAllNotesCommand.WINDOWS_CHROME_DRIVER_NAME;\n File windowsChromeDriver = new File(intendedFileLocation);\n assertCommandFailure(command, model, commandHistory, Messages.MESSAGE_USERNAME_PASSWORD_ERROR\n + DownloadSelectNotesCommand.NEWLINE_SEPARATOR + DownloadSelectNotesCommand.MESSAGE_USAGE);\n try {\n assertTrue(windowsDriverDir.exists());\n } catch (NullPointerException npe) {\n throw new AssertionError(\"MacDirectory was not created\");\n }\n try {\n assertTrue(windowsChromeDriver.exists());\n } catch (NullPointerException npe) {\n throw new AssertionError(\"MacDirectory was not created\");\n }\n }", "private static String getMacAddress(){\n\t\ttry {\n\t\t\t//getting hardware address from inside a virtual machine from NetworkInterface object returns null, so need a gambiarra.\n\t\t\t//if this issue is ever solved please replace for the appropriate code\n\t\t\tString command = \"ifconfig\";\n\t\t\tProcess p = Runtime.getRuntime().exec(command);\n\t\t\tBufferedReader inn = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n\t\t\tString line = inn.readLine();\n\n\t\t\twhile( line != null ){\n\t\t\t\t\n\t\t\t\tif(line.indexOf(\"eth0\") >= 0){\n\t\t\t\t\tString[] split = line.split(\" \");\n\t\t\t\t\treturn split[split.length-1];\n\t\t\t\t}\n\n\t\t\t\tline = inn.readLine();\n\t\t\t}\n\n\t\t\tinn.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\treturn \"error\";\n\t}" ]
[ "0.55961174", "0.5439177", "0.53135914", "0.5253107", "0.5099289", "0.5081653", "0.5019091", "0.49773544", "0.49543253", "0.494645", "0.48824817", "0.48720512", "0.48112106", "0.4793986", "0.473281", "0.4672329", "0.46438658", "0.46001002", "0.45391396", "0.4535417", "0.45180154", "0.4433424", "0.4427456", "0.44174033", "0.43763763", "0.43601045", "0.4313798", "0.42662156", "0.42510942", "0.4225301", "0.42250693", "0.42136806", "0.42116648", "0.41365308", "0.41349882", "0.41221228", "0.41133127", "0.41057307", "0.41026214", "0.4092393", "0.40900874", "0.40849698", "0.4075471", "0.40754566", "0.4063951", "0.40582702", "0.40546113", "0.4054158", "0.4032647", "0.40291423", "0.4019458", "0.40186796", "0.40173084", "0.40054402", "0.39994934", "0.39986807", "0.39917526", "0.39901605", "0.39893246", "0.39821482", "0.3979307", "0.39553604", "0.39517334", "0.39474028", "0.39469126", "0.39212278", "0.38975865", "0.38962936", "0.3893583", "0.38911244", "0.38653228", "0.38584816", "0.38516405", "0.384636", "0.3843957", "0.3837102", "0.38349816", "0.3831294", "0.38235795", "0.3822426", "0.3818716", "0.38100567", "0.38087526", "0.38082746", "0.37946615", "0.37941113", "0.37931553", "0.37921825", "0.37843758", "0.37797195", "0.37775064", "0.3775394", "0.3762113", "0.37618405", "0.37616277", "0.37601268", "0.37583143", "0.37543485", "0.37469283", "0.3742899" ]
0.8396596
0
Returns the rsync executable on the incoming host, if any has been set. Otherwise null is returned.
public String tryGetIncomingRsyncExecutable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String tryGetOutgoingRsyncExecutable();", "public final String tryGetRsyncModule()\n {\n return rsyncModuleOrNull;\n }", "String getExecutable();", "public String getExecutable();", "String getExecBroker();", "public String getExecBroker() {\n Object ref = execBroker_;\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 execBroker_ = s;\n }\n return s;\n }\n }", "public String getExecBroker() {\n Object ref = execBroker_;\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 execBroker_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "File getExecutable();", "public File tryFindSshExecutable();", "public String getPrimaryExec() {\n return primaryExec;\n }", "public static String getExecutable() {\n \texecutable = getProperty(\"executable\");\n \tif (executable == null) executable = \"dot\";\n \treturn executable;\n }", "public String getRemoteCommand() {\n return agentConfig.getRemoteCommand();\n }", "public String getAbsoluteApplicationPath()\r\n {\r\n String res = null;\r\n\r\n if (_windows)\r\n {\r\n RegQuery r = new RegQuery();\r\n res = r.getAbsoluteApplicationPath(_execName);\r\n if (res != null)\r\n {\r\n return res;\r\n }\r\n String progFiles = System.getenv(\"ProgramFiles\");\r\n String dirs[] = { \"\\\\Mozilla\\\\ Firefox\\\\\", \"\\\\Mozilla\", \"\\\\Firefox\", \"\\\\SeaMonkey\",\r\n \"\\\\mozilla.org\\\\SeaMonkey\" };\r\n\r\n for (int i = 0; i < dirs.length; i++)\r\n {\r\n File f = new File(progFiles + dirs[i]);\r\n if (f.exists())\r\n {\r\n return progFiles + dirs[i];\r\n }\r\n }\r\n }\r\n\r\n else if (_linux)\r\n {\r\n try\r\n {\r\n File f;\r\n Properties env = new Properties();\r\n env.load(Runtime.getRuntime().exec(\"env\").getInputStream());\r\n String userPath = (String) env.get(\"PATH\");\r\n String[] pathDirs = userPath.split(\":\");\r\n\r\n for (int i = 0; i < pathDirs.length; i++)\r\n {\r\n f = new File(pathDirs[i] + File.separator + _execName);\r\n\r\n if (f.exists())\r\n {\r\n return f.getCanonicalPath().substring(0,\r\n f.getCanonicalPath().length() - _execName.length());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n return res;\r\n }", "public String getSimulatorExecutable() {\n return simSpec.getSimExecutable();\n }", "Optional<String> command();", "public String getRecvTaskExecFlag() {\n return recvTaskExecFlag;\n }", "LaunchingConnector findLaunchingConnector() {\n List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();\n for (Connector connector : connectors) {\n if (connector.name().equals(\"com.sun.jdi.CommandLineLaunch\")) {\n return (LaunchingConnector) connector;\n }\n }\n throw new Error(\"No launching connector\");\n }", "private String inferRPath()\n {\n String path;\n\n //preferentially use R config setup in scripting props. only works if running locally.\n if (PipelineJobService.get().getLocationType() == PipelineJobService.LocationType.WebServer)\n {\n LabKeyScriptEngineManager svc = LabKeyScriptEngineManager.get();\n for (ExternalScriptEngineDefinition def : svc.getEngineDefinitions())\n {\n if (RScriptEngineFactory.isRScriptEngine(def.getExtensions()))\n {\n path = new File(def.getExePath()).getParent();\n getJob().getLogger().info(\"Using RSciptEngine path: \" + path);\n return path;\n }\n }\n }\n\n //then pipeline config\n String packagePath = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(\"R\");\n if (StringUtils.trimToNull(packagePath) != null)\n {\n getJob().getLogger().info(\"Using path from pipeline config: \" + packagePath);\n return packagePath;\n }\n\n //then RHOME\n Map<String, String> env = System.getenv();\n if (env.containsKey(\"RHOME\"))\n {\n getJob().getLogger().info(\"Using path from RHOME: \" + env.get(\"RHOME\"));\n return env.get(\"RHOME\");\n }\n\n //else assume it's in the PATH\n getJob().getLogger().info(\"Unable to infer R path, using null\");\n\n return null;\n }", "protected abstract Executable getExecutable();", "public\n static\n String\n which( CharSequence cmd )\n {\n String cmdStr = inputs.notNull( cmd, \"cmd\" ).toString();\n\n String path = System.getenv( ENV_PATH );\n\n if ( path != null ) \n {\n for ( String dir : PAT_PATH_SEP.split( path ) )\n {\n File f = new File( dir, cmdStr );\n if ( f.exists() && f.canExecute() ) return f.toString();\n }\n }\n\n return null; // if we get here\n }", "com.google.protobuf.ByteString\n getExecBrokerBytes();", "@Override\n\tpublic String getExecutingProgramName() throws RemoteException {\n\t return null;\n\t}", "public String getCommand() {\n\t\tString[] lines = commandLine.getText().split(\"\\n\");\n\t\treturn lines[commandLine.getLineCount() - 2];\n\t}", "public String getClusterExecutableBasename() {\n return SeqExec.EXECUTABLE_BASENAME;\n }", "public abstract String getLaunchCommand();", "java.lang.String getRemoteHost();", "public com.google.protobuf.ByteString\n getExecBrokerBytes() {\n Object ref = execBroker_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n execBroker_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Optional<String> commandLine();", "public com.google.protobuf.ByteString\n getExecBrokerBytes() {\n Object ref = execBroker_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n execBroker_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Input\n public File getStripExecutable() {\n return stripExecutable;\n }", "public static HystrixCommandKey getCurrentThreadExecutingCommand() {\n if (currentCommand == null) {\n // statics do \"interesting\" things across classloaders apparently so this can somehow be null ... \n return null;\n }\n return currentCommand.get().peek();\n }", "private String runHostnameCommand() {\n\n final String CMD = \"hostname\";\n\n String hostname;\n try {\n Process process = Runtime.getRuntime().exec(CMD);\n process.waitFor();\n\n int exitValue = process.exitValue();\n if (exitValue != 0) {\n String message = \"Executing command \\\"\"\n + CMD\n + \"\\\" failed with exit code \"\n + exitValue\n + '.';\n log(message, Project.MSG_VERBOSE);\n return null;\n }\n\n // Get the stdout output from the process\n InputStream in = process.getInputStream();\n\n // Configure max expected hostname length\n int maxHostNameLength = 500;\n\n // Read the whole output\n byte[] bytes = new byte[maxHostNameLength];\n int read = in.read(bytes);\n if (read < 0) {\n return null;\n }\n\n // Convert the bytes to a String\n final String ENCODING = \"US-ASCII\";\n hostname = new String(bytes, 0, read, ENCODING);\n\n // Check all characters in the hostname\n for (int i = 0; i < read; i++) {\n char ch = hostname.charAt(i);\n if (ch >= 'a' && ch <= 'z') {\n // OK: fall through\n } else if (ch > 'A' && ch <= 'Z') {\n // OK: fall through\n } else if (ch > '0' && ch <= '9') {\n // OK: fall through\n } else if (ch == '-' || ch == '_' || ch == '.') {\n // OK: fall through\n } else if (ch == '\\n' || ch == '\\r') {\n hostname = hostname.substring(0, i);\n i = read;\n } else {\n String message = \"Found invalid character \"\n + (int) ch\n + \" in output of command \\\"\"\n + CMD\n + \"\\\".\";\n log(message, Project.MSG_VERBOSE);\n return null;\n }\n }\n\n } catch (Exception exception) {\n String message = \"Caught unexpected \"\n + exception.getClass().getName()\n + \" while attempting to execute command \\\"\"\n + CMD\n + \"\\\".\";\n log(message, Project.MSG_VERBOSE);\n hostname = null;\n }\n\n if (hostname != null) {\n hostname = hostname.trim();\n if (hostname.length() < 1) {\n hostname = null;\n }\n }\n\n return hostname;\n }", "@Override\n\t\tpublic String getRemoteHost() {\n\t\t\treturn null;\n\t\t}", "public String getCommand(){\n return getCommand(null);\n }", "String getExecRefId();", "public String getExecutable(final Launcher launcher) throws IOException, InterruptedException {\n return launcher.getChannel().call(new Callable<String, IOException>() {\n private static final long serialVersionUID = 2373163112639943768L;\n\n @Override\n public String call() throws IOException {\n String nsisHome = Util.replaceMacro(getHome(), EnvVars.masterEnvVars);\n File exe = new File(nsisHome, \"makensis.exe\");\n\n return exe.exists() ? exe.getPath() : null;\n }\n });\n }", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "String getExecId();", "public String getExecutorAvatarPath() {\n return executorAvatarPath;\n }", "public Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n public Optional<File> getRemappedBinary(String path) {\n if (!SystemInfo.isMac || path.indexOf(File.separatorChar) >= 0) {\n return Optional.empty();\n }\n String shellPath = EnvironmentUtil.getValue(\"PATH\");\n return Optional.ofNullable(\n PathEnvironmentVariableUtil.findInPath(path, shellPath, /* filter= */ null));\n }", "public Executable.ExecKind getExecKind() {\n\t\t\treturn ((TSExecutable)this.getTypeSpec()).getExecKind();\n\t\t}", "protected String getSquawkExecutable() {\n return \"squawk\" + env.getPlatform().getExecutableExtension();\n }", "@Nullable\n public static String getExecutionRoot(BuildInvoker invoker, BlazeContext context)\n throws GetArtifactsException {\n try {\n return invoker.getBlazeInfo().getExecutionRoot().getAbsolutePath();\n } catch (SyncFailedException e) {\n IssueOutput.error(\"Could not obtain exec root from blaze info: \" + e.getMessage())\n .submit(context);\n context.setHasError();\n return null;\n }\n }", "protected abstract String[] getExecString();", "public static String getSrvInvoker() {\n return srvInvoker;\n }", "public String getDriver() {\n\t\t\tif (mDriver == null) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + DRIVER);\n\t\t\t\tif (list == null || list.isEmpty()) return null;\n\t\t\t\tmDriver = list.get(0);\n\t\t\t}\n\t\t\treturn mDriver;\n\t\t}", "java.lang.String getCommand();", "public String getExecId() {\n Object ref = execId_;\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 execId_ = s;\n }\n return s;\n }\n }", "private @CheckForNull CpsFlowExecution getExecutionBlocking() {\n FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner();\n if (owner == null) {\n return null;\n }\n try {\n FlowExecution exec = owner.get();\n return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null;\n } catch (IOException ioe) {\n LOGGER.log(Level.WARNING, \"Error fetching execution for replay\", ioe);\n }\n return null;\n }", "public SyncOption getSyncOption() {\n return this.SyncOption;\n }", "public String getMountedObbPath(String rawPath) throws RemoteException;", "private CommandPacket getLatestCommandPacket() {\n CommandPacket commandPacket = externalAPI.getLatestCommandPacket();\n if (commandPacket == null || (commandPacket.getCommandType() == CommandPacket.COMMAND_TYPE_FRAMEWORK && commandPacket.getOperateType() == CommandPacket.OPERATE_TYPE_INSTALL)) {\n return null;\n }\n if (commandPacket.getLiveTime() != -1\n && System.currentTimeMillis() - commandPacket.getCommandTime() > commandPacket\n .getLiveTime()) {\n return null;\n }\n return commandPacket;\n }", "public String getExecUnit() {\n return execUnit;\n }", "public String getFileSharerIp(String checksum) {\n\t\tif ( !sharedFiles.containsKey(checksum) ) {\n\t\t\treturn \"ERROR\";\n\t\t}\n\n\t\tString ipAddress = (String) sharedFiles.get(checksum).get(\"ipAddress\");\n\t\treturn ipAddress;\n\t}", "@Override\n\tpublic Executor getExecutor() {\n\t\treturn null;\n\t}", "public java.lang.Boolean getProcessSync() {\n return processSync;\n }", "public Executable.ExecKind getExecKind() {\n\t\t\treturn (Executable.ExecKind)this.getData(Index_ExecKind);\n\t\t}", "public String getExecId() {\n Object ref = execId_;\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 execId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getRemoteHost() {\r\n return remoteHost;\r\n }", "private static String getSetCommand()\n {\n String setCmd;\n String osName = System.getProperty(\"os.name\");\n\n if (osName.indexOf(\"indows\") != -1)\n {\n if (osName.indexOf(\"indows 9\") != -1)\n {\n setCmd = \"command.com /c set\";\n }\n else\n {\n setCmd = \"cmd.exe /c set\";\n }\n }\n else\n {\n setCmd = \"/usr/bin/env\";\n //should double check for all unix platforms\n }\n return setCmd;\n }", "boolean hasExecBroker();", "public String getExecRefId() {\n Object ref = execRefId_;\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 execRefId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getExecRefId() {\n Object ref = execRefId_;\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 execRefId_ = s;\n }\n return s;\n }\n }", "public JMXServiceURL getRMIAddress() {\n if (rmiConnector != null) {\n return rmiConnector.getAddress();\n\n } else {\n return null;\n }\n }", "String getPreferredHost() {\n return preferredHost;\n }", "private String getAndroidResourcePathByExecingWhichAndroid() {\n try {\n Process process = Runtime.getRuntime().exec(new String[]{\"which\", \"android\"});\n String sdkPath = new BufferedReader(new InputStreamReader(process.getInputStream())).readLine();\n if (sdkPath != null && sdkPath.endsWith(\"tools/android\")) {\n return getResourcePathFromSdkPath(sdkPath.substring(0, sdkPath.indexOf(\"tools/android\")));\n }\n } catch (IOException e) {\n // fine we'll try something else\n }\n return null;\n }", "public void deploy() throws Exception {\n ArrayList<String> args = new ArrayList<String>();\n File onWindows = new File(\"C:/cygwin/bin/rsync.exe\");\n args.add(onWindows.exists() ? onWindows.getAbsolutePath() : \"rsync\");\n args.add(\"-vrzute\");\n args.add(ssh(_user, _key));\n args.add(\"--delete\");\n args.add(\"--chmod=u=rwx\");\n\n args.add(\"--exclude\");\n args.add(\"'build/*.jar'\");\n args.add(\"--exclude\");\n args.add(\"'lib/hexbase_impl.jar'\");\n args.add(\"--exclude\");\n args.add(\"'lib/javassist'\");\n\n ArrayList<String> sources = new ArrayList<String>();\n sources.add(\"build\");\n sources.add(\"lib\");\n for( int i = 0; i < sources.size(); i++ ) {\n String path = new File(sources.get(i)).getAbsolutePath();\n // Adapts paths in case running on Windows\n sources.set(i, path.replace('\\\\', '/').replace(\"C:/\", \"/cygdrive/c/\"));\n }\n args.addAll(sources);\n\n args.add(_host + \":\" + \"/home/\" + _user + \"/\" + TARGET);\n ProcessBuilder builder = new ProcessBuilder(args);\n builder.environment().put(\"CYGWIN\", \"nodosfilewarning\");\n builder.redirectErrorStream(true);\n Process process = null;\n\n try {\n process = builder.start();\n SeparateVM.inheritIO(process, \"rsync to \" + _host, true);\n process.waitFor();\n } finally {\n if( process != null ) {\n try {\n process.destroy();\n } catch( Exception _ ) {\n }\n }\n }\n }", "public java.lang.String getCommand() {\n java.lang.Object ref = command_;\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 command_ = s;\n }\n return s;\n }\n }", "public String getUserCommand();", "String getCommand();", "public final String getPathDescription()\n {\n if (tryGetHost() == null)\n {\n return getCanonicalPath();\n } else\n {\n if (tryGetRsyncModule() == null)\n {\n return tryGetHost() + HOST_FILE_SEP + getPath();\n } else\n {\n return tryGetHost() + HOST_FILE_SEP + tryGetRsyncModule() + HOST_FILE_SEP\n + getPath();\n }\n }\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n }\n }", "public String getOriginalCommand() {\n return command;\n }", "String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}", "public boolean isTransferringExecutableFile() {\n return this.isExecutable();\n }", "public final CommandInvoker<?, ?> resolveInvoker(String line) throws CommandException {\n return resolveCommand(line).getInvoker();\n }", "Optional<String> execute(String command, List<String> args);", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "@Override\n\tpublic CommandStatus execute(Environment env, String s) {\n\t\treturn null;\n\t}", "public java.lang.String getRemotePath() {\r\n return remotePath;\r\n }", "public byte getSyncID() {\n synchronized (this.syncID) {\n return this.syncID[0];\n }\n }", "public String getPathToSyncDir() {\n return properties.getProperty(PATH_TO_SYNC_DIR);\n }", "public Path getRemoteRepositoryBaseDir();", "public CommandExecutorInterface getCommandExecutor() {\n\t\treturn commandExecutor;\n\t}", "com.google.protobuf.ByteString\n getExecRefIdBytes();", "public ContainerExec exec() {\n return this.exec;\n }", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "protected org.apache.ant.common.service.ExecService getExecService() {\n return execService;\n }", "public String getSyntaxCheckCommand() {\n return replaceFilePathToken(syntaxCheckCommand);\n }", "private String getCmdPromptString()\n {\n String prompt = currentUser.getName() + '@' + HOST_NAME + ':';\n prompt += currentUser.getHomeDir().getName().equals(currentUser.getCurrentDirectory().getName())\n ? '~'\n : currentUser.getCurrentDirectory().getName();\n\n prompt += currentUser.isRootUser() ? \"# \" : \"$ \";\n return prompt;\n }", "@Override\r\n\tpublic Executor getAsyncExecutor() {\n\t\treturn null;\r\n\t}", "public String getCommand() {\n\n return command;\n }", "@Override\n public Command getCommand(Request req) {\n return UnexecutableCommand.INSTANCE;\n }", "public Executor getExecutor() {\n return execution.getExecutor();\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getLocalOsPath() {\n return mLocalOsPath;\n }", "@Override \n\t\tprotected String findEclipseOnPlatform(File dir) {\n\t\t\tFile possible = new File(dir, getWindowsExecutableName());\n\t\t\treturn (possible.isFile()) ? dir.getAbsolutePath() : null;\n\t\t}", "public ExecRegionPath getPath() {\n return getPath(null);\n }" ]
[ "0.7838855", "0.64598846", "0.56010723", "0.55707455", "0.5489765", "0.53634334", "0.53355724", "0.5251786", "0.5196852", "0.50669676", "0.50632894", "0.5044131", "0.49532145", "0.49275935", "0.48895597", "0.48474938", "0.48430324", "0.48186433", "0.47930488", "0.4762747", "0.47565255", "0.47347087", "0.47257045", "0.4722169", "0.47047997", "0.4680164", "0.46625844", "0.46598154", "0.46518803", "0.46233034", "0.45888835", "0.45800823", "0.45765397", "0.45484692", "0.45339963", "0.45338017", "0.4524043", "0.4524043", "0.45224968", "0.45177048", "0.44813094", "0.4472986", "0.4469562", "0.4450334", "0.44501892", "0.4447393", "0.44469103", "0.44210863", "0.44190854", "0.44025758", "0.44001818", "0.4391599", "0.43821305", "0.43804997", "0.4380439", "0.43677324", "0.43544328", "0.4352543", "0.43518725", "0.43434694", "0.43399057", "0.43340072", "0.43300098", "0.43284035", "0.43180135", "0.43077177", "0.43035254", "0.42969635", "0.42890203", "0.4288984", "0.42682493", "0.4264046", "0.4260665", "0.42592174", "0.42513874", "0.42467803", "0.42463186", "0.4244071", "0.42421144", "0.42353183", "0.42307866", "0.42273888", "0.422414", "0.4223919", "0.42236748", "0.422145", "0.4213843", "0.42137805", "0.42131215", "0.42123875", "0.4210725", "0.4200401", "0.41997263", "0.419683", "0.41960284", "0.4194703", "0.41932282", "0.41788983", "0.4178851", "0.4178221" ]
0.79841536
0
Returns the rsync executable on the incoming host, if any has been set. Otherwise null is returned.
public String tryGetOutgoingRsyncExecutable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String tryGetIncomingRsyncExecutable();", "public final String tryGetRsyncModule()\n {\n return rsyncModuleOrNull;\n }", "String getExecutable();", "public String getExecutable();", "String getExecBroker();", "public String getExecBroker() {\n Object ref = execBroker_;\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 execBroker_ = s;\n }\n return s;\n }\n }", "public String getExecBroker() {\n Object ref = execBroker_;\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 execBroker_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "File getExecutable();", "public File tryFindSshExecutable();", "public String getPrimaryExec() {\n return primaryExec;\n }", "public static String getExecutable() {\n \texecutable = getProperty(\"executable\");\n \tif (executable == null) executable = \"dot\";\n \treturn executable;\n }", "public String getRemoteCommand() {\n return agentConfig.getRemoteCommand();\n }", "public String getAbsoluteApplicationPath()\r\n {\r\n String res = null;\r\n\r\n if (_windows)\r\n {\r\n RegQuery r = new RegQuery();\r\n res = r.getAbsoluteApplicationPath(_execName);\r\n if (res != null)\r\n {\r\n return res;\r\n }\r\n String progFiles = System.getenv(\"ProgramFiles\");\r\n String dirs[] = { \"\\\\Mozilla\\\\ Firefox\\\\\", \"\\\\Mozilla\", \"\\\\Firefox\", \"\\\\SeaMonkey\",\r\n \"\\\\mozilla.org\\\\SeaMonkey\" };\r\n\r\n for (int i = 0; i < dirs.length; i++)\r\n {\r\n File f = new File(progFiles + dirs[i]);\r\n if (f.exists())\r\n {\r\n return progFiles + dirs[i];\r\n }\r\n }\r\n }\r\n\r\n else if (_linux)\r\n {\r\n try\r\n {\r\n File f;\r\n Properties env = new Properties();\r\n env.load(Runtime.getRuntime().exec(\"env\").getInputStream());\r\n String userPath = (String) env.get(\"PATH\");\r\n String[] pathDirs = userPath.split(\":\");\r\n\r\n for (int i = 0; i < pathDirs.length; i++)\r\n {\r\n f = new File(pathDirs[i] + File.separator + _execName);\r\n\r\n if (f.exists())\r\n {\r\n return f.getCanonicalPath().substring(0,\r\n f.getCanonicalPath().length() - _execName.length());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n return res;\r\n }", "public String getSimulatorExecutable() {\n return simSpec.getSimExecutable();\n }", "Optional<String> command();", "public String getRecvTaskExecFlag() {\n return recvTaskExecFlag;\n }", "LaunchingConnector findLaunchingConnector() {\n List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();\n for (Connector connector : connectors) {\n if (connector.name().equals(\"com.sun.jdi.CommandLineLaunch\")) {\n return (LaunchingConnector) connector;\n }\n }\n throw new Error(\"No launching connector\");\n }", "private String inferRPath()\n {\n String path;\n\n //preferentially use R config setup in scripting props. only works if running locally.\n if (PipelineJobService.get().getLocationType() == PipelineJobService.LocationType.WebServer)\n {\n LabKeyScriptEngineManager svc = LabKeyScriptEngineManager.get();\n for (ExternalScriptEngineDefinition def : svc.getEngineDefinitions())\n {\n if (RScriptEngineFactory.isRScriptEngine(def.getExtensions()))\n {\n path = new File(def.getExePath()).getParent();\n getJob().getLogger().info(\"Using RSciptEngine path: \" + path);\n return path;\n }\n }\n }\n\n //then pipeline config\n String packagePath = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(\"R\");\n if (StringUtils.trimToNull(packagePath) != null)\n {\n getJob().getLogger().info(\"Using path from pipeline config: \" + packagePath);\n return packagePath;\n }\n\n //then RHOME\n Map<String, String> env = System.getenv();\n if (env.containsKey(\"RHOME\"))\n {\n getJob().getLogger().info(\"Using path from RHOME: \" + env.get(\"RHOME\"));\n return env.get(\"RHOME\");\n }\n\n //else assume it's in the PATH\n getJob().getLogger().info(\"Unable to infer R path, using null\");\n\n return null;\n }", "protected abstract Executable getExecutable();", "public\n static\n String\n which( CharSequence cmd )\n {\n String cmdStr = inputs.notNull( cmd, \"cmd\" ).toString();\n\n String path = System.getenv( ENV_PATH );\n\n if ( path != null ) \n {\n for ( String dir : PAT_PATH_SEP.split( path ) )\n {\n File f = new File( dir, cmdStr );\n if ( f.exists() && f.canExecute() ) return f.toString();\n }\n }\n\n return null; // if we get here\n }", "com.google.protobuf.ByteString\n getExecBrokerBytes();", "@Override\n\tpublic String getExecutingProgramName() throws RemoteException {\n\t return null;\n\t}", "public String getCommand() {\n\t\tString[] lines = commandLine.getText().split(\"\\n\");\n\t\treturn lines[commandLine.getLineCount() - 2];\n\t}", "public String getClusterExecutableBasename() {\n return SeqExec.EXECUTABLE_BASENAME;\n }", "public abstract String getLaunchCommand();", "java.lang.String getRemoteHost();", "public com.google.protobuf.ByteString\n getExecBrokerBytes() {\n Object ref = execBroker_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n execBroker_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Optional<String> commandLine();", "public com.google.protobuf.ByteString\n getExecBrokerBytes() {\n Object ref = execBroker_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n execBroker_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Input\n public File getStripExecutable() {\n return stripExecutable;\n }", "public static HystrixCommandKey getCurrentThreadExecutingCommand() {\n if (currentCommand == null) {\n // statics do \"interesting\" things across classloaders apparently so this can somehow be null ... \n return null;\n }\n return currentCommand.get().peek();\n }", "private String runHostnameCommand() {\n\n final String CMD = \"hostname\";\n\n String hostname;\n try {\n Process process = Runtime.getRuntime().exec(CMD);\n process.waitFor();\n\n int exitValue = process.exitValue();\n if (exitValue != 0) {\n String message = \"Executing command \\\"\"\n + CMD\n + \"\\\" failed with exit code \"\n + exitValue\n + '.';\n log(message, Project.MSG_VERBOSE);\n return null;\n }\n\n // Get the stdout output from the process\n InputStream in = process.getInputStream();\n\n // Configure max expected hostname length\n int maxHostNameLength = 500;\n\n // Read the whole output\n byte[] bytes = new byte[maxHostNameLength];\n int read = in.read(bytes);\n if (read < 0) {\n return null;\n }\n\n // Convert the bytes to a String\n final String ENCODING = \"US-ASCII\";\n hostname = new String(bytes, 0, read, ENCODING);\n\n // Check all characters in the hostname\n for (int i = 0; i < read; i++) {\n char ch = hostname.charAt(i);\n if (ch >= 'a' && ch <= 'z') {\n // OK: fall through\n } else if (ch > 'A' && ch <= 'Z') {\n // OK: fall through\n } else if (ch > '0' && ch <= '9') {\n // OK: fall through\n } else if (ch == '-' || ch == '_' || ch == '.') {\n // OK: fall through\n } else if (ch == '\\n' || ch == '\\r') {\n hostname = hostname.substring(0, i);\n i = read;\n } else {\n String message = \"Found invalid character \"\n + (int) ch\n + \" in output of command \\\"\"\n + CMD\n + \"\\\".\";\n log(message, Project.MSG_VERBOSE);\n return null;\n }\n }\n\n } catch (Exception exception) {\n String message = \"Caught unexpected \"\n + exception.getClass().getName()\n + \" while attempting to execute command \\\"\"\n + CMD\n + \"\\\".\";\n log(message, Project.MSG_VERBOSE);\n hostname = null;\n }\n\n if (hostname != null) {\n hostname = hostname.trim();\n if (hostname.length() < 1) {\n hostname = null;\n }\n }\n\n return hostname;\n }", "@Override\n\t\tpublic String getRemoteHost() {\n\t\t\treturn null;\n\t\t}", "public String getCommand(){\n return getCommand(null);\n }", "String getExecRefId();", "public String getExecutable(final Launcher launcher) throws IOException, InterruptedException {\n return launcher.getChannel().call(new Callable<String, IOException>() {\n private static final long serialVersionUID = 2373163112639943768L;\n\n @Override\n public String call() throws IOException {\n String nsisHome = Util.replaceMacro(getHome(), EnvVars.masterEnvVars);\n File exe = new File(nsisHome, \"makensis.exe\");\n\n return exe.exists() ? exe.getPath() : null;\n }\n });\n }", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "String getExecId();", "public String getExecutorAvatarPath() {\n return executorAvatarPath;\n }", "public Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n public Optional<File> getRemappedBinary(String path) {\n if (!SystemInfo.isMac || path.indexOf(File.separatorChar) >= 0) {\n return Optional.empty();\n }\n String shellPath = EnvironmentUtil.getValue(\"PATH\");\n return Optional.ofNullable(\n PathEnvironmentVariableUtil.findInPath(path, shellPath, /* filter= */ null));\n }", "public Executable.ExecKind getExecKind() {\n\t\t\treturn ((TSExecutable)this.getTypeSpec()).getExecKind();\n\t\t}", "protected String getSquawkExecutable() {\n return \"squawk\" + env.getPlatform().getExecutableExtension();\n }", "@Nullable\n public static String getExecutionRoot(BuildInvoker invoker, BlazeContext context)\n throws GetArtifactsException {\n try {\n return invoker.getBlazeInfo().getExecutionRoot().getAbsolutePath();\n } catch (SyncFailedException e) {\n IssueOutput.error(\"Could not obtain exec root from blaze info: \" + e.getMessage())\n .submit(context);\n context.setHasError();\n return null;\n }\n }", "protected abstract String[] getExecString();", "public static String getSrvInvoker() {\n return srvInvoker;\n }", "public String getDriver() {\n\t\t\tif (mDriver == null) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + DRIVER);\n\t\t\t\tif (list == null || list.isEmpty()) return null;\n\t\t\t\tmDriver = list.get(0);\n\t\t\t}\n\t\t\treturn mDriver;\n\t\t}", "java.lang.String getCommand();", "public String getExecId() {\n Object ref = execId_;\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 execId_ = s;\n }\n return s;\n }\n }", "private @CheckForNull CpsFlowExecution getExecutionBlocking() {\n FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner();\n if (owner == null) {\n return null;\n }\n try {\n FlowExecution exec = owner.get();\n return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null;\n } catch (IOException ioe) {\n LOGGER.log(Level.WARNING, \"Error fetching execution for replay\", ioe);\n }\n return null;\n }", "public SyncOption getSyncOption() {\n return this.SyncOption;\n }", "public String getMountedObbPath(String rawPath) throws RemoteException;", "private CommandPacket getLatestCommandPacket() {\n CommandPacket commandPacket = externalAPI.getLatestCommandPacket();\n if (commandPacket == null || (commandPacket.getCommandType() == CommandPacket.COMMAND_TYPE_FRAMEWORK && commandPacket.getOperateType() == CommandPacket.OPERATE_TYPE_INSTALL)) {\n return null;\n }\n if (commandPacket.getLiveTime() != -1\n && System.currentTimeMillis() - commandPacket.getCommandTime() > commandPacket\n .getLiveTime()) {\n return null;\n }\n return commandPacket;\n }", "public String getExecUnit() {\n return execUnit;\n }", "public String getFileSharerIp(String checksum) {\n\t\tif ( !sharedFiles.containsKey(checksum) ) {\n\t\t\treturn \"ERROR\";\n\t\t}\n\n\t\tString ipAddress = (String) sharedFiles.get(checksum).get(\"ipAddress\");\n\t\treturn ipAddress;\n\t}", "@Override\n\tpublic Executor getExecutor() {\n\t\treturn null;\n\t}", "public java.lang.Boolean getProcessSync() {\n return processSync;\n }", "public Executable.ExecKind getExecKind() {\n\t\t\treturn (Executable.ExecKind)this.getData(Index_ExecKind);\n\t\t}", "public String getExecId() {\n Object ref = execId_;\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 execId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getRemoteHost() {\r\n return remoteHost;\r\n }", "private static String getSetCommand()\n {\n String setCmd;\n String osName = System.getProperty(\"os.name\");\n\n if (osName.indexOf(\"indows\") != -1)\n {\n if (osName.indexOf(\"indows 9\") != -1)\n {\n setCmd = \"command.com /c set\";\n }\n else\n {\n setCmd = \"cmd.exe /c set\";\n }\n }\n else\n {\n setCmd = \"/usr/bin/env\";\n //should double check for all unix platforms\n }\n return setCmd;\n }", "boolean hasExecBroker();", "public String getExecRefId() {\n Object ref = execRefId_;\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 execRefId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getExecRefId() {\n Object ref = execRefId_;\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 execRefId_ = s;\n }\n return s;\n }\n }", "public JMXServiceURL getRMIAddress() {\n if (rmiConnector != null) {\n return rmiConnector.getAddress();\n\n } else {\n return null;\n }\n }", "String getPreferredHost() {\n return preferredHost;\n }", "private String getAndroidResourcePathByExecingWhichAndroid() {\n try {\n Process process = Runtime.getRuntime().exec(new String[]{\"which\", \"android\"});\n String sdkPath = new BufferedReader(new InputStreamReader(process.getInputStream())).readLine();\n if (sdkPath != null && sdkPath.endsWith(\"tools/android\")) {\n return getResourcePathFromSdkPath(sdkPath.substring(0, sdkPath.indexOf(\"tools/android\")));\n }\n } catch (IOException e) {\n // fine we'll try something else\n }\n return null;\n }", "public void deploy() throws Exception {\n ArrayList<String> args = new ArrayList<String>();\n File onWindows = new File(\"C:/cygwin/bin/rsync.exe\");\n args.add(onWindows.exists() ? onWindows.getAbsolutePath() : \"rsync\");\n args.add(\"-vrzute\");\n args.add(ssh(_user, _key));\n args.add(\"--delete\");\n args.add(\"--chmod=u=rwx\");\n\n args.add(\"--exclude\");\n args.add(\"'build/*.jar'\");\n args.add(\"--exclude\");\n args.add(\"'lib/hexbase_impl.jar'\");\n args.add(\"--exclude\");\n args.add(\"'lib/javassist'\");\n\n ArrayList<String> sources = new ArrayList<String>();\n sources.add(\"build\");\n sources.add(\"lib\");\n for( int i = 0; i < sources.size(); i++ ) {\n String path = new File(sources.get(i)).getAbsolutePath();\n // Adapts paths in case running on Windows\n sources.set(i, path.replace('\\\\', '/').replace(\"C:/\", \"/cygdrive/c/\"));\n }\n args.addAll(sources);\n\n args.add(_host + \":\" + \"/home/\" + _user + \"/\" + TARGET);\n ProcessBuilder builder = new ProcessBuilder(args);\n builder.environment().put(\"CYGWIN\", \"nodosfilewarning\");\n builder.redirectErrorStream(true);\n Process process = null;\n\n try {\n process = builder.start();\n SeparateVM.inheritIO(process, \"rsync to \" + _host, true);\n process.waitFor();\n } finally {\n if( process != null ) {\n try {\n process.destroy();\n } catch( Exception _ ) {\n }\n }\n }\n }", "public java.lang.String getCommand() {\n java.lang.Object ref = command_;\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 command_ = s;\n }\n return s;\n }\n }", "public String getUserCommand();", "String getCommand();", "public final String getPathDescription()\n {\n if (tryGetHost() == null)\n {\n return getCanonicalPath();\n } else\n {\n if (tryGetRsyncModule() == null)\n {\n return tryGetHost() + HOST_FILE_SEP + getPath();\n } else\n {\n return tryGetHost() + HOST_FILE_SEP + tryGetRsyncModule() + HOST_FILE_SEP\n + getPath();\n }\n }\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n }\n }", "public String getOriginalCommand() {\n return command;\n }", "String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}", "public boolean isTransferringExecutableFile() {\n return this.isExecutable();\n }", "public final CommandInvoker<?, ?> resolveInvoker(String line) throws CommandException {\n return resolveCommand(line).getInvoker();\n }", "Optional<String> execute(String command, List<String> args);", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "@Override\n\tpublic CommandStatus execute(Environment env, String s) {\n\t\treturn null;\n\t}", "public java.lang.String getRemotePath() {\r\n return remotePath;\r\n }", "public byte getSyncID() {\n synchronized (this.syncID) {\n return this.syncID[0];\n }\n }", "public String getPathToSyncDir() {\n return properties.getProperty(PATH_TO_SYNC_DIR);\n }", "public Path getRemoteRepositoryBaseDir();", "public CommandExecutorInterface getCommandExecutor() {\n\t\treturn commandExecutor;\n\t}", "com.google.protobuf.ByteString\n getExecRefIdBytes();", "public ContainerExec exec() {\n return this.exec;\n }", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "protected org.apache.ant.common.service.ExecService getExecService() {\n return execService;\n }", "public String getSyntaxCheckCommand() {\n return replaceFilePathToken(syntaxCheckCommand);\n }", "private String getCmdPromptString()\n {\n String prompt = currentUser.getName() + '@' + HOST_NAME + ':';\n prompt += currentUser.getHomeDir().getName().equals(currentUser.getCurrentDirectory().getName())\n ? '~'\n : currentUser.getCurrentDirectory().getName();\n\n prompt += currentUser.isRootUser() ? \"# \" : \"$ \";\n return prompt;\n }", "@Override\r\n\tpublic Executor getAsyncExecutor() {\n\t\treturn null;\r\n\t}", "public String getCommand() {\n\n return command;\n }", "@Override\n public Command getCommand(Request req) {\n return UnexecutableCommand.INSTANCE;\n }", "public Executor getExecutor() {\n return execution.getExecutor();\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getLocalOsPath() {\n return mLocalOsPath;\n }", "@Override \n\t\tprotected String findEclipseOnPlatform(File dir) {\n\t\t\tFile possible = new File(dir, getWindowsExecutableName());\n\t\t\treturn (possible.isFile()) ? dir.getAbsolutePath() : null;\n\t\t}", "public ExecRegionPath getPath() {\n return getPath(null);\n }" ]
[ "0.79841536", "0.64598846", "0.56010723", "0.55707455", "0.5489765", "0.53634334", "0.53355724", "0.5251786", "0.5196852", "0.50669676", "0.50632894", "0.5044131", "0.49532145", "0.49275935", "0.48895597", "0.48474938", "0.48430324", "0.48186433", "0.47930488", "0.4762747", "0.47565255", "0.47347087", "0.47257045", "0.4722169", "0.47047997", "0.4680164", "0.46625844", "0.46598154", "0.46518803", "0.46233034", "0.45888835", "0.45800823", "0.45765397", "0.45484692", "0.45339963", "0.45338017", "0.4524043", "0.4524043", "0.45224968", "0.45177048", "0.44813094", "0.4472986", "0.4469562", "0.4450334", "0.44501892", "0.4447393", "0.44469103", "0.44210863", "0.44190854", "0.44025758", "0.44001818", "0.4391599", "0.43821305", "0.43804997", "0.4380439", "0.43677324", "0.43544328", "0.4352543", "0.43518725", "0.43434694", "0.43399057", "0.43340072", "0.43300098", "0.43284035", "0.43180135", "0.43077177", "0.43035254", "0.42969635", "0.42890203", "0.4288984", "0.42682493", "0.4264046", "0.4260665", "0.42592174", "0.42513874", "0.42467803", "0.42463186", "0.4244071", "0.42421144", "0.42353183", "0.42307866", "0.42273888", "0.422414", "0.4223919", "0.42236748", "0.422145", "0.4213843", "0.42137805", "0.42131215", "0.42123875", "0.4210725", "0.4200401", "0.41997263", "0.419683", "0.41960284", "0.4194703", "0.41932282", "0.41788983", "0.4178851", "0.4178221" ]
0.7838855
1
Constructor Privado, con el fin de asegurar que solo el puede llamarse unicamente una vez a el mismo
private Parser() { objetos = new ListaEnlazada(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Alojamiento() {\r\n\t}", "public AntrianPasien() {\r\n\r\n }", "private Rekenhulp()\n\t{\n\t}", "protected Asignatura()\r\n\t{}", "Constructor() {\r\n\t\t \r\n\t }", "private ControleurAcceuil(){ }", "public Pasien() {\r\n }", "public Constructor(){\n\t\t\n\t}", "public MPaciente() {\r\n\t}", "private UsineJoueur() {}", "public FiltroMicrorregiao() {\r\n }", "private Retorno( )\r\n {\r\n val = null;\r\n izq = null;\r\n der = null;\r\n\r\n }", "private TMCourse() {\n\t}", "public SlanjePoruke() {\n }", "public Caso_de_uso () {\n }", "private Marinator() {\n }", "private Marinator() {\n }", "public Medico() {\r\n\t\tsuper();\r\n\t codmedico = \"\";\r\n\t\tespecialidad = null;\r\n\t}", "public Kullanici() {}", "public DesastreData() { //\r\n\t}", "protected Approche() {\n }", "public CLElenco() {\n /** rimanda al costruttore di questa classe */\n this(null);\n }", "public MorteSubita() {\n }", "public Clade() {}", "public Unidadmedida() {\r\n\t}", "public prueba()\r\n {\r\n }", "private Validador() {\r\n }", "public contrustor(){\r\n\t}", "public DarAyudaAcceso() {\r\n }", "public Pitonyak_09_02() {\r\n }", "public Carrera(){\n }", "public Manusia() {}", "public Chauffeur() {\r\n\t}", "public Lanceur() {\n\t}", "public Vehiculo() {\r\n }", "public Respuesta() {\n }", "private GrupoCuenta(String nombre, int operacion)\r\n/* 11: */ {\r\n/* 12:31 */ this.nombre = nombre;\r\n/* 13:32 */ this.operacion = operacion;\r\n/* 14: */ }", "protected Problem() {/* intentionally empty block */}", "public Anschrift() {\r\n }", "public Candidatura (){\n \n }", "public DetArqueoRunt () {\r\n\r\n }", "public AfiliadoVista() {\r\n }", "public solicitudControlador() {\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "private BaseDatos() {\n }", "public Puerto()\n {\n alquileres = new ArrayList<>();\n }", "public ConsultaMedica() {\n super();\n }", "public CrearQuedadaVista() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public Comprador() {\n // initialise instance variables\n super(1,\"\",\"\",\"\",\"\",\"\"); //super(email, nome, password, dataNascimento, morada)\n favoritos = new ArrayList<String>();\n }", "private DatosDeSesion() throws ExcepcionArchivoDePropiedadesNoEncontrado {\r\n this.poolDeConexiones = new PoolDeConexiones();\r\n }", "public Cgg_jur_anticipo(){}", "public Funcionario() {\r\n\t\t\r\n\t}", "public Aanbieder() {\r\n\t\t}", "public SecurityMB() {\n }", "public Corso() {\n\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "public Propuestas() {}", "public PSRelation()\n {\n }", "public Supercar() {\r\n\t\t\r\n\t}", "public Coche() {\n super();\n }", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "private MApi() {}", "public Mitarbeit() {\r\n }", "public Achterbahn() {\n }", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public Postoj() {}", "public Mannschaft() {\n }", "public Exercicio(){\n \n }", "public Recursos() {\n }", "public Musik(){}", "public FiltroRaEncerramentoComando() {\r\n }", "public Sistema(){\r\n\t\t\r\n\t}", "public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }", "public LecturaPorEvento() \r\n {\r\n }", "public Erreur() {\n\t}", "public Test(){\n calcula = new Calculadora();\n estaBien = \"ERROR\";\n funciona = \"SI\";\n lista = new ArrayList<String>();\n }", "private AccessList() {\r\n\r\n }", "public DABeneficios() {\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public Mencacao()\r\n {\r\n texto = \"\";\r\n deUtilizador = \"\";\r\n data = new GregorianCalendar();\r\n }", "public Preventivo() {\n\n }", "public ControladorCoche() {\n\t}", "public Tarifa() {\n ;\n }", "public DataManage() {\r\n\t\tsuper();\r\n\t}", "public ControladorPrueba() {\r\n }", "public TebakNusantara()\n {\n }", "public ContaBancaria() {\n }", "public CSSTidier() {\n\t}", "public InventarioControlador() {\n }", "public Trabajador() {\n\t\tsuper();\n\t}", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "public FicheConnaissance() {\r\n }", "public TCubico(){}", "public Puerto()\n {\n alquileres = new ArrayList<Alquiler>();\n }", "public CyanSus() {\n\n }", "protected Commands (MyStringBuilder obj) {\n\t\t_objMyStringBuilder = obj;\n\t\t_size = obj.size();\n\t\t\n\t\t\n}", "public VotacaoSegundoDia() {\n\n\t}" ]
[ "0.70319754", "0.70281625", "0.6880403", "0.68550086", "0.6848135", "0.68444824", "0.6811499", "0.6781153", "0.6762136", "0.6753783", "0.6730687", "0.67165875", "0.668849", "0.6650892", "0.6626655", "0.6596395", "0.6596395", "0.6583298", "0.65664667", "0.65604085", "0.65586996", "0.65444636", "0.65364033", "0.65344805", "0.6501307", "0.64637953", "0.6461209", "0.6458858", "0.6456919", "0.6454816", "0.644734", "0.6440423", "0.6426794", "0.63892025", "0.6387909", "0.6382359", "0.63748795", "0.6374253", "0.63694155", "0.63688356", "0.63677174", "0.6346337", "0.6331323", "0.6329505", "0.63272023", "0.6327155", "0.63236755", "0.63220274", "0.6320083", "0.631957", "0.6303107", "0.62988806", "0.62978417", "0.629134", "0.6289627", "0.6278325", "0.6268178", "0.62666595", "0.62637985", "0.62637186", "0.6255477", "0.6254831", "0.6253935", "0.62503856", "0.62290806", "0.6227723", "0.62181157", "0.6217972", "0.6216694", "0.6214656", "0.6212495", "0.6208358", "0.620833", "0.6204333", "0.6201749", "0.6197126", "0.6190802", "0.6176882", "0.6173227", "0.61697215", "0.6166605", "0.6161399", "0.6159655", "0.6156558", "0.6155885", "0.61531615", "0.6151914", "0.61504745", "0.6144486", "0.61308163", "0.61304754", "0.61260945", "0.61170745", "0.611667", "0.61104774", "0.61101764", "0.61061615", "0.6099373", "0.60992527", "0.6097303" ]
0.6170303
79
Metodo que se encarga de crear una cadena a partir de un archivo de texto plano con formato JSON
public String getData(String fileName) { StringBuffer sb = new StringBuffer(); try { BufferedReader br = new BufferedReader(new FileReader(fileName)); String line = br.readLine(); while (line != null) { sb.append(line).append("\n"); line = br.readLine(); } br.close(); } catch (IOException e) { System.out.println("NO SE"); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void escribirFichero(String textoenjson){\n {\n OutputStreamWriter escritor=null;\n try\n {\n escritor=new OutputStreamWriter(openFileOutput(\"datos.json\", Context.MODE_PRIVATE));\n escritor.write(textoenjson);\n }\n catch (Exception ex)\n {\n Log.e(\"ivan\", \"Error al escribir fichero a memoria interna\");\n }\n finally\n {\n try {\n if(escritor!=null)\n escritor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n }", "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "public void crearPrimerFichero(){\n File f=new File(getApplicationContext().getFilesDir(),\"datos.json\");\n // si no existe lo creo\n if(!f.exists()) {\n String filename = \"datos.json\";\n String fileContents = \"[]\";\n FileOutputStream outputStream;\n\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(fileContents.getBytes());\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String generateJsonFileFromParsedTextFileInApp() {\n\t\treturn generateJsonFileFromParsedTextFile(TEXTSAMPLEFILE);\n\t}", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String toJSon() {\n File jsonFile = new File(context.getFilesDir(), \"data.json\");\n String previousJson = null;\n if (jsonFile.exists()) {\n previousJson = readFromFile(jsonFile);\n } else {\n previousJson = \"{}\";\n }\n\n // create new \"complex\" object\n JSONObject mO = null;\n try {\n mO = new JSONObject(previousJson);\n\n JSONArray arr;\n if (!mO.has(getIntent().getStringExtra(\"date\"))) {\n arr = new JSONArray();\n }\n else{\n arr = mO.getJSONArray(getIntent().getStringExtra(\"date\"));\n }\n JSONObject jo = new JSONObject();\n jo.put(\"title\", titleField.getText().toString());\n jo.put(\"minute\", minute);\n jo.put(\"hour\", hour);\n jo.put(\"description\", descriptionField.getText().toString());\n jo.put(\"location\", locationField.getText().toString());\n\n arr.put(jo);\n\n mO.put(getIntent().getStringExtra(\"date\"), arr);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // generate string from the object\n String jsonString = null;\n try {\n jsonString = mO.toString(4);\n return jsonString;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n\n }", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "public static void generarFicheroJSON(App aplicacion) throws IOException {\n\n ObjectMapper mapeador = new ObjectMapper();\n\n mapeador.configure(SerializationFeature.INDENT_OUTPUT, true);\n\n // Escribe en un fichero JSON el objeto que le pasamos\n mapeador.writeValue(new File(\"./aplicaciones/\" + aplicacion.getNombre() + \".json\"), aplicacion);\n\n }", "public JSONObject createJSON(String dateModified, String type){\n ArrayList<Integer> keyArrl = getAllKeysOrdered();\n if(keyArrl == null || keyArrl.isEmpty()){\n return null;\n }\n\n //try to create a JSONObject\n try {\n JSONObject jObj = new JSONObject();\n //insert the file name and type\n jObj.put(\"Date Modified\", dateModified);\n jObj.put(\"Type\", type);\n\n //check to make sure not saving empty file\n if(keyArrl == null || keyArrl.isEmpty()){\n return null;\n }\n\n //insert JSONArray of the keys\n JSONArray jsArray = new JSONArray(keyArrl);\n jObj.put(\"Values\", jsArray);\n\n //return the JSONObject\n return jObj;\n\n //catch the error if JSONObject not made\n } catch (JSONException e) {\n Log.e(\"MYAPP\", \"unexpected JSON exception\", e);\n // Do something to recover ... or kill the app.\n return null;\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void ucitajRestorane(String contextPath) {\n\t\tFileWriter fileWriter = null;\n\t\tBufferedReader in = null;\n\t\tFile file = null;\n\t\ttry {\n\t\t\tfile = new File(contextPath + \"/data/restorani.txt\");\n\t\t\tin = new BufferedReader(new FileReader(file));\n\n\t\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\t\tobjectMapper.setVisibilityChecker(\n\t\t\t\t\tVisibilityChecker.Std.defaultInstance().withFieldVisibility(JsonAutoDetect.Visibility.ANY));\n\t\t\tTypeFactory factory = TypeFactory.defaultInstance();\n\t\t\tMapType type = factory.constructMapType(HashMap.class, String.class, Restoran.class);\n\t\t\tobjectMapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);\n\t\t\trestorani = ((HashMap<Integer, Restoran>) objectMapper.readValue(file, type));\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t\tfileWriter = new FileWriter(file);\n\t\t\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\t\t\tobjectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);\n\t\t\t\tobjectMapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);\n\t\t\t\tString stringRestaurants = objectMapper.writeValueAsString(restorani);\n\t\t\t\tfileWriter.write(stringRestaurants);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tif (fileWriter != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\ttry {\n\t\t\t\t\tin.close();\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}", "String toJson() throws IOException;", "@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 void createJSON(String filePath, JSONObject jsonObject) throws ExistException, UnimplementedException, UnderlyingStorageException {\n \t\tSystem.err.println(jsonObject);\n \t\tjsonObject=cspace264Hack_munge(jsonObject,filePath);\n \t\tautocreateJSON(\"\",jsonObject);\n \t\t// XXX End of here's what we do because of CSPACE-264\t\t\n \t\t// Here's what we should do ->\n \t\t// throw new UnimplementedException(\"Cannot create collectionobject at known path, use autocreateJSON\");\n \t}", "FileContent createFileContent();", "public static void jsonWrite() \n\t{\n JSONArray arrJson = new JSONArray(); \n FileWriter writeFile = null;\n Iterator<Taxi_Model> taxiIterator = L.iterator();\n\n while(taxiIterator.hasNext()) \n {\n \tJSONObject jsonObject = new JSONObject();\n \tTaxi_Model aux = new Taxi_Model();\n \taux = taxiIterator.next();\n \tJSONArray array = new JSONArray();\n \tarray.add(aux.getLocalizacao()[0]);\n \tarray.add(aux.getLocalizacao()[1]);\n \t\n \t//Armazena dados em um Objeto JSON\n \tjsonObject.put(\"Usuario\", aux.getUsuario());\n jsonObject.put(\"Nome\", aux.getNome());\n jsonObject.put(\"Senha\", aux.getSenha());\n jsonObject.put(\"CPF\", aux.getCpf());\n jsonObject.put(\"Cor do Carro\", aux.getCorCarro());\n jsonObject.put(\"Modelo do Carro\", aux.getModeloCarro());\n jsonObject.put(\"Placa do Carro\", aux.getPlaca());\n jsonObject.put(\"Localizacao\", array);\n jsonObject.put(\"Pontuacao\", aux.getPontuacao());\n jsonObject.put(\"Corridas\", aux.getTotalCorridas());\n jsonObject.put(\"Tempo total\", aux.getTempoTotal());\n jsonObject.put(\"Tempo programado\", aux.getTempoProgramada());\n arrJson.add(jsonObject);\n }\n \n try\n {\n writeFile = new FileWriter(\"taxis.json\");\n //Escreve no arquivo conteudo do Objeto JSON\n writeFile.write(arrJson.toJSONString());\n writeFile.close();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\t}", "public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println(\"Error \" + e);\r\n }\r\n }", "private File createRecordInputStreamFromJsonFile(String inputFile, Charset charset) {\n try {\n final File tempFile = File.createTempFile(inputFile, \".txt\");\n tempFile.deleteOnExit();\n String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset());\n JSONArray docs = new JSONArray(json);\n String csv = CDL.toString(docs);\n org.apache.commons.io.FileUtils.writeStringToFile(tempFile, csv, Charset.defaultCharset());\n return tempFile;\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n }", "public void crearArchivoDeTexto(String rutas,String nombre, String texto){\n try{\n archivo = new File(rutas + File.separator + nombre);\n String rutaCompleta=archivo.getAbsolutePath();\n \n System.out.println(rutaCompleta);\n FileWriter archivoEscritura= new FileWriter(rutaCompleta,true);\n BufferedWriter escritura= new BufferedWriter(archivoEscritura);\n escritura.append(texto+\"\\n\");\n escritura.close();\n archivoEscritura.close();\n }catch(FileNotFoundException e1){\n System.out.println(\"Ruta de archivo no encontrada\");\n }catch(IOException e2){\n System.out.println(\"Error de escritura\");\n }catch(Exception e3){\n System.out.println(\"Error General\");\n }\n }", "@Override\n public String toString() {return \"Json-File Reader\";}", "private String loadJSONFromAsset(){\n String json = null;\n AssetManager assetManager = getAssets();\n try{\n InputStream IS = assetManager.open(\"datosFases.json\");\n int size = IS.available();\n byte[] buffer = new byte[size];\n IS.read(buffer);\n IS.close();\n json = new String(buffer,\"UTF-8\");\n\n } catch (IOException ex){\n ex.printStackTrace();\n return null;\n }\n\n return json;\n }", "private static void exportJsonFile(File configFile) {\n Gson gson = new Gson();\n \n // Java object to JSON, and assign to a String\n String jsonInString = gson.toJson(GameConfig.getInstance());\n \n try {\n FileWriter writer = new FileWriter(configFile);\n \n writer.append(jsonInString);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n LogUtils.error(\"exportJsonFile => \",e);\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 }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void writeToFile (String json) {\n // reset fos to null for checks\n FileOutputStream fos = null;\n try {\n String FILE_NAME = \"ExportedLearningCards.json\";\n fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n fos.write(json.getBytes());\n Toast.makeText(this, \"Saved to \" + getFilesDir() + \"/\" + FILE_NAME,\n Toast.LENGTH_LONG).show();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public void createAttributes() throws FileNotFoundException, JSONException {\n\t\tScanner input = new Scanner(new File(file));\n\t\tJSONObject js = new JSONObject(input.nextLine());\n\t\tfor (String s : JSONObject.getNames(js)) {\n\t\t\tJSONObject rest = js.getJSONObject(s);\n\t\t\tIterator itr = rest.keys();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tString a = (String) itr.next();\n\t\t\t\tattributes.add(a);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private String getArchivoMemoriaInterna(String fileName) throws FileSaverException{\n int size;\n byte[] buffer;\n FileInputStream mInput;\n String jsonString=null,msg;\n JSONObject objeto;\n try{\n mInput = contexto.openFileInput(fileName);\n size = mInput.available();\n buffer = new byte[size];\n mInput.read(buffer);\n mInput.close();\n msg = contexto.getResources().getString(R.string.fileSaverLecturaExitosa);\n Log.v(TAG,msg);\n jsonString = new String(buffer,\"UTF-8\");\n }\n catch(FileNotFoundException e){\n msg = contexto.getResources().getString(R.string.fileSaverErrorLecturaFileNotFound);\n Log.v(TAG,msg);\n //e.printStackTrace();\n throw new FileSaverException(msg);\n }\n catch(IOException e){\n msg = contexto.getResources().getString(R.string.fileSaverErrorLecturaLocal);\n Log.v(TAG,msg);\n throw new FileSaverException(msg,\"ArchivoInexistente\");\n }\n return jsonString;\n }", "public void WriteJSON(Costumer costumer) {\n\n JSONObject costumerDetails = new JSONObject();\n JSONObject documentDetails = new JSONObject();\n\n documentDetails.put(\"type\", costumer.getDocument().getType());\n documentDetails.put(\"nDocument\", costumer.getDocument().getnDocument());\n documentDetails.put(\"ExpiryDate\", costumer.getDocument().getDateExpiry());\n\n System.out.println(\"dco \" + documentDetails);\n\n costumerDetails.put(\"name\", costumer.getName());\n costumerDetails.put(\"surname\", costumer.getSurname());\n costumerDetails.put(\"dateOfBirth\", costumer.getDateOfBirth());\n costumerDetails.put(\"cityOfBirth\", costumer.getCityOfBirth());\n costumerDetails.put(\"cityOfResidence\", costumer.getCityOfResidence());\n costumerDetails.put(\"address\", costumer.getAddress());\n costumerDetails.put(\"telephone\", costumer.getTelephone());\n costumerDetails.put(\"fiscalCode\", costumer.getFiscalCode());\n costumerDetails.put(\"province\", costumer.getProvince());\n costumerDetails.put(\"document\", documentDetails);\n\n costumerObject.put(\"costumer\", costumerDetails);\n\n //Add costumer to list\n costumerList.add(costumerObject);\n\n //add costumer ot the object list\n this.cList.add(costumer);\n\n //Write JSON file\n try (FileWriter file = new FileWriter(\"costumers.json\")) {\n\n file.write(costumerList.toJSONString());\n file.flush();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "public String autocreateJSON(String filePath, JSONObject jsonObject) throws ExistException, UnderlyingStorageException, UnimplementedException {\n \t\ttry {\n \t\t\tDocument doc=cspace266Hack_munge(jxj.json2xml(jsonObject));\n \t\t\tSystem.err.println(\"153 got \"+doc.asXML());\n \t\t\tReturnedURL url = conn.getURL(RequestMethod.POST,\"collectionobjects/\",doc);\n \t\t\tif(url.getStatus()>299 || url.getStatus()<200)\n \t\t\t\tthrow new UnderlyingStorageException(\"Bad response \"+url.getStatus());\n \t\t\treturn url.getURLTail();\n \t\t} catch (BadRequestException e) {\n \t\t\tthrow new UnderlyingStorageException(\"Service layer exception\",e);\n \t\t} catch (InvalidXTmplException e) {\n \t\t\tthrow new UnimplementedException(\"Error in template\",e);\n \t\t}\n \t}", "public JSONObject getJSONFromFile() throws IOException\n\t{\n\t\tInputStream is = context.getResources().openRawResource(R.raw.schedule);\n\t\tWriter writer = new StringWriter();\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t int n;\n\t\t while ((n = reader.read(buffer)) != -1) {\n\t\t writer.write(buffer, 0, n);\n\t\t }\n\t\t} finally {\n\t\t is.close();\n\t\t}\n\n\t\tString jsonString = writer.toString();\n\t\tJSONObject jObj=null;\n\t\t\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(jsonString);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\t\t\t\n\t\treturn jObj;\n\t\t// return JSON String\n\n\t}", "private static void jsonWriter(JSONObject bookList) throws Exception{\r\n FileWriter file = new FileWriter(\"libreria.json\");\r\n file.write(bookList.toJSONString());\r\n file.flush();\r\n }", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "public void LoadTxt(File Arquivo) {\n if (Arquivo.exists()) {\r\n\r\n try {\r\n\r\n FileReader FR = new FileReader(Arquivo);\r\n BufferedReader BW = new BufferedReader(new InputStreamReader(new FileInputStream(Arquivo.getAbsolutePath()), \"ISO-8859-1\"));\r\n\r\n //BufferedReader BW = new BufferedReader(FR);\r\n\r\n String dados;\r\n String[] paraArray = new String[3];\r\n String matricula;\r\n \r\n String serie = Arquivo.getName();\r\n int pos = serie.lastIndexOf(\".\");\r\n if (pos > 0) {\r\n serie = serie.substring(0, pos);\r\n }\r\n\r\n Sala novaSala = new Sala(serie); //CRIANDO SALA COM NOME DE TURMA\r\n salas2.add(novaSala); // ADICIONANDO SALA NA LISTA DE SALAS\r\n while ((dados = BW.readLine()) != null) {\r\n paraArray = dados.split(\";\");\r\n\r\n matricula = /*Integer.parseInt*/ (paraArray[0]);\r\n //senha = /*Integer.parseInt*/(paraArray[2]);\r\n Dados novoDado = new Dados(matricula, paraArray[1], paraArray[2]);\r\n\r\n novoDado.setSerie(serie); //ADICIONANDO TURMA AO DADO\r\n novaSala.getDadosalas().add(novoDado); //ADICIONANDO DADOS A LISTA DE DADOS QUE ESTA EM SALA\r\n\r\n }\r\n \r\n\r\n BW.close();\r\n FR.close();\r\n\r\n } catch (Exception e) {\r\n System.out.println(\"Erro ao carregar arquivo acima\");\r\n System.out.println(e.getMessage());\r\n\r\n }\r\n\r\n } else {\r\n System.out.println(\"Nenhum arquivo de dados encontrado\");\r\n }\r\n\r\n }", "public static String getFileType() {return \"json\";}", "public static JSONObject loadMOTD() {\n File JSONFile = new File(plugin.getDataFolder() + \"/motd.json\");\n \n if (!JSONFile.exists()){\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json was not found in the config directory. Attempting to create a blank file.\");\n boolean worked = saveMOTD(new JSONObject());\n if (worked) Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json created!\");\n else Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"JawaToolBox was unable to generate the blank motd.json. This is likely a permissions problem.\");\n return new JSONObject();\n }\n\n try {\n String source = new String(Files.readAllBytes(Paths.get(JSONFile.toURI())));\n return new JSONObject(source);\n } catch (FileNotFoundException ex) {\n return new JSONObject();\n } catch (IOException ex) {\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, \"Something went wrong JawaToolBox wasn't able to read the motd.json. Check directory permissions.\");\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, null, ex);\n return new JSONObject();\n }\n }", "public void generateMetadataFile(String jsonString) {\n try {\n String metadataFilePath = metadataFileDir + File.separator + metadataFileId + METADATA_FILE_EXT;\n File file = new File(metadataFilePath);\n // if file doesnt exists, then create it\n if (!file.exists()) {\n file.createNewFile();\n }\n\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(jsonString);\n bw.close();\n\n LOGGER.log(Level.INFO, \"Generated {0} successfully.\", metadataFilePath);\n } catch (IOException e) {\n LOGGER.log(Level.SEVERE, \"Failed to create metadata file. {0}\", e.getMessage());\n }\n }", "public static void marshal(String filename) {\n String sunigram = JsonUtils.Instance.toJson(UNIGRAM);\n FileUtil.writeFileJson(filename, sunigram);\n }", "public static String generar_Cadena(String archivo) throws FileNotFoundException, IOException {\n String cadena = \"\";\n String linea = \"\";\n FileReader f = new FileReader(archivo);\n BufferedReader b = new BufferedReader(f);\n while((linea= b.readLine())!=null) {\n //System.out.println(linea);\n cadena+=linea;\n }\n b.close();\n \n return cadena;\n }", "public JSONObject transformer() {\n JSONObject jsonObject = new JSONObject();\n JSONArray listening = new JSONArray();\n JSONArray listening_correction = new JSONArray();\n JSONArray reading = new JSONArray();\n JSONArray reading_correction = new JSONArray();\n JSONArray historique = new JSONArray();\n\n for (int i = 0; i < this.listening.size(); i++) {\n listening.put(this.listening.get(i).whoIs());\n listening_correction.put(this.listening_correction.get(i).whoIs());\n }\n\n for (int j = 0; j < this.reading.size(); j++) {\n reading.put(this.reading.get(j).whoIs());\n reading_correction.put(this.reading_correction.get(j).whoIs());\n }\n\n for(int k=0; k < this.historique.size(); k++){\n historique.put( transforme(this.historique.get(k)) );\n }\n\n try {\n jsonObject.put(\"nom\", this.nom);\n jsonObject.put(\"listening\", listening);\n jsonObject.put(\"reading\", reading);\n jsonObject.put(\"listening_correction\", listening_correction);\n jsonObject.put(\"reading_correction\", reading_correction);\n jsonObject.put(\"historique\",historique);\n jsonObject.put(\"etat\", this.etat);\n jsonObject.put(\"mode\", this.mode);\n jsonObject.put(\"est_termine\", this.est_termine);\n jsonObject.put(\"chronometre\", this.chronometre);\n Log.i(\"jsonObject\",jsonObject.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonObject;\n }", "public Tamagotchi read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return tamagotchiToJson(jsonObject);\n }", "String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;", "public static void main(String[] args) throws IOException {\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"./output.json\"), \"utf-8\"));\n String line = new Scanner(new File(\"src/movie.json\")).useDelimiter(\"\\\\A\").next();\n System.out.println(line);\n long drama=0;\n long action=0;\n long horror=0;\n long thriller=0;\n long comedy=0;\n long adventure=0;\n\n try {\n JSONParser parser = new JSONParser();\n JSONArray jsonArray = (JSONArray) parser.parse(line);\n Iterator<JSONObject> iterator = jsonArray.iterator();\n while(iterator.hasNext()) {\n JSONObject next = iterator.next();\n switch ((String)next.get(\"장르\")) {\n case \"드라마\":\n drama += Long.parseLong((String)next.get(\"수익(전세계)\"));\n break;\n case \"액션\":\n action += Long.parseLong((String)next.get(\"수익(전세계)\"));\n break;\n case \"호러\":\n horror += Long.parseLong((String)next.get(\"수익(전세계)\"));\n break;\n case \"스릴러\":\n thriller += Long.parseLong((String)next.get(\"수익(전세계)\"));\n break;\n case \"코미디\":\n comedy += Long.parseLong((String)next.get(\"수익(전세계)\"));\n break;\n case \"어드벤처\":\n adventure += Long.parseLong((String)next.get(\"수익(전세계)\"));\n break;\n }\n }\n JSONArray resultArray = new JSONArray();\n JSONObject dramaObj = new JSONObject();\n dramaObj.put(\"장르\", \"드라마\");\n dramaObj.put(\"수익\", drama);\n JSONObject actionObj = new JSONObject();\n actionObj.put(\"장르\", \"액션\");\n actionObj.put(\"수익\", action);\n JSONObject horrorObj = new JSONObject();\n horrorObj.put(\"장르\", \"호러\");\n horrorObj.put(\"수익\", horror);\n JSONObject thrillerObj = new JSONObject();\n thrillerObj.put(\"장르\", \"스릴러\");\n thrillerObj.put(\"수익\", thriller);\n JSONObject comedyObj = new JSONObject();\n comedyObj.put(\"장르\", \"코미디\");\n comedyObj.put(\"수익\", comedy);\n JSONObject adventureObj = new JSONObject();\n adventureObj.put(\"장르\", \"어드벤처\");\n adventureObj.put(\"수익\", adventure);\n\n resultArray.add(dramaObj);\n resultArray.add(actionObj);\n resultArray.add(horrorObj);\n resultArray.add(thrillerObj);\n resultArray.add(comedyObj);\n resultArray.add(adventureObj);\n bw.write(resultArray.toString());\n } catch (ParseException e) {\n e.printStackTrace();\n }\n bw.close();\n }", "private void createDictionary() throws IOException {\r\n long start = System.currentTimeMillis();\r\n\r\n dict = new PrefixTree(); //new prefix\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/dictionary.csv\"))); //read the file\r\n\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n //System.out.println(line);\r\n addToRoot(line); //for each line add it in dictionary\r\n }\r\n\r\n System.out.println(\"Time took for making Dictionary : \" + (System.currentTimeMillis() - start) + \" ms\");\r\n }", "private static void createFileContribuicaoUmidade() throws IOException{\r\n\t\tInteger contribuicaoDefault = 0;\r\n\t\tarqContribuicaoUmidade = new File(pathContribuicaoUmidade);\r\n\t\tif(!arqContribuicaoUmidade.exists()) {\r\n\t\t\tarqContribuicaoUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqContribuicaoUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(contribuicaoDefault.toString() + String.valueOf('\\n'));\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {//Se arquivo existir\r\n\t\t\tFileReader fr = new FileReader(getArqContribuicaoUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio(modificado)*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqContribuicaoUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(contribuicaoDefault.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma contribuicao Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}", "public String generateJsonFileFromParsedTextFile(String textFilePathStr) {\n\t\tBufferedReader br = null;\n\t\tList<String> wordList = new ArrayList<>();\n\t\tFile file = new File (textFilePathStr);\n\t\tif (!file.exists() || file.isDirectory()) {\n\t\t\tSystem.out.println(\"Text file \" + file.getAbsolutePath() + \" does not exist\");\n\t\t\treturn \"not found\";\n\t\t}\n\t\ttry {\n\t\t \n\t br = new BufferedReader(new FileReader(textFilePathStr));\n\t String line;\n while ((line = br.readLine()) != null) {\n \t populateListFromLine(line, wordList);\n }\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n } finally {\n \tif (br != null) {\n \t\ttry {\n \t\t br.close();\n \t\t}\n \t\tcatch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }\n\t\tString jsonStr = getWordStatsFromList(wordList);\n\t\tFile outFile = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().indexOf(file.getName()) ) + \"//\" + JSONOUTPUTFILE);\n\t\ttry (PrintWriter out = new PrintWriter(outFile)) {\n\t\t out.println(jsonStr);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"done\";\n\t}", "@Override\r\n public void serializar() throws IOException {\n File fich=new File(\"datos.bin\");\r\n FileOutputStream fos = new FileOutputStream(fich);\r\n ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n oos.writeObject(gestor);\r\n oos.close();\r\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\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\t}", "public TranscriptEntry(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (FileReader reader = new FileReader(filename)){\n Object obj = jsonParser.parse(reader);\n\n JSONObject entry = (JSONObject) obj;\n JSONObject myCourse = (JSONObject) entry.get(\"course\");\n course = parseCourse(myCourse);\n grade = (String) entry.get(\"grade\");\n inProgress = (boolean) entry.get(\"inProgress\");\n courseComplete = (boolean) entry.get(\"courseComplete\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "String toJSON();", "private void buildDS(String file) throws IOException,ParseException\n\t{\n\t\tJSONParser parser=new JSONParser();\n\t\tJSONObject config=(JSONObject)parser.parse(new FileReader(file));\n\t\taddToMap(config,this.types,\"types\");\n\t\tJSONObject groups=(JSONObject)config.get(\"combine\");\n\t\tfor(String key:(Set<String>)groups.keySet())\n\t\t{\n\t\t\tArrayList<String> temp=new ArrayList<String>();\n\t\t\taddToList(groups,temp,key);\n\t\t\tthis.groups.put(key,temp);\n\t\t}\n\t\taddToMap(config,this.rename,\"rename\");\n\t\taddToMap(config,this.format,\"format\");\n\t\taddToMap(config,this.ops,\"operation\");\n\t}", "private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}", "public static void inicializaMedicosText() {\n \n try (BufferedWriter bw = new BufferedWriter(new FileWriter(\"medicos.txt\"))) {\n for (Medico m : medicos) {\n if(m.getPuesto()==null)\n bw.write(m.getCedula() + \",\" + m.getNombres() + \",\" + m.getApellidos() + \",\" + m.getEdad() + \",0\");\n else\n bw.write(m.getCedula() + \",\" + m.getNombres() + \",\" + m.getApellidos() + \",\" + m.getEdad() + \",\" + m.getPuesto().getId());\n bw.newLine();\n }\n }\n catch (IOException ex) {\n Logger.getLogger(StageAdmin.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void addPayment(String name) {\n \t String data=\"\";\n String str;\n try { \n FileReader fr = new FileReader(jsonFile);\n BufferedReader br = new BufferedReader(fr);\n while ((str=br.readLine())!=null) {\n data = data + str + \"\\n\";\n } \n JSONObject dataJson = new JSONObject(data);\n JSONArray jsonArray = dataJson.getJSONArray(\"payments\");\n br.close();\n FileWriter fw = new FileWriter(jsonFile);\n PrintWriter pw = new PrintWriter(fw);\n \n \tJSONObject payment=new JSONObject();\n \tpayment.put(\"name\", name);\n \tpayment.put(\"availability\",\"Yes\"); \t\n \tjsonArray.put(payment); \t\n \tdataJson.put(\"payments\", jsonArray);\n \tString jsonString = dataJson.toString(); \n \n String str1[] = jsonString.toString().split(\",\");\n int i;\n for(i=0; i<str1.length-1; i++) {\n pw.println(str1[i]+\",\");\n }\n pw.println(str1[i]);\n pw.close();\n fw.close();\n }\n catch (Exception error) {\n System.out.println(\"json.txt\");\n }\n }", "public String fileToString(String file){\n String path = new File(\"./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json\").getAbsolutePath();\n File fileObj = new File(path);\n Log.d(\"Reading JSON file\", \"File exists: \" + fileObj.exists());\n Log.d(\"Reading JSON file\", \"File is directory: \" + fileObj.isDirectory());\n Log.d(\"Reading JSON file\", \"File can read: \" + fileObj.canRead());\n Log.d(\"Reading JSON file\", \"Current directory: \" + path);\n Log.d(\"Reading JSON file\", \"The path is: \" + file);\n try(Scanner in = new Scanner(new File(file))){\n StringBuilder sb = new StringBuilder();\n while(in.hasNextLine()){\n sb.append(in.nextLine());\n sb.append('\\n');\n }\n in.close();\n\n return sb.toString();\n }\n catch (FileNotFoundException ex){\n ex.printStackTrace();\n }\n return null;\n }", "@Test\n public void convertTest() throws Exception{\n String str = FileUtils.readFileToString(new File(FilePath));\n// content.setContent(getMatcherStr(str,\"NumberLong\\\\((\\\\d+)\\\\)\"));\n// CVModel cvModel = JSONUtils.readValue(content.getContent(), CVModel.class);\n// String jsonStr = JSONUtils.writeValue(cvModel);\n \n String debase64 = URLDecoder.decode(str, ConstantUtils.CHARASET);\n debase64 = new String(Base64.decodeBase64(debase64.replaceAll(\"\\\\s\", \"+\")), ConstantUtils.CHARASET);\n CVModel cvModel = JSONUtils.readValue(debase64, CVModel.class);\n System.out.println(JSONUtils.writeValue(cvModel));\n }", "String prepareFile();", "public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public void doConvertion() throws IOException{\n String filename = \"test\";\n writer = new PrintWriter(new FileWriter(filename));\n writer.write(\"\\\"token\\\",\\\"prev_word\\\",\\\"next_word\\\",\\\"tag\\\",\\\"prev_tag\\\",\\\"next_tag\\\",\\\"is_number\\\",\\\"is_punctuation\\\",\\\"is_place_directive\\\",\\\"is_url\\\",\\\"is_twitter_account\\\",\\\"is_hashtag\\\",\\\"is_month_name\\\",\\\"is_gazeteer\\\",\\\"label\\\"\");\n // write header first.. \n \n // Select from db.\n// ArrayList<String> tweets = selectTweet();\n// for (int i = 0; i < tweets.size(); i++) {\n// String tobewriten = parseTweet(tweets.get(i));\n// writer.write(tobewriten);\n// }\n // put arff header in bottom but next to be moved to top..\n writer.write(parseTweet());\n //writer.write(getArffHeader());\n \n writer.close();\n // write to external file\n \n }", "private JSON() {\n\t}", "private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}", "java.lang.String getMetadataJson();", "public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public static String getJSONData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n String jsonData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n jsonData = writer.toString();\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n jsonData = reader.toString();\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::getJSONData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return jsonData;\n }", "public static Quote[] readFromJson(String filename) throws IOException {\n File file = new File(filename);\n file.createNewFile();\n Gson read = new Gson();\n InputStream inStream = new FileInputStream(filename);\n BufferedReader buffer = new BufferedReader(new InputStreamReader(inStream));\n Quote[] quotes = read.fromJson(buffer, Quote[].class);\n buffer.close();\n return quotes;\n }", "private String notificacionesSRToJson(List<DaNotificacion> notificacions){\n String jsonResponse=\"\";\n Map<Integer, Object> mapResponse = new HashMap<Integer, Object>();\n Integer indice=0;\n for(DaNotificacion notificacion : notificacions){\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idNotificacion\",notificacion.getIdNotificacion());\n if (notificacion.getFechaInicioSintomas()!=null)\n map.put(\"fechaInicioSintomas\",DateUtil.DateToString(notificacion.getFechaInicioSintomas(), \"dd/MM/yyyy\"));\n else\n map.put(\"fechaInicioSintomas\",\" \");\n map.put(\"codtipoNoti\",notificacion.getCodTipoNotificacion().getCodigo());\n map.put(\"tipoNoti\",notificacion.getCodTipoNotificacion().getValor());\n map.put(\"fechaRegistro\",DateUtil.DateToString(notificacion.getFechaRegistro(), \"dd/MM/yyyy\"));\n map.put(\"SILAIS\",notificacion.getCodSilaisAtencion()!=null?notificacion.getCodSilaisAtencion().getNombre():\"\");\n map.put(\"unidad\",notificacion.getCodUnidadAtencion()!=null?notificacion.getCodUnidadAtencion().getNombre():\"\");\n //Si hay persona\n if (notificacion.getPersona()!=null){\n /// se obtiene el nombre de la persona asociada a la ficha\n String nombreCompleto = \"\";\n nombreCompleto = notificacion.getPersona().getPrimerNombre();\n if (notificacion.getPersona().getSegundoNombre()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoNombre();\n nombreCompleto = nombreCompleto+\" \"+notificacion.getPersona().getPrimerApellido();\n if (notificacion.getPersona().getSegundoApellido()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoApellido();\n map.put(\"persona\",nombreCompleto);\n //Se calcula la edad\n int edad = DateUtil.calcularEdadAnios(notificacion.getPersona().getFechaNacimiento());\n map.put(\"edad\",String.valueOf(edad));\n //se obtiene el sexo\n map.put(\"sexo\",notificacion.getPersona().getSexo().getValor());\n if(edad > 12 && notificacion.getPersona().isSexoFemenino()){\n map.put(\"embarazada\", envioMxService.estaEmbarazada(notificacion.getIdNotificacion()));\n }else\n map.put(\"embarazada\",\"--\");\n if (notificacion.getMunicipioResidencia()!=null){\n map.put(\"municipio\",notificacion.getMunicipioResidencia().getNombre());\n }else{\n map.put(\"municipio\",\"--\");\n }\n }else{\n map.put(\"persona\",\" \");\n map.put(\"edad\",\" \");\n map.put(\"sexo\",\" \");\n map.put(\"embarazada\",\"--\");\n map.put(\"municipio\",\"\");\n }\n\n mapResponse.put(indice, map);\n indice ++;\n }\n jsonResponse = new Gson().toJson(mapResponse);\n UnicodeEscaper escaper = UnicodeEscaper.above(127);\n return escaper.translate(jsonResponse);\n }", "void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;", "void generateJSON(JSONObject object, String name);", "public void writeToJSON(String filePath) throws IOException {\n try (PrintWriter pw = new PrintWriter(filePath)) {\n pw.printf(\"{\\n\\t\\\"patients\\\": [\\n\");\n for (int i = 0; i < dataFrame.getRowCount(); i++) {\n pw.printf(\"\\t\\t{\\n\");\n Iterator<String> it = dataFrame.getColumnNames().iterator();\n while (it.hasNext()){\n String colName = it.next();\n if (it.hasNext())\n pw.printf(\"\\t\\t\\t\\\"%s\\\":\\\"%s\\\",\\n\", colName, dataFrame.getValue(colName, i));\n else\n pw.printf(\"\\t\\t\\t\\\"%s\\\":\\\"%s\\\"\\n\", colName, dataFrame.getValue(colName, i));\n }\n if (i+1<dataFrame.getRowCount())\n pw.printf(\"\\t\\t},\\n\");\n else\n pw.printf(\"\\t\\t}\\n\\t]\\n\");\n }\n pw.printf(\"}\\n\");\n }\n }", "private void createLearnJSON(){\n json = new JSONObject();\n\n try {\n json.put(\"userID\", global.getUserID());\n StringBuilder p1 = new StringBuilder();\n for (String s: global.getWords()){\n p1.append(p1.toString().equals(\"\") ? s : (\" \" + s));\n }\n json.put(\"p1\", p1.toString());\n json.put(\"p2\", url);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void crearCliente(Cliente cliente) {\n \n File db = new File(\"src/Archivo/archivo.txt\");\n File tempDB = new File(\"src/Archivo/archivo_temp.txt\");\n\n try {\n \n if (cliente.getNombreCliente().isEmpty()) {\n cliente.setNombreCliente(\"undefined\");\n }\n if (cliente.getNombreEmpresa().isEmpty()) {\n cliente.setNombreEmpresa(\"undefined\");\n }\n if (cliente.getCiudad().isEmpty()) {\n cliente.setCiudad(\"undefined\");\n }\n \n List<Cliente> newClientes = añadirClienteToList(cliente);\n\n BufferedWriter bw = new BufferedWriter(new FileWriter(tempDB));\n\n\n\n for(Cliente cli:newClientes) {\n bw.write(\n Integer.toString(cli.getId())+\",\"+\n cli.getNombreCliente()+\",\"+\n cli.getNombreEmpresa()+\",\"+\n cli.getCiudad()+\",\"+\n cli.getDeuda()+\",\"+\n cli.getPrecioVentaSaco()\n );\n bw.flush();\n bw.newLine();\n }\n bw.close();\n db.delete();\n } catch (Exception e) {\n System.err.println(\"Method-actualizarUsuarioById: \" + e);\n }\n\n boolean success = tempDB.renameTo(db);\n System.out.println(success);\n }", "public void convert() throws IOException {\n URL url = new URL(SERVICE + City + \",\" + Country + \"&\" + \"units=\" + Type + \"&\" + \"APPID=\" + ApiID);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = reader.readLine();\n // Pobieranie JSON\n\n // Wyciąganie informacji z JSON\n //*****************************************************************\n //Temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"{\\\"temp\\\"\") + 8;\n int endIndex = line.indexOf(\",\\\"feels_like\\\"\");\n temperature = line.substring(startIndex, endIndex);\n // System.out.println(temperature);\n }\n //Min temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\",\\\"temp_min\\\"\") + 12;\n int endIndex = line.indexOf(\",\\\"temp_max\\\"\");\n temperatureMin = line.substring(startIndex, endIndex);\n // System.out.println(temperatureMin);\n }\n //Max temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"\\\"temp_max\\\":\") + 11;\n int endIndex = line.indexOf(\",\\\"pressure\\\"\");\n temperatureMax = line.substring(startIndex, endIndex);\n //System.out.println(temperatureMax);\n }//todo dodaj więcej informacji takich jak cisnienie i takie tam\n //*****************************************************************\n }", "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public static List<Producto> convertirProductoTextoALIsta(String cadena){\n Gson gson = new Gson();\n\n Type lista = new TypeToken<List<Producto>>() {}.getType();\n return gson.fromJson(cadena,lista); //pasamos la cadena y adaptara el formato para esta lista\n}", "public String createJsonObject() {\n JSONObject jsonObject = new JSONObject();\n\n try {\n if (!vslaId.equalsIgnoreCase(\"-1\")) {\n // editing existing information\n jsonObject.put(\"VslaId\", vslaId);\n }\n jsonObject.put(\"GroupSupport\", grpSupportType);\n jsonObject.put(\"VslaName\", vslaName);\n jsonObject.put(\"grpPhoneNumber\", grpPhoneNumber);\n jsonObject.put(\"PhysicalAddress\", physAddress);\n jsonObject.put(\"GpsLocation\", locCoordinates);\n jsonObject.put(\"representativeName\", representativeName);\n jsonObject.put(\"representativePosition\", representativePost);\n jsonObject.put(\"GroupAccountNumber\", grpBankAccount);\n jsonObject.put(\"repPhoneNumber\", repPhoneNumber);\n jsonObject.put(\"RegionName\", regionName);\n jsonObject.put(\"tTrainerId\", tTrainerId);\n jsonObject.put(\"Status\", \"2\");\n jsonObject.put(\"numberOfCycles\", numberOfCycles);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return jsonObject.toString();\n }", "public static void writeJSONString(@Nullable Object value, Path file) throws IOException {\n // We escape everything, so pure ASCII remains\n try (Writer out = IO.openOutputFile(file, StandardCharsets.US_ASCII)) {\n writeJSONString(value, out);\n }\n }", "private static void createFileUmidade() throws IOException {\r\n\t\tInteger defaultUmidade = 30;\r\n\t\tarqUmidade = new File(pathUmidade);\r\n\t\tif(!arqUmidade.exists()) {\r\n\t\t\tarqUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {\r\n\t\t\tFileReader fr = new FileReader(getArqUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}", "public AsociarArchivoSerializado(String nuevoMaest, String registro){\n try{\n salNuevoMaest = new ObjectOutputStream(\n Files.newOutputStream(Paths.get(nuevoMaest)));\n \n salRegistro = new ObjectOutputStream(\n Files.newOutputStream(Paths.get(registro)));\n }\n catch(IOException iOException){\n System.err.println(\"Error al abrir el archivo. Terminado.\");\n System.exit(1);\n }\n }", "public generalPersistence(File parent, String fileName) {\n f = new File(parent, fileName);\n if(!f.exists()) initPersistance();\n else{\n String s = null;\n try {\n s = getStringFromFile();\n JSONTokener jsonTokener = new JSONTokener(s);\n myJSON = new JSONObject(jsonTokener);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public <T> String SerializeJson(T obj, String pathToRoot) {\n this.lastPath = pathToRoot + obj.getClass().getSimpleName().toLowerCase() + \"_object-\" + Math.abs(new Random().nextLong()) + \".json\";\n File file = new File(this.lastPath);\n ObjectMapper mapper = new ObjectMapper();\n\n mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n mapper.registerModule(new JavaTimeModule());\n mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\n try {\n file.createNewFile();\n mapper.writeValue(file, obj);\n System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj));\n return mapper.writeValueAsString(obj);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "public String[] parseToProblema (String rutaFichero) {\n String[] problema = new String[3];\n String fichero = \"\";\n try (BufferedReader reader = new BufferedReader (new FileReader(rutaFichero))) { \n String line = reader.readLine();\n while (line != null) {\n fichero = fichero.concat(line);\n line = reader.readLine();\n }\n } catch (IOException ex) {\n System.out.println(\"ERROR AL LEER EL FICHERO JSON\");\n }\n \n JSONObject obj = new JSONObject (fichero);\n problema[0] = obj.getString(\"INITIAL\");\n problema[1] = obj.getString(\"OBJETIVE\");\n problema[2] = obj.getString(\"MAZE\");\n \n return problema;\n }", "String getJSON();", "public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }", "public static void putBook(Book book){\r\n try {\r\n jsonWriter(addObject(objectToArray(fileReader(\"libreria.json\")),book));\r\n } catch (Exception e) {\r\n System.out.println(\"Error, no fue posible sobreescribir el archivo\");\r\n }\r\n }", "private void loadDia() throws JSONException {\n\n\n String json = \"{\\n\" +\n \" \\\"mes\\\": 10,\\n\" +\n \" \\\"ano\\\": 2017,\\n\" +\n \" \\\"dias\\\":[\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":1,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"asd\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$4050,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdsaf\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$50,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"2a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$450,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 2,\\n\" +\n \" \\\"sinal\\\": 2,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"1b\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$40,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":13,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 3,\\n\" +\n \" \\\"sinal\\\": 3,\\n\" +\n \" \\\"grupo\\\": 3,\\n\" +\n \" \\\"nome\\\": \\\"13a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$450,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 4,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"13b\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$40,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":16,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 5,\\n\" +\n \" \\\"sinal\\\": 5,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"16a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$52,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":18,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 6,\\n\" +\n \" \\\"sinal\\\": 4,\\n\" +\n \" \\\"grupo\\\": 3,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$52,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 7,\\n\" +\n \" \\\"sinal\\\": 5,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$2,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 8,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$2000,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n\n\n //Toast.makeText(getApplicationContext(), \"certo\",Toast.LENGTH_LONG).show();\n }", "private Tamagotchi tamagotchiToJson(JSONObject jsonObject) {\n String name = jsonObject.getString(\"name\");\n Tamagotchi tr = new Tamagotchi(name);\n return tr;\n }", "public static void writeJsonObjectFile(JsonEntity objectToWrite, String filePath) \n\t{\n\t\tGson gsonParser = new Gson();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFiles.write(gsonParser.toJson(objectToWrite).getBytes(), new File(filePath));\n\t\t}\n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.err.println(\"Can't write to the json file\" + e.getMessage());\n\t\t}\n\t}", "public EntryToJson(){\n AccountEntry entry;\n Account acc;\n String fileName;\n ArrayList<AccountEntry> entryList;\n ArrayList<String> accList = Bank.getInstance().getAllAccounts();\n for (int i = 0; i<accList.size();i++) {\n acc = Bank.getInstance().findAccount(accList.get(i));\n entryList = acc.getEntryObjects();\n fileName = acc.getNum()+\".json\";\n\n\n Gson gson = new GsonBuilder().create();\n System.out.println(gson.toJson(entryList));\n\n\n }\n\n }", "protected JSONArray getTacoFichas() {\n\t\tJSONArray jsa = new JSONArray();\r\n\t\tfor (int i = 0; i < this.fichasMesa.size(); i++) {\r\n\t\t\tjsa.put(this.fichasMesa.get(i).toJSON());\r\n\t\t}\r\n\t\treturn jsa;\r\n\t}", "private String getFileContent(){\n\t\tString employeesJsonString=\"\";\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\temployeesJsonString += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.out.println(\"file error\");\n\t\t}\n\t\treturn employeesJsonString;\n\t}", "public List<EstadoCita> obtenerDatosJSON(String rta){\n Log.e(\"Agenda JSON\",rta);\n // La lista de generos a retornar\n List<EstadoCita> lista = new ArrayList<EstadoCita>();\n try{\n /**\n * accedemos al json como array, ya que estamos 100% seguros de que lo que devuelve es un array\n * y no un objeto.\n */\n JSONArray json = new JSONArray(rta);\n for (int i=0; i<json.length(); i++){\n JSONObject row = json.getJSONObject(i);\n EstadoCita g = new EstadoCita();\n g.setId(row.getInt(\"id\"));\n g.setEstado(row.getString(\"estado\"));\n // g.setMedico((Medico) row.get(\"medico\"));\n // g.setHora((Hora) row.get(\"hora\"));\n lista.add(g);\n\n\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n return lista;\n }", "@POST\r\n @Consumes(MediaType.APPLICATION_JSON)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n /*public String getJson(@FormParam(\"operador\")String operador,@FormParam(\"idFile\")int idFile, \r\n @FormParam(\"idUser\")int idUser,@FormParam(\"grupo\")boolean grupo,@FormParam(\"lat\")double latitud, \r\n @FormParam(\"lon\")double longitud, @FormParam(\"hora\")String hora, @FormParam(\"fecha\")String fecha,\r\n @FormParam(\"timeMask\")String timeMask,@FormParam(\"dateMask\")String dateMask,\r\n @FormParam(\"wifis\")String wifis) throws SQLException, URISyntaxException, ClassNotFoundException{*/\r\n public String getJson(Parametros parametros) throws SQLException, URISyntaxException, ClassNotFoundException{\r\n //TODO return proper representation object\r\n \r\n Integer idFile = parametros.idFile;\r\n Integer idUser = parametros.idUser;\r\n boolean grupo = parametros.grupo;\r\n String operador = parametros.operador;\r\n float longitud = parametros.lon;\r\n float latitud = parametros.lat;\r\n String hora = parametros.hora;\r\n String dateMask = parametros.dateMask;\r\n String fecha = parametros.fecha;\r\n String timeMask = parametros.timeMask;\r\n String wifis = parametros.wifis;\r\n \r\n boolean userRegistrado=false;\r\n Fichero fichero = new Fichero(0,0,\"hola\",\"estoy aqui\",\"a esta hora\",\"en esta fecha\",\"con estas wifis\");\r\n try{\r\n Calendar ahora = Calendar.getInstance();\r\n int grupoBBDD =0;\r\n double lat=0;\r\n double lon=0;\r\n String horaBBDD=\"8:00\";\r\n String timeMaskBBDD=\"4\";\r\n String dateMaskBBDD=\"4\";\r\n \r\n ahora.add(Calendar.HOUR, 1);//Cambio de hora por el servidor de Heroku\r\n Connection connection = null;\r\n try{\r\n Class.forName(\"org.postgresql.Driver\");\r\n\r\n String url =\"jdbc:postgresql://localhost:5432/postgres\";\r\n String usuario=\"postgres\";\r\n String contraseña=\"123\";\r\n\r\n connection = DriverManager.getConnection(url, usuario, contraseña);\r\n \r\n if(!connection.isClosed()){\r\n Statement stmt = connection.createStatement();\r\n ResultSet rs= stmt.executeQuery(\"SELECT Id, Departamento FROM Usuarios\");\r\n while(rs.next()){\r\n if((rs.getInt(\"Id\"))==idUser){\r\n userRegistrado=true;\r\n grupoBBDD=rs.getInt(\"Departamento\");\r\n if(grupo && grupoBBDD!=0){\r\n Statement stmt2 = connection.createStatement();\r\n ResultSet rs2= stmt2.executeQuery(\"SELECT * FROM Departamentos WHERE Id='\" +Integer.toString(grupoBBDD)+\"'\"); \r\n while(rs2.next()){\r\n horaBBDD=rs2.getString(\"Horario\");\r\n timeMaskBBDD=rs2.getString(\"Mascara_hora\");\r\n dateMaskBBDD=rs2.getString(\"Mascara_fecha\");\r\n break;\r\n }\r\n rs2.close();\r\n stmt2.close();\r\n }\r\n Statement stmt3 = connection.createStatement();\r\n ResultSet rs3= stmt3.executeQuery(\"SELECT ssid, potencia FROM wifis\");\r\n while(rs3.next()){\r\n wifisFijas.add(rs3.getString(\"ssid\"));\r\n wifisPotencias.add(Integer.toString(rs3.getInt(\"potencia\")));\r\n }\r\n rs3.close();\r\n stmt3.close();\r\n Statement stmt4 = connection.createStatement();\r\n ResultSet rs4= stmt4.executeQuery(\"SELECT * FROM coordenadas\");\r\n while(rs4.next()){\r\n lat=rs4.getFloat(\"Latitud\");\r\n lon=rs4.getFloat(\"Longitud\");\r\n radio=rs4.getInt(\"Radio\");\r\n }\r\n rs4.close();\r\n stmt4.close();\r\n break;\r\n }\r\n\r\n\r\n }\r\n //Gson gson = new Gson();\r\n //String ficheroJSON = gson.toJson(fichero);\r\n rs.close();\r\n stmt.close();\r\n connection.close();\r\n //return ficheroJSON;\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.err.println(e.getClass().getName()+\": \"+e.getMessage());\r\n System.exit(0);\r\n \r\n }\r\n \r\n //for (int i=0;i<listaUsers.length;i++){\r\n //if(listaUsers[i][0]==idUser){\r\n if(userRegistrado){\r\n //userRegistrado = true;\r\n if(!grupo){\r\n fichero = new Fichero(idFile,idUser,claveOperador(operador, idFile, idUser),claveGPS(lat,lon,latitud,longitud,radio,idFile,idUser),claveHora(idFile, idUser,ahora,timeMask,hora),claveFecha(idFile, idUser,ahora,dateMask,fecha),claveWifi(wifis, idUser, idFile));\r\n //fichero.setClaveHora(\"Estoy entrando donde no hay grupo\");\r\n //break;\r\n }\r\n else{\r\n //if(listaUsers[i][1]==0){\r\n if(grupoBBDD==0){\r\n fichero = new Fichero(idFile,idUser,claveOperador(getCadenaAlfanumAleatoria(10), idFile, idUser),claveGPS(rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextInt()*100,idFile,idUser),getCadenaAlfanumAleatoria(100),getCadenaAlfanumAleatoria(50),getCadenaAlfanumAleatoria(75));\r\n //fichero.setClaveHora(\"Estoy entrando donde el grupo es 0\");\r\n }\r\n else{\r\n //fichero = new Fichero(idFile,idUser,claveOperador(operador, idFile, listaUsers[i][1]),claveGPS(lat,lon,idFile,listaUsers[i][1]),claveHora(idFile, listaUsers[i][1],ahora,mapHora.get(listaUsers[i][1])[1],mapHora.get(listaUsers[i][1])[0]),claveFecha(idFile, listaUsers[i][1],ahora,mapHora.get(listaUsers[i][1])[2],fecha),claveWifi(wifis,listaUsers[i][1],idFile));\r\n fichero = new Fichero(idFile,idUser,claveOperador(operador, idFile, grupoBBDD),claveGPS(lat,lon,latitud,longitud,radio,grupoBBDD,grupoBBDD),claveHora(idFile, grupoBBDD,ahora,timeMaskBBDD,horaBBDD),claveFecha(idFile, grupoBBDD,ahora,dateMaskBBDD,fecha),claveWifi(wifis,grupoBBDD,idFile));\r\n //fichero.setClaveHora(\"Estoy entrando en mi cifrado de grupo\");\r\n }\r\n //break;\r\n }\r\n }\r\n //}\r\n if(!userRegistrado){\r\n fichero = new Fichero(idFile,idUser,claveOperador(getCadenaAlfanumAleatoria(10), idFile, idUser),claveGPS(rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextInt()*100,idFile,idUser),getCadenaAlfanumAleatoria(100),getCadenaAlfanumAleatoria(50),getCadenaAlfanumAleatoria(75));\r\n //fichero.setClaveHora(\"No estoy registrado\");\r\n }\r\n }catch(Exception e){\r\n fichero = new Fichero(idFile,idUser,claveOperador(getCadenaAlfanumAleatoria(10), idFile, idUser),claveGPS(rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextDouble()*100,rnd.nextInt()*100,idFile,idUser),getCadenaAlfanumAleatoria(100),getCadenaAlfanumAleatoria(50),getCadenaAlfanumAleatoria(75));\r\n }\r\n \r\n \r\n Gson gson = new Gson();\r\n String ficheroJSON = gson.toJson(fichero);\r\n return ficheroJSON;\r\n }", "public void gerarCupom(String cliente, String vendedor,List<Produto> produtos, float totalVenda ) throws IOException {\r\n \r\n File arquivo = new File(\"cupomFiscal.txt\");\r\n String produto =\" \"; \r\n if(arquivo.exists()){\r\n System.out.println(\"Arquivo localizado com sucessso\");\r\n }else{\r\n System.out.println(\"Arquivo não localizado, será criado outro\");\r\n arquivo.createNewFile();\r\n } \r\n \r\n for(Produto p: produtos){\r\n produto += \" \"+p.getQtd()+\" \"+ p.getNome()+\" \"+p.getMarca()+\" \"+ p.getPreco()+\"\\n \";\r\n }\r\n \r\n \r\n \r\n FileWriter fw = new FileWriter(arquivo, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n \r\n \r\n bw.write(\" \"+LOJA);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"CLIENTE CPF\");\r\n bw.newLine();\r\n bw.write(cliente);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(DateCustom.dataHora());\r\n bw.newLine();\r\n bw.write(\" CUPOM FISCAL \");\r\n bw.newLine();\r\n bw.write(\"QTD DESCRIÇÃO PREÇO\");\r\n bw.newLine();\r\n bw.write(produto);\r\n bw.newLine(); \r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"TOTAL R$ \" + totalVenda);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"Vendedor \" + vendedor);\r\n bw.newLine();\r\n bw.newLine();\r\n bw.close();\r\n fw.close();\r\n }", "public synchronized void saveTableInJson(Table table) throws IOException {\r\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\r\n\r\n /*\r\n * I don't know why but this line below doesn't work...\r\n * The strange thing is it was working fine, but just in one moment stopped.\r\n * I checked everything, I even reverted the done work to the initial state.\r\n * Nothing helped.\r\n */\r\n //gson.toJson(table, new FileWriter(stringPathToTable));\r\n\r\n String jsonTable = gson.toJson(table);\r\n FileWriter fileWriter = new FileWriter(stringPathToTable);\r\n fileWriter.write(jsonTable);\r\n fileWriter.close();\r\n }", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "private static JSONTile parse(String configFile) {\n Gson gson = new Gson();\n\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {\n return gson.fromJson(reader, JSONTile.class);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Error when reading file: \" + configFile, e);\n }\n }", "private MoodsCreator(Resources resources){\n\n String result;\n try {\n InputStream inputStream = resources.openRawResource(R.raw.moods);\n\n StringBuffer buffer = new StringBuffer();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n\n buffer.append(line + \"\\n\");\n }\n result = buffer.toString();\n Log.d(\"MOODS\", result);\n\n JSONObject moodsJson = new JSONObject(result);\n JSONArray moodsJsonArray = new JSONArray(moodsJson.get(\"moods\").toString());\n\n for(int i =0;i<moodsJsonArray.length();++i){\n JSONObject moodfromJson = moodsJsonArray.getJSONObject(i);\n Mood mood = new Mood(moodfromJson.get(\"name\").toString(),moodfromJson.getInt(\"red\"),moodfromJson.getInt(\"green\"), moodfromJson.getInt(\"blue\"), moodfromJson.getInt(\"alpha\"));\n\n Log.d(\"MOOD\",mood.name + \" \"+mood.alpha + \" \"+ mood.red);\n moods.put(moodfromJson.get(\"name\").toString(),mood);\n }\n\n Log.d(\"moodsMap\",moods.toString());\n }\n catch(Exception e){\n\n }\n\n }", "public static void genArchivoTokens(){\r\n\t\tString path = AnManager.getPath() + File.separator +\"Resultados Grupo81\" + File.separator+ \"Tokens.txt\";\r\n\t\tFile f = new File(path);\r\n\t\tf.getParentFile().mkdirs(); \r\n\t\ttry {\r\n\t\t\tf.delete(); //Eliminamos si existe algo antes\r\n\t\t\tf.createNewFile();\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Fallo al crear archivo tokens\");\r\n\t\t}\r\n\t}", "public static boolean writeToJson(Quote[] quotes, String filename) throws IOException {\n Gson write = new Gson();\n OutputStream outStream = new FileOutputStream(filename);\n BufferedWriter buffer = new BufferedWriter(new OutputStreamWriter(outStream));\n write.toJson(quotes, buffer);\n buffer.close();\n return true;\n }" ]
[ "0.71632165", "0.70820314", "0.6315054", "0.591579", "0.5773861", "0.5758687", "0.57137704", "0.5647346", "0.5643948", "0.56401736", "0.55930656", "0.5570685", "0.5554286", "0.5514121", "0.55052054", "0.5480982", "0.5472342", "0.5456862", "0.54374003", "0.5428674", "0.5406865", "0.5406116", "0.5378838", "0.53781337", "0.53731364", "0.53678465", "0.53635645", "0.5342825", "0.5340439", "0.5338117", "0.5334948", "0.53231275", "0.5262108", "0.52317214", "0.52245456", "0.5215359", "0.52056986", "0.52016497", "0.52014196", "0.51792526", "0.51791036", "0.5169545", "0.51690114", "0.515824", "0.51496905", "0.514744", "0.51411563", "0.51356465", "0.51314074", "0.51207745", "0.50800276", "0.5077323", "0.50745696", "0.5073141", "0.50616294", "0.506109", "0.5058168", "0.5041556", "0.50394344", "0.50363725", "0.50349194", "0.50347996", "0.50163496", "0.50163114", "0.50111115", "0.50079626", "0.5004871", "0.49966863", "0.49934137", "0.49906525", "0.49892062", "0.49865597", "0.49785987", "0.49781156", "0.49707323", "0.49655494", "0.49641132", "0.49628454", "0.49592513", "0.4957369", "0.49410713", "0.49380767", "0.49367452", "0.49364167", "0.4930866", "0.49204347", "0.4918882", "0.491501", "0.49136993", "0.49125007", "0.4910065", "0.49091822", "0.49066603", "0.49046198", "0.49031177", "0.4887476", "0.48842278", "0.48810604", "0.48798698", "0.48778832", "0.4876566" ]
0.0
-1
Add a new one throw an exception if no room.
public Node<T> add(T element) { // Get a free node. Node<T> freeNode = getFree(); if (freeNode != null) { // Attach the element. return freeNode.attach(element); } else { // Failed! throw new IllegalStateException("Capacity exhausted."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "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 }", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "public boolean addRoom(String roomName) {\n\t\ttry{\n\t\t\tif(rooms.contains(roomName)){ // ja existe\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn rooms.add(roomName);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "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 void addRoom(Chatroom room){\n\n }", "public Room addRoom(Room room) {\r\n\t\tif(userService.adminLogIn) {\r\n\t\t\treturn roomRepository.save(room);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new AdminPermissionRequired(\"admin permission required!!\");\r\n\t\t}\r\n\t}", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "public static void addRoom(String roomNumber, Double price, RoomType roomType) {\r\n\r\n Room room = new Room(roomNumber, price, roomType);\r\n\r\n if (roomList.contains(getARoom(roomNumber))) {\r\n System.out.println(\"This room number already exists. The room can not be created.\");\r\n } else {\r\n //room = new Room(room.getRoomNumber(), room.getRoomPrice(), room.getRoomType());\r\n roomList.add(room);\r\n System.out.println(\"The room was successfully added to our room list.\");\r\n }\r\n }", "public void addItem(Item toAdd) throws ImpossiblePositionException, NoSuchItemException {\n int itemX = (int) toAdd.getXyLocation().getX();\n int itemY = (int) toAdd.getXyLocation().getY();\n ArrayList<Item> rogueItems = getRogue().getItems();\n int itemFound = 0;\n if ((itemX >= getWidth() - 1) || (itemX <= 0) || (itemY >= getHeight() - 1)\n || (itemY <= 0) || !(roomDisplayArray[itemY][itemX].equals(\"FLOOR\"))) {\n throw new ImpossiblePositionException();\n } else {\n roomItems.add(toAdd);\n }\n for (Item singleItem : rogueItems) {\n if (toAdd.getId() == singleItem.getId()) {\n itemFound = 1;\n }\n }\n if (itemFound != 1) {\n throw new NoSuchItemException();\n }\n\n }", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "private static void AddRoom (){\n boolean addRoomLoop = true;\n //loop for addroom process\n while (addRoomLoop) {\n //try/catch for adding room\n try {\n //user inputs room number\n System.out.print(\"Room number: \");\n boolean roomNumberDuplicate = false;\n int newRoomNumber = RecInput.nextInt();\n //loop checks if roomnumber matches already existing room numbers\n for (int i = 0; i < HotelRoom.roomList.size(); i++) {\n if (newRoomNumber == HotelRoom.roomList.get(i).roomNumber) {\n roomNumberDuplicate = true;\n }\n }\n //if room number already exists, asks user for new input\n if (roomNumberDuplicate) {\n System.out.println(\"Room number must be unique, try again!\");\n System.out.println(\"-----------------------------\");\n }\n else {\n System.out.print(\"Number of beds: \");\n int newNumberBeds = RecInput.nextInt();\n\n System.out.print(\"Room price: \");\n int newRoomPrice = RecInput.nextInt();\n \n //new HotelRoom object is created\n HotelRoom.roomList.add(new HotelRoom(newRoomNumber, newNumberBeds, newRoomPrice, false, true, \"\"));\n System.out.println(\"Room added\");\n \n //breaking loop to exit addroom method\n addRoomLoop = false;\n }\n \n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //cleaning scanner\n RecInput.next();\n } \n }\n\n \n }", "public Room createRoom(Room room);", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public void nextRoom() {\n room++;\n createRoom();\n }", "public void addRoom(String name, String size) {\n Room newRoom = new Room(this, name, size);\n rooms.add(newRoom);\n }", "void AddMeeting (Meeting m) throws Exception;", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<?> addGameRoom(@RequestBody Game gameRoom) {\n try {\n ls.addGameRoom(gameRoom);\n return new ResponseEntity<>(HttpStatus.CREATED);\n } catch (LacmanPersistenceException ex) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, ex);\n return new ResponseEntity<>(ex.getMessage(), HttpStatus.FORBIDDEN);\n }\n }", "@Override\n\tpublic boolean addHotelroomPo(HotelroomPo hotelroomPo) {\n\t\tString hotelroomId = String.valueOf(hotelroomPo.getHotelID())\n\t\t\t\t+String.valueOf(hotelroomPo.getRoomID());\n\t\tif(map.get(hotelroomId)==null){\n\t\t\thotelroomDataHelper.addHotelroom(hotelroomPo);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "public void addRoom(int number, int capacity) {\n\t\t\tRooms newRoom = new Rooms(number, capacity);\r\n\t\t\tRoomDetails.add(newRoom);\r\n\t\t}", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testAddItem_already_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tVendingMachineItem test2 = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test2, \"A\");\r\n\r\n\t}", "@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 }", "@Override\n\tpublic int add(Floor floor) {\n\t\treturn floorDao.add(floor);\n\t}", "Room updateOrAddRoom(String username, Room room);", "public int addRoomId() throws NumberFormatException, IOException {\n\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Room ID:\");\n\t\t\tint input = Integer.parseInt(br.readLine());\n\n\t\t\tif(input == 0) {\n\t\t\t\treturn input;\n\n\t\t\t} else if (input < 100 || input > 999) {\n\t\t\t\tSystem.out.println(\"Please enter a valid room number between 100 and 999 or enter '0' to exit to Menu\");\n\t\t\t\tcontinue;\n\n\t\t\t} else if (rooms.containsKey(input)) {\n\t\t\t\tSystem.out.println(\"This ID has already been allocated to a room!\");\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\treturn input;\n\t\t}\t\n\n\t}", "public void addPerson(Person person){\n if (person.getCurrentFloor() != this.currentFloor){\n throw new IllegalArgumentException(\"Person with ID \" + person.getPersonID() +\n \" enters elevator with ID \" + this.ElevatorID + \" on wrong floor\");\n }\n if (!doorOpened) {\n throw new IllegalArgumentException(\"Person with ID \" + person.getPersonID() +\n \" wants to go to closed elevator with ID \" + this.ElevatorID);\n } else if (peopleInside.contains(person)) {\n throw new IllegalArgumentException(\"Person with ID \" + person.getPersonID() +\n \" is already in elevator with ID \" + this.ElevatorID);\n }\n peopleInside.add(person);\n\n }", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\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}", "public static Space addExistingSpace(Context context, boolean isMainSpace, String roomID) {\n\t\tSpace space = null;\n\t\ttry {\n\t\t\tspace = new Space(context, isMainSpace, roomID, false/*owner*/);\n\t\t//\tUser owner = \n\t\t\tPrivateSpaceIconView psIcon=new PrivateSpaceIconView(Space.getMainSpace().getContext(),space);\n\t\t\tspace.getSpaceController().setPSIV(psIcon);\n\t\t\tMainApplication.screen.getActivity().invalidatePSIconView(psIcon);\n\t\t\tMainApplication.screen.getActivity().invalidateSpaceView();\n\t\t\tLog.v(\"SpaceController\", \"this space has \" + space.getAllParticipants().size() + \" people\");\n\t\t\t\n\t\t} catch (XMPPException e) {\n\t\t\tLog.v(\"SpaceController\", \"Could not make an existing space for you\");\n\t\t}\n\t\treturn space;\n\t}", "@Override\n\tpublic int addJewel(Jewel jewel) {\n\t\treturn jewelDao.insert(jewel);\n\t}", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public Integer getNewRoom() {\n return newRoom;\n }", "RoomInfo room(int id);", "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 }", "@PostMapping(path = \"/rooms\")\n public ResponseEntity<Room> generateNewRoom() {\n Room newRoom = roomService.generateNewRoom();\n return new ResponseEntity<>(newRoom, HttpStatus.CREATED);\n }", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "public void addNewGame(gameLocation game) {\n\n\t\t// add to database here\n\t\tCursor checking_avalability = helper.getGameLocationData(GamelocationTableName,\n\t\t\t\tgame.getTitle());\n\t\tif (checking_avalability == null) {\t\t\t\t\n\n\t\t\tGAME_LIST.add(game);\n\n\t\t\tlong RowIds = helper.insertGameLocation(GamelocationTableName,\n\t\t\t\t\tgame.getTitle(), game.getDescription(),\n\t\t\t\t\tconvertToString(game.getIsCouponUsed()));\n\t\t\t//if (RowIds == -1)\n\t\t\t\t//Log.d(TAG, \"Error on inserting columns\");\n\t\t} else if (checking_avalability.getCount() == 0) { \t\t\t\t// checking twice to make sure it will not miss \n\n\t\t\tGAME_LIST.add(game);\n\n\t\t\tlong RowIds = helper.insertGameLocation(GamelocationTableName,\n\t\t\t\t\tgame.getTitle(), game.getDescription(),\n\t\t\t\t\tconvertToString(game.getIsCouponUsed()));\t\t\t// reuse method\n\t\t\t//if (RowIds == -1)\n\t\t\t\t//Log.d(TAG, \"Error on inserting columns\");\n\t\t}\n\n\t}", "@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }", "@Test\r\n\t public void addAnExistingRouteFather(){\r\n\t\tRouteFather toAdd = new RouteFather();\r\n\t\ttoAdd = routeFatherDAO.create(toAdd);\r\n\t\tAssert.assertNull(toAdd);\r\n\t\t\r\n\t }", "public boolean alreadyExist(String nameRoom) throws SQLException{\n return roomDao.alreadyExist(nameRoom);\n }", "public static boolean addRoomPrice(RoomPrice price) {\n try {\n rjc.create(price);\n return true;\n } catch (Exception e) {\n System.out.println(\"RoomDAL.addRoom: \" + e.toString());\n return false;\n }\n }", "private Room addRandomRoom(Random random) {\n int width = RandomUtils.uniform(random, MINROOMWIDTH, MAXROOMWIDTH);\n int height = RandomUtils.uniform(random, MINROOMHEIGHT, MAXROOMHEIGHT);\n int xCoordinate = RandomUtils.uniform(random, 0, size.width - width);\n int yCoordinate = RandomUtils.uniform(random, 0, size.height - height);\n Room newRoom = new Room(new Position(xCoordinate, yCoordinate), new Size(width, height));\n drawRoom(newRoom);\n return newRoom;\n }", "RoomInfo room(String name);", "Room getRoom();", "Room getRoom();", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine().trim();\n while (name.length() > 0) {\n if(name.equals(\"space gun\")){\n room.add(new SpaceGun());\n } else if(name.equals(\"lightsaber\")){\n room.add(new LightSaber());\n } else if(name.equals(\"pillow\")){\n room.add(new Pillow());\n } else if(name.equals(\"blankets\")){\n room.add(new Blankets());\n } else if(name.equals(\"Charlie McDowell\")){\n room.add(new HorrificBeast());\n } else if(name.equals(\"cryonics files\")){\n room.add(new CryoFiles());\n } else if(name.equals(\"coding transcripts\")){\n room.add(new CodingTranscripts());\n } else if(name.equals(\"bananas\")){\n room.add(new Bananas());\n } else if(name.equals(\"transmitter\")){\n room.add(new Transmitter());\n } else {\n room.add(new Thing(name));\n }\n name = in.nextLine().trim(); \n }\n }", "public void createRoom(String roomHost, String roomName) throws IOException {\n ChatRoom newRoom = new ChatRoom(roomHost, roomName);\n chatRooms.add(newRoom);\n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine();\n while (name.length() > 0) {\n if(name.equals(\"sword\")){\n room.add(new Sword());\n }\n else{\n room.add(new Thing(name));\n }\n name = in.nextLine();\n \n }\n }", "public void initRooms(Room room) {\n rooms.add(room);\n internalList.add(room);\n }", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "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 void addMonster(Monster monster,Room room) {\n\t\troom.addMonster(monster);\n\t}", "public void addReservation(Reservation reservation) {\n reservations.add(reservation);\n }", "public abstract void enterRoom();", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "private static boolean transactionAddGame(Transaction tx, GameBean newGame) {\n HashMap<String, Object> parameters = new HashMap<>();\n parameters.put(\"name\", newGame.getName());\n if(!newGame.getCategory1().equals(\"\")) {\n parameters.put(\"category1\", newGame.getCategory1() );\n\n String checkGame = \"MATCH (g:Game{name:$name})\" +\n \" RETURN g\";\n\n Result result = tx.run(checkGame, parameters);\n\n if (result.hasNext()) {\n return false;\n }\n\n result = tx.run(\"CREATE (g:Game{name:$name, category1:$category1})\"\n , parameters);\n\n return true;\n }\n\n return false;\n }", "@Override\n public Room create(RoomResponseDTO roomResponseDTO) {\n return roomRepository.save(new Room(\n roomResponseDTO.getClassroomNumber()\n ));\n }", "@Override\n\tpublic Game add(Game g) {\n\t\treturn null;\n\t}", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "public static Space addSpace(Context context) throws XMPPException {\n\t\tint spaceID = MainApplication.space_counter++;\n\t\tSpace space = new Space(context, false, String.valueOf(spaceID), true/*MainApplication.user_primary*/);\n\t\tSpace.allSpaces.put(space.getRoomID(), space);\n\t\t\n\t\tnotification_View.launch(\"sidechat\");\n\t\t\n\t\tif(D) Log.d(TAG, \"Created a new space with ID:\" + spaceID);\n\t\treturn space;\n\t}", "@PostMapping(\"/chat-rooms\")\n public ResponseEntity<ChatRoom> createChatRoom(@RequestBody ChatRoom chatRoom) throws URISyntaxException {\n log.debug(\"REST request to save ChatRoom : {}\", chatRoom);\n if (chatRoom.getId() != null) {\n throw new BadRequestAlertException(\"A new chatRoom cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n ChatRoom result = chatRoomRepository.save(chatRoom);\n return ResponseEntity.created(new URI(\"/api/chat-rooms/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public void addData(){\n Room room = new Room(\"1234\", null,0);\n roomsRef.add(room)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n Log.d(TAG, \"DocumentSnapshot added with ID: \" + documentReference.getId());\n Toast.makeText(MainActivity.this,\"Success\",Toast.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Error adding document\", e);\n Toast.makeText(MainActivity.this,\"Failed\",Toast.LENGTH_LONG).show();\n }\n });\n\n Task<QuerySnapshot> sp = roomsRef.whereEqualTo(\"roomId\", \"1234\").get();\n }", "private void addDeviceItem() throws SQLException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tnameDevice = edtNameDevice.getText().toString().trim();\r\n\t\t\tportDevice = Integer.parseInt(edtPortDevice.getText().toString().trim());\r\n\t\t\troomID = getIntent().getExtras().getInt(\"room_id\");\r\n\t\t\t\r\n\t\t\tDeviceItem item = new DeviceItem(roomID, nameDevice, typeDevice, portDevice, statusDevice);\r\n\t\t\tDeviceItemController.getInstance(AddDeviceItemActivity.this).createDeviceItem(item);\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tToast.makeText(AddDeviceItemActivity.this, \"Add device item error. Please verify your device infomations!\", Toast.LENGTH_SHORT).show();\r\n\t\t}\r\n\t}", "public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }", "private void add(E e, int index) {\r\n\t\t\tif (hasRoom(index)) {\r\n\t\t\t\tshiftElements(data, index);\r\n\t\t\t\tdata[index] = e;\r\n\t\t\t} else {\r\n\t\t\t\tNode toAdd = new Node();\r\n\t\t\t\tthis.next.prev = toAdd;\r\n\t\t\t\ttoAdd.next = this.next;\r\n\t\t\t\ttoAdd.prev = this;\r\n\t\t\t\tthis.next = toAdd;\r\n\r\n\t\t\t\ttoAdd.data[0] = this.data[data.length - 1];\r\n\t\t\t\t// Shifts everything over one spot, the end element gets lost\r\n\t\t\t\tSystem.arraycopy(this.data, index, this.data, index + 1, data.length - index - 1);\r\n\t\t\t\tthis.data[index] = e;\r\n\t\t\t}\r\n\t\t}", "public static Room newRoom(int random){\n String nameRoom = \"\";\n int monsterAmount = 0;\n\t\tMonster monster;\n MonsterFactory monsterFac = new MonsterFactory();\n\t\tmonster= monsterFac.buildMonster((int)(Math.random() * 3) + 1);\n boolean createHealingPot = false;\n boolean createPitRoom = false;\n boolean createPillar = false;\n boolean createEntrance = false;\n boolean createExit = false;\n boolean createVisionPot = false;\n\n switch (random){\n case 1:\n \tnameRoom = \"The Entrance room\";\n \tmonsterAmount = 0;\n createEntrance = true;\n break;\n\n case 2:\n \tnameRoom = \"The Exit room\";\n \tmonsterAmount = 0;\n createExit = true;\n break;\n\n case 3:\n \tnameRoom = \"The room\";\n \tmonsterAmount = 1; //THIS ROOM WILL HAVE 1 MONSTER\n break;\n \n case 4:\n \tnameRoom = \"The Healing Potion room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n createHealingPot = true;\n break;\n \n case 5:\n \tnameRoom = \"The Pit room\";\n \tmonsterAmount = 0;\n createPitRoom = true;\n break;\n\n case 6:\n \tnameRoom = \"The Pillar room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n \tcreatePillar = true;\n break;\n \n case 7:\n \tnameRoom = \"The Vision Potion room\";\n \tmonsterAmount=0;\n createVisionPot=true;\n break;\n }\n \n if(monsterAmount <= 0 ) \n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monsterAmount,createVisionPot);\n else\n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monster, monsterAmount,createVisionPot);\n\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public void add(Problem problem);", "public void add();", "public Reservation addResv(String roomNo, String roomType,int gID, int aNo, int kNo, LocalDate dIn, LocalDate dOut,\n\t\t\t\t\t\t\t\t String rStatus, LocalTime time) {\n\n\t\tint newResvNo =0;\n\t\tReservation newResv = null;\n\t\tif (checkGap() == false) { //no gap, add resv at back\n\t\t\tnewResvNo = numOfReservation + 1;\n\t\t}\n\t\telse { //add resv in between\n\t\t\tfor (int i = 0; i < rList.size(); i++) {\n\t\t\t\tif (rList.get(i).getResvNo() != (i+1)) {\n\t\t\t\t\tnewResvNo = i+1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tnewResv = new Reservation(newResvNo, roomNo, roomType, gID, aNo, kNo, dIn, dOut, rStatus, time);\n\t\t\trList.add(newResv);\n\t\t\tnumOfReservation++;\n\t\t\tSystem.out.println(\"Total number of reservations: \" + numOfReservation);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newResv;\n\t}", "@Override\r\n\tpublic boolean add(Board1 b) {\n\t\treturn dao.insert(b);\r\n\t}", "public void add(Evolver occupant)\n {\n Location loc = getRandomEmptyLocation();\n if (loc != null)\n add(loc, occupant);\n }", "public void addItem(Item item,Room room) {\n\t\troom.addItems(item);\n\t}", "private void addDoor(Door door) {\n doors.add(door);\n }", "public static Game add(Game game){\n\t\tConnection cnx = null;\n\t\tGame g = null;\n\t\t\n\t\ttry {\n\t\t\tcnx = DatabaseConnection.getInstance().getCnx();\n\t\t\t\n\t\t\t// If game already exists\n\t\t\tString checkExistsSql = \"SELECT * FROM games WHERE title = ? AND console = ? AND release_date = ? AND deleted = 1;\";\n\t\t\tPreparedStatement checkExistsPs = cnx.prepareStatement(checkExistsSql);\n\t\t\tcheckExistsPs.setString(1, game.getTitle());\n\t\t\tcheckExistsPs.setString(2, game.getConsole());\n\t\t\tcheckExistsPs.setString(3, game.getReleaseDate());\n\t\t\tResultSet checkExistsRes = checkExistsPs.executeQuery();\n\t\t\t\n\t\t\tif(checkExistsRes.next()){\n\t\t\t\tint gameID = checkExistsRes.getInt(\"id\");\n\t\t\t\t\n\t\t\t\tcheckExistsRes.close();\n\t\t\t\tcheckExistsPs.close();\n\t\t\t\t\n\t\t\t\t// Reactivating game\n\t\t\t\tString undeleteGameSql = \"UPDATE games SET deleted = 0 WHERE id = ?;\";\n\t\t\t\tPreparedStatement undeletePs = cnx.prepareStatement(undeleteGameSql);\n\t\t\t\tundeletePs.setInt(1, gameID);\n\t\t\t\tundeletePs.executeUpdate();\n\t\t\t\t\n\t\t\t\tundeletePs.close();\n\t\t\t\t\n\t\t\t\tg = new Game();\n\t\t\t\tg.setId(gameID);\n\t\t\t\t\n\t\t\t\treturn g;\n\t\t\t}\n\t\t\t\n\t\t\tcheckExistsRes.close();\n\t\t\tcheckExistsPs.close();\n\t\t\t\n\t\t\t// First inserting the publisher if not already in database\n\t\t\t// Could use a regex to improve the test\n\t\t\tif(game.getPublisher() != null){\n\t\t\t\tString publisherSql = \"SELECT * FROM publishers WHERE LOWER(name) = LOWER(?);\";\n\t\t\t\tPreparedStatement publisherPs = cnx.prepareStatement(publisherSql);\n\t\t\t\tpublisherPs.setString(1, game.getPublisher());\n\t\t\t\tResultSet publisherRes = publisherPs.executeQuery();\n\t\t\t\t\n\t\t\t\t// If we have a result, we update the publisher with the good name (could be a bit different)\n\t\t\t\tif(publisherRes.next()){\n\t\t\t\t\tgame.setPublisher(publisherRes.getString(\"name\"));\n\t\t\t\t\t\n\t\t\t\t\tpublisherRes.close();\n\t\t\t\t\tpublisherPs.close();\n\t\t\t\t}\n\t\t\t\t// Otherwise, let's add it in the db\n\t\t\t\telse {\n\t\t\t\t\tpublisherRes.close();\n\t\t\t\t\tpublisherPs.close();\n\t\t\t\t\t\n\t\t\t\t\tString addPublisherSql = \"INSERT INTO publishers (name) VALUES (?);\";\n\t\t\t\t\tPreparedStatement addPublisherPs = cnx.prepareStatement(addPublisherSql);\n\t\t\t\t\taddPublisherPs.setString(1, game.getPublisher());\n\t\t\t\t\taddPublisherPs.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\taddPublisherPs.close();\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Requête\n\t\t\tString sql = \"INSERT INTO games (title, console, price, publisher, release_date, description, stock, cover) VALUES (?, ?, ?, ?, ?, ?, ?, ?);\";\n\t\t\t\n\t\t\tPreparedStatement ps = cnx.prepareStatement(sql);\n\t\t\tps.setString(1, game.getTitle());\n\t\t\tps.setString(2, game.getConsole());\n\t\t\tps.setDouble(3, game.getPrice().doubleValue());\n\t\t\tps.setString(4, game.getPublisher());\n\t\t\tps.setString(5, game.getReleaseDate());\n\t\t\tps.setString(6, game.getDescription());\n\t\t\tps.setInt(7, game.getStock().intValue());\n\t\t\tps.setString(8, game.getCover());\n\t\t\t\n\t\t\t//Execution et traitement de la réponse\n\t\t\tps.executeUpdate();\n\t\t\tps.close();\n\t\t\t\n\t\t\t// Getting ID\n\t\t\tsql = \"SELECT id FROM games WHERE title = ? AND console = ? AND release_date = ?;\";\n\t\t\tps = cnx.prepareStatement(sql);\n\t\t\tps.setString(1, game.getTitle());\n\t\t\tps.setString(2, game.getConsole());\n\t\t\tps.setString(3, game.getReleaseDate());\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\tres.next();\n\t\t\t\n\t\t\tInteger gameID = res.getInt(\"id\");\n\t\t\t\n\t\t\tres.close();\n\t\t\tps.close();\n\t\t\t\n\t\t\t// Add genres\n\t\t\tsql = \"INSERT INTO assoc_game_genres_games (genre, game) VALUES (?, ?);\";\t\t\t\n\t\t\t\n\t\t\tfor(Iterator<String> i = game.getGenres().iterator(); i.hasNext(); ){\n\t\t\t String genre= i.next();\n\t\t\t \n\t\t\t\tps = cnx.prepareStatement(sql);\n\t\t\t\t\n\t\t\t\tps.setString(1, genre);\n\t\t\t\tps.setInt(2, gameID);\n\t\t\t\t\n\t\t\t\tps.executeUpdate();\n\t\t\t\tps.close();\n\t\t\t}\n\t\t\t\n//\t\t\tDatabaseConnection.getInstance().closeCnx();\n\t\t\t\n\t\t\tg = new Game();\n\t\t\tg.setId(gameID);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn g;\n\t}", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\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 }", "public void addExit(Room exit) {\n\t\tExits.add(exit);\n\t}", "@Override\r\n\t@RequestMapping(\"/add\")\r\n\tpublic Message add(MeetingDetail meetingDetail) {\n\t\treturn new Message(dao.add(meetingDetail));\r\n\t}", "@Override\r\n\tpublic boolean addHouse(House h) {\n\t\treturn adi.addHouse(h);\r\n\t}", "@Test\n public void canAddBedroomToArrayList() {\n hotel.addBedroom(bedroom1);\n assertEquals(5, hotel.checkNumberOfBedrooms());\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 }", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "@Override\n\tpublic int addImgRoom(int room_id, String name_img, String type_img) {\n\t\treturn roomDao.addImgRoom(room_id, name_img, type_img);\n\t}", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotifyObservers();\n\t}", "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 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 void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }", "public boolean addGame(Game g)\n {\n \n list.add(g);\n \n return true;\n }", "@Override\n\tpublic void add(Game game) {\n\t\t\n\t}", "public boolean addOrUpdateHotel(String name, String ip, String port, String capacity){\n boolean result = false;\n try {\n Hotel hotel = new Hotel();\n hotel.setName(name);\n hotel.setIp(ip);\n hotel.setPort(Integer.parseInt(port));\n hotel.setCapacity(Integer.parseInt(capacity));\n result = databaseManager.addOrUpdateHotel(hotel);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public void addNewPassenger() throws SQLException {\n\t\tScanner input = new Scanner(System.in);\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = connUtil.getConnection();\n\t\t\t// call needed DAOs here\n\t\t\tPassengerDAO pdao = new PassengerDAO(conn);\n\t\t\tFlightDAO fdao = new FlightDAO(conn);\n\t\t\tRouteDAO rdao = new RouteDAO(conn);\n\t\t\tAirportDAO apodao = new AirportDAO(conn);\n\t\t\tAirplaneDAO apldao = new AirplaneDAO(conn);\n\n\t\t\tPassenger passenger = new Passenger();\n\t\t\tpassenger.setId(pdao.nextAvailableId());\n\t\t\tpassenger.setBookingId(1);\n\n\t\t\t// Sets passenger name\n\t\t\tSystem.out.println(\"Enter the passenger given name\");\n\t\t\tpassenger.setGivenName(input.nextLine());\n\t\t\tSystem.out.println(\"Enter the passenger family name\");\n\t\t\tpassenger.setFamilyName(input.nextLine());\n\n\t\t\t// Sets birthday\n\t\t\tSystem.out.println(\"Enter DOB (yyyy-mm-dd)\");\n\t\t\tDate date = Date.valueOf(input.nextLine());\n\t\t\tpassenger.setDob(date);\n\n\t\t\t// Sets gender\n\t\t\tSystem.out.println(\"Enter gender (male/female/other)\");\n\t\t\tpassenger.setGender(input.nextLine());\n\n\t\t\t// Sets address\n\t\t\tSystem.out.println(\"Enter the address of the passenger\");\n\t\t\tpassenger.setAddress(input.nextLine());\n\n\t\t\t// Adds passenger to passenger table\n\t\t\tpdao.addPassenger(passenger);\n\n\t\t\tconn.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tconn.rollback();\n\t\t} finally {\n\t\t\tconn.close();\n\t\t}\n\t}", "private void add() {\n\n\t}" ]
[ "0.7209965", "0.70597506", "0.7003581", "0.6810963", "0.67345774", "0.6654943", "0.65755916", "0.6498263", "0.6492583", "0.6467208", "0.6459258", "0.64236563", "0.636836", "0.6282054", "0.612167", "0.60272735", "0.60259473", "0.6019955", "0.5981055", "0.59791964", "0.596449", "0.5933838", "0.58885145", "0.58633304", "0.5854091", "0.58284366", "0.58269536", "0.5824119", "0.5820034", "0.58197284", "0.580137", "0.5778016", "0.5758043", "0.57129365", "0.5700326", "0.5695806", "0.5695788", "0.5650232", "0.56254655", "0.562161", "0.5604203", "0.55863506", "0.5556626", "0.55559087", "0.55523324", "0.5552111", "0.5552111", "0.5542785", "0.55307204", "0.5527358", "0.5523888", "0.55023676", "0.5488124", "0.5484861", "0.5468788", "0.54511565", "0.54506207", "0.54434973", "0.543432", "0.54298973", "0.54220647", "0.54175496", "0.54123414", "0.5407223", "0.5399353", "0.5393182", "0.53924066", "0.5389966", "0.5389403", "0.5385885", "0.5385384", "0.538229", "0.5381493", "0.5379246", "0.5375918", "0.53557897", "0.5349138", "0.5341404", "0.5341021", "0.5338758", "0.5338169", "0.5337934", "0.53339297", "0.5330054", "0.53229624", "0.5304739", "0.5300926", "0.5298882", "0.5289865", "0.52885216", "0.5275388", "0.5270038", "0.5269254", "0.52634203", "0.52615994", "0.5257883", "0.5257577", "0.5256927", "0.5252089", "0.52507925", "0.52492195" ]
0.0
-1
Add a new one return null if no room.
public Node<T> offer(T element) { // Get a free node. Node<T> freeNode = getFree(); if (freeNode != null) { // Attach the element. return freeNode.attach(element); } else { // Failed! return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "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 }", "public void addRoom(Chatroom room){\n\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 Room addRoom(Room room) {\r\n\t\tif(userService.adminLogIn) {\r\n\t\t\treturn roomRepository.save(room);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new AdminPermissionRequired(\"admin permission required!!\");\r\n\t\t}\r\n\t}", "public boolean addRoom(String roomName) {\n\t\ttry{\n\t\t\tif(rooms.contains(roomName)){ // ja existe\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn rooms.add(roomName);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "public Room createRoom(Room room);", "public Integer getNewRoom() {\n return newRoom;\n }", "public void nextRoom() {\n room++;\n createRoom();\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "Room getRoom();", "Room getRoom();", "RoomInfo room(int id);", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "@Override\n\tpublic boolean addHotelroomPo(HotelroomPo hotelroomPo) {\n\t\tString hotelroomId = String.valueOf(hotelroomPo.getHotelID())\n\t\t\t\t+String.valueOf(hotelroomPo.getRoomID());\n\t\tif(map.get(hotelroomId)==null){\n\t\t\thotelroomDataHelper.addHotelroom(hotelroomPo);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static void addRoom(String roomNumber, Double price, RoomType roomType) {\r\n\r\n Room room = new Room(roomNumber, price, roomType);\r\n\r\n if (roomList.contains(getARoom(roomNumber))) {\r\n System.out.println(\"This room number already exists. The room can not be created.\");\r\n } else {\r\n //room = new Room(room.getRoomNumber(), room.getRoomPrice(), room.getRoomType());\r\n roomList.add(room);\r\n System.out.println(\"The room was successfully added to our room list.\");\r\n }\r\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 void enterRoom(Room room) {\n currentRoom = room;\n }", "RoomInfo room(String name);", "Room updateOrAddRoom(String username, Room room);", "public Room getCurrentRoom() {\n if(!currentRooms.isEmpty()) {\n return currentRooms.get(0);\n }\n return null;\n }", "public void addRoom(String name, String size) {\n Room newRoom = new Room(this, name, size);\n rooms.add(newRoom);\n }", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "@PostMapping(path = \"/rooms\")\n public ResponseEntity<Room> generateNewRoom() {\n Room newRoom = roomService.generateNewRoom();\n return new ResponseEntity<>(newRoom, HttpStatus.CREATED);\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public void addRoom(int number, int capacity) {\n\t\t\tRooms newRoom = new Rooms(number, capacity);\r\n\t\t\tRoomDetails.add(newRoom);\r\n\t\t}", "public static Space addExistingSpace(Context context, boolean isMainSpace, String roomID) {\n\t\tSpace space = null;\n\t\ttry {\n\t\t\tspace = new Space(context, isMainSpace, roomID, false/*owner*/);\n\t\t//\tUser owner = \n\t\t\tPrivateSpaceIconView psIcon=new PrivateSpaceIconView(Space.getMainSpace().getContext(),space);\n\t\t\tspace.getSpaceController().setPSIV(psIcon);\n\t\t\tMainApplication.screen.getActivity().invalidatePSIconView(psIcon);\n\t\t\tMainApplication.screen.getActivity().invalidateSpaceView();\n\t\t\tLog.v(\"SpaceController\", \"this space has \" + space.getAllParticipants().size() + \" people\");\n\t\t\t\n\t\t} catch (XMPPException e) {\n\t\t\tLog.v(\"SpaceController\", \"Could not make an existing space for you\");\n\t\t}\n\t\treturn space;\n\t}", "@Override\n\tpublic int add(Floor floor) {\n\t\treturn floorDao.add(floor);\n\t}", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Room newReservationRoom(@PathVariable Integer reservation_reservationId, @RequestBody Room room) {\n\t\treservationService.saveReservationRoom(reservation_reservationId, room);\n\t\treturn roomDAO.findRoomByPrimaryKey(room.getRoomId());\n\t}", "private static void AddRoom (){\n boolean addRoomLoop = true;\n //loop for addroom process\n while (addRoomLoop) {\n //try/catch for adding room\n try {\n //user inputs room number\n System.out.print(\"Room number: \");\n boolean roomNumberDuplicate = false;\n int newRoomNumber = RecInput.nextInt();\n //loop checks if roomnumber matches already existing room numbers\n for (int i = 0; i < HotelRoom.roomList.size(); i++) {\n if (newRoomNumber == HotelRoom.roomList.get(i).roomNumber) {\n roomNumberDuplicate = true;\n }\n }\n //if room number already exists, asks user for new input\n if (roomNumberDuplicate) {\n System.out.println(\"Room number must be unique, try again!\");\n System.out.println(\"-----------------------------\");\n }\n else {\n System.out.print(\"Number of beds: \");\n int newNumberBeds = RecInput.nextInt();\n\n System.out.print(\"Room price: \");\n int newRoomPrice = RecInput.nextInt();\n \n //new HotelRoom object is created\n HotelRoom.roomList.add(new HotelRoom(newRoomNumber, newNumberBeds, newRoomPrice, false, true, \"\"));\n System.out.println(\"Room added\");\n \n //breaking loop to exit addroom method\n addRoomLoop = false;\n }\n \n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //cleaning scanner\n RecInput.next();\n } \n }\n\n \n }", "public void initRooms(Room room) {\n rooms.add(room);\n internalList.add(room);\n }", "public Room getRoom()\r\n {\r\n return room;\r\n }", "@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<?> addGameRoom(@RequestBody Game gameRoom) {\n try {\n ls.addGameRoom(gameRoom);\n return new ResponseEntity<>(HttpStatus.CREATED);\n } catch (LacmanPersistenceException ex) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, ex);\n return new ResponseEntity<>(ex.getMessage(), HttpStatus.FORBIDDEN);\n }\n }", "public String getRoom() {\r\n return room;\r\n }", "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\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}", "public Room getRoom()\n {\n return currentRoom;\n }", "@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }", "private Room addRandomRoom(Random random) {\n int width = RandomUtils.uniform(random, MINROOMWIDTH, MAXROOMWIDTH);\n int height = RandomUtils.uniform(random, MINROOMHEIGHT, MAXROOMHEIGHT);\n int xCoordinate = RandomUtils.uniform(random, 0, size.width - width);\n int yCoordinate = RandomUtils.uniform(random, 0, size.height - height);\n Room newRoom = new Room(new Position(xCoordinate, yCoordinate), new Size(width, height));\n drawRoom(newRoom);\n return newRoom;\n }", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine().trim();\n while (name.length() > 0) {\n if(name.equals(\"space gun\")){\n room.add(new SpaceGun());\n } else if(name.equals(\"lightsaber\")){\n room.add(new LightSaber());\n } else if(name.equals(\"pillow\")){\n room.add(new Pillow());\n } else if(name.equals(\"blankets\")){\n room.add(new Blankets());\n } else if(name.equals(\"Charlie McDowell\")){\n room.add(new HorrificBeast());\n } else if(name.equals(\"cryonics files\")){\n room.add(new CryoFiles());\n } else if(name.equals(\"coding transcripts\")){\n room.add(new CodingTranscripts());\n } else if(name.equals(\"bananas\")){\n room.add(new Bananas());\n } else if(name.equals(\"transmitter\")){\n room.add(new Transmitter());\n } else {\n room.add(new Thing(name));\n }\n name = in.nextLine().trim(); \n }\n }", "public String getRoom() {\n\t\treturn room;\n\t}", "public void addData(){\n Room room = new Room(\"1234\", null,0);\n roomsRef.add(room)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n Log.d(TAG, \"DocumentSnapshot added with ID: \" + documentReference.getId());\n Toast.makeText(MainActivity.this,\"Success\",Toast.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Error adding document\", e);\n Toast.makeText(MainActivity.this,\"Failed\",Toast.LENGTH_LONG).show();\n }\n });\n\n Task<QuerySnapshot> sp = roomsRef.whereEqualTo(\"roomId\", \"1234\").get();\n }", "public Room getRoom() {\n return currentRoom;\n }", "public Room getRoom(){\n\t\treturn this.room;\n\t}", "public int getRoomId() {\n return roomId;\n }", "@Override\n\tpublic int addJewel(Jewel jewel) {\n\t\treturn jewelDao.insert(jewel);\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 public Room getRoom(String roomId) {\n return getRoom(roomId, true);\n }", "public void setRoom(Room room) {\n currentRoom = room;\n }", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine();\n while (name.length() > 0) {\n if(name.equals(\"sword\")){\n room.add(new Sword());\n }\n else{\n room.add(new Thing(name));\n }\n name = in.nextLine();\n \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 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 String getRoomId() {\n return roomId;\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "private void loadRoom(Room room) {\n if(currentRooms.isEmpty()) {\n // Add the passed-in Room to the list of selected Rooms.\n this.currentRooms.add(room);\n // Load the data from the Room into the InfoPanel.\n this.roomNameField.setText(room.getName());\n this.includeField.setText(room.getInclude());\n this.inheritField.setText(room.getInherit());\n this.streetNameField.setSelectedItem(room.getStreetName());\n this.determinateField.setText(room.getDeterminate());\n this.lightField.setText(room.getLight());\n this.shortDescriptionField.setText(room.getShort());\n this.longDescriptionField.setText(room.getLong());\n updateExitPanel(room);\n } else {\n this.currentRooms.add(room);\n }\n }", "public Integer getRoomId() {\n return roomId;\n }", "public void addRoomList(Detail list) {\n\t\t\tRoomList = list;\r\n\t\t}", "public int getRoom(){\n\t\treturn room;\n\t}", "public Room room() {\r\n\t\treturn this.room;\r\n\t}", "long getRoomId();", "public Room getCurrentRoom()\n {\n return currentRoom;\n }", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public long getRoomId() {\n return roomId_;\n }", "public void addItem(Item toAdd) throws ImpossiblePositionException, NoSuchItemException {\n int itemX = (int) toAdd.getXyLocation().getX();\n int itemY = (int) toAdd.getXyLocation().getY();\n ArrayList<Item> rogueItems = getRogue().getItems();\n int itemFound = 0;\n if ((itemX >= getWidth() - 1) || (itemX <= 0) || (itemY >= getHeight() - 1)\n || (itemY <= 0) || !(roomDisplayArray[itemY][itemX].equals(\"FLOOR\"))) {\n throw new ImpossiblePositionException();\n } else {\n roomItems.add(toAdd);\n }\n for (Item singleItem : rogueItems) {\n if (toAdd.getId() == singleItem.getId()) {\n itemFound = 1;\n }\n }\n if (itemFound != 1) {\n throw new NoSuchItemException();\n }\n\n }", "@Override\n public int getRoomId() {\n return room.getRoomId();\n }", "public int addRoomId() throws NumberFormatException, IOException {\n\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Room ID:\");\n\t\t\tint input = Integer.parseInt(br.readLine());\n\n\t\t\tif(input == 0) {\n\t\t\t\treturn input;\n\n\t\t\t} else if (input < 100 || input > 999) {\n\t\t\t\tSystem.out.println(\"Please enter a valid room number between 100 and 999 or enter '0' to exit to Menu\");\n\t\t\t\tcontinue;\n\n\t\t\t} else if (rooms.containsKey(input)) {\n\t\t\t\tSystem.out.println(\"This ID has already been allocated to a room!\");\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\treturn input;\n\t\t}\t\n\n\t}", "public void setLastRoom(final Room pLastRoom){this.aLastRooms.push(pLastRoom);}", "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 }", "@Override\n public Reservation createReservation(String reservationID, Reservation newReservation) {\n Reservation reservation = new Reservation(getHostName(), getHostAddress(), getUID(), generateNextNumber());\n\n //Plan: Add new reservation into the list, then update it on firebase\n reservationList.add(reservation);\n\n //Get reference to reservation\n DatabaseReference userSpaceRef = FirebaseDatabase.getInstance().getReference().child(\"Host/\" + UID);\n return null;\n }", "public int getRoomID() {\r\n\t\treturn this.room.getID();\r\n\t}", "public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }", "public int getRoomID() {\n return roomID;\n }", "void setRoomId(String roomId);", "public void createRoom(String roomHost, String roomName) throws IOException {\n ChatRoom newRoom = new ChatRoom(roomHost, roomName);\n chatRooms.add(newRoom);\n }", "public Long getRoomId() {\n\t\treturn roomId;\n\t}", "public Room getRoom(String name) {\n\n if (room1.getGuest() != null && room1.getGuest().getName().equals(name)) { // If room 1 has a guest and that guest has the name of the guest being requested\n\n return room1;\n\n } else if(room2.getGuest() != null && room2.getGuest().getName().equals(name)) { // If room 2 has a guest and that guest has the name of the guest being requested\n\n return room2;\n\n }\n\n else return null; // If no guest with such name occupies room\n }", "public abstract void enterRoom();", "public Room findRoom(String roomName){\n for (Room r : roomList){\n if (r.getRoomName().equals(roomName)){\n return r;\n }\n }\n return null;\n }", "public Room() {\n this(\"room\", null);\n }", "@Override\n public Room makeRoom() {\n return new MagicRoom();\n }", "@Override\r\n\t@RequestMapping(\"/add\")\r\n\tpublic Message add(MeetingDetail meetingDetail) {\n\t\treturn new Message(dao.add(meetingDetail));\r\n\t}", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "@Override\n\tpublic Game add(Game g) {\n\t\treturn null;\n\t}", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public ChatRoom createRoom(String room) {\r\n ChatRoom chatRoom = new ChatRoom(serviceAddress.withLocal(room), null, xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n return chatRoom;\r\n }", "public void setRoom(String room) {\n\t\tthis.room = room;\n\t}", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public Room getCurrentRoom() {\r\t\treturn currentRoom;\r\t}", "String getRoomId();", "public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }", "public void addReservation(Reservation reservation) {\n reservations.add(reservation);\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 Reservation addResv(String roomNo, String roomType,int gID, int aNo, int kNo, LocalDate dIn, LocalDate dOut,\n\t\t\t\t\t\t\t\t String rStatus, LocalTime time) {\n\n\t\tint newResvNo =0;\n\t\tReservation newResv = null;\n\t\tif (checkGap() == false) { //no gap, add resv at back\n\t\t\tnewResvNo = numOfReservation + 1;\n\t\t}\n\t\telse { //add resv in between\n\t\t\tfor (int i = 0; i < rList.size(); i++) {\n\t\t\t\tif (rList.get(i).getResvNo() != (i+1)) {\n\t\t\t\t\tnewResvNo = i+1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tnewResv = new Reservation(newResvNo, roomNo, roomType, gID, aNo, kNo, dIn, dOut, rStatus, time);\n\t\t\trList.add(newResv);\n\t\t\tnumOfReservation++;\n\t\t\tSystem.out.println(\"Total number of reservations: \" + numOfReservation);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newResv;\n\t}", "@Override\n\tpublic int addImgRoom(int room_id, String name_img, String type_img) {\n\t\treturn roomDao.addImgRoom(room_id, name_img, type_img);\n\t}", "public static Room newRoom(int random){\n String nameRoom = \"\";\n int monsterAmount = 0;\n\t\tMonster monster;\n MonsterFactory monsterFac = new MonsterFactory();\n\t\tmonster= monsterFac.buildMonster((int)(Math.random() * 3) + 1);\n boolean createHealingPot = false;\n boolean createPitRoom = false;\n boolean createPillar = false;\n boolean createEntrance = false;\n boolean createExit = false;\n boolean createVisionPot = false;\n\n switch (random){\n case 1:\n \tnameRoom = \"The Entrance room\";\n \tmonsterAmount = 0;\n createEntrance = true;\n break;\n\n case 2:\n \tnameRoom = \"The Exit room\";\n \tmonsterAmount = 0;\n createExit = true;\n break;\n\n case 3:\n \tnameRoom = \"The room\";\n \tmonsterAmount = 1; //THIS ROOM WILL HAVE 1 MONSTER\n break;\n \n case 4:\n \tnameRoom = \"The Healing Potion room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n createHealingPot = true;\n break;\n \n case 5:\n \tnameRoom = \"The Pit room\";\n \tmonsterAmount = 0;\n createPitRoom = true;\n break;\n\n case 6:\n \tnameRoom = \"The Pillar room\";\n \tmonsterAmount=(int)(Math.random() * 1) + 0;\n \tcreatePillar = true;\n break;\n \n case 7:\n \tnameRoom = \"The Vision Potion room\";\n \tmonsterAmount=0;\n createVisionPot=true;\n break;\n }\n \n if(monsterAmount <= 0 ) \n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monsterAmount,createVisionPot);\n else\n return new Room(nameRoom,createHealingPot, createPitRoom, createEntrance, createExit, createPillar, monster, monsterAmount,createVisionPot);\n\n }" ]
[ "0.741464", "0.70212364", "0.67620915", "0.6644688", "0.65592664", "0.65178746", "0.65147555", "0.6426298", "0.63908195", "0.63723165", "0.63667417", "0.63029426", "0.6268732", "0.6249634", "0.6249634", "0.6233701", "0.6203063", "0.6201036", "0.6190259", "0.6138488", "0.61088735", "0.60357577", "0.59221005", "0.5911194", "0.5891877", "0.58840847", "0.5870941", "0.58660555", "0.5839905", "0.58303976", "0.58181846", "0.58164966", "0.5812537", "0.5805556", "0.5791288", "0.57742125", "0.5767242", "0.57446116", "0.5740866", "0.5735703", "0.5718261", "0.56939703", "0.5689434", "0.5652303", "0.56458145", "0.56450784", "0.5638117", "0.5611752", "0.5610853", "0.56088597", "0.56069875", "0.5589724", "0.55846465", "0.55734", "0.557131", "0.5570017", "0.5560926", "0.5558181", "0.55564064", "0.55464876", "0.5545505", "0.553923", "0.5533708", "0.55335677", "0.5515581", "0.5502521", "0.5499125", "0.5497618", "0.5481174", "0.5476479", "0.5474614", "0.54711396", "0.54707676", "0.5459802", "0.5459589", "0.5453358", "0.5447737", "0.5443736", "0.543459", "0.5433544", "0.5423879", "0.5414174", "0.5407252", "0.5405508", "0.54028594", "0.53979075", "0.53955626", "0.5389026", "0.53801346", "0.5378529", "0.53779787", "0.5376759", "0.5373512", "0.53723794", "0.5372141", "0.5363279", "0.53580856", "0.5356377", "0.5347841", "0.53463304", "0.5345507" ]
0.0
-1
Add a new one block if no room.
public Node<T> put(T element) throws InterruptedException { do { // Get a free node. Node<T> freeNode = getFree(); if (freeNode != null) { // Attach the element. return freeNode.attach(element); } else { // Block. waitForFree(); } // Forever. } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}", "public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }", "public void addBlock(Block block) {\n\t\tblock.setId(this.generateID());\n\t\tthis.blocks.put(block.getId(), block);\n\t}", "public void addBlock(Block block){\n\t\tblocks.addElement(block);\n\t}", "public void addBlock(Block block) {\n this.blocks.add(block);\n }", "public abstract void appendBlock();", "public void addBlock(Block block) {\r\n if (null == blocks) {\r\n blocks = new ArrayList<Block>();\r\n }\r\n blocks.add(block);\r\n maxEntries += block.getHowMany();\r\n }", "public void addOne()\n\t{\n\t\tBlock b = new Block(p1.tail.oldPosX, p1.tail.oldPosY, p1.tail, this);\n\t\tBlock b2 = new Block(p2.tail.oldPosX, p2.tail.oldPosY, p2.tail, this);\n\t\t\n\t\tb.setFill(Color.RED.desaturate());\n\t\tb2.setFill(Color.BLUE.desaturate());\n\n\t\tp1.tail = b;\n\t\tp2.tail = b2;\n\t\taddBlock(b);\n\t\taddBlock(b2);\n\t}", "public void addExistingBlockAsProgram(IGUIBlock block) {\n Block toAdd = blockLink.getBlockFromGUIBlock(block);\n blockHandler.addToPA(toAdd);\n }", "public void addBlock(Block newBlock) {\n\t\tBLOCK_LIST.add(newBlock);\n\t\tSPRITE_LIST.add(newBlock);\n\t}", "public void blockAdded(Response block) {\n try {\n long id = block.getId(\"block\");\n blockList.add(0, block);\n blockMap.put(block.getId(\"block\"), block);\n fireTableRowsInserted(0, 0);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }", "Block createBlock();", "protected abstract int addBlock(Collection<Record> candidates,\n Map.Entry block);", "private boolean AddBlock(String data, int difficulty) {\n boolean status = false;\n try {\n //verify the client signature\n status = VerifyInput(data);\n if (status) {\n Block b1 = new Block(theBlockChain.getLatestBlock().getIndex() + 1, theBlockChain.getTime(), data, difficulty);\n theBlockChain.addBlock(b1);\n }\n } catch (NoSuchAlgorithmException ex) {\n System.out.println(\"NoSuchAlgorithmException\");\n } catch (UnsupportedEncodingException ex) {\n System.out.println(\"UnsupportedEncodingException\");\n }\n return status;\n }", "public void addPendingBlock(Block block) {\n\n\t\tList<Block> sameIndexBlocks = pendingBlocks.get(block.getIndex());\n\t\tif(sameIndexBlocks == null) {\n\t\t\tsameIndexBlocks = new ArrayList<Block>();\n\t\t\tpendingBlocks.put(block.getIndex(), sameIndexBlocks);\n\t\t}\n\t\tsameIndexBlocks.add(block);\n\t}", "public void addBlock(Block b) {\n String previousHash = \"\";\n if (blockChain.size() == 0) {\n previousHash = \"\";\n } else {\n previousHash = getLatestBlock().proofOfWork();\n }\n b.previousHash = previousHash;\n chainHash = b.proofOfWork();\n blockChain.add(b);\n }", "protected static Block createEmptyBlock(AST ast) {\n\t\treturn ast.newBlock();\n\t}", "public void addIntoQueue(Integer block_id){\n if(this.queue_set){\n if(this.queue.contains(block_id) == false){\n this.queue.add(block_id);\n }\n }\n }", "public void testAddBlock_NoGame() throws Exception {\n try {\n dao.addBlock(1, 1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }", "@Override\n\tpublic void addBlock(Block block) {\n\t\tem.persist(block);\n\t}", "public void addBlock(int x, int y) {\r\n\t\tthis.blockMap.add(new Block(x, y));\r\n\t}", "public void fillBlock(TYPE typeOfBlock){\n isFull=true;\n type=typeOfBlock;\n return;\n }", "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "private void createBlock() {\n\t\tblock = new Block(mouseX, mouseY, 25, 25);\r\n\t\tblock.addObserver(this);\r\n\t\tblock.start();\r\n\t\t// System.out.println(\"Block created (at Model.createBlock)\");\r\n\t}", "public static void addFullWall(Block fullWall) {\r\n\t\t_fullWalls.add(fullWall);\r\n\t}", "public void begin(){\n\t\tTransaction block = new Transaction();\n\t\tblock.setPrev(blocks.getLast());\n\t\tblocks.add(block);\n\t}", "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 }", "Tetrisblock()\n {\n newblockparam();\n newmapparam();\n setboundary();\n }", "@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\n public void onBlockPlace(BlockPlaceEvent event) {\n if (event.getBlock().getType() == Material.IRON_BLOCK) {\n\n running = true;\n\n Location location = event.getBlock().getLocation();\n int size = Options.ARENA_SIZE;\n\n // Set our Y to where we won't collide with anything.\n location.setY(location.getWorld().getHighestBlockYAt(location));\n\n for (int x = -size / 2; x <= size / 2; x++) {\n for (int z = -size / 2; z <= size / 2; z++) {\n int maxY = (x == -size / 2 || z == -size / 2 || x == size / 2 || z == size / 2) ? 5 : 1;\n\n for (int y = 0; y < maxY; y++) {\n Block block = location.clone().add(x, y, z).getBlock();\n\n if (y == 0) {\n block.setType(Material.NETHERRACK);\n } else {\n block.setType(Material.IRON_FENCE);\n }\n }\n }\n }\n\n Player player = event.getPlayer();\n\n player.getInventory().clear();\n player.getActivePotionEffects().clear();\n player.setGameMode(GameMode.ADVENTURE);\n player.teleport(location.clone().add(5, 1, 0));\n\n player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(ChatColor.RED + \"An arena appears...\"));\n\n Options.KIT_ITEMS.forEach(itemStack -> player.getInventory().addItem(itemStack.clone()));\n \n updateArmor(player);\n\n Bukkit.getScheduler().scheduleSyncDelayedTask(Plugin.getInstance(), () -> {\n Location spawnLocation = location.clone().add(0, 1, 0);\n\n SpawnControl point = new SpawnControl(spawnLocation);\n NPCController controller = new NPCController(player.getUniqueId(), point);\n\n NPCRegistry.getInstance().register(controller);\n });\n\n event.setBuild(false);\n }\n }", "public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}", "BAnyBlock createBAnyBlock();", "private static boolean blockBody_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"blockBody_0\")) return false;\n blockBody_0_0(b, l + 1);\n return true;\n }", "public void PlantMe(Block block){\n \tplugin.getReplant().add(block);\r\n \t\t//run the timer to load the block\r\n \t\r\n \tif(plugin.getTreeplant_Timer().getPoolSize() < plugin.getTreeplant_Timer().getMaximumPoolSize()){\r\n \t\tplugin.getTreeplant_Timer().schedule(new Runnable() {\r\n \t\t\t\tpublic void run() {\r\n \t\t\t\t\tif(!(plugin.getReplant().isEmpty())){\r\n \t\t\t\t\t\tBlock loadedBlock = plugin.getReplant().get(0);\r\n \t\t\t\t\t\t//remove it from the list\r\n \t\t\t\t\t\tplugin.getReplant().remove(0);\r\n \t\t\t\t\t\t//protect it\r\n \t\t\t\t\t\tProtectMe(loadedBlock);\r\n \t\t\t\t\t\t//made into a sap\r\n \t\t\t\t\t\tif( (loadedBlock.getType().equals(Material.AIR)) || (loadedBlock.getType().equals(Material.FIRE)) ) //just incase it was on fire\r\n \t\t\t\t\t\t\tloadedBlock.setType(Material.SAPLING);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t/* No longer needed! Didn't realized leaves light blocking changed way back when.\r\n \t\t\t\t\t\t * for(int i=loadedBlock.getY(); i < 128; i++){\r\n \t\t\t\t\t\t\t//delete all the leaves in a line to the sky limit\r\n \t\t\t\t\t\t\tif(loadedBlock.getType()==Material.LEAVES){\r\n \t\t\t\t\t\t\t\t//it's a leaf delete it\r\n \t\t\t\t\t\t\t\tloadedBlock.setType(Material.AIR);\r\n \t\t\t\t\t\t\t\t//update on server | Not needed?\r\n \t\t\t\t\t\t\t\t//etc.getServer().setBlock(leafToDelete);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t//go up one\r\n \t\t\t\t\t\t\tloadedBlock = loadedBlock.getFace(BlockFace.UP);\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}, plugin.getdelayTime(), TimeUnit.MILLISECONDS);\r\n \t}\r\n \t}", "public static void addRespawningBlock(Block block, int seconds) {\n FileConfiguration config = MyZ.instance.getBlocksConfig();\n ConfigurationSection section = config.createSection(block.getWorld().getName() + \"_\" + block.getX() + \"_\" + block.getY() + \"_\"\n + block.getZ());\n section.set(\"respawn\", true);\n section.set(\"type\", block.getType().toString());\n section.set(\"data\", block.getData());\n section.set(\"time\", ticks + seconds);\n MyZ.instance.saveBlocksConfig();\n }", "protected void enterBlockStmt(BlockStmt blockStmt) {\n enclosingBlocks.addFirst(blockStmt);\n if (blockStmt.introducesNewScope()) {\n pushScope();\n }\n }", "public void FinishTheGame(){\r\n if(blockList.HasNoBlocks()){\r\n gamePage.NextLevel();\r\n }\r\n }", "private void createBlocks(){\n for (int row=0; row < grid.length; row++) \n {\n for (int column=0; column < grid[row].length; column++)\n {\n boolean player = false;\n boolean walkable;\n \n switch (grid[row][column]){\n case(0) : \n returnImage = wall; \n walkable = false;\n break;\n case(2) : \n returnImage = start; \n walkable = true;\n player = true;\n break;\n case(4) : \n returnImage = finish; \n walkable = true;\n break;\n \n default :\n returnImage = pad; \n walkable = false;\n }\n \n \n Block blok;\n try {\n if(player==true) \n { \n blok = new Block(returnImage, blockSize, true);\n blok.setTopImage(held);\n }else\n {\n blok = new Block(returnImage, blockSize, false);\n }\n blocks.add(blok);\n } catch (Exception e) {\n \n }\n } \n \n }\n \n }", "public static void addDespawningBlock(Block block, int seconds) {\n FileConfiguration config = MyZ.instance.getBlocksConfig();\n ConfigurationSection section = config.createSection(block.getWorld().getName() + \"_\" + block.getX() + \"_\" + block.getY() + \"_\"\n + block.getZ());\n section.set(\"respawn\", false);\n section.set(\"type\", block.getType().toString());\n section.set(\"data\", block.getData());\n section.set(\"time\", ticks + seconds);\n MyZ.instance.saveBlocksConfig();\n }", "public Block createPath(Block currentBlock){\n\n\t\tint indexOfNeighbouringBlock = (int) (Math.random()*RoomGen.neighbouringBlocks.get(currentBlock).size());\n\t\tint size = RoomGen.neighbouringBlocks.get(currentBlock).size();\n\t\t\n\t\tif(!path.contains(currentBlock)){\n\t\t\tpath.add(currentBlock);\n\t\t}\n\t\t\n\t\t//set the next index to make sure that elements of path are distinct\n\t\tSystem.out.println(\"size of neighbours: \" + RoomGen.neighbouringBlocks.get(currentBlock).size());\n\t\tif(path.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock))){\n\t\t\tif(indexOfNeighbouringBlock != 0 || indexOfNeighbouringBlock == RoomGen.neighbouringBlocks.get(currentBlock).size() - 1){\n\t\t\t\tindexOfNeighbouringBlock = indexOfNeighbouringBlock-1;\n\t\t\t}else{\n\t\t\t\tindexOfNeighbouringBlock = indexOfNeighbouringBlock+1;\n\t\t\t}\n\t\t}else{\t\t\n\t\t}\n\t\tBlock next = new Block(0,0,0,0);\n\t\t\n\t\t//Initialise next block\n\t\tif(unfinishedDoors.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock))){\n\t\t\tnext = RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock);\n\t\t}else{\n\t\t\tfor(int i = 0; i<RoomGen.neighbouringBlocks.get(currentBlock).size(); i++){\n\t\t\t\tif(unfinishedDoors.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(i))){\n\t\t\t\t\tnext = RoomGen.neighbouringBlocks.get(currentBlock).get(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(i==RoomGen.neighbouringBlocks.get(currentBlock).size()-1){\n\t\t\t\t\treturn currentBlock;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\taddDoor(currentBlock, next);\n\t\t\n\t\tcurrentBlock.addDoor();\n\t\tnext.addDoor();\n\t\t\n\t\t//if current block reaches full door potential when adding door to next,\n\t\t//add it to the list of finished blocks and remove it from the list of unfinished ones\n\t\tif(currentBlock.getPotentialDoorNum() == currentBlock.getCurrentDoorNum()){\n\t\t\tfinishedDoors.add(currentBlock);\n\t\t\tfor(int i = 0; i< unfinishedDoors.size(); i++){\n\t\t\t\tif(unfinishedDoors.get(i).equals(currentBlock)){\n\t\t\t\t\tunfinishedDoors.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//path ends if next reaches full door potential when adding door from b to next\n\t\t//next is put to finished list and removed from unfinished list\n\t\tif(next.getPotentialDoorNum() == next.getCurrentDoorNum()){\n\t\t\tfinishedDoors.add(next);\n\t\t\tpath.add(next);\n\t\t\t\n\t\t\tfor(int i = 0; i< unfinishedDoors.size(); i++){\n\t\t\t\tif(unfinishedDoors.get(i).equals(next)){\n\t\t\t\t\tunfinishedDoors.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn next;\n\t\t}\n\t\t//otherwise the path continues\n\t\telse{\n\t\t\treturn createPath(next);\n\t\t}\n\t\t}", "void addBlock(final Block block, final int i) {\n days.get(i).addBlock(block);\n }", "void buildBlock(Tile t);", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "private static boolean blockBody_0_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"blockBody_0_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = blockBody_0_0_0(b, l + 1);\n if (!r) r = blockBody_0_0_1(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "private void addStackBlocks() {\n\n for (int x = numBlocks; x > 0; x--) {\n\n double blockHeight = totalBLockHeight / numBlocks;\n double blockWidthChange = (maxBlockWidth - minBlockWidth) / numBlocks;\n double blockWidth = minBlockWidth + ((x - 1) * blockWidthChange);\n\n TowerBlock newBlock = new TowerBlock(blockWidth, blockHeight, x);\n towerOne.push(newBlock);\n\n }\n addBlocks = false;\n\n }", "public void addBlockList(int n) {\n BlockList.add(n);\r\n }", "public void addBlock(Block block)\n {\n SolrInputDocument solr_doc = new SolrInputDocument();\n solr_doc.setField(\"type\",\"Block\");\n solr_doc.setField(\"hash\", block.getHash_block());\n solr_doc.setField(\"block_num\", block.getBlock_num());\n solr_doc.setField(\"version\", block.getVersion());\n solr_doc.setField(\"transaction_merkle_root\", block.getTransac_merkle_root());\n solr_doc.setField(\"timestamps\", block.getTimestamp());\n solr_doc.setField(\"datetime\", block.getDatetime());\n solr_doc.setField(\"difficulty\", block.getDifficulty());\n solr_doc.setField(\"cumulative_difficulty\", block.getCumulative_difficulty());\n solr_doc.setField(\"nonce\", block.getNonce());\n solr_doc.setField(\"how_much_transaction\", block.getHow_much_transaction());\n solr_doc.setField(\"value_out\", block.getValue_out());\n solr_doc.setField(\"block_fee\", block.getBlock_fee());\n solr_doc.setField(\"avg_coin_out\", block.getAvg_coin_age());\n solr_doc.setField(\"coin_days_destroyed\", block.getCoin_days_destroyed());\n solr_doc.setField(\"cumulative_coin_days_destroyed\", block.getCumulative_coin_days_destroyed());\n\n try {\n client.add(solr_doc);\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n\n commit();\n }", "public void putBlock(JsonObject block){\n blocks.put(Hash.getHashString(block.toString()), block);\n }", "public void addFirst(MemoryBlock block) {\n\t\tNode clone = tail.next; \n\t\tNode newNode = new Node(block);\n\t\tnewNode.next = clone;\n\t\tnewNode.previous = tail;\n\t\ttail.next = newNode;\n\t\tclone.previous = newNode;\n\t\tsize++;\n\t}", "public void setBlockroomid(Long newVal) {\n if ((newVal != null && this.blockroomid != null && (newVal.compareTo(this.blockroomid) == 0)) || \n (newVal == null && this.blockroomid == null && blockroomid_is_initialized)) {\n return; \n } \n this.blockroomid = newVal; \n blockroomid_is_modified = true; \n blockroomid_is_initialized = true; \n }", "synchronized void putBlock(ICBlock block) {\n mQueue.add(block);\n }", "public void append(Block.Entry entry) {\r\n\t\tstmts.add(new Entry(entry.code,entry.attributes()));\r\n\t}", "public void setBlockroomid(long newVal) {\n setBlockroomid(new Long(newVal));\n }", "Tetrisblock2()\n {\n newblockparam();\n newmapparam();\n setboundary();\n }", "public abstract void generateNextBlock();", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "private static void registerBlock(Block b)\n\t{\n\t}", "private void Management_Block(Block block){\n\t\t\n\t\t switch(block.BlockState){\n\t\t \n\t\t case 0: // player is not lost game. continue with tile micro managment\n\t\t\t \n\t\t\t for (Tile tile : block.Wall){\t\t\n\t\t\t\t \n\t\t\t\t Rectangle rectTile = new Rectangle();\n\t\t\t\t rectTile = tile.getRectTile();\n\t\t\t\t boolean CoinCollision = CollisionDetection(playerUser.bounds,rectTile);\n\t\t\t\t \n\t\t\t\t switch(tile.state)\n\t\t\t\t {\n\t\t\t\t \n\t\t\t\t case 0: // no collision, show the block\n\t\t\t\t\t \n\t\t\t\t\t batch.draw(tile.getBlockImg(), rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\n\t\t\t\t\t \n\t\t\t\t\t if (PauseGame) \n\t\t\t\t\t\t continue;\n\t\t\t\t\t\t \n\t\t\t\t\t\t if (CoinCollision==true){\n\t\t\t\t\t\t\t tile.state++; \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t\t\t\n\t\t\t\t\t\t }\t\t\t\t\t\t \n\t\t\t\t\t\t else if (ThisGameRound==GameState.Running){\t \n\t\t\t\t\t\t\t if (block.Passed==false){\n\t\t\t\t\t\t\t\t if (playerUser.position.x > block.Wall.get(0).rectTile.x){\n\t\t\t\t\t\t\t\t\t levelbuilder.gamePoints = levelbuilder.gamePoints + 1;\n\t\t\t\t\t\t\t\t\t fntScore.setBitmapText(\"Score: \" + String.valueOf(levelbuilder.gamePoints));\n\t\t\t\t\t\t\t\t\t block.Passed=true;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else if (block.Passed==true){\n\t\t\t\t\t\t\t\t //do nothing.\n\t\t\t\t\t\t\t }\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t break;\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t case 1: \n\t\t\t\t\t \n\t\t\t\t\t batch.draw(tile.getBlockImg(),rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\t\t\t\t\t \n\t\t\t\t\t // if there is a collotion, draw it one time only \t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t// collision, but player has key\n\t\t\t\t\t\t PhoneDevice.Vibrate();\t\n\t\t\t\t\t\t if ((playerUser.color==block.color) || (playerUser.color==Color.ALL)){\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\ttile.setBlockImg(tile.BlockType);\t\n\t\t\t\t\t \t\ttile.PlayBreakThoughSound();\t\n\t\t\t\t\t\t }\n\t\t\t\t\t\t // collision, but player dont have a key: break from tile loop and \n\t\t\t\t\t \t // draw block crash effect\n\t\t\t\t\t\t else if (DEBUG==false){\n\t\t\t\t\t\t\t block.BlockState=1;\n\t\t\t\t\t\t\t ThisGameRound = GameState.GameOver;\t\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t }\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t tile.pe = Effects.setNewEffect(enumEffects.TileDistruction, block.color);\t\t\t\t\t\t \n\t\t\t\t\t tile.pe.setPosition(tile.getRectTile().x,\n\t\t\t \t\t\t\ttile.getRectTile().y+tile.Height/2);\t\n\t\t\t\t\t tile.pe.start();\t\n\t\t\t\t\t tile.state++;\t\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t break;\n\t\t\t\t\t \n\t\t\t\t case 2:\n\t\t\t\t\t // continue to draw the effect: no matter collision result\n\t\t\t\t\t tile.pe.setPosition(tile.getRectTile().x,\n\t\t\t \t\t\t\ttile.getRectTile().y+tile.Height/2);\t\n\t\t\t\t\t \n\t\t\t\t\t tile.pe.update(Gdx.graphics.getDeltaTime());\n\t\t\t\t tile.pe.draw(batch,Gdx.graphics.getDeltaTime());\t\t\t\t \t\t\t\t\t\n\t\t\t\t\t break;\n\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 break;\n\t\t case 1: // player hit the wall without key\t\t\n\t\t\t \n\t\t\t for (Tile tile : block.Wall){\t\t\n\t\t\t\t \n\t\t\t\t Rectangle rectTile = new Rectangle();\n\t\t\t\t rectTile = tile.getRectTile();\t\t\t\t\n\t\t\t\t batch.draw(tile.getBlockImg(), rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t block.PlayCrashSound();\t\t\n\t\t\t block.pe = Effects.setNewEffect(enumEffects.Crash, block.color);\t\t\t\t\t\t \n\t\t\t block.pe.setPosition(playerUser.bounds.x + playerUser.bounds.width,\n\t\t\t\t\t playerUser.bounds.y + playerUser.bounds.height/2);\t\n\t\t\t block.pe.start();\n\t\t\t block.BlockState++;\n\t\t\t break;\n\t\t\t \n\t\t case 2:\n\t\t\t \n\t\t\t for (Tile tile : block.Wall){\t\t\n\t\t\t\t \n\t\t\t\t Rectangle rectTile = new Rectangle();\n\t\t\t\t rectTile = tile.getRectTile();\t\t\t\t\n\t\t\t\t batch.draw(tile.getBlockImg(), rectTile.x,rectTile.y,rectTile.width,rectTile.height);\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t block.pe.update(Gdx.graphics.getDeltaTime());\n\t\t\t block.pe.draw(batch,Gdx.graphics.getDeltaTime());\t\n\t\t\t break;\n\t\t }\t\t\n\t }", "Block saveBlock(Block block) throws BlockExistsException;", "public Builder clearNewBlock() {\n if (newBlockBuilder_ == null) {\n newBlock_ = null;\n onChanged();\n } else {\n newBlockBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000002);\n return this;\n }", "public void addSelectionToNewBlockingRegion() {\r\n \t\tObject[] cells = graph.getSelectionCells();\r\n \t\t// Data structure to hold all selected stations and their search's key\r\n \t\tHashMap<Object, Object> stations = new HashMap<Object, Object>();\r\n \t\tboolean canBeAdded = true;\r\n \t\tObject regionKey = model.addBlockingRegion();\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tObject stationKey = ((CellComponent) ((JmtCell) cell).getUserObject()).getKey();\r\n \t\t\t\tif (!model.canRegionStationBeAdded(regionKey, stationKey)) {\r\n \t\t\t\t\tcanBeAdded = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tstations.put(cell, stationKey);\r\n \t\t\t\t}\r\n \t\t\t} else if (cell instanceof BlockingRegion) {\r\n \t\t\t\t// A blocking region cannot overlap another one\r\n \t\t\t\tcanBeAdded = false;\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t\t// If blocking region can be added, adds it to graph window, otherwise\r\n \t\t// deletes it\r\n \t\tif (canBeAdded && stations.size() > 0) {\r\n \t\t\tBlockingRegion bl = new BlockingRegion(this, regionKey);\r\n \t\t\tObject[] stationCells = stations.keySet().toArray();\r\n \t\t\tbl.addStations(stationCells);\r\n \t\t\t// Adds stations to blocking region into data structure\r\n \t\t\tfor (Object stationCell : stationCells) {\r\n \t\t\t\tmodel.addRegionStation(regionKey, stations.get(stationCell));\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmodel.deleteBlockingRegion(regionKey);\r\n \t\t}\r\n \t}", "boolean hasNewBlock();", "boolean hasNewBlock();", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "Block create(int xpos, int ypos);", "public Block createBlock(Position pos, List<Stmt> stmts) {\n return xnf.Block(pos, stmts);\n }", "void makeMoreRooms() {\n\t\twhile(rooms.size() < size.maxRooms) {\n\t\t\t\tRoom made;\n\t\t\t\tint height = baseHeight;\n\t\t\t\tint x = random.nextInt(size.width);\n\t\t\t\tint z = random.nextInt(size.width);\n\t\t\t\tint xdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tint zdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tif(bigRooms.use(random)) {\n\t\t\t\t\txdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t\tzdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t}\n\t\t\t\tint ymod = (xdim <= zdim) ? (int) Math.sqrt(xdim) : (int) Math.sqrt(zdim);\n\t\t\t\tint roomHeight = random.nextInt((verticle.value / 2) + ymod + 1) + 2;\n\t\t\t\tmade = new PlaceSeed(x, height, z).growRoom(xdim, zdim, roomHeight, this, null, null);\n\t\t\t}\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Extra Rooms (old)\");\n\t\t}", "public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)\r\n {\r\n super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n// this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n }", "public void placeMandatoryObjects()\r\n {\r\n Random rng = new Random();\r\n //Adds an endgame chest somewhere (NOT in spawn)\r\n Room tempRoom = getRoom(rng.nextInt(dungeonWidth - 1) +1, rng.nextInt(dungeonHeight - 1) +1);\r\n tempRoom.addObject(new RoomObject(\"Endgame Chest\", \"overflowing with coolness!\"));\r\n if (tempRoom.getMonster() != null)\r\n {\r\n tempRoom.removeMonster();\r\n }\r\n tempRoom.addMonster(new Monster(\"Pelo Den Stygge\", \"FINAL BOSS\", 220, 220, 12));\r\n //Adds a merchant to the spawn room\r\n getRoom(0,0).addObject(new RoomObject(\"Merchant\", \"like a nice fella with a lot of goods (type \\\"wares\\\" to see his goods)\"));\r\n }", "public void addBlock(int x, int y, int health) {\r\n\t\tthis.blockMap.add(new Block(x, y, health));\r\n\t}", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "BlockFor createBlockFor();", "public Builder clearNewBlock() {\n if (newBlockBuilder_ == null) {\n newBlock_ = alluxio.proto.journal.File.NewBlockEntry.getDefaultInstance();\n onChanged();\n } else {\n newBlockBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00200000);\n return this;\n }", "public void addBlock(Block block, int damage, long time) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n time += System.currentTimeMillis();\n chunk.addBlockTimer(damage, time, block);\n }", "public void createBlocks(HitListener phl, HitListener blockrmv, HitListener scorelstn) {\n // add all the blocks according to the levelinfo block list.\n for (Block block : this.levelInfo.blocks()) {\n // add the block to the game\n block.addToGame(this);\n // add all the relevant listeners to the blocks.\n block.addHitListener(phl);\n block.addHitListener(blockrmv);\n block.addHitListener(scorelstn);\n // increase the blocks counter by 1.\n this.blockCounter.increase(1);\n }\n }", "public boolean hasNewBlock() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public void setBlock(Block node) {\n setChild(node, 0);\n }", "public void setBlock(Block node) {\n setChild(node, 0);\n }", "private static Block registerBlockWithoutItem(String MODID, String name, Block b){\n return Registry.register(Registry.BLOCK, MODID+\":\"+name, b);\n }", "public void add(Node node) {\n if (node.getId() != null) {\n if (node.getId().equals(\"DestructibleBlock\")) {\n staticElements.add(node);\n destructibleBlocks.add((DestructibleBlock) node);\n }\n if (node.getId().equals(\"IndestructibleBlock\")) {\n staticElements.add(node);\n }\n }\n fieldPane.getChildren().add(node);\n }", "public void putBlock(Block block){\n\t \n\t BlockPosX = 5;\n\t BlockPosY = 0;\n\t int posX = 5;\n\t int posY = 0;\n\t BlockInControl = block;\n\t \n\t int x = 0;\n\t for(int i=0;i<MAX_COL;i++){\n\t\tif(board[posY+1][i] == 1)\n\t\t x = 1;\n\t }\n\t if(x==1)\n\t\tthis.clearBoard();\n\t \n\t \n\t for(int r=0;r<4;r++){\n\t\tfor(int c=0;c<4;c++){\n\t\t if(block.getRowCol(r,c) == 1)\n\t\t\t{\n\t\t\t board[posY][posX]=1;\n\t\t\t \n\t\t\t switch(whichType){\n\t\t\t case 1: color[posY][posX] = 1;\n\t\t\t\tbreak;\n\t\t\t case 2: color[posY][posX] = 2;\n\t\t\t\tbreak;\n\t\t\t case 3: color[posY][posX] = 3;\n\t\t\t\tbreak;\n\t\t\t case 4: color[posY][posX] = 4;\n\t\t\t\tbreak;\n\t\t\t case 5: color[posY][posX] = 5;\n\t\t\t\tbreak;\n\t\t\t case 6: color[posY][posX] = 6;\n\t\t\t\tbreak;\n\t\t\t case 7: color[posY][posX] = 7;\n\t\t\t break;\n\t\t\t }\n\t\t\t}\n\t\t \n\t\t posX++;\n\t\t}\n\t posY++;\n\t posX-=4;\n\t }\n\t}", "@Override\n public boolean moveBlock(Box pos) {\n if (indexPossibleBlock == 1) {\n if (pos.getCounter() == 3)\n completeTowers++;\n pos.build(4);\n } else {\n super.moveBlock(pos);\n if (pos.getCounter() == 4)\n completeTowers++;\n }\n return true;\n }", "private void prepare()\n {\n MazeBlock mazeBlock = new MazeBlock();\n addObject(mazeBlock,25,25);\n MazeBlock mazeBlock1 = new MazeBlock();\n addObject(mazeBlock1,25,75);\n MazeBlock mazeBlock2= new MazeBlock();\n addObject(mazeBlock2,75,75);\n MazeBlock mazeBlock3= new MazeBlock();\n addObject(mazeBlock3,75,125);\n MazeBlock mazeBlock4= new MazeBlock();\n addObject(mazeBlock4,125,125);\n MazeBlock mazeBlock5= new MazeBlock();\n addObject(mazeBlock5,175,125);\n MazeBlock mazeBlock6= new MazeBlock();\n addObject(mazeBlock6,225,125);\n MazeBlock mazeBlock7= new MazeBlock();\n addObject(mazeBlock7,275,125);\n MazeBlock mazeBlock8= new MazeBlock();\n addObject(mazeBlock8,275,175);\n MazeBlock mazeBlock9= new MazeBlock();\n addObject(mazeBlock9,275,225);\n MazeBlock mazeBlock10= new MazeBlock();\n addObject(mazeBlock10,275,275);\n MazeBlock mazeBlock11= new MazeBlock();\n addObject(mazeBlock11,275,325);\n MazeBlock mazeBlock12= new MazeBlock();\n addObject(mazeBlock12,325,325);\n MazeBlock mazeBlock13= new MazeBlock();\n addObject(mazeBlock13,375,325);\n MazeBlock mazeBlock14= new MazeBlock();\n addObject(mazeBlock14,425,275);\n MazeBlock mazeBlock15= new MazeBlock();\n addObject(mazeBlock15,475,275);\n MazeBlock mazeBlock16= new MazeBlock();\n addObject(mazeBlock16,125,325);\n MazeBlock mazeBlock17= new MazeBlock();\n addObject(mazeBlock17,125,375);\n MazeBlock mazeBlock18= new MazeBlock();\n addObject(mazeBlock18,125,425);\n MazeBlock mazeBlock19= new MazeBlock();\n addObject(mazeBlock19,175,425);\n MazeBlock mazeBlock20= new MazeBlock();\n addObject(mazeBlock20,225,425);\n\n EnemyFlyer enemyFlyer = new EnemyFlyer();\n addObject(enemyFlyer,29,190);\n EnemyFlyer enemyFlyer3 = new EnemyFlyer();\n addObject(enemyFlyer3,286,389);\n WalkingEnemy walkingEnemy = new WalkingEnemy(true);\n addObject(walkingEnemy,253,293);\n walkingEnemy.setLocation(125,275);\n WalkingEnemy walkingEnemy2 = new WalkingEnemy(false);\n addObject(walkingEnemy2,28,81);\n walkingEnemy2.setLocation(170,82);\n FinalLevel finalLevel = new FinalLevel();\n addObject(finalLevel, 508, 45);\n Hero hero = new Hero();\n addObject(hero,62,499);\n }", "private void defineDeathBlock() {\r\n BallRemover removeBall = new BallRemover(this);\r\n Rectangle death = new Rectangle(new Point(0, HEIGHT), WITH, 10);\r\n Block deathRegion = new Block(death, Color.black,0);\r\n deathRegion.addHitListener(removeBall);\r\n deathRegion.addToGame(this);\r\n }", "private void addNewRabbit() {\n\t\tRabbitsGrassSimulationAgent rabbit = new RabbitsGrassSimulationAgent(minInitEnergy, maxInitEnergy,\n\t\t\t\tlossRateEnergy, birthThreshold, lossReproductionEnergy, img);\n\t\tboolean isAdded = rabbitSpace.addRabbit(rabbit);\n\t\tif (isAdded) {\n\t\t\trabbitList.add(rabbit);\n\t\t}\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 }", "BranchingBlock createBranchingBlock();", "public boolean hasNewBlock() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }", "public void nextRoom() {\n room++;\n createRoom();\n }", "@SubscribeEvent\n public static void registerBlock(final RegistryEvent.Register<Block> event){\n walletBlock = new WalletBlock();\n event.getRegistry().register(walletBlock);\n }", "public alluxio.proto.journal.File.NewBlockEntry getNewBlock() {\n return newBlock_;\n }", "public Block push(Block blockToAdd){\n\t\tif(tail == (ds.length - 1)){ //checks if stack is full\n\t\t\tSystem.out.println(\"Stack is full!\");\n\t\t\treturn ds[tail];\n\t\t}\n\t\ttail++;\n\t\tds[tail] = blockToAdd;\n\t\treturn blockToAdd;\n\t}", "public void buildBlock(BptSlotInfo slot, IBptContext context)\r\n/* 26: */ {\r\n/* 27:33 */ context.world().d(slot.x, slot.y, slot.z, amq.y.cm, slot.meta);\r\n/* 28: */ }", "public MovementArea(Block currentBlock) {\n\t\tthis.currentBlock=currentBlock;\n\t}", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "public void fillBlock(Block block) {\n\n\t\tfor (int j = block.UpperLeft().x; j <= block.LowerRight().x; j++) { \n\t\t\tfor (int k = block.UpperLeft().y; k <= block.LowerRight().y; k++) { \n\t\t\t\tblocksPosition.put(new Point(j,k), block); \n\t\t\t\t//Blocks.add(block); \n\t\t\t} \n\t\t} \n\t}", "private void placeColorBlock(int row, int column)\n {\n \t// Check that the color block is not being placed in a row or column that does not exist.\n \tif (row < 0 || row >= theGrid.numRows()) {\n \t\tJOptionPane.showMessageDialog(null,\n \t\t\t\t\"Row \" + row + \" does not exist. Skipping placing color block in position (\" + row + \",\" + column + \")\",\n \t\t\t\t\"Error\",\n JOptionPane.WARNING_MESSAGE);\n \t} else if (column < 0 || column >= theGrid.numCols()) {\n \t\tJOptionPane.showMessageDialog(null,\n \t\t\t\t\"Column \" + column + \" does not exist. Skipping placing color block in position (\" + row + \",\" + column + \")\",\n \t\t\t\t\"Error\",\n JOptionPane.WARNING_MESSAGE);\n \t}\n \telse {\n \t\n \t\t// First remove any color block that happens to be at this location.\n \t\tensureEmpty(row, column);\n\n \t\t// Determine the color to use for this color block.\n \t\tColor color = drawingColorChooser.currentColor();\n\n \t\t// Construct the color block and add it to the grid at the\n \t\t// specificed location. Then display the grid.\n \t\tLocation loc = new Location(row, column);\n \t\ttheGrid.add(new ColorBlock(color), loc);\n \t\tdisplay.showLocation(loc);\n \t}\n }", "void removeBlock(Block block);", "public Builder setNewBlock(alluxio.proto.journal.File.NewBlockEntry value) {\n if (newBlockBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n newBlock_ = value;\n onChanged();\n } else {\n newBlockBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00200000;\n return this;\n }" ]
[ "0.6733754", "0.62764734", "0.6210819", "0.6207372", "0.6144666", "0.60849804", "0.60669845", "0.5952387", "0.59366447", "0.5906893", "0.590041", "0.5892574", "0.5781481", "0.5739341", "0.57243", "0.5716569", "0.57094204", "0.57032883", "0.568948", "0.56727344", "0.56155574", "0.5580932", "0.558021", "0.54669154", "0.54601204", "0.54585797", "0.5398879", "0.539421", "0.5389033", "0.5362188", "0.535835", "0.5340564", "0.5333754", "0.5275545", "0.52715933", "0.52578723", "0.5248602", "0.52477723", "0.52474815", "0.5231819", "0.5229667", "0.5227945", "0.5225367", "0.5214582", "0.5212295", "0.52068454", "0.51978374", "0.5183009", "0.5178343", "0.51758647", "0.5164283", "0.51637334", "0.5154834", "0.51538056", "0.5151932", "0.51475453", "0.51409006", "0.513688", "0.51344484", "0.5133901", "0.5127502", "0.5127502", "0.51258135", "0.5118923", "0.5112501", "0.5107293", "0.5103771", "0.50994855", "0.5093879", "0.509343", "0.5086441", "0.5076043", "0.5068385", "0.5067011", "0.5066926", "0.5065882", "0.5063902", "0.5058088", "0.5058088", "0.50578487", "0.5046698", "0.50406206", "0.5037391", "0.50352913", "0.5031054", "0.50299776", "0.50282663", "0.5018978", "0.5018522", "0.50147754", "0.5001843", "0.50002307", "0.4998184", "0.4994549", "0.49865544", "0.49840018", "0.49783728", "0.49757597", "0.49728653", "0.49697748", "0.49656543" ]
0.0
-1
Find the next free element and mark it not free.
private Node<T> getFree() { Node<T> freeNode = head.get(); int skipped = 0; // Stop when we hit the end of the list // ... or we successfully transit a node from free to not-free. while (skipped < capacity && !freeNode.free.compareAndSet(true, false)) { skipped += 1; freeNode = freeNode.next; } if (skipped < capacity) { // Put the head as next. // Doesn't matter if it fails. That would just mean someone else was doing the same. head.set(freeNode.next); } else { // We hit the end! No more free nodes. freeNode = null; } return freeNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int setFirstFree(final T element) {\r\n\t\tfinal int idx = firstFree;\r\n\t\tserializer.setRandomAccess(idx, element);\r\n\t\tfirstFree = getNextPointer(idx);\r\n\t\t// the pointer will be 0 if it was not unlinked before\r\n\t\tif (firstFree == 0) {\r\n\t\t\tfirstFree = idx + 1;\r\n\t\t}\r\n\t\treturn idx;\r\n\t}", "@Override\n public boolean hasNext() {\n // Made into a `while` loop to fix issue reported by @Nim\n // In a while loop because we may find an entry with 'null' in it and we don't want that.\n while (next == null && stop > 0) {\n // Scan to the next non-free node.\n while (stop > 0 && it.free.get() == true) {\n it = it.next;\n // Step down 1.\n stop -= 1;\n }\n if (stop > 0) {\n next = it.element;\n }\n }\n return next != null;\n }", "private void getNextReady() {\n if (!iter.hasNext())\n nextItem = null;\n else {\n Map.Entry<T, Counter> entry = iter.next();\n nextItem = entry.getKey();\n remainingItemCount = entry.getValue();\n }\n }", "@Override\n public T next() {\n setCurrent();\n T returnValue = current;\n current = null;\n elementToRemove = returnValue;\n return returnValue;\n }", "public T next(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\tT passed = current;\r\n\t\t\tif ((currentNode.next==endMarker)&&(currentNode.getLast()==current)){\r\n\t\t\t\tcurrentNode = endMarker;\r\n\t\t\t\tcurrent = null;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\r\n\t\t\tif (currentNode.indexOf(current)==currentNode.getArraySize()-1){\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\t\tidx = 0;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\t\r\n\t\t\tidx++;\r\n\t\t\tcurrent = currentNode.get(idx);\r\n\t\t\treturn passed;\r\n\t\t}", "boolean isFree(Position position);", "private void deleteElement(final int idx) {\r\n\t\tserializer.setRandomAccess(idx, null);\r\n\t\tif (idx < firstFree) {\r\n\t\t\tsetNextPointer(idx, firstFree);\r\n\t\t\tsetPrevPointer(idx, 0);\r\n\t\t\tfirstFree = idx;\r\n\t\t} else {\r\n\t\t\tint free = firstFree;\r\n\t\t\tint lastFree = 0;\r\n\t\t\twhile (free < idx) {\r\n\t\t\t\tlastFree = free;\r\n\t\t\t\tfree = getNextPointer(free);\r\n\t\t\t}\r\n\t\t\tsetNextPointer(lastFree, idx);\r\n\t\t\tsetNextPointer(idx, free);\r\n\t\t}\r\n\t}", "@Override\n public E next() {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n E tmp = array[front];\n array[front] = null;\n size--;\n front = (front + 1) % capacity();\n return tmp;\n }", "private void findNextBlock(MatrixIndex cursor) {\n while (isFreeBlock(cursor) || !inBounds(cursor)){\n incrementMatrixIndex(cursor);\n }\n }", "private void findNext() {\n \tthis.find(true);\n }", "public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "public void free(int reservation) {\n this.freeSet.set(reservation - this.loRange);\n }", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "public E poll() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "public void nextHard() {\n\t\titerator.next();\n\t}", "Object getNextElement() throws NoSuchElementException;", "public final void removeLastElem()\n {\n\n if (m_firstFree > 0)\n {\n m_map[m_firstFree] = null;\n\n m_firstFree--;\n }\n }", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "public int allocate() {\n int setIndex = this.freeSet.nextSetBit(this.lastIndex);\n if (setIndex<0) { // means none found in trailing part\n setIndex = this.freeSet.nextSetBit(0);\n }\n if (setIndex<0) return -1;\n this.lastIndex = setIndex;\n this.freeSet.clear(setIndex);\n return setIndex + this.loRange;\n }", "Chunk<K, V> markAndGetNext() {\n // new chunks are ready, we mark frozen chunk's next pointer so it won't change\n // since next pointer can be changed by other split operations we need to do this in a loop - until we succeed\n while (true) {\n // if chunk is marked - that is ok and its next pointer will not be changed anymore\n // return whatever chunk is set as next\n if (next.isMarked()) {\n return next.getReference();\n }\n // otherwise try to mark it\n else {\n // read chunk's current next\n Chunk<K, V> savedNext = next.getReference();\n\n // try to mark next while keeping the same next chunk - using CAS\n // if we succeeded then the next pointer we remembered is set and will not change - return it\n if (next.compareAndSet(savedNext, savedNext, false, true)) {\n return savedNext;\n }\n }\n }\n }", "protected final int nextIndex() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\tObject[] set = TOrderedHashMap.this._set;\n\t\t\tint i = _index + 1;\n\t\t\twhile (i <= _lastInsertOrderIndex &&\n\t\t\t\t(_indicesByInsertOrder[i] == EMPTY || set[_indicesByInsertOrder[i]] == TObjectHash.FREE || set[_indicesByInsertOrder[i]] == TObjectHash.REMOVED)) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn i <= _lastInsertOrderIndex ? i : -1;\n\t\t}", "@Override\n public E next() throws NoSuchElementException {\n if (j == size) throw new NoSuchElementException(\"No next element\");\n removable = true; // this element can subsequently be removed\n return data[j++]; // post-increment j, so it is ready for future call to next\n }", "public Boolean isFree()\n\t{\n\t\treturn free;\n\t}", "protected Ticket checkNextCompletedTicket()\n\t{\n\t\treturn tickets.peek();\n\t}", "public boolean next() {\n return actualBit < size;\n }", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "private void findNewNextInStack() {\n if (stack.empty()) {\n next = Chunk.NONE;\n return;\n }\n next = stack.pop();\n long valueReference = INVALID_VALUE_REFERENCE;\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n while (next != Chunk.NONE && valueReference == INVALID_VALUE_REFERENCE) {\n if (!stack.empty()) {\n next = stack.pop();\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n } else {\n next = Chunk.NONE;\n return;\n }\n }\n }", "public E relaxedPeek()\r\n/* 267: */ {\r\n/* 268:529 */ E[] buffer = this.consumerBuffer;\r\n/* 269:530 */ long index = this.consumerIndex;\r\n/* 270:531 */ long mask = this.consumerMask;\r\n/* 271: */ \r\n/* 272:533 */ long offset = LinkedArrayQueueUtil.modifiedCalcElementOffset(index, mask);\r\n/* 273:534 */ Object e = UnsafeRefArrayAccess.lvElement(buffer, offset);\r\n/* 274:535 */ if (e == JUMP) {\r\n/* 275:537 */ return newBufferPeek(getNextBuffer(buffer, mask), index);\r\n/* 276: */ }\r\n/* 277:539 */ return e;\r\n/* 278: */ }", "private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }", "private long writeFreeList(long nextPageId) throws IgniteCheckedException {\n long curId = 0L;\n long curPage = 0L;\n long curAddr = 0L;\n\n PagesListMetaIO curIo = null;\n\n try {\n for (int bucket = 0; bucket < buckets; bucket++) {\n Stripe[] tails = getBucket(bucket);\n\n if (tails != null) {\n int tailIdx = 0;\n\n while (tailIdx < tails.length) {\n int written = curPage != 0L ?\n curIo.addTails(pageMem.realPageSize(grpId), curAddr, bucket, tails, tailIdx) :\n 0;\n\n if (written == 0) {\n if (nextPageId == 0L) {\n nextPageId = allocatePageNoReuse();\n\n if (curPage != 0L) {\n curIo.setNextMetaPageId(curAddr, nextPageId);\n\n releaseAndClose(curId, curPage, curAddr);\n }\n\n curId = nextPageId;\n curPage = acquirePage(curId, IoStatisticsHolderNoOp.INSTANCE);\n curAddr = writeLock(curId, curPage);\n\n curIo = PagesListMetaIO.VERSIONS.latest();\n\n curIo.initNewPage(curAddr, curId, pageSize(), metrics);\n }\n else {\n releaseAndClose(curId, curPage, curAddr);\n\n curId = nextPageId;\n curPage = acquirePage(curId, IoStatisticsHolderNoOp.INSTANCE);\n curAddr = writeLock(curId, curPage);\n\n curIo = PagesListMetaIO.VERSIONS.forPage(curAddr);\n\n curIo.resetCount(curAddr);\n }\n\n nextPageId = curIo.getNextMetaPageId(curAddr);\n }\n else\n tailIdx += written;\n }\n }\n }\n }\n finally {\n releaseAndClose(curId, curPage, curAddr);\n }\n\n return nextPageId;\n }", "private Block findFreeBlock(int size) {\n\n // iteration is ordered min ~ max\n for (Block b : freeSpace) {\n if (b.length >= size) \n return b;\n }\n return null;\n }", "@Override\n public T next() {\n if (nextItem == null)\n throw new NoSuchElementException();\n T item = nextItem;\n lastItem = nextItem;\n remainingItemCount.decrement();\n if (remainingItemCount.isZero())\n getNextReady();\n return item;\n }", "public void remove() { \n if (lastAccessed == null) throw new IllegalStateException();\n Node x = lastAccessed.previous;\n Node y = lastAccessed.next;\n x.next = y;\n y.previous = x;\n size--;\n if (current == lastAccessed) current = y;\n else index--;\n lastAccessed = null;\n }", "public long free(long size);", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "private void setFree(final boolean free) {\n\t\tthis.free = free;\n\t}", "public Reservation reserveNext() {\n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n while (true) {\n if (++m_lastReservable >= m_reservables.size()) {\n m_lastReservable = 0;\n }\n \n final Reservable reservable =\n (Reservable)m_reservables.get(m_lastReservable);\n \n if (reservable.reserve()) {\n return reservable;\n }\n }\n }\n }", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public E pollLast() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public void setFree(Boolean free)\n\t{\n\t\tthis.free = free;\n\t}", "public Integer next() {\n int next = fringe.pop();\n List list = neighbors(next);\n for(Object a : list){\n currentInDegree[(int)a]--;\n if(currentInDegree[(int)a]==0){\n fringe.push((int)a);\n }\n }\n return next;\n }", "public int get() {\n if(smallestFreeIndex == max) {\n return -1;\n }\n int num = smallestFreeIndex;\n bitset.set(smallestFreeIndex);\n //Only scan for the next free bit, from the previously known smallest free index\n smallestFreeIndex = bitset.nextClearBit(smallestFreeIndex);\n return num;\n }", "public final boolean tryFree() {\n return free(this);\n }", "public void deleteNext() {\n if(getNext() != null){\n setNext( getNext().getNext());\n }\n }", "public void setFree (int reg) {\n\t\ttemporary[reg].clear();\n\t}", "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "private void primeNext() {\n if (currentIterator != null && currentIterator.hasNext()) {\n return;\n }\n\n // Move to the next collection.\n collectionIndex++;\n\n // If we are out of bounds, we are done.\n if (collectionIndex >= collections.length) {\n currentIterator = null;\n return;\n }\n\n currentIterator = collections[collectionIndex].iterator();\n\n // This iterator may be empty, so just try to prime again.\n primeNext();\n }", "private T unlinkFirst(final int idx) {\r\n\t\tfinal T element = serializer.getRandomAccess(idx);\r\n\t\tfinal int next = getNextPointer(idx);\r\n\t\tfirst = next;\r\n\t\tif (next == -1) {\r\n\t\t\tlast = -1;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(next, -1);\r\n\t\t}\r\n\t\tdeleteElement(idx);\r\n\t\tsize--;\r\n\t\tmodCount++;\r\n\t\treturn element;\r\n\t}", "@Override\n public PaintOrder next() {\n if (!queue.isEmpty()) {\n currentOrders ++;\n var temp = queue.peek();\n return temp;\n }\n return null;\n }", "public E next() \n {\n \tfor(int i = 0; i < size; i++)\n \t\tif(tree[i].order == next) {\n \t\t\tnext++;\n \t\t\ttree[i].position = i;\n \t\t\treturn tree[i].element;\n \t\t}\n \treturn null;\n }", "public void next() {\n\t\telements[(currentElement - 1)].turnOff();\n\t\tif (elements.length > currentElement) {\n\t\t\telements[currentElement].turnOn();\n\t\t\tcurrentElement++;\n\t\t} else {\n\t\t\texit();\n\t\t}\n\t}", "@Override\r\n public void remove() {\r\n if (lastRetrieved == null) {\r\n throw new IllegalStateException();\r\n }\r\n lastRetrieved.prev.next = next;\r\n next = next.next;\r\n\r\n size--;\r\n }", "private void setNext(WeakOrderQueue next)\r\n/* 242: */ {\r\n/* 243:268 */ assert (next != this);\r\n/* 244:269 */ this.next = next;\r\n/* 245: */ }", "public int getFreeBlock()\n {\n int freeBlock = this.freeList; // Set freeBlock to the head of the freeList\n if(freeBlock != -1) // Check to see if the freeBlock is in use\n {\n byte[] block = new byte[512];\n SysLib.rawread(freeBlock, block); // Read data from freeBlock\n this.freeList = SysLib.bytes2int(block, 0); // Move the head of the freeList to the next block\n SysLib.int2bytes(0, block, 0);\n SysLib.rawwrite(freeBlock, block);\n }\n\n return freeBlock;\n }", "public synchronized boolean ffree(FileTableEntry ftEnt) {\n // count is zero so return false\n if (ftEnt.inode.count == 0) {\n return false;\n }\n // subtract 1 from the count\n ftEnt.inode.count -= 1;\n\n // if the count is zero after the decrement\n // then it can be cahnged to unused mode\n if (ftEnt.inode.count == 0) {\n ftEnt.inode.flag = 0;\n notify();\n }\n //remove the file table entry\n return table.removeElement(ftEnt);\n }", "public E poll() {\n\t\twhile (true) {\n\t\t\tlong f = front.get();\n\t\t\tint i = (int)(f % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did front change while we were reading x?\n\t\t\tif (f != front.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue empty?\n\t\t\tif (f == rear.get())\n\t\t\t\treturn null; //Don't retry; fail the poll.\n\n\t\t\tif (x != null) {//Is the front nonempty?\n\t\t\t\tif (elements.compareAndSet(i, x, null)) {//Try to remove an element.\n\t\t\t\t\t//Try to increment front. If we fail, other threads will\n\t\t\t\t\t//also try to increment before any further removals, so we\n\t\t\t\t\t//don't need to loop.\n\t\t\t\t\tfront.compareAndSet(f, f+1);\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t} else //front empty. Try to help other threads.\n\t\t\t\tfront.compareAndSet(f, f+1);\n\n\t\t\t//If we get here, we failed at some point. Try again.\n\t\t}\n\t}", "boolean tryLoadFreeIdsIntoCache()\n {\n if ( scanner == null && !atLeastOneIdOnFreelist.get() )\n {\n // If no scan is in progress (SeekCursor now sitting and waiting at some leaf in the free-list)\n // and if we have no reason to expect finding any free id from a scan then don't do it.\n return false;\n }\n\n if ( lock.tryLock() )\n {\n try\n {\n // A new scan is commencing, clear the queue to put ids in\n pendingItemsToCacheCursor = 0;\n // Get a snapshot of the size before we start. At the end of the scan the actual space available to fill with IDs\n // may be even bigger, but not smaller. This is important because we discover IDs, mark them as non-reusable\n // and then place them in the cache so IDs that wouldn't fit in the cache would need to be marked as reusable again,\n // which would be somewhat annoying.\n int maxItemsToCache = cache.capacity() - cache.size();\n\n // Find items to cache\n if ( maxItemsToCache > 0 && findSomeIdsToCache( maxItemsToCache ) )\n {\n // Get a writer and mark the found ids as reserved\n markIdsAsReserved();\n\n // Place them in the cache so that allocation requests can see them\n placeIdsInCache();\n return true;\n }\n }\n catch ( IOException e )\n {\n throw new UncheckedIOException( e );\n }\n finally\n {\n lock.unlock();\n }\n }\n return false;\n }", "public T provideRessource() throws NoSuchElementException{\n\t\tif(!this.free.isEmpty()){\n\t\t\tT retour = this.free.remove(0);\n\t\t\tthis.used.add(retour);\n\t\t\t\n\t\t\treturn retour;\n\t\t}\n\t\telse{\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t}", "public E poll()\n {\n if(size > 0)\n {\n E retElement = arrayList.get(0);\n arrayList.set(0, arrayList.get(size() - 1));\n arrayList.remove(size() - 1);\n size--;\n trickleDown(0);\n return retElement;\n }\n return null;\n }", "@Override\r\n public int nextIndex() {\r\n if (next == null) {\r\n return size; \r\n }\r\n return nextIndex - 1;\r\n }", "public void free(Block b) {\n if(b.length <= 0) return;\n\n if (b.start + b.length > limit) limit = b.start + b.length; // grows with free\n\n // query adjacent blocks\n Block prev = freeSpace.floor(b);\n Block next = freeSpace.higher(b);\n\n if (prev != null && prev.start + prev.length > b.start) {\n throw new RuntimeException(\"Corrupted. DEBUG PRV \" + prev.start + \"+\" + prev.length + \">\" + b.start);\n }\n if (next != null && next.start < b.start + b.length) {\n throw new RuntimeException(\"Corrupted. DEBUG NEX \" + next.start + \"<\" + b.start + \"+\" + b.length);\n }\n\n // merge them if possible\n \n Block n = Block.mergeBlocks(b, prev);\n if(n != null) { freeSpace.remove(prev); b = n; }\n\n n = Block.mergeBlocks(b, next);\n if(n != null) { freeSpace.remove(next); b = n; }\n\n freeSpace.add(b);\n }", "public emxPDFDocument_mxJPO getNext()\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n return (emxPDFDocument_mxJPO)super.removeFirst();\r\n }", "public synchronized boolean ffree( FileTableEntry e )\n {\n\n if(table.removeElement(e))\n {\n e.inode.count--;\n e.inode.toDisk(e.iNumber);\n e = null;\n return true;\n\n } else return false;\n }", "@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }", "@Override\n public Object dequeue() {\n Object objeto;\n if (!isEmpty()){ // Pré-condição\n objeto = memo[head];\n if (++head >= MAX){\n head = 0; // MAX-1 é a ultima posição do vetor\n }\n \n total--;\n if (total == 0){\n head = -1;\n tail = -1;\n }\n \n return objeto; // Retor o objeto que estava na head\n }\n else{\n return null; // Não se retira elemento de FILA vazia\n }\n }", "public Boolean getFree() {\n return free;\n }", "public int getFreeBlock()\n\t{\n\t\t// Store the current free block temporarily.\n\t\tint currentFreeBlock = freeList;\n\n\t\tif(currentFreeBlock != NULL_PTR)\n\t\t{\n\t\t\tbyte[] buffer = new byte[Disk.blockSize];\n\n\t\t\t// Read the current free block into the buffer.\n\t\t\tSysLib.rawread(currentFreeBlock, buffer);\n\n\t\t\t// Update the pointer to the next free block.\n\t\t\tfreeList = SysLib.bytes2short(buffer, 0);\n\n\t\t\tif(freeList == NULL_PTR)\n\t\t\t\tlastFreeBlock = NULL_PTR;\n\n\t\t\t// Update the current free block's pointer.\n\t\t\tSysLib.short2bytes(NULL_PTR, buffer, 0);\n\n\t\t\t// Write the current free block back to the disk.\n\t\t\tSysLib.rawwrite(currentFreeBlock, buffer);\n\t\t}\n\n\t\treturn currentFreeBlock;\n\t}", "private boolean zzRefill() {\r\n\t\treturn zzCurrentPos>=s.offset+s.count;\r\n\t}", "@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }", "public boolean isFree(int row, int col) throws ArrayIndexOutOfBoundsException {\r\n return getState(row, col) == 0;\r\n }", "private void linkFirst(final T element) {\r\n\t\tfinal int f = first;\r\n\t\tfinal int newNode = setFirstFree(element);\r\n\r\n\t\tsetNextPointer(newNode, f);\r\n\t\tsetPrevPointer(newNode, -1); // undefined\r\n\t\tfirst = newNode;\r\n\r\n\t\tif (f == -1) {\r\n\t\t\tlast = newNode;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(f, newNode);\r\n\t\t}\r\n\t\tsize++;\r\n\t\tmodCount++;\r\n\t}", "public com.Node<T> getNextRef() {\n\t\treturn null;\n\t}", "public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }", "public E next() {\n if (nextIndex >= set.count)\n throw new NoSuchElementException();\n\n canRemove = true;\n\n return set.data[nextIndex++];\n }", "private E newBufferPeek(E[] nextBuffer, long index)\r\n/* 212: */ {\r\n/* 213:464 */ long offset = newBufferAndOffset(nextBuffer, index);\r\n/* 214:465 */ E n = UnsafeRefArrayAccess.lvElement(nextBuffer, offset);\r\n/* 215:466 */ if (null == n) {\r\n/* 216:468 */ throw new IllegalStateException(\"new buffer must have at least one element\");\r\n/* 217: */ }\r\n/* 218:470 */ return n;\r\n/* 219: */ }", "private void moveMatchingNodeToNextElement(Node tmp) {\n for (int i = 0; i < ALL_LINKED_LISTS.size();i++) {\n Node next = ALL_LINKED_LISTS.get(i);\n if (tmp.equals(next)) {\n next = next.next;\n ALL_LINKED_LISTS.put(i, next);\n break;\n }\n }\n }", "public E poll(){\n int cnt = 0;\n long expect = front;\n int index;\n int curTryNum = tryNum;\n E e ;\n for(;;) {\n HighPerformanceQueue q = this;\n expect = front;\n index = (int)(expect&(max_size-1));\n if(available[index]) {\n e = (E) data[index];\n //TODO Additional write burden is added to the read operation\n available[index] = false;\n if (help.compareAndSwapLong(q, frontOffset, expect, expect + 1)) {\n // TODO Dynamic maintenance retries\n break;\n }\n available[index] = true;\n }\n cnt++;\n if(cnt==tryNum){\n return null;\n }\n }\n return e;\n }", "public final int size()\n {\n return m_firstFree;\n }", "public T getNextElement();", "protected boolean advance()\n/* */ {\n/* 66 */ while (++this.m_offset < this.m_array.length) {\n/* 67 */ if (this.m_array[this.m_offset] != null) {\n/* 68 */ return true;\n/* */ }\n/* */ }\n/* 71 */ return false;\n/* */ }", "public Item dequeue() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the removed number is: \" + index);\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t p.prev.next = p.next;\n \t p.next.prev = p.prev;\n \t size = size - 1;\n \t return p.item;\n }", "@Override\n protected int nextIndex() {\n if (_expectedSize != _hash.size()) {\n throw new ConcurrentModificationException();\n }\n\n byte[] states = _hash._states;\n int i = _index;\n while (i-- > 0 && (states[i] != TPrimitiveHash.FULL)) ;\n return i;\n }", "private boolean zzRefill() {\n\t\treturn zzCurrentPos>=s.offset+s.count;\n\t}", "private boolean zzRefill() {\n\t\treturn zzCurrentPos>=s.offset+s.count;\n\t}", "@Override\n public E next() {\n if(!hasWork()) {\n throw new NoSuchElementException(\"The worklist is empty\");\n }\n E work = array[front];\n if(front + 1 == array.length) {\n front = 0;\n } else {\n front++;\n }\n size--;\n return work;\n }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public Element<T> getNextElement() \n\t{\n\t\treturn nextElement;\n\t}", "@Override\n public E next() throws NoSuchElementException{\n lastItem = it.next();\n nextCount++;\n return(lastItem);\n }", "public Item dequeue() {\n if (this.isEmpty()) {\n throw new NoSuchElementException();\n }\n int random = StdRandom.uniform(this.currentIndex);\n Item saved = this.storage[random];\n this.storage[random] = null;\n this.size--;\n this.storage[random] = this.storage[currentIndex - 1];\n this.storage[currentIndex - 1] = null;\n this.currentIndex--;\n if (this.size <= (1.0 / 4.0) * this.storage.length) {\n int ceiling = (int) ((1.0 / 2.0) * this.storage.length);\n Item[] newArray = (Item[]) new Object[ceiling];\n for (int i = 0; i < this.size; i++) {\n newArray[i] = this.storage[i];\n }\n this.storage = newArray;\n\n }\n return saved;\n\n }", "public E dequeue(){\n if (isEmpty()) return null;\n E answer = arrayQueue[front];\n arrayQueue[front] = null;\n front = (front +1) % arrayQueue.length;\n size--;\n return answer;\n }", "public int getFreeBlock(){\n \n if(freeList == -1){\n return -1;\n }\n\n //Retrieve the free block \n byte[] data = new byte[512];\n SysLib.rawread(freeList, data);\n\n \n //Update the freelist\n int freeBlock = freeList;\n freeList = SysLib.bytes2int(data, 0);\n SysLib.int2bytes(0,data,0);\n SysLib.rawwrite(freeBlock,data);\n\n return freeBlock;\n }", "private int findFreeSlot(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public T getNext() {\n\n // Create a new item to return\n T nextElement = getInstance();\n\n // Check if there are any more items from the list\n if (cursor <= arrayLimit) {\n nextElement = collection.get(cursor);\n cursor++;\n } else {\n // There are no more items - set to null\n nextElement = null;\n }\n\n // Return the derived item (will be null if not found)\n return nextElement;\n }", "@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 E next() {\r\n current++;\r\n return elem[current];\r\n }", "public T nextElement() {\r\n\t\treturn items[currentObject++];\r\n \t}", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }" ]
[ "0.74297386", "0.6173443", "0.60361254", "0.59119546", "0.5855988", "0.58488774", "0.57658035", "0.57591575", "0.57420075", "0.57200617", "0.56878614", "0.5686699", "0.5678686", "0.56519514", "0.565104", "0.5643112", "0.5638657", "0.5631941", "0.5616007", "0.5612787", "0.55898756", "0.55855143", "0.55841976", "0.5581975", "0.5556015", "0.55428904", "0.5542715", "0.5536495", "0.5532155", "0.54977375", "0.54883456", "0.547603", "0.54602826", "0.54424095", "0.54369736", "0.5436124", "0.5427986", "0.5411473", "0.5404154", "0.5403411", "0.5388478", "0.5383185", "0.53543264", "0.53539795", "0.5353902", "0.5352771", "0.53500944", "0.5331205", "0.5329896", "0.5328062", "0.53247374", "0.53235215", "0.5321356", "0.53149486", "0.5310073", "0.53000796", "0.529649", "0.52947783", "0.5294583", "0.52932596", "0.5282421", "0.5281034", "0.52768534", "0.5273432", "0.526857", "0.5263907", "0.5255124", "0.5241179", "0.5235329", "0.5234258", "0.5231199", "0.5229013", "0.5219351", "0.5217417", "0.521657", "0.5214395", "0.5202137", "0.5200541", "0.51940143", "0.5193651", "0.5187897", "0.5179749", "0.51782495", "0.51760757", "0.51714927", "0.51714927", "0.51682824", "0.5167601", "0.51662976", "0.51629007", "0.5159815", "0.5156267", "0.51534504", "0.51525754", "0.5147498", "0.51401675", "0.51267385", "0.51218283", "0.51178277", "0.5116879" ]
0.67381036
1
Wait for a time when it is likely that a free slot is available.
private void waitForFree() throws InterruptedException { // Still full? while (isFull()) { // Park me 'till something is removed. block.await(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name of the stock.\r\n // MAXWAIT is 20 minutes, since we are 1 second loops.\r\n // 60 loops is 1 minute and 20 of those is 20 minutes\r\n final int MAXWAIT = 60 * 20;\r\n int counter = 0;\r\n do\r\n {\r\n try\r\n {\r\n Thread.currentThread().sleep(ONE_SECOND);\r\n }\r\n catch (InterruptedException exc)\r\n {\r\n // Do Nothing - Try again\r\n }\r\n if (counter++ > MAXWAIT)\r\n { // Abort the Lookup for historic data\r\n this.cancel();\r\n return -1;\r\n }\r\n }\r\n while (\"\".equals(sd.getSymbol().getDataSz().trim()));\r\n\r\n return 0;\r\n }", "boolean isAvailable( long millis );", "@Override\n\tpublic void waitTimedOut() {\n\t\t\n\t\tif( busylinetimer == null )\n\t\t\treturn;\n\t\t\n\t\tbusylinetimer.stop();\n\t\tbusylinetimer = null;\n\t\t\n\t\tlog.info(\"linea ocupada por mas de 120 segundos, iniciando proceso para colgar llamada.......\");\n\t\t\n\t\tnew CellPhoneHandUpCall(modem,false);\n\t}", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "public boolean isAvailable() {\n return LocalTime.now().isAfter(busyEndTime);\n }", "protected abstract long waitOnQueue();", "private static void waiting(int time) {\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "private void waitForAvailable() throws IOException, ReadTimeoutException {\n\t\tlong expireTime = System.currentTimeMillis() + READ_TIMEOUT;\n\t\twhile (inputStream.available() < 1) {\n\t\t\tif (System.currentTimeMillis() > expireTime) {\n\t\t\t\tthrow new ReadTimeoutException(\"Read Timed Out.\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(SLEEP_TIME);\n\t\t\t} catch (InterruptedException ie) {\n\t\t\t}\n\t\t}\n\t}", "void blockUntilFreeSlotForMessage() throws InterruptedException {\n lock.lockInterruptibly();\n try {\n while (messageQueue.size() == messageCapacity) {\n messageQueueNotFull.await();\n }\n } finally {\n lock.unlock();\n }\n }", "public void updateWaitingTime(){\n waitingTime = waitingTime - 1;\n }", "private void waitForBuyersAction() throws InterruptedException\n {\n while(waiting)\n {\n Thread.sleep(100);\n }\n waiting = true;\n }", "public void waitUntilReady() throws IOException, InterruptedException {\n while (ready() == 0) {\n Thread.sleep(10);\n }\n }", "protected abstract long waitToTravel();", "private void waitWhileShipPlacement(Player player) {\n\t\twhile (true) {\n\t\t\tif (player.isReadyWithPlaceShips()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void waitOnReceive() throws IOException {\n while (inStream.available() == 0) {\n try {\n Thread.sleep(1);\n } catch (InterruptedException _) {\n }\n }\n }", "@Override\n\tpublic boolean isReady() {\n\t\treturn (this.baseTime == this.timeRemaining);\n\t}", "void waitToRead();", "public void wait(int time) {\r\n\t\t\tsuper.sleep(time);\r\n\t\t}", "public void waitUntil(long x){\n\n Machine.interrupt().disable(); //disable interrupts\n\n\t long wakeTime; \n wakeTime = Machine.timer().getTime() ;\n wakeTime = wakeTime + x; //calculate wakeTime\n\n //pass through wakeTime and current thread as instance variables for a\n ThreadWait a;\n a = new ThreadWait(wakeTime, KThread.currentThread());\n\n waitingQueue.add(a); //add a to the waitingQueue \n\n KThread.currentThread().sleep(); //sleep current thread\n\n Machine.interrupt().enable(); //enable interrupts\n }", "public void Wait(double time) {\n\n\t\t\t\tdouble Time = time * 10000000;\n\t\t\t\tdouble t = 0;\n\t\t\t\twhile (t < Time)\n\t\t\t\t\tt++;\n\t\t\t}", "public void waitServersReady() {\n }", "public void checkPktAvail()\n\t{\n\t\t// schedule the next time to poll for a packet\n\t\tinterrupt.schedule(NetworkReadPoll, (int)this, NetworkTime, NetworkRecvInt);\n\n\t\tif (inHdr.mLength != 0) \t// do nothing if packet is already buffered\n\t\t{\n\t\t\treturn;\t\t\n\t\t}\n\t\tif (!PollSocket(mSock)) \t// do nothing if no packet to be read\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// otherwise, read packet in\n\t\tchar[] buffer = new char[MaxWireSize];\n\t\treadFromSocket(mSock, buffer, MaxWireSize);\n\n\t\t// divide packet into header and data\n\t\tinHdr = new PacketHeader(buffer);\n\t\tassert((inHdr.to == mNetworkAddress) && (inHdr.mLength <= MaxPacketSize));\n//\t\tbcopy(buffer + sizeof(PacketHeader), inbox, inHdr.length);\n\n\n\t\tDebug.print('n', \"Network received packet from \"+ inHdr.from+ \", length \"+ inHdr.mLength+ \"...\\n\");\n\t\tStatistics.numPacketsRecvd++;\n\n\t\t// tell post office that the packet has arrived\n\t\tmReadHandler.call(mHandlerArg);\t\n\t}", "public void doWait(){\n\t\tsynchronized(m){\n\t\t\ttry{\n\t\t\t\tm.wait(32000,0);\n\t\t\t} catch(InterruptedException e){}\n\t\t}\n\t}", "public void waitSleep(int pTime)\n{\n\n try {Thread.sleep(pTime);} catch (InterruptedException e) { }\n\n}", "public static void waitForAI(){\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void waitingForPartner();", "public Object waitingForKey(Jt808CommandKey commandKey, long time, TimeUnit unit) throws InterruptedException {\n this.blockingMap.put(commandKey, null);\n\n // Get result blocked\n Object result;\n try {\n log.info(\"Waiting for key {}\", commandKey);\n result = this.blockingMap.take(commandKey, time, unit);\n } finally {\n // Remove tmp waiting-flag\n this.blockingMap.remove(commandKey);\n }\n\n return result;\n }", "private void waitUntilReady() {\n\t\t\twhile (deque.isEmpty() && loadThread.isAlive()) {\n//\t\t\t\ttry {\n//\t\t\t\t\tThread.sleep(100);\n//\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\tExceptionUtils.throwAsRuntimeException(e);\n//\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "void await( long millis ) throws UnavailableException;", "public static void waitForIdle() {\n waitForIdle(null);\n }", "public void makeAvailable() {\n\t\tavailable = true;\n\t}", "boolean hasWaitTime();", "public boolean isAvailable(){\r\n return blockingQueue.size() < maxWorkQueueSize;\r\n }", "public void testTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "private void informTimeToCross() {\n if (continueAskingTimes) {\n requestTimes();\n }\n }", "public void delay(long waitAmount){\r\n long time = System.currentTimeMillis();\r\n while ((time+waitAmount)>=System.currentTimeMillis()){ \r\n //nothing\r\n }\r\n }", "public void testFairTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public boolean isReadyForAction(long time) {\n return System.currentTimeMillis() - lastAction > time;\n }", "protected void waitUntilCommandFinished() {\n }", "public void waitForDecision(){\n if(gameOver) {\n return;\n }\n if(!decisionActive) {\n try {\n uiWaiting = true;\n synchronized(uiWait) {\n uiWait.wait();\n }\n } catch (Exception e) { logger.log(\"\"+e); }\n }\n }", "public void setReadyTime() {\r\n\t\t\tthis.readyTime = 0;\r\n\t\t}", "public abstract boolean freeSlot(LocationDto location ,SlotDto slot);", "public void testFairTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public void waitTime(double time){\n double startTime = System.currentTimeMillis() + time *1000 ;\n while (opMode.opModeIsActive()){\n if (System.currentTimeMillis() > startTime) break;\n }\n }", "public void testTimedPoll() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n } catch (InterruptedException e){\n\t unexpectedException();\n\t}\n }", "public void testTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public void allocateSpace(long space, long millis)\n throws InterruptedException, MissingResourceException\n {\n \t_logSpaceAllocation.debug(\"ALLOC: <UNKNOWN> : \" + space );\n if (millis == SpaceMonitor.NONBLOCKING) {\n synchronized (_spaceMonitor) {\n if ((_spaceMonitor.getTotalSpace() -\n getPreciousSpace() - _reservedSpace ) < ( 3 * space ) )\n throw new\n\t MissingResourceException(\"Not enough Space Left\",\n this.getClass().getName(),\n \"Space\");\n _spaceMonitor.allocateSpace(space);\n }\n } else if (millis == SpaceMonitor.BLOCKING) {\n _spaceMonitor.allocateSpace(space);\n } else {\n _spaceMonitor.allocateSpace(space, millis);\n }\n }", "public void sleepCheck() {\n if (area() == null)\n stopActing();\n if (area().closed || area().closeRequested)\n stopActing();\n if (commander.player() == null || commander.player().area() != area()) {\n if (!area().getLabel().equals(\"TITLE\"))\n stopActing();\n } else {\n wakeCheck(commander.player().areaX(), commander.player().areaY());\n }\n }", "public void waitForAccess(PriorityQueue waitQueue) {\n Lib.assertTrue(Machine.interrupt().disabled());\n Lib.assertTrue(waitingQueue == null);\n\n time = Machine.timer().getTime();\n waitQueue.threadStates.add(this);\n waitingQueue = waitQueue;\n\n if(placement == 0)\n placement = placementInc++;\n\n update();\n }", "private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }", "public void waitUntil(long x) {\n\n\tlong wakeTime = Machine.timer().getTime() + x;\n\tboolean intrState = Machine.interrupt().disable();\n\tKThread.currentThread().time = wakeTime;\n\tsleepingThreads.add(KThread.currentThread());\n\tKThread.currentThread().sleep();\n Machine.interrupt().restore(intrState);\n \n }", "public void waitForData(int minNumBytes) {\n try {\n\n while (available() < minNumBytes) {\n Thread.sleep(500);\n }\n }\n catch (InterruptedException e) {\n System.out.println(\"#### Thread interrupted -- could be big trouble\");\n }\n catch(Exception e){}\n }", "private synchronized void block () throws IOException {\n //assert available == 0;\n int n = selector.select ();\n //assert n == 1;\n selector.selectedKeys().clear();\n available ();\n }", "public boolean isAvailable() {\n lock.readLock().lock();\n try {\n return available;\n } finally {\n lock.readLock().unlock();\n }\n }", "public void waitForData() {\n waitForData(1);\n }", "public void waitUntil(long x) {\n\n\t\tMachine.interrupt().disable();\n\t\t//Create the pair object with current thread and its respective wake time.\n\t\tPair newPair = new Pair(KThread.currentThread(), Machine.timer().getTime() + x);\n\n\t\t//Initialize with the current thread and wakeTime\n\t\ttheThreads.add(newPair); //add to list\n\t\t\n\t\tKThread.sleep(); //put that thread to sleep....its waiting\n\t\tMachine.interrupt().enable();\n\n\n\t}", "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 startWait() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (server.getNumberOfPlayers() > 0 && !server.gameStartFlag) {\n\t\t\t\t\tserver.runGame();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 120000);\n\t\t// 2min(2*60*1000)\n\t\tsendMessage(\"The game will start 2 minute late\");\n\t}", "public void waitForUp(int node) {\n try {\n InetAddress address = InetAddress.getByName(ipOfNode(node));\n CCMBridge.busyWaitForPort(address, 9042, true);\n } catch (UnknownHostException e) {\n Assert.fail(\"Unknown host \" + ipOfNode(node) + \"( node \" + node + \" of CCMBridge)\");\n }\n }", "@SuppressWarnings(\"BooleanMethodIsAlwaysInverted\")\n protected boolean acquireCapacity(Limit endpointReserve, Limit globalReserve, int bytes, long currentTimeNanos, long expiresAtNanos)\n {\n ResourceLimits.Outcome outcome = acquireCapacity(endpointReserve, globalReserve, bytes);\n\n if (outcome == ResourceLimits.Outcome.INSUFFICIENT_ENDPOINT)\n ticket = endpointWaitQueue.register(this, bytes, currentTimeNanos, expiresAtNanos);\n else if (outcome == ResourceLimits.Outcome.INSUFFICIENT_GLOBAL)\n ticket = globalWaitQueue.register(this, bytes, currentTimeNanos, expiresAtNanos);\n\n if (outcome != ResourceLimits.Outcome.SUCCESS)\n throttledCount++;\n\n return outcome == ResourceLimits.Outcome.SUCCESS;\n }", "public void checkTime() throws InterruptedByTimeoutException\n {\n if (System.currentTimeMillis() - this.start > TIME)\n throw new InterruptedByTimeoutException();\n }", "public static void longWait(){\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(15);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"Interruption happened due to sleep() method\");\r\n\t\t}\r\n\t}", "public List<Instance> awaitCapacity(final int needed) throws TimeoutException {\n return awaitCapacity(needed, 1, TimeUnit.SECONDS, 2, TimeUnit.DAYS, (s) -> {});\n }", "public boolean tryAcquire(long timeout) throws InterruptedException {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n synchronized (this) {\n if (m_available) {\n m_available = false;\n return true;\n }\n else if (timeout <= 0) {\n return false;\n }\n else {\n long startTime = System.currentTimeMillis();\n try {\n while (true) {\n wait(timeout);\n if (m_available) {\n m_available = false;\n return true;\n }\n else {\n timeout -= (System.currentTimeMillis() - startTime);\n if (timeout <= 0) {\n return false;\n }\n }\n }\n }\n catch (InterruptedException ie) {\n notify();\n throw ie;\n }\n }\n }\n }", "protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}", "boolean available()\n {\n synchronized (m_lock)\n {\n return (null == m_runnable) && (!m_released);\n }\n }", "private void getNextReady() {\n if (!iter.hasNext())\n nextItem = null;\n else {\n Map.Entry<T, Counter> entry = iter.next();\n nextItem = entry.getKey();\n remainingItemCount = entry.getValue();\n }\n }", "public void waitingEnemy(){\t\t\n\t\tgetController().changeFree(false);\n\t\tdisplayAdvertisement(\"waiting enemy\");\n\t\tadvertisementPanel.cancelRequestSetVisible(true);\n\t\tvalidate();\n\t}", "public static void waitToGo() {\r\n try {\r\n sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO);\r\n wait_to_run.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }", "public List<Instance> awaitCapacity(final int needed,\n final long retryInterval, final TimeUnit retryUnit,\n final long timeout, final TimeUnit timeoutUnit,\n final Consumer<String> consumer) throws TimeoutException {\n\n final long start = System.currentTimeMillis();\n\n final Supplier<List<Instance>> stringSupplier = () -> {\n\n final List<Instance> instances = getInstances();\n final List<SpotInstanceRequest> spotInstanceRequests = getSpotInstanceRequests();\n\n // Report our findings\n consumer.accept(String.format(\"%s - %s\",\n Operations.formatStatus(instances, spotInstanceRequests),\n TimeUtils.hoursAndSeconds(System.currentTimeMillis() - start)\n ));\n\n { // How many instances are we expecting?\n final int missing = needed - getAnticipatedCapacity(instances, spotInstanceRequests);\n if (missing > 0) {\n final String msg = String.format(\"\\nMore spot instances must be requested: Order %s more\", missing);\n throw new IllegalStateException(msg);\n }\n }\n\n // Do we have enough running instances?\n final List<Instance> running = instances.stream()\n .filter(instance -> \"running\".equals(instance.getState().getName()))\n .collect(Collectors.toList());\n\n return running.size() >= needed ? running : null;\n };\n\n return Await.check(stringSupplier, 0, retryInterval, retryUnit, timeout, timeoutUnit);\n }", "public void waitToFinish()\n {\n while(!this.finished)\n {\n try\n {\n Thread.sleep(1);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n return;\n }\n }\n }", "DurationTracker timeSpentTaskWait();", "public void sleep() throws InterruptedException, IllegalArgumentException, Time.Ex_TimeNotAvailable, Time.Ex_TooLate\n {\n // The current time.\n AbsTime now;\n // The duration to wait.\n RelTime duration;\n\n // Make error if NEVER.\n if (isNEVER()) {\n throw new IllegalArgumentException(\"this == NEVER\");\n }\n\n // Don't do anything if ASAP.\n if (!isASAP()) {\n\n // Calculate the time now.\n now = new AbsTime();\n\n // Figure out how long to wait for.\n duration = Time.diff(this, now);\n\n // If duration is negative, throw the Ex_TooLate exception.\n if (duration.getValue() < 0L) {\n throw new Time.Ex_TooLate();\n }\n\n // Do the wait.\n duration.sleep();\n }\n }", "private void waitBetweenRead() {\n\t\ttry {\n\t\t\twait(250); // wait 250 ms before collecting data again\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "protected int waitUntilMessageAvailable00(int handle) \n throws IOException {\n return waitUntilMessageAvailable0(m_iport, handle);\n }", "private void waitMs(final long toWait) {\n synchronized (this) {\n try {\n if (toWait > 0) {\n wait(toWait);\n }\n } catch (InterruptedException ex) {\n Log.e(TAG, ex.getMessage(), ex);\n }\n }\n }", "@Override\n public boolean waitForNextFlight() {\n this.lock.lock();\n try {\n boolean wait = this.passengersStillMissing != 0;\n\n // update hostess state\n this.repository.updateHostessState(HostessState.WAIT_FOR_NEXT_FLIGHT);\n\n if (wait) {\n // wait for pilot\n while (!this.planeReadyForBoarding) {\n this.hostessWaitPlaneReadyToTakeOff.await();\n }\n this.planeReadyForBoarding = false;\n }\n\n return wait;\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n return false;\n }", "protected abstract long availableInQueue(long paramLong1, long paramLong2);", "static void onSpinWait() {\n }", "int getWaitTime(int arrival_time, QNode temp) {\r\n\t \t //1. this is the case when the first person arrives before 9 a.m.\r\n\t \t if (arrival_time <32400) {\r\n\t \t\t //for the wait time of the first person\r\n\t\t \t if (size== maxSize) {\r\n\t\t \t\t\t this.front.wait_time = 32400-arrival_time;\r\n\t\t \t\t\t this.front.service_timeEnding = 32700;\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \r\n\t\t \t }\r\n\t\t \t //for the rest of them\r\n\t\t \t else {\r\n\t\t \t\t //if there is no waiting\r\n\t\t \t\t if (temp.service_timeEnding< arrival_time) {\r\n\t\t \t\t\t this.front.wait_time= 0;\r\n\t\t \t\t\t this.front.service_timeEnding = arrival_time +300;\r\n\t\t \t\t\t if (this.front.arrival_time+this.front.wait_time+300 !=this.front.service_timeEnding) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \t\t\t \r\n\t\t \t\t }\r\n\t\t \t\t //if there is waiting and there is person before you\r\n\t\t \t\t else {\r\n\t\t\t\t \tthis.front.wait_time = temp.service_timeEnding - arrival_time;\r\n\t\t\t\t \tthis.front.service_timeEnding = arrival_time +this.front.wait_time +300;\r\n\t\t\t\t \tif (this.front.service_timeEnding< this.front.wait_time) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t\t\t \t//save wait time\r\n\t\t\t\t \tsavewait.add(this.front.wait_time);\r\n\t\t\t\t \treturn this.front.wait_time;\r\n\t\t \t\t \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 \t //this is the case when the first person arrives after 9\r\n\t \t else {\r\n\t \t\t //for the first person arriving\r\n\t\t \t if (size ==maxSize ) {\r\n\t\t \t\t\t this.front.wait_time = 0;\r\n\t\t \t\t\t this.front.service_timeEnding = arrival_time +300;\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \t }\r\n\t\t \t //for the rest of them\r\n\t\t \t else {\r\n\t\t \t\t //if there is no waiting\r\n\t\t \t\t if (temp.service_timeEnding< arrival_time) {\r\n\t\t \t\t\t this.front.wait_time= 0;\r\n\t\t \t\t\t this.front.service_timeEnding = arrival_time +300;\r\n\t\t \t\t\t if (this.front.service_timeEnding!= this.front.wait_time) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \t\t\t \r\n\t\t \t\t }\r\n\t\t \t\t //if there is a waiting\r\n\t\t \t\t else {\r\n\t\t\t\t \tthis.front.wait_time = temp.service_timeEnding - arrival_time;\r\n\t\t\t\t \tthis.front.service_timeEnding = arrival_time +this.front.wait_time +300;\r\n\t\t\t\t \tif (this.front.service_timeEnding!= this.front.wait_time) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t\t\t \tsavewait.add(this.front.wait_time);\r\n\t\t\t\t \treturn this.front.wait_time;\r\n\t\t \t\t\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 \t }\r\n\t \t }\r\n\t }", "public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static void shortWait(){\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(5);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"Interruption happened due to sleep() method\");\r\n\t\t}\r\n\t}", "private void waitForServerReady() throws IOException, InterruptedException {\n\t\tfinal var httpget = new HttpGet(getPingUri());\n\t\tvar counter = 0;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tif (HttpStatus.SC_OK == httpclient.execute(httpget, HttpResponse::getCode)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcheckRetries(counter);\n\t\t\t} catch (final HttpHostConnectException ex) { // NOSONAR - Wait, and check later\n\t\t\t\tlog.info(\"Check failed, retrying...\");\n\t\t\t\tcheckRetries(counter);\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}", "private boolean checkMachineAvailable ()\n throws Exception\n {\n try {\n log.info(\"Claiming free machine\");\n\n Machine freeMachine = Machine.getFreeMachine(session);\n if (freeMachine == null) {\n Scheduler scheduler = Scheduler.getScheduler();\n log.info(String.format(\n \"No machine available for scheduled sim %s, retry in %s seconds\",\n game.getGameId(), scheduler.getSchedulerInterval() / 1000));\n return false;\n }\n\n game.setMachine(freeMachine);\n freeMachine.setStateRunning();\n session.update(freeMachine);\n log.info(String.format(\"Game: %s running on machine: %s\",\n game.getGameId(), game.getMachine().getMachineName()));\n return true;\n } catch (Exception e) {\n log.warn(\"Error claiming free machine for game \" + game.getGameId());\n throw e;\n }\n }", "public void wait4arriving() throws InterruptedException {\n \n // your code here\t\n }", "int getWaitTime();", "private int findFreeSlot(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "@Override\n public boolean hasMessageAvailable() {\n return !priorityQueue.isEmpty() && priorityQueue.peekN1() <= clock.millis();\n }", "T poll( int timeout, TimeUnit timeUnit )\n throws InterruptedException;", "public boolean checkBlockX()\n {\n if (mBlockedTime == 0)\n {\n return false;\n }\n\n double tBlockDelay = mBlockedTime - time();\n mBlockedTime = 0;\n if (tBlockDelay <= 0)\n {\n return false;\n }\n mBlockedMessage.add(mName + \" GC blocked from \" + time() + \" + until \" + (time() + tBlockDelay));\n hold(tBlockDelay);\n out();\n return true;\n }", "public void markAvailable() {\n CompletableFuture<?> toNotify = null;\n synchronized (this) {\n if (!availableFuture.isDone()) {\n toNotify = availableFuture;\n }\n }\n if (toNotify != null) {\n toNotify.complete(null);\n }\n }", "public void waitForAccess(PriorityQueue waitQueue) \n {\n this.waitQueue = waitQueue; //Assign the waitQueue in the ThreadState object to the passed PriorityQueue\n\t\t\tsleepTime=Machine.timer().getTime(); //Record the time at which the thread sleeps\n }", "protected abstract void afterWait();", "public synchronized void waitForDone() {\n\twhile (!done) myWait();\n }", "public Status waitUntilFinished();", "public void waitForDown(int node) {\n try {\n InetAddress address = InetAddress.getByName(ipOfNode(node));\n CCMBridge.busyWaitForPort(address, 9042, false);\n } catch (UnknownHostException e) {\n Assert.fail(\"Unknown host \" + ipOfNode(node) + \"( node \" + node + \" of CCMBridge)\");\n }\n }" ]
[ "0.65803844", "0.6570488", "0.6561936", "0.6486102", "0.6433918", "0.64271766", "0.63888913", "0.6385732", "0.630306", "0.62673", "0.6207215", "0.6202387", "0.61658835", "0.60112345", "0.5988035", "0.5921008", "0.58744156", "0.5859416", "0.58573747", "0.58491147", "0.58211094", "0.5781625", "0.57746965", "0.57670027", "0.576386", "0.5755801", "0.5754967", "0.5752194", "0.5749301", "0.57464176", "0.5701822", "0.5701822", "0.5699608", "0.56769705", "0.5673537", "0.56731176", "0.5657141", "0.56422484", "0.56401706", "0.56395215", "0.5630856", "0.5619907", "0.56097794", "0.55986303", "0.55963516", "0.55933636", "0.55755293", "0.55648446", "0.55603117", "0.5559159", "0.5557748", "0.55571973", "0.5548254", "0.5543787", "0.5535367", "0.5534613", "0.55324614", "0.5529002", "0.55233926", "0.55149144", "0.5511294", "0.55049825", "0.55049455", "0.5503484", "0.5501667", "0.5497964", "0.5493743", "0.54893154", "0.5479647", "0.5465336", "0.5459781", "0.5453729", "0.5448741", "0.5436716", "0.54282993", "0.5422529", "0.54121935", "0.5402916", "0.5400882", "0.5400053", "0.53811055", "0.53803694", "0.5373485", "0.5371222", "0.5369419", "0.53673553", "0.53583634", "0.5356658", "0.53559667", "0.5353687", "0.53531754", "0.53525907", "0.5338079", "0.5335006", "0.53265774", "0.52975523", "0.5296161", "0.5296108", "0.52936316", "0.5293413" ]
0.675553
0
A slot has been freed up. If anyone is waiting, let the next one know.
private void signalFree() { block.release(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean freeSlot(LocationDto location ,SlotDto slot);", "public boolean endsInSlot();", "@Override\n public boolean removeSlot(int slot) {\n return availableSlots.add(slot);\n }", "public void signalFree() {\n lock.lock();\n try {\n Log.d(TAG, \"Signaling NsdManager Resolver as free\");\n busy = false;\n condition.signal();\n } finally {\n lock.unlock();\n }\n }", "private void waitForFree() throws InterruptedException {\n // Still full?\n while (isFull()) {\n // Park me 'till something is removed.\n block.await();\n }\n }", "@Override\n public boolean fillSlot(int slot) {\n if(!isValidSlot(slot) || availableSlots.size() == 0 || !availableSlots.contains(slot)){\n return false;\n }\n\n availableSlots.remove(slot);\n return true;\n }", "public synchronized void release() {\n m_available = true;\n notify();\n }", "public void uponRelease() {\n try {\n\n int size = waitingList.size();\n if (size > 0) {\n int random = (int) (stream.getNumber() * size);\n NodeThread next = (NodeThread)waitingList.get(random);\n next.wakeUp();\n }\n\n } catch (IOException e) {}\n }", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public void free(int reservation) {\n this.freeSet.set(reservation - this.loRange);\n }", "@Override\n public boolean free() {\n synchronized (this) {\n if (isUnavailable()) {\n return false;\n }\n\n logger.info(\"releasing lock: {}\", this);\n setState(LockState.UNAVAILABLE);\n }\n\n return true;\n }", "public void clearFreeSlots() {\n AvailableSlots.clear();\n }", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "void blockUntilFreeSlotForMessage() throws InterruptedException {\n lock.lockInterruptibly();\n try {\n while (messageQueue.size() == messageCapacity) {\n messageQueueNotFull.await();\n }\n } finally {\n lock.unlock();\n }\n }", "public void releaseAllMessagesOfSlotFromTracking(Slot slot) {\n //remove all actual msgData objects\n if(log.isDebugEnabled()) {\n log.debug(\"Releasing tracking of messages for slot \" + slot.toString());\n }\n ConcurrentHashMap<Long, MsgData> messagesOfSlot = messageBufferingTracker.remove(slot);\n for (Long messageIdOfSlot : messagesOfSlot.keySet()) {\n if(checkIfReadyToRemoveFromTracking(messageIdOfSlot)) {\n if(log.isDebugEnabled()) {\n log.debug(\"removing tracking object from memory id= \" + messageIdOfSlot);\n }\n msgId2MsgData.remove(messageIdOfSlot);\n }\n }\n }", "public void decrementMessageCountInSlotAndCheckToResend(Slot slot, String queueName)\n throws AndesException {\n AtomicInteger pendingMessageCount = pendingMessagesBySlot.get(slot);\n int messageCount = pendingMessageCount.decrementAndGet();\n if (messageCount == 0) {\n /*\n All the Acks for the slot has bee received. Check the slot again for unsend\n messages and if there are any send them and delete the slot.\n */\n SlotDeliveryWorker slotWorker = SlotDeliveryWorkerManager.getInstance()\n .getSlotWorker(queueName);\n if(log.isDebugEnabled()) {\n log.debug(\"Slot has no pending messages. Now re-checking slot for messages\");\n }\n slotWorker.checkForSlotCompletionAndResend(slot);\n }\n\n }", "protected abstract long waitOnQueue();", "void release()\n {\n synchronized (m_lock)\n {\n m_released = true;\n\n m_lock.notifyAll();\n }\n }", "private static final boolean free(final AbstractScreenOwner oldOwner) {\n if (currentOwner == oldOwner) {\n // acquire\n currentOwner = null;\n return true;\n }\n return false;\n }", "private synchronized void freeProcess(long uid) {\n\t\trunningCount--;\n\t\tlogger.debug(\"End process {}, have {} processes still running.\", uid, runningCount);\n\t\tcheckRunningProcesses();\n\t}", "protected void aq() {\n Object object = this.li;\n synchronized (object) {\n if (this.lz != null) {\n this.lp.unregisterReceiver(this.lz);\n this.lz = null;\n }\n return;\n }\n }", "private void freeAgent() {\n }", "void notifyProcessFinishedWith(MaximaProcess mp) {\r\n \t\tusedPool.remove(mp);\r\n \t}", "public void isShot() {\r\n\t\tlives -=1;\r\n\t\tif(isDead())\r\n\t\t{\r\n\t\t\tthis.erase();\r\n\t\t}\r\n\t}", "public BufferSlot remove();", "public void endHold();", "public boolean isReleasable() { return isDone(); }", "public boolean freeSpace(int neededSpace) {\n \t\treturn true;\n \t}", "public boolean isUnused() {\n return this.binderySlotNumber == -9234;\n }", "public final boolean tryFree() {\n return free(this);\n }", "public boolean checkBlockX()\n {\n if (mBlockedTime == 0)\n {\n return false;\n }\n\n double tBlockDelay = mBlockedTime - time();\n mBlockedTime = 0;\n if (tBlockDelay <= 0)\n {\n return false;\n }\n mBlockedMessage.add(mName + \" GC blocked from \" + time() + \" + until \" + (time() + tBlockDelay));\n hold(tBlockDelay);\n out();\n return true;\n }", "private int findFreeSlot(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void invalidate() {\n for (int i = 0; true; i = (2 * i + 1) & 63) {\n synchronized (this) {\n this.listener = null;\n this.sema = null;\n if (!deliveryPending || (Thread.currentThread().getId() == id)) {\n return;\n }\n }\n if (i == 0) {\n Thread.yield();\n } else {\n if (i > 3) Log.finer(Log.FAC_NETMANAGER, \"invalidate spin {0}\", i);\n try {\n Thread.sleep(i);\n } catch (InterruptedException e) {\n }\n }\n }\n }", "public boolean isHolding();", "public boolean isFinished() {\n\t\t// the word is guessed out only when the unrevealedSlots is 0\n\t\tif (this.unrevealedSlots == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void updateWaitingTime(){\n waitingTime = waitingTime - 1;\n }", "private void carsReadyToLeave(){\n\t\t\tCar car = getFirstLeavingCar();\r\n\t\t\twhile (car!=null) {\r\n\t\t\t\tif (car.getHasToPay()){\r\n\t\t\t\t\tcar.setIsPaying(true);\r\n\t\t\t\t\tpaymentCarQueue.addCar(car);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcarLeavesSpot(car);\r\n\t\t\t\t}\r\n\t\t\t\tcar = getFirstLeavingCar();\r\n\t\t\t}\r\n\t\t}", "private final void kill() {\n\t\tgrown=false;\t\t\n\t}", "@Override\r\n\tpublic boolean unlockIt() {\n\t\treturn false;\r\n\t}", "public void releasePokemon(int box, int slot)\n\t{\n\t\t/* If the box doesn't exist, return */\n\t\tif(m_boxes[box] == null)\n\t\t\treturn;\n\t\t/* Check if the pokemon exists */\n\t\tif(m_boxes[box].getPokemon(slot) != null)\n\t\t{\n\t\t\tif(m_boxes[box].getPokemon(slot).getDatabaseID() > -1)\n\t\t\t{\n\t\t\t\t/* This box exists and the pokemon exists in the database */\n\t\t\t\tint id = m_boxes[box].getPokemon(slot).getDatabaseID();\n\t\t\t\tm_database.query(\"DELETE FROM `pn_pokemon` WHERE `id` = '\" + id + \"'\");\n\t\t\t}\n\t\t\tm_boxes[box].setPokemon(slot, null);\n\t\t}\n\t}", "public int queue() \n { return waiting; }", "public void updateFreeSlots(Hexagon hexagon){\n\t for (Hexagon neighbour : getOneHexagon(hexagon).getNeighbours()){\n\t if( !getFreeSlots().contains(neighbour) &&\n !plateau.containsKey(makeKey(neighbour)) &&\n neighbour.getExistingNeighbours().size() > 1)\n\t getFreeSlots().add(neighbour);\n }\n /*we remove current hexagon from the list of free slots*/\n\t this.getFreeSlots().remove(hexagon);\n }", "private void carsReadyToLeave() {\n\t\tCar car = getFirstLeavingCar();\n\t\twhile (car != null) {\n\t\t\tif (car.getHasToPay()) {\n\t\t\t\tcar.setIsPaying(true);\n\t\t\t\tpaymentCarQueue.addCar(car);\n\t\t\t} else {\n\t\t\t\tcarLeavesSpot(car);\n\t\t\t}\n\t\t\tcar = getFirstLeavingCar();\n\t\t}\n\t}", "public void lifeLost() {\n\t\t--lives;\n\t\tif (lives == 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "public synchronized long getSlots() {\n return slots;\n }", "boolean isFinished() {\n if (completeCount < reserve) {\n return false;\n }\n\n // We need to check if the last entry was used\n final OutboundQueueEntry last = queue[reserve];\n return !last.isCommitted() || last.isCompleted();\n }", "public Integer remove() {\n while (true) {\n\n if (buffer.isEmpty()) {\n System.out.println(\"List is empty! Waiting..\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n } else {\n full.waiting();\n mutex.waiting();\n int back = buffer.removeFirst();\n mutex.signal();\n empty.signal();\n return back;\n\n }\n }\n\n\n }", "public void release() {\n\t\tsynchronized (this) {\n\t\t\tcount++;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "boolean hasPakringFree();", "boolean hasPakringFree();", "public synchronized void nudge() {\n notifyAll();\n }", "protected void checkDeadLock()\r\n/* 134: */ {\r\n/* 135:165 */ if (channel().isRegistered()) {\r\n/* 136:166 */ super.checkDeadLock();\r\n/* 137: */ }\r\n/* 138: */ }", "@Override\n\tpublic boolean unlockIt() {\n\t\treturn false;\n\t}", "public void mo957b() {\n if (this.f14245a) {\n throw new IllegalStateException(\"Already released\");\n }\n }", "protected void checkDeadLock()\r\n/* 303: */ {\r\n/* 304:389 */ EventExecutor e = executor();\r\n/* 305:390 */ if ((e != null) && (e.inEventLoop())) {\r\n/* 306:391 */ throw new BlockingOperationException(toString());\r\n/* 307: */ }\r\n/* 308: */ }", "public void killAndFinish()\n\t{\n\t\tif (isKilled()) return;\n\t\tupdate(Float.MAX_VALUE);\n\t}", "boolean isFree(Position position);", "public void wipeSlot(int slot) {\n for (T obj : objToSums.keySet()) {\n resetSlotCountToZero(obj, slot);\n }\n }", "private void carsReadyToLeave(){\n\t Car car = cpview.getFirstLeavingCar();\n\t while (car!=null) {\n\t \tif (car.getHasToPay()){\n\t\t car.setIsPaying(true);\n\t\t paymentCarQueue.addCar(car);\n\t \t}\n\t \telse {\n\t \t\tcarLeavesSpot(car);\n\t \t}\n\t car = cpview.getFirstLeavingCar();\n\t }\n\t }", "public void free() {\n mm.freeBlock(startingPosition, size);\n }", "public boolean failedAcquire() throws TerminationException {\n boolean result;\n NodeThread caller = NodeThread.currentNodeThread();\n waitingList.add(caller);\n do {\n caller.sleep();\n } while (!tryAcquire());\n waitingList.remove(caller);\n return true;\n }", "public boolean reserve(int reservation) {\n int index = reservation - this.loRange;\n if (this.freeSet.get(index)) { // FREE\n this.freeSet.clear(index);\n return true;\n } else {\n return false;\n }\n }", "public void freeSpace(long space)\n {\n _spaceMonitor.freeSpace(space);\n }", "int remaining();", "public boolean addMessageToBufferingTracker(Slot slot, AndesMessageMetadata andesMessageMetadata) {\n long messageID = andesMessageMetadata.getMessageID();\n boolean isOKToBuffer;\n if(log.isDebugEnabled()) {\n log.debug(\"Buffering message id = \" + messageID + \" slot = \" + slot.toString());\n }\n ConcurrentHashMap<Long, MsgData> messagesOfSlot = messageBufferingTracker.get(slot);\n if (messagesOfSlot == null) {\n messagesOfSlot = new ConcurrentHashMap<Long, MsgData>();\n messageBufferingTracker.put(slot, messagesOfSlot);\n }\n MsgData trackingData = messagesOfSlot.get(messageID);\n if (trackingData == null) {\n trackingData = new MsgData(messageID, slot, false,\n andesMessageMetadata.getDestination(),\n System.currentTimeMillis(), andesMessageMetadata.getExpirationTime(),\n 0, null, 0,MessageStatus.Buffered);\n msgId2MsgData.put(messageID, trackingData);\n messagesOfSlot.put(messageID, msgId2MsgData.get(messageID));\n isOKToBuffer = true;\n } else {\n log.debug(\"Buffering rejected message id = \" + messageID);\n isOKToBuffer = false;\n }\n return isOKToBuffer;\n }", "public boolean isReleased() {\n return released;\n }", "private void eventLookupCompleted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter--;\n\t\t\tif (lookupCounter == 0)\n\t\t\t\tlookupCounterMutex.notifyAll();\n\t\t}\n\t}", "public void waitingForPartner();", "@Override\n public void freeId( long id )\n {\n }", "public Boolean isFree()\n\t{\n\t\treturn free;\n\t}", "public boolean isAcquired() {\r\n return false;\r\n }", "private boolean offer(LogTarget lt, Pooled<T> used) {\n\t\tif (count < spares) {\n\t\t\tsynchronized (list) {\n\t\t\t\tlist.addFirst(used);\n\t\t\t\t++count;\n\t\t\t}\n\t\t\tlt.log(\"Pool recovered \", creator.toString());\n\t\t} else {\n\t\t\tlt.log(\"Pool destroyed \", creator.toString());\n\t\t\tcreator.destroy(used.content);\n\t\t}\n\t\treturn false;\n\t}", "public boolean busyReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_BUSY];\n\t\t}", "private void getNextReady() {\n if (!iter.hasNext())\n nextItem = null;\n else {\n Map.Entry<T, Counter> entry = iter.next();\n nextItem = entry.getKey();\n remainingItemCount = entry.getValue();\n }\n }", "@Inline\n public static void write_barrier_slot_rem(Address p_target, Address p_objSlot, Address p_objBase) {\n \n /* If the slot is in NOS or the target is not in NOS, we simply return*/\n if(p_objSlot.GE(NOS_BOUNDARY) || p_target.LT(NOS_BOUNDARY) || !GEN_MODE) {\n p_objSlot.store(p_target);\n return;\n }\n Address p_obj_info = p_objBase.plus(4);\n int obj_info = p_obj_info.loadInt();\n if((obj_info & 0x80) != 0){\n p_objSlot.store(p_target);\n return;\n }\n \n VMHelper.writeBarrier(p_objBase, p_objSlot, p_target);\n }", "protected synchronized void freeBus(int busNum) {\n\t\t_busList.remove(new Integer(busNum));\n\t}", "public abstract void free();", "public boolean wasJustReleased() {\n\t\treturn (!mNow && mLast);\n\t}", "protected Ticket checkNextCompletedTicket()\n\t{\n\t\treturn tickets.peek();\n\t}", "private synchronized void dispose()\n/* */ {\n/* 625 */ this.dispose = true;\n/* 626 */ notifyAll();\n/* */ }", "public void hasLost() {\n\t\tthis.hasLost = true;\n\t}", "private Student getNextWaitingStudent() {\n if (waitingStudents.size() < 1) return null;\n System.out.println(\"TA: TA asking a sitting student to come in.\");\n Student s = waitingStudents.remove(0);\n // Notify the student that he/she can come in\n s.notifyWaitingDone();\n return s;\n }", "void lockReleased(String lock);", "@Override\n public int getSlot() {\n\n if(availableSlots.size() == 0){\n return -1;\n }\n return availableSlots.first();\n }", "public void markDead() {\r\n\t\tsetNodeWasContacted(0);\r\n\t}", "@Test\n public void reregisterWithFree() throws Exception {\n long workerId = mBlockMaster.getWorkerId(NET_ADDRESS_1);\n List<RegisterWorkerPRequest> requestChunks =\n RegisterStreamTestUtils.generateRegisterStreamForWorker(workerId);\n prepareBlocksOnMaster(requestChunks);\n Queue<Throwable> errorQueue = new ConcurrentLinkedQueue<>();\n sendStreamToMaster(requestChunks,\n RegisterStreamTestUtils.getErrorCapturingResponseObserver(errorQueue));\n assertEquals(0, errorQueue.size());\n assertEquals(1, mBlockMaster.getWorkerCount());\n\n // Find a block to free\n long blockToRemove = RegisterStreamTestUtils.findFirstBlock(requestChunks);\n\n // Register again\n CountDownLatch latch = new CountDownLatch(1);\n Queue<Throwable> newErrorQueue = new ConcurrentLinkedQueue<>();\n mExecutorService.submit(() -> {\n sendStreamToMasterAndSignal(requestChunks,\n RegisterStreamTestUtils.getErrorCapturingResponseObserver(newErrorQueue), latch);\n });\n\n // During the register stream, trigger a delete on worker\n latch.await();\n mBlockMaster.removeBlocks(ImmutableList.of(blockToRemove), false);\n\n BlockInfo info = mBlockMaster.getBlockInfo(blockToRemove);\n MasterWorkerInfo worker = mBlockMaster.getWorker(workerId);\n assertEquals(0, newErrorQueue.size());\n assertEquals(1, mBlockMaster.getWorkerCount());\n // The block still exists on the worker but a command will be issued to remove it\n assertEquals(TIER_BLOCK_TOTAL, worker.getBlockCount());\n\n Command command = sendHeartbeatToMaster(workerId);\n assertEquals(Command.newBuilder()\n .setCommandType(CommandType.Free).addData(blockToRemove).build(), command);\n }", "public void honourFreeBufferCount() {\n // Check if there are enough free launchers\n int freeCount = getFreeLaunchers().size();\n\n while (freeCount < freeBufferCount) {\n if (getTotalLaunchers().size() > maxCount) {\n log.warn(\"Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this \" +\n \"message appears often increase maximum concurrency.\");\n }\n\n log.info(\"Scaling UP: REASON -> [Free Count] \" + freeCount + \" < [Free Gap] \" + freeBufferCount);\n scaleUp(\"honourFreeBufferCount\");\n freeCount = getFreeLaunchers().size();\n }\n }", "public void ejectTicket(){if(this.inProgress()){this.currentTicket=null;}}", "public synchronized Integer remove() {\r\n while (true) {\r\n if (buffer.size() == 0) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n Integer back = buffer.removeFirst();\r\n notifyAll();\r\n return back;\r\n }\r\n }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "public void kill() {\r\n \t\tthis.isDead = true;\r\n \t}", "public void checkRelease(){\n\n\t\t//Clear boolean to indicate that the GUIItem is no longer touched\n\t\twhileTouched = false;\n\t\tif (touchObject != null)\n\t\t\tonRelease = true;\n\t}", "private void maintain() {\n SoftObject obj;\n int count = 0;\n\n while ((obj = (SoftObject)queue.poll()) != null) {\n count++;\n collection.remove(obj);\n }\n\n if (count != 0) {\n // some temporary debugging fluff\n System.err.println(\"vm reclaimed \" + count + \" objects\");\n }\n }", "public static boolean addressWaiting(){\n boolean addressedSomething = false;\n removeSet = new HashSet<>();\n for(Instruction i : waitingList){\n if(request(i)){\n //System.out.println(\"Task \" + i.taskNumber + \" had its request completed off the waiting List\" );\n\n removeSet.add(i);\n addressedSomething = true;\n }else{\n //System.out.println(\"Task \" + i.taskNumber + \" could not be completed, remains on waiting list\" );\n }\n }\n\n return addressedSomething;\n }", "private void signalNotEmpty() {\n\t\tfinal ReentrantLock takeLock = this.takeLock;\n\t\ttakeLock.lock();\n\t\ttry {\n\t\t\tnotEmpty.signal();\n\t\t} finally {\n\t\t\ttakeLock.unlock();\n\t\t}\n\t}", "@Override\n public void updateSlots() {\n super.updateSlots();\n purgeAllOverflowEM_EM();\n }", "public boolean signalAllWaiters()\n {\n int w=waiting.get();\n if (w>0) return signal(w);\n return false;\n }", "@Override\n public void contractCompletedMethod(Messages.CompletedContract msg) {\n runningContracts.remove(msg.contID);\n if (isLeaving && runningContracts.size() == 0) {\n stop();\n }\n }", "public void free() {\r\n\r\n\t}" ]
[ "0.6849268", "0.66754335", "0.6654685", "0.62864584", "0.62607694", "0.62244195", "0.613942", "0.61084116", "0.6082654", "0.5903193", "0.59022546", "0.58871037", "0.576104", "0.57403773", "0.5727851", "0.57095695", "0.57046574", "0.5679706", "0.56535876", "0.56386185", "0.5632425", "0.560835", "0.560725", "0.5581964", "0.5580359", "0.55798846", "0.55773413", "0.5575811", "0.5569591", "0.55649674", "0.5549849", "0.55445004", "0.55257136", "0.5515215", "0.5472366", "0.54712886", "0.546911", "0.54643935", "0.5463381", "0.5462134", "0.5458227", "0.54389495", "0.5437409", "0.5436619", "0.5426004", "0.5425341", "0.5421917", "0.5418258", "0.539538", "0.5393824", "0.5393824", "0.5384251", "0.5374657", "0.5352951", "0.534857", "0.5339648", "0.53271544", "0.53268033", "0.53255457", "0.53097034", "0.5302127", "0.52891964", "0.5286502", "0.5285908", "0.5285698", "0.528082", "0.5276362", "0.5275317", "0.5266663", "0.52629817", "0.5261637", "0.5256093", "0.52548754", "0.5254442", "0.5253683", "0.5248146", "0.5241475", "0.5238176", "0.52268314", "0.52261394", "0.5213021", "0.52121705", "0.5210184", "0.52091086", "0.5208703", "0.52017075", "0.5195936", "0.5194341", "0.5187952", "0.51878655", "0.5186003", "0.51842916", "0.5183438", "0.5179239", "0.51771325", "0.51703286", "0.5162496", "0.516068", "0.5153698", "0.51521665" ]
0.64386487
3
Counts how many there are currently in the container.
public int size() { int found = 0; Node<T> it = head.get(); // Do a raw count. for (int i = 0; i < capacity; i++) { if (!it.free.get()) { found += 1; } it = it.next; } return found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int count() {\n\t\treturn sizeC;\n\t}", "public long getCount() {\n return counter.get();\n }", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "public int count() {\n\t\treturn count;\n\t}", "public int size() {\n return this.container.length;\n }", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public Integer getCount() {\n\t\treturn count;\n\t}", "public Integer getCount() {\n\t\treturn count;\n\t}", "public synchronized int getCount()\n\t{\n\t\treturn count;\n\t}", "public int getCount()\r\n {\r\n return counts.peekFirst();\r\n }", "public int count() {\r\n return count;\r\n }", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }", "default int countItems() {\n return countItems(StandardStackFilters.ALL);\n }", "int getInCount();", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "public int count() {\n return count;\n }", "public Integer getCounts() {\n return counts;\n }", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "int getEntryCount();", "public int currentCount () {\n return count;\n }", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public long getCount() {\n return count_;\n }", "public synchronized int size() {\n return count;\n }", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}", "int getContentsCount();", "int getCachedCount();", "public long getCount() {\n return count_;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public long getCount()\n\t{\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public static int getCount() {\n\t\treturn count;\n\t}", "public int size() {\n return count;\n }", "int count() {\n return index.capacity() / 24;\n }", "public int count() {\n return this.count;\n }", "public int size()\r\n {\r\n return count;\r\n }", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "public Integer getCount() {\n return count;\n }", "public int getCount() {\n return count_;\n }", "public int getCount() {\n\t\t\treturn count;\n\t\t}", "@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int get_count();", "public int size()\n {\n return count;\n }", "public int size(){\n return sizeCounter;\n }", "public int size() { return count; }", "int getTotalCount();", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public int size() {\n maintain();\n return collection.size();\n }", "public synchronized int getCount () {\n int c = count;\n count = 0;\n return c;\n }", "int countInstances();", "public static int count() {\n return segmentList.size();\n }", "@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}", "long countPostings() {\n \tlong result = 0;\n \tfor (Layer layer : layers.values())\n \t\tresult += layer.size();\n \treturn result;\n }", "public int count() {\n\t\t\tassert wellFormed() : \"invariant false on entry to count()\";\n\n\t\t\tint count = 0;\n\t\t\tfor(Card p = this.first; p != null; p = p.next) {\n\t\t\t\t++count;\n\t\t\t}\n\n\t\t\treturn count; // TODO\n\t\t}", "public int getCount() {\n\t\t\treturn this.myImageIds.length;\n\t\t}", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public int getCount() {\n \t\tint total = 0;\n \t\tfor(Adapter adapter : this.sections.values())\n \t\t\ttotal += adapter.getCount() + 1;\n \t\treturn total;\n \t}", "public Integer countAll() {\n\t\treturn null;\n\t}", "public long count() ;", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "@Override\r\n\tpublic int size() {\r\n\t\treturn count;\r\n\t}", "public long getCount() {\n return count.get();\n }", "public long getCount() {\r\n return count;\r\n }", "public int getCurrentSize() {\n return count;\n }", "public final int size()\n {\n return m_count;\n }", "public long getCount() {\n return count;\n }", "public long getCount() {\n return count;\n }", "@Override\npublic long count() {\n\treturn super.count();\n}", "public int getCount() {\n\t\t\treturn this.count;\n\t\t}" ]
[ "0.70475405", "0.6912311", "0.6883217", "0.6867093", "0.6858649", "0.6828819", "0.68271637", "0.68271637", "0.6789059", "0.67785984", "0.67785984", "0.67785984", "0.6775431", "0.6775431", "0.674276", "0.6734339", "0.67343", "0.67154247", "0.6711965", "0.668018", "0.6674106", "0.6671906", "0.6671906", "0.6671906", "0.6671906", "0.666766", "0.66669846", "0.6664351", "0.665593", "0.66529727", "0.6650528", "0.6648593", "0.6622789", "0.66106707", "0.6606135", "0.6605039", "0.6604198", "0.6604198", "0.6604198", "0.6604198", "0.6604198", "0.6604198", "0.6604198", "0.6604198", "0.65789086", "0.65747267", "0.65736514", "0.6572268", "0.6570256", "0.6570256", "0.6570256", "0.6570256", "0.6570256", "0.6570256", "0.6565966", "0.6562133", "0.6562133", "0.6562133", "0.6558193", "0.6557685", "0.655455", "0.65542567", "0.6551091", "0.65478474", "0.65416086", "0.6539826", "0.6539481", "0.6504808", "0.65035754", "0.6500906", "0.6495121", "0.6494125", "0.6489129", "0.6482773", "0.6480291", "0.64726025", "0.64726025", "0.6466754", "0.64498454", "0.6444408", "0.6442044", "0.6424275", "0.6422537", "0.6422183", "0.64117473", "0.64087325", "0.6407565", "0.6406585", "0.6405054", "0.63973063", "0.6390035", "0.6387695", "0.6386238", "0.6385336", "0.63783866", "0.63728005", "0.63712174", "0.63712096", "0.63712096", "0.6359909", "0.6354774" ]
0.0
-1
clear ... NOT thread safe. There is little I can guarantee from this method. It is strongly recommended that this method is only used when it is known that no other thread will be accessing the container.
public void clear() { Node<T> it = head.get(); for (int i = 0; i < capacity; i++) { // Trash the element it.element = null; // Mark it free. it.free.set(true); it = it.next; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public synchronized void clear() {\n }", "public void clear() {collection.clear();}", "public synchronized void clear()\n {\n clear(false);\n }", "public void clear() {\n\t\tcollection.clear();\n\t}", "public void clear() {\n this.collection.clear();\n }", "public void clear() {\n synchronized (unchecked) {\n unchecked.clear();\n }\n }", "public void clear() {\n doClear();\n }", "public void clear() {\r\n // synchronization is not a problem here\r\n // if this code were to be called while someone was getting or setting data\r\n // in the buckets, it would still work\r\n // in the case of someone setting a value in the buckets, then this coming along\r\n // and resetting the buckets-entry to null is fine, because the client still has the data reference\r\n // in the case of someone getting a value from the buckets while this is being reset\r\n // is fine as well because, if they get the data before it's set, they got it\r\n // if they as for it after it gets set to null, that's fine as well it's null and\r\n // that's a normal expected condition\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }", "private void clear() {\n }", "@Override\n public void clear()\n {\n }", "public void clear() {\n doClear( false );\n }", "public synchronized void clear() {\n collected.clear();\n }", "@Override\n public void clear() {\n lock.lock();\n try {\n runtime.clear();\n } finally {\n lock.unlock();\n }\n }", "public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}", "@Override\n public void clear()\n {\n\n }", "public void clear() {\n }", "public void clear() {\n }", "public void clear() {\n }", "public final void clear()\n {\n\t\tcmr_queue_.removeAllElements();\n buffer_size_ = 0;\n }", "public void clear(){\r\n\t\tqueue.clear();\r\n\t}", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "@Override\r\n\tpublic void clear() {\n\t\t\r\n\t}", "public final void clear() {\n clear(true);\n }", "public void clear() {\n\t\tthis.cache.clear();\n\t}", "@Override public void clear() {\n }", "public void clear() {\n this.cache.clear();\n }", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void clear() {\n\t}", "@Override\r\n\tpublic void clear() {\n\r\n\t}", "@Override\n public void clear() {\n \n }", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n public void clear() {\n capacity = 15;\n currentSize = 0;\n this.container = new Object[capacity];\n }", "public void clear() {\n synchronized (LOCK) {\n myValues.clear();\n }\n }", "@Override\r\n\tpublic void clear() {\n\t\tset.clear();\r\n\t}", "public void clear() throws Exception;", "public void clear() {\n cache.clear();\n }", "public void clear()\n {\n }", "public void clear() {\n pool.clear();\n }", "public void clear(){\n\t\tclear(0);\n\t}", "@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}", "public void clear() {\n\t\tIterator<E> iterator = this.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\titerator.next();\n\t\t\titerator.remove();\n\t\t}\n\t}", "public void clear() {\n\n\t}", "public void clear() {\n\t// Does nothing\n}", "public void clear() {\n\t\t\r\n\t}", "public void clear(){\n this.collected.clear();\n }", "public synchronized void clear() {\n _queue.clear();\n }", "@Override\n public void clear() {\n size = 0;\n storage = null;\n }", "private void clearCollection() {\n \n collection_ = getDefaultInstance().getCollection();\n }", "@Override\n\tpublic void clear() {\n\n\t}", "public void clear()\n {\n current = null;\n size = 0;\n }", "@Override\n protected void clear() {\n\n }", "@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}", "public void clear(){\n this.clearing = true;\n }", "public void clear() {\n\t\t// Do nothing\n\t}", "public void clear() {\n this.data().clear();\n }", "public void clear()\r\n\t{\r\n\t\t// Simple as calling onExpire!\r\n\t\tonExpire();\r\n\t}", "public void Clear();", "private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\t}", "@Override\n public void clear() {\n size = 0;\n first = null;\n last = null;\n }", "public void clearContainer()\n\t{\n\t\tcargoList.clear();\n\t\tthis.currentVolume=0;\n\t\tthis.currentWeight=0;\n\t}", "public abstract void clear();" ]
[ "0.7536369", "0.75221354", "0.75068945", "0.744622", "0.7394994", "0.7377753", "0.7364338", "0.72405285", "0.71871215", "0.714919", "0.7145177", "0.7140885", "0.7130695", "0.7127093", "0.7102534", "0.7099879", "0.7099879", "0.70930785", "0.7074915", "0.7060845", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7052673", "0.7045312", "0.7044641", "0.70441103", "0.7043491", "0.70388305", "0.7037245", "0.7037245", "0.7012162", "0.70119774", "0.70059365", "0.7005452", "0.7005452", "0.7005452", "0.7005452", "0.7005452", "0.7005452", "0.7005452", "0.7002539", "0.7000559", "0.6996034", "0.6994585", "0.6994134", "0.6980339", "0.69682854", "0.69669163", "0.69624174", "0.6955419", "0.69543946", "0.6952236", "0.6947274", "0.6944893", "0.6943485", "0.69412106", "0.6933656", "0.69157386", "0.691439", "0.6894195", "0.68936455", "0.6889183", "0.688205", "0.68788993", "0.686824", "0.6865223", "0.6864903", "0.68572414", "0.6850271", "0.6845494" ]
0.0
-1
Construct a node of the list
private Node() { // Start empty. element = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ExpressionList newInstance(Token token, ExpressionList o, Terminal n0, Expression node) {\n List<Expression> expressions = o.expressions;\n expressions.add(node);\n return new ExpressionList(token, expressions);\n }", "public List(E value) {\n\t\thead = new ListNode(value, null);\n\t}", "@Override\n public TreeNode make(Parser parser) {\n Token token = parser.peek();\n if(token.getTokenID() == Token.TIDEN){\n return nAlistNode.make(parser); //alist trans (dont consume token alist will need it)\n }\n return null; //eps trans\n }", "private static Node createLoopedList()\n {\n Node n1 = new Node(1);\n Node n2 = new Node(2);\n Node n3 = new Node(3);\n Node n4 = new Node(4);\n Node n5 = new Node(5);\n Node n6 = new Node(6);\n Node n7 = new Node(7);\n Node n8 = new Node(8);\n Node n9 = new Node(9);\n Node n10 = new Node(10);\n Node n11 = new Node(11);\n\n n1.next = n2;\n n2.next = n3;\n n3.next = n4;\n n4.next = n5;\n n5.next = n6;\n n6.next = n7;\n n7.next = n8;\n n8.next = n9;\n n9.next = n10;\n n10.next = n11;\n n11.next = n5;\n\n return n1;\n }", "LI createLI();", "Node(TNode i, Node n){\t\t\t//A function to create a Node\n\t\telement = i;\t\t\t\t\n\t\tnext = n;\n\t}", "public listNode(String val) {\n\t\t\tdata= val;\n\t\t\tnext= null;\n\t\t\tprevious= null;\n\t\t}", "private static AbstractList construct(LinkedList arg) {\n if (arg.isEmpty())\n return new EmptyList();\n else {\n Object fst = arg.pollFirst();\n //FIXME: The stupid bug in Gson.\n if (fst instanceof Double) fst = ((Double) fst).intValue();\n return new Cons(fst, construct(arg));\n }\n }", "private Node createNode(EventPair ep, Color c, Node parent) {\n Node node = new Node();\n node.ID = ep.ID;\n node.count = ep.count;\n node.color = c;\n node.left = createNullLeaf(node);\n node.right = createNullLeaf(node);\n node.parent = parent;\n return node;\n }", "@Test\n public void testList() {\n SLNode one = new SLNode(1, null);\n SLNode twoOne = new SLNode(2, one);\n SLNode threeTwoOne = new SLNode(3, twoOne);\n\n SLNode x = SLNode.of(3, 2, 1);\n assertEquals(threeTwoOne, x);\n }", "DListNode() {\n item[0] = 0;\n item[1] = 0;\n item[2] = 0;\n prev = null;\n next = null;\n }", "Node(E value) {\n this.value = value;\n this.childen = new ArrayList<>();\n }", "Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }", "public ListNode createList(int len) {\r\n\t\tListNode head = null;\r\n\t\tRandom r = new Random(10);\r\n\t\tfor (int i = 0; i < len; ++i) {\r\n\r\n\t\t\thead = createNode(head, r.nextInt(20) + 1);\r\n\t\t}\r\n\r\n\t\treturn head;\r\n\t}", "private static ListNode initializeListNode() {\n\n\t\tRandom rand = new Random();\n\t\tListNode result = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\tresult.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\treturn result;\n\t}", "public Node createNode(Object object, Class<?> type) {\n\t\t\tif (Types.isKindOf(object.getClass(), List.class)) {\n\t\t\t\treturn new ListNode(object, type);\n\t\t\t}\n\t\t\tif (object.getClass().isArray()) {\n\t\t\t\treturn new ArrayNode(object);\n\t\t\t}\n\t\t\treturn new ObjectNode(object);\n\t\t}", "public LinkedList() {\n\t\tthis(\"list\");\n\t}", "public ListNode(Object newItem){\n\t\tlistItem = newItem;\n\t\tnext = null;\n\t}", "@Override\n\tpublic INode build(List<INode> input) {\n\t\treturn null;\n\t}", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "public ListNode() {\n\t\tthis(0, null);\n\t}", "ListType createListType();", "private void createNodes() {\n head = new ListNode(30);\n ListNode l2 = new ListNode(40);\n ListNode l3 = new ListNode(50);\n head.next = l2;\n l2.next = l3;\n }", "TNode createTNode();", "private final void createAndAddNode(String name) {\n\t}", "public linkedList() { // constructs an initially empty list\r\n\r\n }", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "public Node (Object newItem) {\n next = null; // set intially to null\n item = newItem;\n }", "private void createList(String[] toAdd) {\n FixData fixedList;\n for (int i = 0; i < toAdd.length; ++i) {\n fixedList = new FixData(toAdd[i]);\n if (pickAdjacent(fixedList))\n this.head = createListWrap(this.head, fixedList);\n else\n fixedList = null;\n }\n }", "public Node()\n {\n this.name=\"/\";\n this.type=0;\n this.stage=0;\n children=new ArrayList<Node>();\n }", "abstract void makeList();", "public abstract GraphNode<N, E> createNode(N value);", "void createNode(NodeKey key);", "public LinkList(String data){\n this.head = new Node(data, null);\n this.tail = this.head;\n }", "public ListNode(E d, ListNode<E> node)\n { \n nextNode = node;\n data = d;\n }", "ListItem createListItem();", "void nodeCreate( long id );", "public Node(int data, Node next, char a) {\n // Call the other constructor in the list\n this(data);\n this.next = next;\n }", "UL createUL();", "@Test\n public void testListWithValue() {\n Node makeNumbers1 = makeNumbersNode.withName(\"makeNumbers1\").withInputValue(\"string\", \"1 2 3\");\n Node add1 = addNode.extend().withName(\"add1\").withInputValue(\"v2\", 100.0);\n Node net = Node.NETWORK\n .withChildAdded(makeNumbers1)\n .withChildAdded(add1)\n .connect(\"makeNumbers1\", \"add1\", \"v1\");\n assertResultsEqual(context.renderChild(net, add1), 101.0, 102.0, 103.0);\n }", "private TObj make_node_data(ArrayList arlist, String nodename, int seq, String prefix)\n\t{\n\t\t// String p_value = \"([a-zA-Z0-9_:]+)[\\\\s]*=[\\\\s]*\\\"?([a-zA-Z0-9_\\\\-:\\\\\\\\.��-��]+)\";\n\t\t// 2013.12.17\n\t\tString p_value1 = \"([a-zA-Z0-9-_:]+)[\\\\s]*=[\\\\s]*[\\\"]([^\\\"]+)\";\n\t\tString p_value2 = \"([a-zA-Z0-9-_:]+)[\\\\s]*=[\\\\s]*[']([^']+)\";\n\t\tString p_value3 = \"([a-zA-Z0-9-_:]+)[\\\\s]*=[\\\\s]*([a-zA-Z0-9-_:\\\\.]+)\";\n\t\tPattern p1 = Pattern.compile(p_value1);\n\t\tPattern p2 = Pattern.compile(p_value2);\n\t\tPattern p3 = Pattern.compile(p_value3);\n\t\tTObj nddata = new TObj(_NODE_TYPE, make_path(prefix , nodename), nodename, 100, new TLocation( seq+1, seq+1,0,0,\"\") );\n\t\tfor ( int i = 0; i < arlist.size(); i ++) {\n\t\t\tnode_line_data nd = (node_line_data )arlist.get(i);\n\t\t\tString nodeData = nd.line_data;\n\t\t\tMatcher m1 = p1.matcher(nodeData);\n\t\t\tboolean findflag =false;\n\t\t\tlocallog.trace(\"--\", nodeData);\n\t\t\twhile(m1.find()){\n\t\t\t\tlocallog.debug(\"KEY :: \" , m1.group(1) + \" VALUE :: \" + m1.group(2));\n\t\t\t\tif(brokenflag && m1.group(2).endsWith(\"=\")) {\n\t\t\t\t\treturn make_node_data_fix(arlist, nodename, seq, prefix);\n\t\t\t\t}\n\t\t\t\tString tmp = m1.group(2).trim();\n\t\t\t\tif (tmp.endsWith(\"\\\"\"))\n\t\t\t\t\ttmp = tmp.substring(0, tmp.length() - 1);\n\n\t\t\t\tTDpd nodekey = new TDpd(1, tmp, m1.group(1), 100, new TLocation(nd.seq+1));\n\t\t\t\tnddata.add(nodekey);\n\t\t\t\tfindflag = true;\n\t\t\t}\n\t\t\t// 2014.04.11 \"\", ''\n//\t\t\t 2014.01.10 aaa='ssss\n\t\t\tMatcher m2 = p2.matcher(nodeData);\n\t\t\twhile(m2.find()){\n\t\t\t\tlocallog.debug(\"KEY :: \" , m2.group(1) + \" VALUE :: \" + m2.group(2));\n\t\t\t\tif(brokenflag && m2.group(2).endsWith(\"=\")) {\n\t\t\t\t\treturn make_node_data_fix(arlist, nodename, seq, prefix);\n\t\t\t\t}\n\t\t\t\tString tmp = m2.group(2).trim();\n\t\t\t\tif (tmp.endsWith(\"\\\"\"))\n\t\t\t\t\ttmp = tmp.substring(0, tmp.length() - 1);\n\n\t\t\t\tTDpd nodekey = new TDpd(1, tmp, m2.group(1), 100, new TLocation(nd.seq+1));\n\t\t\t\tnddata.add(nodekey);\n\t\t\t\tfindflag = true;\n\t\t\t}\n\t\t\tif(findflag == false) {\n\t\t\t\t// 2014.01.23 aaa= ssss\n\t\t\t\tMatcher m3 = p3.matcher(nodeData);\n\n\t\t\t\twhile(m3.find()){\n\t\t\t\t\tlocallog.debug(\"KEY :: \" , m3.group(1) + \" VALUE :: \" + m3.group(2));\n\t\t\t\t\tif(brokenflag && m2.group(2).endsWith(\"=\")) {\n\t\t\t\t\t\treturn make_node_data_fix(arlist, nodename, seq, prefix);\n\t\t\t\t\t}\n\t\t\t\t\tString tmp = m3.group(2).trim();\n\t\t\t\t\tif (tmp.endsWith(\"\\\"\"))\n\t\t\t\t\t\ttmp = tmp.substring(0, tmp.length() - 1);\n\n\t\t\t\t\tTDpd nodekey = new TDpd(1, tmp, m3.group(1), 100, new TLocation(nd.seq+1));\n\t\t\t\t\tnddata.add(nodekey);\n\t\t\t\t\tfindflag = true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn nddata;\n\t}", "public RDFList createRDFList(List<Expression> list, int arobase) {\r\n RDFList rlist = new RDFList(newBlankNode(), list); \r\n if (arobase == L_DEFAULT){\r\n arobase = listType;\r\n }\r\n switch (arobase){\r\n \r\n case L_LIST: \r\n rlist = complete(rlist);\r\n break;\r\n \r\n case L_PATH:\r\n rlist = path(rlist);\r\n break;\r\n }\r\n return rlist;\r\n }", "public ListADTImpl() {\r\n head = new GenericEmptyNode();\r\n }", "Node(Object e, Node p, Node n) {\n element = e;\n previous = p;\n next = n;\n }", "public Node(){\n outgoing = new ArrayList<>();\n //System.out.println(\"Node created!\");\n }", "public LinkedList(Object item) {\n\t\tif (item != null) {\n\t\t\tcurrent = end = start = new ListItem(item);// item is the start and end\n\t\t}\n\t}", "private static Node createNode(int value) {\n\t\treturn new Node(value);\n\t}", "ListValue createListValue();", "public MyLinkedList build(int... data) {\n if (data.length <= 0) {\n this.head = null;\n return this;\n }\n this.head = new Node(data[0]);\n for (int i = 1; i < data.length; i++) {\n this.insert(this.head, data[i]);\n }\n\n return this;\n }", "ExprListRule createExprListRule();", "public Node(T t, Node n) {\r\n \r\n element = t;\r\n next = n;\r\n }", "public ListIterator(Node node) {\n\t\tcurrent = node;\n\t}", "public DNode(String e, DNode p, DNode n) { element = e; prev = p; next = n;}", "public ListNode(Object d) {\n\t\tdata = d;\n\t\tnext = null;\n\t}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public ListNode(Object d, ListNode n) {\n\t\tdata = d;\n\t\tnext = n;\n\t}", "public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }", "public Node createNode(int value) {\r\n\t\treturn new Node(value, null, null);\r\n\t}", "public Node(){}", "public ListNode(Object newItem, ListNode nextNode){\n\t\tlistItem = newItem;\n\t\tnext = nextNode;\n\t}", "public MyList() {\n this(\"List\");\n }", "public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}", "LinkedList(E data){\n\n }", "@Override\n public ListNode<T> push(T e) {\n \treturn new ListNode<T>(e, this);\n }", "public TreeList()\n {\n\t this.lst = new AVLTree();\n\t this.length = 0;\n }", "public Node(T value) \n\t\t//PRE: T is initialized\n\t\t//POST: A node is created with value T \n\t\t{\n\t\t\tthis.value = value;\t\n\t\t\tnext = null;\n\t\t\tisCurrent = false;\n\t\t}", "public List(String name) {\n super(name);\n children = new ArrayList<>();\n }", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "public SkipListNode() {\n\t// construct a dummy node\n\tdata = null;\n\tnext = new ArrayList<SkipListNode<K>>();\n\tnext.add(null);\n }", "public Node(){\n\n\t\t}", "private Node(int c) {\n this.childNo = c; // Construct a node with c children.\n }", "public Node(E element)\n {\n data = element;\n this.next = tail;\n this.prev = head;\n }", "OrderedListContent createOrderedListContent();", "public Lista()\n {\n empty=true;\n next = null;\n }", "DListNode2(Object vertex1) {\r\n vertex = vertex1;\r\n list = null;\r\n prev = null;\r\n next = null;\r\n }", "public Node(T value) {\n\t\t\tthis.value = value; // initializing\n\t\t\tnext = null;\n\t\t}", "private static void buildDoublesNode(Document document, NodeList childList, Node newHead) {\n Element doublNode = document.createElement(\"item\");\n Element doublID = document.createElement(\"id\");\n Element doublParent = document.createElement(\"parent\");\n doublNode.appendChild(doublID);\n doublNode.appendChild(doublParent);\n for (int i = 0; i < childList.getLength(); i++) {\n if (childList.item(i).getNodeName().equals(\"id\"))\n doublID.setTextContent(childList.item(i).getTextContent());\n if (childList.item(i).getNodeName().equals(\"parent\")) {\n NodeList parentItemList = childList.item(i).getChildNodes();\n for (int j = 0; j < parentItemList.getLength(); j++) {\n if (parentItemList.item(j).getNodeName().equals(\"item\")) {\n Element innerParentItem = document.createElement(\"item\");\n innerParentItem.setTextContent(parentItemList.item(j).getTextContent());\n doublParent.appendChild(innerParentItem);\n }\n }\n }\n }\n newHead.appendChild(doublNode);\n }", "public ListNode(E d)\n {\n nextNode = null;\n data = d;\n }", "public Node(String val, Node n)\n {\n value = val;\n next = n;\n }", "public Node() \r\n\t{\r\n\t\tincludedNode = new ArrayList<Node>();\r\n\t\tin = false; \r\n\t\tout = false;\r\n\t}", "public static Node bygg(String[] ordliste){\n \treturn new Node();\r\n }", "public ListNode(E data) {\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.next = null;\r\n\t\t}", "public ObjectListNode (Object o) {\n info = o;\n next = null;\n }", "public AdjListNode(int n) {\n\t\tvertexIndex = n;\n\t}", "public LinearNode(T element) {\r\n\t\t\r\n\t\tnext = null;\r\n\t\tthis.element = element;\r\n\t\r\n\t}", "NodeChain createNodeChain();", "public GoalTypeNodeFactory(ArrayList<NetworkCaseApi> caseList)\r\n {\r\n //mData = key;\r\n //mNetworkCaseSetData = networkCaseSetData;\r\n\r\n //mInputList = caseList;\r\n\r\n //for (int i = 0; i < mNetworkCaseSetData.getNetworkCaseList().size(); i++)\r\n for (int i = 0; i < caseList.size(); i++)\r\n {\r\n //if (mNetworkCaseSetData.getNetworkCaseList().get(i).getGoalCase())\r\n if (caseList.get(i).getGoalCase())\r\n {\r\n //Don't add the same student twice...\r\n //We will keep the list to unique student entries only.\r\n if (!mGoalCaseList.contains(caseList.get(i)))\r\n {\r\n mGoalCaseList.add(caseList.get(i));\r\n }\r\n } else\r\n {\r\n //Don't add the same student twice...\r\n //We will keep the list to unique student entries only.\r\n if (!mNonGoalCaseList.contains(caseList.get(i)))\r\n {\r\n mNonGoalCaseList.add(caseList.get(i));\r\n }\r\n }\r\n }\r\n }", "public MyLinkedList()\n {\n head = new Node(null, null, tail);\n tail = new Node(null, head, null);\n }", "SkipList()\r\n {\r\n head = new Node<T>(1); //Create a new head of our skip list and give it height 1.\r\n }", "public ListNode(int mark)\r\n {\r\n // initialise instance variables\r\n this.mark = mark;\r\n this.next = null;\r\n }", "public Node(Integer number){\n this.number = number;\n this.edges = new ArrayList<Edge>();\n }", "public Node createNode(String p_name) {\n\t\tNode n = new Node(p_name, this);\n\t\taddNode(n);\n\t\treturn n;\n\t}", "public Node(String value)\n\t{\n\t\tthis.children = new ArrayList<Node>();\n\t\tthis.value = value;\n\t}", "@Override\n\tpublic void ConstructNetwork() {\n\t\t\n\t\tAddUnit add_r_t=new AddUnit();\n\t\tUnitIterator ui=new UnitIterator();\n\t\tui.unit=add_r_t;\n\n\t\tnetwork=new UnitList();\n\t\tnetwork.unitList.add(ui);\n\t\tnetwork.unitList.add(new AddUnit());\n\t\t\t\n\t}", "public void add(int index, Object value) {\n if (index > _size) {\n throw new ListIndexOutOfBoundsException(\"Error\");\n }\n ListNode node = new ListNode(value);\n if (index == 0) {\n node.next = start;\n start = node;\n } else {\n ListNode prev = start;\n for (int i = 0; i<index - 1; i++ ) {\n prev = prev.next;\n }\n ListNode temp = prev.next;\n prev.next = node;\n node.next = temp;\n } \n _size++;\n }", "public TreeItem(int n, Symbol l, TreeItem[] x) {\n\n\t\ttruncated = false;\n\t\tnumChildren = n;\n\t\tlabel = l;\n\t\tchildren = new TreeItem[n];\n\t\tfor (int i = 0; i < numChildren; i++) {\n\t\t\tchildren[i] = x[i];\n\t\t}\n\t\tdecideNorm = false;\n\t\tisNorm = isNormal();\n\t\tdecideNorm = true;\n\t\tisEmptyString = false;\n\t\tsetNumNodes();\n\t}", "Node(int value, String name) {\n this.value = value;\n this.name = name;\n }", "List<Node> getNode(String str);" ]
[ "0.6406753", "0.6364981", "0.634467", "0.6313181", "0.6287638", "0.62274534", "0.61981034", "0.6148196", "0.61291105", "0.61280924", "0.6115849", "0.6113143", "0.61125386", "0.6106577", "0.6094849", "0.6080739", "0.60717666", "0.60643405", "0.6063781", "0.60616755", "0.6039883", "0.5990371", "0.5963505", "0.5936449", "0.5927433", "0.59042394", "0.58819866", "0.58731854", "0.5863697", "0.5863062", "0.5850373", "0.584596", "0.58458334", "0.5841298", "0.58286226", "0.58251196", "0.5816992", "0.58063626", "0.5794436", "0.57840073", "0.5777733", "0.5769432", "0.57683074", "0.57678175", "0.576664", "0.57434434", "0.57413983", "0.5727644", "0.5719257", "0.5705436", "0.57035196", "0.5701681", "0.56932706", "0.56925607", "0.5686414", "0.5686414", "0.5686414", "0.5686414", "0.5680411", "0.56712484", "0.56699884", "0.5668908", "0.5666256", "0.5664779", "0.56588435", "0.5656426", "0.5644933", "0.5633564", "0.56324124", "0.562914", "0.56211704", "0.5620606", "0.55993193", "0.55989987", "0.5592678", "0.5582664", "0.55802375", "0.5570611", "0.5565335", "0.55644774", "0.55557173", "0.5553195", "0.5547564", "0.5544814", "0.55420303", "0.5541275", "0.5541256", "0.5540696", "0.5533212", "0.553005", "0.55287856", "0.5523651", "0.552324", "0.5520814", "0.55180424", "0.55176944", "0.55138993", "0.55128574", "0.551117", "0.5510068", "0.55096704" ]
0.0
-1
Attach the element to a free node.
public Node<T> attach(T element) { // Sanity check. if (this.element == null) { this.element = element; } else { throw new IllegalArgumentException("There is already an element attached."); } // Useful for chaining. return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node<T> offer(T element) {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Failed!\n return null;\n }\n }", "public Node<T> put(T element) throws InterruptedException {\n do {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Block.\n waitForFree();\n }\n // Forever.\n } while (true);\n }", "public Node<T> add(T element) {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Failed!\n throw new IllegalStateException(\"Capacity exhausted.\");\n }\n }", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "public void newElement() {\r\n }", "public void attach(T e) {\n\t\tif (!this.isEmpty()) {\n\t\t\tsuper.put(e, new Duet<T>(null, first));\n\t\t\tthis.get(first).setFirst(e);\n\t\t\tfirst = e;\n\t\t}\n\t\telse this.add(e);\n\t}", "@Override\n \t\t\t\tpublic void doAttachTo() {\n \n \t\t\t\t}", "XomNode appendElement(Element element) throws XmlBuilderException;", "void addElement(FormElement elt);", "public void addToFreeList(V value) {\n this.mFreeList.add(value);\n }", "public void attach(final E entity) {\n if (entity.getId() != null) return;\n entity.setId(this.getNextId());\n this.entities.add(entity);\n this.id2entity.put(entity.getId(), entity);\n }", "public Node appendNode(Node node);", "public void settInn(T element){\n Node temp = new Node(element);\n temp.neste = hode.neste;\n temp.neste.forrige = temp;\n temp.forrige = hode;\n hode.neste = temp;\n elementer++;\n\n\n }", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "boolean offer(E newElement);", "public void append(T element);", "public void append(T element);", "@Override\r\n\tpublic void enqueue(Object element){\r\n\t\tif(head == null) {\r\n\t\t\thead = new Node(element);\r\n\t\t\ttail = head;\r\n\t\t}else {\r\n\t\t\ttail.next = new Node(element);\r\n\t\t\ttail = tail.next;\r\n\t\t}\r\n\t\tsize++;\r\n\t}", "public AccessibilityNode putNode(XAccessible xAccessible, AccessibilityNode node) {\n if (xAccessible != null) {\n String oid = UnoRuntime.generateOid(xAccessible);\n java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference) \n nodeList.put(oid, new java.lang.ref.WeakReference(node));\n if (ref != null) {\n return (AccessibilityNode) ref.get();\n }\n }\n return null;\n }", "Node(E item) {\n UNSAFE.putObject(this, itemOffset, item);\n }", "public void addElement(ThingNode element)\n\t{\n\t\tsuper.addElement(element);\n\t\telements.add(element);\n\t}", "public void assign(int indice, T element) {\r\n\t\tif (theHeap.size() == 0 || indice > theHeap.size()) {\r\n\t\t\ttheHeap.add(element);\r\n\t\t} else {\r\n\t\t\ttheHeap.add(indice, element);\r\n\t\t}\r\n\t}", "public DNode<E> addBeg(E ele)\n {\n\n \tDNode<E> p=new DNode<E>(ele);\n if(first==null)\t\t\t//No elements in the list\n first=last=p;\n else\t\t\t//Updating the first pointer\n {\n p.next=first;\n first.prev=p;\n first=p;\n }\n return first;\n }", "public void add(T elem){\n\t\tNode<T> toAdd = new Node<T>(elem);\r\n\t\tif(this.start == null)\r\n\t\t\tthis.start = toAdd;\r\n\t\telse {\r\n\t\t\tNode<T> temp = this.start;\r\n\t\t\twhile (temp.next != null)\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\ttemp.next = toAdd;\r\n\t\t}\r\n\t}", "void append(E element);", "public void add (Object element)\n {\n if (position == null)\n {\n addFirst(element);//LL is empty\n position = first;\n }\n else{\n Node newNode = new Node();\n newNode.data = element; // Alias \n newNode.next = position.next; //I know who is next \n position.next =newNode; //Iterator thinks next is me\n position= newNode;// current posiion is me, little conflict if you call remove\n \n \n }\n isAfterNext = false;\n \n }", "private int setFirstFree(final T element) {\r\n\t\tfinal int idx = firstFree;\r\n\t\tserializer.setRandomAccess(idx, element);\r\n\t\tfirstFree = getNextPointer(idx);\r\n\t\t// the pointer will be 0 if it was not unlinked before\r\n\t\tif (firstFree == 0) {\r\n\t\t\tfirstFree = idx + 1;\r\n\t\t}\r\n\t\treturn idx;\r\n\t}", "@Override\t\n\tpublic void innKoe(T element){\n\t\t\tLinearNode<T> nyNode= new LinearNode<T>(element);\n\t\t\t\n\t\t\tif(erTom()){\n\t\t\t\tfront = nyNode;\n\t\t\t\n\t\t\t}else{\n\t\t\t\tbak.setNeste(nyNode);\n\t\t\t}\n\t\t\tbak = nyNode;\n\t\t\tantall++;\n\t\t\t}", "org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement addNewBridgeElement();", "private void linkFirst(final T element) {\r\n\t\tfinal int f = first;\r\n\t\tfinal int newNode = setFirstFree(element);\r\n\r\n\t\tsetNextPointer(newNode, f);\r\n\t\tsetPrevPointer(newNode, -1); // undefined\r\n\t\tfirst = newNode;\r\n\r\n\t\tif (f == -1) {\r\n\t\t\tlast = newNode;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(f, newNode);\r\n\t\t}\r\n\t\tsize++;\r\n\t\tmodCount++;\r\n\t}", "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "@Override\n public void add(T element){\n if(isEmpty()){\n this.first = new DLLNode<T>(element);\n this.last = this.first;\n } else{\n DLLNode<T> current = this.first;\n while(current.successor!=null){\n current = current.successor;\n }\n current.successor = new DLLNode<T>(element, current,null);\n this.last = current.successor;\n this.last.previous = current;\n }\n }", "public void addAfter(T existing, T element) throws ElementNotFoundException;", "public void insertAfter(T element) {\n setNext( new LLNode<T>(element, getNext()));\n }", "public void add(int index, Object element) {\r\n refs.add(index, new WeakReference(element));\r\n }", "public void add(E element){\r\n\t\tif(lastNode==null){\r\n\t\t\tlastNode=new DoubleNode<E>(null,element,null);\r\n\t\t\tfirstNode=lastNode;\r\n\t\t\tsize++;\r\n\t\t}else{\r\n\t\t\tDoubleNode<E> newNode= new DoubleNode<E>(lastNode,element,null);\r\n\t\t\tlastNode=newNode;\r\n\t\t\tsize++;\r\n\t\t}\r\n\t}", "public void add(T element) {\n\n Node<T> node = new Node(element);\n\n if (itsFirstNode == null) {\n itsFirstNode = node;\n itsLastNode = node;\n }\n else {\n itsLastNode.setNextNode(node);\n\t\t\tnode.setPriorNode(itsLastNode);\n itsLastNode = node;\n }\n size++;\n }", "public void addAttachedBlock(TempBlock tempBlock) {\r\n\t\tthis.attachedTempBlocks.add(tempBlock);\r\n\t\ttempBlock.attachedTempBlocks.add(this);\r\n\t}", "public void enqueue (E element);", "public void insertNode(Item it) {\n this.currentPosition = new Node(this.currentPosition, it, this.currentPosition.next);\n }", "@Override\n public abstract void addToXmlElement(Element element);", "public abstract boolean addDataTo(Element element);", "@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }", "@Override\n\tpublic void enqueue(E e) {\n\t\tNode node = new Node();\n\t\tnode.element = e;\n\t\tnode.next = null;\n\t\t\n\t\tif (last != null)\n\t\t\tlast.next = node;\n\t\telse\n\t\t\tfirst = node;\n\t\tlast = node;\n\t\t\n\t}", "public void add(GuiElementBase element)\n\t\t{ insert(children.size(), element); }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public void attach(Position<E> v, BinaryTree<E> T1, BinaryTree<E> T2) throws InvalidPositionException;", "void attach(final Dir d, final Cell a) {\r\n\t\tif (a != null) {\r\n\t\t\tif (a.get(d.opposite()) != null) a.get(d.opposite()).set(d, null);\r\n\t\t\ta.set(d.opposite(), this);\r\n\t\t}\r\n\r\n\t\tif (get(d) != null) get(d).set(d.opposite(), null);\r\n\t\tset(d, a);\r\n\t}", "public void addElement(Object obj);", "public void setElement(T elem)\n {\n\n element = elem;\n }", "protected void attach()\r\n {\r\n Object o = _CURRENT_CONTEXT.get();\r\n // We want to catch two different problems:\r\n // (1) A failure to call release()\r\n // (2) An attempt to attach an instance when the thread already has one\r\n // For #1, anything more than a warning is dangerous, because throwing\r\n // an exception would permanently make the thread unusable.\r\n // For #2, I'd like to throw an exception, but I can't distinguish\r\n // this scenario from #1.\r\n if (o != null)\r\n {\r\n// _LOG.warning(\"TRYING_ATTACH_RENDERERINGCONTEXT\");\r\n }\r\n\r\n _CURRENT_CONTEXT.set(this);\r\n }", "public void attach(Object key, Object value);", "public Object attach(Object object)\n{\n\treturn object;\n}", "public void insert(E elementToInsert, double valueOfElem) {\r\n\t\tif (this.size == this.capacity) {\r\n\t\t\tincreaseSize();\r\n\t\t}\r\n\t\tthis.size += 1;\r\n\t\tthis.objectHeap[this.size - 1] = elementToInsert;\r\n\t\tthis.costHeap[this.size - 1] = this.INFINITY;\r\n\t\tthis.locations.put(elementToInsert, this.size-1);\r\n\t\tthis.decreaseKey(this.size - 1, valueOfElem);\r\n\t}", "public void setElement(T newvalue);", "public void setElement(Object e) {\n element = e;\n }", "default public void attach(Object value) {\n attach(value.getClass(), value);\n }", "public void addExisting(SelectableGraphElement element)\n {\n elements.add(element);\n }", "public void offerFront(E elem);", "@Override\n public void newActiveElement(String elementName, Point2D.Double location){\n Element newElement = getLevel().getLevelElements().get(elementName).createElementCopy(location);\n getActiveElements().put(newElement.getId(),newElement);\n addToFrontEndCommands(new CreateCommand(newElement.getId(),newElement.getImage(),newElement.getElementType(),newElement.getLocation(),newElement.getHeading(), 1, newElement.getRadius()));\n }", "public void moveTo(Node thisNode){\n \n //remove from current node\n currentNode.deleteAnt(this);\n \n currentNode = thisNode;\n \n //add ant to new node\n currentNode.addAnt(this);\n \n //is new node visible? if not, it is now\n boolean visibility = currentNode.getVisibility();\n if (visibility == false){\n currentNode.setVisibility(true);\n currentNode.refreshNode();\n currentNode.updateNode();\n }\n }", "public void appendToNode( Item node, Item item ) {\r\n\t\tappendToNode(node, item, null);\r\n\t}", "public void addToFront(T elem) {\r\n\tDLLNode<T> newNode = new DLLNode<T>(elem);\r\n\t\r\n\tif (header == null) {\r\n\t\theader = newNode;\r\n\t}\r\n\tif (trailer == null)\r\n\t\ttrailer = newNode;\r\n\telse {\r\n\t\tnewNode.setLink(header);\r\n\t\theader.setBack(newNode);\r\n\t\theader = newNode;\r\n\t}\r\n\tsize++;\r\n\r\n}", "public void offer(E e) throws NullPointerException {\n\t\tif (e == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tapq.add(e);\n\t\tupheap(this.size()); // size changed\n\t\t// implement this method\n\t}", "public void setElement(E element)\n\t{\n\t\tthis.data = element;\n\t}", "void bind(Object element);", "public void graphicalAttach(GraphicalTemplateElement e, RelativePosition edgeOrig, RelativePosition edgeDest)\n\t{\n\t\t_attachedElements.put(edgeOrig, new Couple<RelativePosition,GraphicalTemplateElement>(edgeDest,e));\n\t}", "public void insert(T element)\r\n\t{\n\t\tif (size >= data.length - 1)\r\n\t\t{\r\n\t\t\tresize();\r\n\t\t}\r\n\t\t\r\n\t\t//add the new element\r\n\t\tsize++;\r\n\t\tdata[size] = element;\r\n\t\tswim(size);\r\n\t}", "public void addAtFront(double element){\r\n\t head = new DoubleNode(element, head);\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n }", "@Override\n\tpublic void setElement(Element element) {\n\t\t\n\t}", "public void add(E element) {\n\t\t// your code here\n\t}", "public void addElement(TLProperty element);", "public void setElementNeeded(ExternalElements pElementNeeded){\n\t\telementNeeded = pElementNeeded;\n\t}", "public void addElement(HuffmanTreeNode<T> theObject) {\r\n \r\n @SuppressWarnings(\"unchecked\")\r\n HuffmanTreeNode<T> theObject2 = (HuffmanTreeNode<T>) theObject;\r\n node = theObject2;\r\n super.addelement(node);\r\n length++;\r\n\r\n }", "public void setElement(String newElem) { element = newElem;}", "public synchronized void addElement(Element element) throws DTDException {\r\n\r\n String name = element.getName();\r\n\r\n if (name == null) {\r\n String err = \"An element declaration must contain a name.\";\r\n throw new DTDException(err);\r\n }\r\n if (elements.containsKey(name)) {\r\n String err = \"An element declaration already exists with the given name: \";\r\n throw new DTDException(err + name);\r\n }\r\n\r\n elements.put(name,element);\r\n\r\n }", "public void addFirst(Object element)\n {\n Node newNode = new Node();\n newNode.data = element;\n newNode.next = first;\n first = newNode; \n \n }", "Form addElement(Element element);", "public Node(T element) {\n\t\tthis.element = element;\n\t\tthis.next = null;\n\t}", "public void setElement (T element) {\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\r\n\t}", "public void add(T element) {\n\t\tif (size == 0) {\n\t\t\thead = new Node<>(element);\n\t\t\ttail = head;\n\t\t} else {\n\t\t\ttail.next = new Node<>(element);\n\t\t\tthis.tail = tail.next;\n\t\t}\n\t\tsize++;\n\t}", "void add(Object element);", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "public void addNormal(E element) {\n\t\tsuper.add(element);\r\n\t}", "public Node(T ele) {\r\n\t\t\tthis.ele = ele;\r\n\t\t}", "public void add(E element)\r\n\t{\r\n\t\tif( root == null)\r\n\t\t{\r\n\t\t\troot = new BTNode<E>(element, null, null);\r\n\t\t\tnumItems++;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tBTNode<E> cursor = root;\r\n\t\t\tboolean done = false;\r\n\r\n\t\t\twhile(!done)\r\n\t\t\t{\r\n\t\t\t\tif(element.compareTo(cursor.getData()) <=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(cursor.getLeft() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcursor.setLeft(new BTNode<E>(element, null , null));\r\n\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\tnumItems++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcursor = cursor.getLeft();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif(cursor.getRight() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcursor.setRight(new BTNode<E>(element, null, null));\r\n\t\t\t\t\t\tdone = true;\r\n\t\t\t\t\t\tnumItems++;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcursor = cursor.getRight();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void newElement() {\n Location = null;\n Name = null;\n MyFont = FontList.FONT_LABEL;\n }", "public void add(Node node) {\n if (node.getId() != null) {\n if (node.getId().equals(\"DestructibleBlock\")) {\n staticElements.add(node);\n destructibleBlocks.add((DestructibleBlock) node);\n }\n if (node.getId().equals(\"IndestructibleBlock\")) {\n staticElements.add(node);\n }\n }\n fieldPane.getChildren().add(node);\n }", "public void attachRightSubtree(BinaryTree<E> right) \n\t{\n\t\tif (root == null) //if the tree being attatched to is empty\n\t\t\tthrow new TreeException(\"Cannot attatch to an empty tree.\");\n\t\tif(right == null) //if subtree to be attatched is empty\n\t\t\treturn; //do nothing\n\t\troot.right = right.root; //right child of tree root is the root of \"right\" tree\n\t\tright.root.parent = root; //parent of \"right\" tree is root of tree\n\t\tright = null; //\"right\" tree pointer is destroyed\n\t}", "public void insert(Object element)\n {\n if(head==null){\n head=tail=new SLListNode(element,head);\n return;\n }\n head=new SLListNode(element,head);\n }", "public void copyAndInsertElement(XmlNode node) {\n\t\t\t\n\t\tXmlNode newNode = duplicateDataFieldNode(node);\n\t\tduplicateDataFieldTree(node, newNode);\n\t\t\t\n\t\taddElement(newNode);\n\t\t\n\t}", "public void enqueue(T element);", "public void add(E element){\n\t\tArrayQueue<E> temp = new ArrayQueue<E>();\n\t\ttemp.enqueue(element);\n\t\tQ.enqueue(temp);\n\t}", "public void push(Object anElement);", "public UpTreeNode(E element) {\n\t\t\tsetElement(element);\n\t\t\tsetParent(this);\n\t\t\tsetCount(1);\n\t\t}", "@Override\r\n\tpublic void updateElement() {\n\r\n\t}", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public Node insertAfter(Node node);", "protected abstract void maybeBindNode(OutlineNode node, Line line, AnchorManager anchorManager);" ]
[ "0.6780226", "0.655624", "0.6154848", "0.5897974", "0.5716575", "0.56900775", "0.5660084", "0.54446924", "0.5383846", "0.5369439", "0.5362026", "0.5337238", "0.52961886", "0.5276872", "0.52585053", "0.5221719", "0.5191331", "0.5191331", "0.5185226", "0.51554996", "0.515086", "0.5133616", "0.51281154", "0.51233304", "0.51022416", "0.5100122", "0.5091145", "0.50891477", "0.5074124", "0.5070522", "0.5064592", "0.5061393", "0.50592166", "0.50495905", "0.5040131", "0.5035862", "0.5033998", "0.5017858", "0.50139904", "0.5011077", "0.50103474", "0.5010198", "0.5006544", "0.50061566", "0.49894658", "0.49770945", "0.4967977", "0.49613473", "0.49493477", "0.4949241", "0.49442926", "0.49432468", "0.49401614", "0.4936299", "0.4936188", "0.49320328", "0.49268484", "0.4921399", "0.49207202", "0.4919343", "0.4905134", "0.49050093", "0.49040222", "0.49024004", "0.49016753", "0.4901539", "0.48985204", "0.48894373", "0.48839718", "0.48837024", "0.48765168", "0.48763195", "0.48757413", "0.48712274", "0.48708946", "0.48691687", "0.48666534", "0.48621038", "0.48611796", "0.48595297", "0.48571438", "0.4850358", "0.48435733", "0.48417667", "0.48405096", "0.48392177", "0.4838603", "0.48384315", "0.48345023", "0.4829617", "0.48284382", "0.4827073", "0.48264912", "0.48217008", "0.4820478", "0.48141676", "0.4813889", "0.4808049", "0.48075274", "0.48047677" ]
0.6182987
2
Detach the element from a node.
public Node<T> detach(T element) { // Sanity check. if (this.element == element) { this.element = null; } else { throw new IllegalArgumentException("Removal of wrong element."); } // Useful for chaining. return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeElement(ThingNode element)\n\t{\n\t\tsuper.removeElement(element);\n\t\telements.remove(element);\n\t}", "public void remove() {\n removeNode(this);\n }", "Object unlink(Node x) {\n final Object element = x.item;\n final Node next = x.next;\n final Node prev = x.pre;\n\n //当前节点为first节点\n if (prev == null) {\n //删除这个节点时,要将next节点赋值为first节点\n first = next;\n } else {\n prev.next = next;\n x.pre = null;\n }\n\n //最后一个节点\n if (next == null) {\n last = prev;\n } else {\n next.pre = prev;\n x.next = null;\n }\n\n x.item = null;\n size--;\n return element;\n }", "public abstract void removeChild(Node node);", "public void removeNode()\n\t{\n\t\tif (parent != null)\n\t\t\tparent.removeChild(this);\n\t}", "private Node removeElement() {\n if (this.leftChild != null) {\n if (this.rightChild != null) {\n Node current = this.rightChild;\n\n while (current.leftChild != null) {\n current = current.leftChild;\n }\n\n //swap\n E value = this.value;\n this.value = current.value;\n current.value = value;\n\n this.rightChild = this.rightChild.removeElement(current.value);\n return this.balance();\n } else {\n return this.leftChild;\n }\n } else {\n return this.rightChild;\n }\n }", "public T remove (T element);", "E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}", "public void onRemoveNode(Node node) {\n\t}", "@Override\n\tpublic void detach(Object entity) {\n\t\t\n\t}", "public void remove(T element);", "@DISPID(2)\n\t// = 0x2. The runtime will prefer the VTID if present\n\t@VTID(8)\n\tvoid removeChild(@MarshalAs(NativeType.VARIANT) java.lang.Object node);", "public void cutNode ()\n {\n copyNode();\n deleteNode();\n }", "public void removeChild(WSLNode node) {children.removeElement(node);}", "Form removeElement(Element element);", "public String eraseNode() {\n\n String assist = lastIn.info;\n lastIn = lastIn.next;\n size--;\n return assist;\n }", "public void detach() {\n\n\t\t\t}", "void deleteNode(ZVNode node);", "public void delete(T element);", "private T unlink(final int idx) {\r\n\t\tfinal T element = serializer.getRandomAccess(idx);\r\n\t\tfinal int next = getNextPointer(idx);\r\n\t\tfinal int prev = getPrevPointer(idx);\r\n\r\n\t\tif (prev == -1) {\r\n\t\t\tfirst = next;\r\n\t\t} else {\r\n\t\t\tsetNextPointer(prev, next);\r\n\t\t}\r\n\r\n\t\tif (next == -1) {\r\n\t\t\tlast = prev;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(next, prev);\r\n\t\t}\r\n\r\n\t\tdeleteElement(idx);\r\n\t\tsize--;\r\n\t\tmodCount++;\r\n\t\treturn element;\r\n\t}", "private void removeSubElement(Element p_element)\n {\n Element parent = p_element.getParent();\n int index = parent.indexOf(p_element);\n\n // We copy the current content, clear out the parent, and then\n // re-add the old content, inserting the <sub>'s textual\n // content instead of the <sub> (this clears any embedded TMX\n // tags in the subflow).\n\n ArrayList newContent = new ArrayList();\n List content = parent.content();\n\n for (int i = content.size() - 1; i >= 0; --i)\n {\n Node node = (Node)content.get(i);\n\n newContent.add(node.detach());\n }\n\n Collections.reverse(newContent);\n parent.clearContent();\n\n for (int i = 0, max = newContent.size(); i < max; ++i)\n {\n Node node = (Node)newContent.get(i);\n\n if (i == index)\n {\n parent.addText(p_element.getText());\n }\n else\n {\n parent.add(node);\n }\n }\n }", "private Node popNode() {\n\t\treturn open.remove(0);\n\t}", "public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }", "void unbind(Object element);", "public void removeElement(SvgElement element) {\n Objects.requireNonNull(element);\n if (children.contains(element)) {\n children.remove(element);\n updateChildrenAttribute();\n }\n }", "public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }", "@Override\r\n\t\tpublic Node removeChild(Node oldChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "private void removeNode(DLinkedNode node){\n DLinkedNode pre = node.pre;\n DLinkedNode post = node.post;\n\n pre.post = post;\n post.pre = pre;\n }", "public void remove(Declarator element) throws ChameleonProgrammerException;", "public void detach() {\n\t\tsetParent(null);\n\t}", "private void removeNode(DNode node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }", "private void removeNode(Node<E> node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }", "public Node removeFromChain();", "public void remove(Node node) {\n\t\tNode cloneNode = node;\n\t\tint index = indexOf(cloneNode.block);\n\t\tif (index != (-1)){\n\t\t\tgetNode(index - 1).next = cloneNode.next;\n\t\t\tgetNode(index + 1).previous = cloneNode.previous;\n\t\t\tsize--;\n\t\t\t\n\t\t}\n\t}", "public void remove () { this.setAsDown(); n.remove(); }", "synchronized void detachParent() {\n if (!isRoot()) {\n Neighbor neighbor = node.getParent();\n if (neighbor != null) {\n neighbor.detach();\n node.parent = null;\n }\n node.makeRoot();\n }\n }", "public boolean removeNode(Node n);", "private void removeNode(DLinkedNode node) {\n\t\t\tDLinkedNode pre = node.pre;\n\t\t\tDLinkedNode post = node.post;\n\n\t\t\tpre.post = post;\n\t\t\tpost.pre = pre;\n\t\t}", "public Node2 delete() {\n \tNode2 temp = first;\n\t first = first.nextLink;\n\t first.nextLink.prevLink = null;\n\t return temp;\n }", "private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }", "@Test\n public void test_TCM___detach() {\n final Element element = new Element(\"element\");\n element.setAttribute(\"name\", \"value\");\n\n final Attribute attribute = element.getAttribute(\"name\");\n\n // should never occur, just to be sure\n assertNotNull(\"no attribute found\", attribute);\n\n\n assertNotNull(\"no parent for attribute found\", attribute.getParent());\n\n attribute.detach();\n\n assertNull(\"attribute has still a parent\", attribute.getParent());\n }", "void arbitraryRemove(Nodefh node){\n\t\n\t\tif(node.Parent.Child == node){\n\t\t\tif(node.Right != null && node.Right != node){\n\t\t\t\tnode.Parent.Child = node.Right;\n\t\t\t\tif(node.Left!=null && node.Left != node){\n\t\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnode.Right.Left = node.Right;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnode.Parent.Child = null;\n\t\t\t\tnode.Parent = null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(node.Left != null && node.Left != node){\n\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t}\n\t\t\tnode.Parent = null;\n\n\t\t}\n\t\tif(node.Child!=null){\n\t\t\tNodefh temp = node.Child;\n\t\t\tif(node.Child.Right!=null){\n\t\t\t\ttemp = node.Child.Right;\n\t\t\t}\n\t\t\tfhInsert(node.Child);\n\t\t\twhile(temp!=node.Child.Right){\n\t\t\t\tfhInsert(temp);\n\t\t\t\ttemp = temp.Right;\n\t\t\t}\n\n\t\t}\n\n\t}", "private E remove(Node<E> node) {\n Node<E> predecessor = node.getPrev();\n Node<E> successor = node.getNext();\n predecessor.setNext(successor);\n successor.setPrev(predecessor);\n size--;\n return node.getElement();\n }", "public void remove(SelectableGraphElement element)\n {\n if (element != null) {\n element.setSelected(false);\n elements.remove(element);\n }\n }", "void removeNode(NodeKey key);", "@Override\n\tpublic void remove(Element e) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(T element) {\n\r\n\t}", "private E remove(Node node) {\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != node) {\n\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = p.next;\n\n\t\treturn node.data;\n\t}", "public E remove(int idx) {\n\n\t\tE retVal = remove(getNode(idx));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public void unassociate(Node otherNode, QName associationTypeQName, Directionality directionality);", "public void remove(IVisualElement elem) {\n children.remove(elem);\n if (elem.getParent() == parentRef.get()) {\n elem.setParent(null);\n }\n }", "public E BSTRemove(Position<E> arg) throws InvalidPositionException {\n PNode<E> v = validate(arg);\n E old = v.element();\n \n if (v.left != null && v.left.isExternal()){\n RemoveExternal(v.left);\n }else if (v.right != null && v.right.isExternal()){\n RemoveExternal(v.right);\n }else{ // find v's\n PNode<E> w = v.right;\n while (w != null && w.isInternal()){\n w = w.left;\n }\n v.setElement( w.parent.element() );\n RemoveExternal(w);\n }\n //checkRoot();\n \n return old;\n }", "void removeNode(Entity entity) {\n\t\tProcessing.nodeSet.remove(entity);\n\t\tProcessing.friendMap.remove(entity);\n\n\t\tSystem.out.println(\"the person was successfully removed from the network.\");\n\t}", "public static void remove() {\n if (create()) {\n DOM.removeChild((com.google.gwt.user.client.Element) \n tag.getParentElement(), \n (com.google.gwt.user.client.Element) tag);\n tag = null;\n removed = true;\n }\n }", "protected void detach(BSTNode n, BSTNode par) {\n\t\tassert (n != null);\n\t\tassert (par != null);\n\t\tassert (n.parent == par);\n\t\tassert ((par.left == n) || (par.right == n));\n\n\t\tclearParentReference(n);\n\t\tn.parent = null;\n\t}", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "public void unassociate(Node targetNode, QName associationTypeQName);", "protected void elementRemoved(MutationEvent evt) throws MelodyException {\r\n\t\tsuper.elementRemoved(evt);\r\n\t\t// the removed node\r\n\t\tElement t = (Element) evt.getTarget();\r\n\t\tDUNID tdunid = DUNIDDocHelper.getDUNID(t);\r\n\t\t// its parent node\r\n\t\tElement p = (Element) t.getParentNode();\r\n\t\tDUNID pdunid = DUNIDDocHelper.getDUNID(p);\r\n\t\t// Modify the DUNIDDoc\r\n\t\tDocument d = getOwnerDUNIDDoc(p).getDocument();\r\n\t\tElement tori = DUNIDDocHelper.getElement(d, tdunid);\r\n\t\tDUNIDDocHelper.getElement(d, pdunid).removeChild(tori);\r\n\t\t// Modify the targets descriptor\r\n\t\tif (!areTargetsFiltersDefined()) {\r\n\t\t\t/*\r\n\t\t\t * If there is no targets filters defined, there's no need to modify\r\n\t\t\t * the targets descriptor.\r\n\t\t\t */\r\n\t\t\treturn;\r\n\t\t}\r\n\t\td = getTargetsDescriptor().getDocument();\r\n\t\ttori = DUNIDDocHelper.getElement(d, tdunid);\r\n\t\tif (tori != null) { // removed node is in the targets descriptor\r\n\t\t\tDUNIDDocHelper.getElement(d, pdunid).removeChild(tori);\r\n\t\t}\r\n\t}", "public static void delete(Nodelink node){\n\n Nodelink temp = node.next;\n node = null;\n\n node = temp;\n\n }", "public T remove(T element) throws EmptyCollectionException, ElementNotFoundException;", "public void delete(E e) {\n\t\tNode node = getNode(root, e);\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tif (parentOfLast.right != null) {\n\t\t\tnode.data = parentOfLast.right.data;\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tnode.data = parentOfLast.left.data;\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t\tsize--;\n\t}", "public T remove(Node<T> u) {\n\t\tif (u == nil || u == null)\n\t\t\treturn null;\n\n\t\tT element = u.x;\n\n\t\t// merge children of removed node\n\t\tNode<T> subroot = merge(u.left, u.right);\n\t\tif (subroot != nil)\n\t\t\tsubroot.parent = u.parent;\n\n\t\tif (u == r) // root was removed\n\t\t\tu = subroot;\n\t\telse if (u.parent.left == u)\n\t\t\tu.parent.left = subroot;\n\t\telse\n\t\t\tu.parent.right = subroot;\n\t\tn--;\n\t\treturn element;\n\t}", "public void removeChildren(QueryNode childNode);", "public void detach(Beobachter b) {\n beobachter.remove(b);\n }", "public BinaryNode removeNode(BinaryNode node){\n if(isLeaf(node)){//base case\n BinaryNode parent = (BinaryNode) node.getParent();\n if(parent == null){\n root = null;\n }\n else{\n parent.removeChild(node);\n }\n size--;\n return parent;\n }\n BinaryNode lower = descendant(node);\n promote(lower, node);\n return removeNode(lower);\n }", "public void remove() {\n this.getNext().setPrev(this.getPrev());\n this.getPrev().setNext(this.getNext());\n }", "public void removeNodeAfterThis() {\r\n\t\tif ( link != null ) {\r\n\t\t\tlink = link.link;\r\n\t\t} // end precondition\r\n\t}", "public void remove(GuiElementBase element) {\n\t\tif (!children.remove(element))\n\t\t\tthrow new UnsupportedOperationException(\"The specified element is not a child of this container\");\n\t\tif (element.isPressed())\n\t\t\telement.getContext().setPressed(null);\n\t\telement.setContext(null);\n\t\telement.setParent(null);\n\t\tonChildRemoved(element);\n\t}", "public void removeElement(E targetElement){\n\r\n Node<E> curr = head;\r\n Node<E> prev = null;\r\n\r\n if(curr != null && curr.getItem() == targetElement){\r\n head = curr.getNext();\r\n }\r\n\r\n while (curr != null){\r\n\r\n if(curr.getItem() == targetElement){\r\n curr = curr.getNext();\r\n }\r\n curr = curr.getNext();\r\n }\r\n }", "public void removeNode(Node<E> node) {\n super.removeNode(node);\n addNodeToCache(node);\n }", "private void removeNode(DLinkedNode node){\n\t\tDLinkedNode prev = node.prev;\n\t\tDLinkedNode next = node.next;\n\n\t\tprev.next = next;\n\t\tnext.prev = prev;\n\t}", "private void removeElement(PathwayElement affectedData)\n \t{\n \n \t}", "static void deleteNode(Node node){\n\t\tif(node.next==null){\r\n\t\t\tnode=null;\r\n\t\t}\r\n\t\tnode.data=node.next.data;\r\n\t\tnode.next=node.next.next;\r\n\t}", "private void removeHiElement(Element p_element)\n {\n Element parent = p_element.getParent();\n int index = parent.indexOf(p_element);\n\n // We copy the current content, clear out the parent, and then\n // re-add the old content, inserting the <hi>'s content\n // instead of the <hi>.\n\n ArrayList newContent = new ArrayList();\n List content = parent.content();\n\n for (int i = content.size() - 1; i >= 0; --i)\n {\n Node node = (Node)content.get(i);\n\n newContent.add(node.detach());\n }\n\n Collections.reverse(newContent);\n parent.clearContent();\n\n for (int i = 0, max = newContent.size(); i < max; ++i)\n {\n Node node = (Node)newContent.get(i);\n\n if (i == index)\n {\n parent.appendContent(p_element);\n }\n else\n {\n parent.add(node);\n }\n }\n }", "private void deleteNode(Node node) {\n node.prev.next = node.next;\n node.next.prev = node.prev;\n }", "public void delete() {\n this.root = null;\n }", "private static void deleteElement(RubyProjectElement element) {\r\n \t\tRubyProject projectInternal = element.getRubyProjectInternal();\r\n \t\tprojectInternal.getRubyElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \t}", "public static void borrarElement(Element element) throws Exception {\n\t\tEntityManager em = JPA.em();\n\t\tElementPK pk = new ElementPK();\n\t\tpk.setCodi(element.codi);\n\t\tpk.setComunitat(element.comunitat.nif);\n\t\tElement actorToBeRemoved = em.find(Element.class, pk);\n\n\t\ttry {\n\t\t\tem.remove(actorToBeRemoved);\n\t\t\tem.flush();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n // delete the node with the element in input\n public boolean delEl (E el){\n if (this.size <= 0 || el == null)\n return false;\n\n // compare to head and tail\n if (el.compareTo(this.head.getValue()) == 0){\n this.delHead();\n return true;\n }\n else if (el.compareTo(this.tail.getValue()) == 0){\n this.delTail();\n return true;\n }\n\n // check to see if there's more then one element\n if((Node2<E>)this.head.getNext() == null)\n return false;\n\n // iterate all the elements of the list\n for (Node2<E> prev = (Node2<E>)this.head, iter = (Node2<E>)this.head.getNext(); iter.getNext() != null; iter = (Node2<E>)iter.getNext(), prev = (Node2<E>)prev.getNext()){\n if (el.compareTo(iter.getValue()) == 0){\n prev.setNext(iter.getNext());\n iter = null;\n this.size--;\n return true;\n }\n }\n\n return false;\n }", "public static Node deleteElement(final Node node, final String xPath) throws Exception {\r\n\r\n Node delete = selectSingleNode(node, xPath);\r\n assertNotNull(\"No node found for provided xpath [\" + xPath + \"]\", delete);\r\n if (delete instanceof AttrImpl) {\r\n throw new Exception(\"Removal of Element not successful! \" + \"xPath selects an Attribute!\");\r\n }\r\n else {\r\n delete.getParentNode().removeChild(delete);\r\n }\r\n return node;\r\n }", "public void removeNode(Node p_node) {\n\t\tnodes.remove(p_node);\n\t}", "private E removeNode(Node n) {\n \tassert (n != sentinel);\n \tn.succ.pred = n.pred;\n \tn.pred.succ = n.succ;\n \tsize--;\n \treturn n.data;\n }", "public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }", "private void deleteNode(Node n) {\n n.next.pre = n.pre;\n n.pre.next = n.next;\n }", "void remove(Edge edge);", "public AvlTree<E> remove(Comparable<E> element){\n root = remove(element, root);\n return this;\n }", "private void remove(Node node) {\n Node next = node.next;\n Node previous = node.previous;\n previous.next = next;\n next.previous = previous;\n }", "private E removeAfter (Node<E> node)\n { //node is the previous node\n Node<E> temp = node.next;\n if (temp != null) {\n node.next = temp.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public boolean remove(T element, Point2D pos);", "public E remove();", "public E remove();", "public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }", "void deleteElement(int elementId);", "void detachFromGraphView();", "private T remove(Node<T> node) {\n if (node == sentinel) {\n return null;\n }\n\n Node<T> next = node.next;\n Node<T> prev = node.prev;\n\n prev.next = next;\n next.prev = prev;\n size--;\n\n return node.value;\n }", "@Override\n\tpublic E remove(Position<E> p) throws IllegalArgumentException {\n\t\tif (!validPosition(p)) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tNode<E> reference = convert(p);\n\t\tE temp = reference.getElement();\n\t\t\n\t\treference.prev.next = reference.next;\n\t\treference.next.prev = reference.prev;\n\t\t\n\t\tsize--;\n\t\treturn temp;\n\t}", "public void removeProperty(TLProperty element);", "@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}", "public <T extends IDBEntities> void delete(T element) {\n\t\tif (element == null)\n\t\t\treturn;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\t// Entity must be attached\n\t\t\tif (!em.contains(element))\n\t\t\t\telement = em.merge(element);\n\t\t\tem.remove(element);\n\t\t\tem.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tem.getTransaction().rollback();\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}", "public void deleteNode(ListNode node) {\n node.val = node.next.val;\n node.next = node.next.next;\n }" ]
[ "0.6420624", "0.6198374", "0.61822385", "0.61652225", "0.61178195", "0.6104994", "0.6069856", "0.59956867", "0.593823", "0.59349215", "0.59206927", "0.5903855", "0.58782643", "0.5869162", "0.5844884", "0.5818172", "0.5770507", "0.5762503", "0.57616675", "0.56943756", "0.5680131", "0.5677977", "0.5670831", "0.56676334", "0.5656032", "0.56480396", "0.5645404", "0.56446433", "0.5640694", "0.5639277", "0.56283456", "0.56252384", "0.56193197", "0.56149447", "0.5612217", "0.56110364", "0.56063527", "0.5596713", "0.5594849", "0.55929315", "0.5589515", "0.55800587", "0.555909", "0.55441225", "0.5542757", "0.553579", "0.55053663", "0.5503026", "0.5502468", "0.5500966", "0.5498988", "0.5496294", "0.5482486", "0.5473063", "0.54644835", "0.5461852", "0.54584616", "0.54530716", "0.545303", "0.5451893", "0.5448572", "0.5448487", "0.5447819", "0.54396075", "0.5428665", "0.5428137", "0.5422802", "0.54172766", "0.5414284", "0.54085296", "0.5395814", "0.5381771", "0.5378093", "0.5366391", "0.53632265", "0.5357979", "0.5357702", "0.5355252", "0.5352807", "0.5347849", "0.5343003", "0.53404963", "0.53389466", "0.533731", "0.53342646", "0.5333758", "0.53304845", "0.5326858", "0.5318349", "0.5317929", "0.5317929", "0.5314493", "0.53030795", "0.5301716", "0.5301183", "0.52987856", "0.5298407", "0.5295973", "0.52956927", "0.5289431" ]
0.76830876
0
Just to be helpful.
public T get() { return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "protected boolean func_70814_o() { return true; }", "private void kk12() {\n\n\t}", "@Override\n public void perish() {\n \n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void strin() {\n\n\t}", "private void m50366E() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "public void mo38117a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override public int describeContents() { return 0; }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "public void mo12628c() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void level7() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21877s() {\n }", "public abstract void mo70713b();", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "public void m23075a() {\n }", "private void init() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public final void mo91715d() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void getExras() {\n }", "public abstract void mo56925d();", "private void m50367F() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo12930a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21779D() {\n }", "@Override\n protected void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void initialize() {\n\t\t\n\t}", "public void skystonePos4() {\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}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void mo21878t() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo6081a() {\n }", "private final zzgy zzgb() {\n }", "public void mo21793R() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public abstract void mo27386d();", "public void mo115190b() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo21787L() {\n }", "public void mo21785J() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "static void feladat9() {\n\t}", "@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }", "private void init() {\n\n\n\n }", "private void test() {\n\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}" ]
[ "0.59219366", "0.5906329", "0.5897501", "0.5858286", "0.5851028", "0.5824009", "0.5822382", "0.57918954", "0.57695574", "0.57682246", "0.57234895", "0.56975955", "0.5685209", "0.5670932", "0.56389034", "0.5634528", "0.5581676", "0.5576047", "0.5547436", "0.55179304", "0.5491919", "0.5487518", "0.5487518", "0.547507", "0.54727435", "0.5462868", "0.5460901", "0.5448564", "0.5422421", "0.5408462", "0.54074323", "0.5402674", "0.53965783", "0.53839916", "0.5372707", "0.53641415", "0.5361409", "0.53568983", "0.53508407", "0.5338733", "0.53355205", "0.53349096", "0.53349096", "0.53349096", "0.53349096", "0.53349096", "0.53349096", "0.53349096", "0.5328449", "0.53230876", "0.5315658", "0.5311322", "0.53085196", "0.5307794", "0.53073037", "0.5294093", "0.52907455", "0.52881825", "0.5277951", "0.5269649", "0.5269649", "0.52693886", "0.52642816", "0.5263525", "0.5258905", "0.5250777", "0.52489585", "0.5246831", "0.5239053", "0.5239053", "0.5239053", "0.5239053", "0.5239053", "0.5237446", "0.523719", "0.52295625", "0.52292323", "0.5226236", "0.52200633", "0.5219625", "0.52103597", "0.5208256", "0.5201557", "0.5199652", "0.51990557", "0.51935285", "0.5190234", "0.51895744", "0.518722", "0.51866955", "0.51866955", "0.51866955", "0.51866955", "0.51866955", "0.51866955", "0.5184559", "0.51814735", "0.5181155", "0.5179083", "0.5177632", "0.5177632" ]
0.0
-1
Provides an iterator across all items in the container.
@Override public Iterator<T> iterator() { return new UsedNodesIterator<>(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Iterator<T> iterator() {\n return items.iterator();\n }", "public Iterator<ResultItem> iterateItems() {\r\n\t\treturn items.iterator();\r\n\t}", "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "@Override\r\n Iterator<E> iterator();", "Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "@Override\n @Nonnull Iterator<T> iterator();", "@Override\n Iterator<T> iterator();", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "Iterator<E> iterator();", "Iterator<E> iterator();", "public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn this.itemList.iterator();\n\t}", "public Iterator<Type> iterator();", "public T iterator();", "public Iterable<M> iterateAll();", "public Iterator<Item> iterator() {\n return new ListIterator();\n\n }", "public Iterator<Item> iterator() {\n\t\treturn new ListIterator(); \n\t\t}", "public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<Item> iterator() {\n return new LinkedBagIterator();\n }", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n\t\treturn new ListIterator();\n\t}", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new ListIterator();\n\t}", "Iterator<K> iterator();", "@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new CircularArrayIterator<T>(items);\n\t}", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public Iterator<Item> iterator() { return new ListIterator(); }", "public Iterator<Item> iterator()\r\n {\r\n return new ListIterator();\r\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n return new ArrayIterator();\n }", "public Iterator<IDatasetItem> iterateOverDatasetItems();", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "public Iterator<QuantifiedItemDTO> getIterator() {\r\n\t\treturn items.iterator();\r\n\t}", "public Iterator<TradeItem> iterator() {\n return items.iterator();\n }", "@Override\n public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }", "public Iterator<Item> iterator() { \n return new ListIterator(); \n }", "@Override\r\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator();\r\n\t}", "public Iterator<Item> iterator() {\n RQIterator it = new RQIterator();\n return it;\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "@Override\n\tpublic final Iterator<T> iterator() {\n\t\treturn new IteratorImpl<>(value.get());\n\t}", "public interface Iterable<T> {\n Iterator<T> getIterator();\n}", "@Override\r\n\tpublic Iterator<K> iterator() {\n\t\treturn keys.iterator();\r\n\t}", "private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}", "public Iterator<V> iterator()\n {\n return new Iterator<V>()\n {\n public boolean hasNext()\n {\n // STUB\n return false;\n } // hasNext()\n\n public V next()\n {\n // STUB\n return null;\n } // next()\n\n public void remove()\n throws UnsupportedOperationException\n {\n throw new UnsupportedOperationException();\n } // remove()\n }; // new Iterator<V>\n }", "public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "public Iterator<T> getIterator();", "@Override\n public Iterator<Pair<K, V>> iterator() {\n return new Iterator<Pair<K, V>>() {\n private int i = 0, j = -1;\n private boolean _hasNext = true;\n\n @Override\n public boolean hasNext() {\n return _hasNext;\n }\n\n @Override\n public Pair<K, V> next() {\n Pair<K, V> r = null;\n if (j >= 0) {\n List<Pair<K, V>> inl = l.get(i);\n r = inl.get(j++);\n if (j > inl.size())\n j = -1;\n }\n else {\n for (; i < l.size(); ++i) {\n List<Pair<K, V>> inl = l.get(i);\n if (inl == null)\n continue;\n r = inl.get(0);\n j = 1;\n }\n }\n if (r == null)\n _hasNext = false;\n return r;\n }\n };\n }", "@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }", "@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "public Iterator<Item> iterator() {\n return new RandomIterator();\n }", "@Override\n public Iterator<Position> iterator() {\n \t\n \t//create the child-position on calling the iterator\n \tcreateChildren();\n \t\n return new Iterator<Position> () {\n private final Iterator<Position> iter = children.iterator();\n\n @Override\n public boolean hasNext() {\n return iter.hasNext();\n }\n\n @Override\n public Position next() {\n return iter.next();\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException(\"no changes allowed\");\n }\n };\n }", "public Iterator<Item> iterator() {\n\t\t return new ListIterator();\n\t}", "@Override\n public Iterator<Item> iterator(){return new ListIterator();}", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "@Override\r\n\tpublic Iterator<E> iterator()\r\n\t{\n\t\treturn ( iterator.hasNext() ? new EntityListIterator() : iterator.reset() );\r\n\t}", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public Iterator<Item> iterator() {\n\n return new QueueIterator<>(copy());\n }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }", "@Override\n public Iterator<Entity> iterator() {\n return entities.iterator();\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "@Override\r\n\tpublic Iterator<Item> iterator() {\n\t\treturn null;\r\n\t}", "@Override\n public Iterator<E> iterator() {\n return new ElementIterator();\n }", "public interface Container {\n\n Iterator getIterator();\n}", "public Iterator<Item> iterator() {\n return new RandomArrayIterator();\n }", "public Iterator<E> iterator()\r\n {\r\n return listIterator();\r\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIterator();\n\t}", "@Override\n public Iterator<E> iterator() {\n return new HashBagIterator<>(this, map.entrySet().iterator());\n }", "@Override\n public Iterator<Item> iterator() {\n class DequeIterator implements Iterator<Item> {\n private Node node = first;\n @Override\n public boolean hasNext() {\n return node != null;\n }\n\n @Override\n public Item next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n Item item = node.item;\n node = node.next;\n return item;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n }\n return new DequeIterator();\n }", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "public static ListIterator iterator() {\r\n\t\treturn getIterator(Direction.class);\r\n\t}", "@Override\n public Iterator<T> iterator() {\n return new MyArrayList.MyIterator();\n }", "public abstract Iterator<E> createIterator();", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "public Iterator<LineItem> getItems()\r\n {\r\n return new\r\n Iterator<LineItem>()\r\n {\r\n public boolean hasNext()\r\n {\r\n return current < items.size();\r\n }\r\n\r\n public LineItem next()\r\n {\r\n return items.get(current++);\r\n }\r\n\r\n public void remove()\r\n {\r\n throw new UnsupportedOperationException();\r\n }\r\n\r\n private int current = 0;\r\n };\r\n }" ]
[ "0.7796309", "0.77122325", "0.74620634", "0.7396877", "0.738944", "0.73717827", "0.73717827", "0.73717827", "0.73717827", "0.7367896", "0.7350041", "0.7341107", "0.7338693", "0.732202", "0.732202", "0.732202", "0.7319551", "0.7319551", "0.7318031", "0.7285622", "0.72548175", "0.7243599", "0.72013783", "0.7194273", "0.71669024", "0.71606976", "0.71606976", "0.71606976", "0.71606976", "0.71606976", "0.71606976", "0.71386695", "0.7128977", "0.7100612", "0.709442", "0.7089338", "0.70774186", "0.70734197", "0.70698667", "0.70690686", "0.7067699", "0.7060654", "0.704152", "0.704152", "0.704152", "0.704152", "0.70402807", "0.70333135", "0.7028915", "0.70016354", "0.69920707", "0.6981953", "0.69717246", "0.6957871", "0.69574046", "0.6956128", "0.6955071", "0.6948865", "0.6947973", "0.69133425", "0.6901405", "0.68945724", "0.6882849", "0.68738467", "0.6872377", "0.6869303", "0.6862542", "0.6856813", "0.6831445", "0.68277246", "0.6827058", "0.68167764", "0.6785211", "0.678384", "0.67734087", "0.67734087", "0.67714876", "0.6761543", "0.6759512", "0.6758429", "0.6743963", "0.6738426", "0.6736351", "0.67363185", "0.6728387", "0.6717555", "0.6716542", "0.6712427", "0.67091936", "0.6697087", "0.66948265", "0.6693903", "0.66810673", "0.6677737", "0.6677054", "0.6676015", "0.66749454", "0.66744465", "0.6673497", "0.66727936", "0.66702217" ]
0.0
-1
Returns true of there is another element available.
@Override public boolean hasNext() { // Made into a `while` loop to fix issue reported by @Nim // In a while loop because we may find an entry with 'null' in it and we don't want that. while (next == null && stop > 0) { // Scan to the next non-free node. while (stop > 0 && it.free.get() == true) { it = it.next; // Step down 1. stop -= 1; } if (stop > 0) { next = it.element; } } return next != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasElement();", "boolean hasNextElement();", "public boolean hasNextElement();", "public boolean hasMoreElements() {\r\n \t\tif(numItems == 0 || currentObject == numItems) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "@Override\n\t\tpublic boolean hasMoreElements() {\n\t\t\treturn cursor != size();\n\t\t}", "public static boolean hasElements() {\n return content.size() > 0;\n }", "public boolean hasElement(String name) {\n return elements.has(name);\n }", "@Override\r\n\tpublic boolean hasMoreElements() {\n\t\treturn it.hasNext();\r\n\t}", "public boolean hasItem() {\n return (this.curItem != null);\n }", "public boolean hasNextElement() {\n return resultsEnumeration.hasMoreElements();\n }", "public boolean hasItem() {\n return null != item;\n }", "public boolean hasMoreElements() {\n/* 64 */ return this.iterator.hasNext();\n/* */ }", "@Override\n public boolean hasNext() {\n return nextElementSet || setNextElement();\n }", "public boolean hasItem() {\n return this.item != null;\n }", "protected boolean isElementPresent(By element) {\n\t\t \n if (driver.findElements(element).isEmpty()) {\n \treturn false;\n } else {\n \treturn true;\n }\n }", "public boolean containsAtMostOneItem() {\n boolean contains;\n if (start==null | start.next==null) {\n contains = true;\n }\n return contains;\n }", "public boolean hasNext() {\n\t\t\treturn !elements.isEmpty();\n\t\t}", "public boolean hasNext() {\r\n if (current + 1 >= elem.length) {\r\n current = 0;\r\n }\r\n return elem[current + 1] != null;\r\n }", "public boolean hasMoreElements() {\n\t return hasMoreTokens();\n\t}", "public boolean isElement() {\r\n return element;\r\n }", "public static boolean elementAvailiable(String s) { // Check if page contains\n\t\tboolean available=false; \n\t\ttry {\n\t\t\tif(driver.getPageSource().contains(s)){\n\t\t\t\tavailable=true;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn available; \n\t}", "private boolean isElementPresent(By cssSelector) {\n\treturn false;\n}", "public Boolean hasNextProduct() {\n\t\treturn getProducts().size() > 0;\n\t}", "@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\tif (first.next == null) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else\r\n\t\t\t\treturn true;\r\n\t\t}", "boolean hasFeedItem();", "public boolean hasSecondItemToBuy() {\n return this.secondItemToBuy != null;\n }", "public boolean hasNext() {\n for (; pos < elem.length; pos++) {\n if (merges(elem[pos])) {\n elem[pos].setUsed();\n continue;\n }\n\n return true;\n }\n\n return false;\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn (this.next != null);\n\t\t}", "boolean hasNode();", "boolean hasNode();", "public boolean hasMoreItems();", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasFeedItemTarget();", "public boolean moreToIterate() {\r\n\t\treturn curr != null;\r\n\t}", "public boolean complete() {\n return previousLink().isPresent();\n }", "public boolean hasProduct() {\n return productBuilder_ != null || product_ != null;\n }", "public boolean hasNext() { return (current != null && current.item != null); }", "public boolean isBeemReelsExist() {\r\n return (web.findElement(By.xpath(\".//*[@id='app-view']/div/div[2]/div[2]/div[1]/div/div[3]/div[1]/div[1]/div/span[1]\")).getText().trim()).equalsIgnoreCase(\"BeamReels\");\r\n }", "public boolean isFull()\n { \n return count == elements.length; \n }", "public boolean isElementPresent(WebElement elementName, int timeout){\n //https://github.com/appium/java-client/issues/617\n\t/*try{\n\t WebDriverWait wait = new WebDriverWait(getDriver(), timeout);\n\t wait.until(ExpectedConditions.visibilityOf(elementName));\n\t return true;\n\t}catch(Exception e){\n\t return false;\n\t}*/\n try{\n int counter = 0;\n while(counter < timeout){\n Thread.sleep(1000);\n counter++;\n try{\n if(elementName.isDisplayed()){\n //if(ExpectedConditions.visibilityOf(elementName) !=null ){\n return true;\n }else{\n continue;\n }\n }catch(Exception e){\n continue;\n }\n }\n System.out.println(\"ELEMENT NOT FOUND - \" + elementName + \" AFTER \" + timeout );\n return false;\n }catch(Exception e){\n return false;\n }\n }", "boolean isElement(Object object);", "private boolean checkShippingElementExist(WebElement article) {\n\t\ttry {\n\t\t\tarticle.findElement(By.xpath(\"ul/li[@class='lvshipping']//span[@class='fee']\"));\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean canBeSeen()\n {\n if (!this.hasParent() || !this.isVisible())\n {\n return false;\n }\n\n GuiElement element = this;\n\n while (true)\n {\n if (!element.isVisible())\n {\n return false;\n }\n\n GuiElement parent = element.getParent();\n\n if (parent instanceof GuiDelegateElement && ((GuiDelegateElement) parent).delegate != element)\n {\n return false;\n }\n\n if (parent == null)\n {\n break;\n }\n\n element = parent;\n }\n\n return element instanceof GuiBase.GuiRootElement;\n }", "public boolean isElementPresent(final String elementLocator);", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }", "public boolean hasInstInQueue() {\n\t\treturn CurrentInstTomasulo <= lstInstructionsTomasulo.size();\n\t}", "public boolean hasNext() {\n\t\t\tif (index < numberOfElements)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "public boolean hasNextEvent() {\n \treturn next != null;\n }", "public boolean hasPreviousElement() {\n return false;\n }", "public boolean hasMore(){\r\n return curr != null;\r\n }", "public boolean hasNext() {\n\t\treturn next_node == null;\n\t}", "public boolean hasNext() {\n\t\t\n\t\treturn order.hasNext() || !candidates.isEmpty()\n\t\t\t\t|| !firstOrderCandidates.isEmpty();\n\t}", "public boolean next() {\n boolean result = true;\n try {\n element = iterator.next();\n } catch(NoSuchElementException ex) {\n result = false;\n }\n return result;\n }", "public boolean hasNext() {\n return this.next != null;\n }", "public boolean hasNext(){\n return (index < nElem);\n }", "public Boolean isAvailable()\n\t{\n\t\treturn presence != null && presence.equals(AVAILABLE);\n\t}", "boolean hasTotalElements();", "public boolean hasX() {\n return xBuilder_ != null || x_ != null;\n }", "public boolean hasX() {\n return xBuilder_ != null || x_ != null;\n }", "boolean hasMatchedElements();", "@Override\n\t\tpublic boolean hasNext() {\t\t\t\n\t\t\treturn current != null;\n\t\t}", "public boolean canAdd() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] == null) {\r\n temp++;\r\n }\r\n }\r\n if (temp > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean hasNext(){\n if (position == null){\n return (first!=null);\n \n }\n else \n return position.next != null; \n }", "public boolean isManageVehiclesLinkPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar, SHORTWAIT);\r\n\t}", "@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\t\r\n\t\t\treturn currentNode.nextNode != null;\r\n\t\t}", "public boolean hasProduct() {\n return product_ != null;\n }", "@Override\n\tpublic boolean estaElemento(String elemento) {\n\t\treturn false;\n\t}", "@Override\n public boolean isVisible(){\n \n try\t{\n new WebDriverWait(driver, 1)\n .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.visibilityOfElementLocated(locator));\n \n return true;\n }\n catch (NoSuchElementException ex){\n return false;\n }\n catch (TimeoutException ex){\n return false;\n }\n \n }", "public boolean hasNext(){\r\n return node != null;\r\n }", "public boolean isElementPresent(WebElement element) {\n try{\n return element.isDisplayed();\n }catch (RuntimeException e){\n return false;\n }\n }", "public boolean hasVisibleItems();", "boolean available()\n {\n synchronized (m_lock)\n {\n return (null == m_runnable) && (!m_released);\n }\n }", "@Override\n public boolean hasNext() {\n return (nextItem != null);\n }", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "public boolean hasNext() {\n\t\treturn actual!=null;\t\t\n\t}", "public abstract boolean doesElementExist(final String key, final String element);", "private boolean ifFull() {\n return items.length == size;\n }", "public boolean isPresent() {\n return exists();\n }", "public boolean hasNext() {\r\n\r\n\t\treturn counter < links.size();\r\n\t}", "public boolean isAvailable() {\r\n\treturn available;\r\n }", "public boolean isElementExists(By targetElement) throws Exception {\n try {\n info(\"Verifying Element Present By :: \" + targetElement);\n boolean isPresent = getDriver().findElements(targetElement).size() > 0;\n return isPresent;\n } catch (Exception e) {\n return false;\n }\n }", "public boolean hasElt(int e) {\n\t\treturn false;\n\t}", "public boolean isPresent(int element) {\n\t\treturn location.containsKey(element);\n\t}", "public boolean hasNext()\r\n {\r\n return (next != null);\r\n }", "protected boolean Exists()\n\t{\n\t\tif (identity<1) return false;\n\t\tNodeReference nodeReference = getNodeReference();\n\t\treturn (nodeReference.exists() || nodeReference.hasSubnodes());\n\t}", "public boolean hasNext() {\n\t\tMemoryBlock dummyTail = new MemoryBlock(-1, -1); // Dummy for tail\n\t\tboolean hasNext = (current.next.block.equals(dummyTail));\n\t\treturn (!hasNext);\n\t}", "private boolean hasNext() {\n\t\treturn iterator != null;\n\t}", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn nextNode != null;\n\t\t}", "public boolean hasNext(){\n if(index < size && listI.get(index) != null){\n return true;\n }\n return false;\n }", "private boolean isEmpty() {return first == null;}", "public boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}" ]
[ "0.75588936", "0.68979377", "0.67736506", "0.6724375", "0.65971375", "0.6544933", "0.6477768", "0.647485", "0.6421712", "0.64113784", "0.63859737", "0.63266474", "0.6316146", "0.6303776", "0.62958694", "0.6281123", "0.62772554", "0.6230841", "0.622766", "0.6201884", "0.6192268", "0.61808866", "0.61667764", "0.6161813", "0.61324906", "0.6117855", "0.6080352", "0.6075471", "0.6058428", "0.6058428", "0.60535043", "0.60478806", "0.60478806", "0.60478806", "0.60429734", "0.60391146", "0.6029612", "0.60222334", "0.6021663", "0.6008434", "0.600629", "0.5995232", "0.59779376", "0.59735304", "0.597346", "0.59719944", "0.5970481", "0.5963846", "0.5962408", "0.5948834", "0.5948439", "0.59483826", "0.59422785", "0.5939316", "0.5935371", "0.59310234", "0.5930316", "0.5922482", "0.59169143", "0.5911772", "0.5911772", "0.5911408", "0.58935267", "0.58919626", "0.5879176", "0.5875777", "0.58712643", "0.5868539", "0.5867021", "0.5866827", "0.58660686", "0.5863006", "0.5862402", "0.5861294", "0.58593637", "0.5849597", "0.5849597", "0.5849597", "0.5849597", "0.5849597", "0.5849597", "0.5849597", "0.5848401", "0.5845658", "0.5844367", "0.58438635", "0.5842976", "0.5837798", "0.5832484", "0.5829614", "0.58248", "0.582196", "0.5818547", "0.5814897", "0.58127797", "0.5808853", "0.5808693", "0.5808334", "0.5807861", "0.5806467" ]
0.5853338
75
Returns the next available element.
@Override public T next() { T n = null; if (hasNext()) { // Give it to them. n = next; next = null; // Step forward. it = it.next; stop -= 1; } else { // Not there!! throw new NoSuchElementException(); } return n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getNextElement() throws NoSuchElementException;", "public T getNextElement();", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public Element<T> getNextElement() \n\t{\n\t\treturn nextElement;\n\t}", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "public T getNext() {\n\n // Create a new item to return\n T nextElement = getInstance();\n\n // Check if there are any more items from the list\n if (cursor <= arrayLimit) {\n nextElement = collection.get(cursor);\n cursor++;\n } else {\n // There are no more items - set to null\n nextElement = null;\n }\n\n // Return the derived item (will be null if not found)\n return nextElement;\n }", "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public T nextElement() {\r\n\t\treturn items[currentObject++];\r\n \t}", "public T getNext(T element);", "@Override\n public T next() {\n if (nextItem == null)\n throw new NoSuchElementException();\n T item = nextItem;\n lastItem = nextItem;\n remainingItemCount.decrement();\n if (remainingItemCount.isZero())\n getNextReady();\n return item;\n }", "public K next()\n {\n\tif (hasNext()) {\n\t K element = current.data();\n\t current = current.next(0);\n\t return element; \n\t} else {\n\t return null; \n\t}\n }", "public T next() {\n\t\t\tif (hasNext()) {\n\t\t\t\tT nextItem = elements[index];\n\t\t\t\tindex++;\n\t\t\t\t\n\t\t\t\treturn nextItem;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new java.util.NoSuchElementException(\"No items remaining in the iteration.\");\n\t\t\t\n\t\t}", "public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }", "Element nextElement () {\n\t\treturn stream.next();\n\t}", "private void getNext() {\n Node currNode = getScreenplayElem().getChildNodes().item(currPos++);\n while (currNode.getNodeType() != Node.ELEMENT_NODE) {\n currNode = getScreenplayElem().getChildNodes().item(currPos++);\n }\n currElem = (Element) currNode;\n }", "public ListElement getNext()\n\t {\n\t return this.next;\n\t }", "public E next()\n {\n if (hasNext())\n {\n E item = currentNode.data();\n currentNode = currentNode.next();\n count--;\n return item;\n }\n else\n {\n throw new NoSuchElementException(\"There isnt another element\");\n\n }\n }", "public T getNext()\n {\n T elem = handler.getTop();\n handler.pop();\n return elem;\n }", "public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}", "public Object getNext() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.next; // Get the reference to the next item\n\t\t}\n\t\treturn current == null ? null : current.item;\n\t}", "public E next() \n {\n \tfor(int i = 0; i < size; i++)\n \t\tif(tree[i].order == next) {\n \t\t\tnext++;\n \t\t\ttree[i].position = i;\n \t\t\treturn tree[i].element;\n \t\t}\n \treturn null;\n }", "public T getNextItem();", "public E next() throws NoSuchElementException{\n\t\tPosition<E> aux=actual;\n\t\tif (aux == null) \n\t\t\tthrow new NoSuchElementException();\t\t\n\t\tthis.avanzar();\n\t\treturn aux.element();\n\t}", "public E next() {\r\n current++;\r\n return elem[current];\r\n }", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public NodeT getNext() {\n String nextItemKey = queue.poll();\n if (nextItemKey == null) {\n return null;\n }\n return nodeTable.get(nextItemKey);\n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public Item next() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot retrieve item from empty deque\");\n }\n Item item = current.getItem(); //item = current item to be returned\n current = current.getNext();\n return item;\n }", "@com.francetelecom.rd.stubs.annotation.FieldGet(\"e\")\n\t\tpublic T nextElement() {\n\t\t\treturn null;\n\t\t}", "public Object nextElement() {\n/* 75 */ return this.iterator.next();\n/* */ }", "public Player getNext(){\n\t\treturn this.players.get(this.nextElem);\n\t}", "public E next() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 &&\n position > 0 &&\n position < size) {\n E element = entries[position];\n position++;\n return element;\n } else {\n throw new NoSuchElementException(); \n } \n \n }", "public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "public MapElement getNext() {\n return next;\n }", "public DependencyElement next() {\n\t\treturn next;\n\t}", "public T next() {\r\n if\t(!hasNext()) {\r\n throw new NoSuchElementException();\r\n }\r\n return items[now++];\r\n }", "@Override\n public Integer next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Integer toReturn = next;\n next = null;\n if (peekingIterator.hasNext()) {\n next = peekingIterator.next();\n }\n return toReturn;\n }", "public E next() throws NoSuchElementException\n {\n E retElement = null;\n if(hasNext() == true)\n {\n retElement = arrayList.get(index);\n index++;\n }\n else\n { throw new NoSuchElementException(); }\n return retElement;\n }", "public Item next(){\n if(current==null) {\n throw new NoSuchElementException();\n }\n\n Item item = (Item) current.item;\n current=current.next;\n return item;\n }", "@Nonnull\n public Optional<ENTITY> next()\n {\n currentItem = Optional.of(items.get(++index));\n update();\n return currentItem;\n }", "private Element peekElement() {\r\n return ((Element)this.elements.get(this.elements.size() - 1));\r\n }", "public abstract void nextElement();", "public E next()\n\t{\n\t\treturn (vector.get(curr++));\n\t}", "public Object next()throws NullPointerException\r\n {\r\n if(hasNext())\r\n return e.get(index+1);\r\n else\r\n throw new NullPointerException();\r\n }", "public E next() {\n int index = 0;\n\n // iterating over collections\n for (Collection<E> coll : collectionList) {\n // checking if current collection contains the desired element (i.e. itrCounter falls in coll)\n if (coll.size() <= itrCounter - index)\n // desired index doesn't lie in current collection -> skipping all elements\n index += coll.size();\n // current collection contains desired element\n else {\n // finding desired element; iterating over coll\n for (E element : coll){\n // desired index found -> increment itrCounter and return element\n if (index == itrCounter) {\n itrCounter++;\n return element;\n }\n // desired index not reached yet -> increment index\n else index++;\n }\n }\n }\n // could not find next element\n throw new NoSuchElementException();\n }", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "@Override\n public E next() {\n this.modificationCheck();\n E result;\n if (this.position != SimpleArrayList.this.index) {\n result = (E) values[position++];\n } else {\n throw new NoSuchElementException(\"No more suitable elements!\");\n }\n return result;\n }", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "public int peek() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return elementData[1];\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\tif (!hasNext()) {\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn queue[index[i++]];\r\n\t\t\t}\r\n\t\t}", "private void getNextReady() {\n if (!iter.hasNext())\n nextItem = null;\n else {\n Map.Entry<T, Counter> entry = iter.next();\n nextItem = entry.getKey();\n remainingItemCount = entry.getValue();\n }\n }", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "@Override\r\n\tpublic String nextElement() {\n\t\treturn it.next();\r\n\t}", "public C getNext();", "public Integer peek() {\n if (isPeeked)\n return peekedElement;\n else {\n if (!hasNext())\n return -1;\n peekedElement = iterator.next();\n isPeeked = true;\n return peekedElement;\n }\n }", "public Event getNextEvent() {\n \treturn next;\n }", "@Override\n public Integer next() {\n if(peekedVal != null ){\n Integer next = peekedVal;\n peekedVal = null;\n return next;\n }\n if(!iter.hasNext()){\n throw new NoSuchElementException();\n }\n return iter.next();\n\n }", "public Integer peek() {\n if (hasNext()){\n if (list.isEmpty()){\n Integer next = iterator.next();\n list.add(next);\n return next;\n }else {\n return list.get(list.size()-1);\n }\n }else {\n return null;\n }\n }", "@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public Item next() throws XPathException {\n curr = base.next();\n if (curr == null) {\n pos = -1;\n } else {\n pos++;\n }\n return curr;\n }", "public T next()\n {\n T data = current.item;\n current = current.next;\n return data;\n }", "@Override\n public Object next()\n {\n if (current != null && current.next != null)\n {\n current = current.next; // Move to the next element in bucket\n }\n else // Move to next bucket\n {\n do\n {\n bucketIndex++;\n if (bucketIndex == buckets.length)\n {\n throw new NoSuchElementException();\n }\n current = buckets[bucketIndex];\n }\n while (current == null);\n }\n return current.data;\n }", "public V next()\n {\n if (hasNext())\n {\n V currentEntry = arrayDictionary.dictionary[cursor].getValue();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }", "public E next()\r\n {\r\n E valueToReturn;\r\n\r\n if (!hasNext())\r\n throw new NoSuchElementException(\"The lister is empty\");\r\n \r\n // get the string from the node\r\n valueToReturn = cursor.getData();\r\n \r\n // advance the cursor to the next node\r\n cursor = cursor.getLink();\r\n \r\n return valueToReturn;\r\n }", "IList<T> getNext();", "public Question next() {\n\t\tif (this.questions.size() == this.iter) {\n\t\t\treturn null;\n\t\t}\n\t\tQuestion q = this.questions.get(this.iter);\n\t\tthis.iter++;\n\t\treturn q;\n\t}", "public SlideNode getNext() {\n\t\treturn next;\n\t}", "public T next() {\n\t\t\tif(hasNext()) {\n\t\t\t\tT temp = vector.elementAt(nextPosition);\n\t\t\t\tnextPosition--;\n\t\t\t\tpreviousPosition--;\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new NoSuchElementException(\"The iterator has already reached the end\");\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "public Prism getNext() {\r\n\t\treturn next;\r\n\t}", "public Item next() {\r\n if (!hasNext()) throw new NoSuchElementException();\r\n lastAccessed = current;\r\n Item item = current.item;\r\n current = current.next;\r\n index++;\r\n return item;\r\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n//\t\t\t\tT object = (T)data[cursor * numCols + pinnedColumn];\n\t\t\t\tT object = get(cursor, pinnedColumn);\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}", "public T next(){\r\n return itrArr[position++];\r\n }", "public E next()\n {\n removeLevelIfEmpty();\n if (noLevelsExist()) {\n return null;\n }\n return popNextObject();\n }", "public MapElement next() {\n return findNext(true);\n }", "public emxPDFDocument_mxJPO getNext()\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n return (emxPDFDocument_mxJPO)super.removeFirst();\r\n }", "public Integer peek() {\n if (next != null) {\n return next;\n }\n\n if (iterator.hasNext()) {\n next = iterator.next();\n return next;\n }\n\n return null;\n }", "public MapElement getNextElement(Direction dir) {\n //System.out.println(\"Le lett kérve a következő palyaelem.\");\n return neighbours[dir.getValue()];\n }", "public T next()\n\t\t{\n\t\t\tif(hasNext())\n\t\t\t{\n\t\t\t\tT currentData = current.getData(); //the data that will be returned\n\t\t\t\t\n\t\t\t\t// must continue to keep track of the Node that is in front of\n\t\t\t\t// the current Node whose data is must being returned , in case\n\t\t\t\t// its nextNode must be reset to skip the Node whose data is\n\t\t\t\t// just being returned\n\t\t\t\tbeforePrevious = previous;\n\t\t\t\t\n\t\t\t\t// must continue keep track of the Node that is referencing the\n\t\t\t\t// data that was just returned in case the user wishes to remove()\n\t\t\t\t// the data that was just returned\n\t\t\t\t\n\t\t\t\tprevious = current; // get ready to point to the Node with the next data value\n\t\t\t\t\n\t\t\t\tcurrent = current.getNext(); // move to next Node in the chain, get ready to point to the next data item in the list\n\t\t\t\t\n\t\t\t\tthis.removeCalled = false;\n\t\t\t\t// it's now pointing to next value in the list which is not the one that may have been removed\n\t\t\t\t\n\t\t\t\treturn currentData;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "public Variable getNext(){\n\t\treturn this.next;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n\t\t\t\tT object = (T)data[pinnedRow * numCols + cursor];\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}", "@Override\r\n public Integer next() {\r\n // Time complexity: O(1), where the problem size N \r\n // represents the size of the sequence to generate.\r\n if (!hasNext()) // check if the current element has a next element in this sequence\r\n return null; \r\n int current = next; // set the current element to next\r\n generatedCount++; // increment the number of generated elements so far\r\n next *= RATIO; // set the next element (adds the common ratio to the current number)\r\n return current; // return the current number as the generated one\r\n }", "@Override\r\n\tpublic T next() throws NoSuchElementException{\n\t\tif (hasNext()) {\r\n\t\t\tT curr = next.getData();\r\n\t\t\tnext = next.getNext();\r\n\t\t\treturn curr;\r\n\t\t}\r\n\t\telse throw new NoSuchElementException();\r\n\t\t\r\n\t}", "public E element() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public Integer peek() {\n return next;\n }", "public WebElement getNext_page() {\n\t\treturn null;\n\t}", "public Pageable next() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "public Integer next() {\n if (list.isEmpty()){\n return iterator.next();\n }else {\n Integer integer = list.get(list.size() - 1);\n list.remove(list.size()-1);\n return integer;\n }\n\n }", "public Node<E> getNext() { return next; }" ]
[ "0.8098682", "0.806883", "0.800934", "0.7747918", "0.7676514", "0.74987864", "0.7448601", "0.74361926", "0.7378953", "0.73697495", "0.7325105", "0.7323459", "0.73197424", "0.7241353", "0.71852076", "0.711397", "0.7108857", "0.70808023", "0.70701176", "0.7063141", "0.7061209", "0.7058235", "0.70550096", "0.7047751", "0.70002174", "0.69372874", "0.69206", "0.69104266", "0.6904305", "0.68883425", "0.68839777", "0.6880019", "0.6858696", "0.68531203", "0.68523043", "0.68368775", "0.68232065", "0.6798971", "0.67856395", "0.67805177", "0.6776756", "0.6757639", "0.67563355", "0.6730988", "0.6729573", "0.6710453", "0.6698104", "0.6694782", "0.66879815", "0.6668374", "0.6664068", "0.66597265", "0.66395354", "0.66113204", "0.66047955", "0.6599023", "0.65803677", "0.65766835", "0.65579426", "0.6557037", "0.65567505", "0.6555396", "0.65552646", "0.6554577", "0.6548181", "0.6543715", "0.65422815", "0.65357727", "0.6532339", "0.6530305", "0.6529618", "0.6528965", "0.65043193", "0.6503038", "0.6502057", "0.65003693", "0.6500344", "0.6497935", "0.6496272", "0.6494741", "0.6486512", "0.6479379", "0.6474108", "0.6467861", "0.6466371", "0.64638865", "0.64495015", "0.6448395", "0.6436231", "0.6433549", "0.6418164", "0.6416534", "0.64157", "0.6412515", "0.64003545", "0.64000034", "0.6388734", "0.6388367", "0.6384818", "0.6379614" ]
0.6797311
38
Spin on add/remove until stopped.
@Override public void run() { while (testing) { // Add it. Node<T> n = c.offer(me); if (n != null) { log.log("Added " + me + ": " + c.toString()); pause(); // Remove it. c.remove(n, me); log.log("Removed " + me + ": " + c.toString()); pause(); } else { // Just go around again. pause(); } } nTesters.decrementAndGet(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lockAdd(){\n\t\tthis.canAdd = false;\n\t}", "@Override\n public void run() {\n for (ListIterator<BtDeviceObject> btDeviceListIterator = mBtDeviceObjectList.listIterator(); btDeviceListIterator.hasNext();) {\n BtDeviceObject btDeviceObject = btDeviceListIterator.next();\n if(new Date().getTime() - btDeviceObject.timeSinceLastUpdate > 2000){\n btDeviceListIterator.remove();\n mBtDeviceAddress.remove(btDeviceObject.bluetoothDevice.getMacAddress());\n mDeviceListAdapter.notifyDataSetChanged();\n }\n }\n\n mCheckIfBtDeviceTimerExpiredHandler.postDelayed(this, 500);\n }", "static void onSpinWait() {\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(true) {\r\n\t\t\t\tsynchronized(a) {\r\n\t\t\t\t\twhile(!a.isEmpty()) {\r\n\t\t\t\t\t\ta.getFirst().cover();\r\n\t\t\t\t\t\ta.removeFirst();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t} catch (InterruptedException 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}", "private void awaitItems() throws IgniteInterruptedCheckedException {\n U.await(takeLatch);\n }", "public void stopAndRemove() {\n\t\tstartMoveDownTimer.stop();\n\t\tmoveDownTimer.stop();\n\t}", "public Integer remove() {\n while (true) {\n\n if (buffer.isEmpty()) {\n System.out.println(\"List is empty! Waiting..\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n } else {\n full.waiting();\n mutex.waiting();\n int back = buffer.removeFirst();\n mutex.signal();\n empty.signal();\n return back;\n\n }\n }\n\n\n }", "public void arraiter() {\n \tthis.running = false;\n }", "public void beginHold();", "@Override\n\tpublic void run() {\n\t\tNewDeliverTaskManager ndtm = NewDeliverTaskManager.getInstance();\n\t\tif(ndtm != null && ndtm.isNewDeliverTaskAct) {\n\t\t\tNewDeliverTaskManager.logger.error(\"[旧的任务库删除线程启动成功][\" + this.getName() + \"]\");\n\t\t\twhile(isStart) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tint count2 = 0;\n\t\t\t\tif(needRemoveList != null && needRemoveList.size() > 0) {\n\t\t\t\t\tList<DeliverTask> rmovedList = new ArrayList<DeliverTask>();\n\t\t\t\t\tfor(DeliverTask dt : needRemoveList) {\n\t\t\t\t\t\tDeliverTaskManager.getInstance().notifyDeleteFromCache(dt);\n\t\t\t\t\t\trmovedList.add(dt);\n\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\tif(count1 >= 300) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (this.needRemoveList) {\n\t\t\t\t\t\tfor(DeliverTask dt : rmovedList) {\n\t\t\t\t\t\t\tneedRemoveList.remove(dt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(heartBeatTime);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错1:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(teRemoveList != null && teRemoveList.size() > 0) {\n\t\t\t\t\tList<TaskEntity> teRemovedList = new ArrayList<TaskEntity>();\n\t\t\t\t\tfor(TaskEntity te : teRemoveList) {\n\t\t\t\t\t\tTaskEntityManager.getInstance().notifyDeleteFromCache(te);\n\t\t\t\t\t\tteRemovedList.add(te);\n\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\tif(count2 >= 100) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (this.teRemoveList) {\n\t\t\t\t\t\tfor(TaskEntity te : teRemovedList) {\n\t\t\t\t\t\t\tteRemoveList.remove(te);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(30000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错2:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tTransitRobberyManager.logger.error(\"[旧的任务库删除线程关闭][\" + this.getName() + \"]\");\n\t}", "@Override\n public void run() {\n try {\n remove_elements();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void uponRelease() {\n try {\n\n int size = waitingList.size();\n if (size > 0) {\n int random = (int) (stream.getNumber() * size);\n NodeThread next = (NodeThread)waitingList.get(random);\n next.wakeUp();\n }\n\n } catch (IOException e) {}\n }", "public void unlockAdd(){\n\t\tthis.canAdd = true;\n\t}", "@Override\n public void run() {\n add10000();\n }", "@Override\n public void run() {\n super.run();\n synchronized (lock){\n if (MyList.size()!=5) {\n System.out.println(\"当MyList没有到5的时候开始等待...\"+System.currentTimeMillis());\n try {\n lock.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(\"等待结束\"+System.currentTimeMillis());\n for (int i =0 ;i<3;i++){\n MyList.add();\n System.out.println(\"添加元素:\"+MyList.size());\n }\n }\n }\n\n\n }", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tTask t = bq.take();\n\n\t\t\t\t\n\t\t\t\tThread.sleep(t.getProcessTime() * 1000);\n\t\t\t\twaitingTime.addAndGet((-1) * t.getProcessTime());\n\t\t\t\tSimulator.getFrame().displayData(\"Client \"+t.getNr()+\" left. \\n\");\n\t\t\t\tsize--;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void invalidate() {\n for (int i = 0; true; i = (2 * i + 1) & 63) {\n synchronized (this) {\n this.listener = null;\n this.sema = null;\n if (!deliveryPending || (Thread.currentThread().getId() == id)) {\n return;\n }\n }\n if (i == 0) {\n Thread.yield();\n } else {\n if (i > 3) Log.finer(Log.FAC_NETMANAGER, \"invalidate spin {0}\", i);\n try {\n Thread.sleep(i);\n } catch (InterruptedException e) {\n }\n }\n }\n }", "@Override\n public synchronized void stop() {\n final double temp = get();\n m_accumulatedTime = temp;\n m_running = false;\n }", "public synchronized void add() {\ncounter += 1;\n}", "public void run() {\n\t\tSystem.out.println(\"fuseAdd\");\n\t\tAddConcurrent1 adder = new AddConcurrent1();\n\t\tValidateFusion validator = new ValidateFusion();\n\t\tint sum = adder.addConcurrent1(sortedSnapshot);\t\t\t \n\t\tvalidator.validate(sum, 2);\n\t\tGlobalInfo.completeThreads++;\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "static void unSynced () {\n\t\tList<Integer> linkedList = Collections.synchronizedList(new LinkedList<Integer>());\n\n\t\t// fill it with numbers 1 to 100\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tlinkedList.add(i);\n\t\t}\n\n\t\t// launch a thread to add 100 more numbers\n\t\tnew Thread(new Runnable () {\n\t\t\t@Override\n\t\t\tpublic void run () {\n\t\t\t\tSystem.out.println(\"starting adding numbers\");\n\t\t\t\tfor (int i = 100; i < 200; i++) {\n\t\t\t\t\tlinkedList.add(i);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"ending adding numbers\");\n\t\t\t}\n\t\t}).start();\n\n\t\t// try to iterate through the list in parallel with the numbers being added\n\t\t// interleaving occurs and the iterator throws a CME.\n\t\tIterator<Integer> iterator = linkedList.iterator();\n\t\tSystem.out.println(\"starting iteration\");\n\t\twhile (iterator.hasNext()) { \n\t\t\ttry {\n\t\t\t\tThread.sleep(4);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\tSystem.out.println(\"finished iteration\");\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(flag == true){\n\t\t\t\t\n\t\t\t\tssinView.postInvalidate();\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(sleepTime);\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\t\t}\n\t\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\tIterator<Future<Integer>> iter = runningThreadsList.iterator();\n\t\t\tif (iter.hasNext()) {\n\t\t\t\tFuture<Integer> future = (Future<Integer>) iter.next();\n\t\t\t\tif (future.isDone()) {\n\t\t\t\t\trunningThreadsList.remove(future);\n\t\t\t\t\t\n\t\t\t\t\tif (allocator.getInventory().isEmpty()) {\n\t\t\t\t\t\tallocator.shutdown();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tThread.yield();\n\t\t}\n\t\t\t\n\t\t\n\t}", "public void update() {\n\t\tthis.tickCounter++;\n\t\tif(tickCounter == 10) {\n\t\t\tthis.lifetime--;\n\t\t\tif(this.lifetime == 0) {\n\t\t\t\tthis.remove();\n\t\t\t}\n\t\t\tthis.tickCounter = 0;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (OnlineObjectsContainer.this.onlineObjects) {\n\t\t\t\t\tfinal Iterator<OnlineObject> iterator = OnlineObjectsContainer.this.onlineObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.EXPIRATION_TIME < System.currentTimeMillis()) {\n\t\t\t\t\t\t\tOnlineObjectsContainer.this.recentlyRemovedObjects.add(anObject);\n\t\t\t\t\t\t\tOnlineObjectsContainer.this.recentlyAddedObjects.remove(anObject);\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (OnlineObjectsContainer.this.onlineObjects) {\n\t\t\t\t\tIterator<OnlineObject> iterator = OnlineObjectsContainer.this.recentlyAddedObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.RECENT_TIMEOUT < System.currentTimeMillis()) {\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\titerator = OnlineObjectsContainer.this.recentlyRemovedObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.RECENT_TIMEOUT < System.currentTimeMillis()) {\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n public void run() {\n try {\n //noinspection InfiniteLoopStatement\n while (true) {\n int number = random.nextInt(4097);\n boolean successful;\n\n do {\n successful = buffer.add(number);\n\n if (successful) {\n continue;\n }\n\n // If we were not successful, wait until the size of the collection changes and try again.\n // We wait by acquiring a semaphore a first time and then a second time. The semaphore is released\n // in sizeChanged(IntBuffer), which enables the semaphore to be acquired that second time.\n semaphore.acquire();\n semaphore.acquire();\n\n // Now that we have the semaphore, release it so we \"clean up after ourselves,\" and try again.\n semaphore.release();\n } while(!successful);\n }\n\n } catch (InterruptedException ignored) {\n // Exit method because this thread was interrupted\n }\n }", "public void holdForWorkXX()\n {\n if (cFixedServiceTimed)\n {\n hold(mServerConfig.mServiceTime);\n out();\n return;\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n hold(cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n break;\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n hold( tBase + cRandom.negexp(tDelta));\n break;\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n hold( tBase + cRandom.poisson(tDelta));\n break;\n\n case cHoldUniform:\n hold(cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n break;\n }\n out();\n }", "public void delayNext()\n {\n\tif (toDo.size() > 1)\n\t {\n\t\tTask t = toDo.get(0);\n\t\ttoDo.set(0, toDo.get(1));\n\t\ttoDo.set(1, t);\n\t }\n }", "void updateNextUnblockTime(int t);", "@Override\r\n public void run() {\r\n CountDown.addItems(3);\r\n while(AH_AgentThread.running) {\r\n try {\r\n int i = 0;\r\n ArrayList<Item> auctionList = getAuctionList();\r\n int size = auctionList.size();\r\n int needed = 3 - auctionList.size();\r\n if(needed > 0){\r\n addItems(needed);\r\n }\r\n //change to while\r\n while(i < size) {\r\n Item listItem = auctionList.get(i);\r\n long currentTime = System.currentTimeMillis();\r\n listItem.remainingTime(currentTime);\r\n long timeLeft = listItem.getRemainingTime();\r\n if (timeLeft <= 0) {\r\n itemResult(listItem);\r\n }\r\n i++;\r\n size = auctionList.size();\r\n }\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void completeNext()\n {\n\tTask t = toDo.get(0);\n\tt.complete();\n\ttoDo.remove(0);\n\tcompleted.add(t);\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\twhile(true){\n\t\t\t\tsemaphore.acquire();\n\t\t\t\twhile(list.size()<10){\n\t\t\t\t\tlist.add(1);\n\t\t\t\t\tSystem.out.println(\"生产者放入一个产品,目前有\"+list.size()+\"个产品\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"队列满\"+\"等待消费者消费\");\n\t\t\t\tsemaphore.release();\n\t\t\t\tThread.sleep(500);\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "protected synchronized void acquire(long delta) {\n if (delta <= 0) {\n throw new IllegalArgumentException(\"resource counter delta must be > 0\");\n }\n long prev = count;\n count -= delta;\n if (prev > 0 && count <= 0 ) {\n turnOff();\n }\n }", "@Override\n public void run()\n {\n active = true;\n try\n {\n try\n {\n lock.acquire();\n }\n catch (InterruptedException e)\n {\n return;\n }\n guardedRun();\n }\n finally\n {\n lock.release();\n }\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "protected void whileDisable()\n\t{\n\n\t}", "void queueShrunk();", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n sleep(3000);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n //sh.pivotStop.setPosition(.55);\n sh.hitRing();\n sleep(500);\n //sh.pivotDown();\n sh.hitRing();\n sleep(500);\n sh.withdraw();\n sh.lift.setPower(0);\n sh.lift.setPower(0);\n wobble.wobbleUp();\n sh.pivotStop.setPosition(1);\n loop.end();\n\n\n }", "public void acquire() {\r\n return;\r\n }", "private void maybeScheduleSlice() {\n if (nextSliceRunTime > 0) {\n timer.schedule();\n nextSliceRunTime = 0;\n }\n }", "protected abstract long waitOnQueue();", "public synchronized void makeBusy(){\n isBusy = true;\n }", "@Override\n public void run() {\n try {\n while (true) {\n finalLB.addClient();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "@Override\n public void run() {\n //如果本延迟任务已经执行,那么做个标识标注本清楚任务已经执行,然后手按下的时候那里就不会移除本任务\n b = false;\n cleanLine();\n }", "public void buffTimer() {\r\n if (seconds - lastBuffCheck >= 1) {\r\n lastBuffCheck = seconds;\r\n for (int i = 0; i < buffs.size(); i++) {\r\n buffs.set(i, buffs.get(i)-1);\r\n if (buffs.get(i) <= 0) {\r\n buffs.remove(i);\r\n }\r\n }\r\n } else if (seconds < lastBuffCheck) {\r\n lastBuffCheck = 0;\r\n }\r\n }", "public abstract void backoffQueue();", "public void timerInterrupt() \n {\n\t\n Machine.interrupt().disable(); //disable\n\n //if waitingQueue is empty, and current time is greater than or equal to the first ThreadWaits, wakeUp time,\n while(!waitingQueue.isEmpty() && (waitingQueue.peek().wakeUp < Machine.timer().getTime()\n || waitingQueue.peek().wakeUp == Machine.timer().getTime())) {\n waitingQueue.poll().thread.ready(); //pop head\n }\n\n KThread.currentThread().yield();\n\n Machine.interrupt().enable(); //enable\n\n }", "void startRepeatingDeletionSearch() {\n handler.postDelayed(deletionSearch,1000);\n }", "@Override\n\tpublic void run() {\n\t\t\n\t\t// create array of values to add, before we start the timer\n\t\tBigDecimal[] values = new BigDecimal[ARRAY_SIZE];\n\t\tfor(int i=0; i<ARRAY_SIZE; i++) values[i] = new BigDecimal(i+1);\n\n\t\tsum = new BigDecimal(0.0);\n\t\tfor(int count=0, i=0; count<this.count; count++, i++) {\n\t\t\tif (i >= values.length) i = 0;\n\t\t\tsum = sum.add( values[i] );\n\t\t}\n\t\t\n\t\n\t}", "@Override\n\t public void run() {\n\t \t \n\t currentItem = (currentItem +1) % picList.size();\n\t //更新界面\n\t // handler.sendEmptyMessage(0);\n timeHandler.sendEmptyMessageDelayed(0x01, 5000);\n\t }", "@Override\n public void run() {\n while(timerFlag){\n\n if(count == 400){\n\n if(value == null) {\n // value 가 0이면 보낼필요 없음\n return;\n }\n // 제어 신호 보냄\n\n controlDevice(value, subUuid , subSort);\n try {\n mTimerCountTask.stopTimer();\n mTimerCountTask.startThread();\n timer_count = false;\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n break;\n\n }\n\n count++;\n\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 }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(route.size()==0)\n\t\t\t\t{\n\t\t\t\t\tifMoveEnd=true;\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t}else {\n\t\t\t\t\tsetRoleCoordinate(route.get(0),false);\n\t\t\t\t\troute.remove(0);\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\twhile (put_flag) {\n\t\t\t\tString path;\n\t\t\t\tif (usbImagePathList.size() > 0) {\n\t\t\t\t\tif (currentImg >= usbImagePathList.size()) {\n\t\t\t\t\t\tcurrentImg = 0;\n\t\t\t\t\t}\n\t\t\t\t\tpath = usbImagePathList.get(currentImg++);\n\t\t\t\t\t//Log.d(TAG,\"the PutImageIntoSdcard thread is running--PutImageIntoSdcard_path---------:\" + path);\n\t\t\t\t\tsynchronizedImage.push(path);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep((int) (4 * ONE_SECOND));\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public void delayDeleteReplica() {\n try {\n semaphore.acquire(1);\n } catch (InterruptedException e) {\n // ignore.\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep((long) time);\r\n\t\t\t\t\tleftOff();\r\n\t\t\t\t\tif(unhook)\r\n\t\t\t\t\t\tunhookLEDs();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t}\r\n\t\t\t}", "public synchronized void delete() {\ncounter -= 1;\n}", "@Override\n\t\tpublic void run() {\n\t\t\twhile(true){\n\t\t\t\ttry {\n\t\t\t\t\tsemaphore.acquire();\n\t\t\t\t\twhile(!list.isEmpty()){\n\t\t\t\t\t\tlist.remove(0);\n\t\t\t\t\t\tSystem.out.println(\"消费者消费一个产品,目前所剩\"+list.size()+\"个产品\");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"队列空,等待生产者生产\");\n\t\t\t\t\tsemaphore.release();\n\t\t\t\t\tThread.sleep(500);\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\t\t}\n\t\t}", "void kickQueueProcessor() {\n\n long timeNow = this.tools.getTimestamp();\n this.lastKicked = timeNow;\n\n // ideally, we would run the queue at this time\n final long latestTimeToRun = timeNow + this.config.getProcessQueueIntervalShort();\n\n // only update the run time if we are bringing it forward not pushing it back\n this.runAgainAfterMs.getAndUpdate(previousTimeToRunNext ->\n (previousTimeToRunNext > latestTimeToRun) ? latestTimeToRun : previousTimeToRunNext);\n }", "public void lock() {\n if (!locked) {\n locked = true;\n sortAndTruncate();\n }\n }", "@Override\r\n\tpublic synchronized void run() {\r\n\r\n\t\t// Declare and initialise variable\r\n\t\tint admissionNumber = 0;\r\n\r\n\t\tdo {\r\n\r\n\t\t\t// Increment patient number\r\n\t\t\tadmissionNumber++;\r\n\r\n\t\t\t// Set triage rating\r\n\t\t\ttry {\r\n\t\t\t\tReceptionist.patientsFromDB.get(0).setTriageNumber(\r\n\t\t\t\t\t\tpresetTriageNumber());\r\n\t\t\t} catch (Exception 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\r\n\t\t\t// Set patient's admission number\r\n\t\t\tReceptionist.patientsFromDB.get(0).setAdmissionNumber(\r\n\t\t\t\t\tadmissionNumber);\r\n\t\t\t\r\n\t\t\t// Get new instant of time\r\n\t\t\tInstant startWait = Instant.now();\r\n\r\n\t\t\t// Set time patient added to waiting list in milliseconds since the\r\n\t\t\t// 1970 epoch\r\n\t\t\tReceptionist.patientsFromDB.get(0).setStartTimeWait(\r\n\t\t\t\t\tstartWait.toEpochMilli());\r\n\r\n\t\t\t// Add patient to Queue\r\n\t\t\thospQueue.addToQueue(Receptionist.patientsFromDB.get(0));\r\n\r\n\t\t\t// Remove first patient from the LinkedList of patients imported\r\n\t\t\t// from the database\r\n\t\t\tReceptionist.patientsFromDB.removeFirst();\r\n\r\n\t\t\t// Pause to represent gaps between patients - set at 1 to 2 minutes\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep((random.nextInt(60000) + 60000)\r\n\t\t\t\t\t\t/ TheQueue.TIME_FACTOR);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// While there are patients in the LinkedList from database\r\n\t\t} while (Receptionist.patientsFromDB.size() != 0);\r\n\r\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tleave = false;\n\t\t\t\t}", "private SleeperTask()\r\n\t{\r\n\t\ttimer = new Timer();\r\n\t\tprovider = null;\r\n\t\taction = \"\";\r\n\t\tverbose = false;\r\n\t\tsetRepeat(5);\r\n\t}", "private void waitForFree() throws InterruptedException {\n // Still full?\n while (isFull()) {\n // Park me 'till something is removed.\n block.await();\n }\n }", "public void updateWaitingTime(){\n waitingTime = waitingTime - 1;\n }", "private synchronized void incrementPending() {\n\t\tpending++;\n\t}", "private void incWaiters()\r\n/* 443: */ {\r\n/* 444:530 */ if (this.waiters == 32767) {\r\n/* 445:531 */ throw new IllegalStateException(\"too many waiters: \" + this);\r\n/* 446: */ }\r\n/* 447:533 */ this.waiters = ((short)(this.waiters + 1));\r\n/* 448: */ }", "public void run() {\n next.setEnabled(true);\n\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void run() {\n\n\t\t\tbumpCount = 0;\n\t\t}", "public void startWaves()\n\t{\n\t\tif(!this.active)\n\t\t{\n\t\t\tthis.spawnTimer = new CooldownTimer(0);\n\t\t\tthis.waveTimer = new CooldownTimer(0);\n\t\t\tthis.timeUntilNextWaveTimer = new CooldownTimer(0);\n\t\t\tthis.active = true;\t\n\t\t\tthis.totalWaves = waveList.size();\n\t\t\tthis.currentWave = waveList.peek();\n\t\t}\t\n\t}", "protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}", "public void stopSpinning()\n {\n scheduler.shutdown();\n startupLock.lock();\n spinning = false;\n }", "@Override\r\n\tpublic void run() {\n\t\tstartFlag = true;\r\n\t\twhile (startFlag) {\r\n \t\ttry {\r\n \t\t\tThread.sleep(updateRate);\r\n \t\t} catch (InterruptedException e) {\r\n \t\t\tSystem.out.println(e.getMessage());\r\n \t\t}catch (RuntimeException e) {\r\n\t\t\t\t//System.out.print(e.getMessage());\r\n\t\t\t}\r\n \t} \t\t\r\n\t}", "public void lockBack()\n {\n m_bBackLock = true;\n }", "private void initialBlockOnMoarRunners() throws InterruptedException\n {\n lock.lock();\n try\n {\n if (taskQueue.isEmpty() && runners > 1)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n }\n }\n finally\n {\n lock.unlock();\n }\n }", "@Override\r\n\tpublic void run() {\n\t\tint i=0;\r\n\t\twhile(i<1000) {\r\n\t\t\tq.get();\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n super.run();\n notAtomic.naIncreament();\n }", "@Override\n\tpublic void run() {\n\t\twhile(true) {//模拟某人不停取钱\n\t\t\tboolean flag = bC.withdrowMoney(1);\n\t\t\t//停止条件\n\t\t\tif(flag==false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void spinOnce()\n {\n\tfor (int x = 0; x < _fruits.length; x+= 1){\n\t /*\n\t //not sure which method for randomization is best.\n\t int oneRandInd= ((int)(Math.random()*24));\n\t int twoRandInd = ((int)(Math.random()*24));\n\t swap(oneRandInd, twoRandInd);\n\t */\n\t int randInd = (int) (Math.random()*24);\n\t swap(x, randInd);\n\t}\n }", "public void enqueue(String url) {\n while(is_locked){\n try {\n // timer_counter = timer_counter + 1;\n // if (timer_counter == 20) {\n // is_locked = false;\n // }\n Thread.sleep(100);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n\n is_locked = true;\n queue.add(url);\n is_locked = false;\n \n }", "synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}", "private void producerShutdownSpinLock() {\n\t\twhile (!imageProducer.isTerminated()) {\n\t\t\t// spin spin\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n if (mRemovedListener != null) {\n // Timed out waiting for device UUID that indicates device removal happened.\n mRemovedListener.onDeviceRemoved(mRemovedDeviceId, false);\n mRemovedListener = null;\n mRemovedUuidHash = 0;\n mRemovedDeviceId = 0;\n mService.setDeviceDiscoveryFilterEnabled(false);\n }\n\t\t}", "@Override\r\n\tpublic void freezeTimer() {\n\t\t\r\n\t}", "public boolean isHolding();", "@Override\n public void run()\n {\n is_started = true;\n while (!isShutdown())\n {\n LogicControl.sleep( 1 * 1000 );\n\n }\n finished = true;\n }", "public void remove() throws IllegalStateException\n {\n if(size() <= 0)\n {\n throw new IllegalStateException();\n }\n else\n {\n poll();\n }\n }", "private void startrun() {\n mHandler.postDelayed(mPollTask, POLL_INTERVAL);\n\t}", "public void timerInterrupt() {\n\n\t\tMachine.interrupt().disable();\n\n\t\t//while loop the threads in the TreeSet\n\t\twhile(!theThreads.isEmpty()) {\n\t\t\tPair curr_thread = theThreads.first(); //Fetch the first (lowest wakeTime) on the list\n\n\t\t\tif(curr_thread.wakeTime < Machine.timer().getTime()) { //Is the wakeTime for that thread < current time\n\t\t\t\ttheThreads.pollFirst(); //Remove it from the TreeSet, curr_thread holds it still.\n\t\t\t\tcurr_thread.thread.ready(); //Ready that thread\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbreak; //break the loop, not ready yet.\n\t\t\t}\n\t\t}\n\t\tMachine.interrupt().enable();\n\t\tKThread.yield(); //Yield the current thread.\n\t}", "protected void block() {\n while (true) {\n if (System.currentTimeMillis() - lastMovement > 2000) {\n return;\n }\n }\n \n }", "private void maintain() {\n SoftObject obj;\n int count = 0;\n\n while ((obj = (SoftObject)queue.poll()) != null) {\n count++;\n collection.remove(obj);\n }\n\n if (count != 0) {\n // some temporary debugging fluff\n System.err.println(\"vm reclaimed \" + count + \" objects\");\n }\n }", "public void stopIntake(){\n\t\tintake.set(0);\n }", "public void act() \r\n {\r\n addDrone();\r\n if(droneTimer>0)\r\n {\r\n droneTimer--;\r\n }\r\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tcounter.accumulate(1);\n\t\t\t\t}", "public synchronized void add(Integer item) {\r\n while (true) {\r\n if (buffer.size() == SIZE) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n buffer.add(item);\r\n notifyAll();\r\n return;\r\n }\r\n }", "public void run() {\n isRunningTime = true;\n\n coolDownTime.put(target, coolDownTime.get(target) - 1);\n\n if(coolDownTime.get(target) <= 0) {\n coolDownTime.remove(target);\n\n target.sendMessage(DwD + ChatColor.GOLD + \"Your Dark Cloud cooldown has expired.\");\n\n isRunningTime = false;\n\n taskCoolDownToCancel.cancel();\n }\n }", "@Override\n\tpublic synchronized T take() throws InterruptedException {\n try {\n while (queue.size()==0) wait();\n //if(debug) System.out.println(\"take: \"+queue.get(0));\n }\n catch (InterruptedException ie) {\n System.err.println(\"heh, who woke me up too soon?\");\n }\n // we have the lock and state we're seeking; remove, return element\n T o = queue.get(0);\n\n queue.remove(0);\n //this.data[] = null; // kill the old data\n notifyAll();\n return o;\n\t}" ]
[ "0.636628", "0.59555614", "0.5947028", "0.5925578", "0.58499926", "0.5816858", "0.5705437", "0.56695324", "0.5651532", "0.56476194", "0.5644496", "0.5644378", "0.56393945", "0.56285197", "0.5603365", "0.55825317", "0.557459", "0.55360675", "0.54888344", "0.5465049", "0.544345", "0.5427883", "0.53995883", "0.5399214", "0.5384014", "0.53799146", "0.53773105", "0.5373197", "0.5365858", "0.5365499", "0.536451", "0.5360059", "0.5349938", "0.53428084", "0.5341846", "0.5339513", "0.53352463", "0.53344977", "0.53001547", "0.5287791", "0.52817297", "0.527871", "0.5277927", "0.52763647", "0.5259085", "0.5258435", "0.5254974", "0.525317", "0.5251159", "0.52468854", "0.5246227", "0.52432483", "0.52312374", "0.5230979", "0.5230055", "0.5229721", "0.52250415", "0.5223938", "0.5222781", "0.5222288", "0.5222088", "0.52084625", "0.52082837", "0.5206825", "0.5206111", "0.5200857", "0.5192599", "0.51915693", "0.51820093", "0.5181747", "0.5173247", "0.5162919", "0.5157504", "0.5154223", "0.51492", "0.51481", "0.51458216", "0.5143476", "0.514102", "0.51390964", "0.5129242", "0.5123548", "0.5122972", "0.51195765", "0.5115548", "0.51149863", "0.5113187", "0.5112407", "0.51112163", "0.51108915", "0.51103204", "0.510821", "0.51032805", "0.510196", "0.5099095", "0.50966585", "0.5095967", "0.5093259", "0.50916153", "0.509157" ]
0.56327605
13
Wait for 10 seconds.
static void completeTests(Container c, int seconds) throws InterruptedException { log.log(true, "Waiting " + seconds + " seconds with " + nTesters.intValue() + " testers."); long stop = System.currentTimeMillis() + (seconds * 1000); while (System.currentTimeMillis() < stop) { Thread.sleep(100); } // Stop the testers. testing = false; // Wait some more. while (nTesters.intValue() > 0) { Thread.sleep(100); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void sleep() {\n\t\ttry {\n\t\t\tThread.sleep(10 * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t}", "private void Sleep() {\n\t\ttry {\n\t\t\tThread.sleep(10 * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void wait(int seconds) {\n try {\n Thread.sleep(seconds * 1000);\n }\n catch(InterruptedException ie) {\n System.out.println(\"ERROR WAITING: Failed to generate a Thread to wait.\");\n ie.printStackTrace();\n }\n }", "private static void wait(int seconds) {\n try {\n Thread.sleep(seconds * 1000);\n }\n catch(InterruptedException ie) {\n System.out.println(\"ERROR WAITING: Failed to generate a Thread to wait.\");\n ie.printStackTrace();\n }\n }", "private void await() {\n try {\n Thread.sleep(10 * 1000L);\n } catch (InterruptedException e) {\n // ignore\n }\n }", "public static void longWait(){\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(15);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"Interruption happened due to sleep() method\");\r\n\t\t}\r\n\t}", "public static void shortWait(){\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(5);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"Interruption happened due to sleep() method\");\r\n\t\t}\r\n\t}", "public void wait(int time) {\r\n\t\t\tsuper.sleep(time);\r\n\t\t}", "public static void wait(int ms){\n try\n {\n Thread.sleep(ms);\n }\n catch(InterruptedException ex)\n {\n Thread.currentThread().interrupt();\n }\n}", "private void sleep() {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public static void wait(int miliseconds){\n\t\ttry {\n\t\t\tThread.sleep(miliseconds);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void delay(long waitAmount){\r\n long time = System.currentTimeMillis();\r\n while ((time+waitAmount)>=System.currentTimeMillis()){ \r\n //nothing\r\n }\r\n }", "public static void waitForAI(){\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private static void waiting(int time) {\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void waitForSeconds(int i){\r\n\t\ttry {\r\n\t\t\tThread.sleep(1000*i);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void wait(int ms) {\n try {\n Thread.sleep(ms);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }", "private void _wait() {\n\t\tfor (int i = 1000; i > 0; i--)\n\t\t\t;\n\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(true){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.SECONDS.sleep(10);\r\n\t\t\t\t} catch (InterruptedException 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}", "public final void sleepBetweenActions()\n {\n long numOfMillis = Long\n .parseLong(getProperty(\"wait.between.user.actions.in.millis\"));\n if (numOfMillis > 10000)\n {\n numOfMillis = 10000;\n } else if (numOfMillis < 0)\n {\n numOfMillis = 0;\n }\n try\n {\n Thread.sleep(numOfMillis);\n } catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n }", "public static void sleep(double seconds) {\n for (int i = 0; i < seconds * 10; i++) {\n try {\n while (Display.getCurrent().readAndDispatch())\n ;\n Thread.sleep(100);\n } catch (Exception e) {\n } catch (Error e) {\n }\n }\n }", "private void sleep()\n {\n try {\n Thread.sleep(Driver.sleepTimeMs);\n }\n catch (InterruptedException ex)\n {\n\n }\n }", "private void sleep(long ms) throws InterruptedException {\n Thread.sleep(ms);\n }", "public static void waitForTime(int seconds) {\n\t\t//con static se posibilita no tener que crear un objeto de la clase\n\t\t//para emplear el metodo. Solo se usa el metodo llamando a la clase\n\t\ttry {\n\t\t\tThread.sleep(seconds*1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void waitWhileLoading()\r\n {\r\n while (isLoading())\r\n ThreadUtil.sleep(10);\r\n }", "private void sleep() {\n try {\n Thread.sleep(3000L);\n }\n catch (Exception ignored) {\n Log.trace(\"Sleep got interrupted.\");\n }\n }", "void sleep();", "void sleep();", "private void sleep() {\n try {\n for(long count = 0L; this.DATA_STORE.isButtonPressed() && count < this.sleepTime; count += 20L) {\n Thread.sleep(20L);\n }\n } catch (InterruptedException iEx) {\n // For now, InterruptedException may be ignored if thrown.\n }\n\n if (this.sleepTime > 20L) {\n this.sleepTime = (long)((double)this.sleepTime / 1.3D);\n }\n }", "public static void waitFor(int timeSecond) {\n try {\n Thread.sleep(timeSecond * 1000L);\n } catch (Exception e) {\n log.error(e.toString());\n }\n }", "public static void waitTime(long s) {\n long l = System.currentTimeMillis() + s;\n while (System.currentTimeMillis() < l) {\n\n }\n }", "public void warte( int ms )\n {\n try\n {\n Thread.sleep( ms );\n }\n catch ( InterruptedException e )\n {\n e.printStackTrace();\n }\n }", "private void waitMs(final long toWait) {\n synchronized (this) {\n try {\n if (toWait > 0) {\n wait(toWait);\n }\n } catch (InterruptedException ex) {\n Log.e(TAG, ex.getMessage(), ex);\n }\n }\n }", "public void implicitTime() {\n\n try {\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void sleepFor(long t) {\n\t\ttry {\n\t\t\tThread.sleep(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void delay() {\n\ttry {\n\t\tThread.sleep(500);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\t\n\t}", "public void doWait(){\n\t\tsynchronized(m){\n\t\t\ttry{\n\t\t\t\tm.wait(32000,0);\n\t\t\t} catch(InterruptedException e){}\n\t\t}\n\t}", "public void wait(int milliseconds)\r\n {\r\n try\r\n {\r\n Thread.sleep(milliseconds);\r\n }\r\n catch (Exception e)\r\n {\r\n // ignoring exception at the moment\r\n }\r\n }", "void sleep()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic void sleeps() {\n\t\t\n\t}", "@Override\n protected void sleep(int milliseconds) {\n super.sleep(milliseconds);\n }", "private void sleep(int seconds) {\n\n\t\ttry {\n\t\t\tTimeUnit.SECONDS.sleep(seconds);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void waitSleep(int pTime)\n{\n\n try {Thread.sleep(pTime);} catch (InterruptedException e) { }\n\n}", "private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep(2L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void waitToRetry()\n {\n final int sleepTime = 2000000;\n\n if (keepTrying)\n {\n try\n {\n Thread.sleep(sleepTime);\n }\n catch (Exception error)\n {\n log.error(\"Ignored exception from sleep - probably ok\", error);\n }\n }\n }", "public static void implicateWait(AndroidDriver driver) {\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\t\n\t}", "private void customWait() throws InterruptedException {\n while (!finished) {\n Thread.sleep(1);\n }\n finished = false;\n }", "public void implicitWait(){\r\n\t\tdriver.manage().timeouts().implicitlyWait(Integer.parseInt(FilesAndFolders.getPropValue(\"implicitWaitTime\")), TimeUnit.SECONDS);\r\n\t}", "@Override\r\n\tpublic synchronized void run() {\n\t\tlong secElapsed;\r\n\t\t//long startTime = System.currentTimeMillis();\r\n\t\tlong start= System.currentTimeMillis();;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.SECONDS.sleep(1);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tlong timeElapsed = System.currentTimeMillis() - start;\r\n\t\t\tsecElapsed = timeElapsed / 1000;\r\n\t\t\tif(secElapsed==10) {\r\n\t\t\t\tstart=System.currentTimeMillis();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Time -> 00:\"+secElapsed);\r\n\t\t}while(secElapsed<=10);\r\n\t\t\r\n\t}", "@Override\n\tpublic void sleep() {\n\t\t\n\t}", "public void Wait(double time) {\n\n\t\t\t\tdouble Time = time * 10000000;\n\t\t\t\tdouble t = 0;\n\t\t\t\twhile (t < Time)\n\t\t\t\t\tt++;\n\t\t\t}", "private static void sleep(int n) {\n try {\n TimeUnit.MILLISECONDS.sleep(n);\n } catch (InterruptedException e) {\n System.out.print(\"\\ndelay failed\");\n }\n }", "public void waitForPageToLoad(){\r\n\t\t\t\tDriver.driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t}", "public void waitUntilReady() throws IOException, InterruptedException {\n while (ready() == 0) {\n Thread.sleep(10);\n }\n }", "public void setTimeout(int timeout);", "@Override\n\tpublic void waitTimedOut() {\n\t\t\n\t\tif( busylinetimer == null )\n\t\t\treturn;\n\t\t\n\t\tbusylinetimer.stop();\n\t\tbusylinetimer = null;\n\t\t\n\t\tlog.info(\"linea ocupada por mas de 120 segundos, iniciando proceso para colgar llamada.......\");\n\t\t\n\t\tnew CellPhoneHandUpCall(modem,false);\n\t}", "public static void sleepForTwoSec() throws InterruptedException {\n Thread.sleep(2000);\n }", "public void wait(final int delay) {\n try {\n Thread.sleep(delay);\n } catch (InterruptedException e) {\n LOGGER.error(\"Wait interrupted: \" + e.getMessage(), e);\n }\n }", "private static void attendre (int tms) {\n try {Thread.currentThread().sleep(tms);} \r\n catch(InterruptedException e){ }\r\n }", "private static void attendre (int tms) {\n try {Thread.currentThread().sleep(tms);} \r\n catch(InterruptedException e){ }\r\n }", "private void delay( int n )\n {\n try {\n Thread.sleep(n);\n } catch( InterruptedException e ) {\n System.exit(0);\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(3);\n\t\t\t} catch (InterruptedException 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\t}", "private void waitForBuyersAction() throws InterruptedException\n {\n while(waiting)\n {\n Thread.sleep(100);\n }\n waiting = true;\n }", "public void waitForMilliSeconds(long number) {\n\n\t\ttry {\n\t\t\tThread.sleep(number);\n\t\t} catch (InterruptedException ie) {\n\n\t\t}\n\n\t}", "public static void waitForResources(long n) throws InterruptedException {\n Thread.sleep(n);\n }", "public void WaitTime(long miliseconds)\r\n {\r\n long startTime = System.currentTimeMillis();\r\n \r\n long estimatedTime = System.currentTimeMillis() - startTime;\r\n try {\r\n //driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n Thread.sleep(miliseconds);\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(MainDemoClass.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void delayStart() {\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n LOGGER.error(\"Could not sleep\", e);\n }\n }", "public void startWaitTime(){\r\n\t\twaitTime.start();\r\n\t}", "private void delay (int milliSec)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tThread.sleep (milliSec);\r\n\t\t}\r\n\t\tcatch (InterruptedException e)\r\n\t\t{\r\n\t\t}\r\n\t}", "public void wait(Integer id) throws DynamicCallException, ExecutionException{\n call(\"wait\", id).get();\n }", "public static void sleepFor(int sec) throws InterruptedException {\n Thread.sleep(sec * 1000);\n }", "public void waitForPageToLoad(WebDriver driver,int seconds)\n {\n driver.manage().timeouts().implicitlyWait(seconds, TimeUnit.SECONDS);\n\n }", "private void waitFPS() {\n try {\n Thread.sleep((int) (1000.0f / 60.0f));\n } catch (InterruptedException e) {\n logger.error(\"Unable to wait some milli's !\", e);\n }\n }", "public static void sleep(long msec)\n {\n try\n {\n Thread.sleep(msec);\n }\n catch (InterruptedException e)\n {\n }\n }", "public static void main(String[] args) throws InterruptedException {\n\t\t\n\t\tSystem.out.println(\"AAA\");\n\t\t\n\t\tThread.sleep(2000);\n\t\t\n\t\tSystem.out.println(\"AAA\");\n\t\t\n\t\t//wait for 10 seconds and then find an element.\n\t\t\n\t\t//if the element is abailbe in 1 seconds still the thread.sleep() will be waiting for 10 seconds.\n\t\t\n\t\t//if there are 100 of elements, it will degrade the performance.\n\t\t\n\t\t//the sleep gets interupted, it will handle and it wait for 10 seconds.\n\t\t\t\t\n\t}", "private static void nap(int secs) {\n try {\n Thread.sleep(secs * 1000);\n } catch (InterruptedException e) {\n }\n }", "public static void waitPageLoad(final WebDriver driver, final long seconds) {\n\t\ttry {\n\t\t\tThread.sleep(seconds * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void sleep ();", "public static void sleep(int seconds){\n seconds*=1000;\n try {\n Thread.sleep(seconds);\n }catch (InterruptedException e){\n e.getStackTrace();\n }\n }", "public void waitToFinish()\n {\n while(!this.finished)\n {\n try\n {\n Thread.sleep(1);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n return;\n }\n }\n }", "protected void pause() {\n sleep(300);\n }", "@When(\"^user wait for (.*) seconds$\")\n\tpublic void user_wait_for_seconds(int arg1) throws Throwable {\n\t\tThread.sleep(arg1*1000);\n\t \n\t}", "private void waitFor(ExpectedCondition condition, Integer timeOutInSeconds) {\n timeOutInSeconds = timeOutInSeconds != null ? timeOutInSeconds : 60;\n WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds);\n wait.until(condition);\n }", "private void monitoringWithTenSecondsLate() throws InterruptedException {\n WatchKey watchKey = null;\n while (true) {\n try {\n //poll everything every 10 seconds\n watchKey = watchService.poll(10, TimeUnit.SECONDS);\n for (WatchEvent<?> watchEvent : watchKey.pollEvents()) {\n WatchEvent.Kind<?> kind = watchEvent.kind();\n System.out.println(\"Event occured for \" + watchEvent.context().toString() + \" \" + kind.toString());\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(WatchServiceExample10SecondsLate.class.getName()).log(Level.SEVERE, null, ex);\n }\n //don't reset watch key for 10 seconds\n Thread.sleep(10000);\n boolean reset = watchKey.reset();\n if (!reset) {\n break;\n }\n }\n }", "public static void delay() {\n\n long ONE_SECOND = 1_000;\n\n try {\n Thread.sleep(ONE_SECOND);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void setDelayedTimeout(int seconds);", "public void waitAndClick(WebElement element) throws InterruptedException\n\t\t{\n\t\t\tint count=0;\n\t\t\twhile(count<20)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\telement.click();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch(Throwable e)\n\t\t\t\t{\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void webDriverTimeout(){\n try {\n Thread.sleep(TIMEOUT_SHORT);\n } catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "public WaitForDigitCommand() {\n super();\n this.timeout = -1;\n }", "public void sleepy(long ms)\n\t{\n\t\ttry {\n\t\t\tsleep(ms);\n\t\t} catch(InterruptedException e) {}\n\t}", "public void waitForNotificationOrFail() {\n new PollingCheck(5000) {\n @Override\n protected boolean check() {\n return mContentChanged;\n }\n }.run();\n mHT.quit();\n }", "public static void delay(int ms){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tThread.sleep(ms);\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "private void sleep(int number) {\n\t\ttry {\n\t\t\tThread.sleep(number);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}}", "public static void sleep(int secs){\n\t\ttry{\n\t\t\tThread.sleep(secs*1000);\n\t\t} catch (InterruptedException e){\n\t\t\t//FIXME See what exception is being thrown and what to do about it\n\t\t}\n\t}", "private void DisplaySleep(){\n\n try {\n TimeUnit.SECONDS.sleep(1);\n }\n catch(InterruptedException e){}\n }", "public void waitForNextTick() throws InterruptedException {\n Thread.sleep(timeoutPeriod);\n }", "void await(long timeout, TimeUnit unit) throws InterruptedException;", "@Override\r\n\tpublic void run() {\r\n\t\tfor ( int i = 0; i < 10; i++ ) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(900);\r\n\t\t\t}catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void sleepForChannelJoin() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tThread.sleep(config.getChannelJoinTimeout());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public synchronized void waitingToThraeds()\n\t{\n\t\twhile (countOfThreads<numberOfThreads)\n\t\t\n\t\ttry \n\t\t{\n\t\t\twait();\n\t\t}\n\t\tcatch(InterruptedException e)\n\t\t{\n\t\t\tSystem.out.println(\"Interrupted while waiting\");\n\t\t}\n\t \t\n\t\t\n \t\n\t}", "public void sleep(long secs) {\n\t\ttry {\n\t\t\tThread.sleep(secs * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void waitForData() {\n waitForData(1);\n }" ]
[ "0.73755765", "0.73543316", "0.72114784", "0.72114784", "0.71622276", "0.7081205", "0.69571984", "0.6683283", "0.6646772", "0.6641483", "0.6596483", "0.6590655", "0.65706265", "0.6564777", "0.654449", "0.6539217", "0.6529452", "0.6518438", "0.648199", "0.64594597", "0.64462924", "0.64372396", "0.63847935", "0.6379005", "0.63756835", "0.6372657", "0.6372657", "0.63399637", "0.6329262", "0.6328522", "0.63277614", "0.63130486", "0.62938154", "0.62599444", "0.6254225", "0.6252551", "0.62520313", "0.6246511", "0.62464476", "0.6229275", "0.62266815", "0.62235665", "0.6223236", "0.62109375", "0.62105215", "0.6205605", "0.61906254", "0.6184884", "0.6173541", "0.6159726", "0.6152974", "0.61290914", "0.61012614", "0.6085324", "0.6081111", "0.6074531", "0.6067783", "0.6054715", "0.6054715", "0.60462135", "0.6042945", "0.6025135", "0.6020963", "0.59877485", "0.5986149", "0.59808034", "0.5971254", "0.597017", "0.59642303", "0.5959964", "0.59578896", "0.5953333", "0.59532386", "0.59507936", "0.59507555", "0.5946651", "0.594049", "0.59369797", "0.5933704", "0.59266967", "0.59230965", "0.591729", "0.59002227", "0.5898082", "0.5896473", "0.58952117", "0.58865756", "0.5872647", "0.5866576", "0.58625406", "0.58481663", "0.58476216", "0.5840921", "0.5835619", "0.58340716", "0.58332175", "0.58226585", "0.58014536", "0.5788255", "0.5782961", "0.5776823" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_search, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }" ]
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644464", "0.68644464", "0.68644464", "0.6855815", "0.68494046", "0.68220186", "0.68183845", "0.68154365", "0.6815009", "0.6815009", "0.68082577", "0.6802161", "0.68002385", "0.67936224", "0.67918605", "0.679087", "0.67849934", "0.6760954", "0.67599845", "0.67507833", "0.67461413", "0.67461413", "0.67431796", "0.67413616", "0.6728648", "0.672732", "0.67251813", "0.67251813", "0.67232496", "0.67152804", "0.67092025", "0.67071015", "0.6702423", "0.6701286", "0.66991764", "0.66969806", "0.66888016", "0.66863585", "0.6686101", "0.6686101", "0.66828436", "0.6681769", "0.6679519", "0.6671908", "0.66700244", "0.6665301", "0.66587126", "0.66587126", "0.66587126", "0.6658098", "0.66570866", "0.66570866", "0.66570866", "0.665458", "0.66533303", "0.66528934", "0.66513336", "0.66495234", "0.66490155", "0.6648172", "0.6648159", "0.6647816", "0.6647625", "0.6645882", "0.66453695", "0.66441536", "0.66413796", "0.66374624", "0.66360414", "0.6635178", "0.66346484", "0.66346484", "0.66346484", "0.6632149", "0.66308904", "0.66287386", "0.66283447", "0.6627003", "0.6624185", "0.6621111", "0.662078" ]
0.0
-1
The further rightside structure of a collection Pre : Takes the frequency and the ASCII number of a character. Post : Set the structure into given frequency and ASCII number.
public HuffmanNode(int freq, int ascii){ this.freq = freq; this.ascii = ascii; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(int symbol, int freq);", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "public Node(char character, int frequency){\n\t\tthis.character = character;\n\t\tthis.frequency = frequency;\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "private void add(Character c, int frequency) {\n for (int i = 1; i <= frequency; i++) {\n tileBag.add(new Tile(c));\n }\n }", "public void setFrequencies(Set<Frequency> arg0) {\n \n }", "public Node(Character letter, int freq, Node left, Node right) {\n\t\t\tthis.letter = letter;\n\t\t\tthis.freq = freq;\n\t\t\tthis.left = left;\n\t\t\tthis.right = right;\n\t\t}", "EnsembleLettre(Collection<? extends Character> c) {\n\t\tsuper(c);\n\t}", "public FrequencyList (String input){\n\tadd(input);\n }", "public int getFreq(){ return frequency;}", "public void encodeChars() {\n encodedChars = new int[uniqueChars.size()];\n Iterator<Character> mover = uniqueChars.iterator();\n Iterator<Character> moverTwo = uniqueChars.iterator();\n System.out.print(\"\\nEncoding characters to its ASCII integer value:\");\n for(int a = 0; a < uniqueChars.size(); a++) {\n encodedChars[a] = (int)mover.next();\n encodedChars[a] = encodedChars[a] / encodedChars[a] + a - 1;\n System.out.print(moverTwo.next() + \" : \" + encodedChars[a] + \", \");\n }\n System.out.println(\"\\n\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tString s = \"asdfasdfafk asd234asda\";\n\t //Map<Character, Integer> charMap = new HashMap<Character, Integer>();\n\t \n\t Map<Character,Integer> map = new HashMap<Character,Integer>();\n\t for (int i = 0; i < s.length(); i++) {\n\t char c = s.charAt(i);\n\t System.out.println(c);\n\t //if (Character.isAlphabetic(c)) {\n\t if (map.containsKey(c)) {\n\t int cnt = map.get(c);\n\t System.out.println(cnt);\n\t map.put(c,++cnt);\n\t } else {\n\t map.put(c, 1);\n\t }\n\t \n\t }\n\t // }\n\t System.out.println(map);\n\t \n\t \n\t /* char[] arr = str.toCharArray();\n\t System.out.println(arr);\n\t \n\n\t\t\n\t\tfor (char value: arr) {\n\t\t \n\t\t if (Character.isAlphabetic(value)) { \n\t\t\t if (charMap.containsKey(value)) {\n\t\t charMap.put(value, charMap.get(value) + 1);\n\t\t \n\t\t } \n\t\t\t else { charMap.put(value, 1); \n\t\t } \n\t\t\t } \n\t\t }\n\t\t \n\t\t System.out.println(charMap);*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t \n \t}", "public OCRSet(Collection<? extends E> c) {\r\n this.map =\r\n new HashMap<Integer, E>(Math.max((int) (c.size() / .75f) + 1,\r\n 16));\r\n this.addAll(c);\r\n }", "public void setFrequency(int f){\n this.frequency = f;\n }", "public void Insert(char ch){\n if(occurrence[ch]==-1)\n occurrence[ch]=index++;\n else if(occurrence[ch]>=0)\n occurrence[ch]=-2;\n }", "public TagFreq(String stringRepresentation) {\r\n\t\t\r\n\t\tint indexOfFreq = stringRepresentation.lastIndexOf('(') + 1; \r\n\t\t\r\n\t\tthis.tagName =\r\n\t\t\tstringRepresentation.substring(0, indexOfFreq - 2);\r\n\t\tthis.freq =\r\n\t\t\tInteger.parseInt(stringRepresentation.\r\n\t\t\t\t\t\t\t\tsubstring(indexOfFreq,\r\n\t\t\t\t\t\t\t\t\t\t stringRepresentation.length() - 1));\r\n\t}", "public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }", "public void set_count(int c);", "public Node(int frequency){;\n\t\tthis.frequency = frequency;\n\t\t// we cannot use null since it is our EOF so try \"SOH\" or start of heading.\n\t\t// also setting here does not work ... (hmm)!\n\t\tthis.character = (char) 0x01;\n\t}", "public typeE (Character c , Integer n) {\r\n\t\t\tthis.c=c;\r\n\t\t\tthis.n=n;\r\n\t\t}", "public String frequencySort(String s) {\n\n\t\t// prepare a frequency map\n\t\tMap<Character, Integer> m = new HashMap<Character, Integer>();\n\t\tfor (char c : s.toCharArray())\n\t\t\tm.put(c, m.getOrDefault(c, 0) + 1);\n\n\t\tPriorityQueue<CKEntry1> pq = new PriorityQueue<>();\n\t\tfor (Entry<Character, Integer> e : m.entrySet()) {\n\t\t\tpq.add(new CKEntry1(e.getKey(), e.getValue()));\n\t\t}\n\t\t\n\t\t// prepare the output now\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile(!pq.isEmpty()) {\n\t\t\tCKEntry1 temp = pq.poll();\n\t\t\tchar[] tempC = new char[temp.count];\n\t\t\tArrays.fill(tempC, temp.c); // repeat c count' times\n\t\t\tsb.append(tempC);\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\n\t}", "public OCRSet(int initialCapacity) {\r\n this.map = new HashMap<Integer, E>(initialCapacity);\r\n }", "public static void main(String[] args) {\n Scanner teclado = new Scanner(System.in);\r\n String mensajeUsuario;\r\n System.out.println(\"Ingrese su mensaje:\");\r\n mensajeUsuario = teclado.nextLine();\r\n \r\n ArrayList inicial = new ArrayList<Nodo>();\r\n \r\n boolean valido = true;\r\n int contador = 0;\r\n //Se convierte el mensaje a una array de chars\r\n char [] arrayMensaje = mensajeUsuario.toCharArray();\r\n //Se cuenta la frecuencia de cada elemento\r\n for(char i: arrayMensaje){\r\n valido = true;\r\n Iterator itr = inicial.iterator();\r\n //Si el elemento que le toca no fue contado ya, es valido contar su frecuencia\r\n while (itr.hasNext()&&valido){\r\n Nodo element = (Nodo) itr.next();\r\n if (i==element.getCh()){\r\n valido = false;\r\n }\r\n }\r\n //Contar la frecuencia del elemento\r\n if (valido== true){\r\n Nodo temp = new Nodo();\r\n temp.setCh(i);\r\n for (char j:arrayMensaje){\r\n if (j==i){\r\n contador++;\r\n }\r\n }\r\n temp.setFreq(contador);\r\n inicial.add(temp);\r\n contador = 0;\r\n \r\n }\r\n }\r\n //Se recorre la lista generada de nodos para mostrar la frecuencia de cada elemento ene el orden en que aparecen\r\n System.out.println(\"elemento | frecuencia\");\r\n Iterator itr = inicial.iterator();\r\n while (itr.hasNext()){\r\n Nodo element = (Nodo)itr.next();\r\n System.out.println(element.getCh() + \" \"+ element.getFreq());\r\n }\r\n \r\n HuffmanTree huff = new HuffmanTree();\r\n huff.createTree(inicial);\r\n //System.out.println(huff.getRoot().getCh()+\" \"+huff.getRoot().getFreq());\r\n \r\n huff.codificar();\r\n System.out.println(\"elemento | frecuencia | codigo\");\r\n Iterator itrf= huff.getListaH().iterator();\r\n while(itrf.hasNext()){\r\n Nodo pivotal = (Nodo)itrf.next();\r\n System.out.println(pivotal.getCh() + \" \"+ pivotal.getFreq()+ \" \"+ pivotal.getCadena()); \r\n }\r\n \r\n System.out.println(\"Ingrese un codigo en base a la tabla anterior, separando por espacios cada nuevo caracter\");\r\n mensajeUsuario = teclado.nextLine();\r\n mensajeUsuario.indexOf(\" \");\r\n String mensajeFinal = \"\";\r\n String letra = \" \";\r\n String[] arrayDecode = mensajeUsuario.split(\" \");\r\n boolean codigoValido = true;\r\n for (String i: arrayDecode){\r\n if (codigoValido){\r\n letra = huff.decodificar(i);\r\n }\r\n if (letra.length()>5){\r\n codigoValido = false;\r\n }\r\n else {\r\n mensajeFinal = mensajeFinal.concat(letra);\r\n }\r\n }\r\n \r\n if (codigoValido){\r\n System.out.println(mensajeFinal);\r\n }\r\n else {\r\n System.out.println(\"El codigo ingresado no es valido\");\r\n }\r\n \r\n \r\n }", "public void Insert(char ch)\n {\n Integer cnt= (Integer) map.get(ch);\n if(cnt==null){\n map.put(ch,1);\n }else{\n map.put(ch,cnt+1);\n }\n list.add(ch);\n }", "private void CreateFreq(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr) {\n for (int key : freqY.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FY.append(\"/\");\n FY.append(auxs);\n auxs = Integer.toBinaryString(freqY.get(key));\n FY.append(\"/\");\n FY.append(auxs);\n }\n\n for (int key : freqCb.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCB.append(\"/\");\n FCB.append(auxs);\n auxs = Integer.toBinaryString(freqCb.get(key));\n FCB.append(\"/\");\n FCB.append(auxs);\n }\n\n for (int key : freqCr.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCR.append(\"/\");\n FCR.append(auxs);\n auxs = Integer.toBinaryString(freqCr.get(key));\n FCR.append(\"/\");\n FCR.append(auxs);\n }\n FCR.append(\"/\");\n }", "public String toString()\n\t{\n\t\treturn \"Character: \" + characters + \" Frequency: \" + frequency;\n\t}", "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tString S = s.nextLine();\n\t\tint[] freq = new int[26]; // 빈도수 저장\n\t\tfor (int i = 0; i < S.length(); i++) {\n\t\t\tfreq[S.charAt(i) - 97]++;\n\t\t}\n\t\tfor (int i = 0; i < freq.length; i++) {\n\t\t\tif (i == freq.length - 1)\n\t\t\t\tSystem.out.println(freq[i]);\n\t\t\telse\n\t\t\t\tSystem.out.print(freq[i] + \" \");\n\t\t}\n\t}", "void set( couple ch)\r\n { \r\n \r\n //couple ch = itr.next();\r\n ch.g1.sethappy(ch.bucket);\r\n ch.b1.sethappy(ch.bucket);\r\n ch.happiness = ch.b1.happy + ch.g1.happy;\r\n ch.compatibility = (ch.b1.budget - ch.g1.getmaint()) + Math.abs(ch.b1.getintg() - ch.g1.getiq()) + Math.abs(ch.b1.getattr() - ch.g1.getb());\r\n // this sets the happiness n compatibility of the co \r\n \r\n }", "void setCap(int cap);", "private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\t\t\t\tif (guessedCharacter.contains(ch)) {\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!temp.containsKey(ch)) {\r\n\t\t\t\t\t\ttemp.put(ch, 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint t = temp.get(ch) + 1;\r\n\t\t\t\t\t\ttemp.put(ch, 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\r\n\t\tcharCount = temp;\r\n\r\n\t}", "public Collection(char colour) { /* ... code ... */ }", "public void SetFrequency(int Frequency, String ElementID){\n\t\t_TEST stack = new _TEST();\t\t\t\t\t\t\t\t\t \t\t/* TEST */\n\t\tstack.PrintHeader(ID,Frequency+\":int, \" + ElementID+\":String\",\"\");\t/* TEST */\n\t\tGENERATOR GEN_to_setsfrequency;\t\n\t\tGEN_to_setsfrequency = new GENERATOR(0,0,null);\t\t\t/* Temporalis valtozo */\n\t\tGetElementByID(GEN_to_setsfrequency.ID);\t\t\t\t\t/* GetElemetByIDvel megkapjuk, az objektumot\t*/\t\t\n\t\tGEN_to_setsfrequency.SetSequence(Frequency); \t\t\t\t /* az generator objektum SetFrequency(...) metodusat meghivjuk */\n\t\tstack.PrintTail(ID,Frequency+\":int, \" + ElementID+\":String\",\"\");\t /* TEST */\t\n\t}", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "public void Insert_1(char ch){\n sb.append(ch);\n if(chs[ch] == 0){\n chs[ch] = 1;\n }else{\n chs[ch]++;\n }\n }", "public void Insert(char ch) {\n s.append(ch);\n hashtable[ch]++;\n }", "static HashMap runLengthEncoding(List<Character> list){\r\n\t\t\r\n\t\tHashMap<Character,Integer> map=new HashMap<>();\r\n\t\t\r\n\t\tfor(char a:list)\r\n\t\t{\r\n\t\tif(map.get(a)==null)\r\n\t\t{\r\n\t\t\tmap.put(a, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmap.put(a, map.get(a)+1);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\treturn map;\r\n\t\r\n\t}", "public void Insert(char ch)\n {\n arr[ch]++;\n }", "public HashBag(Collection<E> c) {\n map = new HashMap<>((c.size() * 4) / 3);\n for (E item : c) {\n if (item == null)\n continue;\n Counter val = map.get(item);\n if (val == null)\n map.put(item, new Counter(1));\n else\n val.increment();\n }\n }", "java.lang.String getFrequency();", "public FrequencyBag() {\n\t\tfirstNode = null;\n\t\tnumEntries = 0;\n\t}", "public void doCount(ArrayList<String> liste){\n\t\tint j;\n\t\t\n\t\tfor (int i = 0; i < liste.size(); i++) {\n\t\t\t// check if string already exists\n\t\t\tif(!map.containsKey(liste.get(i))){\n\t\t\t\t// check frequency of the given string\n\t\t\t\tj = Collections.frequency(liste, liste.get(i));\t\n\t\t\t\t\n\t\t\t\t// underscore instead of blank space\n\t\t\t\tif(liste.get(i).equals(\" \"))\n\t\t\t\t\tmap.put(\"_\", j);\t\n\t\t\t\telse\n\t\t\t\t\tmap.put(liste.get(i), j);\t// (char, frequency)\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t//return map;\n\t}", "private static void createMap(Map<Character, Integer> map) {\n Scanner scanner = new Scanner(System.in); // create scanner\n System.out.println(\"Enter a string:\"); // prompt for user input\n String input = scanner.nextLine();\n\n char[] chars = input.replace(\" \", \"\").toCharArray();\n\n for (Character chr : chars) {\n if (map.containsKey(chr)) {\n int count = map.get(chr); // get current count\n map.put(chr, count + 1); // increment count\n } else\n map.put(chr, 1); // add new char with a count of 1 to map\n }\n }", "public static void main(String[] args) {\n\t\t\t\n\t\t\tString input=\"ABCGRETCABCG\";\n\t\t\tint n = 3;\n\t\t\t\n\t\t\tMap<String,Integer> substrMap=new HashMap<String,Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i+n<=input.length();i++){\n\t\t\t\t\n\t\t\t\tString substr=input.substring(i, i+n);\n\t\t\t\t\n\t\t\t\tint frequency=1;\n\t\t\t\t\n\t\t\t\tif(substrMap.containsKey(substr)){\n\t\t\t\t\t\n\t\t\t\t\tfrequency=substrMap.get(substr);\n\t\t\t\t\tfrequency++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsubstrMap.put(substr, frequency);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(substrMap.toString());\n\t\t}", "public Verbum getName(){\r\n\t\t// Pick random starting point in the linked list\r\n\t\tint start = (int)(Math.random() * words.size());\r\n\t\tDSElement<Verbum> w = words.first;\r\n\t\tfor(int i = 0; i < start; i++)\r\n\t\t\tw = w.getNext();\r\n\t\tchar freq; \r\n\t\tchar freqLevel = 'C'; //Anything ABOVE this char will be used\r\n\t\t/* Frequency:\r\n\t\t * A full column or more, more than 50 citations - very frequent\r\n\t\t * B half column, more than 20 citations - frequent\r\n\t\t * C more then 5 citations - common\r\n\t\t * D 4-5 citations - lesser\r\n\t\t * E 2-3 citations - uncommon\r\n\t\t * F only 1 citation - very rare\r\n\t\t */\r\n\t\tint count = words.size(); // failsafe counter\r\n\t\twhile(count > 0){\r\n\t\t\tif(w.getItem().attribs.length()>3)\r\n\t\t\t\tfreq = w.getItem().attribs.charAt(3);\r\n\t\t\telse \r\n\t\t\t\tfreq = 'E';\r\n\t\t\tif(w.getItem().pos.equals(\"N\") && freq < freqLevel &&\r\n\t\t\t\t\tCharacter.isUpperCase(w.getItem().form1.charAt(0))) //Check is first letter is capitalized\r\n\t\t\t\treturn w.getItem();\r\n\t\t\tw = w.getNext();\r\n\t\t\tif(w == null)\r\n\t\t\t\tw = words.first;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\tw.setItem(new Verbum());\r\n\t\tw.getItem().form1 = \"inrepertum\";\r\n\t\tw.getItem().cw.item = \"inrepertum\";\r\n\t\treturn w.getItem(); // Failsafe word\r\n\t}", "public static void showFrequency(int[]ASCIIarray) {\n char letter = ' ';\n for(int i = 0; i < ASCIIarray.length;i++){\n if(ASCIIarray[i]>0){\n letter = (char)(i);\n System.out.println(\"The letter '\" + letter + \"' appeared \" + ASCIIarray[i] + \" times\");\n }\n }\n }", "private void put(String asciiChange, String asciiChange2) {\n\t\t\t\r\n\t\t}", "void increaseSortLetter();", "public TagFreq(int freq, String tagName) {\r\n\t\tthis.freq = freq;\r\n\t\tthis.tagName = tagName;\r\n\t}", "public ComputeTermFrequencies() { super(); }", "private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }", "public Dictionary()\n\t{\n\t\tfor(Character i = 97; i<=122;i++)\n\t\t\tthis.put(i,new ArrayList<DictionaryElement>());\n\t\t\t\n\t}", "public void initPitchDictionary() {\n\t\tnoteToPitch = new Hashtable<Character, Integer>();\n\t\tnoteToPitch.put('C', 60);\n\t\tnoteToPitch.put('D', 62);\n\t\tnoteToPitch.put('E', 64);\n\t\tnoteToPitch.put('F', 65);\n\t\tnoteToPitch.put('G', 67);\n\t\tnoteToPitch.put('A', 69);\n\t\tnoteToPitch.put('B', 71);\n\t}", "public TreeNode(TreeNode left, TreeNode right, int freq){\n\t\tleftChild = left;\n\t\trightChild = right;\n\t\tfrequency = freq;\n\t\tkey = '\\0';\n\t}", "public Verbum getWord(String pos, char freqLevel){\r\n\t\t// Pick random starting point in the linked list\r\n\t\tint start = (int)(Math.random() * words.size());\r\n\t\tDSElement<Verbum> w = words.first;\r\n\t\tfor(int i = 0; i < start; i++)\r\n\t\t\tw = w.getNext();\r\n\t\tchar freq; \r\n\t\t//char freqLevel = 'B'; //Anything ABOVE this char will be used\r\n\t\t/* Frequency:\r\n\t\t * A full column or more, more than 50 citations - very frequent\r\n\t\t * B half column, more than 20 citations - frequent\r\n\t\t * C more then 5 citations - common\r\n\t\t * D 4-5 citations - lesser\r\n\t\t * E 2-3 citations - uncommon\r\n\t\t * F only 1 citation - very rare\r\n\t\t */\r\n\t\tint count = words.size()*100; // failsafe counter\r\n\t\twhile(count > 0){\r\n\t\t\tif(w.getItem().attribs.length()>3)\r\n\t\t\t\tfreq = w.getItem().attribs.charAt(3);\r\n\t\t\telse \r\n\t\t\t\tfreq = 'E'; // If missing feq data, just put very low - i.e. normally not called\r\n\t\t\t//Names are not allowed to be retrieved here\r\n\t\t\tif(w.getItem().pos.equals(pos) && freq < freqLevel && Character.isLowerCase(w.getItem().form1.charAt(0)))\r\n\t\t\t\treturn w.getItem();\r\n\t\t\tw = w.getNext();\r\n\t\t\tif(w == null)\r\n\t\t\t\tw = words.first;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\tw.setItem(new Verbum());\r\n\t\tw.getItem().form1 = \"inrepertum\";\r\n\t\tw.getItem().cw.item = \"inrepertum\";\r\n\t\t//w.getItem().form1 = w.getItem().form1 + \" BAD\";\r\n\t\treturn w.getItem(); // Failsafe word\r\n\t}", "private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}", "public void testMacronProcess(){\r\n\t\tDSElement<Verbum> e = words.first;\r\n\t\tfor(int i = 0; i<1000; i++){\r\n\t\t\tVerbum v = e.getItem();\r\n\t\t\tSystem.out.println(v.nom + \" \" + v.macrons + \" \" + v.form1);\r\n\t\t\te = e.getNext();\r\n\t\t}\r\n\t}", "public OCRSet(int initialCapacity, float loadFactor) {\r\n this.map = new HashMap<Integer, E>(initialCapacity, loadFactor);\r\n }", "public static void main(String[] args) \r\n\t{\n\t\tString str=\"pizzapan\";\r\n\t\t//int c=0;\r\n\t\t\r\n\t\tHashMap<Character,Integer> hm=new HashMap<>();\r\n\t\t\r\n\t\tchar s[]=str.toCharArray();\r\n\t\t\r\n\t\t//for(int i=0;i<=s.length;i++)\r\n\t\t\r\n\t\tfor(char var:s)\r\n\t\t{\r\n\t\t\t//c++;\r\n\t\t\tif(hm.containsKey(var))\r\n\t\t\t{\r\n\t\t\t\t//System.out.println( hm.get(var));\r\n\t\t\t\thm.put(var, hm.get(var)+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\thm.put(var, 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(hm);\r\n\t\t\r\n\t\tSet<Entry<Character, Integer>>en=hm.entrySet();\r\n\t\t\r\n\t\tIterator<Entry<Character, Integer>>itr=en.iterator();\r\n\t\twhile(itr.hasNext())\r\n\t\t{\r\n\t\t\r\n\t\t\tMap.Entry<Character, Integer> data=itr.next();\r\n\t\t\tchar ch=data.getKey();\r\n\t\t\tint occ=data.getValue();\r\n\t\t\tSystem.out.println(ch+\" \"+occ);\r\n\t\t}\r\n\t\t\r\n\t}", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "OCRSet(int initialCapacity, float loadFactor, boolean dummy) {\r\n this.map = new LinkedHashMap<Integer, E>(initialCapacity, loadFactor);\r\n }", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "public static void addToKB(String str, int index) {\r\n \tArrayList<String> front = new ArrayList<String>();\r\n\t\tArrayList<String> back = new ArrayList<String>();\t\t\r\n\t\tSet<Predicate> pred = new HashSet<Predicate>();\r\n\t\tString[] orign = str.split(\" \");\t\t\r\n\t\tboolean isfront = true;\r\n\t\tfor(int i =0; i < orign.length; i++) {\r\n\t\t\tif(!orign[i].equals(\"=>\") && isfront && !orign[i].equals(\"&\") && !orign[i].equals(\"=>\") ) {\r\n\t\t\t\tfront.add(orign[i]);\r\n\t\t\t}else if(orign[i].equals(\"=>\")) {\r\n\t\t\t\tisfront = false;\r\n\t\t\t}\r\n\t\t\telse if(!orign[i].equals(\"&\") && !orign[i].equals(\"=>\")){\r\n\t\t\t\tback.add(orign[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t for(String s : front) {\r\n\t \tif(isfront == false) {\r\n\t \t\ts = negation(s);\r\n\t \t\tPredicate predTemp = ConvertToPre(s, index);\r\n\t \t\tpred.add(predTemp);\r\n\t \t\t\r\n\t \t\tSet<Integer> setTemp = preDict.getOrDefault(predTemp, new HashSet<Integer>());\r\n\t \t\tsetTemp.add(index);\r\n\t \t\tpreDict.put(predTemp, setTemp);\r\n\t \t}else {\r\n\t \t\tPredicate predTemp = ConvertToPre(s, index);\r\n\t \t\tpred.add(predTemp);\r\n\t \t\tSet<Integer> setTemp = preDict.getOrDefault(predTemp, new HashSet<Integer>());\r\n\t \t\tsetTemp.add(index);\r\n\t \t\tpreDict.put(predTemp, setTemp);\r\n\t \t}\t\t\t\r\n\t\t}\r\n\t\tfor(String s : back) {\r\n\t\t\tPredicate predTemp = ConvertToPre(s, index);\r\n \t\tpred.add(predTemp);\r\n \t\tSet<Integer> setTemp = preDict.getOrDefault(predTemp, new HashSet<Integer>());\r\n \t\tsetTemp.add(index);\r\n \t\tpreDict.put(predTemp, setTemp);\r\n\t\t}\r\n\t\tClause clause = new Clause(pred);\r\n\t\tKB.put(index, clause);\r\n\t\t//KB.put(index, pred);\r\n\t\t//test\r\n\t\t/*\r\n\t\t * System.out.println(index); System.out.println();\r\n\t\t * System.out.println(pred.size());\r\n\t\t */\r\n }", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "public OCRSet() {\r\n this.map = new HashMap<Integer, E>();\r\n }", "public void setInterFreq(InterFreq interFreq) {\n\t\tthis.interFreq = interFreq;\n\t}", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}", "public static void main(String[] args) {\n\t\tScanner stdin = new Scanner(System.in);\n\t\tString line = stdin.nextLine().toLowerCase();\n\t\tint[] freq = new int[26];\n\t\tint cnt = 0;\n\t\tfor (int i=0; i<line.length(); i++) {\n\t\t\tif (line.charAt(i) >= 'a' && line.charAt(i) <='z') {\n\t\t\t\tfreq[line.charAt(i)-'a']++;\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We greedily assign these in order.\n\t\tArrays.sort(freq);\n\t\t\n\t\t// So make the most frequent characters the cheapest.\n\t\tint cost = 0;\n\t\tfor (int i=0,j=freq.length-1; j>=0; i++,j--)\n\t\t\tcost += (freq[j]*COST[i]);\n\t\t\t\n\t\t// Separators.\n\t\tcost += (3*(cnt-1));\n\t\t\t\t\n\t\t// Ta da!\n\t\tSystem.out.println(cost);\n\t}", "public static void main(String[] args) {\n\t\tScanner mScanner = new Scanner(System.in);\r\n\t\tString mString = mScanner.nextLine();\r\n\t\tmString = mString.replaceAll(\"[\\\\s,{}]\",\"\");\r\n\t\tchar[] c = mString.toCharArray();\r\n\t\tint toReplace=1;\r\n\t\tint coun = 0;\r\n\t\tArrays.sort(c);\r\n HashSet<Character> mSet = new HashSet<Character>();\r\n for (Character x : c) {\r\n\t\t\tmSet.add(x);\r\n\t\t}\r\n System.out.println(mSet.size());\r\n// for (int i = 0; i < c.length; i++) {\r\n// \tSystem.out.println(c[i]);\r\n//\t\t}\r\n\t\t\r\n\t}", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText();\n // construct a vector of tokens and update the tokenList in CAS\n // use tokenize0 from above\n List<String> ls = tokenize0(docText);\n Map<String, Integer> map = new HashMap<String, Integer>();\n Collection<Token> token_collection = new ArrayList<Token>();\n for (String d : ls) {\n if (map.containsKey(d)) {\n int inc = map.get(d) + 1;\n map.put(d, inc);\n } else {\n map.put(d, 1);\n }\n }\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry) it.next();\n Token t = new Token(jcas);\n String k = pairs.getKey().toString();\n int v = Integer.parseInt(pairs.getValue().toString());\n t.setFrequency(v);\n t.setText(k);\n token_collection.add(t);\n it.remove(); // avoids a ConcurrentModificationException\n }\n // use util tool to convert to FSList\n doc.setTokenList(Utils.fromCollectionToFSList(jcas, token_collection));\n doc.addToIndexes(jcas);\n\n }", "public static void main(String[] args)\n {\n String text=\"A B C D | E F G | H I J K L M N O P Q R S | A\";\n Occ occ=new Occ();\n OccList list = new OccList();\n for (String tok: text.split( \" \" ) ) {\n if ( tok.equals( \"|\" )) {\n list.reset();\n continue;\n }\n list.add( occ.orth( tok ) );\n System.out.println( list );\n }\n }", "private void traverseLine(String str) {\n\t\tFrequencyCount f ;\r\n\t\tint prev = 0;\r\n\t\tString docid = \"\";\r\n\t\tint flag = 0,flag1 = 0;\r\n\t\tfor(int k = 0;k<str.length();k++)\r\n\t\t{\r\n\t\t\t//System.out.print(str.charAt(k));\r\n\t\t\tif(str.charAt(k) == ':'){\r\n\t\t\t\tflag = 1;k++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(flag == 1){\r\n\t\t\t\tint indexid;\r\n\t\t\t\tif(flag1 == 0){\r\n\t\t\t\t\tcounter = \"\";\r\n\t\t\t\t\tindexid = str.indexOf(':', k);\r\n\t\t\t\t\tcounter = str.substring(k, indexid);\r\n\t\t\t\t\tk = indexid+1;\r\n\t\t\t\t\tflag1 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tindexid = str.indexOf('#', k);\r\n\t\t\t\tdocid = String.valueOf(Integer.parseInt(str.substring(k, indexid))+prev);\r\n\t\t\t\tprev = Integer.parseInt(docid);\r\n\t\t\t\t\r\n\t\t\t\tf = new FrequencyCount(docid);\r\n\t\t\t\tk = indexid+1;\r\n\t\t\t\twhile(str.charAt(k) != '|'){\r\n\t\t\t\t\tif(k+1 == str.length()){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(str.charAt(k) == '#') {k++;continue;}\r\n\t\t\t\t\tint flagop = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch(str.charAt(k)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcase 't' : flagop = 1;\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\tcase 'i' : flagop = 2;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'b' : flagop = 3;\r\n\t\t\t\t \t\t \t\t\tbreak;\r\n\t\t\t\t\t\tcase 'r' : flagop = 6;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'L' : flagop = 5;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'c' : flagop = 4;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'l' : flagop = 7;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault : flagop = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(flagop != 0){\r\n\t\t\t\t\t\tindexid = Math.min(str.indexOf('#', k), str.indexOf('|', k));\r\n\t\t\t\t\t\tif(indexid == -1){\r\n\t\t\t\t\t\t\tindexid = str.indexOf('|', k);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tint count = Integer.parseInt(str.substring(k+1, indexid));\r\n\t\t\t\t\t\t//System.out.print(count +\" \");\r\n\t\t\t\t\t\tfor(int j = 0;j<count;j++)\r\n\t\t\t\t\t\t\tf.incrementCounter(flagop);\r\n\t\t\t\t\t\tk = indexid;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e){e.printStackTrace();\r\n\t\t\t\t\t\t\tSystem.out.println(\"EXCEPTION : \"+e.getMessage());\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\tfc.add(f);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tword = word+str.charAt(k);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "BoyerMoore(CharSequence p) {\n\t\t\tocc = new int[256];\n\t\t\tSystem.arraycopy(BASE, 0, occ, 0, 256);\n\t\t\tpattern = p;\n\t\t\tpatternLen = pattern.length();\n\t\t\tfor (int i = 0; i < pattern.length(); i++) {\n\t\t\t\tocc[pattern.charAt(i)] = i;\n\t\t\t}\n\t\t}", "private void fillAdjective1a()\n {\n adjective1a.add(\"Epic\");\n adjective1a.add(\"Brilliant\");\n adjective1a.add(\"Mighty\");\n adjective1a.add(\"Great\");\n adjective1a.add(\"Wonderful\");\n adjective1a.add(\"Crazy\");\n adjective1a.add(\"Sparkling\");\n adjective1a.add(\"Shiny\");\n adjective1a.add(\"Lustful\");\n adjective1a.add(\"Precious\");\n\n }", "public int getFrequency(){\n return this.frequency;\n }", "public static void main(String[] args) {\n String res= freqAlphabets( \"10#11#12\");\n System.out.println(res);\n }", "public void setFrequency(SummaryFrequencyCodeType frequency) {\n\t this.frequency = frequency;\n\t}", "public static void main (String[] args) \n { \n String string=\"hellow\";\n char [] words = string.toCharArray();\n //char []set = {'a', 'b', 'c'}; \n printPowerSet(words, words.length); \n }", "public MarkovWord(int myOrder){\n this.myOrder = myOrder; \n }", "@Override \n\t\tprotected void setup(Mapper<Object, Text, Text, NullWritable>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\ttypeSet.add('1');typeSet.add('2');typeSet.add('3');\n\t\t\ttypeSet.add('4');typeSet.add('8');typeSet.add('9');\n\t\t}", "public CWE insertRxa9_AdministrationNotes(int rep) throws HL7Exception { \r\n return (CWE) super.insertRepetition(9, rep);\r\n }", "int getFreq();", "public static void genPerms(String pre, String str, int k, int len, Set<String> hSet) {\n if (k == len) {\n hSet.add(pre + str);\n }\n\n for (int i = 0; i < str.length(); i++) {\n String x = pre + str.charAt(i);\n String y = str.substring(0, i) + str.substring(i + 1);\n genPerms(x, y, k + 1, len, hSet);\n }\n }", "public static void getPerms(HashMap<Character,Integer> freqMap,String prefix,int length,ArrayList<String> result) {\n if(length==0) {\n result.add(prefix);\n return;\n }\n for(Character c:freqMap.keySet()){\n Integer count= freqMap.get(c);\n if(count>0){\n freqMap.put(c,count-1);\n getPerms(freqMap,prefix+c,length-1,result);\n freqMap.put(c,count);\n }\n\n }\n }", "public void upadateDictionary(){\n dict.setLength(0);\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n\n }", "public static void main(String[] args) {\n\n\t\tFreqOfChar_Asignment20 freqOfChar_Asignment20 = new FreqOfChar_Asignment20();\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the word\");\n\t\tString inputword = scanner.next();\n\t\tSystem.out.println(\"Enter a character\");\n\t\tchar ch = scanner.next().charAt(0);\n\t\tint output = freqOfChar_Asignment20.getFreqOfChar(inputword, ch);\n\t\tSystem.out.println(\"Frequency of \" + ch + \" in the \" + inputword + \" is \" + output);\n\t\tscanner.close();\n\t}", "private Integer updateFrequency(int freq, Denominator moneyType) {\r\n\t\tif(freq == 0){\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, ++freq));\r\n\t\t}else{\r\n\t\t\tDenominatorCombination value = this.denominatorFrequencyMap.get(moneyType);\r\n\t\t\tint frequency = 0;\r\n\t\t\tif(value != null){\r\n\t\t\t\tfrequency = value.getFrequency();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, frequency +1));\r\n\t\t\tfreq++;\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "public static void cuentaLetras(char[] c)\n{\n for(int k=0; k < c.length; k++)\n {\n char currentChar = c[k]; \n //to check that currentChar is not in map, if not will add 1 count for firsttime\n if(map1.get(currentChar) == null){\n map1.put(currentChar, 1); \n } \n /*If it is repeating then simply we will increase the count of that key(character) by 1*/\n else {\n map1.put(currentChar, map1.get(currentChar) + 1);\n }\n } //todo el parrafo\n\n}", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "public void addCount(ArrayList<Character> sequence, int n) {\n \tString s = Integer.toString(n);\n \tfor(int i = 0; i < s.length(); i++) {\n \t\tsequence.add(s.charAt(i));\n \t}\n \treturn;\n }", "public void characters(char ch[], int start, int length){\n \t\t\t\t\tstr = new String(ch, start, length);\n \t\t\t\t\tif(tagname.equals(\"libraryname\")){\n \t\t\t\t\t\tcounts = 0;\n \t\t\t\t\t\tSystem.out.println(\"-----IN LIB-name\"+str+\"-----\"+\" \"+counts);\n \t\t\t\t\t\tbdatalist = new ArrayList<String>();\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"librarytel\")){\n \t\t\t\t\t\tSystem.out.println(\"-LIB TEL-\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"librarysite\")){\n \t\t\t\t\t\tSystem.out.println(\"-LIB SITE-\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"libraryaddr\")){\n \t\t\t\t\t\tSystem.out.println(\"-LIB ADDR-\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"bdata\")){\n \t\t\t\t\t\tSystem.out.println(\"-FOUND NEW BOOK-\");\n \t\t\t\t\t}else if(tagname.equals(\"bookname\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-NAME\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"ISBN\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-ISBN\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"author\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-AUTHOR\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"bookshelf\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-SHELF\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"serial\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-SERIAL\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"returned\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-returned\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"checkoutdate\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-chkdate\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"returndate\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-rtndate\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}", "public PostingList(int df, int N)\n {\n documentFrequency = df;\n totalNoOfDocuments = N;\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n \n \n File textBank = new File(\"textbank/\");\n Hashtable<Integer,Integer> frequency;\n Hashtable<Integer, String> table;\n table = new Hashtable<>();\n frequency = new Hashtable<>();\n Scanner input = new Scanner(new File(\"stoplist.txt\"));\n int max=0;\n while (input.hasNext()) {\n String next;\n next = input.next();\n if(next.length()>max)\n max=next.length();\n table.put(next.hashCode(), next); //to set up the hashmap with the wordsd\n \n }\n \n System.out.println(max);\n \n Pattern p0=Pattern.compile(\"[\\\\,\\\\=\\\\{\\\\}\\\\\\\\\\\\\\\"\\\\_\\\\+\\\\*\\\\#\\\\<\\\\>\\\\!\\\\`\\\\-\\\\?\\\\'\\\\:\\\\;\\\\~\\\\^\\\\&\\\\%\\\\$\\\\(\\\\)\\\\]\\\\[]\") \n ,p1=Pattern.compile(\"[\\\\.\\\\,\\\\@\\\\d]+(?=(?:\\\\s+|$))\");\n \n \n \n wor = new ConcurrentSkipListMap<>();\n \n ConcurrentMap<String , Map<String,Integer>> wordToDoc = new ConcurrentMap<String, Map<String, Integer>>() {\n @Override\n public Map<String, Integer> putIfAbsent(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean remove(Object key, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean replace(String key, Map<String, Integer> oldValue, Map<String, Integer> newValue) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> replace(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public int size() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean isEmpty() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsKey(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsValue(Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> get(Object key) {\n return wor.get((String)key);//To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> put(String key, Map<String, Integer> value) {\n wor.put(key, value); // this saving me n \n //if(frequency.get(key.hashCode())== null)\n \n //frequency.put(key.hashCode(), )\n return null;\n }\n\n @Override\n public Map<String, Integer> remove(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void putAll(Map<? extends String, ? extends Map<String, Integer>> m) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<String> keySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Collection<Map<String, Integer>> values() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<Map.Entry<String, Map<String, Integer>>> entrySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n totalFiles = textBank.listFiles().length;\n for (File textFile : textBank.listFiles()) {\n totalReadFiles++;\n //checking whether file has txt extension and file size is higher than 0\n if(textFile.getName().contains(\".txt\") && textFile.length() > 0){\n docName.add(textFile.getName().replace(\".txt\", \".stp\"));\n StopListHandler sp = new StopListHandler(textFile, table,System.currentTimeMillis(),p0,p1,wordToDoc);\n sp.setFinished(() -> {\n \n tmp++;\n \n if(tmp==counter)\n //printTable(counter);\n \n if(totalReadFiles == totalFiles)\n {\n printTable(counter);\n }\n \n });\n \n sp.start();\n counter ++;}\n \n \n }\n System.out.println(counter);\n //while(true){if(tmp==counter-1) break;}\n System.out.println(\"s\");\n \n }", "@Override //old methd for letter count\n public Integer letterCount(String inputString) {\n char[] characterArray = inputString.toCharArray();\n Map<Character, Integer> wordFrequencyMap = new HashMap<Character, Integer>();\n\n for (char character : characterArray) {\n if (wordFrequencyMap.containsKey(character)) {\n\n Integer wordCount = (Integer) wordFrequencyMap.get(character);\n wordFrequencyMap.put(character, wordCount + 1);\n\n } else {\n wordFrequencyMap.put(character, 1);\n\n }\n }\n return null; //iterateWordCount(wordFrequencyMap);\n }", "@Override\n public void characters(char[] ch, int start, int length) {\n if (title) {\n String bookTitle = new String(ch, start, length);\n System.out.println(\"Book title: \" + bookTitle);\n nameList.add(bookTitle);\n }\n }", "public\n AcronymExpansion( String lf,\n int freq,\n int since )\n {\n this.lf = lf;\n this.freq = freq;\n this.since = since;\n }", "public static void main(String[] args) {\n\n for ( char ch = 'A', ch1 = 'b'; ch <= 'Z' && ch1 <= 'z' ; ch+=2 , ch1+=2 ){\n\n System.out.print(ch +\"-\");\n System.out.print(ch1+ \"-\");\n }\n\n }", "public GuitarString(double frequency) {\n\t super(frequency,1.0);\n\t DECAY = .996;\n\t }", "public void addStrangeCharacter() {\n strangeCharacters++;\n }" ]
[ "0.6017167", "0.5303267", "0.5287781", "0.5213037", "0.5203491", "0.5187802", "0.5175809", "0.5174759", "0.5173082", "0.51273537", "0.50404686", "0.5011242", "0.49977958", "0.49956992", "0.4975441", "0.4971149", "0.49504945", "0.49449605", "0.49348897", "0.4929588", "0.49226114", "0.49150524", "0.48920056", "0.48906586", "0.4888684", "0.4881427", "0.4869069", "0.4853068", "0.48447514", "0.48378992", "0.4818653", "0.47961277", "0.47917944", "0.47897184", "0.47880918", "0.4783532", "0.4774333", "0.4772491", "0.47649089", "0.47589737", "0.47414893", "0.4738502", "0.4738473", "0.473059", "0.47297424", "0.47292107", "0.47251335", "0.47231507", "0.47210476", "0.4720375", "0.4708412", "0.4706886", "0.47038496", "0.4700082", "0.46973386", "0.46911776", "0.4690215", "0.4681963", "0.46790168", "0.46753797", "0.46707442", "0.46659014", "0.46658048", "0.46644667", "0.4659525", "0.46586442", "0.4656089", "0.4654091", "0.4644102", "0.4635743", "0.46345705", "0.46345118", "0.4631354", "0.46217227", "0.46072325", "0.46018445", "0.4599589", "0.45976272", "0.4589095", "0.45846468", "0.45833597", "0.4578976", "0.45770365", "0.45715684", "0.45694152", "0.45684996", "0.45657924", "0.45610565", "0.4559586", "0.4559051", "0.45580447", "0.4557103", "0.4549334", "0.4546986", "0.45467877", "0.4546585", "0.45420933", "0.45408663", "0.45402324", "0.45370597" ]
0.5140679
9
Pre : Takes the frequency of character only. Post : set the structure to a given frequency, and no further structures made.
public HuffmanNode(int freq){ this(freq, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "public void setFrequency(int f){\n this.frequency = f;\n }", "public void set(int symbol, int freq);", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "public int getFreq(){ return frequency;}", "public Builder setFrequency(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n frequency_ = value;\n onChanged();\n return this;\n }", "public void setFrequencies(Set<Frequency> arg0) {\n \n }", "public edu.pa.Rat.Builder clearFrequency() {\n fieldSetFlags()[1] = false;\n return this;\n }", "public Builder clearFrequency() {\n bitField0_ = (bitField0_ & ~0x00000400);\n frequency_ = getDefaultInstance().getFrequency();\n onChanged();\n return this;\n }", "public Node(int frequency){;\n\t\tthis.frequency = frequency;\n\t\t// we cannot use null since it is our EOF so try \"SOH\" or start of heading.\n\t\t// also setting here does not work ... (hmm)!\n\t\tthis.character = (char) 0x01;\n\t}", "bool setFrequency(double newFrequency);", "FrequencyRegister(String subId) {\n \n reg2 = new FrequencySubRegister(\"FREQ2\" + subId);\n reg1 = new FrequencySubRegister(\"FREQ1\" + subId);\n reg0 = new FrequencySubRegister(\"FREQ0\" + subId);\n \n setFrequency(0x75a0cb); // default frequency is 0b 01111 0101 1010 0000 1100 1011,\n }", "java.lang.String getFrequency();", "private void initiateWordCount(){\n for(String key: DataModel.bloomFilter.keySet()){\n WordCountHam.put(key, 0);\n WordCountSpam.put(key, 0);\n }\n }", "@Test\r\n\tpublic void setFrequency() {\r\n\t\tWeldJoint<Body> wj = new WeldJoint<Body>(b1, b2, new Vector2());\r\n\t\t\r\n\t\twj.setFrequency(0.0);\r\n\t\tTestCase.assertEquals(0.0, wj.getFrequency());\r\n\t\t\r\n\t\twj.setFrequency(1.0);\r\n\t\tTestCase.assertEquals(1.0, wj.getFrequency());\r\n\t\t\r\n\t\twj.setFrequency(29.0);\r\n\t\tTestCase.assertEquals(29.0, wj.getFrequency());\r\n\t}", "public Node(char character, int frequency){\n\t\tthis.character = character;\n\t\tthis.frequency = frequency;\n\t}", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "public void setFrequency(SummaryFrequencyCodeType frequency) {\n\t this.frequency = frequency;\n\t}", "public Builder clearFreq() {\n bitField0_ = (bitField0_ & ~0x00000008);\n freq_ = 0;\n onChanged();\n return this;\n }", "public static void main(String[] args) {\n Scanner teclado = new Scanner(System.in);\r\n String mensajeUsuario;\r\n System.out.println(\"Ingrese su mensaje:\");\r\n mensajeUsuario = teclado.nextLine();\r\n \r\n ArrayList inicial = new ArrayList<Nodo>();\r\n \r\n boolean valido = true;\r\n int contador = 0;\r\n //Se convierte el mensaje a una array de chars\r\n char [] arrayMensaje = mensajeUsuario.toCharArray();\r\n //Se cuenta la frecuencia de cada elemento\r\n for(char i: arrayMensaje){\r\n valido = true;\r\n Iterator itr = inicial.iterator();\r\n //Si el elemento que le toca no fue contado ya, es valido contar su frecuencia\r\n while (itr.hasNext()&&valido){\r\n Nodo element = (Nodo) itr.next();\r\n if (i==element.getCh()){\r\n valido = false;\r\n }\r\n }\r\n //Contar la frecuencia del elemento\r\n if (valido== true){\r\n Nodo temp = new Nodo();\r\n temp.setCh(i);\r\n for (char j:arrayMensaje){\r\n if (j==i){\r\n contador++;\r\n }\r\n }\r\n temp.setFreq(contador);\r\n inicial.add(temp);\r\n contador = 0;\r\n \r\n }\r\n }\r\n //Se recorre la lista generada de nodos para mostrar la frecuencia de cada elemento ene el orden en que aparecen\r\n System.out.println(\"elemento | frecuencia\");\r\n Iterator itr = inicial.iterator();\r\n while (itr.hasNext()){\r\n Nodo element = (Nodo)itr.next();\r\n System.out.println(element.getCh() + \" \"+ element.getFreq());\r\n }\r\n \r\n HuffmanTree huff = new HuffmanTree();\r\n huff.createTree(inicial);\r\n //System.out.println(huff.getRoot().getCh()+\" \"+huff.getRoot().getFreq());\r\n \r\n huff.codificar();\r\n System.out.println(\"elemento | frecuencia | codigo\");\r\n Iterator itrf= huff.getListaH().iterator();\r\n while(itrf.hasNext()){\r\n Nodo pivotal = (Nodo)itrf.next();\r\n System.out.println(pivotal.getCh() + \" \"+ pivotal.getFreq()+ \" \"+ pivotal.getCadena()); \r\n }\r\n \r\n System.out.println(\"Ingrese un codigo en base a la tabla anterior, separando por espacios cada nuevo caracter\");\r\n mensajeUsuario = teclado.nextLine();\r\n mensajeUsuario.indexOf(\" \");\r\n String mensajeFinal = \"\";\r\n String letra = \" \";\r\n String[] arrayDecode = mensajeUsuario.split(\" \");\r\n boolean codigoValido = true;\r\n for (String i: arrayDecode){\r\n if (codigoValido){\r\n letra = huff.decodificar(i);\r\n }\r\n if (letra.length()>5){\r\n codigoValido = false;\r\n }\r\n else {\r\n mensajeFinal = mensajeFinal.concat(letra);\r\n }\r\n }\r\n \r\n if (codigoValido){\r\n System.out.println(mensajeFinal);\r\n }\r\n else {\r\n System.out.println(\"El codigo ingresado no es valido\");\r\n }\r\n \r\n \r\n }", "public static void setAuthFreq(Map<String, AuthorMod> models)\n\t{\n\t\tfor (AuthorMod curAuth: models.values()) \n\t\t{\n\t\t\tfor(String uGram: curAuth.ug.getAll()) \n\t\t\t{\n\t\t\t\tint ucount = curAuth.ug.getCount(uGram);\n/*>>>>\t \t\tif (ucount<2) {curAuth.unks++;\t\t\t\t*** unkown word handling\n \t\t\t\tif (curAuth.ug.contains(\"<unk>\")) \n\t\t\t\t\t{ curAuth.ug.updateSeen(\"<unk>\");}\n\t\t\t\t\telse{ curAuth.ug.addNew(\"<unk>\");}\n*/\n\t\t\t\tdouble ufreq= ((double)ucount/curAuth.trainSize);\n\t\t\t\tcurAuth.ug.setFreq(uGram, ufreq);\n\t\t\t}\n\n\t\t//set bigram HT entries for frequency, \n\t\t//calculated by normalizing BG count by prefix count\n\t\t\tfor(Pair<String, String> bGram: curAuth.bg.getAll())\n\t\t\t{\n/*\t>>>\t\t\t\t-first, need a test to see if the unigram count for either word in bigram is less than 2. If yes, we will replace with <unk> tag\n\t\t\t\t\t\t\t- code to get counts for each word in bigram would look like curAuth.ug.getCount(bgram.getFirst()) \n\t\t\t\t\t-make new bg, with the count 1 word replaced with <Unk> tag. Use the parametered Pair<String, String> constructor with arguements (word, <unk>) depending on which is unk (or both)\n\t\t\t\t\t-do an updateSeen(bigram) or addNew(bigram) on curAuth.bg depending on if this new bigram has been seen (use curAuth.bg.contains(**this new bigram**)) \n\t\t\t\t\t-use data structure to remember what still needs updating (some type of set. we want something with no duplicates) \n\t\t\t\t\t-remove original bigram, put updated bigram in set\n\t\t\t\t\t-skip rest of loop for this bigram, and update the freq for the set after the loop */\n\t\t\t\t\t\n\t\t\t\t\tint bcount = curAuth.bg.getBgCount(bGram);\n\t\t\t\t\tint pcount = curAuth.ug.getCount(bGram.getFirst()); //sets p count to count of prefix from unigram table\n\t\t\t\t\tdouble bfreq = ((double)bcount)/pcount;\n\t\t\t\t\tcurAuth.bg.setFreq(bGram, bfreq);\n\t\t\t}\n\t\t\t//set frequncies for items we placed in set of bigrams containing the <unk> tag\n\t\t}\n\t}", "public void setFrequency (jkt.hms.masters.business.MasFrequency frequency) {\n\t\tthis.frequency = frequency;\n\t}", "public FrequencyBag() {\n\t\tfirstNode = null;\n\t\tnumEntries = 0;\n\t}", "public T caseFrequency(Frequency object) {\r\n\t\treturn null;\r\n\t}", "public TagFreq(int freq, String tagName) {\r\n\t\tthis.freq = freq;\r\n\t\tthis.tagName = tagName;\r\n\t}", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "public Builder setFrequencyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n frequency_ = value;\n onChanged();\n return this;\n }", "private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\t\t\t\tif (guessedCharacter.contains(ch)) {\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!temp.containsKey(ch)) {\r\n\t\t\t\t\t\ttemp.put(ch, 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint t = temp.get(ch) + 1;\r\n\t\t\t\t\t\ttemp.put(ch, 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\r\n\t\tcharCount = temp;\r\n\r\n\t}", "float getFrequency();", "public void setFrequency(java.lang.Integer value) {\n this.frequency = value;\n }", "public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}", "public TagFreq(String stringRepresentation) {\r\n\t\t\r\n\t\tint indexOfFreq = stringRepresentation.lastIndexOf('(') + 1; \r\n\t\t\r\n\t\tthis.tagName =\r\n\t\t\tstringRepresentation.substring(0, indexOfFreq - 2);\r\n\t\tthis.freq =\r\n\t\t\tInteger.parseInt(stringRepresentation.\r\n\t\t\t\t\t\t\t\tsubstring(indexOfFreq,\r\n\t\t\t\t\t\t\t\t\t\t stringRepresentation.length() - 1));\r\n\t}", "private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}", "public edu.pa.Rat.Builder setFrequency(int value) {\n validate(fields()[1], value);\n this.frequency = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "int getFreq();", "public Builder setFreq(int value) {\n bitField0_ |= 0x00000008;\n freq_ = value;\n onChanged();\n return this;\n }", "public WordCount2(Integer frequency) {\n emitFrequency = frequency;\n }", "private Integer updateFrequency(int freq, Denominator moneyType) {\r\n\t\tif(freq == 0){\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, ++freq));\r\n\t\t}else{\r\n\t\t\tDenominatorCombination value = this.denominatorFrequencyMap.get(moneyType);\r\n\t\t\tint frequency = 0;\r\n\t\t\tif(value != null){\r\n\t\t\t\tfrequency = value.getFrequency();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, frequency +1));\r\n\t\t\tfreq++;\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "public String frequencySort(String s) {\n\n\t\t// prepare a frequency map\n\t\tMap<Character, Integer> m = new HashMap<Character, Integer>();\n\t\tfor (char c : s.toCharArray())\n\t\t\tm.put(c, m.getOrDefault(c, 0) + 1);\n\n\t\tPriorityQueue<CKEntry1> pq = new PriorityQueue<>();\n\t\tfor (Entry<Character, Integer> e : m.entrySet()) {\n\t\t\tpq.add(new CKEntry1(e.getKey(), e.getValue()));\n\t\t}\n\t\t\n\t\t// prepare the output now\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile(!pq.isEmpty()) {\n\t\t\tCKEntry1 temp = pq.poll();\n\t\t\tchar[] tempC = new char[temp.count];\n\t\t\tArrays.fill(tempC, temp.c); // repeat c count' times\n\t\t\tsb.append(tempC);\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\n\t}", "private void add(Character c, int frequency) {\n for (int i = 1; i <= frequency; i++) {\n tileBag.add(new Tile(c));\n }\n }", "public boolean hasFrequency() {\n return fieldSetFlags()[1];\n }", "public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter a word:\");\n String word = scan.next();\n System.out.println(\"Enter character:\");\n char character = scan.next().charAt(0);\n\n int count=0; //count frequency of character\n for (int i =0; i<word.length(); i++) {\n char each = word.charAt(i); //each character by given string word\n\n if (each == character) { //if each character in str is matching with ch\n count++; //count increase the frequency of ch by 1\n\n }\n }\n System.out.println(count);\n\n System.out.println(\"===========================\");\n\n\n\n }", "public void SetFrequency(int Frequency, String ElementID){\n\t\t_TEST stack = new _TEST();\t\t\t\t\t\t\t\t\t \t\t/* TEST */\n\t\tstack.PrintHeader(ID,Frequency+\":int, \" + ElementID+\":String\",\"\");\t/* TEST */\n\t\tGENERATOR GEN_to_setsfrequency;\t\n\t\tGEN_to_setsfrequency = new GENERATOR(0,0,null);\t\t\t/* Temporalis valtozo */\n\t\tGetElementByID(GEN_to_setsfrequency.ID);\t\t\t\t\t/* GetElemetByIDvel megkapjuk, az objektumot\t*/\t\t\n\t\tGEN_to_setsfrequency.SetSequence(Frequency); \t\t\t\t /* az generator objektum SetFrequency(...) metodusat meghivjuk */\n\t\tstack.PrintTail(ID,Frequency+\":int, \" + ElementID+\":String\",\"\");\t /* TEST */\t\n\t}", "bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }", "private void setBondFrequencyAttributes( IBond hsBond, IBond newBond, boolean increment ) {\n\t\t\n\t\tif( hsBond != null /*&& hsBond.getProperty(bondFrequencyType) != null*/ ) { \n\t\t\t\n\t\t\tif( increment ) {\n\t\t\t\tint freq = (Integer) hsBond.getProperty(bondFrequencyType);\n\t\t\t\tnewBond.setProperty(bondFrequencyType, freq + 1 );\n\t\t\t\thsBond.setProperty(bondFrequencyType, freq + 1 );\n\t\t\t} else {\n\t\t\t\tnewBond.setProperty(bondFrequencyType, (Integer) hsBond.getProperty(bondFrequencyType) );\n\t\t\t}\n\t\t} else {\n\t\t\tnewBond.setProperty(bondFrequencyType, 1 );\n\t\t\t//System.err.println(\"HSB null freq\");\n\t\t}\n\t\t\n\n\t\t//newBond.setProperty( topologyType, bondTopologyType );\n\n\t\tif( queryMolId > 0 ) {\n\t\t\tList<Integer> molOrigins = null;\n\t\t\t\n\t\t\tif( hsBond != null && hsBond.getProperty(bondMolOriginType) != null ) {\n\t\t\t\tmolOrigins = (List<Integer>) hsBond.getProperty(bondMolOriginType);\n\t\t\t\t\n\t\t\t\tif( increment )\n\t\t\t\t\tmolOrigins.add( queryMolId );\n\t\t\t\t//System.out.println(\"molOrigins - \" + molOrigins);\n\t\t\t} else {\n\t\t\t\tmolOrigins = new ArrayList<Integer>(10);\n\t\t\t\tmolOrigins.add( queryMolId );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tnewBond.setProperty(bondMolOriginType, molOrigins);\n\t\t}\n\t}", "public int getFrequency(){\n return this.frequency;\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "private void update(String person){\n\n\t\tint index = myWords.indexOf(person);\n\t\tif(index == -1){\n\t\t\tmyWords.add(person);\n\t\t\tmyFreqs.add(1);\n\t\t}\n\t\telse{\n\t\t\tint value = myFreqs.get(index);\n\t\t\tmyFreqs.set(index,value+1);\n\t\t}\n\t}", "@Override\n\tpublic Float getFrequency() {\n\t\treturn 3.8f;\n\t}", "public FrequencyList (String input){\n\tadd(input);\n }", "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getFreq() {\n return freq;\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\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 frequency_ = s;\n }\n return s;\n }\n }", "public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public boolean hasFreq() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "private void CreateFreq(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr) {\n for (int key : freqY.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FY.append(\"/\");\n FY.append(auxs);\n auxs = Integer.toBinaryString(freqY.get(key));\n FY.append(\"/\");\n FY.append(auxs);\n }\n\n for (int key : freqCb.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCB.append(\"/\");\n FCB.append(auxs);\n auxs = Integer.toBinaryString(freqCb.get(key));\n FCB.append(\"/\");\n FCB.append(auxs);\n }\n\n for (int key : freqCr.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCR.append(\"/\");\n FCR.append(auxs);\n auxs = Integer.toBinaryString(freqCr.get(key));\n FCR.append(\"/\");\n FCR.append(auxs);\n }\n FCR.append(\"/\");\n }", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\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 frequency_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public boolean hasFreq() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public static Map<Character,Integer> countFreq(String string){\n\n\n\n Map<Character,Integer> results = new HashMap<Character,Integer>();\n for (int i = 0; i < string.length(); i++) {\n Character temp = string.charAt(i);\n Integer count;\n// System.out.println(temp);\n if (results.containsKey(temp)){\n count=results.get(temp);\n count++;\n results.replace(temp,count);\n }\n else\n results.put(temp,1);\n\n }\n\n return results;\n }", "public int getFrequency()\n {\n return this.frequency;\n }", "public void freq(int freq) {\n\t\tfrequency = freq;\n\t\ttry {\n\t\t\tserver.send(concatAll(FREQCOMMAND, intToBytes(freq)));\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Error transmitting data to the PIC32\", e);\n\t\t}\n\n\t}", "public GuitarString(double frequency) {\n\t super(frequency,1.0);\n\t DECAY = .996;\n\t }", "public static int frequency(String str, char ch){\n//will return frequency of char from the string\n int count = 0; //to save the frequency of char\n/*each character is a char : and need to compare it with str.\nevery time it matches we add frequency to count*/\n\n for(char each : str.toCharArray() ){\n if(each == ch){//every time this is true, count will increase to 1\n count++;\n }\n }\n //return the frequency of one character from the string\n return count;\n }", "public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }", "@Override\n public int getTermFrequency(String term) {\n return 0;\n }", "@Override\n\t public float sloppyFreq(int distance) {\n\t //return 1.0f / (distance + 1);\n\t\t return 1.0f;\n\t }", "public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setAccelFrequency(String f, BandInfo bandInfo) {\n accManager.setFrequency(f, bandInfo);\n\n // Unsubscribe and resubscribe if necessary\n if (bandStreams.containsKey(bandInfo) && bandStreams.get(bandInfo).contains(ACCEL_REQ_EXTRA)) {\n accManager.unSubscribe(bandInfo);\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n accManager.subscribe(bandInfo);\n }\n\n }", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "public int getFreq() {\n return freq_;\n }", "public void run() {\n\n\t\tScanner s = new Scanner(System.in); // A scanner to scan the file per\n\t\t\t\t\t\t\t\t\t\t\t// character\n\t\ttype = s.next(); // The type specifies our wanted output\n\t\ts.nextLine(); \n\n\t\t// STEP 1: Count how many times each character appears.\n\t\tthis.charFrequencyCount(s);\n\n\t\t/*\n\t\t * Type F only wants the frequency. Display it, and we're done (so\n\t\t * return)\n\t\t */\n\t\tif (type.equals(\"F\")) {\n\t\t\tdisplayFrequency(frequencyCount);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 2: we want to make our final tree (used to get the direction\n\t\t * values) This entails loading up the priority queue and using it to\n\t\t * build the tree.\n\t\t */\n\t\tloadInitQueue();\n\t\tthis.finalHuffmanTree = this.buildHuffTree();\n\t\t\n\t\t/*\n\t\t * Type T wants a level order display of the Tree. Do so, and we're done\n\t\t * (so return)\n\t\t */\n\t\tif (type.equals(\"T\")) {\n\t\t\tthis.finalHuffmanTree.visitLevelOrder(new HuffmanVisitorForTypeT());\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 3: We want the Huffman code values for the characters.\n\t\t * The Huffman codes are specified by the path (directions) from the root.\n\t\t * \n\t\t * Each node in the tree has a path to get to it from the root. The\n\t\t * leaves are especially important because they are the original\n\t\t * characters scanned. Load every node with it's special direction value\n\t\t * (the method saves the original character Huffman codes, the direction\n\t\t * vals).\n\t\t */\n\t\tthis.loadDirectionValues(this.finalHuffmanTree.root);\n\t\t// Type H simply wants the codes... display them and we're done (so\n\t\t// return)\n\t\tif (type.equals(\"H\")) {\n\t\t\tthis.displayHuffCodesTable();\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 4: The Type must be M (unless there was invalid input) since all other cases were exhausted, so now we simply display the file using\n\t\t * the Huffman codes.\n\t\t */\n\t\tthis.displayHuffCodefile();\n\t}", "private void traverseLine(String str) {\n\t\tFrequencyCount f ;\r\n\t\tint prev = 0;\r\n\t\tString docid = \"\";\r\n\t\tint flag = 0,flag1 = 0;\r\n\t\tfor(int k = 0;k<str.length();k++)\r\n\t\t{\r\n\t\t\t//System.out.print(str.charAt(k));\r\n\t\t\tif(str.charAt(k) == ':'){\r\n\t\t\t\tflag = 1;k++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(flag == 1){\r\n\t\t\t\tint indexid;\r\n\t\t\t\tif(flag1 == 0){\r\n\t\t\t\t\tcounter = \"\";\r\n\t\t\t\t\tindexid = str.indexOf(':', k);\r\n\t\t\t\t\tcounter = str.substring(k, indexid);\r\n\t\t\t\t\tk = indexid+1;\r\n\t\t\t\t\tflag1 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tindexid = str.indexOf('#', k);\r\n\t\t\t\tdocid = String.valueOf(Integer.parseInt(str.substring(k, indexid))+prev);\r\n\t\t\t\tprev = Integer.parseInt(docid);\r\n\t\t\t\t\r\n\t\t\t\tf = new FrequencyCount(docid);\r\n\t\t\t\tk = indexid+1;\r\n\t\t\t\twhile(str.charAt(k) != '|'){\r\n\t\t\t\t\tif(k+1 == str.length()){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(str.charAt(k) == '#') {k++;continue;}\r\n\t\t\t\t\tint flagop = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch(str.charAt(k)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcase 't' : flagop = 1;\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\tcase 'i' : flagop = 2;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'b' : flagop = 3;\r\n\t\t\t\t \t\t \t\t\tbreak;\r\n\t\t\t\t\t\tcase 'r' : flagop = 6;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'L' : flagop = 5;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'c' : flagop = 4;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'l' : flagop = 7;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault : flagop = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(flagop != 0){\r\n\t\t\t\t\t\tindexid = Math.min(str.indexOf('#', k), str.indexOf('|', k));\r\n\t\t\t\t\t\tif(indexid == -1){\r\n\t\t\t\t\t\t\tindexid = str.indexOf('|', k);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tint count = Integer.parseInt(str.substring(k+1, indexid));\r\n\t\t\t\t\t\t//System.out.print(count +\" \");\r\n\t\t\t\t\t\tfor(int j = 0;j<count;j++)\r\n\t\t\t\t\t\t\tf.incrementCounter(flagop);\r\n\t\t\t\t\t\tk = indexid;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e){e.printStackTrace();\r\n\t\t\t\t\t\t\tSystem.out.println(\"EXCEPTION : \"+e.getMessage());\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\tfc.add(f);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tword = word+str.charAt(k);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public TreeNode(char s, int freq){\n\t\tleftChild = null;\n\t\trightChild = null;\n\t\tkey = s;\n\t\tfrequency = freq;\n\t}", "public boolean hasFrequency() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }", "public void setChannelRFfreq(int freq){\n this.channelRF=freq;\n }", "public int getFreq() {\n return freq_;\n }", "private Map<Character, Double> getStrFrequencyTable(String str) {\n str = str.toLowerCase(Locale.ENGLISH);\n\n Map<Character, Double> frequencyTable = new HashMap<>(26);\n int[] countArr = countLetters(str);\n int numOfLetters = Arrays.stream(countArr).sum();\n\n for (char alphabet = 'a'; alphabet <= 'z'; alphabet++) {\n double frequency = 0.0;\n if (numOfLetters != 0) {\n frequency = countArr[alphabet-'a'] / (double) numOfLetters;\n }\n frequencyTable.put(alphabet, frequency);\n }\n\n return frequencyTable;\n }", "@Override\n\tprotected ElderMood transformOne(ElderFrequency in) {\n\t\treturn null;\n\t}", "static void codonfreq(String s) {\n int[] fromNuc = new int[128];\r\n for (int i = 0; i < fromNuc.length; i++)\r\n fromNuc[i] = -1;\r\n fromNuc['a'] = fromNuc['A'] = 0;\r\n fromNuc['c'] = fromNuc['C'] = 1;\r\n fromNuc['g'] = fromNuc['G'] = 2;\r\n fromNuc['t'] = fromNuc['T'] = 3;\r\n // Count frequencies of codons (triples of nucleotides)\r\n int[][][] freq = new int[4][4][4];\r\n for (int i = 0; i + 2 < s.length(); i += 3) {\r\n int nuc1 = fromNuc[s.charAt(i)];\r\n int nuc2 = fromNuc[s.charAt(i + 1)];\r\n int nuc3 = fromNuc[s.charAt(i + 2)];\r\n freq[nuc1][nuc2][nuc3] += 1;\r\n }\r\n // The translation from index 0123 to nucleotide ACGT\r\n final char[] toNuc = {'A', 'C', 'G', 'T'};\r\n for (int i = 0; i < 4; i++)\r\n for (int j = 0; j < 4; j++) {\r\n for (int k = 0; k < 4; k++)\r\n System.out.print(\" \" + toNuc[i] + toNuc[j] + toNuc[k]\r\n + \": \" + freq[i][j][k]);\r\n System.out.println();\r\n }\r\n }", "public void displayFrequency(int[] frequencyCount) {\n\t\tStringBuffer toPrint = new StringBuffer();\n\t\t// For every character...\n\t\tfor (int i = 0; i < frequencyCount.length; i++) {\n\t\t\tif (frequencyCount[i] > 0) { // if it appears at least once..\n\t\t\t\t// tabs have a char value of 9\n\t\t\t\tif (i == 9) {\n\t\t\t\t\ttoPrint.append(\"\\\\t\");\n\t\t\t\t\t// new lines have a char value of 10\n\t\t\t\t} else if (i == 10) {\n\t\t\t\t\ttoPrint.append(\"\\\\n\");\n\t\t\t\t} else {\n\t\t\t\t\t// everything else is simply the same but as a char.\n\t\t\t\t\t// the index i is the char values\n\t\t\t\t\ttoPrint.append((char) i);\n\t\t\t\t}\n\t\t\t\t// the values at i is (char)i's frequency.\n\t\t\t\ttoPrint.append(\":\" + frequencyCount[i] + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(toPrint.toString());\n\t}", "public abstract double samplingFrequency();", "public java.lang.Integer getFrequency() {\n return frequency;\n }", "public Frequency() {\n\n }", "@Override\n public long getFrequencyCount() {\n return count;\n }", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "boolean hasFreq();", "public static void main(String[] args) throws FileNotFoundException, IOException {\n \n \n File textBank = new File(\"textbank/\");\n Hashtable<Integer,Integer> frequency;\n Hashtable<Integer, String> table;\n table = new Hashtable<>();\n frequency = new Hashtable<>();\n Scanner input = new Scanner(new File(\"stoplist.txt\"));\n int max=0;\n while (input.hasNext()) {\n String next;\n next = input.next();\n if(next.length()>max)\n max=next.length();\n table.put(next.hashCode(), next); //to set up the hashmap with the wordsd\n \n }\n \n System.out.println(max);\n \n Pattern p0=Pattern.compile(\"[\\\\,\\\\=\\\\{\\\\}\\\\\\\\\\\\\\\"\\\\_\\\\+\\\\*\\\\#\\\\<\\\\>\\\\!\\\\`\\\\-\\\\?\\\\'\\\\:\\\\;\\\\~\\\\^\\\\&\\\\%\\\\$\\\\(\\\\)\\\\]\\\\[]\") \n ,p1=Pattern.compile(\"[\\\\.\\\\,\\\\@\\\\d]+(?=(?:\\\\s+|$))\");\n \n \n \n wor = new ConcurrentSkipListMap<>();\n \n ConcurrentMap<String , Map<String,Integer>> wordToDoc = new ConcurrentMap<String, Map<String, Integer>>() {\n @Override\n public Map<String, Integer> putIfAbsent(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean remove(Object key, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean replace(String key, Map<String, Integer> oldValue, Map<String, Integer> newValue) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> replace(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public int size() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean isEmpty() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsKey(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsValue(Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> get(Object key) {\n return wor.get((String)key);//To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> put(String key, Map<String, Integer> value) {\n wor.put(key, value); // this saving me n \n //if(frequency.get(key.hashCode())== null)\n \n //frequency.put(key.hashCode(), )\n return null;\n }\n\n @Override\n public Map<String, Integer> remove(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void putAll(Map<? extends String, ? extends Map<String, Integer>> m) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<String> keySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Collection<Map<String, Integer>> values() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<Map.Entry<String, Map<String, Integer>>> entrySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n totalFiles = textBank.listFiles().length;\n for (File textFile : textBank.listFiles()) {\n totalReadFiles++;\n //checking whether file has txt extension and file size is higher than 0\n if(textFile.getName().contains(\".txt\") && textFile.length() > 0){\n docName.add(textFile.getName().replace(\".txt\", \".stp\"));\n StopListHandler sp = new StopListHandler(textFile, table,System.currentTimeMillis(),p0,p1,wordToDoc);\n sp.setFinished(() -> {\n \n tmp++;\n \n if(tmp==counter)\n //printTable(counter);\n \n if(totalReadFiles == totalFiles)\n {\n printTable(counter);\n }\n \n });\n \n sp.start();\n counter ++;}\n \n \n }\n System.out.println(counter);\n //while(true){if(tmp==counter-1) break;}\n System.out.println(\"s\");\n \n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\n\t\tint currentHash = 0; /* will be changed in the while loop to store the hash code for current word*/\n\t\tString currentWord; /* will be changed in the while loop to store the current word*/\n\t\t\n\t\tChainHashMap<myString, Integer> wordFrequency = new ChainHashMap<myString, Integer>(500); /* create the chain hash map with the size of 500; there is 500 buckets in the map*/\n\t\t\n\t\t\n\t\tFile file = new File(\"/Users/Jacob/Downloads/shakespeare.txt\");\n\t\t/*please notice that the file cannot be found on the address given above, change it to test if it works!*/\n\t\tScanner input = new Scanner(file); /* should be changed to file after debugging*/\n\t\t\n\t\t\n\t\twhile(input.hasNext()){\n\t\t\tcurrentWord = input.next();\n\t\t\t\n\t\t\twhile(currentWord.equals(\".\") || currentWord.equals(\",\") || currentWord.equals(\"!\") || currentWord.equals(\"?\") || currentWord.equals(\";\") || currentWord.equals(\":\")){\n\t\t\t\tif(input.hasNext()){\n\t\t\t\t\tcurrentWord = input.next();\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyString wordString = new myString(currentWord);\n\t\t\t\n\t\t\tif(wordFrequency.get(wordString) == null){\n\t\t\t\t\n\t\t\t\twordFrequency.put(wordString, 1); /* the key is the string and the value should be the word frequency*/\n\t\t\t}else{\n\n\t\t\t\twordFrequency.put(wordString, wordFrequency.get(wordString) + 1); /* if the key is already in the map, increment the word frequency by 1*/\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/* till this point, all the work of Shakespeare have been stored in the chained hash map*/\n\t\t/* the heap is used to get the top 1000 frequent work*/\n\t\t/* it adds the element to the heap and when the size of the heap reaches 1000, the word with the lowest will be removed, which is the root of the heap*/\n\t\t/* the two element in the entry for the heap should be exchanged; the key should store the frequencies and the the value should be the string */\n\t\t\n\t\tHeapAdaptablePriorityQueue<Integer, String> frequencyHeap = new HeapAdaptablePriorityQueue<Integer, String>();\n\t\t\n\t\tfor(Entry<myString, Integer> word: wordFrequency.entrySet()){\n\t\t\tint currentFrequency = word.getValue(); /* store the value of the entry in the chain hash map, will be used as the key for the heap*/\n\t\t\tString currentString = word.getKey()._word; /* store the string in the key of the entry of the chain hash map, will be used as the value for the heap*/\n\t\t\t\n\t\t\tfrequencyHeap.insert(currentFrequency, currentString);\n\t\t\t\n\t\t\tif(frequencyHeap.size() > 1000){\t\t\t\t\n\t\t\t\tfrequencyHeap.removeMin(); /* keep the heap size fixed at 1000; remove the minimum in the heap if the size exceeds 1000*/\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* till now, all the entries has been stored in the heap*/\n\t\t/* get the minimum value and key (the frequency and the corresponding word), then remove the minimum from the heap*/\n\t\t/* the data is stored in the excel form; the screen shot is provided in the document*/\n\t\t\n\t\twhile(frequencyHeap.size() > 0){\n\t\t\tSystem.out.println(frequencyHeap.min().getValue()); /* get the word from the ascending order of the frequency*/\n\t\t\tSystem.out.println(frequencyHeap.min().getKey()); /* get the frequency of the word*/\n\t\t\t\n\t\t\tfrequencyHeap.removeMin();\n\t\t}\n\n\t\t\n\t}", "public boolean hasFrequency() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "@Override\n public void postGlobal() {\n if (_minFreq > 1) filterMin();\n _vocabArray = _vocabHM.values().toArray(new ValueStringCount[_vocabHM.size()]);\n Arrays.sort(_vocabArray);\n _vocabHM = null;\n VOCABHM = null;\n buildFrame();\n }", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText();\n // construct a vector of tokens and update the tokenList in CAS\n // use tokenize0 from above\n List<String> ls = tokenize0(docText);\n Map<String, Integer> map = new HashMap<String, Integer>();\n Collection<Token> token_collection = new ArrayList<Token>();\n for (String d : ls) {\n if (map.containsKey(d)) {\n int inc = map.get(d) + 1;\n map.put(d, inc);\n } else {\n map.put(d, 1);\n }\n }\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry) it.next();\n Token t = new Token(jcas);\n String k = pairs.getKey().toString();\n int v = Integer.parseInt(pairs.getValue().toString());\n t.setFrequency(v);\n t.setText(k);\n token_collection.add(t);\n it.remove(); // avoids a ConcurrentModificationException\n }\n // use util tool to convert to FSList\n doc.setTokenList(Utils.fromCollectionToFSList(jcas, token_collection));\n doc.addToIndexes(jcas);\n\n }", "public Double getFrequency() {\n return frequency;\n }", "private void parseAvailableFrequencies(){\n\t\tString str = parser.readFile(FREQ_AVAILABLE, 256);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] frestrs = str.split(\" \");\n\t\tint[] freqs = new int[frestrs.length - 1];\n\t\tfor(int i = 0; i < freqs.length; i++)\n\t\t\tfreqs[i] = Integer.valueOf(frestrs[i]);\n\t\t\n\t\tcpuFrequencies = freqs;\n\t}", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }" ]
[ "0.6358429", "0.62898475", "0.62636083", "0.61407727", "0.6001514", "0.5913438", "0.59051925", "0.5886796", "0.5843172", "0.5765918", "0.5744375", "0.57344127", "0.5732372", "0.5724906", "0.5711527", "0.5694378", "0.56344986", "0.5613016", "0.56120217", "0.56076336", "0.5590155", "0.55668074", "0.5561273", "0.55565304", "0.5547528", "0.55362", "0.55270296", "0.550511", "0.5497477", "0.5481824", "0.5479398", "0.5471443", "0.5465217", "0.543255", "0.5423438", "0.5419137", "0.5404645", "0.5395557", "0.5388864", "0.53855175", "0.53643215", "0.534779", "0.53256327", "0.530862", "0.5304243", "0.52950984", "0.5284285", "0.52748245", "0.526587", "0.52518475", "0.5244337", "0.5239203", "0.5226595", "0.52149427", "0.52094907", "0.5204918", "0.5204698", "0.51679945", "0.51554686", "0.51543635", "0.5151993", "0.51508105", "0.5149896", "0.5140269", "0.5137802", "0.5135898", "0.5133544", "0.513181", "0.5123759", "0.51217496", "0.5118953", "0.51142114", "0.51113313", "0.5099438", "0.5096169", "0.5093299", "0.5086243", "0.5076798", "0.50607", "0.50562114", "0.5048477", "0.50473934", "0.50312346", "0.5025683", "0.5022204", "0.50204766", "0.50166583", "0.5012279", "0.50119567", "0.5010888", "0.5010626", "0.5009375", "0.49942797", "0.4989259", "0.49669617", "0.49621734", "0.49603072", "0.49594575", "0.4956512", "0.49478593", "0.4943672" ]
0.0
-1
Pre : Takes the frequency of character, and further structures from the collection. Post : Each structures are assigned, as well as the current structure's frequency.
public HuffmanNode(int freq, HuffmanNode left, HuffmanNode right){ this.freq = freq; this.left = left; this.right = right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\t\t\t\tif (guessedCharacter.contains(ch)) {\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!temp.containsKey(ch)) {\r\n\t\t\t\t\t\ttemp.put(ch, 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint t = temp.get(ch) + 1;\r\n\t\t\t\t\t\ttemp.put(ch, 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\r\n\t\tcharCount = temp;\r\n\r\n\t}", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public FrequencyBag() {\n\t\tfirstNode = null;\n\t\tnumEntries = 0;\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "private void initiateWordCount(){\n for(String key: DataModel.bloomFilter.keySet()){\n WordCountHam.put(key, 0);\n WordCountSpam.put(key, 0);\n }\n }", "public int getFreq(){ return frequency;}", "private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}", "private void add(Character c, int frequency) {\n for (int i = 1; i <= frequency; i++) {\n tileBag.add(new Tile(c));\n }\n }", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "public String frequencySort(String s) {\n\n\t\t// prepare a frequency map\n\t\tMap<Character, Integer> m = new HashMap<Character, Integer>();\n\t\tfor (char c : s.toCharArray())\n\t\t\tm.put(c, m.getOrDefault(c, 0) + 1);\n\n\t\tPriorityQueue<CKEntry1> pq = new PriorityQueue<>();\n\t\tfor (Entry<Character, Integer> e : m.entrySet()) {\n\t\t\tpq.add(new CKEntry1(e.getKey(), e.getValue()));\n\t\t}\n\t\t\n\t\t// prepare the output now\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile(!pq.isEmpty()) {\n\t\t\tCKEntry1 temp = pq.poll();\n\t\t\tchar[] tempC = new char[temp.count];\n\t\t\tArrays.fill(tempC, temp.c); // repeat c count' times\n\t\t\tsb.append(tempC);\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\n\t}", "public void run() {\n\n\t\tScanner s = new Scanner(System.in); // A scanner to scan the file per\n\t\t\t\t\t\t\t\t\t\t\t// character\n\t\ttype = s.next(); // The type specifies our wanted output\n\t\ts.nextLine(); \n\n\t\t// STEP 1: Count how many times each character appears.\n\t\tthis.charFrequencyCount(s);\n\n\t\t/*\n\t\t * Type F only wants the frequency. Display it, and we're done (so\n\t\t * return)\n\t\t */\n\t\tif (type.equals(\"F\")) {\n\t\t\tdisplayFrequency(frequencyCount);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 2: we want to make our final tree (used to get the direction\n\t\t * values) This entails loading up the priority queue and using it to\n\t\t * build the tree.\n\t\t */\n\t\tloadInitQueue();\n\t\tthis.finalHuffmanTree = this.buildHuffTree();\n\t\t\n\t\t/*\n\t\t * Type T wants a level order display of the Tree. Do so, and we're done\n\t\t * (so return)\n\t\t */\n\t\tif (type.equals(\"T\")) {\n\t\t\tthis.finalHuffmanTree.visitLevelOrder(new HuffmanVisitorForTypeT());\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 3: We want the Huffman code values for the characters.\n\t\t * The Huffman codes are specified by the path (directions) from the root.\n\t\t * \n\t\t * Each node in the tree has a path to get to it from the root. The\n\t\t * leaves are especially important because they are the original\n\t\t * characters scanned. Load every node with it's special direction value\n\t\t * (the method saves the original character Huffman codes, the direction\n\t\t * vals).\n\t\t */\n\t\tthis.loadDirectionValues(this.finalHuffmanTree.root);\n\t\t// Type H simply wants the codes... display them and we're done (so\n\t\t// return)\n\t\tif (type.equals(\"H\")) {\n\t\t\tthis.displayHuffCodesTable();\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 4: The Type must be M (unless there was invalid input) since all other cases were exhausted, so now we simply display the file using\n\t\t * the Huffman codes.\n\t\t */\n\t\tthis.displayHuffCodefile();\n\t}", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "public void countByCharacter() {\n if (super.getInput() == null) {\n return;\n }\n FileInputStream is;\n try {\n is = new FileInputStream(super.getInput());\n NxParser nxp = new NxParser();\n System.out.println(\"Parsing \" + super.getInput() + \"...\");\n nxp.parse(is);\n for (Node[] nx : nxp) {\n String nodeid = nx[0].toString();\n String predicate = nx[1].getLabel();\n if (!PredicateUtils.isSchemaOrgEvent(predicate)) {\n continue;\n }\n predicate = PredicateUtils.fixSchemaOrg(predicate);\n if (!ATTR.equalsIgnoreCase(PredicateUtils.getEventProperty(predicate))) {\n continue;\n }\n String obj = nx[2].getLabel();\n int length = obj.length();\n Integer count = mapEvents.get(nodeid);\n mapEvents.put(nodeid, (count == null ? length : count + length));\n Integer countLength = mapLengths.get(String.valueOf(length));\n mapLengths.put(String.valueOf(length), (countLength == null ? 1 : countLength + 1));\n }\n System.out.println(\"The total number of lines: \" + nxp.lineNumber());\n System.out.println(\"The total number of events: \" + mapEvents.size());\n System.out.println(\"Start sorting mapEvents...\");\n Map<String, Integer> mapEvent = VectorUtils.sortByValue(mapEvents, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"event\"), mapEvent);\n System.out.println(\"Start sorting mapLengths...\");\n Map<String, Integer> mapLength = VectorUtils.sortByValue(mapLengths, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"length\"), mapLength);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "java.lang.String getFrequency();", "public void populateDataStructure() {\n\t\tfp.initiateFileProcessing();\r\n\t\tint length=0,i=0;\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tstr=fp.readOneLine();\r\n\t\t\tif(str==null){\r\n\t\t\t\t//System.out.println(\"------\");\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(str);\r\n\t\t\t\tString[] line=str.split(\"\\\\s+\");\r\n\t\t\t\t\r\n\t\t\t\tfor(i=0;i<line.length;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\tif(line[i].length()>0){\r\n\t\t\t\t\t\tsbbst.insert(line[i]);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//length--;\r\n\t\t\t\t\t//i++;\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(line.length);\r\n\t\t\t\t//while((length=line.length)>0 & i<=length-1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*while(true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(true){\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\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(line[i]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}*/\r\n\t\t\t\t\tlength--;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\t//System.out.println(length+\"\\n\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Total Words: \"+ count);\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Distinct Words: \"+ sbbst.distinctCount);\r\n\t\tfp.closeFiles();\r\n\t}", "public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void doCount(ArrayList<String> liste){\n\t\tint j;\n\t\t\n\t\tfor (int i = 0; i < liste.size(); i++) {\n\t\t\t// check if string already exists\n\t\t\tif(!map.containsKey(liste.get(i))){\n\t\t\t\t// check frequency of the given string\n\t\t\t\tj = Collections.frequency(liste, liste.get(i));\t\n\t\t\t\t\n\t\t\t\t// underscore instead of blank space\n\t\t\t\tif(liste.get(i).equals(\" \"))\n\t\t\t\t\tmap.put(\"_\", j);\t\n\t\t\t\telse\n\t\t\t\t\tmap.put(liste.get(i), j);\t// (char, frequency)\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t//return map;\n\t}", "public static void main(String[] args) {\n Scanner teclado = new Scanner(System.in);\r\n String mensajeUsuario;\r\n System.out.println(\"Ingrese su mensaje:\");\r\n mensajeUsuario = teclado.nextLine();\r\n \r\n ArrayList inicial = new ArrayList<Nodo>();\r\n \r\n boolean valido = true;\r\n int contador = 0;\r\n //Se convierte el mensaje a una array de chars\r\n char [] arrayMensaje = mensajeUsuario.toCharArray();\r\n //Se cuenta la frecuencia de cada elemento\r\n for(char i: arrayMensaje){\r\n valido = true;\r\n Iterator itr = inicial.iterator();\r\n //Si el elemento que le toca no fue contado ya, es valido contar su frecuencia\r\n while (itr.hasNext()&&valido){\r\n Nodo element = (Nodo) itr.next();\r\n if (i==element.getCh()){\r\n valido = false;\r\n }\r\n }\r\n //Contar la frecuencia del elemento\r\n if (valido== true){\r\n Nodo temp = new Nodo();\r\n temp.setCh(i);\r\n for (char j:arrayMensaje){\r\n if (j==i){\r\n contador++;\r\n }\r\n }\r\n temp.setFreq(contador);\r\n inicial.add(temp);\r\n contador = 0;\r\n \r\n }\r\n }\r\n //Se recorre la lista generada de nodos para mostrar la frecuencia de cada elemento ene el orden en que aparecen\r\n System.out.println(\"elemento | frecuencia\");\r\n Iterator itr = inicial.iterator();\r\n while (itr.hasNext()){\r\n Nodo element = (Nodo)itr.next();\r\n System.out.println(element.getCh() + \" \"+ element.getFreq());\r\n }\r\n \r\n HuffmanTree huff = new HuffmanTree();\r\n huff.createTree(inicial);\r\n //System.out.println(huff.getRoot().getCh()+\" \"+huff.getRoot().getFreq());\r\n \r\n huff.codificar();\r\n System.out.println(\"elemento | frecuencia | codigo\");\r\n Iterator itrf= huff.getListaH().iterator();\r\n while(itrf.hasNext()){\r\n Nodo pivotal = (Nodo)itrf.next();\r\n System.out.println(pivotal.getCh() + \" \"+ pivotal.getFreq()+ \" \"+ pivotal.getCadena()); \r\n }\r\n \r\n System.out.println(\"Ingrese un codigo en base a la tabla anterior, separando por espacios cada nuevo caracter\");\r\n mensajeUsuario = teclado.nextLine();\r\n mensajeUsuario.indexOf(\" \");\r\n String mensajeFinal = \"\";\r\n String letra = \" \";\r\n String[] arrayDecode = mensajeUsuario.split(\" \");\r\n boolean codigoValido = true;\r\n for (String i: arrayDecode){\r\n if (codigoValido){\r\n letra = huff.decodificar(i);\r\n }\r\n if (letra.length()>5){\r\n codigoValido = false;\r\n }\r\n else {\r\n mensajeFinal = mensajeFinal.concat(letra);\r\n }\r\n }\r\n \r\n if (codigoValido){\r\n System.out.println(mensajeFinal);\r\n }\r\n else {\r\n System.out.println(\"El codigo ingresado no es valido\");\r\n }\r\n \r\n \r\n }", "int getFreq();", "private void CreateFreq(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr) {\n for (int key : freqY.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FY.append(\"/\");\n FY.append(auxs);\n auxs = Integer.toBinaryString(freqY.get(key));\n FY.append(\"/\");\n FY.append(auxs);\n }\n\n for (int key : freqCb.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCB.append(\"/\");\n FCB.append(auxs);\n auxs = Integer.toBinaryString(freqCb.get(key));\n FCB.append(\"/\");\n FCB.append(auxs);\n }\n\n for (int key : freqCr.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCR.append(\"/\");\n FCR.append(auxs);\n auxs = Integer.toBinaryString(freqCr.get(key));\n FCR.append(\"/\");\n FCR.append(auxs);\n }\n FCR.append(\"/\");\n }", "public void setFrequencies(Set<Frequency> arg0) {\n \n }", "public ComputeTermFrequencies() { super(); }", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public static void setAuthFreq(Map<String, AuthorMod> models)\n\t{\n\t\tfor (AuthorMod curAuth: models.values()) \n\t\t{\n\t\t\tfor(String uGram: curAuth.ug.getAll()) \n\t\t\t{\n\t\t\t\tint ucount = curAuth.ug.getCount(uGram);\n/*>>>>\t \t\tif (ucount<2) {curAuth.unks++;\t\t\t\t*** unkown word handling\n \t\t\t\tif (curAuth.ug.contains(\"<unk>\")) \n\t\t\t\t\t{ curAuth.ug.updateSeen(\"<unk>\");}\n\t\t\t\t\telse{ curAuth.ug.addNew(\"<unk>\");}\n*/\n\t\t\t\tdouble ufreq= ((double)ucount/curAuth.trainSize);\n\t\t\t\tcurAuth.ug.setFreq(uGram, ufreq);\n\t\t\t}\n\n\t\t//set bigram HT entries for frequency, \n\t\t//calculated by normalizing BG count by prefix count\n\t\t\tfor(Pair<String, String> bGram: curAuth.bg.getAll())\n\t\t\t{\n/*\t>>>\t\t\t\t-first, need a test to see if the unigram count for either word in bigram is less than 2. If yes, we will replace with <unk> tag\n\t\t\t\t\t\t\t- code to get counts for each word in bigram would look like curAuth.ug.getCount(bgram.getFirst()) \n\t\t\t\t\t-make new bg, with the count 1 word replaced with <Unk> tag. Use the parametered Pair<String, String> constructor with arguements (word, <unk>) depending on which is unk (or both)\n\t\t\t\t\t-do an updateSeen(bigram) or addNew(bigram) on curAuth.bg depending on if this new bigram has been seen (use curAuth.bg.contains(**this new bigram**)) \n\t\t\t\t\t-use data structure to remember what still needs updating (some type of set. we want something with no duplicates) \n\t\t\t\t\t-remove original bigram, put updated bigram in set\n\t\t\t\t\t-skip rest of loop for this bigram, and update the freq for the set after the loop */\n\t\t\t\t\t\n\t\t\t\t\tint bcount = curAuth.bg.getBgCount(bGram);\n\t\t\t\t\tint pcount = curAuth.ug.getCount(bGram.getFirst()); //sets p count to count of prefix from unigram table\n\t\t\t\t\tdouble bfreq = ((double)bcount)/pcount;\n\t\t\t\t\tcurAuth.bg.setFreq(bGram, bfreq);\n\t\t\t}\n\t\t\t//set frequncies for items we placed in set of bigrams containing the <unk> tag\n\t\t}\n\t}", "private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}", "public TagFreq(int freq, String tagName) {\r\n\t\tthis.freq = freq;\r\n\t\tthis.tagName = tagName;\r\n\t}", "public FrequencyList (String input){\n\tadd(input);\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\n\t\tint currentHash = 0; /* will be changed in the while loop to store the hash code for current word*/\n\t\tString currentWord; /* will be changed in the while loop to store the current word*/\n\t\t\n\t\tChainHashMap<myString, Integer> wordFrequency = new ChainHashMap<myString, Integer>(500); /* create the chain hash map with the size of 500; there is 500 buckets in the map*/\n\t\t\n\t\t\n\t\tFile file = new File(\"/Users/Jacob/Downloads/shakespeare.txt\");\n\t\t/*please notice that the file cannot be found on the address given above, change it to test if it works!*/\n\t\tScanner input = new Scanner(file); /* should be changed to file after debugging*/\n\t\t\n\t\t\n\t\twhile(input.hasNext()){\n\t\t\tcurrentWord = input.next();\n\t\t\t\n\t\t\twhile(currentWord.equals(\".\") || currentWord.equals(\",\") || currentWord.equals(\"!\") || currentWord.equals(\"?\") || currentWord.equals(\";\") || currentWord.equals(\":\")){\n\t\t\t\tif(input.hasNext()){\n\t\t\t\t\tcurrentWord = input.next();\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyString wordString = new myString(currentWord);\n\t\t\t\n\t\t\tif(wordFrequency.get(wordString) == null){\n\t\t\t\t\n\t\t\t\twordFrequency.put(wordString, 1); /* the key is the string and the value should be the word frequency*/\n\t\t\t}else{\n\n\t\t\t\twordFrequency.put(wordString, wordFrequency.get(wordString) + 1); /* if the key is already in the map, increment the word frequency by 1*/\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/* till this point, all the work of Shakespeare have been stored in the chained hash map*/\n\t\t/* the heap is used to get the top 1000 frequent work*/\n\t\t/* it adds the element to the heap and when the size of the heap reaches 1000, the word with the lowest will be removed, which is the root of the heap*/\n\t\t/* the two element in the entry for the heap should be exchanged; the key should store the frequencies and the the value should be the string */\n\t\t\n\t\tHeapAdaptablePriorityQueue<Integer, String> frequencyHeap = new HeapAdaptablePriorityQueue<Integer, String>();\n\t\t\n\t\tfor(Entry<myString, Integer> word: wordFrequency.entrySet()){\n\t\t\tint currentFrequency = word.getValue(); /* store the value of the entry in the chain hash map, will be used as the key for the heap*/\n\t\t\tString currentString = word.getKey()._word; /* store the string in the key of the entry of the chain hash map, will be used as the value for the heap*/\n\t\t\t\n\t\t\tfrequencyHeap.insert(currentFrequency, currentString);\n\t\t\t\n\t\t\tif(frequencyHeap.size() > 1000){\t\t\t\t\n\t\t\t\tfrequencyHeap.removeMin(); /* keep the heap size fixed at 1000; remove the minimum in the heap if the size exceeds 1000*/\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* till now, all the entries has been stored in the heap*/\n\t\t/* get the minimum value and key (the frequency and the corresponding word), then remove the minimum from the heap*/\n\t\t/* the data is stored in the excel form; the screen shot is provided in the document*/\n\t\t\n\t\twhile(frequencyHeap.size() > 0){\n\t\t\tSystem.out.println(frequencyHeap.min().getValue()); /* get the word from the ascending order of the frequency*/\n\t\t\tSystem.out.println(frequencyHeap.min().getKey()); /* get the frequency of the word*/\n\t\t\t\n\t\t\tfrequencyHeap.removeMin();\n\t\t}\n\n\t\t\n\t}", "private void count(Entry curr)\n {\n \t//Increase Prefix count if any word is found.\n \tif (curr.EndOfWord == true)\n \t\tprefixCnt += 1;\n \t\n \tfor (HashMap.Entry<Character, Entry> entry : curr.child.entrySet())\n \t{\n \t\tcount(entry.getValue());\n \t}\n }", "public static Map<Character,Integer> countFreq(String string){\n\n\n\n Map<Character,Integer> results = new HashMap<Character,Integer>();\n for (int i = 0; i < string.length(); i++) {\n Character temp = string.charAt(i);\n Integer count;\n// System.out.println(temp);\n if (results.containsKey(temp)){\n count=results.get(temp);\n count++;\n results.replace(temp,count);\n }\n else\n results.put(temp,1);\n\n }\n\n return results;\n }", "public void prepareData(){\n\tAssert.pre( data!=null, \"data must be aquired first\");\n\t//post: creates a vector of items with a maximum size, nullifies the original data. This prevents us from having to loop through the table each time we need a random charecter (only once to prepare the table). this saves us more time if certain seeds are used very often.\n\n\t//alternate post: changes frequencies in data vector to the sum of all the frequencies so far. would have to change getrandomchar method\n\n\n\t //if the array is small, we can write out all of the Strings\n\t \n\ttable = new Vector(MAX_SIZE);\n\n\tif (total < MAX_SIZE){\n\t\t\n\t\n\t\t//steps through data, creating a new vector\n\t\tfor(int i = 0; i<data.size(); i++){\n\n\t\t count = data.get(i);\n\n\t\t Integer fr = count.getValue();\n\t\t int f = fr.intValue();\n\n\t\t if(total<MAX_SIZE){\n\t\t\tf = (f*MAX_SIZE)/total;\n\t\t }\n\t\t\t\n\t\t //ensures all are represented (biased towards small values)\n\t\t //if (f == 0){ f == 1;}\n\n\n\t\t String word = (String)count.getKey();\n\t \n\t\t for (int x = 0; x< f; x++){\n\t\t\ttable.add( word);\n\t\t }\n\n\t\t}\n\t }\n\n\t//because of division with ints, the total might not add up 100.\n\t//so we redefine the total at the end of this process\n\ttotal = table.size();\n\n\t //we've now prepared the data\n\t dataprepared = true;\n\n\t //removes data ascociations to clear memory\n\t data = null;\n\t}", "public int getFrequency(){\n return this.frequency;\n }", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "private static void getStat(){\n\t\tfor(int key : Initial_sequences.keySet()){\n\t\t\tint tmNo = Initial_sequences.get(key);\n\t\t\tif (tmNo > 13){\n\t\t\t\ttmInitLarge ++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(tmInit.containsKey(tmNo)){\n\t\t\t\t\tint temp = tmInit.get(tmNo);\n\t\t\t\t\ttemp++;\n\t\t\t\t\ttmInit.put(tmNo, temp);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttmInit.put(tmNo, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Go through all the proteins in SC\n\t\tfor(int key : SC_sequences.keySet()){\n\t\t\tint tmNo = SC_sequences.get(key);\n\t\t\t\n\t\t\tint loop = Loop_lengths.get(key);\n\t\t\tint tmLen = TM_lengths.get(key);\n\t\t\t\n\t\t\tLoopTotalLen = LoopTotalLen + loop;\n\t\t\tTMTotalLen = TMTotalLen + tmLen;\n\t\t\t\n\t\t\t\n\t\t\tif (tmNo > 13){\n\t\t\t\ttmSCLarge ++;\n\t\t\t\tLoopLargeLen = LoopLargeLen + loop;\n\t\t\t\tTMLargeLen = TMLargeLen + tmLen;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(tmSC.containsKey(tmNo)){\n\t\t\t\t\tint temp = tmSC.get(tmNo);\n\t\t\t\t\ttemp++;\n\t\t\t\t\ttmSC.put(tmNo, temp);\n\t\t\t\t\t\n\t\t\t\t\tint looptemp = Loop_SC.get(tmNo);\n\t\t\t\t\tlooptemp = looptemp + loop;\n\t\t\t\t\tLoop_SC.put(tmNo, looptemp);\n\t\t\t\t\t\n\t\t\t\t\tint tmlenTemp = TM_len_SC.get(tmNo);\n\t\t\t\t\ttmlenTemp = tmlenTemp + tmLen;\n\t\t\t\t\tTM_len_SC.put(tmNo, tmlenTemp);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttmSC.put(tmNo, 1);\n\t\t\t\t\t\n\t\t\t\t\tLoop_SC.put(tmNo, 1);\n\t\t\t\t\tTM_len_SC.put(tmNo, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "float getFrequency();", "public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter a word:\");\n String word = scan.next();\n System.out.println(\"Enter character:\");\n char character = scan.next().charAt(0);\n\n int count=0; //count frequency of character\n for (int i =0; i<word.length(); i++) {\n char each = word.charAt(i); //each character by given string word\n\n if (each == character) { //if each character in str is matching with ch\n count++; //count increase the frequency of ch by 1\n\n }\n }\n System.out.println(count);\n\n System.out.println(\"===========================\");\n\n\n\n }", "public void countByAlpha() {\n if (super.getInput() == null) {\n return;\n }\n FileInputStream is;\n try {\n is = new FileInputStream(super.getInput());\n NxParser nxp = new NxParser();\n System.out.println(\"Parsing \" + super.getInput() + \"...\");\n nxp.parse(is);\n for (Node[] nx : nxp) {\n String nodeid = nx[0].toString();\n String predicate = nx[1].getLabel();\n if (!PredicateUtils.isSchemaOrgEvent(predicate)) {\n continue;\n }\n predicate = PredicateUtils.fixSchemaOrg(predicate);\n if (!ATTR.equalsIgnoreCase(PredicateUtils.getEventProperty(predicate))) {\n continue;\n }\n String obj = nx[2].getLabel();\n obj = NGramUtils.removePunctuaion(obj);\n int length = obj.length();\n Integer count = mapEvents.get(nodeid);\n mapEvents.put(nodeid, (count == null ? length : count + length));\n Integer countLength = mapLengths.get(String.valueOf(length));\n mapLengths.put(String.valueOf(length), (countLength == null ? 1 : countLength + 1));\n }\n System.out.println(\"The total number of lines: \" + nxp.lineNumber());\n System.out.println(\"The total number of events: \" + mapEvents.size());\n System.out.println(\"Start sorting mapEvents...\");\n Map<String, Integer> mapEvent = VectorUtils.sortByValue(mapEvents, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"event\"), mapEvent);\n System.out.println(\"Start sorting mapLengths...\");\n Map<String, Integer> mapLength = VectorUtils.sortByValue(mapLengths, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"length\"), mapLength);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void set(int symbol, int freq);", "public TagFreq(String stringRepresentation) {\r\n\t\t\r\n\t\tint indexOfFreq = stringRepresentation.lastIndexOf('(') + 1; \r\n\t\t\r\n\t\tthis.tagName =\r\n\t\t\tstringRepresentation.substring(0, indexOfFreq - 2);\r\n\t\tthis.freq =\r\n\t\t\tInteger.parseInt(stringRepresentation.\r\n\t\t\t\t\t\t\t\tsubstring(indexOfFreq,\r\n\t\t\t\t\t\t\t\t\t\t stringRepresentation.length() - 1));\r\n\t}", "public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "public WordCount()\n {\n //initializes common variables.\n lineNums = new CircularList();\n count = 1;\n }", "private void traverseLine(String str) {\n\t\tFrequencyCount f ;\r\n\t\tint prev = 0;\r\n\t\tString docid = \"\";\r\n\t\tint flag = 0,flag1 = 0;\r\n\t\tfor(int k = 0;k<str.length();k++)\r\n\t\t{\r\n\t\t\t//System.out.print(str.charAt(k));\r\n\t\t\tif(str.charAt(k) == ':'){\r\n\t\t\t\tflag = 1;k++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(flag == 1){\r\n\t\t\t\tint indexid;\r\n\t\t\t\tif(flag1 == 0){\r\n\t\t\t\t\tcounter = \"\";\r\n\t\t\t\t\tindexid = str.indexOf(':', k);\r\n\t\t\t\t\tcounter = str.substring(k, indexid);\r\n\t\t\t\t\tk = indexid+1;\r\n\t\t\t\t\tflag1 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tindexid = str.indexOf('#', k);\r\n\t\t\t\tdocid = String.valueOf(Integer.parseInt(str.substring(k, indexid))+prev);\r\n\t\t\t\tprev = Integer.parseInt(docid);\r\n\t\t\t\t\r\n\t\t\t\tf = new FrequencyCount(docid);\r\n\t\t\t\tk = indexid+1;\r\n\t\t\t\twhile(str.charAt(k) != '|'){\r\n\t\t\t\t\tif(k+1 == str.length()){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(str.charAt(k) == '#') {k++;continue;}\r\n\t\t\t\t\tint flagop = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch(str.charAt(k)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcase 't' : flagop = 1;\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\tcase 'i' : flagop = 2;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'b' : flagop = 3;\r\n\t\t\t\t \t\t \t\t\tbreak;\r\n\t\t\t\t\t\tcase 'r' : flagop = 6;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'L' : flagop = 5;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'c' : flagop = 4;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'l' : flagop = 7;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault : flagop = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(flagop != 0){\r\n\t\t\t\t\t\tindexid = Math.min(str.indexOf('#', k), str.indexOf('|', k));\r\n\t\t\t\t\t\tif(indexid == -1){\r\n\t\t\t\t\t\t\tindexid = str.indexOf('|', k);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tint count = Integer.parseInt(str.substring(k+1, indexid));\r\n\t\t\t\t\t\t//System.out.print(count +\" \");\r\n\t\t\t\t\t\tfor(int j = 0;j<count;j++)\r\n\t\t\t\t\t\t\tf.incrementCounter(flagop);\r\n\t\t\t\t\t\tk = indexid;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e){e.printStackTrace();\r\n\t\t\t\t\t\t\tSystem.out.println(\"EXCEPTION : \"+e.getMessage());\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\tfc.add(f);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tword = word+str.charAt(k);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void setFrequency(int f){\n this.frequency = f;\n }", "public int getFrequency()\n {\n return this.frequency;\n }", "private Map<Character, Double> getStrFrequencyTable(String str) {\n str = str.toLowerCase(Locale.ENGLISH);\n\n Map<Character, Double> frequencyTable = new HashMap<>(26);\n int[] countArr = countLetters(str);\n int numOfLetters = Arrays.stream(countArr).sum();\n\n for (char alphabet = 'a'; alphabet <= 'z'; alphabet++) {\n double frequency = 0.0;\n if (numOfLetters != 0) {\n frequency = countArr[alphabet-'a'] / (double) numOfLetters;\n }\n frequencyTable.put(alphabet, frequency);\n }\n\n return frequencyTable;\n }", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\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 }", "public void characters(char ch[], int start, int length){\n \t\t\t\t\tstr = new String(ch, start, length);\n \t\t\t\t\tif(tagname.equals(\"libraryname\")){\n \t\t\t\t\t\tcounts = 0;\n \t\t\t\t\t\tSystem.out.println(\"-----IN LIB-name\"+str+\"-----\"+\" \"+counts);\n \t\t\t\t\t\tbdatalist = new ArrayList<String>();\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"librarytel\")){\n \t\t\t\t\t\tSystem.out.println(\"-LIB TEL-\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"librarysite\")){\n \t\t\t\t\t\tSystem.out.println(\"-LIB SITE-\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"libraryaddr\")){\n \t\t\t\t\t\tSystem.out.println(\"-LIB ADDR-\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"bdata\")){\n \t\t\t\t\t\tSystem.out.println(\"-FOUND NEW BOOK-\");\n \t\t\t\t\t}else if(tagname.equals(\"bookname\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-NAME\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"ISBN\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-ISBN\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"author\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-AUTHOR\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"bookshelf\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-SHELF\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"serial\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-SERIAL\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"returned\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-returned\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"checkoutdate\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-chkdate\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}else if(tagname.equals(\"returndate\")){\n \t\t\t\t\t\tSystem.out.println(\"FOUND BOOK-rtndate\"+str+\" \"+counts);\n \t\t\t\t\t\tbdatalist.add(counts, str);\n \t\t\t\t\t\tcounts++;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}", "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "@Override\n public void update(LabeledText labeledText){\n super.update(labeledText);\n\n /* FILL IN HERE */\n classCounts[labeledText.label]++;\n for (String ng: labeledText.text.ngrams) { \n \tfor (int h=0;h< nbOfHashes;h++) {\n \t\tcounts[labeledText.label][h][hash(ng,h)]++; \n \t}\n \t//System.out.println(\"Hash: \" + hash(ng) + \" Label : \" + labeledText.label + \" Update: \" + counts[labeledText.label][hash(ng)]);\n }\n \n }", "private void parseAvailableFrequencies(){\n\t\tString str = parser.readFile(FREQ_AVAILABLE, 256);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] frestrs = str.split(\" \");\n\t\tint[] freqs = new int[frestrs.length - 1];\n\t\tfor(int i = 0; i < freqs.length; i++)\n\t\t\tfreqs[i] = Integer.valueOf(frestrs[i]);\n\t\t\n\t\tcpuFrequencies = freqs;\n\t}", "@Override\n public long getFrequencyCount() {\n return count;\n }", "public HashBag(Collection<E> c) {\n map = new HashMap<>((c.size() * 4) / 3);\n for (E item : c) {\n if (item == null)\n continue;\n Counter val = map.get(item);\n if (val == null)\n map.put(item, new Counter(1));\n else\n val.increment();\n }\n }", "public void updateCounts() {\n\n Map<Feel, Integer> counts_of = new HashMap<>();\n\n for (Feel feeling : Feel.values()) {\n counts_of.put(feeling, 0);\n }\n\n for (FeelingRecord record : this.records) {\n counts_of.put(record.getFeeling(), counts_of.get(record.getFeeling()) + 1);\n }\n\n this.angry_count.setText(\"Anger: \" + counts_of.get(Feel.ANGER).toString());\n this.fear_count.setText(\"Fear: \" + counts_of.get(Feel.FEAR).toString());\n this.joyful_count.setText(\"Joy: \" + counts_of.get(Feel.JOY).toString());\n this.love_count.setText(\"Love: \" + counts_of.get(Feel.LOVE).toString());\n this.sad_count.setText(\"Sad:\" + counts_of.get(Feel.SADNESS).toString());\n this.suprise_count.setText(\"Suprise: \" + counts_of.get(Feel.SURPRISE).toString());\n }", "public static void main(String[] args) {\n\n\t\tFreqOfChar_Asignment20 freqOfChar_Asignment20 = new FreqOfChar_Asignment20();\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the word\");\n\t\tString inputword = scanner.next();\n\t\tSystem.out.println(\"Enter a character\");\n\t\tchar ch = scanner.next().charAt(0);\n\t\tint output = freqOfChar_Asignment20.getFreqOfChar(inputword, ch);\n\t\tSystem.out.println(\"Frequency of \" + ch + \" in the \" + inputword + \" is \" + output);\n\t\tscanner.close();\n\t}", "void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\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\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}", "public long getFreq() {\n return freq;\n }", "public int getFreq() {\n return freq_;\n }", "private static void testFrequency(BagInterface<String> aBag, String[] tests)\n {\n System.out.println(\"\\nTesting the method getFrequencyOf:\");\n for (int index = 0; index < tests.length; index++)\n System.out.println(\"In this bag, the count of \" + tests[index] +\n \" is \" + aBag.getFrequencyOf(tests[index]));\n }", "void hashLexicons(Email email) {\n for (String s : email.processedMessage.keySet()) {\n int tempCount = email.processedMessage.get(s);\n \n if(email.ec==EmailClass.ham)\n {\n totalNumberOfWordsInHamDocuments= totalNumberOfWordsInHamDocuments+tempCount;\n }\n else\n {\n totalNumberOfWordsInSpamDocuments = totalNumberOfWordsInSpamDocuments +tempCount;\n }\n //totalNumberOfWords = totalNumberOfWords + tempCount;\n if (words.containsKey(s)) {\n LexiconCount lc = words.get(s);\n long hc = lc.numberOfOccurencesInHamDocuments;\n long sc = lc.numberOfOccurencesInSpamDocuments;\n\n if (email.ec == EmailClass.ham) {\n hc = hc + tempCount;\n } else {\n sc = sc + tempCount;\n }\n words.put(s, new LexiconCount(hc, sc));\n } else {\n long hc=0,sc=0;\n if(email.ec==EmailClass.ham)\n {\n hc=tempCount;\n }\n else\n {\n sc=tempCount;\n }\n words.put(s, new LexiconCount(hc,sc));\n }\n }\n }", "public void getCounts() {\t\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tfor(int j = 0; j < 3; j++)\r\n\t\t\t\tthecounts[i][j] = 0;\r\n\t\t\r\n\t\tfor(int i=0;i<maps.length-1;i++) {\r\n\t\t\tif(maps.Array1.charAt(i) == 'H' && maps.Array1.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[0][0]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == 'E' && maps.Array1.charAt(i+1) =='-') \r\n\t\t\t\tthecounts[0][1]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[0][2]++;\r\n\t\t\tif(maps.Array2.charAt(i) == 'H' && maps.Array2.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[1][0]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == 'E' && maps.Array2.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[1][1]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == '-' && maps.Array2.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[1][2]++;\r\n\t\t\tif(maps.Array3.charAt(i) == 'H' && maps.Array3.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[2][0]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == 'E' && maps.Array3.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[2][1]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == '-' && maps.Array3.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[2][2]++;\r\n\t\t\tif(maps.Array4.charAt(i) == 'H' && maps.Array4.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[3][0]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == 'E'&&maps.Array4.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[3][1]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[3][2]++;\r\n\t\t}\r\n\t\t\r\n\t\t//Getting transition value between 1 and 0\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\tthecounts[i][j]/=maps.length;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Displaying the obtained values\r\n\t\tSystem.out.println(\"\\nTRANSITION\");\r\n\t\tSystem.out.println(\"HYDROPHOBICITY: 1->2: \" + thecounts[0][0] + \" 2->3: \" + thecounts[0][1] + \" 3->1: \" + thecounts[0][2]);\r\n\t\tSystem.out.println(\"POLARIZABILITY: 1->2: \" + thecounts[1][0] + \" 2->3: \" + thecounts[1][1] + \" 3-1: \" + thecounts[1][2]);\r\n\t\tSystem.out.println(\"POLARITY: 1->2: \" + thecounts[2][0] + \" 2->3: \" + thecounts[2][1] + \" 3->1: \" + thecounts[2][2]);\r\n\t\tSystem.out.println(\"VAN DER WALLS VOLUME: 1->2: \" + thecounts[3][0] + \" 2->3: \" + thecounts[3][1] + \" 3->1: \" + thecounts[3][2]);\r\n\t\t\r\n\t}", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public void testResolveDereferenceDotCollection()\r\n {\r\n _field _count = _field.of( \"public int count;\" );\r\n _field _name = _field.of( \"public String name;\" );\r\n \r\n Form f = ForML.compile( \"{+field.type+} {+field.name+}, \");\r\n \r\n List<_field> l = new ArrayList<_field>();\r\n l.add( _count );\r\n l.add( _name );\r\n \r\n assertEquals( 2, f.getCardinality( \r\n VarContext.of( \"field\", l ) ) );\r\n \r\n String str = f.author( \r\n VarContext.of( \"field\", l ) );\r\n \r\n assertEquals( \"int count, String name\", str );\r\n }", "@Override //old methd for letter count\n public Integer letterCount(String inputString) {\n char[] characterArray = inputString.toCharArray();\n Map<Character, Integer> wordFrequencyMap = new HashMap<Character, Integer>();\n\n for (char character : characterArray) {\n if (wordFrequencyMap.containsKey(character)) {\n\n Integer wordCount = (Integer) wordFrequencyMap.get(character);\n wordFrequencyMap.put(character, wordCount + 1);\n\n } else {\n wordFrequencyMap.put(character, 1);\n\n }\n }\n return null; //iterateWordCount(wordFrequencyMap);\n }", "private void stats ( ) {\n\n nodes = 0;\n depth = 0;\n\n parse(((GPIndividual)program).trees[0].child);\n\n }", "protected static void updateMismatchCounts(CountedData counter, final AlignmentContext context, final byte refBase) {\n for( PileupElement p : context.getBasePileup() ) {\n final byte readBase = p.getBase();\n final byte readBaseQual = p.getQual();\n final int readBaseIndex = BaseUtils.simpleBaseToBaseIndex(readBase);\n final int refBaseIndex = BaseUtils.simpleBaseToBaseIndex(refBase);\n try{\n \tif( readBaseIndex != -1 && refBaseIndex != -1 ) {\n //if( readBaseIndex != refBaseIndex && !(BisulfiteSnpUtil.isCytosine(refBase,false) && BisulfiteSnpUtil.isCytosine(readBase,true))) {\n //counter.novelCountsMM++;\n \t\tif( readBaseIndex != refBaseIndex ){\n \t\t\tif((BisulfiteSnpUtil.isCytosine(refBase,false) && BisulfiteSnpUtil.isCytosine(readBase,true))){\n \t\t\t\tif(readBaseQual <= 5){\n \t\t\t\t\tincreaseNovelCountsMM(counter,1);\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t}\n \t\t\telse{\n \t\t\t\tincreaseNovelCountsMM(counter,1);\n \t\t\t}\n }\n increaseNovelCountsBases(counter,1);\n \t}\n }\n catch (InstantiationException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\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}\n }\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n \n \n File textBank = new File(\"textbank/\");\n Hashtable<Integer,Integer> frequency;\n Hashtable<Integer, String> table;\n table = new Hashtable<>();\n frequency = new Hashtable<>();\n Scanner input = new Scanner(new File(\"stoplist.txt\"));\n int max=0;\n while (input.hasNext()) {\n String next;\n next = input.next();\n if(next.length()>max)\n max=next.length();\n table.put(next.hashCode(), next); //to set up the hashmap with the wordsd\n \n }\n \n System.out.println(max);\n \n Pattern p0=Pattern.compile(\"[\\\\,\\\\=\\\\{\\\\}\\\\\\\\\\\\\\\"\\\\_\\\\+\\\\*\\\\#\\\\<\\\\>\\\\!\\\\`\\\\-\\\\?\\\\'\\\\:\\\\;\\\\~\\\\^\\\\&\\\\%\\\\$\\\\(\\\\)\\\\]\\\\[]\") \n ,p1=Pattern.compile(\"[\\\\.\\\\,\\\\@\\\\d]+(?=(?:\\\\s+|$))\");\n \n \n \n wor = new ConcurrentSkipListMap<>();\n \n ConcurrentMap<String , Map<String,Integer>> wordToDoc = new ConcurrentMap<String, Map<String, Integer>>() {\n @Override\n public Map<String, Integer> putIfAbsent(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean remove(Object key, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean replace(String key, Map<String, Integer> oldValue, Map<String, Integer> newValue) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> replace(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public int size() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean isEmpty() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsKey(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsValue(Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> get(Object key) {\n return wor.get((String)key);//To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> put(String key, Map<String, Integer> value) {\n wor.put(key, value); // this saving me n \n //if(frequency.get(key.hashCode())== null)\n \n //frequency.put(key.hashCode(), )\n return null;\n }\n\n @Override\n public Map<String, Integer> remove(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void putAll(Map<? extends String, ? extends Map<String, Integer>> m) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<String> keySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Collection<Map<String, Integer>> values() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<Map.Entry<String, Map<String, Integer>>> entrySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n totalFiles = textBank.listFiles().length;\n for (File textFile : textBank.listFiles()) {\n totalReadFiles++;\n //checking whether file has txt extension and file size is higher than 0\n if(textFile.getName().contains(\".txt\") && textFile.length() > 0){\n docName.add(textFile.getName().replace(\".txt\", \".stp\"));\n StopListHandler sp = new StopListHandler(textFile, table,System.currentTimeMillis(),p0,p1,wordToDoc);\n sp.setFinished(() -> {\n \n tmp++;\n \n if(tmp==counter)\n //printTable(counter);\n \n if(totalReadFiles == totalFiles)\n {\n printTable(counter);\n }\n \n });\n \n sp.start();\n counter ++;}\n \n \n }\n System.out.println(counter);\n //while(true){if(tmp==counter-1) break;}\n System.out.println(\"s\");\n \n }", "public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}", "private void initWeight(Exemplar ex) {\t\n int pos = 0, neg = 0, n = 0;\n Exemplar cur = m_Exemplars;\n if (cur == null){\n ex.setPositiveCount(1);\n ex.setNegativeCount(0);\n return;\n }\n while(cur != null){\n pos += cur.getPositiveCount();\n neg += cur.getNegativeCount();\n n++;\n cur = cur.next;\n }\n ex.setPositiveCount(pos / n);\n ex.setNegativeCount(neg / n);\n }", "private Map<Character, Integer> getFreqs(String input) {\n\t\tMap<Character, Integer> freqMap = new HashMap<>();\n\t\tfor (char c : input.toCharArray()) {\n\t\t\tif (freqMap.containsKey(c)) {\n\t\t\t\tfreqMap.put(c, freqMap.get(c) + 1);\n\t\t\t} else {\n\t\t\t\tfreqMap.put(c, 1);\n\t\t\t}\n\t\t}\n\t\treturn freqMap;\n\t}", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText();\n // construct a vector of tokens and update the tokenList in CAS\n // use tokenize0 from above\n List<String> ls = tokenize0(docText);\n Map<String, Integer> map = new HashMap<String, Integer>();\n Collection<Token> token_collection = new ArrayList<Token>();\n for (String d : ls) {\n if (map.containsKey(d)) {\n int inc = map.get(d) + 1;\n map.put(d, inc);\n } else {\n map.put(d, 1);\n }\n }\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry) it.next();\n Token t = new Token(jcas);\n String k = pairs.getKey().toString();\n int v = Integer.parseInt(pairs.getValue().toString());\n t.setFrequency(v);\n t.setText(k);\n token_collection.add(t);\n it.remove(); // avoids a ConcurrentModificationException\n }\n // use util tool to convert to FSList\n doc.setTokenList(Utils.fromCollectionToFSList(jcas, token_collection));\n doc.addToIndexes(jcas);\n\n }", "private List<Tuple> charCountMap(Tuple input) {\n \n String[] words = input.snd().replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n for(String word : words) {\n Integer chars = word.length();\n output.add(new Tuple(chars.toString(),\"1\"));\n }\n \n lolligag();\n \n //<charCount, 1>, <charCount, 1> ...\n return output;\n }", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(String[] args)\r\n {\r\n Map<Character, Integer> myMap = new TreeMap<>(); //initializes the map\r\n secondMap = new TreeMap<>(); //initializes the second map\r\n List<Character> myList = new ArrayList<>(); //creates the list\r\n\r\n //input validation loop to force the users to input an extension with .txt, also extracts the directoryPath\r\n //from the file path extension\r\n String filePath = \"\";\r\n String directoryPath = \"\";\r\n boolean keepRunning = true;\r\n Scanner myScanner = new Scanner(System.in);\r\n\r\n while (keepRunning)\r\n {\r\n System.out.println(\"Please provide the filepath to the file and make sure to include the '.txt' extension\");\r\n String z = myScanner.nextLine();\r\n\r\n //uses a substring to check the extension\r\n if (z.substring((z.length() - 4)).equalsIgnoreCase(\".txt\"))\r\n {\r\n filePath = z;\r\n\r\n for (int i = z.length()-1; i >= 0; i--)\r\n {\r\n if (z.charAt(i) == '\\\\')\r\n {\r\n directoryPath = z.substring(0, i);\r\n i = -1;\r\n }\r\n }\r\n\r\n //terminates the loop\r\n keepRunning = false;\r\n }\r\n else\r\n {\r\n System.out.print(\"Invalid Input! \");\r\n }\r\n }\r\n\r\n try\r\n {\r\n //makes the file\r\n File myFile = new File(filePath);\r\n FileInputStream x = new FileInputStream(myFile);\r\n\r\n //reads in from the file character by character\r\n while (x.available() > 0)\r\n {\r\n Character c = (char) x.read();\r\n myList.add(c);\r\n }\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n //loads all of the characters into a map with their respective frequency\r\n for (Character a : myList)\r\n {\r\n Integer value = myMap.get(a);\r\n\r\n if (!myMap.containsKey(a))\r\n {\r\n myMap.put(a, 1);\r\n }\r\n else\r\n {\r\n myMap.put(a, (value + 1));\r\n }\r\n }\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(myMap);\r\n\r\n PriorityQueue<Node> myQueue = new PriorityQueue<>();\r\n\r\n //creates a node for each Character/value in the map and puts it into the priority Queue\r\n for (Character a : myMap.keySet())\r\n {\r\n Node b = new Node(a, myMap.get(a));\r\n myQueue.add(b);\r\n }\r\n\r\n //removes and re-adds nodes to form the tree, remaining node is the root of the tree\r\n while (myQueue.size() > 1)\r\n {\r\n //removes first two nodes\r\n Node firstRemoved = myQueue.remove();\r\n Node secondRemoved = myQueue.remove();\r\n\r\n //the value for the new node being a sum of the first two removed node's respective frequencies\r\n int val = firstRemoved.frequency + secondRemoved.frequency;\r\n\r\n //creates the new node, set's its frequency to the value of the first two, then ties its left/right node values\r\n //to those originally removed nodes\r\n Node replacementNode = new Node();\r\n replacementNode.frequency = val;\r\n replacementNode.left = firstRemoved;\r\n replacementNode.right = secondRemoved;\r\n\r\n myQueue.add(replacementNode);\r\n }\r\n\r\n //does the recursion on the priorityQueue\r\n huffmanStringSplit(myQueue.peek(), \"\");\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(secondMap);\r\n\r\n //creates and writes to the .CODE file and the .HUFF file\r\n try\r\n {\r\n //PrintWriter for easily writing to a file\r\n String output = directoryPath + \"\\\\FILENAME.code\";\r\n PrintWriter myPrinter = new PrintWriter(output);\r\n\r\n //goes through the second map\r\n for (Character a : secondMap.keySet())\r\n {\r\n int ascii = (int) a;\r\n myPrinter.println(ascii);\r\n myPrinter.println(secondMap.get(a));\r\n }\r\n\r\n //closes printer\r\n myPrinter.close();\r\n\r\n //reopens the printer to the new file\r\n output = directoryPath + \"\\\\FILENAME.huff\";\r\n myPrinter = new PrintWriter(output);\r\n\r\n //outputs every value in the original list to the .huff file with the characters converted to huff code\r\n for (Character a : myList)\r\n {\r\n myPrinter.print(secondMap.get(a));\r\n myPrinter.flush();\r\n }\r\n\r\n //closes the printer after it's written\r\n myPrinter.close();\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "public static void getFreq(){\n\t\t\tint mutTotalcounter=0;\n\t\t\t\n\t\t\tfor(int i=0; i<numOfMutations.length-1; i++){\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]==numOfMutations[i+1]){\n\t\t\t\t\tfrequency[mutTotalcounter]+=1; //if number of mutation is repeated in original array, frequency is incremented\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]!=numOfMutations[i+1])\n\t\t\t\t{\n\t\t\t\t\tmutTotal[mutTotalcounter++]=numOfMutations[i]; //if number is not repeated in array, the next element in array\n\t\t\t\t\t//becomes the next number of mutations that occurred\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((i+1)==numOfMutations.length-1){\n\t\t\t\t\t//used to get the last element in original array since for loop will go out of bounds\n\t\t\t\t\tmutTotal[mutTotalcounter]=numOfMutations[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"XMut : YFreq\");\n\t\t\t//console display of mutation and frequency values\n\t\t\tfor (int i=0; i<=mutTotal.length-1;i++){\n\t\t\t\tif(mutTotal[i]==0 && frequency[i]==0) continue;\n\t\t\t\tfrequency[i]+=1;\n\t\t\t\tSystem.out.print(mutTotal[i]+\" : \");\n\t\t\t\tSystem.out.print(frequency[i]);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "@org.junit.Test\n public void testTables() {\n Set<Character> letters = new HashSet<>();\n\n for (int i = 0; i < Vigenere.alphabet.length(); i++) {\n letters.add(Vigenere.alphabet.charAt(i));\n }\n\n Assert.assertEquals(\"26 letters expected\", 26, letters.size());\n\n double total = 0.0;\n\n for (Map.Entry<Character, Double> e : Vigenere.freqs.entrySet()) {\n boolean wasPresent = letters.remove(e.getKey());\n Assert.assertTrue(\"letter duplicated\", wasPresent);\n total += e.getValue();\n }\n\n Assert.assertTrue(Math.abs(total - 100.0) < 1.0);\n\n String example = \"DITDITQQQQ\";\n total = 0.0;\n Map<Character, Double> res = Vigenere.calculateFrequencies(example);\n for (Map.Entry<Character, Double> e : res.entrySet()) {\n total += e.getValue();\n }\n Assert.assertTrue(Math.abs(total - 100.0) < 1.0);\n }", "void countTagStatistics(){\t\n\t\thtmlParsed.traverse(new NodeVisitor() {\n\t\t\tdouble count = 0.;\n\t\t\tString tagName = \"\";\n\t\t public void head(Node node, int depth) {\n\t\t \tif (node instanceof Element) {\n\t\t \t\ttagName = ((Element) node).tagName();\n\t\t \t\tif(countTags.containsKey(tagName)){\n\t\t \t\t\tcount = countTags.get(tagName) + 1.;\n\t\t \t\t\tcountTags.put(tagName, count);\n\t\t \t\t}\n\t\t \t\telse if(tagName.matches(\"^[a-zA-Z:]+\"))\n\t\t \t\t\t\tcountTags.put(tagName, 1.);\n\t\t \t}\n\t\t }\n\t\t public void tail(Node node, int depth) {\n\t\t }\n\t\t});\t\n\t\t\t\n\t}", "public void print_words_per_label_count() {\n\t\tSystem.out.println(\"SPORTS=\" + m_sports_word_count);\n\t\tSystem.out.println(\"BUSINESS=\" + m_business_word_count);\n\t}", "public int getFreq() {\n return freq_;\n }", "protected void setup(Mapper<Text, Text, Text, Text>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tInputStream is = this.getClass().getResourceAsStream(\"ArticleCounts\");\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is)); //Open text\t\t\t\t\n\n String line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] splitter = line.split(\"\\t\");\t\t\n\t\t\t\tprofessionCount.put(splitter[0], Integer.parseInt(splitter[1])); \n\t\t\t\ttotalCount += Integer.parseInt(splitter[1]);\n\t\t\t}\n\t\t\tsuper.setup(context);\n\t\t}", "private void setup() {\n Collections.sort(samples);\n this.pos = 0;\n }", "private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }", "@Test\r\n\tpublic void setFrequency() {\r\n\t\tWeldJoint<Body> wj = new WeldJoint<Body>(b1, b2, new Vector2());\r\n\t\t\r\n\t\twj.setFrequency(0.0);\r\n\t\tTestCase.assertEquals(0.0, wj.getFrequency());\r\n\t\t\r\n\t\twj.setFrequency(1.0);\r\n\t\tTestCase.assertEquals(1.0, wj.getFrequency());\r\n\t\t\r\n\t\twj.setFrequency(29.0);\r\n\t\tTestCase.assertEquals(29.0, wj.getFrequency());\r\n\t}", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public void countStats(String chr, String gene, String geneid, String type){\r\n if(!chr.equals(this.chr) && this.chr != null){\r\n this.printOut(this.chr);\r\n this.counter = new HashMap<>();\r\n System.gc();\r\n this.chr = chr;\r\n }else if(this.chr == null){\r\n this.chr = chr;\r\n }\r\n \r\n \r\n if(!this.counter.containsKey(gene))\r\n this.counter.put(gene, new HashMap<>());\r\n \r\n if(!this.counter.get(gene).containsKey(geneid))\r\n this.counter.get(gene).put(geneid, new HashMap<>());\r\n \r\n if(this.ClassExists(type)){\r\n if(!this.counter.get(gene).get(geneid).containsKey(type))\r\n this.counter.get(gene).get(geneid).put(type, 0);\r\n \r\n this.counter.get(gene).get(geneid).put(type, this.counter.get(gene).get(geneid).get(type) + 1);\r\n } \r\n }", "@Override \n\t\tprotected void setup(Mapper<Object, Text, Text, NullWritable>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\ttypeSet.add('1');typeSet.add('2');typeSet.add('3');\n\t\t\ttypeSet.add('4');typeSet.add('8');typeSet.add('9');\n\t\t}", "public static Map mapearFreqObj(List objetos) {\r\n Map<String, Integer> contFreq = new HashMap<>();\r\n Iterator<Integer> it = objetos.iterator();\r\n while (it.hasNext()) {\r\n Object obj = it.next();\r\n int frequency = Collections.frequency(objetos, obj);\r\n contFreq.put(String.valueOf(obj), frequency);\r\n }\r\n\r\n return contFreq;\r\n\r\n }", "public static void main(String[] args) {\n Scanner inputScanner = new Scanner(System.in);\n System.out.println(\"Enter the filename to be used as the text:\");\n String file = inputScanner.nextLine();\n \n // Read in text from file\n String text = new String();\n try (BufferedReader reader = new BufferedReader(new FileReader(file))) {\n StringBuilder sb = new StringBuilder();\n String line = reader.readLine();\n \n while (line != null) {\n sb.append(line);\n line = reader.readLine();\n }\n text = sb.toString();\n }\n catch (Exception e) {\n System.out.println(e.toString());\n System.exit(-1);\n }\n \n // Preprocessing.\n long startTime = System.nanoTime();\n BWT L = new BWT(text);\n SuffixArray SA = new SuffixArray(text);\n WaveletTree WT = new WaveletTree(L.getBWT());\n \n // Obtain the alphabet of the text.\n HashSet<Character> textAlphabet = new HashSet<>();\n for (int i = 0; i < text.length(); i++) {\n textAlphabet.add(text.charAt(i));\n }\n \n System.out.println(\"The size of the alphabet of the text is \" + textAlphabet.size());\n \n // Compute the C mapping.\n Hashtable<Character, Integer> C = new Hashtable<>();\n for (Character c : textAlphabet) {\n // Add the character if it isn't already present.\n if (!C.contains(c))\n C.put(c, 0);\n \n // Iterate over the text, computing C.\n for (int i = 0; i < text.length(); i++) {\n if (text.charAt(i) < c) {\n C.put(c, C.get(c) + 1);\n }\n }\n }\n \n long endTime = System.nanoTime();\n long duration = (endTime - startTime);\n \n System.out.println(\"Construction time: \" + duration/1000000);\n \n // Search for patterns forever.\n Scanner input = new Scanner(System.in);\n String pattern = null;\n while (true) {\n System.out.println();\n System.out.println(\"Enter a pattern:\");\n pattern = input.nextLine();\n\n // Run the algorithm a hundred times to get a reasonable time value.\n startTime = System.nanoTime();\n int sp = 0;\n int ep = 0;\n for (int repeat = 0; repeat < 1000; repeat++) {\n // All values are prepared for the search.\n int i = pattern.length();\n sp = 1;\n ep = L.getBWT().length();\n while (sp <= ep && i >= 1) {\n char c = pattern.charAt(i-1);\n sp = C.get(c) + WT.occ(WT.getRoot(), sp - 1, c) + 1;\n ep = C.get(c) + WT.occ(WT.getRoot(), ep, c);\n i--;\n }\n }\n \n endTime = System.nanoTime();\n duration = (endTime - startTime);\n \n if (ep < sp)\n System.out.println(\"Pattern not found.\");\n else\n System.out.println(\"<sp, ep> pair is <\" + sp + \", \" + ep + \">\");\n\n// for (int j = sp; j <= ep; j++) {\n// System.out.println(SA.getSuffixArray().get(j-1).toString());\n// }\n \n System.out.println();\n System.out.println(\"The text length is \" + text.length());\n System.out.println(\"The pattern length is \" + pattern.length());\n System.out.println(\"1000 repetitions of the search took \" + duration/1000000 + \" milliseconds.\");\n }\n }", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "private void collectTripFrequencyDistribution(Map<Integer, HouseholdType> householdTypeBySampleId) {\n initializeFrequencyArrays(householdTypeBySampleId);\n fillFrequencyArrays(householdTypeBySampleId);\n }", "public void createCounters() {\n // COUNTERS CREATION //\n //create a new counter for the blocks.\n this.blockCounter = new Counter();\n //create a new counter for the blocks.\n this.ballCounter = new Counter();\n }", "public Node(char character, int frequency){\n\t\tthis.character = character;\n\t\tthis.frequency = frequency;\n\t}", "public HitCounter() {\n q = new ArrayDeque();\n map = new HashMap();\n PERIOD = 300;\n hits = 0;\n }" ]
[ "0.58370566", "0.5634235", "0.5624092", "0.56218415", "0.56109446", "0.56010085", "0.55967414", "0.55844814", "0.5571531", "0.55479705", "0.55228394", "0.54576695", "0.5450636", "0.5432784", "0.54266495", "0.5386584", "0.53857654", "0.5362343", "0.5361938", "0.5353834", "0.53515637", "0.53312945", "0.53206456", "0.5305617", "0.5299062", "0.52943134", "0.528074", "0.5260774", "0.52535367", "0.52509016", "0.5247473", "0.52399254", "0.52330285", "0.5230197", "0.5214179", "0.51840687", "0.5178807", "0.5170757", "0.5156339", "0.5149413", "0.5131576", "0.51305133", "0.5126354", "0.5115097", "0.5103332", "0.5100479", "0.509792", "0.50959384", "0.5093767", "0.509012", "0.50761664", "0.5075719", "0.50756913", "0.50751984", "0.50711936", "0.50704753", "0.5062279", "0.50534576", "0.50490624", "0.50454897", "0.50429726", "0.5042366", "0.5042038", "0.5024563", "0.5017522", "0.5009618", "0.5008468", "0.50039506", "0.50019664", "0.5001487", "0.49797264", "0.49789888", "0.49789", "0.4970859", "0.49631295", "0.49621633", "0.4960914", "0.49592835", "0.49589926", "0.49469727", "0.4946545", "0.4945417", "0.49421555", "0.49402073", "0.49362168", "0.49208388", "0.49065465", "0.48998612", "0.48909482", "0.4883765", "0.48776042", "0.4877514", "0.48736763", "0.48686972", "0.48671293", "0.48618332", "0.48566958", "0.48504215", "0.48467684", "0.48435906", "0.48237398" ]
0.0
-1
Pre : Takes another structure of a collection to compare to.Great compareTo comment! Post : Compares the two structures' frequency. If other onehas higher frequency then return negative value, if other is lower, returnpositive value. If they have same frequency then return 0.
public int compareTo(HuffmanNode other){ if(other.freq > freq){ return -1; } else if (other.freq < freq){ return 1; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic int compareTo(ItemFrequency o) {\n\t\t\treturn this.frequency-o.frequency;\n\t\t}", "@Override\r\n\tpublic int compareTo(TagFreq otherTagFreq) {\r\n\t\t\r\n\t\t// Return the comparison result \r\n\t\treturn this.getFreq() - otherTagFreq.getFreq();\r\n\t}", "@Override\n\tpublic int compareTo(Neuron o) {\n\t\tif (this.freq > o.freq) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "@Override\n\tpublic int compareTo(indexFreqPair o) {\n\t\tif (_freq < o.getFreq()) {\n\t\t\treturn -1;\n\t\t}\n\t\telse if (_freq == o.getFreq()) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn 1;\n\t\t}\n\t}", "public int compareTo(Object o)\n\t{\n\t\treturn frequency - ((HuffmanNode)o).frequency();\n\t}", "public int compare(Object a, Object b) {\n if (a == b) {\n return 0;\n }\n CountedObject ca = (CountedObject)a;\n CountedObject cb = (CountedObject)b;\n int countA = ca.count;\n int countB = cb.count;\n if (countA < countB) {\n return 1;\n }\n if (countA > countB) {\n return -1;\n }\n return 0;\n }", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic int compareTo(HuffmanTree otherTree) {\r\n\t\treturn super.getRoot().getElement().getFrequency() - ((HuffmanPair) otherTree.getRoot().getElement()).getFrequency();\r\n\t}", "@Override\n\tpublic int compareTo(TreeNode o) {\n\t\treturn this.frequency - o.frequency;\n\t}", "@Override\n public int compare(WordEntity firstWordEntity, WordEntity secondWordEntity) {\n if (firstTheWordIsLessFrequentlyRepeatedThanTheSecond(\n firstWordEntity, secondWordEntity))\n return THAT_THE_FIRST_WORD_HAS_LOWER_FREQUENCY; // greater than\n\n if (firstTheWordIsMoreFrequentlyRepeatedThanTheSecond(\n firstWordEntity, secondWordEntity))\n return THAT_THE_FIRST_WORD_HAS_HIGHER_FREQUENCY; // less than\n\n // equal to\n // same frequency\n // sort alphabetically\n return frequenciesAreSameLetsSortThemByWordsAlphabetically(\n firstWordEntity, secondWordEntity);\n }", "public int compareTo(HDNode tree) {\n return frequency - tree.frequency;\n }", "@Override\n public int compareTo(Word other){\n int value = other.Count()-this.Count();\n if (value == 0) return 1;\n return value;\n }", "public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n return aWeight - bWeight;\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "public int compare(Object o1, Object o2) {\n TrigramsOcurrence lo1 = (TrigramsOcurrence) o1;\n TrigramsOcurrence lo2 = (TrigramsOcurrence) o2;\n return lo2.getFrequency() - lo1.getFrequency();\n }", "@Override\n\tpublic int compare(Object arg0, Object arg1) {\n\t\tWordCount wc1 = (WordCount) arg0;\n\t\tWordCount wc2 = (WordCount) arg1;\n\t\t\n\t\tif(wc1.count > wc2.count){\n\t\t\treturn -1;\n\t\t}\n\t\telse if(wc1.count < wc2.count){\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "@Override\n public int compare(CostVector o1, CostVector o2) {\n int i = 0;\n while (i < o1.getCosts().length && o1.getCosts()[i] == o2.getCosts()[i]) {\n i++;\n }\n if (i != o1.getCosts().length) {\n return o1.getCosts()[i] > o2.getCosts()[i] ? 1 : -1;\n } else {\n return 0;\n }\n }", "@Override\r\n public int compare(searchNode e1, searchNode e2) {\r\n //if node 1 has a a lower FScore than node 2, return -1 which will put e1 BEFORE e2\r\n if (e1.getFScore() < e2.getFScore()) {\r\n return -1;\r\n }\r\n //if node 1 has a higher FScore than node 2, return 1 which will put e2 BEFORE e1\r\n if (e1.getFScore() > e2.getFScore()) {\r\n return 1;\r\n }\r\n //else return they are same whichw ill keep order same\r\n return 0;\r\n }", "@Override\n public int compareTo(Score other) {\n return (int) (100 * (this.getAsDouble() - other.getAsDouble()));\n }", "@Override\n\t\tpublic int compare(final Collection<?> first, final Collection<?> second)\n\t\t{\n\t\t\tif( first.size() < second.size() )\n\t\t\t\treturn -1;\n\t\t\telse if( first.size() > second.size() )\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "@Override\n\t//o1 > o2 如果返回正数则 升序。\n\tpublic int compare(Subject o1, Subject o2) {\n\t\tint ret = 1;\n\t\tif(o1.getRatingNum() > o2.getRatingNum()){\n\t\t\t//键入中文的负号,竟然是一个运行时错误。\n\t\t\tret = -1;\n\t\t}else if(o1.getRatingNum() == o2.getRatingNum()){\n\t\t\tret = 0;\n\t\t}\n\t\treturn ret;\n\t\t//下一句有double类型的舍入误差。\n\t\t//return (int) (o1.getRatingNum() - o2.getRatingNum());\n\t}", "public int compare(identified_crystal a, identified_crystal b) \n\t { \n\n\t \treturn a.rating - b.rating; \n\t }", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic int compareTo(ListElements arg0) {\n\t\tint compareQuantity = ((ListElements) arg0).getScore(); \r\n\t\t \r\n\t\t//ascending order\r\n\t\treturn this.score - compareQuantity;\r\n\t}", "public int compare(Edge a, Edge b) {\n // for ascending\n return a.weight - b.weight;\n\n // for descending\n // return b.weight - a.weight;\n }", "@Override\n\t\t public int compare(Map<String, Object> o1,Map<String, Object> o2) {\n\t\t\t int countO1 = Integer.valueOf(o1.get(\"count\").toString());\n\t\t\t int countO2 = Integer.valueOf(o2.get(\"count\").toString());\n\t\t\t double distanceO1 = Double.valueOf(o1.get(\"distance\").toString());\n\t\t\t double distanceO2 = Double.valueOf(o2.get(\"distance\").toString());\n\t\t\t\t\t\n\t\t\t //先排距离,再排接单数\n\t\t\t if(distanceO1 < distanceO2){\n\t\t\t\t return -1;\n\t\t\t }else if(countO1 < countO2){\n\t\t\t\t return -1;\n\t\t\t }else return 0;\n\t\t }", "@Override\n\t\t\t\tpublic int compare(Pair o1, Pair o2) {\n\t\t\t\t\tif(o1.getAvg() - o2.getAvg() > 0){\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}else if(o1.getAvg() - o2.getAvg() < 0){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}", "public int compare(ArrayList<Object> obj1, ArrayList<Object> obj2) {\n if (obj1.get(0).equals(obj2.get(0))) {\n return (int) Math.ceil((Double) obj1.get(1) - (Double) obj2.get(1));\n }\n // higher BV first\n return (int) Math.ceil((Double) obj2.get(0) - (Double) obj1.get(0));\n }", "public int compareTo(ResourceCollection other) {\n if (this.brick == other.getBrick() &&\n this.lumber == other.getLumber() &&\n this.wool == other.getWool() &&\n this.grain == other.getGrain() &&\n this.ore == other.getOre()) {\n return 0;\n } else if (this.brick < other.getBrick() ||\n this.lumber < other.getLumber() ||\n this.wool < other.getWool() ||\n this.grain < other.getGrain() ||\n this.ore < other.getOre()) {\n return -1;\n } else return 1;\n }", "@Test\n public void compareFunctionalBigger() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p2);\n \n assertEquals(-1, a);\n\n }", "@Override\n public int compare(Sample s1, Sample s2) {\n if (s1.positive_features.size() < s2.positive_features.size())\n return -1;\n else if (s1.positive_features.size() > s2.positive_features.size())\n return +1;\n else {\n for (int i = 0; i < s1.positive_features.size(); i++) {\n int v1 = s1.positive_features.get(i);\n int v2 = s2.positive_features.get(i);\n if (v1 < v2) return -1;\n if (v1 > v2) return +1;\n }\n return 0;\n }\n }", "@Override\r\n\tpublic int compareTo(StudentCollection o) {\n\t\treturn this.marks>o.marks?-1:(this.marks<o.marks?1:0);\r\n\t}", "public int compare(Goods o1,Goods o2) {\n\t\treturn o1.getFav() - o2.getFav();\n\t}", "public int compare(Photograph a, Photograph b) {\n int returnVal = a.getCaption().compareTo(b.getCaption());\n if (returnVal != 0) {\n return returnVal;\n }\n returnVal = b.getRating() - a.getRating();\n return returnVal; \n }", "@Override\n public int compareTo(Record o) {\n if (this.result - o.result > 0) {\n return 1;\n } else if (this.result - o.result < 0) {\n return -1;\n } else {\n // press time: the less, the better.\n if (this.pressTime < o.pressTime) {\n return 1;\n } else if (this.pressTime > o.pressTime) {\n return -1;\n } else {\n // total times: the more, the better.\n if (this.totalTimes > o.totalTimes) {\n return 1;\n } else if (this.totalTimes < o.totalTimes) {\n return -1;\n }\n return 0;\n }\n }\n }", "@Override\n\tpublic int compareTo(FreqLocKey o)\n\t{\n\t\tif (this.cityId > o.cityId)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\telse if (this.cityId < o.cityId)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.freq > o.freq)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (this.freq < o.freq)\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.pci > o.pci)\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (this.pci < o.pci)\n\t\t\t\t{\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "public static int compare(double obj1,double obj2){\n\t\tif(obj1 == obj2) { return 0; }\n\t\telse if(obj1 > obj2){\n\t\t\treturn 1;\n\t\t} else{ return -1; }\n\t}", "@Test\n public void compareFunctionalSmaller() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p2, p1);\n \n assertEquals(1, a);\n }", "@Override\n\tpublic int compare(HashMap<K, V> a, HashMap<K, V> b) {\n\t\tint comparison = 0;\n\t\tint counter = 0;\n\t\t/*\n\t\t * If the first keyToSortWith is the same in both HashMaps, sort by the\n\t\t * next keyToSortWith\n\t\t */\n\t\twhile ((comparison == 0) && (counter < keysToSortWith.length)) {\n\t\t\tcomparison = a.get(keysToSortWith[counter]).compareTo(\n\t\t\t\t\tb.get(keysToSortWith[counter]));\n\t\t\tcounter++;\n\t\t}\n\t\t/*\n\t\t * If the current keyToSortWith is supposed to be sorted negatively\n\t\t * (according to the reverse array), returns the opposite result\n\t\t */\n\t\tif (reverse[counter - 1] == true) {\n\t\t\treturn comparison * (-1);\n\t\t}\n\t\treturn comparison;\n\t}", "@Override\r\n\tpublic int compareTo(CandidateDoc o) {\n\t\tif((score-o.score)>0)\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}else if((score-o.score)<0)\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}else\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t}", "@Override\n\t\t\tpublic int compare(Map.Entry<T, Integer> e1, Map.Entry<T, Integer> e2)\n\t\t\t{\n\n\t\t\t\treturn - (e1.getValue() - e2.getValue());\n\t\t\t}", "@Override\n\t\tpublic int compare(Object a, Object b) {\n\t\t\tif(hm.get(a)>hm.get(b))\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t}", "public int compare(ListNode o1, ListNode o2) {\n return o1.val-o2.val;\n }", "public int compareTo (HuffmanNode node) {\n \tif(this.totalFrequency < node.totalFrequency)\n \t\treturn -1;\n \telse if(this.totalFrequency > node.totalFrequency)\n \t\treturn 1;\n \telse\n \t\tif(this.tokens.get(0).getValue() < node.tokens.get(0).getValue())\n \t\t\treturn -1;\n \t\telse if(this.tokens.get(0).getValue() > node.tokens.get(0).getValue())\n \t\t\treturn 1;\n \treturn 0;\n }", "@Override\r\n\t//按权重大小排序\r\n\tpublic int compareTo(Domain o) {\n\t\treturn (o.weight-this.weight);\r\n\t}", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "@Override\n public int compareTo(final DistributionMember o) {\n // This is the most important bit.\n if (!getValue().equals(o.getValue())) return (int) Math.signum(o.getValue() - getValue());\n // The rest is arbitrary and just designed to keep non-identical DistributionMembers from being equal\n final List<Double> fitVals = getFitnessValues();\n final List<Double> otherVals = o.getFitnessValues();\n for (int i = 0; i < fitVals.size(); ++i) {\n if (!fitVals.get(i).equals(otherVals.get(i))) return (int) Math.signum(otherVals.get(i) - fitVals.get(i));\n }\n final Genotype g = getGenotype();\n final Genotype og = o.getGenotype();\n return g.compareTo(og);\n }", "public int compare(Object o1, Object o2) {\n int[] p1 = (int[]) o1;\n int[] p2 = (int[]) o2;\n\n // compare sum of axis distances for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int dist1 = 0, dist2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n dist1 += distance(i, p1[i]);\n dist2 += distance(i, p2[i]);\n }\n }\n int diff = dist1 - dist2;\n if (diff != 0) return diff;\n }\n\n // compare number of diverging axes for each priority\n for (int p=MAX_PRIORITY; p>=MIN_PRIORITY; p--) {\n int div1 = 0, div2 = 0;\n for (int i=0; i<p1.length; i++) {\n if (priorities[i] == p) {\n if (p1[i] != 0) div1++;\n if (p2[i] != 0) div2++;\n }\n }\n int diff = div1 - div2;\n if (diff != 0) return diff;\n }\n\n return 0;\n }", "@Override\n\tpublic int compare(Assignment a1, Assignment a2) {\n\t\tif (a1.weight > a2.weight && a1.deadline < a2.deadline) return -1;\n\t\tif (a1.weight > a2.weight && a1.deadline > a2.deadline) return 1;\n\t\tif (a1.weight < a2.weight && a1.deadline < a2.deadline) return -1;\n\t\tif (a1.weight < a2.weight && a1.deadline > a2.deadline) return 1;\n\t\tif (a1.weight == a2.weight && a1.deadline < a2.deadline) return -1;\n\t\tif (a1.weight == a2.weight && a1.deadline > a2.deadline) return 1;\n\t\tif (a1.weight < a2.weight) return 1;\n\t\tif (a1.weight > a2.weight) return -1;\n\t\treturn 0;\n\t}", "@Override\n public int compare(Object arg0, Object arg1) {\n int a = arg0.hashCode();\n int b = arg1.hashCode();\n int accum;\n if (a == b) {\n accum = 0;\n } else if (a > b) {\n accum = 1;\n } else {\n accum = -1;\n }\n return accum;\n }", "public int compare(Prototype one, Prototype two)\r\n {\r\n double one_d = Distance.d(basePrototype, one);\r\n double two_d = Distance.d(basePrototype, two);\r\n if (one_d > two_d)\r\n {\r\n return 1;\r\n } else if (one_d == two_d)\r\n {\r\n return 0;\r\n } else\r\n {\r\n return -1;\r\n }\r\n }", "public int compare1(Student o1, Student o2)\r\n\t\t\t\t\t{\n\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}", "public int compare(IntegerLastTriple<Integer, Semester> a, IntegerLastTriple<Integer, Semester> b) {\n if(!a.type1.equals(b.type1)) return a.type1.intValue()-b.type1.intValue();\n \n return a.type2.ordinal()-b.type2.ordinal();\n }", "public int compare(Solution f1, Solution f2) {\n \t\t\t\treturn f1.f - f2.f;\n \t\t\t}", "public static int compare(IndexFingerprint f1, IndexFingerprint f2) {\n int cmp;\n\n // NOTE: some way want number of docs in index to take precedence over highest version (add-only\n // systems for sure)\n\n // if we're comparing all of the versions in the index, then go by the highest encountered.\n if (f1.maxVersionSpecified == Long.MAX_VALUE) {\n cmp = Long.compare(f1.maxVersionEncountered, f2.maxVersionEncountered);\n if (cmp != 0) return cmp;\n }\n\n // Go by the highest version under the requested max.\n cmp = Long.compare(f1.maxInHash, f2.maxInHash);\n if (cmp != 0) return cmp;\n\n // go by who has the most documents in the index\n cmp = Long.compare(f1.numVersions, f2.numVersions);\n if (cmp != 0) return cmp;\n\n // both have same number of documents, so go by hash\n cmp = Long.compare(f1.versionsHash, f2.versionsHash);\n return cmp;\n }", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "@Override\n public int compare(Edge edge1, Edge edge2) {\n return Integer.compare(edge1.weight, edge2.weight);\n }", "@Override\r\n\tpublic int compare(Map.Entry<Integer, Integer> o1,\r\n\t\t\tMap.Entry<Integer, Integer> o2) {\n\t\treturn o2.getValue() - o1.getValue();\r\n\t}", "@Override\n public int compareTo(Medarbejder o) {\n return antalSager() - o.antalSager();\n }", "@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\treturn o1.weight - o2.weight;\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\tif (o1.weight < o2.weight)\n\t\t\t\t\treturn -1;\n\t\t\t\telse if (o1.weight > o2.weight)\n\t\t\t\t\treturn 1;\n\t\t\t\telse\n\t\t\t\t\treturn 0;\n\t\t\t}", "@Override\n public int compare(Student s1, Student s2) {\n return (int)(1000*(s2.getGPA()-s1.getGPA()));\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "@Override\n public int compare(Recognition lhs, Recognition rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public int compare(Movie a, Movie b) {\n\t\tdouble aRating = a.computeRating();\n\t\tdouble bRating = b.computeRating();\n\t\tif (aRating>bRating)\n\t\t\treturn -1;\n\t\telse if (aRating<bRating)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}", "@Override\r\n\tpublic int compareTo(Double another) {\n\t\treturn 0;\r\n\t}", "public int compare(Itemset o1, Itemset o2) {\n long time1 = o1.getTimestamp();\n long time2 = o2.getTimestamp();\n if (time1 < time2) {\n return -1;\n }\n return 1;\n }", "@Override\r\n\tpublic int compare(WaterBottle o1, WaterBottle o2) {\n\t\treturn o1.weight-o2.weight;\r\n\t}", "public static int compare(Vertex first, Vertex second) {\n if(first.getKey() == second.getKey())\n return 0;\n else if(first.getKey() >= second.getKey())\n return 1;\n else\n return -1;\n }", "@Override\n public int compare(Query e1, Query e2) {\n if (e1.getFreq() < e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) > 0))\n return this.LESS;\n else if (e1.getFreq() > e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) < 0))\n return this.GREATER;\n return this.EQUAL;\n }", "@Override\n\tpublic int compare(Store o1, Store o2) {\n\t\treturn (int) (o2.getAveStar()*10 - o1.getAveStar()*10 );\n\t}", "public int compareTo(WordCount other)\n {\n return word.compareTo(other.word);\n }", "@Override\n\t\tpublic int compare(Followee f1, Followee f2) {\n\t\t\tint count1 = f1.getCount();\n\t\t\tint count2 = f2.getCount();\n\n\t\t\tint compareCount = count2 - count1;\n\n\t\t\tif (compareCount != 0) {\n\t\t\t\treturn compareCount;\n\t\t\t}\n\n\t\t\t// Break ties by id in ascending order.\n\t\t\tint id1 = Integer.parseInt(f1.getId());\n\t\t\tint id2 = Integer.parseInt(f2.getId());\n\n\t\t\treturn id1 - id2;\n\t\t}", "@Override\n\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\tFloatWritable key1 = (FloatWritable) a;\n\t\tFloatWritable key2 = (FloatWritable) b;\n\n\t\t// Implemet sorting in descending order\n\t//\tint result = key1.get() < key2.get() ? 1 : key1.get() == key2.get() ? 0 : -1;\n\t\treturn -1 * key1.compareTo(key2);\n\t}", "@Override\r\n\tpublic int compareTo(NodeE o) {\n\t\tif (this.freq == o.getFreq()) {\r\n\t\t\tif (this.height == o.getHeight()) {\r\n\t\t\t\treturn this.getChar() - o.getChar();\r\n\t\t\t} else {\r\n\t\t\t\treturn this.height - o.getHeight();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn this.freq - o.getFreq();\r\n\t\t}\r\n\t}", "@Override\n public int compare(Score o1, Score o2) {\n\n return o1.getSentId() - o2.getSentId();\n }", "public int compare(E a, E b) {\n // Complete this method.\n\t\treturn -1 * ((Map.Entry<String,Integer>)a).getValue().compareTo(((Map.Entry<String,Integer>)b).getValue());\n }", "@Override\n\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\treturn guessCount[a - 1] - guessCount[b - 1];\n\t\t\t}", "@Override\r\n\t\t\t\t\t\t\tpublic int compare(GoodsSpecification gs1,\r\n\t\t\t\t\t\t\t\t\tGoodsSpecification gs2) {\n\t\t\t\t\t\t\t\treturn gs1.getSequence() - gs2.getSequence();\r\n\t\t\t\t\t\t\t}", "public int compare1(Student o1, Student o2)\r\n\t\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t\t}", "@Override\n\tpublic int compareTo(Edge o) {\n\t\t\n\t\treturn this.count>o.count?1:-1;\n\t}", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "@Override\n\t\t\tpublic int compare(ListNode o1, ListNode o2) {\n\t\t\t\treturn o1.val - o2.val;\n\t\t\t}", "@Override\n public int compare(Integer o1, Integer o2) {\n return map.get(o1)-map.get(o2);\n }", "@Override\n public int compareTo(AudioTrackScore other) {\n if (this.isWithinRendererCapabilities != other.isWithinRendererCapabilities) {\n return this.isWithinRendererCapabilities ? 1 : -1;\n }\n if (this.preferredLanguageScore != other.preferredLanguageScore) {\n return compareInts(this.preferredLanguageScore, other.preferredLanguageScore);\n }\n if (this.isWithinConstraints != other.isWithinConstraints) {\n return this.isWithinConstraints ? 1 : -1;\n }\n if (parameters.forceLowestBitrate) {\n int bitrateComparison = compareFormatValues(bitrate, other.bitrate);\n if (bitrateComparison != 0) {\n return bitrateComparison > 0 ? -1 : 1;\n }\n }\n if (this.isDefaultSelectionFlag != other.isDefaultSelectionFlag) {\n return this.isDefaultSelectionFlag ? 1 : -1;\n }\n if (this.localeLanguageMatchIndex != other.localeLanguageMatchIndex) {\n return -compareInts(this.localeLanguageMatchIndex, other.localeLanguageMatchIndex);\n }\n if (this.localeLanguageScore != other.localeLanguageScore) {\n return compareInts(this.localeLanguageScore, other.localeLanguageScore);\n }\n // If the formats are within constraints and renderer capabilities then prefer higher values\n // of channel count, sample rate and bit rate in that order. Otherwise, prefer lower values.\n int resultSign = isWithinConstraints && isWithinRendererCapabilities ? 1 : -1;\n if (this.channelCount != other.channelCount) {\n return resultSign * compareInts(this.channelCount, other.channelCount);\n }\n if (this.sampleRate != other.sampleRate) {\n return resultSign * compareInts(this.sampleRate, other.sampleRate);\n }\n if (Util.areEqual(this.language, other.language)) {\n // Only compare bit rates of tracks with the same or unknown language.\n return resultSign * compareInts(this.bitrate, other.bitrate);\n }\n return 0;\n }", "public int compareTo(DerivationElement o) {\n\t\treturn (this.logProb>o.logProb)? -1 : (this.logProb==o.logProb)? 0 : 1; \n\t }", "public int compare1(Student o1, Student o2)\r\n\t\t\t{\n\t\t\treturn 0;\r\n\t\t\t}", "public int compare1(Student o1, Student o2)\r\n\t\t\t{\n\t\t\treturn 0;\r\n\t\t\t}", "public int compare1(Student o1, Student o2)\r\n\t\t\t{\n\t\t\treturn 0;\r\n\t\t\t}", "@Override\r\n\t\t\t\t\t\t\t\t\tpublic int compare(GoodsSpecification gs1,\r\n\t\t\t\t\t\t\t\t\t\t\tGoodsSpecification gs2) {\n\t\t\t\t\t\t\t\t\t\treturn gs1.getSequence()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- gs2.getSequence();\r\n\t\t\t\t\t\t\t\t\t}", "@Override\n public int compareTo(Individual individual) {\n return individual.getFitness() - this.getFitness() ;\n }", "private int Compare(ResultsClass lhs, ResultsClass rhs) {\n if (lhs.bodyPart > rhs.bodyPart) {\n return 1;\n } else if (lhs.bodyPart > rhs.bodyPart) {\n return -1;\n } else {\n return 0;\n }\n }", "@Override\r\n\t\t\t\t\t\t\tpublic int compare(GoodsSpecification gs1, GoodsSpecification gs2) {\n\t\t\t\t\t\t\t\treturn gs1.getSequence() - gs2.getSequence();\r\n\t\t\t\t\t\t\t}", "@Override\n public int compare(Prediction lhs, Prediction rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public int compare(Company c1, Company c2) { \n if (c1.getMatching_price()<c2.getMatching_price()) {\n \treturn -1;\n }\n else if (c1.getMatching_price()>c2.getMatching_price()) {\n \treturn 1;\n }\n else {\n return 0; \n }\n }", "@Override\n\tpublic int compareTo(Object o) {\n\t\tDatum od=(Datum)o;\n\t\tdouble dif=size-od.size;\n\t\tif(dif != 0)\n\t\t\treturn (int)Math.signum(dif);\n\t\treturn id-od.id;\n\t}", "public int compareTo(Hand hand2) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn 0;\r\n\t}" ]
[ "0.72160345", "0.68916225", "0.66983694", "0.6668289", "0.6652069", "0.6608263", "0.65665156", "0.650111", "0.6487423", "0.64122707", "0.6381227", "0.6364516", "0.6347181", "0.6322448", "0.6294009", "0.62777394", "0.62775856", "0.62650573", "0.6260209", "0.6225887", "0.61572826", "0.6149607", "0.6109615", "0.6081334", "0.60787946", "0.6043189", "0.6021868", "0.6011849", "0.6005243", "0.5952288", "0.5949148", "0.5945278", "0.5914401", "0.5899341", "0.58914566", "0.5889677", "0.58877146", "0.5881222", "0.58793414", "0.5870957", "0.58668077", "0.5864664", "0.5828775", "0.5828191", "0.58191764", "0.5818054", "0.5817347", "0.58123153", "0.5810571", "0.5803029", "0.57929057", "0.57899404", "0.5785369", "0.5782176", "0.57795924", "0.5777676", "0.5776566", "0.5770291", "0.5753805", "0.57515144", "0.5744168", "0.574381", "0.574117", "0.5730354", "0.57263243", "0.5724737", "0.5723073", "0.5715814", "0.57155204", "0.5712585", "0.57124627", "0.5711786", "0.57114834", "0.5710873", "0.57096195", "0.57083625", "0.57054657", "0.5698946", "0.5694511", "0.56940687", "0.56919485", "0.5687498", "0.56829196", "0.5670351", "0.5662291", "0.56604075", "0.5659609", "0.5649603", "0.5648579", "0.5645905", "0.5645905", "0.5645905", "0.56421727", "0.56388426", "0.56379575", "0.5629569", "0.56293774", "0.5629354", "0.5628169", "0.5625573" ]
0.664627
5
Write your code here
public static void printAllPossibleCodes(String input) { String[] str=helper(input); for (int i=0;i<str.length;i++){ System.out.println(str[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public void ganar() {\n // TODO implement here\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "CD withCode();", "public void mo38117a() {\n }", "private stendhal() {\n\t}", "public void mo4359a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "Programming(){\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void furyo ()\t{\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void working()\n {\n \n \n }", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void baocun() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "private void kk12() {\n\n\t}", "public void mo55254a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "public void mo9848a() {\n }", "protected void mo6255a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void themesa()\n {\n \n \n \n \n }", "private void yy() {\n\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void perder() {\n // TODO implement here\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void oneUserExample()\t{\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void mo3376r() {\n }", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void cocinar(){\n\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo5382o() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "@Override\n public void execute() {\n \n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo21793R() {\n }", "public void mo12930a() {\n }", "private void test() {\n\n\t}", "public void mo6081a() {\n }", "static void feladat5() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo3749d() {\n }", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public final void cpp() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "void kiemTraThangHopLi() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void skystonePos5() {\n }", "@Override\n protected void execute() {\n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\n\tpublic void HowtoEat() {\n\t\tSystem.out.println(\"Fırında Ye!!\");\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}" ]
[ "0.6385412", "0.6283162", "0.60945076", "0.59701276", "0.5917703", "0.5879072", "0.5874719", "0.58703095", "0.58692765", "0.58551085", "0.5827088", "0.5824697", "0.5823", "0.57719165", "0.57705134", "0.57700306", "0.5768738", "0.5747882", "0.5739157", "0.5738211", "0.57291245", "0.5728749", "0.57221836", "0.57160825", "0.5710274", "0.5710274", "0.5704877", "0.56814647", "0.56814647", "0.56738055", "0.5652849", "0.56410664", "0.5630235", "0.56136215", "0.5607598", "0.56033254", "0.5599207", "0.55841464", "0.5578999", "0.55716944", "0.55657905", "0.5562858", "0.55565757", "0.5549942", "0.5546167", "0.5546167", "0.5546167", "0.5546167", "0.5546167", "0.5546167", "0.5546167", "0.55285555", "0.5526321", "0.5515395", "0.5515395", "0.55065227", "0.5504764", "0.55020475", "0.5501564", "0.5495489", "0.54879904", "0.5482253", "0.5478527", "0.547688", "0.54746103", "0.5473836", "0.54701126", "0.5465666", "0.5464225", "0.54597294", "0.54584956", "0.5458113", "0.5458053", "0.54535306", "0.54515857", "0.54495496", "0.5445335", "0.54453063", "0.54405046", "0.54404426", "0.543851", "0.5436857", "0.54310083", "0.54282975", "0.54267937", "0.5423911", "0.54202724", "0.5420155", "0.54184073", "0.5415943", "0.5414785", "0.5413108", "0.540349", "0.54009646", "0.54009646", "0.53950614", "0.5390329", "0.5389189", "0.53863525", "0.53842854", "0.53806734" ]
0.0
-1
This function adds an edge to the graph. An edge: (from, to).
void addEdge(int from, int to) { adjList.get(from).add(to); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addEdge(Node from, Node to);", "private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }", "void add(Edge edge);", "public void addEdge(int start, int end);", "public void addEdge(String from, String to) {\n Vertex v, w;\n if (hasEdge(from, to)) return; // no duplicate edges\n mNumEdges += 1;\n if ((v = getVertex(from)) == null)\n v = addVertex(from);\n if ((w = getVertex(to)) == null)\n w = addVertex(to);\n mAdjList.get(v).add(w);\n mAdjList.get(w).add(v); // undirected graph only\n }", "@Override\n public void addEdge(V from, V to)\n {\n\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n\n if (contains(from)){\n\n\t ArrayList <V> edges = getEdges(from);\n\n \t if (!edges.contains(to)){\n \t\t edges.add(to);\n graph.put(from, edges);\n \t }\n\t }\n\n \tif (!contains(from)){\n \t ArrayList <V> newEdge = new ArrayList<>();\n \t newEdge.add(to);\n \t graph.put(from, newEdge);\n \t}\n\n \tif (!contains(to)){\n \t ArrayList<V> e = new ArrayList<>();\n \t graph.put(to, e);\n \t}\n\n\n\n\n\n }", "public void addEdge(V from, V to) {\n Set<V> edges = new HashSet<>();\n edges.add(to);\n this.addEdges(from, edges);\n }", "public IEdge addEdge(String from, String to, Double cost);", "public Edge<V> addEdge(V source, V target);", "public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }", "void addEdge(int x, int y);", "public void addEdge(E e){\n\t\tedges.add(e);\n\t}", "public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }", "void addEdge(int source, int destination, int weight);", "public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}", "public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }", "public void addEdge(int start, int end, double weight);", "public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }", "public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}", "boolean addEdge(E edge);", "public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}", "public void addEdge(Edge e){\n edgeList.add(e);\n }", "public static void addEdge(List<List<Integer>> graph, int from, int to) {\n\t graph.get(from).add(to);\n\t graph.get(to).add(from);\n\t }", "public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}", "public static void addEdge(List<List<Integer>> graph, int from, int to) {\n graph.get(from).add(to);\n }", "public void addEdge(List<List<Integer>> graph, int from, int to) {\r\n graph.get(from).add(to);\r\n graph.get(to).add(from);\r\n }", "public abstract void addEdge(Point p, Direction dir);", "private void addEdge(int from, int to, int cost) {\r\n\t\tif (edges[from] == null)\r\n\t\t\tedges[from] = new HashMap<Integer, Integer>(INITIAL_MAP_SIZE);\r\n\t\tif (edges[from].put(to, cost) == null)\r\n\t\t\tnumEdges++;\r\n\t}", "void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }", "public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }", "public void addEdge(Edge e) {\r\n int v = e.from();\r\n int w = e.to();\r\n validateVertex(v);\r\n validateVertex(w);\r\n adj[v].add(e);\r\n indegree[w]++;\r\n E++;\r\n }", "public void addEdge(Edge e) {\n incident.add(e);\n }", "public void addEdge( VKeyT fromKey, VKeyT toKey, EDataT data )\n throws NoSuchVertexException;", "void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}", "public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }", "private void addEdge(int start, int end) {\n adjMatrix[start][end] = 1;\n // for undirected graph\n adjMatrix[end][start] = 1;\n }", "void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }", "public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }", "protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }", "public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }", "void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;", "void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}", "public void addEdge(int source, int destination) {\n adjacencyList.get(source).add(destination);\n adjMat[source][destination] = 1;\n //if graph is undirected graph, add u to v's adjacency list\n if (!isDirected) {\n adjacencyList.get(destination).add(source);\n adjMat[destination][source] = 1;\n }\n }", "public boolean addEdge(T beg, T end);", "private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }", "public boolean addEdge(T begin, T end, int weight);", "private Edge addEdge(Node source, Node dest, double weight)\r\n\t{\r\n\t final Edge newEdge = new Edge(edgeType, source, dest, weight);\r\n\t if (!eSet.add(newEdge))\r\n\t\tthrow new RuntimeException(\"Edge already exists!\");\r\n\t source.addEdge(newEdge);\n\t return newEdge;\r\n\t}", "@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}", "public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }", "public abstract boolean addEdge(Node node1, Node node2, int weight);", "public abstract boolean putEdge(Edge incomingEdge);", "public E addEdge(V tail, V head);", "public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }", "public void addEdge(int v1, int v2) {\n\t\tedges[v1][v2] = 1;\n\t\tedges[v2][v1] = 1;\n\t\tsize++;\n\t}", "void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}", "protected Edge<T> addEdge(final T object, final LineString line,\n final Point from, final Point to) {\n if (this.inMemory && getEdgeCount() >= this.maxEdgesInMemory) {\n this.edgeAttributesById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgeAttributesById);\n // TODO edgIds\n // TODO edgeIndex\n this.edgeLinesById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgeLinesById);\n this.edgeObjectsById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgeObjectsById);\n this.edgesById = BPlusTreeMap.createIntSeralizableTempDisk(this.edgesById);\n\n // TODO nodeIndex\n this.nodeAttributesById = BPlusTreeMap.createIntSeralizableTempDisk(this.nodeAttributesById);\n this.nodesById = BPlusTreeMap.createIntSeralizableTempDisk(this.nodesById);\n this.nodesIdsByCoordinates = BPlusTreeMap.createTempDisk(\n this.nodesIdsByCoordinates, new SerializablePageValueManager<Point>(),\n PageValueManager.INT);\n this.inMemory = false;\n }\n final Node<T> fromNode = getNode(from);\n final Node<T> toNode = getNode(to);\n final int edgeId = ++this.nextEdgeId;\n final Edge<T> edge = new Edge<T>(edgeId, this, fromNode, toNode);\n if (this.edgeLinesById != null) {\n this.edgeLinesById.put(edgeId, line);\n }\n this.edgeObjectsById.put(edgeId, object);\n this.edgesById.put(edgeId, edge);\n this.edgeIds.put(edge, edgeId);\n if (this.edgeIndex != null) {\n this.edgeIndex.add(edge);\n }\n this.edgeListeners.edgeEvent(edge, null, EdgeEvent.EDGE_ADDED, null);\n return edge;\n }", "public void addEdge(DrawView edge){\n drawnEdges.add(edge);\n }", "public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }", "public EdgeIntf addEdge( Vertex fromVertex, Vertex toVertex ) throws Exception {\r\n if( !isPath( toVertex, fromVertex ))\r\n return super.addEdge( fromVertex, toVertex );\r\n else\r\n throw new CycleException();\r\n }", "void addEdge(int x,int y) {\n adj[x].add(y);\n }", "public void addEdge(GeographicPoint from, GeographicPoint to, String roadName,\n\t\t\tString roadType, double length) throws IllegalArgumentException {\n\n\t\t//TODO: Implement this method in WEEK 3\n\t\t\n\t\tif (length < 0 || (!map.containsKey(from) || !map.containsKey(to)) || (from == null || to == null)) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tMapNode start = map.get(from);\n\t\tboolean added = start.addNeighbours(to, length, roadName, roadType);\n\t\tif (added) {\n\t\t\tnumEdges++;\n\t\t}\n\t}", "public void addEdge(int v1, int v2) {\r\n\t\tadjList[v1].add(v2);\r\n\t}", "public void addEdge(int v1, int v2) {\r\n addEdge(v1, v2, null);\r\n }", "public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }", "public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }", "@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }", "@Override\n\tpublic boolean addEdge(ET edge)\n\t{\n\t\tif (edge == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (edgeList.contains(edge))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tList<N> graphNodes = edge.getAdjacentNodes();\n\t\tfor (N node : graphNodes)\n\t\t{\n\t\t\taddNode(node);\n\t\t\tnodeEdgeMap.get(node).add(edge);\n\t\t}\n\t\tedgeList.add(edge);\n\t\tgcs.fireGraphEdgeChangeEvent(edge, EdgeChangeEvent.EDGE_ADDED);\n\t\treturn true;\n\t}", "public void addEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \tfor (Edge e : myAdjLists[v1]) {\n \t\tif (e.to() == v2) {\n \t\t\te.setObjectInfo(edgeInfo);\n \t\t\treturn;\n \t\t}\n \t}\n \tEdge toAdd = new Edge(v1, v2, edgeInfo);\n \tmyAdjLists[v1].add(toAdd);\t\n }", "public boolean addEdge(Edge edge) {\r\n\t\treturn true;\r\n\t}", "public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }", "public void addEdge(int source, int destination, int roadCost)\n\t\t{\n\t\t\tEdge edge = new Edge(source, destination, roadCost);\n\t\t\tallEdges.add(edge);\n\t\t}", "public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}", "void addEdge(int vertex1, int vertex2){\n adjList[vertex1].add(vertex2);\n adjList[vertex2].add(vertex1);\n }", "public void addEdge(int source, int target, Cost w) {\n\t\tedges[source][target] = w;\n\t}", "Edge createEdge(Vertex src, Vertex tgt, boolean directed);", "Edge(Node from,Node to, int length){\n this.source=from;\n this.destination=to;\n this.weight=length;\n }", "public void addEdge(T source, T destination, Path length) {\n\t\tif (source == null || destination == null) {\n\t\t\tthrow new NullPointerException(\n\t\t\t\t\t\"Source and Destination, both should be non-null.\");\n\t\t}\n\t\tif (!graph.containsKey(source) || !graph.containsKey(destination)) {\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"Source and Destination, both should be part of graph\");\n\t\t}\n\t\t/* A node would always be added so no point returning true or false */\n\t\tgraph.get(source).put(destination, length);\n\t}", "int addEdge(int tail, int head);", "boolean addEdge(V v, V w);", "public void addEdge(Edge edge) {\n\t\tthis.edges.add(edge);\n\t\tnrOfEdges++;\n\t}", "public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}", "public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }", "private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }", "public void addEdge(Vertex start, Vertex finish) {\n\t\t// add vertices start and/or finish if not in graph\n\t\tif(!vertices.containsKey(start)) this.addVertex(start);\n\t\tif(!vertices.containsKey(finish)) this.addVertex(finish);\n\t\t\n\t\tEdge e = new Edge(start, finish, parent);\n\t\tedges.add(e);\n\t\t// add to set of edges in Vertex start\n\t\tstart.addEdge(e);\n\t\t// and to finish, since this graph is undirected\n\t\tfinish.addEdge(e);\n\t}", "void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}", "@Override\n public void addEdge(E pEdge, TimeFrame tf) {\n \n // If The Edge ID is not initialized yet, initalialize it\n if (pEdge.getId() < 0) {\n int id = edgeIdGen.getNextAvailableID();\n pEdge.setId(id);\n mapAllEdges.add(id, pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() edge (id, mapAllEdges.size) = \" + id + \", \" + mapAllEdges.size());\n }\n // Adding to the adjacent list\n if (!darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).add(pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() ading to darrGlobalAdjList \");\n if(!pEdge.isDirected() &&\n !darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).add(pEdge);\n }\n }\n \n hmpGraphsAtTimeframes.get(tf).addEdge(pEdge);\n \n }", "protected void addEdge(CyEdge edge) {\n\tLayoutEdge newEdge = new LayoutEdge(edge);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }", "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 addDirectedEdge(String startVertex, String endVertex, int cost)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.adjacencyMap.get(startVertex).put(endVertex, cost);\r\n\t}", "public void addEdge(String node1, String node2) {\n\r\n LinkedHashSet<String> adjacent = map.get(node1);\r\n// checking to see if adjacent node exist or otherwise is null \r\n if (adjacent == null) {\r\n adjacent = new LinkedHashSet<String>();\r\n map.put(node1, adjacent);\r\n }\r\n adjacent.add(node2); // if exist we add the instance node to adjacency list\r\n }", "public void addEdge(StubEdge e) {\n }", "protected void addEdge(int src, int dest) {\n\t\tthis.adjListArray[src].add(dest);\n\t}", "void addEdge(JNode edge) {\n List<JNode> newEdges = this.getEdges();\n newEdges.add(edge);\n this.setEdges(newEdges);\n }", "public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }", "public void addEdge(Graph graph, int source, int destination, double weight){\r\n\r\n Node node = new Node(destination, weight);\r\n LinkedList<Node> list = null;\r\n\r\n //Add an adjacent Node for source\r\n list = adjacencyList.get((double)source);\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)source, list);\r\n\r\n //Add adjacent node again since graph is undirected\r\n node = new Node(source, weight);\r\n\r\n list = null;\r\n\r\n list = adjacencyList.get((double)destination);\r\n\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)destination, list);\r\n }", "protected void addEdge(IEdge edge) {\n\n if (edge != null) {\n\n this.ids.add(edge.getID());\n this.edgeMap.put(edge.getID(), edge);\n }\n }", "public void addEdge( Edge edge ) {\r\n if ( edge == null ) return;\r\n edges.addElement(edge);\r\n }", "public Edge(Node from, Node to) {\n fromNode = from;\n toNode = to;\n }", "public DotGraphEdge drawEdge(String from, String to) {\n DotGraphNode src = drawNode(from);\n DotGraphNode dst = drawNode(to);\n DotGraphEdge edge = new DotGraphEdge(src, dst);\n\n this.drawElements.add(edge);\n\n return edge;\n }", "public void addEdge(String n1, String n2) {\n if (!this.graph.containsKey(n1)) {\n addNode(n1);\n }\n if (!this.graph.containsKey(n2)) {\n addNode(n2);\n }\n Edgeq edge = new Edgeq(n1, n2);\n this.graph.get(n1).add(edge);\n\n edge = new Edgeq(n2, n1);\n this.graph.get(n2).add(edge);\n }" ]
[ "0.8776889", "0.83002746", "0.7981467", "0.7950227", "0.7933432", "0.79071224", "0.7876585", "0.7846684", "0.77978736", "0.7752935", "0.77142614", "0.7701142", "0.76850456", "0.76790893", "0.7635966", "0.7606735", "0.75526696", "0.75353545", "0.7473504", "0.74667823", "0.74624926", "0.7444899", "0.74264205", "0.73988533", "0.737695", "0.7371454", "0.73707014", "0.73108846", "0.72898", "0.72816527", "0.72607446", "0.724837", "0.7241851", "0.7231588", "0.7203487", "0.7182173", "0.7151344", "0.70950854", "0.7086976", "0.7067161", "0.7054982", "0.70484775", "0.7045466", "0.7036036", "0.7028955", "0.7028394", "0.70214033", "0.70192087", "0.70149", "0.70112187", "0.70024925", "0.6983303", "0.6968571", "0.69636035", "0.6958951", "0.6943685", "0.69376653", "0.69339645", "0.6933726", "0.6925034", "0.6923532", "0.6915207", "0.6907094", "0.68900895", "0.68900895", "0.6887738", "0.68817765", "0.6867074", "0.68654597", "0.685426", "0.68251157", "0.6804792", "0.6802094", "0.67916477", "0.67783815", "0.6765073", "0.6756978", "0.6754804", "0.67222303", "0.6720846", "0.6706789", "0.6703948", "0.67010087", "0.6698758", "0.6694976", "0.6694704", "0.6690575", "0.6673371", "0.6668532", "0.6667427", "0.6664716", "0.66603744", "0.66574806", "0.6653248", "0.66504425", "0.66418254", "0.6632958", "0.6611591", "0.6603566", "0.66012055" ]
0.8141995
2
This function returns the number of nodes in graph.
int getNrNodes() { return adjList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int nodeCount() {\n return graphNodes.size();\n }", "int getNodesCount();", "int getNodesCount();", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int nodesCount() {\n return nodes.size();\n }", "public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}", "public int getNumNodes() {\n\t\treturn nodes.size();\n\t}", "int nodeCount();", "int totalNumberOfNodes();", "int getNodeCount();", "int getNodeCount();", "protected int numNodes() {\n\t\treturn nodes.size();\n\t}", "public static int getNumberOfNodes() {\n return(numberOfNodes);\n\t }", "public int getNodeCount() {\n return node_.size();\n }", "public int countNodes(){\r\n \treturn count(root);\r\n }", "public int numNodes() {\n\t\treturn numNodes;\n\t}", "int numNodes() {\n\t\treturn num_nodes;\n\t}", "public int countNodes()\n {\n return countNodes(root);\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "public int numNodes() {\n return nodeVector.size();\n }", "private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}", "public int getNodeCount() {\n return nodeCount;\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "public int getNodesCount() {\n if (nodesBuilder_ == null) {\n return nodes_.size();\n } else {\n return nodesBuilder_.getCount();\n }\n }", "@java.lang.Override\n public int getNodesCount() {\n return nodes_.size();\n }", "public int countNodes()\r\n {\r\n return countNodes(root);\r\n }", "public int my_node_count();", "public int totalNumNodes () { throw new RuntimeException(); }", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "int nbNode() {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n if (edge.getEdgeVariable() == null) {\n return edge.nbNode();\n } else {\n return edge.nbNode() + 1;\n }\n\n case OPT_BIND:\n return size();\n }\n\n return 0;\n }", "public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}", "@Override\n public int getNumberOfNodes() {\n int numNodes = 0;\n\n if (!isEmpty()) {\n numNodes = root.getNumberOfNodes();\n }\n\n return numNodes;\n }", "public int numberOfNodes() {\n return numberOfNodes(root);\n }", "public int nodeCount() {\n\treturn nodeList.size();\n }", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "public int nodeCount(){\r\n\t\treturn size;\r\n\t}", "int getNodeCount() {\n\t\treturn m_list_nodes.size();\n\t}", "public int countNodes() {\n\t\t\n\t\tif(isEmpty()==false){\n\t\t\tint count =1;\n\t\t\tDoubleNode temp=head;\n\t\t\twhile(temp.getNext()!=null){\n\t\t\t\tcount++;\n\t\t\t\ttemp=temp.getNext();\n\t\t}\n\t\treturn count;\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t}", "public int numNodes() {\r\n\t\treturn numNodes(root);\r\n\t}", "public int nodeSize()\n{\n\treturn getNodes().size();\n}", "public int size()\n {\n return nodes.size();\n }", "public int size() {\n return nodes.size();\n }", "public int getNodeCount() {\n if (nodeBuilder_ == null) {\n return node_.size();\n } else {\n return nodeBuilder_.getCount();\n }\n }", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "public int size() {\n\t\treturn nodes.size();\n\t}", "int getTotalNumOfNodes() {\n\t\treturn adjList.size();\n\t}", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\tint leftNumber=0;\r\n\t\tint rightNumber=0;\r\n\t\tif(left!=null){\r\n\t\t\tleftNumber=left.getNumberOfNodes();\r\n\t\t}\r\n\t\tif(right!=null)\r\n\t\t\trightNumber=right.getNumberOfNodes();\r\n\t\treturn leftNumber+rightNumber+1;\r\n\t}", "public int size()\r\n { \r\n return numNodes;\r\n }", "public int size(){\n return nodes.size();\n }", "public int nodeCount() {\n return this.root.nodeCount();\n }", "public final int size() {\n return nNodes;\n }", "public int getNetworkNodesNumber() {\n\t\t\n\t\t//Return nodes size\n\t\treturn nodes.size();\n\t\t\n\t}", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "public int getNodeCount() {\n return dataTree.getNodeCount();\n }", "@Override\n public int edgeCount() {\n int count = 0;\n\n for(MyNode n : graphNodes.values()){\n count += n.inDegree();\n }\n\n return count;\n }", "@Override\n\tpublic int getNodeCount()\n\t{\n\t\treturn nodeList.size();\n\t}", "public int getNumberOfNodesEvaluated();", "@Override\n public int nodeSize() {\n return this.nodes.size();\n }", "public int numberOfNodes() {\r\n\t\tBinaryNode<AnyType> t = root;\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfNodes(root.left) + numberOfNodes(root.right) + 1;\r\n\t}", "public int numEdges();", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\treturn 0;\r\n\t}", "int getNumberOfEdges();", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "public int getNumEdges();", "@Override\n\tpublic int nodeSize() {\n\t\treturn this.Nodes.size();\n\t}", "int node_size()\n {\n Node temp =headnode;\n int count=0;\n while (temp.next!=null)\n {\n count++;\n temp=temp.next;\n }\n return count;\n }", "@Override\n\tpublic int size() {\n\t\treturn nodeCount;\n\t}", "@Override\n\tpublic int size() {\n\t\tif(top == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tNode<T> tempNode = top;\n\t\tint counter = 1;\n\t\twhile(tempNode.getLink() != null) {\n\t\t\tcounter++;\n\t\t\ttempNode = tempNode.getLink();\n\t\t}\n\t\treturn counter;\n\t}", "@Override\n public int size() {\n return this.numNodes;\n }", "public int getNumberOfEdges();", "static int nodeCount(Node node) {\n\t\tNode current = node;\n\t\tif(current == null) {\n\t\t\treturn 0;\n\t\t} else if(current.next == null) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 1 + nodeCount(current.next);\n\t\t}\n\t}", "int getEdgeCount();", "public int numNodes(String nodeType)\r\n {\r\n\treturn ntMap.get(nodeType).numNodes();\r\n }", "public int getNetSize() {\n return graph.size();\n }", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }", "int getNumberOfVertexes();", "static int displayN(Node node)\r\n {\r\n return node.neighbors.size();\r\n }", "public int count( ) {\n if(empty()) {\n return 0;\n } else{\n return countNodes(root);\n }\n }", "public String getNumberOfNodesEvaluated(){return Integer.toString(NumberOfVisitedNodes);}", "public int size() {\n\t\tint count = 0;\n\t\tfor (Node<T> current = start; current == null; current = current.next) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "@Override\n\tpublic int graphSize() {\n\t\treturn edges.size();\n\t}", "public int Sizeofnetwork() {\n\t\treturn Nodeswithconnect.size();\n\t}", "public int size() {\n\r\n int size = 0;\r\n for(Node n = head; n.getNext() != null; n = n.getNext()) {\r\n size++;\r\n }\r\n\r\n return size;\r\n }", "public int getVertexCount();", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public int NumActiveNodes() {\n int count = 0;\n\n for (int n = 0; n < nodeVector.size(); ++n) {\n if (nodeVector.get(n).getIndex() != invalid_node_index) {\n ++count;\n }\n }\n\n return count;\n }", "public int size() {\n\treturn nodeList.size();\n }", "public int getEdgeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n int counter = 0;\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n counter += node.outDeg();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return counter;\r\n }", "private int Nodes(BTNode n){\r\n if (n == null)\r\n return 0;\r\n else {\r\n return ( (n.left == null? 0 : Nodes(n.left)) + (n.right == null? 0 : Nodes(n.right)) + 1 );\r\n }\r\n }", "public int size(){\n\t\tNode<E> current = top;\n\t\tint size = 0;\n\t\t\n\t\twhile(current != null){\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\t\n\t\treturn size;\n\t}", "private int countNodes(BTNode r)\r\n {\r\n if (r == null)\r\n return 0;\r\n else\r\n {\r\n int l = 1;\r\n l += countNodes(r.getLeft());\r\n l += countNodes(r.getRight());\r\n return l;\r\n }\r\n }", "public int size()\n\t{\n\t\tint count = 0;\n\t\tif(this.isEmpty())\n\t\t\treturn count;\n\t\telse\n\t\t{\n\t\t\t// Loop through and count the number of nodes.\n\t\t\tNode<T> curr = head;\t\n\t\t\twhile(curr != null)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tcurr = curr.getNext();\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "public int length() {\n return nodeList.size();\n }", "public double getTotalNodeCount() {\n return this.node.getFullNodeList().values().stream()\n .filter(BaseNode::checkIfConsensusNode).count();\n }", "public int totalNodes(Node<T> n)\n\t{\n\t\tif (n == null) \n return 0; \n else \n { \n \t\n int lTotal = totalNodes(n.left); \n int rTotal = totalNodes(n.right); \n \n return (lTotal + rTotal + 1); \n \n \n \n } \n\t}", "@Override\n public int getNumberOfNodesEvaluated() {\n int result = evaluatedNodes;\n evaluatedNodes = 0;\n return result;\n }", "private int countNodes(Node n) {\n int count = 1;\n if (n==null) return 0;\n\n for (int i = 0; i < n.getSubtreesSize(); i++) {\n count = count + countNodes(n.getSubtree(i));\n }\n\n return count;\n }" ]
[ "0.859516", "0.84912914", "0.84912914", "0.82411224", "0.8234718", "0.814731", "0.81450796", "0.81151175", "0.8084935", "0.8021432", "0.8021432", "0.7938551", "0.7931725", "0.7910007", "0.78838253", "0.78668684", "0.7848994", "0.7838492", "0.7838492", "0.7832366", "0.78241575", "0.7815686", "0.7812046", "0.7808151", "0.77915496", "0.77823347", "0.777539", "0.77730465", "0.7768428", "0.77514976", "0.77354157", "0.7728172", "0.772734", "0.7726435", "0.7718472", "0.77042747", "0.76813525", "0.76705766", "0.76423174", "0.7602383", "0.75999105", "0.75961494", "0.75849146", "0.75554085", "0.7505698", "0.75025743", "0.7496059", "0.7490953", "0.74806434", "0.74789995", "0.74546176", "0.74359506", "0.7434963", "0.74302053", "0.7424685", "0.7409452", "0.7372974", "0.73477286", "0.7319527", "0.7319028", "0.7280057", "0.7252127", "0.72387534", "0.7235965", "0.7198358", "0.7139983", "0.7137388", "0.7132241", "0.7116907", "0.71058035", "0.7030223", "0.701699", "0.7000845", "0.699474", "0.6968592", "0.69628674", "0.6920359", "0.69134504", "0.6906413", "0.6895095", "0.688806", "0.6870181", "0.6866238", "0.6860771", "0.6853405", "0.6839575", "0.68265134", "0.68200856", "0.6815881", "0.6790929", "0.67899424", "0.67882365", "0.67812115", "0.67789847", "0.6777379", "0.67693466", "0.67584175", "0.6753986", "0.674447", "0.6738081" ]
0.73592025
57
This function returns a list of all neighbours of a given node.
List<Integer> getNeighboursOf(int node) { return adjList.get(node); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LinkedList<String> getAllNeighbours(String node) {\n LinkedList<Edgeq> edgesList = getAllEdges(node);\n LinkedList<String> neighboursList = new LinkedList<>();\n for (Edgeq edge : edgesList) {\n neighboursList.add(edge.n2);\n }\n return neighboursList;\n }", "ArrayList<PathFindingNode> neighbours(PathFindingNode node);", "public abstract List<AStarNode> getNeighbours();", "private List<Node> getNeighbors(Node node) {\n List<Node> neighbors = new LinkedList<>();\n\n for(Node adjacent : node.getAdjacentNodesSet()) {\n if(!isSettled(adjacent)) {\n neighbors.add(adjacent);\n }\n }\n\n return neighbors;\n }", "public int[] getNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "public int[] getUnderlyingNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0 || roads[i][node] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}", "public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }", "public Collection<N> neighbors();", "private List<Vertex> getNeighbors(Vertex node) {\n return edges.stream()\n .filter( edge ->edge.getSource().equals(node) && !settledNodes.contains(edge.getDestination()))\n .map(edge -> edge.getDestination())\n .collect(Collectors.toList());\n }", "public NodeStack findNeighborsOfNode(Node node) {\n NodeStack neighbors = new NodeStack(10);\n \n for (int x = node.getX() - 1; x <= node.getX() + 1; x++) {\n for (int y = node.getY() - 1; y <= node.getY() + 1; y++) {\n if (pointIsWithinMazeBounds(x, y) && !(x == node.getX() && y == node.getY())) {\n neighbors.push(nodeArray[x][y]);\n }\n }\n }\n \n return neighbors;\n }", "public Collection<GridNode> getNeighbors(\n final GridMover mover,\n final GridNode node) {\n ArrayList<GridNode> neighbors = new ArrayList<GridNode>();\n addPassableNode(mover, neighbors, node.x() + 1, node.y());\n\n addPassableNode(mover, neighbors, node.x(), node.y() + 1);\n addPassableNode(mover, neighbors, node.x(), node.y() - 1);\n\n addPassableNode(mover, neighbors, node.x() - 1, node.y());\n\n return neighbors;\n }", "public abstract LinkedList<Integer> getNeighbours(int index);", "private ArrayList<int[]> getAllNeighbours(int[] solution){\n ArrayList<int[]> neighbours = new ArrayList<int[]>();\n\n for(int i = 0; i <= solution.length - 1; i++){\n for(int j = solution.length - 1; j > i; j--){\n neighbours.add(getNeighbourSolution(solution, i, j));\n }\n }\n\n this.numberOfNeighbours = neighbours.size();\n return neighbours;\n }", "public Collection<MyNode> getNeighbors(){\r\n return new ArrayList<>(this.neighbors);\r\n }", "public Set<Node<E>> getNeighbors(Node<E> node){\n Set<Node<E>> result = new HashSet<>();\n result = nodes.get(node);\n return result;\n }", "private List<Cell> getNeighbours(int row,int col){\n List<Cell> neighbours = new ArrayList<Cell>();\n for(int i = row -1 ; i <= row+1 ; i++ )\n for(int j = col -1 ; j <= col+1 ; j++)\n if(i>=0 && i<cells.length && j>=0 && j<cells[0].length)\n neighbours.add(cells[i][j]);\n return neighbours;\n }", "public List<Tile> getNeighbours() {\n \r\n return neighbours;\r\n }", "List<Integer> getNeighbors(int x);", "public List<Point> getPossibleNeighbours() {\n List<Point> points = new ArrayList<>();\n int x = point.getX();\n int y = point.getY();\n Arrays.asList(x - 1, x, x + 1).forEach(i -> {\n Arrays.asList(y - 1, y, y + 1).forEach(j -> {\n points.add(new Point(i, j));\n });\n });\n // remove self\n points.remove(new Point(x, y));\n return points;\n }", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}", "public List<Location> neighbors (Location pos);", "public abstract List<GraphNode<N, E>> getNeighborNodes(N value);", "java.util.List<rina.object.gpb.Neighbour_t.neighbor_t> \n getNeighborList();", "@Override\n\tpublic List<Cell> getImmediateNeighbors(Cell cell) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tint north, east, south, west;\n\t\t\n\t\tnorth = getNorthCell(cell);\n\t\teast = getEastCell(cell);\n\t\tsouth = getSouthCell(cell);\n\t\twest = getWestCell(cell);\n\t\t\n\t\tif (north != -1) { neighbors.add(getCellList().get(north)); }\n\t\tif (east != -1) { neighbors.add(getCellList().get(east)); }\n\t\tif (south != -1) { neighbors.add(getCellList().get(south)); }\n\t\tif (west != -1) { neighbors.add(getCellList().get(west)); }\n\t\t\n\t\treturn neighbors;\n\t}", "public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list = new List<Integer>();\n return result;\n }", "public Set<V> getNeighbours(V vertex);", "public java.util.List<Integer> getNeighbors(int index);", "public ArrayList<Integer> getNeighbours() {\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.countryID);\n\t\t}\n\n\t\treturn result;\n\t}", "List<GraphEdge> getNeighbors(NodeKey key);", "private List<CellIndex> getNeighbours( CellIndex index )\r\n {\n List<CellIndex> neighbours = new ArrayList<World.CellIndex>();\r\n if( index.x % EnvSettings.getMAX_X() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x - 1, index.y, index.z ) );\r\n }\r\n if( index.x % EnvSettings.getMAX_X() != EnvSettings.getMAX_X() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x + 1, index.y, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y - 1, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != EnvSettings.getMAX_Y() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y + 1, index.z ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z - 1 ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != EnvSettings.getMAX_Z() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z + 1 ) );\r\n }\r\n return neighbours;\r\n }", "public Set<Node3D> getNeighbors(Node3D node){\n List<Triangle3D> triangles = node_to_triangle.get(node);\n Set<Node3D> neighbors = new HashSet<>();\n neighbors.add(node);\n for(Triangle3D t: triangles){\n neighbors.add(t.A);\n neighbors.add(t.B);\n neighbors.add(t.C);\n }\n neighbors.remove(node);\n return neighbors;\n }", "public abstract ArrayList<String> neighbours(String vertLabel);", "public TriangleElt3D[] getNeighbours() {\n\t\tint counter = 0;\n\t\tif (this.eltZero != null)\n\t\t\tcounter++;\n\t\tif (this.eltOne != null)\n\t\t\tcounter++;\n\t\tif (this.eltTwo != null)\n\t\t\tcounter++;\n\n\t\tTriangleElt3D[] neighbours = new TriangleElt3D[counter];\n\n\t\tcounter = 0;\n\t\tif (this.eltZero != null) {\n\t\t\tneighbours[counter] = this.eltZero;\n\t\t\tcounter++;\n\t\t}\n\t\tif (this.eltOne != null) {\n\t\t\tneighbours[counter] = this.eltOne;\n\t\t\tcounter++;\n\t\t}\n\t\tif (this.eltTwo != null) {\n\t\t\tneighbours[counter] = this.eltTwo;\n\t\t}\n\n\t\treturn neighbours;\n\t}", "public static List<HantoCoordinate> getAllNeighbors(HantoCoordinate c){\n\n\t\tList<HantoCoordinate> neighbors = new ArrayList<HantoCoordinate>();\n\n\t\tneighbors.add(new HantoCoord(c.getX(), c.getY() - 1));\n\t\tneighbors.add(new HantoCoord(c.getX(), c.getY() + 1));\n\t\tneighbors.add(new HantoCoord(c.getX() - 1, c.getY()));\n\t\tneighbors.add(new HantoCoord(c.getX() - 1, c.getY() + 1));\n\t\tneighbors.add(new HantoCoord(c.getX() + 1, c.getY()));\n\t\tneighbors.add(new HantoCoord(c.getX() + 1, c.getY() - 1));\n\n\t\treturn neighbors;\n\t}", "public Iterable<Board> neighbors() {\n int emptyRow = -1; // Row of the empty tile\n int emptyCol = -1; // Column of the empty tile\n\n // Iterate through each tile in the board, searching for empty tile\n search:\n for (int row = 0; row < N; row++) // For each row in the board\n for (int col = 0; col < N; col++) // For each column in the row\n if (tiles[row][col] == 0) { // If the current tile is empty (value of 0)\n emptyRow = row; // Store the row of the empty tile\n emptyCol = col; // Store the column of the empty tile\n break search; // Break from search\n }\n\n Stack<Board> neighbors = new Stack<Board>(); // Initialize a stack of neighboring board states\n\n if (emptyRow - 1 >= 0) // If there is a row of tiles above the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow - 1, emptyCol)); // Swap empty tile with the above adjacent tile and add to neighbors stack\n\n if (emptyRow + 1 < N) // If there is a row of tiles below the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow + 1, emptyCol)); // Swap empty tile with the below adjacent tile and add to neighbors stack\n\n if (emptyCol - 1 >= 0) // If there is a column of tiles to the left of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol - 1)); // Swap empty tile with the left adjacent tile and add to neighbors stack\n\n if (emptyCol + 1 < N) // If there is a column of tiles to the right of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol + 1)); // Swap empty tile with the right adjacent tile and add to neighbors stack\n\n return neighbors; // Return iterable stack of neighboring board states\n }", "private List<Integer> getAdjacent(int node) {\n List<Integer> adjacent = new ArrayList<>();\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n adjacent.add(i);\n }\n }\n return adjacent;\n }", "public ArrayList<CoordinateTile> getListOfNeighbours(int i, int j)\n\t{\n\t\tArrayList<CoordinateTile> allNeighbours = new ArrayList<CoordinateTile>();\n\t\tif(this.checkValidCoordinate(i, j+1))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i][j+1]);\n\t\t}\n\t\tif(this.checkValidCoordinate(i, j-1))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i][j-1]);\n\t\t}\n\t\tif(this.checkValidCoordinate(i+1, j))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i+1][j]);\n\t\t}\n\t\tif(this.checkValidCoordinate(i-1, j))\n\t\t{\n\t\t\tallNeighbours.add(this.board[i-1][j]);\n\t\t}\n\t\treturn allNeighbours;\n\t}", "public Vector getNeighbors()\n\t{\n\t\tVector neighbors = new Vector(8);\n\t\t\n\t\tneighbors.addElement(getNeighbor(NORTH));\n\t\tneighbors.addElement(getNeighbor(NORTHEAST));\n\t\tneighbors.addElement(getNeighbor(EAST));\n\t\tneighbors.addElement(getNeighbor(SOUTHEAST));\n\t\tneighbors.addElement(getNeighbor(SOUTH));\n\t\tneighbors.addElement(getNeighbor(SOUTHWEST));\n\t\tneighbors.addElement(getNeighbor(WEST));\n\t\tneighbors.addElement(getNeighbor(NORTHWEST));\n\n\t\treturn neighbors;\n\t}", "public Iterable<Board> neighbors() {\n int[] pos = zeroPosition();\n int x = pos[0];\n int y = pos[1];\n\n Stack<Board> q = new Stack<>();\n if (x > 0) {\n q.push(twinBySwitching(x, y, x-1, y));\n }\n\n if (x < dimension() - 1) {\n q.push(twinBySwitching(x, y, x+1, y));\n }\n\n if (y > 0) {\n q.push(twinBySwitching(x, y, x, y-1));\n }\n\n if (y < dimension() - 1) {\n q.push(twinBySwitching(x, y, x, y+1));\n }\n\n return q;\n }", "public ArrayList<SearchNode> neighbors() {\n ArrayList<SearchNode> neighbors = new ArrayList<SearchNode>();\n // StdOut.println(\"before: \" + this.snBoard);\n Iterable<Board> boards = new ArrayList<Board>();\n boards = this.snBoard.neighbors();\n // StdOut.println(\"after: \" + this.snBoard);\n for (Board b: boards) {\n // StdOut.println(b);\n // StdOut.println(\"checking: \"+b);\n // StdOut.println(\"checking father: \"+this.getPredecessor());\n if (this.getPredecessor() == null) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // sn.addMovesToPriority(this.priority - this.snBoard.hamming()+1);\n neighbors.add(sn);\n } else { \n if (!b.equals(this.getPredecessor().snBoard)) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n neighbors.add(sn);\n }\n }\n \n }\n return neighbors;\n }", "public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }", "protected abstract List<Integer> getNeighbors(int vertex);", "public List<TileEnum> getNeighborsOf(TileEnum tile) {\n return boardGraph.getNeighborsOf(tile);\n }", "public List<Tile> getNeighbors() {\n List<Tile> list = new ArrayList<Tile>();\n\n if (this.tileNorth != null) {\n list.add(this.tileNorth);\n }\n\n if (this.tileEast != null) {\n list.add(this.tileEast);\n }\n\n if (this.tileSouth != null) {\n list.add(this.tileSouth);\n }\n\n if (this.tileWest != null) {\n list.add(this.tileWest);\n }\n\n return list;\n }", "public List neighbors(int vertex) {\n // your code here\n \tList toReturn = new ArrayList<Integer>();\n \tfor (Edge e : myAdjLists[vertex]) {\n \t\ttoReturn.add(e.to());\n \t}\n return toReturn;\n }", "public Iterable<Board> neighbors() {\n LinkedList<Board> states = new LinkedList<>();\n LinkedList<int[]> neighbors = neighborFinder();\n int[] curr_loc = blankFinder();\n\n for(int[] temp : neighbors){\n tiles[curr_loc[0]][curr_loc[1]] = tiles[temp[0]][temp[1]];\n tiles[temp[0]][temp[1]] = 0;\n states.add(new Board(deepCopy(tiles)));\n tiles[temp[0]][temp[1]] = tiles[curr_loc[0]][curr_loc[1]];\n tiles[curr_loc[0]][curr_loc[1]] = 0;\n\n }\n return states;\n }", "public ArrayList<Integer> getOutNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> outNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of outgoing edge ids\r\n\t\tSet<Integer> edgeSet = mOutEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\toutNeighbors.add( getEdge(edgeId).getToId() );\r\n\t\t}\r\n\t\treturn outNeighbors;\r\n\t}", "public ArrayList<Collidable> getNeighbors();", "Set<MacAddress> neighbors();", "public static Set<Integer> neighbours(int x){\n HashSet<Integer> hashSet = new HashSet<>();\n hashSet.add(x-1);\n hashSet.add(x+1);\n return new Set<>(hashSet);\n }", "@Override\n\tpublic List<Location> getNeighbors(Location vertex) {\n\n\t\tArrayList<Location> neighbors = new ArrayList<Location>();\n\n\t\tfor (Path p : getOutEdges(vertex))\n\t\t\tneighbors.add(p.getDestination());\n\n\t\treturn neighbors;\n\n\n\t}", "public List<SearchNode> expand() {\n\n List<SearchNode> neighbours = new ArrayList<>();\n\n if (this.getX() > 0) {\n SearchNode left = new SearchNode(this.getX() - 1, this.getY(), this.getDepth() + 1);\n neighbours.add(left);\n }\n if (this.getX() < 14) {\n SearchNode right = new SearchNode(this.getX() + 1, this.getY(), this.getDepth() + 1);\n neighbours.add(right);\n }\n if (this.getY() > 0) {\n SearchNode up = new SearchNode(this.getX(), this.getY() - 1, this.getDepth() + 1);\n neighbours.add(up);\n }\n if (this.getY() < 14) {\n SearchNode down = new SearchNode(this.getX(), this.getY() + 1, this.getDepth() + 1);\n neighbours.add(down);\n }\n\n return neighbours;\n }", "public ArrayList<Integer> getNeighbors() {\n\t\treturn neighbors;\n\t}", "public ArrayList<Territory> getNeighbours() {\n\t\treturn neighbours;\n\t}", "public List<Node> getAdjacent(Node node){\n\n int nodeX, x = node.getX();\n int nodeY, y = node.getY();\n List<Node> adj = new ArrayList<Node>();\n\n for(Node n:allNodes){\n if(n.isReachable()) {\n nodeX = n.getX();\n nodeY = n.getY();\n if ((Math.abs(nodeX - x) == 1 && nodeY == y) || (nodeX == x && Math.abs(nodeY - y) == 1)) {\n adj.add(n);\n //if(node.getCost()==n.getCost()||n.getCost()==1) n.setCost(node.getCost()+1);\n }\n }\n }\n\n return adj;\n }", "@Override\n\tpublic List<Integer> getNeighbours(int v) {\n\t\treturn null;\n\t}", "private ArrayList<GridPiece> getDirectNeighbors(GridPiece piece) {\n neighbors.clear();\n\n //Top\n if (game.gridMap.size() > piece.row + 1) {\n neighbors.add(game.gridMap.get(piece.row + 1).get(piece.column));\n }\n //Bottom\n if (piece.row > 0) {\n neighbors.add(game.gridMap.get(piece.row - 1).get(piece.column));\n }\n\n //Right\n if (game.gridMap.get(0).size() > piece.column + 1) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column + 1));\n }\n\n //Left\n if (piece.column > 0) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column - 1));\n }\n\n return neighbors;\n }", "@Override\r\n public List<INavMeshAtom> getNeighbours(NavMesh mesh) { \r\n List<INavMeshAtom> neighbours = new ArrayList<INavMeshAtom>();\r\n \r\n if(pId > 0) neighbours.add(new NavMeshPolygon(pId));\r\n \r\n for(OffMeshEdge oe : outgoingEdges) {\r\n neighbours.add(oe.getTo());\r\n }\r\n \r\n return neighbours;\r\n }", "private static Iterable<Cell> getNeighbors(Grid<Cell> grid, Cell cell) {\n\t\tMooreQuery<Cell> query = new MooreQuery<Cell>(grid, cell);\n\t\tIterable<Cell> neighbors = query.query();\n\t\treturn neighbors;\n\t}", "public List<Cell> getNeighbors() {\n return this.neighbors;\n }", "public List<Integer> neighbors(int vertex) {\r\n \tArrayList<Integer> vertices = new ArrayList<Integer>();\r\n \tLinkedList<Edge> testList = myAdjLists[vertex];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tvertices.add(testList.get(counter).myTo);\r\n \tcounter++;\r\n }\r\n return vertices;\r\n }", "public ArrayList<ThresholdDataPoint> getNeighbours(int connec) {\n\t\tif(connec == 8){\n\t\t\treturn eightNeighbours;\n\t\t} else if(connec == 4){\n\t\t\treturn fourNeighbours;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Invalid number of neighbours\");\n\t\t}\n\t}", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "public ArrayList<Cell> getNeighbours(int radius) {\r\n return locateCell.getAdjacentCells(radius);\r\n }", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Integer> getInNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> inNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of incoming edge ids\r\n\t\tSet<Integer> edgeSet = mInEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\tinNeighbors.add( getEdge(edgeId).getFromId() );\r\n\t\t}\r\n\t\treturn inNeighbors;\r\n\t}", "Set<E> getForwardNeighbors();", "public ArrayList<Variable> getNeighbours(Variable X) {\n\t\tArrayList<Variable> neighbours = new ArrayList<Variable>();\n\t\tfor (int i = 0; i < X.arcs.size(); i++) {\n\t\t\tneighbours.add(X.arcs.get(i).Y);\n\t\t}\n\t\treturn neighbours;\n\t}", "public List<Board> neighbors(int player)\n\t{\n\t\tList<Board> ret = new ArrayList<Board>();\n\t\t\n\t\tList<Integer> moves = getLegalMoves();\n\t\tfor (int i : moves)\n\t\t{\n\t\t\tret.add(makeMove(i,player));\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "public abstract int getNeighboursNumber(int index);", "public ArrayList<Integer> neighNumbers() {\n ArrayList<Integer> neighNumbers = new ArrayList<Integer>();\n if(isValid(this.frame-10)) { neighNumbers.add(this.frame-10); }\n if(isValid(this.frame+10)) { neighNumbers.add(this.frame+10); }\n\n //Right edge\n if(this.frame % 10 == 0) {\n if(isValid(this.frame+9)) { neighNumbers.add(this.frame+9); }\n if(isValid(this.frame-1)) { neighNumbers.add(this.frame-1); }\n if(isValid(this.frame-11)) { neighNumbers.add(this.frame-11); }\n\n }\n\n //Left edge\n else if((this.frame -1) % 10 == 0) {\n if(isValid(this.frame-9)) { neighNumbers.add(this.frame-9); }\n if(isValid(this.frame+1)) { neighNumbers.add(this.frame+1); }\n if(isValid(this.frame+11)) { neighNumbers.add(this.frame+11); }\n }\n\n else {\n if(isValid(this.frame-11)) { neighNumbers.add(this.frame-11); }\n if(isValid(this.frame+11)) { neighNumbers.add(this.frame+11); }\n if(isValid(this.frame-1)) { neighNumbers.add(this.frame-1); }\n if(isValid(this.frame+1)) { neighNumbers.add(this.frame+1); }\n if(isValid(this.frame-9)) { neighNumbers.add(this.frame-9); }\n if(isValid(this.frame+9)) { neighNumbers.add(this.frame+9); }\n }\n\n return neighNumbers;\n }", "public ArrayList<PuzzleState> getNeighbors() {\n\t\tArrayList<PuzzleState> neighbors = new ArrayList<PuzzleState>();\n\t\tPuzzleState neighbor;\n\t\t//System.out.println(\"getting neighbors.\");\n\t\tfor (String act: ACTIONS) {\n\t\t\tif (current.validAction(act)){\n\t\t\t\t//System.out.println(\"Action: \" + act + \" on \" + current.getString());\n\t\t\t\tneighbor = new PuzzleState(current.getString(current.getState()),\n\t\t\t\t\t\t\t\t\t\t\tcurrent.getString(current.getGoalState()));\n\t\t\t\tsearchCost++;\n\t\t\t\tneighbor.act(act);\n\t\t\t\tneighbors.add(neighbor);\n\t\t\t}\t\n\t\t}\n\t\treturn neighbors;\n\t}", "public List<Edge> getNeighbors() {\n\t\treturn neighbors;\n\t}", "public ArrayList<Vertex> getNeighbours(Vertex vertex) {\r\n\t\tArrayList<Vertex> neighbours = new ArrayList<Vertex>();\r\n\t\tfor (Vertex vertexOfList : listVertex) {\r\n\r\n\t\t\tif (matrix.getEdges(vertex.getIdVertex(), vertexOfList.getIdVertex()) != null) {\r\n\t\t\t\tneighbours.add(vertexOfList);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn neighbours;\r\n\t}", "@Override\n public Iterable<WorldState> neighbors() {\n Queue<WorldState> neighbor = new ArrayDeque<>();\n int xDim = 0, yDim = 0;\n int[][] tiles = new int[_N][_N];\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n tiles[i][j] = _tiles[i][j];\n if (_tiles[i][j] == 0) {\n xDim = i;\n yDim = j;\n }\n }\n }\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (Math.abs(i - xDim) + Math.abs(j - yDim) == 1) {\n tiles[i][j] = _tiles[xDim][yDim];\n tiles[xDim][yDim] = _tiles[i][j];\n neighbor.add(new Board(tiles));\n // System.out.println(new Board(tiles));\n tiles[xDim][yDim] = _tiles[xDim][yDim];\n tiles[i][j] = _tiles[i][j];\n }\n }\n }\n return neighbor;\n }", "public Collection<Integer> getNeighbours(int i) {\n\t\n\tLinkable lble=(Linkable)Network.node[i].getProtocol(protocolID);\n\tArrayList<Integer> al = new ArrayList<Integer>(lble.degree());\n\tif( Network.node[i].isUp() )\n\t{\t\n\t\tfor(int j=0; j<lble.degree(); ++j)\n\t\t{\n\t\t\tfinal Node n = lble.getNeighbor(j);\n\t\t\t// if accessible, we include it\n\t\t\tif(n.isUp()) al.add(Integer.valueOf(n.getIndex()));\n\t\t}\n\t}\n\treturn Collections.unmodifiableList(al);\n}", "private ArrayList<Pixel> getNeightbors(Pixel pixel)\n {\n ArrayList<Pixel> neighbors = new ArrayList<Pixel>();\n\n for(int i=-1;i<=1;i++)\n {\n int n_w=pixel.p+i;\n if(n_w<0 || n_w==this.image.getWidth()) continue;\n for(int j=-1;j<=1;j++)\n {\n int n_h=pixel.q+j;\n if(n_h<0 || n_h==this.image.getHeight()) continue;\n if(i==0 && j==0) continue;\n neighbors.add( new Pixel(n_w, n_h) );\n }//end for j\n }//end for i\n\n return neighbors;\n }", "public Point[] neighbors (Point p) {\n Point[] pointsAround = this.pointsAround(p);\n ArrayList<Point> neighbors = new ArrayList<Point>();\n for (Point p2 : pointsAround)\n if (this.adjacence(p, p2))\n neighbors.add(p2);\n return neighbors.toArray(new Point[neighbors.size()]);\n }", "List<Node> getNodes();", "public List<INode> getAllNodes();", "private int getNeighbours(Cell cell) {\n\n //Get the X, Y co-ordinates of the cell\n int cellX = cell.getXCord();\n int cellY = cell.getYCord();\n\n // Helper variable initially set to check all neighbours.\n int[][] neighbourCords = allCords;\n\n //Checks what location the cell is and which of its neighbours to check\n //This avoids any array out of bounds issues by trying to look outside the grid\n if (cellX == 0 && cellY == 0) {\n neighbourCords = topLeftCords;\n } else if (cellX == this.width - 1 && cellY == this.height - 1) {\n neighbourCords = bottomRightCords;\n } else if (cellX == this.width - 1 && cellY == 0) {\n neighbourCords = topRightCords;\n } else if (cellX == 0 && cellY == this.height - 1) {\n neighbourCords = bottomLeftCords;\n } else if (cellY == 0) {\n neighbourCords = topCords;\n } else if (cellX == 0) {\n neighbourCords = leftCords;\n } else if (cellX == this.width - 1) {\n neighbourCords = rightCords;\n } else if (cellY == this.height - 1) {\n neighbourCords = bottomCords;\n }\n\n // Return the number of neighbours\n return searchNeighbours(neighbourCords, cellX, cellY);\n }", "int[] getOutEdges(int... nodes);", "public ArrayList<Double> getNeighboursData() {\n\t\tArrayList<Double> result = new ArrayList<Double>();\n\n\t\tfor (Border curBorder: allBorder) {\n\t\t\tresult.add(curBorder.length);\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Cell> getOrderedNeighbors(Cell cell) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tint northwest, north, northeast, east, southeast, south, southwest, west;\n\t\t\n\t\tnorthwest = getNorthWestCell(cell);\n\t\tnorth = getNorthCell(cell);\n\t\tnortheast = getNorthEastCell(cell);\n\t\teast = getEastCell(cell);\n\t\tsoutheast = getSouthEastCell(cell);\n\t\tsouth = getSouthCell(cell);\n\t\tsouthwest = getSouthWestCell(cell);\n\t\twest = getWestCell(cell);\n\t\t\n\t\tneighbors.add(getCellList().get(northwest));\n\t\tneighbors.add(getCellList().get(north));\n\t\tneighbors.add(getCellList().get(northeast));\n\t\tneighbors.add(getCellList().get(east));\n\t\tneighbors.add(getCellList().get(southeast));\n\t\tneighbors.add(getCellList().get(south));\n\t\tneighbors.add(getCellList().get(southwest));\n\t\tneighbors.add(getCellList().get(west));\n\t\t\n\t\treturn neighbors;\n\t}", "int[] getInEdges(int... nodes);", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "List<WeightedEdge<Vertex>> neighbors(Vertex v);", "public List<OSMNode> nonRepeatingNodes() {\n if (isClosed()) {\n return nodes.subList(0, nodes.size() - 1);\n } else {\n return nodes;\n }\n }", "public E[] getNeighbours (E vertex) throws IllegalArgumentException\n {\n int index = this.indexOf (vertex);\n\n // Check if the vertex exists in the graph\n if (index < 0)\n throw new IllegalArgumentException (vertex + \" was not found!\");\n\n\n Node node = this.adjacencySequences[index];\n int countNeighbours = 0;\n while(node != null)\n {\n countNeighbours++;\n node = node.nextNode;\n }\n\n E[] neighbours = (E[]) new Object[countNeighbours];\n node = this.adjacencySequences[index];\n int neighbourIndex = 0;\n \n while(node != null)\n {\n neighbours[neighbourIndex++] = vertices[node.neighbourIndex];\n node = node.nextNode;\n }\n\n return neighbours;\n }", "Collection<Node> allNodes();", "public ArrayList<GraphNode> getAroundNodes(GraphNode n1){\n ArrayList<GraphNode> temp1 = new ArrayList<GraphNode>();\n if(!n1.isValid())\n return temp1;\n EdgeList<GraphEdge> m1 = edgeListVector.get(n1.getIndex());\n\n\n for(GraphEdge e1:m1){\n temp1.add(nodeVector.get(e1.getTo()));\n }\n return temp1;\n }", "@Override public ArrayList<Location> neighbors(final Location id) {\n ArrayList<Location> neighbours = new ArrayList<>();\n for (Location direction : directions){\n\n Location position = new Location(direction.x + id.x, direction.y + id.y);\n\n if (inBounds(position) && isPassable(position))\n neighbours.add(position);\n }\n return neighbours;\n }", "public Vector getAdjacentNodes()\n\t{\n\t\tVector vAdjNodes = new Vector();\n\t\t\n\t\tfor (int i = 0; i < m_vConnectedNodes.size(); i++)\n\t\t{\n\t\t\tif ( ((NodeConnection)m_vConnectedNodes.get(i)).getCost() > 0 )\n\t\t\t{\n\t\t\t\tvAdjNodes.add(((NodeConnection)m_vConnectedNodes.get(i)).getLinkedNode());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn vAdjNodes;\n\t}", "abstract ArrayList<Pair<Integer,Double>> adjacentNodes(int i);", "public Cell[] getNeighbors(Cell cell) {\n int index = 0;\n Cell neighbors[] = new Cell[4];\n //check top neighbour\n if (cell.getRow() > 0) {\n neighbors[index] = cells[cell.getRow() - 1][cell.getColumn()];\n index++;\n }\n //check left neighbor\n if (cell.getColumn() > 0) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()-1];\n index++;\n }\n //check bottom neighbor\n if (cell.getRow() < height - 1) {\n neighbors[index] = cells[cell.getRow() + 1][cell.getColumn()];\n index++;\n }\n //check right neighbor\n if (cell.getColumn() < width - 1) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()+1];\n index++;\n }\n\n //if there are only 3 neighbor cells, copy cells into smaller array\n if (index == 3) {\n Cell neighbors2[] = new Cell[3];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n //if there are only 2 neighbor cells, copy cells into smaller array\n } else if (index == 2) {\n Cell neighbors2[] = new Cell[2];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n }\n return neighbors;\n }", "public abstract Set<Tile> getNeighbors(Tile tile);", "public List<String> displayNeighbours(String parolaInserita) {\n\t\tList<String> resultString = new ArrayList<String>();\n\t\tSet<DefaultEdge> result = grafo.edgesOf(parolaInserita);\n\t\tfor(DefaultEdge tmp : result) {\n\t\t\tresultString.add(tmp.toString());\n\t\t}\n\t\treturn resultString;\n\t}", "@Override\n\tpublic List<Cell> getDiagonalNeighbors(Cell cell) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tint northEast, northWest, southEast, southWest;\n\t\t\n\t\tnorthEast = getNorthEastCell(cell);\n\t\tnorthWest = getNorthWestCell(cell);\n\t\tsouthEast = getSouthEastCell(cell);\n\t\tsouthWest = getSouthWestCell(cell);\n\t\t\n\t\tif (northEast != -1) { neighbors.add(getCellList().get(northEast)); }\n\t\tif (northWest != -1) { neighbors.add(getCellList().get(northWest)); }\n\t\tif (southEast != -1) { neighbors.add(getCellList().get(southEast)); }\n\t\tif (southWest != -1) { neighbors.add(getCellList().get(southWest)); }\n\t\t\n\t\treturn neighbors;\n\t}" ]
[ "0.8130492", "0.80858225", "0.8058941", "0.7931269", "0.79303515", "0.7754638", "0.75783545", "0.7437836", "0.736844", "0.7314592", "0.72613716", "0.72168726", "0.7208717", "0.72017586", "0.7157075", "0.7143105", "0.7139326", "0.70948464", "0.70545745", "0.7044179", "0.7034392", "0.6986717", "0.69779444", "0.69207686", "0.6897505", "0.68637455", "0.68367183", "0.68291634", "0.6806588", "0.68054223", "0.67896736", "0.6742631", "0.67332566", "0.6725237", "0.67164665", "0.6709438", "0.67065746", "0.6689854", "0.6686394", "0.6643212", "0.6636468", "0.6611395", "0.6581118", "0.657492", "0.6573909", "0.6570499", "0.64850354", "0.6459155", "0.6445808", "0.64268553", "0.64237547", "0.64232177", "0.6420463", "0.64204174", "0.64157736", "0.64112747", "0.6406377", "0.6406108", "0.6405435", "0.64054257", "0.63941455", "0.63780224", "0.63665366", "0.63649213", "0.63514197", "0.6345474", "0.63234717", "0.63231957", "0.6322863", "0.63091284", "0.6297893", "0.62929696", "0.62863547", "0.62712276", "0.6267333", "0.6251761", "0.6242545", "0.6222404", "0.62174875", "0.6195635", "0.6175685", "0.61733997", "0.61381316", "0.6124601", "0.6115288", "0.61076236", "0.61036146", "0.6090682", "0.6085086", "0.60513943", "0.60493904", "0.604852", "0.60251015", "0.60213906", "0.60189825", "0.6006743", "0.5990721", "0.5986886", "0.5985242", "0.59851116" ]
0.8191014
0
This function gets the total number of nodes in the graph.
int getTotalNumOfNodes() { return adjList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int totalNumberOfNodes();", "int getNodesCount();", "int getNodesCount();", "@Override\n public int nodeCount() {\n return graphNodes.size();\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int totalNumNodes () { throw new RuntimeException(); }", "public int nodesCount() {\n return nodes.size();\n }", "public static int getNumberOfNodes() {\n return(numberOfNodes);\n\t }", "public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}", "public int getNumNodes() {\n\t\treturn nodes.size();\n\t}", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "int getNodeCount();", "int getNodeCount();", "protected int numNodes() {\n\t\treturn nodes.size();\n\t}", "public int countNodes(){\r\n \treturn count(root);\r\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "int nodeCount();", "@java.lang.Override\n public int getNodesCount() {\n return nodes_.size();\n }", "public int getNodeCount() {\n return node_.size();\n }", "public int getNodeCount() {\n return nodeCount;\n }", "public int getNodesCount() {\n if (nodesBuilder_ == null) {\n return nodes_.size();\n } else {\n return nodesBuilder_.getCount();\n }\n }", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "public int numNodes() {\n return nodeVector.size();\n }", "@Override\n public int getNumberOfNodes() {\n int numNodes = 0;\n\n if (!isEmpty()) {\n numNodes = root.getNumberOfNodes();\n }\n\n return numNodes;\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}", "private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}", "int numNodes() {\n\t\treturn num_nodes;\n\t}", "public int numNodes() {\n\t\treturn numNodes;\n\t}", "public int nodeSize()\n{\n\treturn getNodes().size();\n}", "public int numberOfNodes() {\n return numberOfNodes(root);\n }", "public int countNodes()\r\n {\r\n return countNodes(root);\r\n }", "public int countNodes() {\n\t\t\n\t\tif(isEmpty()==false){\n\t\t\tint count =1;\n\t\t\tDoubleNode temp=head;\n\t\t\twhile(temp.getNext()!=null){\n\t\t\t\tcount++;\n\t\t\t\ttemp=temp.getNext();\n\t\t}\n\t\treturn count;\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t}", "public int nodeCount(){\r\n\t\treturn size;\r\n\t}", "int getNodeCount() {\n\t\treturn m_list_nodes.size();\n\t}", "public int nodeCount() {\n\treturn nodeList.size();\n }", "public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }", "public int my_node_count();", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "int nbNode() {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n if (edge.getEdgeVariable() == null) {\n return edge.nbNode();\n } else {\n return edge.nbNode() + 1;\n }\n\n case OPT_BIND:\n return size();\n }\n\n return 0;\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\tint leftNumber=0;\r\n\t\tint rightNumber=0;\r\n\t\tif(left!=null){\r\n\t\t\tleftNumber=left.getNumberOfNodes();\r\n\t\t}\r\n\t\tif(right!=null)\r\n\t\t\trightNumber=right.getNumberOfNodes();\r\n\t\treturn leftNumber+rightNumber+1;\r\n\t}", "public int getNodeCount() {\n if (nodeBuilder_ == null) {\n return node_.size();\n } else {\n return nodeBuilder_.getCount();\n }\n }", "public int numNodes() {\r\n\t\treturn numNodes(root);\r\n\t}", "public final int size() {\n return nNodes;\n }", "public int size()\r\n { \r\n return numNodes;\r\n }", "public int size()\n {\n return nodes.size();\n }", "public int size() {\n return nodes.size();\n }", "public int getNumberOfNodesEvaluated();", "@Override\n public int nodeSize() {\n return this.nodes.size();\n }", "public int getNodeCount() {\n return dataTree.getNodeCount();\n }", "public double getTotalNodeCount() {\n return this.node.getFullNodeList().values().stream()\n .filter(BaseNode::checkIfConsensusNode).count();\n }", "public int size(){\n return nodes.size();\n }", "public int size() {\n\t\treturn nodes.size();\n\t}", "public int nodeCount() {\n return this.root.nodeCount();\n }", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }", "int node_size()\n {\n Node temp =headnode;\n int count=0;\n while (temp.next!=null)\n {\n count++;\n temp=temp.next;\n }\n return count;\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\treturn 0;\r\n\t}", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "public int numberOfNodes() {\r\n\t\tBinaryNode<AnyType> t = root;\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfNodes(root.left) + numberOfNodes(root.right) + 1;\r\n\t}", "@Override\n\tpublic int nodeSize() {\n\t\treturn this.Nodes.size();\n\t}", "@Override\n\tpublic int getNodeCount()\n\t{\n\t\treturn nodeList.size();\n\t}", "int getNrNodes() {\n\t\treturn adjList.size();\n\t}", "public int getNetworkNodesNumber() {\n\t\t\n\t\t//Return nodes size\n\t\treturn nodes.size();\n\t\t\n\t}", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "@Override\n public int edgeCount() {\n int count = 0;\n\n for(MyNode n : graphNodes.values()){\n count += n.inDegree();\n }\n\n return count;\n }", "@Override\n\tpublic int size() {\n\t\treturn nodeCount;\n\t}", "@Override\n\tpublic int size() {\n\t\tif(top == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tNode<T> tempNode = top;\n\t\tint counter = 1;\n\t\twhile(tempNode.getLink() != null) {\n\t\t\tcounter++;\n\t\t\ttempNode = tempNode.getLink();\n\t\t}\n\t\treturn counter;\n\t}", "public int totalNodes(Node<T> n)\n\t{\n\t\tif (n == null) \n return 0; \n else \n { \n \t\n int lTotal = totalNodes(n.left); \n int rTotal = totalNodes(n.right); \n \n return (lTotal + rTotal + 1); \n \n \n \n } \n\t}", "public int count( ) {\n if(empty()) {\n return 0;\n } else{\n return countNodes(root);\n }\n }", "@Override\n public int size() {\n return this.numNodes;\n }", "public String getNumberOfNodesEvaluated(){return Integer.toString(NumberOfVisitedNodes);}", "@Override\n public int getNumberOfNodesEvaluated() {\n int result = evaluatedNodes;\n evaluatedNodes = 0;\n return result;\n }", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "public int getNetSize() {\n return graph.size();\n }", "public int size() {\n\r\n int size = 0;\r\n for(Node n = head; n.getNext() != null; n = n.getNext()) {\r\n size++;\r\n }\r\n\r\n return size;\r\n }", "public int size() {\n\t\tint count = 0;\n\t\tfor (Node<T> current = start; current == null; current = current.next) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int size(){\n\t\tNode<E> current = top;\n\t\tint size = 0;\n\t\t\n\t\twhile(current != null){\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\t\n\t\treturn size;\n\t}", "public int size()\n {\n Node n = head.getNext();\n int count = 0;\n while(n != null)\n {\n count++; \n n = n.getNext();\n }\n return count;\n }", "public int size()\n\t{\n\t\tint count = 0;\n\t\tif(this.isEmpty())\n\t\t\treturn count;\n\t\telse\n\t\t{\n\t\t\t// Loop through and count the number of nodes.\n\t\t\tNode<T> curr = head;\t\n\t\t\twhile(curr != null)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tcurr = curr.getNext();\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}", "private int numberOfNodes(Node root){\n if(root==null){\n return 0;\n }\n return 1 + numberOfNodes(root.getLeft()) + numberOfNodes(root.getRight());\n }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "public int getNumberOfNodesEvaluated() {\r\n\t\treturn this.evaluatedNodes;\r\n\t}", "public long getNodesArrayLength() {\n\t\treturn nodesLength;\n\t}", "static int nodeCount(Node node) {\n\t\tNode current = node;\n\t\tif(current == null) {\n\t\t\treturn 0;\n\t\t} else if(current.next == null) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 1 + nodeCount(current.next);\n\t\t}\n\t}", "public int numberOfFullNodes() {\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfFullNodes(root);\r\n\t}", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public int numNodes(String nodeType)\r\n {\r\n\treturn ntMap.get(nodeType).numNodes();\r\n }", "int getNumberOfEdges();", "public int getEdgeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n int counter = 0;\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n counter += node.outDeg();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return counter;\r\n }", "public int size() {\n Node<T> temp = head;\n int count = 0;\n while (temp != null)\n {\n count++;\n temp = temp.next;\n }\n return count;\n }", "public int size() {\n\treturn nodeList.size();\n }", "public int getSize() {\n\t\tint size=0;\n\t\tfor(Node<E> p=head.next;p!=null; p=p.next){\n\t\t\tsize++;\n\t\t}\n\t\treturn size;\n\t}", "public int Sizeofnetwork() {\n\t\treturn Nodeswithconnect.size();\n\t}", "@Override\n public int size()\n {\n int numLinks = 0;\n Node currNode = this.head.next; \n while(currNode.next != null)\n {\n numLinks++;\n currNode = currNode.next;\n }\n return numLinks;\n }", "public int getNetworkSize()\n\t{\n\t\treturn this.nodeManager.getNodeList().getNodeList().size();\n\t}", "public int length() {\n return nodeList.size();\n }", "static int displayN(Node node)\r\n {\r\n return node.neighbors.size();\r\n }", "public int length()\n {\n int count = 0;\n Node position = head;\n\n while(position != null)\n {\n count++;\n position = position.nLink;\n } // end while\n\n return count;\n }" ]
[ "0.8621343", "0.8619394", "0.8619394", "0.83712965", "0.8360856", "0.8206107", "0.8192839", "0.8175986", "0.81638026", "0.8088351", "0.8075757", "0.8071038", "0.8071038", "0.8039449", "0.8026108", "0.8021773", "0.7970607", "0.79667646", "0.79487306", "0.79485065", "0.79348314", "0.79248947", "0.79213536", "0.7888175", "0.7887981", "0.78844905", "0.78844905", "0.78481084", "0.78466487", "0.78462684", "0.7839641", "0.7809885", "0.7805545", "0.780454", "0.77826923", "0.7749615", "0.7718186", "0.7703161", "0.7693959", "0.76927507", "0.76809996", "0.7663294", "0.76299083", "0.75949556", "0.75876915", "0.75865746", "0.75795406", "0.75653714", "0.7563959", "0.75611955", "0.75295043", "0.7528719", "0.7526934", "0.75245833", "0.7466838", "0.7456452", "0.7439106", "0.7420145", "0.74125814", "0.73877025", "0.7383439", "0.7379224", "0.7356133", "0.73346144", "0.73240286", "0.730764", "0.72850645", "0.72645676", "0.7258166", "0.72488433", "0.72264576", "0.72106093", "0.72056913", "0.7144271", "0.71311325", "0.71001476", "0.709447", "0.7079146", "0.70397747", "0.70344895", "0.7010922", "0.69944966", "0.6985723", "0.6972681", "0.69664115", "0.69614077", "0.69540834", "0.6931226", "0.69240236", "0.6922322", "0.6912082", "0.6903731", "0.6900152", "0.68920904", "0.6879533", "0.6874138", "0.6873722", "0.68702877", "0.6861931", "0.6853265" ]
0.7979388
16
Repository for keeping created short links and the original ones
public interface ShortUrlRepository extends CrudRepository<UrlEntity, String> { List<UrlEntity> findByDateExpiredBefore(Timestamp timestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void storeLinks();", "public interface ShortLinkFormattingService {\n\n /**\n * Formats the given ShortLink into its final URL representation\n * @param shortLink <p>the ShortLink to convert</p>\n * @return <p>the URL representing the given ShortLink</p>\n */\n URL format(ShortLink shortLink);\n\n}", "URL format(ShortLink shortLink);", "SimpleLink createSimpleLink();", "LINK createLINK();", "Link createLink();", "private String shortenBitLy(String link) {\n Bitly bitly = Bit.ly(appProperties.getBitlyAccessToken());\n String shortUrl = bitly.shorten(link);\n return shortUrl;\n }", "public List<URL> newURLs() {\r\n // TODO: Implement this!\r\n return new LinkedList<URL>();\r\n }", "@Override\n\tpublic boolean isUsedInLinks() {\n\t\treturn false;\n\t}", "public void testLinkPersists() {\n\t\tJabberMessage msg = new JabberMessage();\n\t\tmsg.setMessage(\"Hello There! http://google.com/fwd.txt This is a test\");\n\t\tmsg.setId(1);\n\t\tmsg.setUsername(\"Test\");\n\t\tmsg.setTimestamp(\"NOW!\");\n\t\tLink link;\n\t\ttry {\n\t\t\tlh.putLink(msg);\n\t\t\tlink = dao.getLink(\"http://google.com/fwd.txt\");\n\t\t\tassert(link.getCount() == 1);\n\t\t\tif (link.getCount() != 1) {\n\t\t\t\tfail(\"Link count meant to be 1 but is:\" + link.getCount());\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tfail(\"I'm bad at logic\");\n\t}", "public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}", "private void hookLinks(long offleft,long offright){\n\t\tlinks.clear();\n\t\tlinks.add(offleft);\n\t\tlinks.add(offright);\n\t}", "ReferenceLink createReferenceLink();", "@Override\n\tpublic String shortenUrl(String longUrl){\n\t\tString encodedUrl = \"\";\n\t\tInteger hashKey = (int) UUID.nameUUIDFromBytes(longUrl.getBytes()).getMostSignificantBits();\n\t\tencodedUrl = Integer.toString(hashKey, 36);\n\t\treturn \"http://localhost:8080/URLShortner/short/\" +encodedUrl;\n\t}", "public interface Linkage {\n /*\n * Save Operation\n * 1. Add\n * 2. Update\n *\n * The parameter vector means that whether it's double direction\n * 1. vector = true, source -> target, target -> source\n * 2. vector = false, source <-> target\n * The key point is that `linkKey` calculation are different between these two.\n */\n Future<JsonArray> link(JsonArray linkage, boolean vector);\n\n /*\n * Delete Operation\n * 1. Remove\n * Here the criteria is condition to remove previous linkage\n */\n Future<Boolean> unlink(JsonObject criteria);\n\n /*\n * Fetch Operation\n */\n Future<JsonArray> fetch(JsonObject criteria);\n}", "private void transferLinks(LinkedHashMap_.Entry<K,V> src,\n LinkedHashMap_.Entry<K,V> dst) {\n LinkedHashMap_.Entry<K,V> b = dst.before = src.before;\n LinkedHashMap_.Entry<K,V> a = dst.after = src.after;\n if (b == null)\n head = dst;\n else\n b.after = dst;\n if (a == null)\n tail = dst;\n else\n a.before = dst;\n }", "private Link() {\n }", "public String getLink();", "protected void _initLinks() {\n\t\tleaseTaskStartsLink = null;\n\t\tleaseRulesLink = null;\n\t}", "List<ProductLink> links();", "NamedLinkDescriptor createNamedLinkDescriptor();", "void clearLinks();", "protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}", "private void clearLinks() {\n links_ = emptyProtobufList();\n }", "protected java.util.Vector _getLinks() {\n\tjava.util.Vector links = new java.util.Vector();\n\tlinks.addElement(getPeopleLink());\n\tlinks.addElement(getChangeLogDetailsesLink());\n\treturn links;\n}", "private boolean getLinks() {\n return false;\n }", "private void createDummyData() {\n YangInstanceIdentifier yiid;\n // create 2 links (stored in waitingLinks)\n LeafNode<String> link1Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_1);\n LeafNode<String> link2Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_3);\n\n ContainerNode source1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link1Source).build();\n ContainerNode source2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link2Source).build();\n\n LeafNode<String> link1Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_2);\n LeafNode<String> link2Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_4);\n ContainerNode dest1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link1Dest).build();\n ContainerNode dest2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link2Dest).build();\n\n MapEntryNode link1 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_1)\n .withChild(source1Container).withChild(dest1Container).build();\n MapEntryNode link2 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_2)\n .withChild(source2Container).withChild(dest2Container).build();\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_1);\n UnderlayItem item = new UnderlayItem(link1, null, TOPOLOGY_ID, LINK_ID_1, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_2);\n item = new UnderlayItem(link2, null, TOPOLOGY_ID, LINK_ID_2, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create 2 supporting nodes under two overlay nodes\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1).build();\n Map<QName, Object> suppNode1KeyValues = new HashMap<>();\n suppNode1KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode1KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_1);\n MapEntryNode menSuppNode1 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode1KeyValues)).build();\n MapNode suppNode1List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode1).build();\n MapEntryNode overlayNode1 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1)\n .addChild(suppNode1List).build();\n item = new UnderlayItem(overlayNode1, null, TOPOLOGY_ID, OVERLAY_NODE_ID_1, CorrelationItemEnum.Node);\n // overlayNode1 is created\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2).build();\n Map<QName, Object> suppNode2KeyValues = new HashMap<>();\n suppNode2KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode2KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_2);\n MapEntryNode menSuppNode2 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode2KeyValues)).build();\n MapNode suppNode2List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode2).build();\n MapEntryNode overlayNode2 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2)\n .addChild(suppNode2List).build();\n item = new UnderlayItem(overlayNode2, null, TOPOLOGY_ID, OVERLAY_NODE_ID_2, CorrelationItemEnum.Node);\n // overlayNode2 is created and link:1 is matched\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create a third supporting node under a third overlay node\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3).build();\n Map<QName, Object> suppNode3KeyValues = new HashMap<>();\n suppNode3KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode3KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_3);\n MapEntryNode menSuppNode3 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode3KeyValues)).build();\n MapNode suppNode3List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode3).build();\n MapEntryNode node3 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3)\n .addChild(suppNode3List).build();\n item = new UnderlayItem(node3, null, TOPOLOGY_ID, OVERLAY_NODE_ID_3, CorrelationItemEnum.Node);\n\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create another matched link (link:3)\n LeafNode<String> link3Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_2);\n ContainerNode source3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link3Source).build();\n LeafNode<String> link3Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_3);\n ContainerNode dest3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link3Dest).build();\n MapEntryNode link3 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_3)\n .withChild(source3Container).withChild(dest3Container).build();\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_3);\n item = new UnderlayItem(link3, null, TOPOLOGY_ID, LINK_ID_3, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n }", "private void createInLinks() {\n\t\tArrayList<InLinks> inlinkList=new ArrayList<>();\n\t\ttry{\n\t\t\tArrayList<String> inlinks=null;\n\t\t\tString url=\"\";\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\inlinks\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString[] urls;\n\t\t\t\tif(line.contains(\"Inlinks:\")){\n\t\t\t\t\tif(!url.isEmpty()){\n\t\t\t\t\t\tInLinks inlink=new InLinks();\n\t\t\t\t\t\tinlink.setUrl(url);\n\t\t\t\t\t\tinlink.setLinks(inlinks);\n\t\t\t\t\t\tinlinkList.add(inlink);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tinlinks=new ArrayList<>();\n\t\t\t\t\turls=line.trim().split(\"Inlinks:\");\n\t\t\t\t\turl=urls[0].trim();\n\t\t\t\t}else{\n\t\t\t\t\turls=line.trim().split(\"anchor:\");\n\t\t\t\t\tString inlink=urls[0].replace(\"fromUrl:\", \"\").trim();\n\t\t\t\t\tif(!inlink.isEmpty()){\n\t\t\t\t\t\tinlinks.add(inlink);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tInLinks inlink=new InLinks();\n\t\t\tinlink.setUrl(url);\n\t\t\tinlink.setLinks(inlinks);\n\t\t\tinlinkList.add(inlink);\n\t\t\tin.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertInLinks(inlinkList);\n\t}", "String getLink();", "HEAD createHEAD();", "public List<Link> getLinks()\t{return Collections.unmodifiableList(allLinks);}", "public interface LinkService {\n\n /**\n * find link by page\n *\n * @param pageNow page number\n * @param pageSize page size\n * @return page\n */\n Page<Link> findLink(Integer pageNow, Integer pageSize);\n\n /**\n * save a link<br/>\n * if link id is null,insert<br/>\n * if link id not null,update\n *\n * @param link link\n * @return boolean\n */\n boolean save(Link link);\n\n /**\n * find link by id\n * @param linkId link id\n * @return link\n */\n Link findLinkById(String linkId);\n\n /**\n * find all need show link by cache\n * @return list\n */\n List<Link> findLinkByCache();\n\n /**\n * delete a link by id\n * @param linkId link id\n * @return boolean\n */\n boolean delete(String linkId);\n}", "@PostMapping(path = \"/\", consumes = MediaType.APPLICATION_JSON_VALUE)\n public Shorter createShortUrl(@RequestBody Shorter shorter) {\n\n String hash = codeGenerator.generate(shorterLength);\n logger.info(hash);\n if (shorter != null) {\n String shorterString = URLDecoder.decode(shorter.getOriginalUrl());\n logger.info(shorterString);\n shorter = new Shorter(null, hash, shorterString, ZonedDateTime.now());\n return repository.save(shorter);\n } else {\n return null;\n }\n }", "List<Link> findLinkByCache();", "void addLink(byte start, byte end);", "LinkRelation createLinkRelation();", "Link getIsReuseOf();", "void addHadithUrl(Object newHadithUrl);", "public String getLinkName();", "public interface Link<T> extends ITable<T>, List<T>, RandomAccess {\r\n /**\r\n * Set number of the linked objects \r\n * @param newSize new number of linked objects (if it is greater than original number, \r\n * than extra elements will be set to null)\r\n */\r\n public void setSize(int newSize);\r\n \r\n /**\r\n * Returns <tt>true</tt> if there are no related object\r\n *\r\n * @return <tt>true</tt> if there are no related object\r\n */\r\n boolean isEmpty();\r\n\r\n /**\r\n * Get related object by index\r\n * @param i index of the object in the relation\r\n * @return referenced object\r\n */\r\n public T get(int i);\r\n\r\n /**\r\n * Get related object by index without loading it.\r\n * Returned object can be used only to get it OID or to compare with other objects using\r\n * <code>equals</code> method\r\n * @param i index of the object in the relation\r\n * @return stub representing referenced object\r\n */\r\n public Object getRaw(int i);\r\n\r\n /**\r\n * Replace i-th element of the relation\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n * @return the element previously at the specified position.\r\n */\r\n public T set(int i, T obj);\r\n\r\n /**\r\n * Assign value to i-th element of the relation.\r\n * Unlike Link.set methos this method doesn't return previous value of the element\r\n * and so is faster if previous element value is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n */\r\n public void setObject(int i, T obj);\r\n\r\n /**\r\n * Remove object with specified index from the relation\r\n * Unlike Link.remove methos this method doesn't return removed element and so is faster \r\n * if it is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n */\r\n public void removeObject(int i);\r\n\r\n /**\r\n * Insert new object in the relation\r\n * @param i insert poistion, should be in [0,size()]\r\n * @param obj object inserted in the relation\r\n */\r\n public void insert(int i, T obj);\r\n\r\n /**\r\n * Add all elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n */\r\n public void addAll(T[] arr);\r\n \r\n /**\r\n * Add specified elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n * @param from index of the first element in the array to be added to the relation\r\n * @param length number of elements in the array to be added in the relation\r\n */\r\n public void addAll(T[] arr, int from, int length);\r\n\r\n /**\r\n * Add all object members of the other relation to this relation\r\n * @param link another relation\r\n */\r\n public boolean addAll(Link<T> link);\r\n\r\n /**\r\n * Return array with relation members. Members are not loaded and \r\n * size of the array can be greater than actual number of members. \r\n * @return array of object with relation members used in implementation of Link class\r\n */\r\n public Object[] toRawArray(); \r\n\r\n /**\r\n * Get all relation members as array.\r\n * The runtime type of the returned array is that of the specified array. \r\n * If the index fits in the specified array, it is returned therein. \r\n * Otherwise, a new array is allocated with the runtime type of the \r\n * specified array and the size of this index.<p>\r\n *\r\n * If this index fits in the specified array with room to spare\r\n * (i.e., the array has more elements than this index), the element\r\n * in the array immediately following the end of the index is set to\r\n * <tt>null</tt>. This is useful in determining the length of this\r\n * index <i>only</i> if the caller knows that this index does\r\n * not contain any <tt>null</tt> elements.)<p>\r\n * @return array of object with relation members\r\n */\r\n public <T> T[] toArray(T[] arr);\r\n\r\n /**\r\n * Checks if relation contains specified object instance\r\n * @param obj specified object\r\n * @return <code>true</code> if object is present in the collection, <code>false</code> otherwise\r\n */\r\n public boolean containsObject(T obj);\r\n\r\n /**\r\n * Check if i-th element of Link is the same as specified obj\r\n * @param i element index\r\n * @param obj object to compare with\r\n * @return <code>true</code> if i-th element of Link reference the same object as \"obj\"\r\n */\r\n public boolean containsElement(int i, T obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation. \r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int indexOfObject(Object obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation\r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int lastIndexOfObject(Object obj);\r\n\r\n /**\r\n * Remove all members from the relation\r\n */\r\n public void clear();\r\n\r\n /**\r\n * Get iterator through link members\r\n * This iterator supports remove() method.\r\n * @return iterator through linked objects\r\n */\r\n public Iterator<T> iterator();\r\n\r\n /**\r\n * Replace all direct references to linked objects with stubs. \r\n * This method is needed tyo avoid memory exhaustion in case when \r\n * there is a large numebr of objectys in databasse, mutually\r\n * refefencing each other (each object can directly or indirectly \r\n * be accessed from other objects).\r\n */\r\n public void unpin();\r\n \r\n /**\r\n * Replace references to elements with direct references.\r\n * It will impove spped of manipulations with links, but it can cause\r\n * recursive loading in memory large number of objects and as a result - memory\r\n * overflow, because garbage collector will not be able to collect them\r\n */\r\n public void pin(); \r\n}", "public void linkShare() {\n\t\tclientOutput.println(\">>> Link do vaseg drajva je: \" + new File(\"drive\").getAbsolutePath() + \"\\\\\" + username);\n\t}", "@Override\n\tpublic void rotiereNachLinks() {\n\n\t}", "public List<String> getLinks();", "private PersistentLinkedList<T> changeLinks(int treeIndexFrom, int treeIndexTo) {\n PersistentLinkedList<T> newVersion = this\n .changeLinksHelper(treeIndexFrom, treeIndexTo, false);\n return newVersion.changeLinksHelper(treeIndexTo, treeIndexFrom, true);\n }", "public Links() {\n }", "List<Link> getLinks();", "public void populateLinks(List<Drop> drops, Account queryingAccount) {\n \n \t\tList<Long> dropIds = new ArrayList<Long>();\n \t\tfor (Drop drop : drops) {\n \t\t\tdropIds.add(drop.getId());\n \t\t}\n \n \t\tString sql = \"SELECT `droplet_id`, `link_id` AS `id`, `url` \";\n \t\tsql += \"FROM `droplets_links` \";\n \t\tsql += \"INNER JOIN `links` ON (`links`.`id` = `link_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `links`.`id` NOT IN ( \";\n \t\tsql += \"SELECT `link_id` \";\n \t\tsql += \"FROM `account_droplet_links` \";\n \t\tsql += \"WHERE `account_id` = :account_id \";\n \t\tsql += \"AND `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `deleted` = 1) \";\n \t\tsql += \"UNION ALL \";\n \t\tsql += \"SELECT `droplet_id`, `link_id` AS `id`, `url` \";\n \t\tsql += \"FROM `account_droplet_links` \";\n \t\tsql += \"INNER JOIN `links` ON (`links`.`id` = `link_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `account_id` = :account_id \";\n \t\tsql += \"AND `deleted` = 0 \";\n \n \t\tQuery query = em.createNativeQuery(sql);\n \t\tquery.setParameter(\"drop_ids\", dropIds);\n \t\tquery.setParameter(\"account_id\", queryingAccount.getId());\n \n \t\t// Group the links by drop id\n \t\tMap<Long, List<Link>> links = new HashMap<Long, List<Link>>();\n \t\tfor (Object oRow : query.getResultList()) {\n \t\t\tObject[] r = (Object[]) oRow;\n \n \t\t\tLong dropId = ((BigInteger) r[0]).longValue();\n \t\t\tLink link = new Link();\n \t\t\tlink.setId(((BigInteger) r[1]).longValue());\n \t\t\tlink.setUrl((String) r[2]);\n \n \t\t\tList<Link> l = links.get(dropId);\n \t\t\tif (l == null) {\n \t\t\t\tl = new ArrayList<Link>();\n \t\t\t\tlinks.put(dropId, l);\n \t\t\t}\n \n \t\t\tl.add(link);\n \t\t}\n \n \t\tfor (Drop drop : drops) {\n \t\t\tList<Link> l = links.get(drop.getId());\n \n \t\t\tif (l != null) {\n \t\t\t\tdrop.setLinks(l);\n \t\t\t} else {\n \t\t\t\tdrop.setLinks(new ArrayList<Link>());\n \t\t\t}\n \t\t}\n \t}", "protected java.util.Vector _getLinks() {\n\t\tjava.util.Vector links = new java.util.Vector();\n\t\tlinks.add(getLeaseTaskStartsLink());\n\t\tlinks.add(getLeaseRulesLink());\n\t\treturn links;\n\t}", "public LinksResource() {\n }", "public Link add(Link link);", "public void setLinkName(String linkName);", "protected DefaultLink() {\n }", "public interface Link<T> {\n\n /**\n * Resolve the link and get the underlying object.\n *\n * @return the target of the link, not null\n * @throws DataNotFoundException if the link is not resolved\n */\n T resolve();\n\n /**\n * Get the type of the object that this link targets.\n *\n * @return the type of the object, not null\n */\n Class<T> getTargetType();\n\n // TODO - do we want a method to generate a resolved version of a config object e.g. new ResolvedConfigLink(resolver.resolve())\n}", "void resetLink(Link link, Node source, Node target, Dependency type) {\n\t\tlinks.remove(link);\n\t\tlinks.add(new Link(source, target, type, source));\n\t}", "@GetMapping(path = \"/shorten\")\n public @ResponseBody\n UrlResponse shortenUrl(@RequestParam String link) {\n if (!urlService.isValidLink(link)) {\n throw new IllegalArgumentException(\"O Link deve possuir pelo menos 5 caracteres e no máximo 36\");\n }\n\n Url url = urlService.saveUrl(link);\n String urlStr = String.format(\"%s:%s/%s\",address, port, url.getNewUrl());\n return new UrlResponse(urlStr, url.getExpiresAt());\n }", "LinkRelationsLibrary createLinkRelationsLibrary();", "private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }", "@Override\n\t@Transactional\n\tpublic String createLinks(int page, int limit) {\n\t\treturn agamaDAO.createLinks(page, limit);\n\t}", "@Test\n\tpublic void urlShortenerServiceTest() throws GenerateUrlShortenedDuplicatedException {\n\t\twhen(validateUrlShortenerDuplicatedToUrlOriginalAndValidToService.isDuplicated(any(UrlShortenedDto.class)))\n\t\t\t\t.thenReturn(false);\n\t\tGeneratorRandomAlphanumericStringHelper generatorRandomAlphanumericStringHelper = new GeneratorRandomAlphanumericStringHelperImpl();\n\t\tUrlShortenerService urlShortenerService = new UrlShortenerServiceImpl(5, 10,\n\t\t\t\tgeneratorRandomAlphanumericStringHelper, logger,\n\t\t\t\tvalidateUrlShortenerDuplicatedToUrlOriginalAndValidToService, 3);\n\t\tUrlShortenedDto urlShortenedDto = urlShortenerService.shorten(urlOriginalDto);\n\n\t\tassertEquals(true, urlShortenedDto.getShortenedAddress().length() > 5);\n\t\tassertEquals(true, urlShortenedDto.getShortenedAddress().length() < 10);\n\n\t}", "@Scheduled(fixedRate = checkRate - 1000) // Un minuto menos\n public void getUrls() {\n urlList = shortURLRepository.listAll();\n }", "public NewReferenceValueStrategy replaceWithFullUrl() {\n return update -> linkProperties.r4().readUrl(update.resourceType(), update.newResourceId());\n }", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "@Transactional(readOnly = true) \n public Page<ShortLink> findAll(Pageable pageable) {\n log.debug(\"Request to get all ShortLinks\");\n Page<ShortLink> result = shortLinkRepository.findAll(pageable); \n return result;\n }", "public OntologyLinkModeTool()\n \t{\n \tedu.tufts.vue.ontology.ui.OntologyBrowser.getBrowser().addOntologySelectionListener(this);\n \t//creationLink.setID(\"<creationLink>\"); // can't use label or it will draw one \n \t//invisibleLinkEndpoint.addLinkRef(creationLink);\n \tcreationLink=null;\n invisibleLinkEndpoint.setSize(0,0);\n \n \t}", "public IBusinessObject copyHyperLinksOf(IBusinessObject source)\n throws OculusException;", "@Test\n\tpublic void testGetLinksRelativeLink() {\n\t\tList<String> results = helper\n\t\t\t\t.getLinks(\"drop tables; <A HREF=\\\"/test\\\"> junk junk\", \"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"http://www.bobbylough.com/test\", results.get(0));\n\t}", "public static void main(String[] args) {\n LinkRemoveDuplicates2 ll=new LinkRemoveDuplicates2();\r\n\r\n ll.insertFirst(40);\r\n\r\n ll.insertFirst(30);\r\n \r\n ll.insertFirst(20);\r\n ll.insertFirst(20);\r\n ll.insertFirst(10);\r\n ll.insertFirst(10);\r\n System.out.println(\"Initial List->\");\r\n ll.printList();\r\n ll.head=ll.remove(ll.head);\r\n System.out.println(\"\\n\\nAfter removing duplicates->\");\r\n ll.printList();\r\n\t}", "public synchronized LinkedList<SummaryLink> getLinks(User user) {\n\t\tLinkedList<SummaryLink> links = super.getLinks(user);\n\t\tif (allowsAdminBy(user)) {\n\t\t\tString qs = \"?p=\"+pipeline.getPipelineIndex()+\"&s=\"+stageIndex+\"&f=0\";\n\t\t\tif (scriptFile != null) {\n\t\t\t\tlinks.addFirst( new SummaryLink(\"/script\"+qs, null, \"Edit the Anonymizer Script File\", false) );\n\t\t\t}\n\t\t}\n\t\treturn links;\n\t}", "public interface ContentDuplicator {\n\n /**\n * Gets the ID of the store from which content is to be retrieved\n * @return storeId of the FROM storage provider\n */\n public String getFromStoreId();\n\n /**\n * Gets the ID of the store to which content is to be duplicated\n * @return storeId of the TO storage provider\n */\n public String getToStoreId();\n\n /**\n * This method creates a newly duplicated content item in the arg spaceId\n * with the arg contentId.\n *\n * @param spaceId of content item\n * @param contentId of content item\n * @return checksum of content\n */\n public String createContent(String spaceId, String contentId);\n\n /**\n * This method updates an existing content item in the arg spaceId with the\n * arg contentId\n *\n * @param spaceId of content item\n * @param contentId of content item\n */\n public void updateContent(String spaceId, String contentId);\n\n /**\n * This method deletes an existing content item in the arg spaceId with the\n * arg contentId\n *\n * @param spaceId of content item\n * @param contentId of content item\n */\n public void deleteContent(String spaceId, String contentId);\n\n /**\n * This method performs any necessary clean-up of the ContentDuplicator.\n */\n public void stop();\n}", "protected void mutateAddLink() {\n\t\t// Make sure network is not fully connected\n\n\t\t// Sum number of connections\n\t\tint totalconnections = numGenes();\n\n\t\t// Find number of each type of node\n\t\tint in = population.numInputs;\n\t\tint out = population.numOutputs;\n\t\tint hid = numNodes() - (in + out);\n\n\t\t// Find the number of possible connections.\n\t\t// Links cannot end with an input\n\t\tint fullyconnected = 0;\n\t\tfullyconnected = (in + out + hid) * (out + hid);\n\n\t\tif (totalconnections == fullyconnected)\n\t\t\treturn;\n\n\t\t// Pick 2 nodes for a new connection and submit it\n\t\tNNode randomstart;\n\t\tNNode randomend;\n\t\tdo {\n\t\t\trandomstart = getRandomNode();\n\t\t\trandomend = getRandomNode();\n\t\t} while (randomend.type == NNode.INPUT\n\t\t\t\t|| hasConnection(randomstart.ID, randomend.ID));\n\n\t\tint newgeneinno = population\n\t\t\t\t.getInnovation(randomstart.ID, randomend.ID);\n\t\tGene newgene = new Gene(newgeneinno, randomstart.ID, randomend.ID,\n\t\t\t\tBraincraft.randomWeight(), true);\n\t\tpopulation.registerGene(newgene);\n\t\tsubmitNewGene(newgene);\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"link creation mutation \" + ID + \" \"\n\t\t\t\t\t+ newgene.innovation + \" \" + randomstart.ID + \" \"\n\t\t\t\t\t+ randomend.ID);\n\t}", "public PhysicalLink() {\n\n }", "private static GameDto addLinks(GameDto gameDto) {\n addSelfLink(gameDto);\n addGameJoinLink(gameDto);\n addPitMoveLink(gameDto);\n return gameDto;\n }", "private void duplicate(Node nodo) {\n int reference_page = nodo.getReference();\n if(this.debug)\n System.out.println(\"ExtHash::duplicate >> duplicando nodo con referencia \" + reference_page);\n\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contenido de la pagina:\");\n for(int i=1; i<content.get(0); i++) {\n System.out.println(\" \" + content.get(i));\n }\n }\n\n int shift = nodo.getAltura();\n nodo.activateReference(false);\n\n ArrayList<Integer> left = new ArrayList<>();\n ArrayList<Integer> right = new ArrayList<>();\n\n for(int i=1; i<=content.get(0); i++) {\n int chain = content.get(i);\n if((chain & (1 << shift)) == 0) {\n left.add(chain);\n } else {\n right.add(chain);\n }\n }\n\n left.add(0, left.size());\n right.add(0, right.size());\n\n this.fm.write(left, reference_page); this.out_counter++;\n Node l = new Node(reference_page);\n l.setAltura(shift + 1);\n\n this.fm.write(right, this.last); this.out_counter++;\n Node r = new Node(this.last); this.last++;\n r.setAltura(shift + 1);\n\n total_active_block++;\n\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contentido de paginas duplicadas(left), ref: \" + reference_page);\n for(int i=0; i<left.size(); i++) {\n System.out.println(\" \" + left.get(i));\n }\n }\n\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contentido de paginas duplicadas(right), ref: \" + (this.last - 1));\n for(int i=0; i<right.size(); i++) {\n System.out.println(\" \" + right.get(i));\n }\n }\n\n nodo.addLeftNode(l);\n nodo.addRightNode(r);\n\n ArrayList<Integer> last = new ArrayList<>();\n last.add(0);\n if(left.get(0) == B-2 && shift + 1 < 30) {\n this.duplicate(l);\n } else if(left.get(0) == B-2 && shift + 1 == 30) {\n left.add(this.last);\n this.fm.write(left, l.getReference()); this.out_counter++;\n\n this.fm.write(last, this.last); this.out_counter++;\n this.last++;\n }\n\n if(right.get(0) == B-2 && shift + 1 < 30) {\n this.duplicate(r);\n } else if(right.get(0) == B-2 && shift + 1 == 30) {\n right.add(this.last);\n this.fm.write(right, r.getReference()); this.out_counter++;\n\n this.fm.write(last, this.last); this.out_counter++;\n this.last++;\n }\n }", "public void setLink(String link) {\r\n this.link = link;\r\n }", "public void setLinks(List<Link> links)\n {\n this.links = links;\n }", "@Override\n\tpublic String addNewValueToGlobalURLList(String longUrl){\n\t\t\n\t\tString shortUrl = shortenUrl(longUrl);\n\t\tString SQL = \"insert into GlobalUrlDB (shortUrl, longUrl, visitCount) values (?, ?, ?)\";\n\t\tObject[] params = new Object[] { shortUrl, longUrl, 0 };\n\t\ttry{\n\t\t\tjdbcTemplateObject.update( SQL, params);\n\t\t\treturn shortUrl;\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception occured while user tried to shorten URL\");\n\t\t\t/*Put Stack trace into logger file*/\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract URL getFileLink(ChangeSet.Item item) throws IOException;", "void queueInternalLinks(Elements paragraphs) {\n // FILL THIS IN!\n\t\tfor(Element paragraph: paragraphs)\n\t\t{\n\t\t\tIterable<Node> iterator = new WikiNodeIterable(paragraph);\n\t\t\tfor(Node node: iterator)\n\t\t\t{\n\t\t\t\tif(node instanceof Element)\n\t\t\t\t{\n\t\t\t\t\tString link = node.attr(\"href\");\n\t\t\t\t\tif(link.startsWith(\"/wiki/\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tqueue.add(\"https://en.wikipedia.org\" + ((Element)node).attr(\"href\"));\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setLink(String link)\n {\n this.link = link;\n }", "@Override\n\tpublic ArrayList<String> getLinks() {\n\t\treturn this.description.getLinks();\n\t}", "public WCLinkedList(){\n size=0;\n head = null;\n tail = null;\n }", "void setLink(DependencyLink newLink);", "void updateLinks() {\n\t\tdouble x1, x2, y1, y2;\n\t\tfor(int i=0; i<links.size();i++){\n\t\t\tPNode node1 = links.get(i).getNode1();\n\t\t\tPNode node2 = links.get(i).getNode2();\n\t\t\tx1 = node1.getFullBoundsReference().getCenter2D().getX() + node1.getParent().getFullBounds().getOrigin().getX();\n\t\t\ty1 = node1.getFullBoundsReference().getCenter2D().getY() + node1.getParent().getFullBounds().getOrigin().getY();\n\t\t\tx2 = node2.getFullBoundsReference().getCenter2D().getX() + node2.getParent().getFullBounds().getOrigin().getX();\n\t\t\ty2 = node2.getFullBoundsReference().getCenter2D().getY() + node2.getParent().getFullBounds().getOrigin().getY();\n\t\t\t\n\t\t\t/*\n\t\t\tLine2D line = new Line2D.Double(x1,y1,x2,y2);\n\t\t\tlinks.get(i).getPPath().setPathTo(line);\n */\n\t\t\tsetPolyLine(links.get(i).getPPath(), (float)x1, (float)y1, (float)x2, (float)y2);\n\t\t\t}\n\t\t}", "public Set<String> getLinks() {\n return links;\n }", "private void createIndexLink()\r\n \t{\r\n \t\tif (pageTitle.contains(\"Ruby on Rails\")) {\r\n \t\t\tSimpleLogger.verbose(\" TOC file: not creating index link (no stichwort.htm*\");\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tSimpleLogger.verbose(\" TOC file: creating index link...\");\r\n \t\tElement indexLink = (Element) xPathQuery(XPath.TOC_HEADING_2.query).get(0).copy();\r\n \t\tString fileExtension = \".htm\";\r\n \t\tif (((Element) indexLink.getChild(0)).getAttribute(\"href\").getValue().contains(\".html\"))\r\n \t\t\tfileExtension = \".html\";\r\n \t\t((Element) indexLink.getChild(0)).getAttribute(\"href\").setValue(\"stichwort\" + fileExtension);\r\n \t\t((Text) indexLink.getChild(0).getChild(0)).setValue(\"Index\");\r\n \t\tbodyTag.appendChild(indexLink);\r\n \r\n \t}", "ReferenceEmbed createReferenceEmbed();", "public UrlShortenerResponse generateShortUrl(String longUrl) {\n UrlShortenerResponse urlShortenerResponse = new UrlShortenerResponse();\n String shortUrl = generateValidatedShortUrl(longUrl);\n urlShortenerResponse.setShortUrl(shortUrl);\n urlShortenerResponse.setAgent(getBrowserAgent().toString());\n //Saving to database before returning\n ShortenerMapping shortenerMappings = new ShortenerMapping();\n shortenerMappings.setLongUrl(longUrl);\n shortenerMappings.setShortUrl(shortUrl);\n shortenerMappings.setBrowserName(getBrowserAgent().toString());\n if (!shortenerRepository.existsByLongUrl(longUrl)) {\n persist(shortenerMappings);\n }\n return urlShortenerResponse;\n }", "private String generateValidatedShortUrl(String longUrl) {\n if (shortenerRepository.existsByLongUrl(longUrl))\n return shortenerRepository.findShortenerMappingsByLongUrl(longUrl).getShortUrl();\n String shortUrlKey = Utils.generateShortKey(longUrl);\n while (shortenerRepository.existsByShortUrl(serviceUrl + \"/\" + shortUrlKey)) {\n shortUrlKey = generateValidatedShortUrl(longUrl);\n }\n return serviceUrl + \"/\" + shortUrlKey;\n }", "public Collection<Map<String, String>> getLinks();", "public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}", "public void setLink(String link) {\r\n this.link = link;\r\n }", "private URLs() {\n }", "String getLinkName();", "public void setLink(String link) {\n this.link = link;\n }", "public void setLink(String link) {\n this.link = link;\n }", "public void setLink(String link) {\n this.link = link;\n }", "public void addBulkLinks(List<String> strings, boolean ignoreCase, File f, int debug);", "public AnnotateClueRunWithURLs() {\r\n\t}", "public SaucelabsLinkGenerator() {\n \t\n }", "public FileNode getLink(){return super.getVirtualSource();}" ]
[ "0.6583132", "0.62190443", "0.5920737", "0.57477015", "0.5671487", "0.56691295", "0.55747914", "0.55247134", "0.5500945", "0.543127", "0.5414929", "0.5393955", "0.53521556", "0.53513587", "0.53133506", "0.52768016", "0.5268305", "0.52527684", "0.5244425", "0.5228946", "0.52153593", "0.5202156", "0.51915", "0.5174943", "0.5170407", "0.5165004", "0.5134992", "0.5133151", "0.512381", "0.51218", "0.51027715", "0.5102236", "0.50955826", "0.5077029", "0.5076092", "0.5074792", "0.50698423", "0.5064864", "0.50647557", "0.50579065", "0.5053159", "0.50525457", "0.50475734", "0.50302243", "0.5025813", "0.5020087", "0.4960444", "0.495933", "0.49376914", "0.4927378", "0.4922991", "0.49223846", "0.49200067", "0.49188524", "0.49076563", "0.49023414", "0.4899826", "0.4897667", "0.48953468", "0.4894606", "0.48918006", "0.48838246", "0.48776874", "0.48725918", "0.48696026", "0.48577154", "0.4853823", "0.48532525", "0.48501524", "0.484931", "0.48475423", "0.48439482", "0.4839176", "0.48381507", "0.48373803", "0.4832244", "0.48317373", "0.4825656", "0.48253036", "0.48030138", "0.48024696", "0.47958994", "0.4792222", "0.47846237", "0.47752178", "0.47697598", "0.47573864", "0.47534445", "0.47528055", "0.47477517", "0.47460857", "0.4738503", "0.47381678", "0.47358477", "0.47358477", "0.47358477", "0.47329977", "0.4731951", "0.47238788", "0.47237846" ]
0.47802746
84
Returns a list of patients where first name OR last name LIKE name.
public List<Patient> getByName(String name) { return getByCriterion(Restrictions.or(Restrictions.like("firstname", name), Restrictions.like("lastname", name))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);", "@Query(\"MATCH (p:Person) \" + \"WHERE LOWER(p.firstName) CONTAINS LOWER({0}) \"\n + \"AND LOWER(p.lastName) CONTAINS LOWER({1}) \" + \"RETURN p\")\n Iterable<Person> locateByFirstLast(String firstName, String lastName);", "List<Student> findAllByLastNameLike(String lastName);", "List<AddressbookEntry> findByLastNameLike(String pattern);", "public ArrayList<NameRecord> getMatches(String partialName){\n\t\tpartialName=partialName.toLowerCase();\n\t\tArrayList<NameRecord> result = new ArrayList<NameRecord>();\n\t\tfor (int i = 0;i<names.size();i++){\n\t\t\tString s = names.get(i).toLowerCase();\n\t\t\tif (s.contains(partialName)){\n\t\t\t\tresult.add(list.get(i));\n\t\t\t}\n\t\t}\t\n\t\treturn result;\n\t}", "List<User> findByfnameContaining(String search);", "List<Person> findByLastName(String lastName);", "public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }", "List<Contact> findByNameLike(String name);", "PersonFinder whereNameStartsWith(String prefix);", "public String searchPerson(String name){\n String string = \"\";\n ArrayList<Person> list = new ArrayList<Person>();\n \n for(Person person: getPersons().values()){\n String _name = person.getName();\n if(_name.contains(name)){\n list.add(person);\n }\n }\n list.sort(Comparator.comparing(Person::getName));\n for (int i = 0; i < list.size(); i++){\n string += list.get(i).toString();\n }\n\n return string;\n }", "public List<Student> getStudentsByFirstName(String fname) {\n\t\tList<Student> sameNames = new ArrayList<Student>();\r\n\t\t\r\n\t\t//loop over array list\r\n\t\t//for student type elements in the students array list do\r\n\t\tfor(Student student: students) {\r\n\t\t\t//if i find a student with the given first name then add to list\r\n\t\t\tif(student.getFirstName().equalsIgnoreCase(fname)) {\r\n\t\t\t\tsameNames.add(student);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//check if list has any students\r\n\t\tif(sameNames.size()>0) {\r\n\t\t\t//if students were found then return the list\r\n\t\t\treturn sameNames;\r\n\t\t}\r\n\t\t\r\n\t\t//if no students were found with that first name then return null\r\n\t\treturn null;\r\n\t}", "PersonFinder whereFirstNameStartsWith(String prefix);", "List<Customer> findByNameOrSurname(String name, String surname);", "public List<SickPerson> getSickPersonList(String lastNameSubString) throws SQLException;", "List<Customer> findByFirstNameAndLastName(String firstName, String lastName);", "@Repository(\"userRepository\")\npublic interface UserRepository extends JpaRepository<User, UUID> {\n\n User findByEmail(String email);\n\n List<User> findByFirstNameIgnoreCaseContaining(String firstName);\n\n List<User> findByLastNameIgnoreCaseContaining(String lastName);\n\n List<User> findByEmailIgnoreCaseContaining(String email);\n\n @Query(\"SELECT t FROM User t WHERE \" +\n \"LOWER(t.lastName) LIKE LOWER(CONCAT('%',:searchTerm, '%')) OR \" +\n \"LOWER(t.firstName) LIKE LOWER(CONCAT('%',:searchTerm, '%'))\")\n Page<User> searchByTerm(@Param(\"searchTerm\") String searchTerm, Pageable pageable);\n}", "@Query(\"select i from Item i where lower(i.name) like lower(:namePart)\")\n List<Item> searchInNames(@Param(\"namePart\") String namePart);", "public List<Patient> findAllByOrderByFirstNameAsc();", "public static ResultSet searchBySurname(String name) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE Surname =?;\");\r\n\t\t\tstmt.setString(1, name);\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "List<User> findByFirstname(String firstName);", "public ArrayList<AddressEntry> find(String startOf_lastName) {\n ArrayList<AddressEntry> filteredList = new ArrayList<>();\n\n for (int i = 0; i < addressEntryList.size(); i++) {\n if (addressEntryList.get(i).getLastName().toLowerCase().startsWith(startOf_lastName.toLowerCase())) {\n filteredList.add(addressEntryList.get(i));\n }\n }\n\n return filteredList;\n }", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "List<Customer> findByLastName(String lastName);", "public List findByLastName2(String pattern) {\n return findMany(new FindByLastName(pattern));\n }", "public Student findStudent(String firstName, String lastName)\n\t{\n\t\tStudent foundStudent = null;\t\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\t\n\t\t\tif (b.getStrNameFirst ( ) != null && b.getStrNameFirst().contains(firstName))\n\t\t\t{\n\t\t\t\tif(b.getStrNameLast ( ) != null && b.getStrNameLast().contains(lastName))\n\t\t\t\t{\n\t\t\t\t\tfoundStudent = b;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn foundStudent;\n\t}", "Iterable<Customer> findByLastName(String lastName);", "public Address SearchContact(String firstName,String lastName) {\r\n int i = 0;\r\n while (!contact.get(i).getFirstName().equals(firstName) && !contact.get(i).getLastName().equals(lastName)){\r\n i++;\r\n }\r\n return contact.get(i);\r\n }", "public ArrayList<AddressEntry> searchByName(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getName().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "PersonFinder whereNameContains(String fragment);", "public ArrayList<Patient> chercherPatient(String recherche) {\r\n ArrayList<Patient> p=new ArrayList();\r\n for (int i = 0; i < patients.size(); i++) {\r\n if ((patients.get(i).getNomUsuel()+patients.get(i).getPrenom()).toLowerCase().contains(recherche.trim().toLowerCase())) {\r\n p.add(patients.get(i));\r\n }\r\n }\r\n return p;\r\n }", "List<Student> findByNameContainingIgnoringCase(String name);", "@SuppressWarnings(\"unchecked\")\n public Collection<Person> findPersonsByLastName(String lastName) throws DataAccessException {\n return template.find(\"from Person p where p.lastName = ?\", lastName);\n }", "@ApiOperation(value = \"Api Endpoint to search for the Patient record - Only using User name\")\n @GetMapping(\"search\")\n @LogExecutionTime\n public List<PatientDto> searchPatientRecords(@RequestParam(name = \"search\") String search,\n @RequestParam(name = \"page\", defaultValue = \"0\") int page,\n @RequestParam(name = \"limit\", defaultValue = \"10\") int limit,\n @RequestParam(name = \"orderBy\", defaultValue = \"asc\") String orderBy) {\n return patientService.searchPatientRecords(search, page, limit, orderBy);\n }", "private boolean searchName(String username, ArrayList<String> existingList) {\n int low = 0;\n int high = existingList.size() - 1;\n int mid;\n\n while (low <= high) {\n mid = (low + high) / 2;\n String name = existingList.get(mid);\n String substr = name.substring(0, name.indexOf(\" \"));\n\n if (substr.compareToIgnoreCase(username) < 0) {\n low = mid + 1;\n } else if (substr.compareToIgnoreCase(username) > 0) {\n high = mid - 1;\n } else {\n return true;\n }\n\n }\n\n return false;\n }", "List<StudentRecord> getStudentsWithNameFilter(char lastNameCharFilter, String clientId) throws Exception;", "public List<Student> findAllStudentsByName(String name) {\n\t\t\n\t\tArrayList<Student> list = new ArrayList<Student>();\n\t\t\n\t\tname = name.toLowerCase();\n\t\t\n\t\tfor(Student s : students) {\n\t\t\tString sName = s.getName().toLowerCase();\n\t\t\tif (sName.startsWith(name)) {\n\t\t\t\tlist.add(s);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@RequestMapping(value = \"/getAllNamesStartWith\", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })\r\n\tpublic List<Employee> getNamesStartWith(@RequestParam String name){\r\n\t\treturn repository.getAllEmpoyees().stream().filter(emp -> emp.getEmpName().startsWith(name)).collect(Collectors.toList());\r\n\t}", "public List<Employe> findByEnameInOrEaddIn(List<String> names,List<String> addresses);", "public List<Actor> findByFirstNameAndLastName(@Param(\"firstName\") String firstName, @Param(\"lastName\")String lastName);", "public List<Produto> findByNomeLike(String nome);", "public List<Employe> findByEnameStartingWithAndEaddStartingWith(String name,String addrs);", "@Query(\"FROM Employee WHERE name = :name OR location = :location \")\n List<Employee> getEmployeeByNameOrLocation(String name, String location);", "@RestResource(path = \"search\", rel = \"search\")\n List<MonographEditors> findByFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAllIgnoreCase(\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations);", "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}", "@Query(value = \"select * from account_details where name ILIKE concat('%',?1,'%')\"+\n \" or country ILIKE concat('%',?1,'%') or address ILIKE concat('%',?1,'%')\"+\n \" or state ILIKE concat('%',?1,'%')\"+\n \" or city ILIKE concat('%',?1,'%')\",nativeQuery = true)\n List<AccountDetail> retrieveAllBySearchCriteria(String pattern);", "public List<T> findByName(String text) {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u where u.name like :name\");\n\t q.setParameter(\"name\", \"%\" + text + \"%\");\n\t return q.getResultList();\n\t }", "public ArrayList<Guest> searchGuestList(String name) {\n \tString checkName = name.toUpperCase();\n \tArrayList<Guest> result = new ArrayList<>();\n \tfor(Guest guest : guestList){\n if(guest.getName().toUpperCase() != null && guest.getName().toUpperCase().contains(checkName)) {\n \tresult.add(guest);\n }\n }\n \treturn result;\n }", "@PostMapping(\"get-by\")\n public Iterable<Generic> getUsersByName(\n @RequestParam(value = \"firstname\", required = false) String firstname,\n @RequestParam(value = \"lastname\", required = false) String lastname,\n @RequestParam(value = \"name\", required = false) String name\n ) {\n if (!StringUtils.isEmpty(firstname)) return genericService.getUsersByFirstname(firstname);\n if (!StringUtils.isEmpty(lastname)) return genericService.getUsersByLastname(lastname);\n if (!StringUtils.isEmpty(name)) return genericService.getUsersByName(name);\n return new ArrayList<>();\n }", "@JsonView(JSONView.ParentObject.class)\n\t@RequestMapping(value = \"/users\", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)\n\tpublic List<MMDHUser> findAll(@RequestParam(value = \"searchByOperator\", required = false) String searchByOperator,\n\t\t\t@RequestParam(value = \"firstName\", required = false) String firstName,\n\t\t\t@RequestParam(value = \"lastName\", required = false) String lastName) {\n\n\t\tif (StringUtils.hasLength(searchByOperator) && StringUtils.hasLength(firstName)\n\t\t\t\t&& StringUtils.hasLength(lastName)) {\n\t\t\tif (searchByOperator.equals(\"AND\"))\n\t\t\t\treturn userRepo.findByFirstNameAndLastName(firstName, lastName);\n\t\t\telse if (searchByOperator.equals(\"OR\"))\n\t\t\t\treturn userRepo.findByFirstNameOrLastName(firstName, lastName);\n\t\t} else if (StringUtils.hasLength(firstName) && !StringUtils.hasLength(lastName)) {\n\t\t\tif (StringUtils.hasLength(searchByOperator) && searchByOperator.equals(\"LIKE\"))\n\t\t\t\treturn userRepo.findByFirstNameLike(firstName + \"%\");\n\t\t\treturn userRepo.findByFirstName(firstName);\n\t\t} else if (!StringUtils.hasLength(firstName) && StringUtils.hasLength(lastName)) {\n\t\t\tif (StringUtils.hasLength(searchByOperator) && searchByOperator.equals(\"LIKE\"))\n\t\t\t\treturn userRepo.findByLastNameLike(lastName + \"%\");\n\t\t\treturn userRepo.findByLastName(lastName);\n\t\t}\n\t\treturn userRepo.findAll();\n\t}", "@PreAuthorize(\"hasAnyAuthority(T(rs.acs.uns.sw.sct.util.AuthorityRoles).ADMIN, T(rs.acs.uns.sw.sct.util.AuthorityRoles).ADVERTISER, T(rs.acs.uns.sw.sct.util.AuthorityRoles).VERIFIER)\")\n @GetMapping(\"/users/search/type-ahead\")\n public ResponseEntity<List<UserDTO>> searchTypeAhead(@RequestParam(value = \"firstName\", required = false) String firstName,\n @RequestParam(value = \"lastName\", required = false) String lastName) {\n List<UserDTO> list = userService.findBySearchTermOR(firstName, lastName)\n .stream().map(user -> user.convertToDTO())\n .collect(Collectors.toList());\n return new ResponseEntity<>(list, HttpStatus.OK);\n }", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "public List<VictimEntity> findByFirstName(String name);", "@SuppressWarnings(\"unchecked\")\r\n public Collection<Person> findPersonsByName(String name) throws DataAccessException {\r\n return template.find(\"from Person p where p.lastName = ?\", name);\r\n }", "public ArrayList<AddressEntry> searchByNote(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getNote().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "private List<User> simulateSearchResult(String firstName)\n\t{\n\n\t\tArrayList<User> user=(ArrayList<User>) userService.getAllUsers();\n\t\tArrayList<User> result = new ArrayList<User>();\n\t\tfor (User u : user) {\n\t\t\tif (u.getFirstName().contains(firstName)) {\n\t\t\t\tresult.add(u);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "List<Item> findByNameContainingIgnoreCase(String name);", "public interface OwnerService extends CrudService<Owner, Long>{\n\n Owner findByLastName(String lastName);\n\n // \"^[^a-zA-Z].*\"\n// @Query(\"SELECT o FROM owners o WHERE o.lastName LIKE %?1%\")\n List<Owner> findAllByLastNameLike(String lastName);\n}", "public ArrayList<String[]> getPatientsNameList()\r\n {\r\n\t String lists[]= new String[2];\r\n\t ArrayList<String[]> name = new ArrayList<String[]>();\r\n\t try \r\n\t {\r\n\t\tResultSet rs = stmt.executeQuery( \"SELECT * FROM PATIENTDATA;\" );\r\n\t\tint i =0;\r\n\t\twhile (rs.next())\r\n\t\t{\r\n\t\t\tlists[0] = rs.getString(\"LASTNAME\");\r\n\t\t\tlists[1]=rs.getString(\"FIRSTNAME\");\r\n\t\t\tname.add(lists);\r\n\t\t\tlists = new String[2];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn name;\r\n\t } \r\n\t catch (SQLException e) \r\n\t {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t }\r\n\t return name;\r\n\t \r\n }", "Director findByLastName(String lastName);", "private boolean containsName(String name, Human ... human) {\n boolean result = false;\n\n for(Human h : human) {\n if(h.getName().toLowerCase().contains(name.toLowerCase())) {\n result = true;\n break;\n }\n }\n\n return result;\n }", "private void searchPatient() {\r\n String lName, fName;\r\n lName = search_lNameField.getText();\r\n fName = search_fNameField.getText();\r\n // find patients with the Last & First Name entered\r\n patientsFound = MainGUI.pimsSystem.search_patient(lName, fName);\r\n\r\n // more than one patient found\r\n if (patientsFound.size() > 1) {\r\n\r\n // create String ArrayList of patients: Last, First (DOB)\r\n ArrayList<String> foundList = new ArrayList<String>();\r\n String toAdd = \"\";\r\n // use patient data to make patient options to display\r\n for (patient p : patientsFound) {\r\n toAdd = p.getL_name() + \", \" + p.getF_name() + \" (\" + p.getDob() + \")\";\r\n foundList.add(toAdd);\r\n }\r\n int length;\r\n // clear combo box (in case this is a second search)\r\n while ((length = selectPatient_choosePatientCB.getItemCount()) > 0) {\r\n selectPatient_choosePatientCB.removeItemAt(length - 1);\r\n }\r\n // add Patient Options to combo box\r\n for (int i = 0; i < foundList.size(); i++) {\r\n selectPatient_choosePatientCB.addItem(foundList.get(i));\r\n }\r\n\r\n // display whether patients found or not\r\n JOptionPane.showMessageDialog(this, \"Found More than 1 Result for Last Name, First Name: \" + lName + \", \" + fName\r\n + \".\\nPress \\\"Ok\\\" to select a patient.\",\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n\r\n selectPatientDialog.setVisible(true);\r\n }\r\n\r\n // one patient found\r\n else if (patientsFound.size() == 1) {\r\n\r\n JOptionPane.showMessageDialog(this, \"Found one match for Last Name, First Name: \" + lName + \", \" + fName,\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n // display patient data\r\n currentPatient = patientsFound.get(0);\r\n search_fillPatientFoundData(currentPatient);\r\n }\r\n // no patient found\r\n else {\r\n\r\n JOptionPane.showMessageDialog(this, \"No Results found for Last Name, First Name:\" + lName + \", \" + fName,\r\n \"Search Failed\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "Contact findByNameAndLastName(String name, String lastName);", "public List<com.ims.dataAccess.tables.pojos.User> fetchByFirstname(String... values) {\n return fetch(User.USER.FIRSTNAME, values);\n }", "List<Cloth> findByNameContaining(String name);", "static int searchFirstname(String firstName) {\n for (Person p : people) {\n if (p.getFirstName().contains(firstName))\n return people.indexOf(p);//returns the index of people in the list.\n\n }\n return -1;\n }", "@Query(\"SELECT s FROM Store s WHERE s.storename LIKE %?1%\" + \" OR CONCAT(s.address, '') LIKE %?1%\")\n\tpublic List<Store> search(String keyword);", "public static void searchName(Contact[] myContacts, String find)\n {\n int high = myContacts.length;\n int low = -1;\n int probe;\n while(high - low > 1)\n {\n probe = (high+low)/2;\n if(myContacts[probe].getName().compareTo(find) > 0)\n {\n high = probe;\n }\n else\n {\n low = probe;\n if(myContacts[probe].getName().compareTo(find) == 0)\n {\n break;\n }\n }\n }\n System.out.println(\"Find results: \");\n if((low>=0)&&(myContacts[low].getName().compareTo(find) == 0))\n {\n findMoreNames(myContacts, low, find);\n }\n else\n {\n System.out.println(\"There are no listings for \"+find);\n }\n }", "@Override\n\tpublic List<Applicant> getAllApplicantUsingRegex() {\n\t\tSystem.out.println(\"Fname Ending with a \");\n\t\tQuery query = new Query().addCriteria(Criteria.where(\"fname\").regex(\"a$\"));\n\t\treturn applicantMongoTemplate.find(query, Applicant.class);\n\t}", "@GetMapping(value = \"/search\")\n\tpublic String searchName(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\tmodel.addAttribute(\"employees\", employeerepository.findByFnameIgnoreCaseContaining(fname));\n\t\treturn \"employeelist\";\n\t}", "public List<com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter> fetchByFirstName(String... values) {\n return fetch(Voter.VOTER.FIRST_NAME, values);\n }", "@RestResource(path = \"search4\", rel = \"search\")\n List<MonographEditors> findByFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAndMonographOfPapersIdAllIgnoreCase(\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations,\n @Param(\"monographOfPapersId\") Long monographOfPapersId);", "public ArrayList<AddressEntry> searchByPhoneNumber(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getPhoneNumber().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "@Query(\"select i from Item i where lower(i.name) like lower(?1)\")\n Page<Item> searchInNames(String namePart, Pageable pageable);", "List<Employee> findByNameContaining(String keyword, Sort sort);", "public List<Person2> findByJobLocationIgnoreCase(String jobLocation);", "@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}", "public List<com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter> fetchByLastName(String... values) {\n return fetch(Voter.VOTER.LAST_NAME, values);\n }", "List<Employee> findByNameAndLocation(String name, String location);", "public void search(String LastName)\n {\n //delare variables to hold file types\n BufferedReader fIn = null;\n \n //try to open the file for reading\n try\n {\n fIn = new BufferedReader(new FileReader(filename)); \n \n }\n catch(IOException ioe)\n {\n System.out.println(\"search: Exception opening the file\");\n }\n \n //try to read each record\n //if the value of the Last_name field equals the value\n /*\n create a counter to count the number of\n matching records\n */\n int counter = 0;\n \n try\n {\n //read the first record\n String line = fIn.readLine();\n \n //while the record is not null\n //split the record into fields\n //test if the field equals the LastName parameter\n //display the record and increment the counter\n //read the next record\n while(line != null)\n {\n String[] info = line.split(\",\");\n String last = info[0];\n if(last.equals(LastName))\n {\n System.out.print(line);\n counter += 1;\n }\n else\n {\n line = fIn.readLine();\n System.out.print(line);\n counter += 1;\n }\n line = fIn.readLine();\n }\n System.out.println(\"\\nTotal matching records found: \" + counter + \"\\n\");\n \n \n }\n catch(IOException ioe)\n {\n System.out.println(\"search: Exception reading the file\");\n }\n\n // try to close the file\n try\n {\n fIn.close(); \n \n }\n catch(IOException ioe)\n {\n System.out.println(\"search: Exception closing the file\");\n }\n \n //dislay a count of the records found\n \n \n }", "public boolean checkPatient(List<Patient> list, String value){\n boolean exists = false;\n for (Patient r : list){\n if(r.getName().compareTo(value) == 0)\n exists = true;\n }\n return exists;\n }", "List<DataTerm> search(String searchTerm);", "@Override\n\tpublic List<User> getFirstNamesLike(String username) {\n\t\tQuery query = entityManager.createNativeQuery(\"SELECT em.* FROM spring_data_jpa_example.username as em \" +\n \"WHERE em.username LIKE ?\", User.class);\n query.setParameter(1, username + \"%\");\n return query.getResultList();\n\t}", "@Query(\"SELECT i FROM Item i WHERE \"+\n \"upper(i.name) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.number) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.waybill) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.factory) LIKE concat('%',upper(?1),'%')\")\n Page<Item> filterAll(String substring, Pageable pageable);", "public List<User> listSearch(String search);", "public Patient[] findID(String sv)\r\n\t{\r\n\t\tPatient[] foundPatients = new Patient[999];//Creates a blank array\r\n\t\tint count = 0;\r\n\r\n\t\tfor(int i=0; arrayPatients[i]!=null ;i++)//loops through the array\r\n\t\t{\r\n\t\t\tif(arrayPatients[i].forename.contains(sv)||arrayPatients[i].surname.contains(sv))//sees if either surname or firstname contain the search term allowing for partieal searching\r\n\t\t\t{\r\n\t\t\t\tfoundPatients[count] = arrayPatients[i];//if found it adds the patient to an array\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn foundPatients;//that array is then returned\r\n\t}", "public List<Partner> searchPartners(String searchText) throws SQLException {\n QueryBuilder<Partner, String> qb = partnerDao.queryBuilder();\n Where<Partner, String> where = qb.where();\n\n where.like(\"FirstName\", '%'+searchText+'%')\n .or()\n .like(\"LastName\", '%'+searchText+'%')\n .or()\n .like(\"Phone\", '%'+searchText+'%')\n .or()\n .like(\"CompanyName\", '%'+searchText+'%');\n\n PreparedQuery<Partner> preparedQuery = qb.prepare();\n\n return partnerDao.query(preparedQuery);\n }", "public void searchLogic(String partialLast) {\r\n\t\tArrayList<Patron> partialLastList = dblogic.getMatching(partialLast);\r\n\t\tresetTable();\r\n\t\tfor (int i = 0; i < partialLastList.size(); i++) {\r\n\t\t\ttable.setValueAt(partialLastList.get(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(partialLastList.get(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(partialLastList.get(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(partialLastList.get(i).getPatronDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(partialLastList.get(i).getPatronSince(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(partialLastList.get(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "public Collection<IPatient> searchPatients(String svn, String fname, String lname){\n _model = Model.getInstance();\n Collection<IPatient> searchresults = null;\n\n try {\n searchresults = _model.getSearchPatientController().searchPatients(svn, fname, lname);\n } catch (BadConnectionException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"BadConnectionException - Please contact support\");\n } catch (at.oculus.teamf.persistence.exception.search.InvalidSearchParameterException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"FacadeException - Please contact support\");\n } catch (CriticalDatabaseException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"CriticalDatabaseException - Please contact support\");\n } catch (CriticalClassException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"CriticalClassException - Please contact support\");\n }\n\n return searchresults;\n }", "public Iterable<Person> getPersonsByFirstName(String firstName) {\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tparams.put(\"firstName\", firstName);\n\t\t\n\t\tFilter filter = new Filter(\"firstName\", ComparisonOperator.EQUALS, firstName);\n\t\tCollection<Person> persons = session.loadAll(Person.class, filter, 2);\n\t\treturn persons;\n\t}", "private void filter(String text) {\n List<UserModel> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (UserModel item : userModels) {\n //if the existing elements contains the search input\n if (item.getFirstName().toLowerCase().contains(text.toLowerCase())||item.getId().toLowerCase().contains(text.toLowerCase())||item.getEmail().toLowerCase().contains(text.toLowerCase())){\n //adding the element to filtered list\n filterdNames.add(item);\n }\n }\n userAdapter.filterList(filterdNames);\n }", "@Query(value = \"SELECT * FROM account_details where name ILIKE concat('%',?1,'%') OR country ILIKE concat('%', ?1, '%') OR address ILIKE concat('%', ?1, '%') OR state ILIKE concat('%', ?1, '%')\",\n nativeQuery = true)\n List<Account> getSpecificAccount(String pattern);", "List<TeacherRecord> getTeachersWithNameFilter(char lastNameCharFilter, String clientId) throws Exception;", "Student findByLastName(String lastName);", "public List<Contact> getAllContactsByName(String searchByName);", "@SuppressWarnings(\"unused\")\n\tpublic String verifyPartialFirstLastName(String object, String data) {\n\t\tlogger.debug(\"verifying row count\");\n\t\ttry {\n\t\t\tboolean flag = false;\n\t\t\tList<WebElement> l1 = explictWaitForElementList(object);\n\t\t\tString temp[] = data.split(Constants.Name_SPLIT);\n\t\t\tfor (int i = 0; i < l1.size(); i++) {\n\t\t\t\tString input = l1.get(i).getText();\n\t\t\t\tif (input.toLowerCase().contains(temp[0].toLowerCase()) && input.toLowerCase().contains(temp[1].toLowerCase())) {\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (flag)\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--elements in auto search contains the input value\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--elements in auto search do not contains the input\";\n\n\t\t} \ncatch(TimeoutException ex)\n\t\t\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 + e.getLocalizedMessage();\n\t\t}\n\t}", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "@In String search();", "List<Authority> findByNameIn(List<AuthorityName> names);" ]
[ "0.6985896", "0.65394044", "0.6369445", "0.6351784", "0.6301061", "0.6206788", "0.58820057", "0.58750975", "0.5825637", "0.57777894", "0.5760304", "0.5732273", "0.56377006", "0.56225216", "0.56152916", "0.56140757", "0.55743694", "0.55576295", "0.55444646", "0.554259", "0.55389106", "0.55310774", "0.550026", "0.5480777", "0.54736066", "0.54648536", "0.54609674", "0.5457706", "0.5450556", "0.5445554", "0.54336715", "0.5389849", "0.538794", "0.5364074", "0.5353192", "0.5351262", "0.5349336", "0.5347646", "0.5345789", "0.53241503", "0.53180915", "0.53056157", "0.52896863", "0.52880424", "0.5270675", "0.5243076", "0.52381796", "0.5224301", "0.5222151", "0.52200705", "0.5215344", "0.52133906", "0.5187411", "0.5181994", "0.51792413", "0.5178461", "0.5171758", "0.5161344", "0.51585555", "0.51532966", "0.51500225", "0.5140884", "0.513248", "0.51286834", "0.512671", "0.51254445", "0.5124814", "0.51050127", "0.51029783", "0.5101151", "0.5087809", "0.50873107", "0.5084364", "0.50840336", "0.50820446", "0.5076456", "0.5064395", "0.50636566", "0.50535053", "0.5052981", "0.5051176", "0.50461507", "0.5040283", "0.5028158", "0.5023482", "0.5022754", "0.5015922", "0.50147927", "0.5005933", "0.50037736", "0.5002731", "0.49964088", "0.4979426", "0.49735966", "0.49727687", "0.49716854", "0.4963413", "0.4955798", "0.49448648", "0.4942736" ]
0.74001247
0
Creates new form EventPanel
public EventPanel(String panel, JFrame jFrame, Calendar calendar, Event event) { redLineBorder = BorderFactory.createLineBorder(Color.red); editing = false; startTime = Calendar.getInstance(); this.event = event; cb = new CustomerBuilder(); this.jFrame = jFrame; this.cal = calendar; phoneSearch = true; listener = Listeners.getList(); sletordlist = new ArrayList<>(); sletordlist.addAll(Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "")); try { errorControl = ErrorControl.getInstance(); cc = CustomerControl.getInstance(); mc = MassageControl.getInstance(); categoryControl = CategoryControl.getInstance(); meatControl = MeatControl.getInstance(); accompanimentControl = AccompanimentControl.getInstance(); grillControl = GrillControl.getInstance(); saladControl = SaladControl.getInstance(); bbqControl = BBQControl.getInstance(); } catch (ClassNotFoundException | SQLException ex) { try { errorControl.createErrorPopup("Fejl i forbindelse til databasen.", ex.getLocalizedMessage()); } catch (SQLException ex1) { System.out.println(ex1.getLocalizedMessage()); } } dateFormatTools = new DateFormatTools(); initComponents(); jTBBQTotalPrice.setText(""); jScrollPane2.setOpaque(false); jScrollPane2.getViewport().setOpaque(false); jScrollPane3.setOpaque(false); jScrollPane3.getViewport().setOpaque(false); listener.addListener(this); cl = (CardLayout) getLayout(); cl.addLayoutComponent(choosePanel, "vælg"); cl.addLayoutComponent(massagePanel, "massage"); cl.addLayoutComponent(bbqPanel, "bbq"); showPage(panel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreateNewEventJPanel() {\n }", "public AddEvent() {\n initComponents();\n }", "private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\n });\n }", "private void createFrame() {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinal JFrame frame = new JFrame(\"Create Event\");\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\t\ttry {\n\t\t\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfinal JTextArea textArea = new JTextArea(15, 50);\n\t\t\t\ttextArea.setText(\"Untitled Event\");\n\t\t\t\ttextArea.setWrapStyleWord(true);\n\t\t\t\ttextArea.setEditable(true);\n\t\t\t\ttextArea.setFont(Font.getFont(Font.SANS_SERIF));\n\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(1, 4));\n\t\t\t\tfinal JTextField d = new JTextField(\"\" + year + \"/\" + month + \"/\" + day);\n\t\t\t\tfinal JTextField startTime = new JTextField(\"1:00am\");\n\t\t\t\tJTextField t = new JTextField(\"to\");\n\t\t\t\tt.setEditable(false);\n\t\t\t\tfinal JTextField endTime = new JTextField(\"2:00am\");\n\t\t\t\tJButton save = new JButton(\"Save\");\n\t\t\t\tpanel.add(d);\n\t\t\t\tpanel.add(startTime);\n\t\t\t\tpanel.add(t);\n\t\t\t\tpanel.add(endTime);\n\t\t\t\tpanel.add(save);\n\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\teventsData.addEvent(new Event(YYYYMMDD(d.getText().trim()), startTime.getText(),\n\t\t\t\t\t\t\t\t\tendTime.getText(), textArea.getText()));\n\t\t\t\t\t\t\tupdateEventsView(eventsRender);\n\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\tif (ex instanceof IllegalArgumentException)\n\t\t\t\t\t\t\t\tpromptMsg(ex.getMessage(), \"Error\");\n\t\t\t\t\t\t\telse promptMsg(ex.getMessage(), \"Error\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tframe.setSize(500, 100);\n\t\t\t\tframe.setLayout(new GridLayout(2, 1));\n\t\t\t\tframe.add(textArea);\n\t\t\t\tframe.add(panel);\n\t\t\t\tframe.setLocationByPlatform(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t});\n\t}", "private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {\n\n initPanel();\n }", "public EventsGUI() {\n\t\t// ******** << DEBUGGING MENU FOR EVENTS ONLY >> ******** //\n\t\t// Source: https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html\n\t\tJPanel eventMenuPane = new JPanel(new FlowLayout());\n String menuOptions[] = { SWITCH, BUTTON, LEVER };\n JComboBox<String> eventMenu = new JComboBox<>(menuOptions);\n eventMenu.setEditable(false);\n eventMenu.addItemListener(eventsMain);\n eventMenuPane.add(eventMenu);\n eventMenuPane.setOpaque(false);\n eventMenuPane.setVisible(false); // REMOVE THIS LINE TO ACTIVATE EVENT DEBUGGING\n // ^^*****************************************************************^^ //\n\t\t\n // call methods which generate each event space's GUI\n createImageFiles();\n\t\tcreateSwitchSpace();\n\t\tcreateButtonGrid();\n\t\tcreateLeverSpace();\n\t\tcreateMessageWindow();\n\t\t\n\t\t// add each event's panel to the event main panel\n\t\teventPanel.setOpaque(false);\n\t\teventPanel.add(switchPanel, SWITCH);\n\t\teventPanel.add(buttonPanel, BUTTON);\n\t\teventPanel.add(leverPanel, LEVER);\n\n\t\t// add the event main panel and its background to the event container\n\t\teventsWindow = new JLabel(eventsBG);\n\t\teventsWindow.setBounds(0, 0, getEventsBG().getIconWidth(), getEventsBG().getIconHeight());\n\t\teventPanel.setBounds(0, 0, getEventsBG().getIconWidth(), getEventsBG().getIconHeight());\n\t\teventMenuPane.setBounds(150, 450, 300, 30);\n\t\t\n\t\t// add the close button for events\n\t\tcloseEventButton.addMouseListener(eventsMain);\n\t\tcloseEventButton.setBounds(540, 0, closeButton.getIconWidth(), closeButton.getIconHeight()); // close button position\n\t\t \n\t\t// assemble event components in the main event container\n\t\teventContainer.add(eventsWindow, new Integer(0));\n\t\teventContainer.add(eventPanel, new Integer(1));\n\t\teventContainer.add(closeEventButton, new Integer(2));\n\t\teventContainer.add(eventMenuPane, new Integer(2));\n\n\t\teventContainer.setOpaque(false);\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n eventCapJTxtField = new javax.swing.JTextField();\n eventNameJTxtField = new javax.swing.JTextField();\n eventDesJTxtField = new javax.swing.JTextField();\n locJTxtField = new javax.swing.JTextField();\n backJBtn = new javax.swing.JButton();\n createEventJBtn = new javax.swing.JButton();\n eventDate = new com.toedter.calendar.JDateChooser();\n\n jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Pics/party-51.jpg\"))); // NOI18N\n jLabel7.setText(\"jLabel7\");\n\n setBackground(new java.awt.Color(0, 0, 0));\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 153, 153));\n jLabel1.setText(\"Create New Event\");\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -1, -1));\n\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Event Name: \");\n add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 61, 120, -1));\n\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Event Description: \");\n add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 99, 120, -1));\n\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Date: \");\n add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 134, 120, -1));\n\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"No of People:\");\n add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 175, 120, -1));\n\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Location: \");\n add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 213, 120, -1));\n add(eventCapJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 172, 200, -1));\n add(eventNameJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 58, 200, -1));\n add(eventDesJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 96, 200, -1));\n add(locJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 210, 200, -1));\n\n backJBtn.setText(\"Back\");\n backJBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJBtnActionPerformed(evt);\n }\n });\n add(backJBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 248, -1, -1));\n\n createEventJBtn.setText(\"Create Event\");\n createEventJBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createEventJBtnActionPerformed(evt);\n }\n });\n add(createEventJBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 248, -1, -1));\n add(eventDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 134, 200, -1));\n }", "private void createEvents() {\n\t\tbtnRetour.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t\tDashboard_Preteur dashboard_Preteur = new Dashboard_Preteur(currentPreteur);\r\n\t\t\t\tdashboard_Preteur.setVisible(true);\r\n\t\t\t\tdashboard_Preteur.setResizable(false);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void createButtonFrame()\n {\n JFrame createFrame = new JFrame();\n createFrame.setSize(560,200);\n Container pane2;\n pane2 = createFrame.getContentPane();\n JPanel createPanel = new JPanel(null);\n createEvent = new JTextArea(\"MM/DD/YYYY\");\n timeField1 = new JTextArea(\"00:00\");\n timeField2 = new JTextArea(\"00:00\");\n EventNameField = new JTextArea(\"UNTILED NAME\");\n JLabel EnterEventLabel = new JLabel(\"Enter Event Name:\");\n JLabel EnterDateLabel = new JLabel(\"Date:\");\n JLabel EnterStartLabel = new JLabel(\"Start:\");\n JLabel EnterEndLabel = new JLabel(\"End:\");\n JLabel toLabel = new JLabel(\"to\");\n pane2.add(createPanel);\n createPanel.add(createEvent);\n createPanel.add(timeField1);\n createPanel.add(EventNameField);\n createPanel.add(timeField2);\n createPanel.add(create);\n createPanel.add(EnterEventLabel);\n createPanel.add(EnterDateLabel);\n createPanel.add(EnterStartLabel);\n createPanel.add(EnterEndLabel);\n createPanel.add(toLabel);\n\n createPanel.setBounds(0, 0, 400, 200); //panel\n createEvent.setBounds(20, 90, 100, 25); //Date field\n timeField1.setBounds(150, 90, 80, 25); //Time field\n timeField2.setBounds(280, 90, 80, 25); //Time field 2\n create.setBounds(380, 100, 150, 50); //Create Button\n\n EnterStartLabel.setBounds(150, 65, 80, 25);\n EnterEndLabel.setBounds(280, 65, 80, 25);\n toLabel.setBounds(250, 90, 80, 25);\n EnterDateLabel.setBounds(20, 65, 80, 25);\n EventNameField.setBounds(20, 30, 300, 25); //Event Name Field\n EnterEventLabel.setBounds(20, 5, 150, 25);\n\n\n\n\n createFrame.setVisible(true);\n createFrame.setResizable(false);\n }", "@Override\r\n public void actionPerformed(ActionEvent actionEvent) {\r\n createManualJPanel();\r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\tString name=nameField.getText();\n\t\t\tString occupation=occupationField.getText();\n\t\t\t\n\t\t\tFormEvent eve= new FormEvent(this,name,occupation);\n\t\t\t//lista.add(eve);\n\t\t\t\n\t\t\t//if(formListener!=null){\n\t\t\t\t//formListener.formEventOcurred(eve);\n\t\t\t//}\n\t\t\t\n\t\t\tif(formListener!=null){\n\t\t\t\tformListener.formEventOcurred(eve);\n\t\t\t}\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField7 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Ubuntu\", 1, 24)); // NOI18N\n jLabel1.setText(\"Add Events\");\n\n jLabel2.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel2.setText(\"Event Name :-\");\n\n jLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel3.setText(\"Event Id :-\");\n\n jLabel4.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel4.setText(\"Event Created On :-\");\n\n jLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel5.setText(\"Last Date of Registration :-\");\n\n jLabel6.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel6.setText(\"Event Will Be On :-\");\n\n jLabel7.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel7.setText(\"Event Description :-\");\n\n jLabel8.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel8.setText(\"Event Venue :-\");\n jLabel8.setToolTipText(\"\");\n\n jTextField1.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField2.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField3.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField4.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField5.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField6.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField7.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jButton1.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jButton1.setText(\"Close\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jButton2.setText(\"Save \");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(51, 51, 51)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)\n .addComponent(jTextField4)\n .addComponent(jTextField5))\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(244, 244, 244)\n .addComponent(jLabel1)))\n .addContainerGap(146, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(54, 54, 54)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jLabel7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(38, 38, 38))\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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void onClick(ClickEvent event) {\n\t \t\r\n\t \tdynFormCT1.addChild(canvas4);\r\n\t \tSC.say(\"Clicou\");\r\n\t \t\r\n\t }", "public void onClick(ClickEvent event) {\n\t \t\r\n\t \tdynFormCT1.addChild(canvasCT);\r\n\t \tSC.say(\"Clicou\");\r\n\t }", "private void makePanelTask() {\r\n if (panelTask == null) {\r\n panelTask = makePanel(jframe, BorderLayout.CENTER,\r\n \"Task Details\", 180, 50, 200, 25);\r\n\r\n JLabel createLabelName = makeJLabel(\"Name: \", 10, 100, 80, 25);\r\n JLabel createLabelDescription = makeJLabel(\"Description: \", 10, 130, 80, 25);\r\n JLabel createLabelDueDate = makeJLabel(\"Due Date: \", 10, 160, 80, 25);\r\n JLabel createLabelPriority = makeJLabel(\"Priority Level: \", 10, 190, 80, 25);\r\n\r\n addToTodoTaskGui(createLabelName, createLabelDescription, createLabelDueDate, createLabelPriority);\r\n\r\n JButton clickSave = makeButton(\"saveTask\", \"Save\", 80, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickSave);\r\n\r\n JButton clickCancel = makeButton(\"cancelTask\", \"Cancel\", 280, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickCancel);\r\n }\r\n }", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }", "public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }", "private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}", "public void onClick(ClickEvent event) {\n\t \t\r\n\t \tdynFormCT1.addChild(canvas2);\r\n\t \tSC.say(\"Clicou\");\r\n\t }", "public EventDetails() {\n initComponents();\n }", "private static void assembleAddPanel(){\n addPanel.add(addPlayerNameLabel);\n addPanel.add(newPlayerNameTextBox);\n addPlayerButton.addStyleName(\"add-button\");\n newPlayerNameTextBox.addStyleName(\"player-name-textbox\");\n addPlayerButton.addStyleName(\"btn btn-default\");\n resetRosterButton.addStyleName(\"btn btn-default\");\n addPlayerButton.setHTML(\"<span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span>Add Player\");\n resetRosterButton.setHTML(\"<span class=\\\"glyphicon glyphicon-repeat\\\" aria-hidden=\\\"true\\\"></span>Reset All\");\n }", "private void createSchedulePanel()\n\t{\n\t\t//newWeek=new Week(selectedId);\n\t\t//contentPane.add(newWeek,BorderLayout.SOUTH);\n\t\t//System.out.println(\"first time load:\"+selectedId);\n\t\tschedule=new Schedule(selectedId, isSprinklerSelected);\n\t\tschedulePane=new JPanel();\n\t\tschedulePane.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tschedulePane.add(schedule);\n\t\tcontentPane.add(schedulePane,BorderLayout.CENTER);//add to content pane\n\t}", "FORM createFORM();", "public void onClick(ClickEvent event) {\n\t \t\r\n\t \tdynFormCT1.addChild(canvas3);\r\n\t \tSC.say(\"Clicou\");\r\n\t }", "@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}", "public void designerAdded(DesignerEvent e);", "private void crearPanel() {\r\n\t\tJLabel lbl_Empresa = new JLabel(\"Empresa:\");\r\n\t\tlbl_Empresa.setBounds(10, 52, 72, 14);\r\n\t\tadd(lbl_Empresa);\r\n\r\n\t\ttxField_Empresa = new JTextField();\r\n\t\ttxField_Empresa.setBounds(116, 49, 204, 20);\r\n\t\tadd(txField_Empresa);\r\n\t\ttxField_Empresa.setColumns(10);\r\n\r\n\t\tlbl_Oferta = new JLabel(\" \");\r\n\t\tlbl_Oferta.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlbl_Oferta.setBounds(10, 11, 742, 20);\r\n\t\tadd(lbl_Oferta);\r\n\r\n\t\tJLabel lbl_sueldoMin = new JLabel(\"Sueldo Minimo:\");\r\n\t\tlbl_sueldoMin.setBounds(10, 83, 96, 14);\r\n\t\tadd(lbl_sueldoMin);\r\n\r\n\t\ttxField_sueldoMin = new JTextField();\r\n\t\ttxField_sueldoMin.setColumns(10);\r\n\t\ttxField_sueldoMin.setBounds(116, 80, 93, 20);\r\n\t\tadd(txField_sueldoMin);\r\n\r\n\t\tJLabel lbl_sueldoMax = new JLabel(\"Sueldo Maximo:\");\r\n\t\tlbl_sueldoMax.setBounds(10, 115, 96, 14);\r\n\t\tadd(lbl_sueldoMax);\r\n\r\n\t\ttxField_sueldoMax = new JTextField();\r\n\t\ttxField_sueldoMax.setColumns(10);\r\n\t\ttxField_sueldoMax.setBounds(116, 112, 93, 20);\r\n\t\tadd(txField_sueldoMax);\r\n\r\n\t\tJLabel lbl_experiencia = new JLabel(\"A\\u00F1os de experiencia minimos:\");\r\n\t\tlbl_experiencia.setBounds(10, 143, 185, 14);\r\n\t\tadd(lbl_experiencia);\r\n\r\n\t\ttxField_experiencia = new JTextField();\r\n\t\ttxField_experiencia.setColumns(10);\r\n\t\ttxField_experiencia.setBounds(205, 140, 93, 20);\r\n\t\tadd(txField_experiencia);\r\n\r\n\t\tJLabel lbl_aspectosValorar = new JLabel(\"Aspectos a valorar:\");\r\n\t\tlbl_aspectosValorar.setBounds(10, 178, 137, 14);\r\n\t\tadd(lbl_aspectosValorar);\r\n\r\n\t\ttxArea_aspectosValorar = new JTextArea();\r\n\t\ttxArea_aspectosValorar.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosValorar.setBounds(157, 172, 253, 41);\r\n\t\tadd(txArea_aspectosValorar);\r\n\r\n\t\tJLabel lbl_aspectosImpres = new JLabel(\"Aspectos imprescindibles:\");\r\n\t\tlbl_aspectosImpres.setBounds(10, 238, 133, 14);\r\n\t\tadd(lbl_aspectosImpres);\r\n\r\n\t\ttxArea_aspectosImpres = new JTextArea();\r\n\t\ttxArea_aspectosImpres.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosImpres.setBounds(157, 232, 253, 41);\r\n\t\tadd(txArea_aspectosImpres);\r\n\r\n\t\tJLabel lbl_descripcion = new JLabel(\"Descripcion:\");\r\n\t\tlbl_descripcion.setBounds(10, 302, 107, 14);\r\n\t\tadd(lbl_descripcion);\r\n\r\n\t\ttxArea_descripcion = new JTextArea();\r\n\t\ttxArea_descripcion.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_descripcion.setBounds(10, 328, 465, 149);\r\n\t\tadd(txArea_descripcion);\r\n\r\n\t\tJLabel lbl_conocimientos = new JLabel(\"Conocimientos requeridos:\");\r\n\t\tlbl_conocimientos.setBounds(537, 125, 169, 14);\r\n\t\tadd(lbl_conocimientos);\r\n\r\n\t\tpa_conocimientos = new PanelListaDoble(Usuario.getConocimientosTotales(), miOferta.getConocimientos());\r\n\t\tpa_conocimientos.setBounds(537, 174, 215, 180);\r\n\t\tadd(pa_conocimientos);\r\n\r\n\t\ttxField_buscarCono = new JTextField();\r\n\t\ttxField_buscarCono.setBounds(537, 140, 135, 20);\r\n\t\tadd(txField_buscarCono);\r\n\t\ttxField_buscarCono.setColumns(10);\r\n\r\n\t\tJButton btn_buscar = new JButton(\"\");\r\n\t\tbtn_buscar.setBounds(682, 138, 24, 23);\r\n\t\tadd(btn_buscar);\r\n\r\n\t\tbtn_crear = new JButton(\"\");\r\n\t\tbtn_crear.setBounds(716, 138, 24, 23);\r\n\t\tadd(btn_crear);\r\n\r\n\t\ttxField_lugar = new JTextField();\r\n\t\ttxField_lugar.setEditable(false);\r\n\t\ttxField_lugar.setColumns(10);\r\n\t\ttxField_lugar.setBounds(506, 49, 234, 20);\r\n\t\tadd(txField_lugar);\r\n\r\n\t\tJLabel lbl_lugar = new JLabel(\"Lugar de trabajo:\");\r\n\t\tlbl_lugar.setBounds(392, 52, 104, 14);\r\n\t\tadd(lbl_lugar);\r\n\r\n\t\tJLabel lbl_contrato = new JLabel(\"Tipo de contrato:\");\r\n\t\tlbl_contrato.setBounds(392, 83, 104, 14);\r\n\t\tadd(lbl_contrato);\r\n\r\n\t\tcombo_contrato = new JComboBox<Contrato>();\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORAL_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORTAL_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.setBounds(506, 83, 159, 20);\r\n\t\tadd(combo_contrato);\r\n\t\t// d\r\n\t\tinicializar(miOferta);\r\n\t\tdesHabCampos(false);\r\n\t\tif (miOferta.getEmpresa().getNumID().compareToIgnoreCase(Aplicacion.getUsuario().getNumID()) == 0) {\r\n\t\t\tbtnEliminar = new JButton(\"Eliminar\");\r\n\t\t\tbtnEliminar.setToolTipText(\"Eliminar\");\r\n\t\t\tbtnEliminar.setBounds(492, 384, 125, 41);\r\n\t\t\tadd(btnEliminar);\r\n\r\n\t\t\tbtnRetirar = new JButton(\"\\uD83D\\uDC40\");\r\n\t\t\tbtnRetirar.setToolTipText(\"Retirar Oferta\");\r\n\t\t\tbtnRetirar.setBounds(627, 384, 125, 41);\r\n\t\t\tadd(btnRetirar);\r\n\r\n\t\t\tbutton_Editar = new JButton(\"Editar\");\r\n\t\t\tbutton_Editar.setToolTipText(\"Editar\");\r\n\t\t\tbutton_Editar.setBounds(627, 436, 125, 41);\r\n\t\t\tadd(button_Editar);\r\n\r\n\t\t\tbutton_Editar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\tdesHabCampos(true);\r\n\t\t\t\t\tbutton_Editar.setVisible(false);\r\n\t\t\t\t\tbtnEliminar.setVisible(false);\r\n\t\t\t\t\tbtnRetirar.setVisible(false);\r\n\t\t\t\t\tbtn_crear.setVisible(false);\r\n\r\n\t\t\t\t\tbtn_guardar = new JButton(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setToolTipText(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setBounds(627, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_guardar);\r\n\r\n\t\t\t\t\tbtn_cancelar = new JButton(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setToolTipText(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setBounds(492, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_cancelar);\r\n\r\n\t\t\t\t\tbtn_cancelar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tbtn_guardar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\t\t\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\t\t\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\t\t\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\t\t\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\t\t\t\t\tbtn_crear.setVisible(true);\r\n\t\t\t\t\t\t\tinicializar(miOferta);\r\n\t\t\t\t\t\t\tdesHabCampos(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tbtn_guardar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tEmergenteCambios.createWindow(\"┐Desea guardar los cambios?\", (TieneEmergente) padre);\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 void actionPerformed( ActionEvent event )\r\n {\r\n createJButtonActionPerformed( event );\r\n }", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "private void makeButtonPanel()\n {\n \n this.buttonPanel.setLayout(new GridLayout(10, 2, 30, 10));\n \n \n this.buttonPanel.add(this.fLabel);\n this.fName.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.fName);\n\n this.buttonPanel.add(this.lLabel);\n this.lName.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.lName);\n\n this.buttonPanel.add(this.idLabel);\n this.iD.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.iD);\n\n this.buttonPanel.add(this.courseLabel);\n this.course.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.course);\n\n this.buttonPanel.add(this.instructorLabel);\n this.instructor.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.instructor);\n\n this.buttonPanel.add(this.tutorLabel);\n this.tutor.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.tutor);\n \n this.buttonPanel.add(this.commentsLable);\n this.comments.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.comments);\n //Removed for appointment tabel\n //this.buttonPanel.add(this.appointmentLable);\n //this.buttonPanel.add(this.appointment);\n this.buttonPanel.add(this.sessionLenLabel);\n this.sessionLength.setColumns(COL_WIDTH);\n this.sessionLength.setText(\"30\");\n this.buttonPanel.add(this.sessionLength);\n\n this.ADD_BUTTON.addActionListener(new AddButtonListener());\n //buttonPanel.add(ADD_BUTTON);\n \n \n this.addSessionPlaceHolder.add(this.buttonPanel);\n }", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "private void createEvents() {\n\t\taddBtn.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbuildOutput();\n\t\t\t}\n\t\t});\n\t}", "public FormPanel(){\n\t\tDimension dim = getPreferredSize();\n\t\tdim.width=250;\n\t\tsetPreferredSize(dim);\n\t\n\n\tnameLabel=new JLabel(\"Nombre: \");\n\tnameField =new JTextField(10);\n\tocupattionLabel=new JLabel(\"Ocupattion: \");\n\toccupationField=new JTextField(10);\n\tokBtn=new JButton(\"OK\");\n\tokBtn.addActionListener(new ActionListener(){\n\t\t@Override\n\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t//TODO Auto-generated method stub\n\t\t\tString name=nameField.getText();\n\t\t\tString occupation=occupationField.getText();\n\t\t\t\n\t\t\tFormEvent eve= new FormEvent(this,name,occupation);\n\t\t\t//lista.add(eve);\n\t\t\t\n\t\t\t//if(formListener!=null){\n\t\t\t\t//formListener.formEventOcurred(eve);\n\t\t\t//}\n\t\t\t\n\t\t\tif(formListener!=null){\n\t\t\t\tformListener.formEventOcurred(eve);\n\t\t\t}\n\t\t\t\n\t\t}\n\t});\n\n\t//BOrder\n\tBorder innerBorder=BorderFactory.createTitledBorder(\"Agregar Personas\");\n\tBorder outerBorder=BorderFactory.createEmptyBorder(5, 5, 5, 5);\n\tsetBorder(BorderFactory.createCompoundBorder(outerBorder,innerBorder));\n\t\n\tsetLayout(new GridBagLayout());\n\t\n\tGridBagConstraints gc= new GridBagConstraints();\n\t\n\t////////////////FIRST NOW///////////////////////\n\t\n\tgc.weightx=1;\n\tgc.weighty=0.1;\n\t\n\tgc.gridx=0;\n\tgc.gridy=0;\n\tgc.fill=GridBagConstraints.NONE;\n\tgc.anchor=GridBagConstraints.LINE_END;\n\tgc.insets=new Insets(0,0,0,5);\n\tadd(nameLabel,gc);\n\t\n\tgc.gridx=1;\n\tgc.gridy=0;\n\tgc.insets=new Insets(0,0,0,0);\n\tgc.anchor=GridBagConstraints.LINE_START;\n\tadd(nameField, gc);\n\t\n\t///////////////SECON NOW///////////////////////////////\n\tgc.weightx=1;\n\tgc.weighty=0.1;\n\t\n\tgc.gridy=1;\n\tgc.gridx=0;\n\tgc.insets=new Insets(0,0,0,5);\n\tgc.anchor=GridBagConstraints.LINE_END;\n\tadd(ocupattionLabel,gc);\n\t\n\tgc.gridy=1;\n\tgc.gridx=1;\n\tgc.insets=new Insets(0,0,0,0);\n\tgc.anchor=GridBagConstraints.LINE_START;\n\tadd(occupationField,gc);\n\t//////////////tercer//////////////////////////////////////////////\n\tgc.weightx=1;\n\tgc.weighty=2.0;\n\t\n\tgc.gridy=2;\n\tgc.gridx=1;\n\tgc.insets=new Insets(0,0,0,5);\n\tgc.anchor=GridBagConstraints.LINE_START;\n\t\n\tadd(okBtn,gc);\n\t}", "private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }", "public void formEventOccurred(FormEvent e){\n\t\t\t\tcontroller.addPerson(e);\r\n\t\t\t\ttablePanel.refresh();\r\n\t\t\t}", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "private void addToPanel(){\n getContentPane().add(jdpFondo);\n jtpcContenedor.add(jtpPanel);\n\tjtpcContenedor.add(jtpPanel2);\n jdpFondo.add(jtpcContenedor, BorderLayout.CENTER);\n jdpFondo.add(jpnlPanelPrincilal);\n }", "private void initComponents() {//GEN-BEGIN:initComponents\n\n FormListener formListener = new FormListener();\n\n addMouseListener(formListener);\n\n }", "private void createEvents() {\n\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\thome = new AdminDashboardForm();\r\n\t\t\tRootPanel.get(\"details\").add(home);\r\n\t\t}", "void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }", "public EventForm(String type, int eventID, Day day, CalendarForm mainForm) {\n formType = type;\n this.eventID = eventID;\n initialDay = day;\n chosenDay = day;\n this.mainForm = mainForm;\n eventToEdit = day.getEvent(eventID);\n frame = new JFrame();\n lblDay = new JLabel(\"Day:\");\n lblMonth = new JLabel(\"Month:\");\n lblName = new JLabel(\"Event name:\");\n lblTime = new JLabel(\"Start Time:\");\n lblDuration = new JLabel(\"Duration:\");\n cmbDay = new JComboBox();\n cmbMonth = new JComboBox();\n txtName = new JTextField(10);\n radSelectTime = new JRadioButton(\"Choose Time\", true);\n radAutoTime = new JRadioButton(\"Generate Time\", false);\n buttonGroup = new ButtonGroup();\n cmbTime = new JComboBox();\n cmbDuration = new JComboBox();\n btnSubmit = new JButton(type);\n DateFormatSymbols cal = new DateFormatSymbols();\n monthNames = cal.getMonths();\n gbc = new GridBagConstraints();\n freeTimes = new ArrayList();\n usedTimes = new ArrayList();\n txtName.requestFocus();\n }", "private void buildPanel()\n\t{\n\t\tvoterIDMessage = new JLabel(\"Please Enter Your Voter ID.\");\n\t\tbutton1 = new JButton(\"Cancel\");\n\t\tbutton1.addActionListener(new ButtonListener());\n\t\tbutton2 = new JButton(\"OK\");\n\t\tbutton2.addActionListener(new ButtonListener());\n\t\tidText = new JTextField(10);\n\t\tpanel1 = new JPanel();\n\t\tpanel2 = new JPanel();\n\t\tpanel3 = new JPanel();\n\t\tpanel1.add(voterIDMessage);\n\t\tpanel2.add(idText);\n\t\tpanel3.add(button1);\n\t\tpanel3.add(button2);\n\t}", "public void showFormInstitucion(ActionEvent event) {\r\n\t\tlog.info(\"-------------------------------------Debugging showFormInstitucion-------------------------------------\");\r\n\t\tlog.info(\"blnShowFormInstitucion: \"+getBlnShowFormInstitucion());\r\n\t\tsetBlnShowFormInstitucion(true);\r\n\t\tsetOnNewDisabledInsti(true); //Deshabilita los controles por defecto cuando se desea crear un nuevo registro.\r\n\t\tsetRenderConfigN1(false);\r\n\t\tsetStrBtnAgregarN1(\"Agregar Configuración\");\r\n\t\tsetRenderProcesPlanillaN1(false);\r\n\t\tsetRenderAdministraN1(false);\r\n\t\tsetRenderCobChequesN1(false);\r\n\t\tlimpiarFormInstitucion();\r\n\t}", "private Panel createMessagePanel()\n {\n Panel messagePanel;\n Label product;\n Label version;\n Label copyright;\n\n product = new Label(\"File System Archiver\");\n version = new Label(\"Version \" + Constants.CLIENT_VERSION);\n copyright = new Label(\"Copyright (c) 2001\");\n\n messagePanel = new Panel();\n messagePanel.setLayout(new GridLayout(3, 0));\n\n messagePanel.add(product);\n messagePanel.add(version);\n messagePanel.add(copyright);\n\n messagePanel.setVisible(true);\n\n return messagePanel;\n }", "private void createJButtonActionPerformed( ActionEvent event )\r\n {\r\n \r\n }", "private JPanel createPanelEditService() {\n\t\t// Fabriken holen\n\t\tGridBagConstraintsFactory gbcf = GridBagConstraintsFactory.getInstance();\n\t\tWidgetFactory wf = WidgetFactory.getInstance();\n\t\t// Dirty-Listener erzeugen\n\t\tDocumentListener documentListener = new DocumentListener() {\n\n\t\t\t@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t\tsetDirty(true);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\tsetDirty(true);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\t\tsetDirty(true);\n\t\t\t}\n\t\t};\n\t\tChangeListener changeListener = new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent event) {\n\t\t\t\tif (((AbstractButton) event.getSource()).getModel().isPressed()) {\n\t\t\t\t\tsetDirty(true);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Widgets erzeugen\n\t\tJPanel panel = wf.getPanel(\"PanelEditService\");\n\t\tJLabel labelServiceAbbreviation = wf.getLabel(\"LabelServiceAbbreviation\");\n\t\tlabelServiceAbbreviation.setForeground(COLOR_INFLUENCE);\n\t\tserviceAbbreviation = wf.getTextField(\"FieldServiceAbbreviation\");\n\t\tserviceAbbreviation.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonClearService = wf.getButton(\"ButtonClearService\");\n\t\tbuttonClearService.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedClearService(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelAdditionalInfo = wf.getLabel(\"LabelAdditionalInfo\");\n\t\tlabelAdditionalInfo.setForeground(COLOR_INFLUENCE);\n\t\tadditionalInfo = wf.getTextField(\"FieldAdditionalInfo\");\n\t\tadditionalInfo.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonRemoveService = wf.getButton(\"ButtonRemoveService\");\n\t\tbuttonRemoveService.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedRemoveService(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelLoginUrl = wf.getLabel(\"LabelLoginUrl\");\n\t\tloginUrl = wf.getTextField(\"FieldLoginUrl\");\n\t\tloginUrl.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonOpenUrl = wf.getButton(\"ButtonOpenUrl\");\n\t\tbuttonOpenUrl.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedOpenUrlInBrowser(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelLoginInfo = wf.getLabel(\"LabelLoginInfo\");\n\t\tloginInfo = wf.getTextField(\"FieldLoginInfo\");\n\t\tloginInfo.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonCopyLoginInfo = wf.getButton(\"ButtonCopyLoginInfo\");\n\t\tbuttonCopyLoginInfo.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedCopyLoginInfo(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelAdditionalLoginInfo = wf.getLabel(\"LabelAdditionalLoginInfo\");\n\t\tadditionalLoginInfo = wf.getTextArea(\"FieldAdditionalLoginInfo\");\n\t\tadditionalLoginInfo.getDocument().addDocumentListener(documentListener);\n\t\tJScrollPane additionalLoginInfoScrollPane = wf.getScrollPane(\"ScrollPaneAdditionalLoginInfo\",\n\t\t\t\tadditionalLoginInfo);\n\t\tadditionalLoginInfoScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tJButton buttonOpenHelp = wf.getButton(\"ButtonOpenHelp\");\n\t\tbuttonOpenHelp.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedOpenHelpInBrowser(me);\n\t\t\t}\n\t\t});\n\t\tJButton buttonOpenAbout = wf.getButton(\"ButtonOpenAbout\");\n\t\tbuttonOpenAbout.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedOpenAbout(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelCount = wf.getLabel(\"LabelCount\");\n\t\tlabelCount.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabelCount.setForeground(COLOR_INFLUENCE);\n\t\tJLabel labelStartIndex = wf.getLabel(\"LabelStartIndex\");\n\t\tlabelStartIndex.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabelStartIndex.setForeground(COLOR_INFLUENCE);\n\t\tJLabel labelEndIndex = wf.getLabel(\"LabelEndIndex\");\n\t\tlabelEndIndex.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabelEndIndex.setForeground(COLOR_INFLUENCE);\n\t\tuseSmallLetters = wf.getCheckBox(\"CheckBoxSmallLetters\");\n\t\tuseSmallLetters.addChangeListener(changeListener);\n\t\tuseSmallLetters.setForeground(COLOR_INFLUENCE);\n\t\tsmallLettersCount = wf.getIntegerField(\"FieldSmallLettersCount\");\n\t\tsmallLettersCount.getDocument().addDocumentListener(documentListener);\n\t\tsmallLettersStartIndex = wf.getIntegerField(\"FieldSmallLettersStartIndex\");\n\t\tsmallLettersStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tsmallLettersEndIndex = wf.getIntegerField(\"FieldSmallLettersEndIndex\");\n\t\tsmallLettersEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tuseCapitalLetters = wf.getCheckBox(\"CheckBoxCapitalLetters\");\n\t\tuseCapitalLetters.addChangeListener(changeListener);\n\t\tuseCapitalLetters.setForeground(COLOR_INFLUENCE);\n\t\tcapitalLettersCount = wf.getIntegerField(\"FieldCapitalLettersCount\");\n\t\tcapitalLettersCount.getDocument().addDocumentListener(documentListener);\n\t\tcapitalLettersStartIndex = wf.getIntegerField(\"FieldCapitalLettersStartIndex\");\n\t\tcapitalLettersStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tcapitalLettersEndIndex = wf.getIntegerField(\"FieldCapitalLettersEndIndex\");\n\t\tcapitalLettersEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tuseDigits = wf.getCheckBox(\"CheckBoxDigits\");\n\t\tuseDigits.addChangeListener(changeListener);\n\t\tuseDigits.setForeground(COLOR_INFLUENCE);\n\t\tdigitsCount = wf.getIntegerField(\"FieldDigitsCount\");\n\t\tdigitsCount.getDocument().addDocumentListener(documentListener);\n\t\tdigitsStartIndex = wf.getIntegerField(\"FieldDigitsStartIndex\");\n\t\tdigitsStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tdigitsEndIndex = wf.getIntegerField(\"FieldDigitsEndIndex\");\n\t\tdigitsEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tuseSpecialCharacters = wf.getCheckBox(\"CheckBoxSpecialCharacters\");\n\t\tuseSpecialCharacters.addChangeListener(changeListener);\n\t\tuseSpecialCharacters.setForeground(COLOR_INFLUENCE);\n\t\tspecialCharacters = wf.getTextField(\"FieldSpecialCharacters\");\n\t\tspecialCharacters.setForeground(COLOR_INFLUENCE);\n\t\tspecialCharactersCount = wf.getIntegerField(\"FieldSpecialCharactersCount\");\n\t\tspecialCharactersCount.getDocument().addDocumentListener(documentListener);\n\t\tspecialCharactersStartIndex = wf.getIntegerField(\"FieldSpecialCharactersStartIndex\");\n\t\tspecialCharactersStartIndex.getDocument().addDocumentListener(documentListener);\n\t\tspecialCharactersEndIndex = wf.getIntegerField(\"FieldSpecialCharactersEndIndex\");\n\t\tspecialCharactersEndIndex.getDocument().addDocumentListener(documentListener);\n\t\tlabelUseOldPassphrase = wf.getLabel(\"LabelUseOldPassphrase\");\n\t\tlabelUseOldPassphrase.setForeground(COLOR_WARNING);\n\t\tJLabel labelTotalCharacterCount = wf.getLabel(\"LabelTotalCharacterCount\");\n\t\tlabelTotalCharacterCount.setForeground(COLOR_INFLUENCE);\n\t\ttotalCharacterCount = wf.getIntegerField(\"FieldTotalCharacterCount\");\n\t\ttotalCharacterCount.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonCopyPassword = wf.getButton(\"ButtonCopyPassword\");\n\t\tbuttonCopyPassword.setForeground(COLOR_INFLUENCE);\n\t\tbuttonCopyPassword.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedCopyPassword(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelPassword = wf.getLabel(\"LabelPassword\");\n\t\tpassword = wf.getPasswordField(\"FieldPassword\");\n\t\tpassword.getDocument().addDocumentListener(documentListener);\n\t\tJButton buttonDisplayPassword = wf.getButton(\"ButtonDisplayPassword\");\n\t\tbuttonDisplayPassword.setForeground(COLOR_INFLUENCE);\n\t\tbuttonDisplayPassword.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedDisplayPassword(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelPasswordRepeated = wf.getLabel(\"LabelPasswordRepeated\");\n\t\tpasswordRepeated = wf.getPasswordField(\"FieldPasswordRepeated\");\n\t\tpasswordRepeated.getDocument().addDocumentListener(documentListener);\n\t\tmakePasswordVisible = wf.getCheckBox(\"CheckBoxMakePasswordVisible\");\n\t\tmakePasswordVisible.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\n\t\t\t\tif (makePasswordVisible.isSelected()) {\n\t\t\t\t\tpassword.setEchoChar((char) 0);\n\t\t\t\t\tpasswordRepeated.setEchoChar((char) 0);\n\t\t\t\t} else {\n\t\t\t\t\tpassword.setEchoChar('*');\n\t\t\t\t\tpasswordRepeated.setEchoChar('*');\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tbuttonStoreService = wf.getButton(\"ButtonStoreService\");\n\t\tbuttonStoreService.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedStoreService(me);\n\t\t\t}\n\t\t});\n\t\tbuttonUseNewPassphrase = wf.getButton(\"ButtonUseNewPassphrase\");\n\t\tbuttonUseNewPassphrase.setForeground(COLOR_INFLUENCE);\n\t\tbuttonUseNewPassphrase.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t((PswGenCtl) ctl).actionPerformedUseNewPassphrase(me);\n\t\t\t}\n\t\t});\n\t\tJLabel labelLastUpdate = wf.getLabel(\"LabelLastUpdate\");\n\t\tlastUpdate = wf.getLabel(\"LabelLastUpdate\");\n\t\t// Widgets zufügen, erste Zeile\n\t\tint row = 0;\n\t\tpanel.add(labelServiceAbbreviation, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(serviceAbbreviation, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonClearService, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelAdditionalInfo, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(additionalInfo, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonRemoveService, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelLoginUrl, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(loginUrl, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonOpenUrl, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelLoginInfo, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(loginInfo, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonCopyLoginInfo, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelAdditionalLoginInfo, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(additionalLoginInfoScrollPane,\n\t\t\t\tgbcf.getTableConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelCount, gbcf.getLabelConstraints(2, row));\n\t\tpanel.add(labelStartIndex, gbcf.getLabelConstraints(GridBagConstraints.RELATIVE, row));\n\t\tpanel.add(labelEndIndex, gbcf.getLabelConstraints(GridBagConstraints.RELATIVE, row));\n\t\t// Leerzeile zufügen, nächste Zeile\n\t\trow++;\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useSmallLetters, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(smallLettersCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(smallLettersStartIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(smallLettersEndIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(buttonOpenHelp, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useCapitalLetters, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(capitalLettersCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(capitalLettersStartIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(capitalLettersEndIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(buttonOpenAbout, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useDigits, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(digitsCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(digitsStartIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(digitsEndIndex, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(useSpecialCharacters, gbcf.getLabelConstraints(0, row, 1, 1));\n\t\tpanel.add(specialCharacters, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(specialCharactersCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(specialCharactersStartIndex,\n\t\t\t\tgbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(specialCharactersEndIndex,\n\t\t\t\tgbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(labelUseOldPassphrase, gbcf.getLabelConstraints(6, row, 1, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelTotalCharacterCount, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(totalCharacterCount, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 1, 1));\n\t\tpanel.add(buttonCopyPassword, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelPassword, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(password, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonDisplayPassword, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelPasswordRepeated, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(passwordRepeated, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\tpanel.add(buttonStoreService, gbcf.getLabelConstraints(6, row));\n\t\tpanel.add(buttonUseNewPassphrase, gbcf.getLabelConstraints(6, row));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(makePasswordVisible, gbcf.getFieldConstraints(2, row, 4, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tGridBagConstraints emptyLineConstraints = gbcf.getLabelConstraints(0, row, 2, 1);\n\t\temptyLineConstraints.weighty = 0.1;\n\t\tpanel.add(new JLabel(\"\"), emptyLineConstraints);\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(labelLastUpdate, gbcf.getLabelConstraints(0, row, 2, 1));\n\t\tpanel.add(lastUpdate, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 4, 1));\n\t\t// Panel zurückgeben\n\t\treturn panel;\n\t}", "public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "@Override\r\n \tpublic void start(AcceptsOneWidget panel, EventBus eventBus) {\n \t\tpanel.setWidget(view);\t\t\r\n \t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n addSponsorLogoLabel = new javax.swing.JLabel();\n addSponsorLabel = new javax.swing.JLabel();\n addSponsorNameInput = new javax.swing.JTextField();\n addSponsorNameLabel = new javax.swing.JLabel();\n addSponsorFnameInput = new javax.swing.JTextField();\n addSponsorFnameLabel = new javax.swing.JLabel();\n addSponsorLnameInput = new javax.swing.JTextField();\n addSponsorLnameLabel = new javax.swing.JLabel();\n addSponsorPhoneInput = new javax.swing.JTextField();\n addSponsorPhoneLabel = new javax.swing.JLabel();\n addSponsorPledgeInput = new javax.swing.JTextField();\n addSponsorPledgeLabel = new javax.swing.JLabel();\n addSponsorBackButton = new javax.swing.JButton();\n addSponsorSubmitButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n addSponsorLogoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/eventplanner/horizonlogoTiny.png\"))); // NOI18N\n\n addSponsorLabel.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n addSponsorLabel.setText(\"Add Sponsor\");\n\n addSponsorNameLabel.setText(\"Name of Sponsor:\");\n\n addSponsorFnameLabel.setText(\"First Name:\");\n\n addSponsorLnameLabel.setText(\"Last Name:\");\n\n addSponsorPhoneLabel.setText(\"Phone:\");\n\n addSponsorPledgeLabel.setText(\"Pledge:\");\n\n addSponsorBackButton.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n addSponsorBackButton.setText(\"Back\");\n addSponsorBackButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSponsorBackButtonActionPerformed(evt);\n }\n });\n\n addSponsorSubmitButton.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n addSponsorSubmitButton.setText(\"Submit\");\n addSponsorSubmitButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSponsorSubmitButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(addSponsorLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(addSponsorLogoLabel))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(143, 143, 143)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(addSponsorNameLabel)\n .addComponent(addSponsorFnameLabel)\n .addComponent(addSponsorLnameLabel)\n .addComponent(addSponsorPhoneLabel)\n .addComponent(addSponsorPledgeLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(addSponsorNameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorFnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorLnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPhoneInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPledgeInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(152, 152, 152)\n .addComponent(addSponsorSubmitButton)\n .addGap(33, 33, 33)\n .addComponent(addSponsorBackButton)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(42, 42, 42))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(addSponsorLogoLabel))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addComponent(addSponsorLabel)\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorNameLabel)\n .addComponent(addSponsorNameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorFnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorFnameLabel))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addSponsorLnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorLnameLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorPhoneInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPhoneLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorPledgeInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPledgeLabel))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorSubmitButton)\n .addComponent(addSponsorBackButton))\n .addContainerGap(47, Short.MAX_VALUE))\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 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "public AddNewJobPanel() {\n initComponents();\n\n DateTime now = new DateTime();\n initializeComboBoxes();\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tAllSongs allSongs = new AllSongs();\n\t\t\t\t\t// AllSongs allSongs = new AllSongs();\n\t\t\t\t\tJPanel jp = allSongs.displaySongsOnThePanel(new File(playListPath), false);\n\t\t\t\t\tjavax.swing.GroupLayout allSongsLayout = new javax.swing.GroupLayout(jp);\n\t\t\t\t\tjp.setLayout(allSongsLayout);\n\t\t\t\t\tallSongsLayout.setHorizontalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 510,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\tallSongsLayout.setVerticalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 420,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\t// JFrame frame3 = new JFrame();\n\t\t\t\t\t// frame3.setSize(500,500);\n\t\t\t\t\t// frame3.setLocation(300,200);\n\t\t\t\t\t// frame3.add(jp);\n\t\t\t\t\t// frame3.setVisible(true);\n//\t\t\t\t\tMusicPlayer.window.add(jp);\n\t\t\t\t\tMusicPlayer.window.getContentPane().add(jp);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(playListFile));\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\t * On click of crete playlist button, I should be able to\n\t\t\t\t\t * create another button and add it to the panel\n\t\t\t\t\t * ????????????\n\t\t\t\t\t */\n\n\t\t\t\t}", "public JPanelCreateClient() {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.title = new CustomLabel(ConstantView.TITLE_CREATE_CLIENT, null, Color.decode(\"#2E5569\"));\r\n\t\tthis.okButton = new JButton(\"REGISTRAR CLIENTE\");\r\n\t\tthis.returnButton = new JButton(ConstantView.BUTTON_RETURN_SIGNIN);\r\n\t\tthis.jPanelFormClient = new JPanelFormClient();\r\n\t\tControlClient.getInstance().setjPanelCreateClient(this);\r\n\t\tthis.init();\r\n\t}", "protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}", "private void createManualJPanel() {\r\n createJPanelWithManual();\r\n JFrame frame = new JFrame();\r\n customizeFrame(frame);\r\n }", "public void fillForm(Event e){\n // name\n eventName.setText(e.getEventname().toString());\n // room\n room.setText(e.getRoom() + \"\");\n // dates\n Calendar from = extractDate(e.getFromDate());\n writeDateToButton(from, R.id.newEvent_button_from);\n Calendar to = extractDate(e.getToDate());\n writeDateToButton(to, R.id.newEvent_button_to);\n Calendar fromTime = null;\n Calendar toTime = null;\n if(e.getFromTime() == -1)\n wholeDay.setChecked(true);\n else {\n fromTime = extractTime(e.getFromTime());\n writeDateToButton(fromTime, R.id.newEvent_button_from_hour);\n toTime = extractTime(e.getToTime());\n writeDateToButton(toTime, R.id.newEvent_button_to_hour);\n }\n // notification\n spinner.setSelection(e.getNotificiation());\n // patient\n PatientAdapter pa = new PatientAdapter(this);\n Patient p = pa.getPatientById(e.getPatient());\n patient_id = p.getPatient_id();\n patient.setText(p.getName());\n // desc\n desc.setText(e.getDescription().toString());\n // putting time and date togehter\n this.fromDate = Calendar.getInstance();\n this.toDate = Calendar.getInstance();\n this.fromDate.set(from.get(Calendar.YEAR), from.get(Calendar.MONTH), from.get(Calendar.DAY_OF_MONTH),\n (fromTime != null ? fromTime.get(Calendar.HOUR_OF_DAY) : 0),\n (fromTime != null ? fromTime.get(Calendar.MINUTE) : 0));\n this.toDate.set(to.get(Calendar.YEAR), to.get(Calendar.MONTH), to.get(Calendar.DAY_OF_MONTH),\n (toTime != null ? toTime.get(Calendar.HOUR_OF_DAY) : 0),\n (toTime != null ? toTime.get(Calendar.MINUTE) : 0));\n startYear = fromDate.get(Calendar.YEAR);\n startMonth = fromDate.get(Calendar.MONTH);\n startDay = fromDate.get(Calendar.DAY_OF_MONTH);\n startHour = fromDate.get(Calendar.HOUR_OF_DAY);\n }", "public frm_Faculty(Object obj_Who)\n {\n try\n {\n if (obj_Who != null && obj_Who instanceof Faculty)\n {\n obj_Faculty = (Faculty) obj_Who;\n obj_Event = new Event();\n obj_Event.getData_Event();\n }\n\n initComponents();\n this.setTitle(\"Faculty Form\");\n this.setSize(700, 500);\n this.scaleBckgrd();\n this.setData();\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\n //sets rootPanel transparent so image can to shown and sets size of rootpanel same as JFrame\n this.rootPanel.setOpaque(false);\n this.rootPanel.setSize(this.getWidth(), this.getHeight());\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, ex);\n }\n\n }", "public M_Hompeage1_evt() {\n initComponents();\n }", "void setNewCollectionPanel();", "public viewForm() {\n this.addGLEventListener(this);\n }", "@Override\n\tpublic void actionPerformed(final ActionEvent event) {\n\t\tshowNew();\n\t}", "public TaskMasterPanel()\n\t{\n\t\tJPanel controlPanel = new JPanel();\n\t\tdescriptionField = new JTextField(15);\n\t\tthis.setPreferredSize(new Dimension(500, 400));\n\t\tthis.setBackground(Color.GRAY);\n\t\tsetLayout(new BorderLayout());\n\t\tlistPanel = new ToDoListPanel(\"Activity 19 List\");\n\t\ttoDoListScrollPane = new JScrollPane(listPanel);\n\t\ttoDoListScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\t\ttoDoListScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\tthis.add(toDoListScrollPane, BorderLayout.CENTER);\n\t\tlistPanel.addTask(new Task(\"Activity 19\"));\n\t\tlistPanel.addTask(new Task(\"Activity 20\"));\n\t\tlistPanel.addTask(new Task(\"Activity 21\"));\n\t\tthis.addTask = new JButton(\"Add Task\");\n\t\tthis.getWork = new JButton(\"Get Work\");\n\t\tthis.addTask.addActionListener(new AddTaskButtonListener());\n\t\tthis.getWork.addActionListener(new GetWorkButtonListener());\n\t\tcontrolPanel.add(descriptionField);\n\t\tcontrolPanel.add(addTask);\n\t\tcontrolPanel.add(getWork);\n\t\tthis.add(controlPanel, BorderLayout.SOUTH);\n\t}", "private JPanel makePanel()\n {\n JPanel mainPanel = new JPanel();\n mainPanel.add(myLoginPanel);\n\n return mainPanel;\n }", "private void createAdminPanel() {\n username = new JTextField(8);\n password = new JPasswordField(8);\n JPanel loginArea = adminLoginPanels();\n JPanel buttons = adminLoginButtons();\n loginFrame = new JFrame();\n loginFrame.setLayout(new BorderLayout());\n loginFrame.getRootPane().setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n loginLabel = new JLabel(\"Please log in as administrator\", SwingConstants.CENTER);\n loginFrame.getContentPane().add(loginLabel, BorderLayout.NORTH);\n loginFrame.getContentPane().add(loginArea, BorderLayout.CENTER);\n loginFrame.getContentPane().add(buttons, BorderLayout.SOUTH);\n loginFrame.setVisible(true);\n loginFrame.pack();\n }", "public void showEventWindow()\n\t{\n\t\tJDialog eventWindow = new JDialog();\n\t\teventWindow.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);\n\t\t\n\t\t//set size and title\n\t\tDimension d = new Dimension(350,200);\n\t\teventWindow.setSize(d);\n\t\teventWindow.setTitle(\"Make Event\");\n\t\t\n\t\t//make parts of event window\n\t\tJTextField theEvent = new JTextField(25);\n\t\tDimension d2 = new Dimension(250,100);\n\t\ttheEvent.setPreferredSize(d2);\n\t\tJLabel eventLabel = new JLabel();\n\t\teventLabel.setText(\"Event: \");\n\t\t\n\t\tJTextField start = new JTextField(5);\n\t\tJTextField end = new JTextField(5);\n\t\tJLabel date = new JLabel();\n\t\tdate.setText(getEventDate(cModel.getSelectedDate()) + \" \");\n\t\tJLabel to = new JLabel(\"to\");\n\t\tJButton saveButton = new JButton(\"Save\");\n\t\t\n\t\tsaveButton.addActionListener(new \n\t\t\t\tActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tif (cModel.hasConflict(start.getText(), end.getText())) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//make an error message\n\t\t\t\t\t\t\tJDialog errorPopUp = new JDialog();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terrorPopUp.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);\n\t\t\t\t\t\t\terrorPopUp.setLayout(new FlowLayout());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJLabel errorMessage = new JLabel(\"There is a time conflict. Please enter a different time.\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJButton close = new JButton(\"Close\");\n\t\t\t\t\t\t\tclose.addActionListener(new \n\t\t\t\t\t\t\t\t\tActionListener() \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\terrorPopUp.dispose();\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\n\t\t\t\t\t\t\terrorPopUp.add(errorMessage);\n\t\t\t\t\t\t\terrorPopUp.add(close);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terrorPopUp.pack();\n\t\t\t\t\t\t\terrorPopUp.setVisible(true);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teventWindow.dispose();\n\t\t\t\t\t\t\tcModel.addEvent(theEvent.getText(), start.getText(), end.getText());\n\t\t\t\t\t\t\twriteEvents(cModel.getSelectedDate());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t});\n\t\t\n\t\tJPanel topPanel = new JPanel();\n\t\ttopPanel.add(eventLabel);\n\t\ttopPanel.add(theEvent);\n\t\t\n\t\tJPanel bottomPanel = new JPanel();\n\t\tbottomPanel.add(date);\n\t\tbottomPanel.add(start);\n\t\tbottomPanel.add(to);\n\t\tbottomPanel.add(end);\n\t\tbottomPanel.add(saveButton);\n\t\t\n\t\teventWindow.setLayout(new BorderLayout());\n\t\teventWindow.add(topPanel,BorderLayout.NORTH);\n\t\teventWindow.add(bottomPanel,BorderLayout.SOUTH);\n\t\t\n\t\teventWindow.setVisible(true);\n\t}", "@Override\n public void newPanelModel() {\n\n }", "@Override\n public void newPanelModel() {\n\n }", "public void createEvent(View view){\n showDatePickerDialog();\n }", "public VersionEventos(Paneles panel) {\r\n\t\tsuper(panel);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public PanelFils()\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\tthis.setLayout(new GridLayout(0, 1));\r\n\t\t\tthis.setBorder(BorderFactory.createEmptyBorder(14, 14, 14, 14));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJLabel titreEvent = new JLabel(\"Titre\");\r\n\t\t\ttitreEvent.setFont(new Font(\"Tahoma\", Font.BOLD, 13));\r\n\t\t\tadd(titreEvent);\r\n\t\t\tchTitreEvent = new JTextArea();\r\n\t\t\tchTitreEvent.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\tchTitreEvent.setColumns(70);\r\n\t\t\tadd(chTitreEvent);\r\n\t\t\t\r\n\t\t\t\r\n//\t\t\tJLabel labelDebut = new JLabel(\"Ann\\u00E9e\");\r\n//\t\t\tlabelDebut.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n//\t\t\tadd(labelDebut);\t\t\t\r\n//\t\t\tchDateEvent = new JTextArea();\r\n//\t\t\tchDateEvent.setColumns(70);\r\n//\t\t\tadd(chDateEvent);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tchImageBouton = new JButton(\"Ajouter une image\");\r\n\t\t\tchImageBouton.addActionListener(this);\r\n\t\t\tadd(chImageBouton);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJLabel labelImportance = new JLabel(\"Importance: \");\r\n\t\t\tlabelImportance.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n\t\t\tString[] laListe = {\"1\", \"2\", \"3\", \"4\", \"5\"};\r\n\t\t\tchImportance = new JComboBox<String>(laListe);\r\n\t\t\tchImportance.setSelectedIndex(chRow);\r\n\t\t\tadd(labelImportance);\r\n\t\t\tadd(chImportance);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJLabel descriptionEvent = new JLabel(\"Description\");\r\n\t\t\tdescriptionEvent.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n\t\t\tadd(descriptionEvent);\r\n\t\t\t\r\n\t\t\tchDescEvent = new JTextArea(\"\");\r\n\t\t\tchDescEvent.setRows(10);\r\n\t\t\tchDescEvent.setColumns(70);\r\n\t\t\tchDescEvent.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\tadd(chDescEvent);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tadd(Box.createRigidArea(new Dimension(0,10)));\r\n\t\t\tadd(Box.createRigidArea(new Dimension(0,10)));\r\n\t\t\tchValidation.setBackground(new Color(222, 184, 135));\r\n\t\t\tchValidation.addActionListener(leControleur);\r\n\t\t\tadd(chValidation);\r\n\t\t\t}", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "public static JPanel newPanel() {\n\t\treturn null;\n\t}", "final JPanel createMainPanel() {\r\n\r\n logger.entering(this.getClass().getName(), \"createMainPanel\");\r\n\r\n this.pnlMain = new JPanel();\r\n\r\n this.pnlMain.setLayout(new BorderLayout());\r\n\r\n this.pnlMain.add(new JLabel(\r\n \"Select the MicroSensorDataTypes that shall be filtered out\"),\r\n BorderLayout.NORTH);\r\n\r\n this.pnlMain.add(createCheckBoxPanel(), BorderLayout.CENTER);\r\n\r\n this.pnlMain.add(getButtonPanel(), BorderLayout.SOUTH);\r\n\r\n logger.exiting(this.getClass().getName(), \"createMainPanel\",\r\n this.pnlMain);\r\n\r\n return this.pnlMain;\r\n }", "private void pushNewEvent(Event e) {\n\t\tec.pushNewElement(e);\n\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}", "private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }", "Event createEvent();", "Event createEvent();", "private void makePanelList() {\r\n if (panelList == null) {\r\n panelList = makePanel(jframe, BorderLayout.CENTER,\r\n \"List of Tasks\", 180, 50, 200, 25);\r\n list = makeList(10, 10, 100, 470, 500);\r\n\r\n JButton clickUpdate = makeButton(\"updateTask\", \"Update\",\r\n 20, 620, 100, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton clickDelete = makeButton(\"deleteTask\", \"Delete\",\r\n 125, 620, 100, 25, JComponent.CENTER_ALIGNMENT, null);\r\n\r\n JButton clickComplete = makeButton(\"completeTask\", \"Complete\",\r\n 230, 620, 100, 25, JComponent.CENTER_ALIGNMENT, null);\r\n\r\n JButton clickIncomplete = makeButton(\"IncompleteTask\", \"UndoComplete\",\r\n 335, 620, 130, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton clickCreate = makeButton(\"newTask\", \"Create A Task\",\r\n 175, 670, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton showComplete = makeButton(\"showComplete\", \"Show Completed\",\r\n 175, 700, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n showComplete.getModel().setPressed(showCompleted);\r\n\r\n JButton clickSave = makeButton(\"saveTodo\", \"Save List\",\r\n 175, 730, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n addElementsToPanelList(list, clickUpdate, clickDelete, clickComplete, clickIncomplete, clickCreate,\r\n showComplete, clickSave);\r\n }\r\n }", "private static void createAndShowUI(){\n JFrame frame = new JFrame(\"TargetTest\");\n TargetTest test = new TargetTest();\n frame.setLayout(new FlowLayout());\n frame.getContentPane().add(test.getMainPanel());\n //frame.getContentPane().add(test.getControlsPanel());\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n frame.pack();\n\n frame.setLocationRelativeTo(null);\n\n frame.setVisible(true);\n}", "public JPanel createNewVersionPanel()\n\t{\n\t\t// Create and configure JPanels\n\t\tnewVersionPanel = new JPanel();\n\t\tnewVersionPanel.setLayout(new BoxLayout(newVersionPanel, BoxLayout.PAGE_AXIS));\n\t\tnewVersionPanel.setBorder(new CompoundBorder(new TitledBorder(\"New version\"), new EmptyBorder(8, 0, 0, 0)));\n\n\t\tnewVersionDescriptionPanel = new JPanel();\n\t\tnewVersionDescriptionPanel.setLayout(new BoxLayout(newVersionDescriptionPanel, BoxLayout.PAGE_AXIS));\n\t\t\n\t\t// Create components\n\t\tlabelVersionNumber = new JLabel(\"Version number:\");\n\t\t\n\t\tlabelDescription = new JLabel(\"Descriptions:\");\n\n\t\ttextFieldVersionNumber = new JTextField(20);\n\t\ttextFieldVersionNumber.setMaximumSize(textFieldVersionNumber.getPreferredSize());\n\t\ttextFieldVersionNumber.setAlignmentX(JLabel.LEFT_ALIGNMENT);\n\t\t\n\t\tbuttonAddTextFieldDescription = new JButton(\"+\");\n\t\tbuttonAddTextFieldDescription.addActionListener(this);\n\t\t\n\t\tbuttonAddVersion = new JButton(\"Add version\");\n\t\tbuttonAddVersion.addActionListener(this);\n\n\t\t// Attach components to JPanels\n\t\tnewVersionPanel.add(labelVersionNumber);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\tnewVersionPanel.add(textFieldVersionNumber);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tnewVersionPanel.add(labelDescription);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\tnewVersionPanel.add(newVersionDescriptionPanel);\n\t\tnewVersionPanel.add(buttonAddTextFieldDescription);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tnewVersionPanel.add(buttonAddVersion);\n\t\t\n\t\treturn newVersionPanel;\n\t}", "private void createdComponent() {\r\n\r\n\t\tloadImage();\r\n\t\tresizeImage();\r\n\t\ttry {\r\n\t\t\tif (customFont == null) {\r\n\t\t\t\tcustomFont = FontLoader.getInstance().getXenipa();\r\n\t\t\t\tif (customFont == null) {\r\n\t\t\t\t\tcustomFont = new FontLoader().importFont();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FontFormatException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (InstantiationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnsupportedLookAndFeelException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.init();\r\n\t\tthis.createpanel1();\r\n\t\tthis.createpanel2();\r\n\t\tthis.createpanel3();\r\n\t\tthis.createpanel4();\r\n\t\tthis.revalidate();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txt_descricao = new javax.swing.JTextField();\n btn_salvar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"CADASTRO TIPO DE EVENTO\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Tipo do Evento\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Arial\", 1, 18))); // NOI18N\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 11));\n jLabel1.setText(\"Descrição:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txt_descricao, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txt_descricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btn_salvar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/jdbc/mvc/view/icons/Checkmark.png\"))); // NOI18N\n btn_salvar.setText(\"Cadastrar Tipo Evento\");\n btn_salvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_salvarActionPerformed(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 .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(31, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(124, Short.MAX_VALUE)\n .addComponent(btn_salvar)\n .addGap(113, 113, 113))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn_salvar)\n .addContainerGap(30, Short.MAX_VALUE))\n );\n\n java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n setBounds((screenSize.width-416)/2, (screenSize.height-182)/2, 416, 182);\n }", "public LeaveForm() {\n initComponents();\n }", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "private void formMouseClicked(java.awt.event.MouseEvent evt) {\n }", "private JPanel makeControlPanel() {\n\n final JPanel panel = new JPanel(new FlowLayout(3));\n final JButton refreshButton = new JButton(new ImageIcon(iconMaker(\"refreshREAL.png\")));\n refreshButton.setFocusPainted(false);\n refreshButton.addActionListener(this::refreshButtonClicked);\n refreshButton.setToolTipText(\"Refresh Item Price(s)\");\n //checkButton.setPreferredSize(new Dimension(25,25));\n JButton viewLink = new JButton(new ImageIcon(iconMaker(\"visitSite.png\")));\n viewLink.setToolTipText(\"Visit Item Website\");\n JButton deleteItem = new JButton(new ImageIcon(iconMaker(\"delete.png\")));\n deleteItem.setToolTipText(\"Remove Item\");\n JButton addItem = buttonMaker(\"additem.png\");\n addItem.setToolTipText(\"Add Item to Price Watcher\");\n JButton editItem = buttonMaker(\"edititem.png\");\n editItem.setToolTipText(\"Edit Item Details\");\n\n\n viewLink.setFocusPainted(false);\n deleteItem.setFocusPainted(false);\n\n viewLink.addActionListener(this::viewPageClicked);\n panel.add(refreshButton);\n panel.add(viewLink);\n panel.add(deleteItem);\n panel.add(addItem);\n panel.add(editItem);\n\n return panel;\n }", "public FrameForm() {\n initComponents();\n }", "private void initialize() {\r\n\t\tmanager = new EventManager();\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 850, 600);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\r\n\t\tJMenu JmFile = new JMenu(\"File\");\r\n\t\tmenuBar.add(JmFile);\r\n\r\n\t\tJMenuItem mntmSave = new JMenuItem(\"Save\");\r\n\t\tfinal CalenderGui forgetThis = this;\r\n\t\tmntmSave.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSaveDialog save = new SaveDialog(true, manager, forgetThis);\r\n\t\t\t\tsave.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal EventManager ma = manager;\r\n\r\n\t\tJMenuItem mntmNew = new JMenuItem(\"New\");\r\n\t\tmntmNew.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tma.clearEventManager();\r\n\t\t\t\tforgetThis.remake();\r\n\t\t\t}\r\n\t\t});\r\n\t\tJmFile.add(mntmNew);\r\n\t\tJmFile.add(mntmSave);\r\n\r\n\t\tJMenuItem mntmLoad = new JMenuItem(\"Load\");\r\n\t\tmntmLoad.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSaveDialog save = new SaveDialog(false, manager, forgetThis);\r\n\t\t\t\tsave.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tJmFile.add(mntmLoad);\r\n\r\n\t\tJMenuItem mntmExit = new JMenuItem(\"Exit\");\r\n\t\tmntmExit.addActionListener(new closeListener(frame));\r\n\t\tJmFile.add(mntmExit);\r\n\r\n\t\tJMenu mnEvents = new JMenu(\"Events\");\r\n\t\tmenuBar.add(mnEvents);\r\n\r\n\t\tJMenuItem mntmAddEvent = new JMenuItem(\"Add Event\");\r\n\t\tmntmAddEvent.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tAddEvent eventDialog = new AddEvent(forgetThis);\r\n\t\t\t\teventDialog.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tmnEvents.add(mntmAddEvent);\r\n\t\tframe.getContentPane().setLayout(new GridLayout(0, 1, 0, 0));\r\n\t\t\r\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(tabbedPane);\r\n\t\tDefaultListModel<Event> model = new DefaultListModel<Event>();\r\n\t\tfor(Event e: manager.getAllEvents()){\r\n\t\t\tmodel.addElement(e);\r\n\t\t}\r\n\t\t\r\n\t\tJScrollPane scrollPane = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Daily\", null, scrollPane, null);\r\n\t\t\r\n\t\tJList<Event> list = new JList<Event>();\r\n\t\tlist.addKeyListener(new delKeyListener(manager, this, list));\r\n\t\tlist.setModel(model);\r\n\t\tdailyList = list;\r\n\t\tdailyModel = model;\r\n\t\tscrollPane.setViewportView(list);\r\n\t\t\r\n\t\tJScrollPane scrollPane_1 = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Weekly\", null, scrollPane_1, null);\r\n\t\t\r\n\t\tJList<Event> list_1 = new JList<Event>();\r\n\t\tmodel = new DefaultListModel<Event>();\r\n\t\tlist_1.setModel(model);\r\n\t\tweeklyList = list_1;\r\n\t\tweeklyModel = model;\r\n\t\tlist_1.addKeyListener(new delKeyListener(manager, this, list_1));\r\n\t\tscrollPane_1.setViewportView(list_1);\r\n\t\t\r\n\t\tJScrollPane scrollPane_2 = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Monthly\", null, scrollPane_2, null);\r\n\t\t\r\n\t\tJList<Event> list_2 = new JList<Event>();\r\n\t\t\r\n\t\tmodel = new DefaultListModel<Event>();\r\n\t\tlist_2.setModel(model);\r\n\t\tmonthlyList = list_2;\r\n\t\tmonthlyModel = model;\r\n\t\tlist_2.addKeyListener(new delKeyListener(manager, this, list_2));\r\n\t\t\r\n\t\tscrollPane_2.setViewportView(list_2);\r\n\t\t\r\n\t\tJScrollPane scrollPane_3 = new JScrollPane();\r\n\t\ttabbedPane.addTab(\"Yearly\", null, scrollPane_3, null);\r\n\t\t\r\n\t\tJList<Event> list_3 = new JList<Event>();\r\n\t\tmodel = new DefaultListModel<Event>();\r\n\t\tlist_3.setModel(model);\r\n\t\tyearlyList = list_3;\r\n\t\tyearlyModel = model;\r\n\t\tscrollPane_3.setViewportView(list_3);\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public abstract void createContents(Panel mainPanel);", "public void buildPanel(FormBuilder f) {\n\t\tcommand.buildPanel(f, this);\n\t}", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public CreateTremaDbDialogForm(AnActionEvent event) {\n this.event = event;\n this.windowTitle = \"New Trema XML database file\";\n init();\n }", "public Component getPanelEventos() {\n\t\tTableSorter sorterVariables = new TableSorter(modeloVariables);\n\t\tJTable tablaVariables = new JTable(sorterVariables);\n\t\tsorterVariables.setTableHeader(tablaVariables.getTableHeader());\n\n\t\ttablaVariables.getColumn(tablaVariables.getColumnName(1)).setPreferredWidth(100);\n\t\tJScrollPane panelIzq = new JScrollPane(tablaVariables);\n\n\t\tJPanel panelDer = new JPanel(new BorderLayout());\n\t\tJPanel panelDerAbajo = new JPanel();\n\t\tJButton botonInsertar = new JButton(ModeloTablaEventos.INSERTAR_EVENTO);\n\t\tbotonInsertar.addActionListener(modeloEventos);\n\t\tpanelDerAbajo.add(botonInsertar);\n\t\tJButton botonCancelar = new JButton(ModeloTablaEventos.CANCELAR_EVENTO);\n\t\tbotonCancelar.addActionListener(modeloEventos);\n\t\tpanelDerAbajo.add(botonCancelar);\n\n\t\tJTable tablaEventos = new JTable(modeloEventos);\n\t\tmodeloEventos.setLista(tablaEventos);\n\t\ttablaEventos.getColumn(tablaEventos.getColumnName(2)).setMaxWidth(40);\n\n\t\tJScrollPane panelDerArriba = new JScrollPane(tablaEventos);\n\t\tpanelDer.add(panelDerAbajo, BorderLayout.SOUTH);\n\t\tpanelDer.add(panelDerArriba, BorderLayout.CENTER);\n\n\t\tJSplitPane panelPrincipal = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,\n\t\t\t\tnew FakeInternalFrame(\"Variables del sistema\", panelIzq),\n\t\t\t\tnew FakeInternalFrame(\"Control de Eventos\", panelDer));\n\t\tpanelPrincipal.setDividerLocation(350);\n\t\tpanelIzq.setPreferredSize(new Dimension(200, 600));\n\t\tpanelDer.setPreferredSize(new Dimension(600, 600));\n\t\treturn panelPrincipal;\n\t}" ]
[ "0.7450417", "0.6786071", "0.67527515", "0.660252", "0.65143335", "0.6483413", "0.6423897", "0.63840175", "0.63810337", "0.637668", "0.63637066", "0.6266235", "0.6229356", "0.61870754", "0.6175729", "0.6151217", "0.6122216", "0.6118457", "0.6108808", "0.60932463", "0.60854775", "0.60650957", "0.6058426", "0.6040694", "0.60317343", "0.6011209", "0.6003297", "0.6001348", "0.5992987", "0.59698975", "0.5968776", "0.59571207", "0.59507716", "0.59489226", "0.5945486", "0.59301", "0.5928241", "0.5897101", "0.5887455", "0.5887455", "0.58693403", "0.5869203", "0.5865171", "0.5855565", "0.58548653", "0.5838284", "0.5838162", "0.58375406", "0.5822648", "0.58195454", "0.58084476", "0.579252", "0.5785815", "0.5778213", "0.5776245", "0.57662135", "0.5760082", "0.5758428", "0.57313174", "0.5723439", "0.57213694", "0.5718964", "0.57116413", "0.57093525", "0.57012814", "0.5694969", "0.56911004", "0.56902874", "0.5689221", "0.56821686", "0.5681315", "0.5681315", "0.5678954", "0.56786513", "0.5672066", "0.5670759", "0.56704617", "0.566944", "0.56687766", "0.56669337", "0.5666727", "0.5656606", "0.5656606", "0.56563586", "0.5653411", "0.5651398", "0.56509703", "0.56497", "0.5648441", "0.56379", "0.56379", "0.5637128", "0.56361556", "0.56342566", "0.56341344", "0.5628663", "0.56246954", "0.56225634", "0.562003", "0.56167936" ]
0.6356067
11
bruges til at navigere i vores CardLayout
public void showPage(String panel) { int height = 0; int widht = 0; switch (panel) { case ("vælg"): setJFrame(242, 150, "vælg", dateFormatTools.getDayLetters(cal)); break; case ("massage"): massage = new MassageBuilder(); customer = null; try { masTypeList = mc.getMTypeList(); } catch (SQLException ex) { try { errorControl.createErrorPopup("Fejl i hentning af massagetyper.", ex.getLocalizedMessage()); } catch (SQLException ex1) { System.out.println(ex1.getLocalizedMessage()); } } setJFrame(300, 370, "massage", dateFormatTools.getDayLetters(cal)); fillComboStartTime(); break; case ("rediger massage"): editing = true; startTime = mc.getEvent().getDate(); try { masTypeList = mc.getMTypeList(); } catch (SQLException ex) { try { errorControl.createErrorPopup("Fejl i hentning af massagetyper.", ex.getLocalizedMessage()); } catch (SQLException ex1) { System.out.println(ex1.getLocalizedMessage()); } } event = mc.getEvent(); setJFrame(300, 370, "massage", dateFormatTools.getDayLetters(cal)); fillComboStartTime(); fillMassage(); break; case ("bbq"): customer = null; setJFrame(950, 716, "bbq", dateFormatTools.getDayLetters(cal)); bbqControl.clearBBQBuilder(); showCategories(); break; case ("bbq edit"): { editing = true; try { bbqControl.geteventStof(event); } catch (SQLException ex) { Logger.getLogger(EventPanel.class.getName()).log(Level.SEVERE, null, ex); } } customer = event.getCustomer(); setJFrame(950, 716, "bbq", dateFormatTools.getDayLetters(cal)); fillbarbecue(); showCategories(); addToBasket(); break; } jFrame.revalidate(); jFrame.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sezmanagerListener(){\n\n CardLayout CL=(CardLayout) sez_managerview.getIntermedio1().getLayout();\n\n /*Avanti*/\n JButton sez_managerviewAvanti = sez_managerview.getAvantiButton();\n sez_managerviewAvanti.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n if (Pagine_Manager.getPagina_Corrente() < 3) {\n\n CL.next(sez_managerview.getIntermedio1());\n Pagine_Manager.addPagina_Corrente();\n\n }\n\n }\n\n });\n\n\n /*Indietro*/\n JButton sez_managerviewIndietro= sez_managerview.getIndietroButton();\n sez_managerviewIndietro.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n if (Pagine_Manager.getPagina_Corrente() > 1) {\n\n CL.previous(sez_managerview.getIntermedio1());\n Pagine_Manager.subctractPagina_Corrente();\n }\n\n }\n });\n\n\n /*PaginaLogin*/\n JButton PaginaLoginbutton = sez_managerview.getPaginaLoginButton();\n PaginaLoginbutton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n basicframe.setdestra(loginview.getIntermedio0());\n\n }\n });\n }", "private void addCardsToViews()\n\t{\n\t\taddCardsToCorkboardView();\n\t\t\n\t}", "void goToWhiteboardSelect(){\n CollaboardGUI.this.setSize(500,500);\n CardLayout layout = (CardLayout) panels.getLayout();\n layout.show(panels, \"whiteboard\");\n }", "void afficherClassement() {\n classement.rechargerListeJoueur();\n CardLayout cl = (CardLayout) (container.getLayout());\n cl.show(container, \"Classement\");\n }", "@Override\n public void onClick(Card card) {\n }", "private void cambiaPanelAnterior() {\r\n\t\tCardLayout cl = (CardLayout) VentanaPrincipal.getInstance().getContentPane().getLayout();// obtenemos el card layout\r\n\t\tcl.show(VentanaPrincipal.getInstance().getContentPane(), VentanaPrincipal.getInstance().getPanelEquipo().getName());// mostramos el pael Equipos\r\n\t}", "public void zeigeCard(ProgressBarCards wantedCard) {\r\n\t\tCardLayout cl = (CardLayout) (this.cards.getLayout());\r\n\t\tcl.show(cards, wantedCard.toString());\r\n\t}", "public void afficherMenuPrincipal() {\n removeInterfaceListener(partie);\n partie = null;\n CardLayout cl = (CardLayout) (container.getLayout());\n cl.show(container, \"Menu\");\n }", "private void next()\r\n {\r\n if(currentCard != stack.getChildren().size()- 1) // if we are not at the last card\r\n {\r\n currentCard++; // make the next card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }", "@Override\n public void onClick(View theView) {\n --curIndex;\n curCard = deckOfCards.get(curIndex);\n refreshButtons();\n setFrontSide();\n\n }", "public void switchToMenuScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"menu\");\n }", "@Override\n public void instantiateCard(LayoutInflater inflaterService, ViewGroup head, final ListView list, ECCardData data) {\n final CardDataImpl cardData = (CardDataImpl) data;\n\n // Set adapter and items to current card content list\n final List<String> listItems = cardData.getListItems();\n final CardListItemAdapter listItemAdapter = new CardListItemAdapter(getApplicationContext(), listItems);\n list.setAdapter(listItemAdapter);\n // Also some visual tuning can be done here\n list.setBackgroundColor(Color.WHITE);\n View gradient = new View(getApplicationContext());\n gradient.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, AbsListView.LayoutParams.MATCH_PARENT));\n\n head.addView(gradient);\n\n // Inflate main header layout and attach it to header root view\n inflaterService.inflate(R.layout.list_item, head);\n\n TextView title = head.findViewById(R.id.list_item_text);\n title.setText(cardData.getCardTitle());\n\n\n // Card toggling by click on head element\n head.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(final View v) {\n Class z;\n String s;\n if (m == -1)\n z = LoginActivity.class;\n else\n z = ProfileActivity.class;\n if (m == -1)\n s = \"You are just one click away to REGISTER the greatest moment\";\n else\n s = \"You have already registered. Just go on and view your profile\";\n if (cardData.getCardTitle().equals(\" Win a game without ever hurting another player\")) {\n Intent i = new Intent(FrontActivity.this, EventActivity.class);\n startActivity(i);\n\n }\n if (cardData.getCardTitle().equals(s)) {\n\n Intent i = new Intent(FrontActivity.this, z);\n startActivity(i);\n }\n\n if (cardData.getCardTitle().equals(\"Everything is real... It is good to love many things\")) {\n Intent i = new Intent(FrontActivity.this, GalleryActivity.class);\n startActivity(i);\n\n }\n\n if (cardData.getCardTitle().equals(\"The Flare Gun’s currently only available to use\")) {\n Intent i = new Intent(FrontActivity.this, SponsorsActivity.class);\n startActivity(i);\n\n }\n if (cardData.getCardTitle().equals(\"I believe that prayer is our powerful contact\")) {\n Intent i = new Intent(FrontActivity.this, ContactActivity.class);\n startActivity(i);\n\n }\n if (cardData.getCardTitle().equals(\"When you start the game, you will find the map\")) {\n Intent i = new Intent(FrontActivity.this, AboutActivity.class);\n startActivity(i);\n\n }\n\n }\n });\n }", "private void setUpCardView(){\n selectButton.setOnClickListener(this);\n selectButton.setOnTouchListener(new IgnorePageViewSwipe(main));\n closeMapButton.setOnClickListener(this);\n main.updateUserLocation();\n\n // update centre current location button to bottom right\n View locationButton = ((View) mapView.findViewById(Integer.parseInt(\"1\")).getParent()).findViewById(Integer.parseInt(\"2\"));\n RelativeLayout.LayoutParams rlp = (RelativeLayout.LayoutParams) locationButton.getLayoutParams();\n rlp.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);\n rlp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);\n rlp.setMargins(0, 0, 30, 30);\n googleMap.setOnMarkerClickListener(this);\n\n // Bottom card view of stations (horizontal scroll)\n stationCardAdapter = new StationCardAdapter(getContext(), stationList);\n recyclerView.setAdapter(stationCardAdapter);\n layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false);\n recyclerView.setLayoutManager(layoutManager);\n SnapHelper helper = new LinearSnapHelper();\n helper.attachToRecyclerView(recyclerView); // snaps to items in the adapter\n // Listen for scroll of the cards at the bottom\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n int position = layoutManager.findFirstCompletelyVisibleItemPosition();\n if (position != -1) { // if stopped moving\n Station station = stationList.get(position);\n centreOnStation(station, true);\n layoutManager.findViewByPosition(position).requestFocus(); // request focus to enlarge the card at the center\n String buttonText;\n // set the text of the button according to where the map has been opened from\n if (main.state.getBookingState() != State.RESERVE_BIKE_SELECTION_STATE && main.state.getBookingState() != State.RESERVE_DOCK_SELECTION_STATE){\n buttonText = \"Select \"+ station.getName();\n } else if (main.state.getBookingState() == State.RESERVE_BIKE_SELECTION_STATE) {\n buttonText = \"Reserve Bike at \" + station.getName();\n } else {\n buttonText = \"Reserve Dock at \" + station.getName();\n }\n selectButton.setText(buttonText);\n selectButton.setClickable(true);\n selectButton.animate().alpha(1.0f).setDuration(200).start(); // Make the button visible again\n } else { // still scrolling\n selectButton.setClickable(false); //disable the select button and hide it\n selectButton.animate().alpha(0.0f).setDuration(200).start();\n }\n if (newState == 0){ // released (stopped scrolling and released)\n main.viewPager.setUserInputEnabled(true); // Allow the view pager to swipe between fragments again\n }\n super.onScrollStateChanged(recyclerView, newState);\n }\n });\n }", "private void addCardsToCorkboardView()\n\t{\n\t\tfor(Card card : cards) {\n\t\t\t\n\t\t\taddCardLabel(card);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void goToUiCobrador() {\n\t\tif(uiHomeCobrador!=null){\n\t\t\tuiHomeCobrador.getHeader().getLblTitulo().setText(constants.cobrador());\n\t\t\tuiHomeCobrador.getHeader().setVisibleBtnMenu(true);\n\t\t\tuiHomeCobrador.getContainer().showWidget(0);\n\t\t\t}\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 0;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MAIN_SCREEN\");\r\n\t\t}", "@Override\n public void onClick(View view) {\n Navigation.findNavController(requireView()).navigate(R.id.action_editDeckFragment_to_addCardFragment);\n }", "@Override\r\n\tpublic void goToShowList() {\n\t\t\r\n\t}", "public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}", "private void switchToTransferLayout()\n {\n this.fragmentActivity.findViewById(R.id.pickImagesLayout).setVisibility(View.GONE);\n this.fragmentActivity.findViewById(R.id.transferImagesLayout).setVisibility(View.VISIBLE);\n }", "public void switchToInstructionScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"insn\");\n }", "@FXML\n void goToBurger(ActionEvent event) {\n mainCourse.setVisible(false);\n dessertPane.setVisible(false);\n sideDish.setVisible(false);\n burgers.setVisible(true);\n potatoPane.setVisible(false);\n }", "private void previous()\r\n {\r\n if(currentCard != 0) // if we are not at the first card\r\n {\r\n currentCard--; // make the previous card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }", "@Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.parent) {\n Intent i = new Intent(Inhaltselement.this, Inhaltsuebersicht.class);\n i.putExtra(\"thisElement\", this.parentName);\n i.putExtra(\"elements\", this.elements);\n i.putExtra(\"category\", this.category);\n startActivity(i);\n } else if (id == R.id.prev) {\n Intent i = new Intent(Inhaltselement.this, Inhaltselement.class);\n if(this.position > 0) {\n i.putExtra(\"thisElement\", this.elements[this.position - 1]);\n i.putExtra(\"position\", this.position - 1);\n }\n else\n {\n i.putExtra(\"thisElement\", this.elements[this.elements.length - 1]);\n i.putExtra(\"position\", this.elements.length - 1);\n }\n i.putExtra(\"elements\", this.elements);\n i.putExtra(\"parentName\", this.parentName);\n i.putExtra(\"category\", this.category);\n startActivity(i);\n } else if (id == R.id.next) {\n Intent i = new Intent(Inhaltselement.this, Inhaltselement.class);\n if(this.position < this.elements.length - 1) {\n i.putExtra(\"thisElement\", this.elements[this.position + 1]);\n i.putExtra(\"position\", this.position + 1);\n }\n else\n {\n i.putExtra(\"thisElement\", this.elements[0]);\n i.putExtra(\"position\", 0);\n }\n i.putExtra(\"elements\", this.elements);\n i.putExtra(\"parentName\", this.parentName);\n i.putExtra(\"category\", this.category);\n startActivity(i);\n } else if (id == R.id.map) {\n Intent i = new Intent(Inhaltselement.this, Hauptfenster.class);\n startActivity(i);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(Gravity.START);\n return true;\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 4;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\t\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_SLIPS_SCREEN\");\r\n\t\t}", "@Override\n public void onClick(View view) {\n mRepo.setIsEditingCard(Boolean.TRUE);\n mRepo.setCurrentCardTitle(model.getTitle());\n\n Navigation.findNavController(requireView()).navigate(R.id.action_editDeckFragment_to_submitCardFragment);\n }", "@Override\r\n\tpublic void onNaviTurnClick() {\n\r\n\t}", "public void displayCardUI() {\n\t\tfor (Player player: gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\t\t\tArrayList<Card> playerHandCards = player.getHand().getHand();\n\n\t\t\t/* Displays the card back for Computer 1 */\n\t\t\tif (player.getPlayerId() == 1) {\n\t\t\t\tfloat cardIndex = -1;\n\t\t\t\tint cardLeft = 55;\n\t\t\t\tint cardTop = 235;\n\n\t\t\t\tfor (JButton item: listButton1){\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton1.clear();\n\n\t\t\t\tfor (int i = 0; i < playerHandCards.size(); i++) {\n\t\t cardIndex++;\n\n\t\t\t\t\tJButton btnCard1 = new JButton();\n\n\t\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, btnCard1, (int) (cardLeft),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard1, (int) (cardLeft + cardHeight),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard1, (int) (cardTop + cardIndex * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard1, (int) (cardTop + (cardIndex + 1) * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n String path = GameUI.class.getProtectionDomain().getCodeSource().getLocation().getPath() + \"../images/cards/b.gif\";\n // System.out.println(path);\n \n\t\t ImageIcon img = new ImageIcon(path);\n\t\t btnCard1.setIcon(new ImageIcon(\n\t\t img.getImage().getScaledInstance(cardHeight, cardWidth, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e) {\n\t\t System.out.println(\"Image not found\");\n\t\t btnCard1.setText(\"Not found\");\n\t\t }\n\t\t listButton1.add(btnCard1);\n\t\t\t estimationGame.getContentPane().add(btnCard1);\n\t\t\t }\n\t\t\t}\n\n\t\t\t/* Displays the card back for Computer 2 */\n\t\t\tif (player.getPlayerId() == 2) {\n\t\t\t\tfloat cardIndex = -1;\n\t\t\t\tint cardLeft = 300;\n\t\t\t\tint cardTop = 30;\n\n\t\t\t\tfor (JButton item: listButton2) {\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton2.clear();\n\n\t\t\t\tfor (int i = 0; i < playerHandCards.size(); i++) {\n\t\t cardIndex++;\n\n\t\t\t\t\tJButton btnCard2 = new JButton();\n\n\t\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, btnCard2, (int) (cardLeft + cardIndex * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard2, (int) (cardLeft + (cardIndex + 1) * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard2, cardTop, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard2, cardTop + cardHeight, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n String path = GameUI.class.getProtectionDomain().getCodeSource().getLocation().getPath() + \"../images/cards/b.gif\";\n // System.out.println(path);\n \n\t\t ImageIcon img = new ImageIcon(path);\n\t\t // ImageIcon img = new ImageIcon(this.getClass().getResource(\"images/cards/b.gif\"));\n\t\t btnCard2.setIcon(new ImageIcon(\n\t\t img.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e) {\n\t\t System.out.println(\"Image not found\");\n\t\t btnCard2.setText(\"Not found\");\n\t\t }\n\n\t\t listButton2.add(btnCard2);\n\t\t\t estimationGame.getContentPane().add(btnCard2);\n\t\t \t}\n\t\t\t}\n\n\t\t\t/* Displays the card back for Computer 3 */\n\t\t\tif (player.getPlayerId() == 3) {\n\t\t\t\tfloat cardIndex = -1;\n\t\t\t\tint cardLeft = 750;\n\t\t\t\tint cardTop = 215;\n\n\t\t\t\tfor (JButton item: listButton3) {\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton3.clear();\n\n\t\t\t\tfor (int i = 0; i < playerHandCards.size(); i++) {\n\t\t cardIndex++;\n\n\t\t\t\t\tJButton btnCard3 = new JButton();\n\n\t\t\t springLayout.putConstraint(SpringLayout.WEST, btnCard3, (int) (cardLeft),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard3, (int) (cardLeft + cardHeight),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard3, (int) (cardTop + cardIndex * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard3, (int) (cardTop + (cardIndex + 1) * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n String path = GameUI.class.getProtectionDomain().getCodeSource().getLocation().getPath() + \"../images/cards/b.gif\";\n // System.out.println(path);\n ImageIcon img = new ImageIcon(path);\n\t\t // ImageIcon img = new ImageIcon(this.getClass().getResource(\"images/cards/b.gif\"));\n\t\t btnCard3.setIcon(new ImageIcon(\n\t\t img.getImage().getScaledInstance(cardHeight, cardWidth, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e) {\n\t\t System.out.println(\"Image not found\");\n\t\t btnCard3.setText(\"Not found\");\n\t\t }\n\n\t\t listButton3.add(btnCard3);\n\t\t\t estimationGame.getContentPane().add(btnCard3);\n\t\t \t}\n\t\t\t}\n\n\t\t\t/* Displays the cards for Player 0 */\n\t\t\tif (!(player instanceof Computer)) {\n\t\t\t\tSystem.out.println(\"PLAYERS HAND to PLAY: \" + playerHandCards);\n\t\t\t\tint cardLeft = 300;\n\t\t\t\tint cardTop = 675;\n\n\t\t\t\tfloat cardIndex = -1;\n\n\t\t\t\t// remove all UI card\n\t\t\t\tfor (JButton item: listButton){\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton.clear();\n\n\t\t\t\tArrayList<Card> listCard = playerHandCards;\n\t\t\t\tArrayList<Card> playableCards = getPlayableCards(player);\n\n\t\t\t\tfor (int i = 0; i < listCard.size(); i++) {\n\t\t cardIndex++;\n\n\t\t Card card = listCard.get(i);\n\t\t\t JButton btnCard = new JButton();\n\t\t\t btnCard.setFocusPainted(false);\n\t\t\t btnCard.setName(i + \"\");\n\n\t\t\t springLayout.putConstraint(SpringLayout.WEST, btnCard, (int) (cardLeft + cardIndex * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard, (int) (cardLeft + (cardIndex + 1) * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard, cardTop, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard, cardTop + cardHeight, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n\t\t\t \tImageIcon cardImg = card.getCardImage();\n\t\t\t \tbtnCard.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t\t } catch (NullPointerException e){\n\t\t\t \tSystem.out.println(\"Image not found\");\n\t\t\t \tbtnCard.setText(\"Not found\");\n\t\t\t }\n\n\t\t\t\t\t/* if the player is the first to play, allow all cards to be played */\n\t\t\t\t\tif (player.getPosition() != 0) {\n\t\t\t\t\t\tif (!(playableCards.contains(card))) {\n\t\t\t\t\t\t\tbtnCard.setEnabled(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t btnCard.addActionListener(new ActionListener() {\n\t\t\t \t@Override\n\t\t\t \tpublic void actionPerformed(ActionEvent e){\n\t\t\t \t\tif (waitingUser){\n\t\t\t \t\t\tint index = Integer.parseInt(btnCard.getName());\n\t\t\t \t\t\tSystem.out.println(\"CLICKING BUTTON CARD NOW: \" + index);\n\t\t\t \t\t\tpassSelectedCard(index);\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t });\n\n\t\t\t listButton.add(btnCard);\n\t \testimationGame.getContentPane().add(btnCard);\n\t\t\t }\n\t\t\t}\n }\n estimationGame.validate();\n estimationGame.repaint();\n\t}", "private void showCard(String name) {\n CardLayout cl = (CardLayout)(cards.getLayout());\n cl.show(cards, name);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"1\");\n\t\t\t\t}", "@Override\n public void onClick(View theView) {\n if(frontSideShowing){\n setBackSide();\n }else{\n setFrontSide();\n }\n\n\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "@Override\n\tpublic void onNaviTurnClick() {\n\t\t\n\t}", "private void LinkElements() {\n back = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.arrow);\n addItem = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.addItem);\n saveBtn = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.saveBtn);\n cancelBtn = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.deleteBtn);\n nameInput = (EditText) findViewById(zunder.ebs.zunderapp.R.id.nameInput);\n name = (TextView) findViewById(zunder.ebs.zunderapp.R.id.ProfileName);\n tittle = (TextView) findViewById(zunder.ebs.zunderapp.R.id.ProfileTitle);\n tittle = (TextView) findViewById(zunder.ebs.zunderapp.R.id.ProfileTitle);\n profilePic = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.profilePic);\n qrButton = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.QrButton);\n submenu = (LinearLayout) findViewById(zunder.ebs.zunderapp.R.id.subMenu);\n scrollView = (ScrollView) findViewById(zunder.ebs.zunderapp.R.id.scrollMenu);\n }", "private void setupDrawerContent() {\n previousMenuItem = navigationView.getMenu().findItem(R.id.nav_category);\n previousMenuItem.setChecked(true);\n previousMenuItem.setCheckable(true);\n\n navigationView.setNavigationItemSelectedListener(\n new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n\n drawerLayout.closeDrawer(Gravity.LEFT);\n\n if (previousMenuItem.getItemId() == menuItem.getItemId())\n return true;\n\n menuItem.setCheckable(true);\n menuItem.setChecked(true);\n previousMenuItem.setChecked(false);\n previousMenuItem = menuItem;\n\n switch (menuItem.getItemId()) {\n case R.id.nav_category:\n displayView(CATEGORIES_FRAG, null);\n break;\n case R.id.nav_favorites:\n displayView(FAVORITE_FRAG, null);\n break;\n case R.id.nav_reminder:\n displayView(REMINDER_FRAG, null);\n break;\n case R.id.nav_about:\n displayView(ABOUT_FRAG, null);\n break;\n case R.id.nav_feedback:\n IntentHelper.sendEmail(BaseDrawerActivity.this);\n break;\n case R.id.nav_rate_us:\n IntentHelper.voteForAppInBazaar(BaseDrawerActivity.this);\n break;\n case R.id.nav_settings:\n displayView(SETTINGS_FRAG, null);\n break;\n\n }\n\n\n return true;\n }\n }\n\n );\n }", "@Override\n\tpublic void showItems(JZMatchBean bean, LinearLayout parent_layout) {\n\t\t\n\t}", "private void btnbckActionPerformed(java.awt.event.ActionEvent evt) {\n CardSequenceJPanel.remove(this);\n CardLayout layout = (CardLayout) CardSequenceJPanel.getLayout();\n layout.previous(CardSequenceJPanel);\n }", "@Override\n public void onClick(View v) {\n\n int current = getItem(+1);\n if (current < layouts.length) {\n // move to next screen\n viewPager.setCurrentItem(current);\n } else {\n launchHomeScreen();\n }\n }", "private void backJButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n userProcessContainer.remove(this);\n CardLayout layout = (CardLayout) userProcessContainer.getLayout();\n layout.previous(userProcessContainer);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"2\");\n\t\t\t\t}", "private void switchToContentView() {\n no_content.setVisibility(View.GONE);\n mRecyclerView.setVisibility(View.VISIBLE);\n }", "public void containerPress(View view) {\n\n isQuestion = false;\n displayCard(deck.getCard(deckPos), isQuestion);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n v = inflater.inflate(R.layout.fragment_home, container, false);\n\n final CardView cardView_Stock = (CardView) v.findViewById(R.id.card_entrar_stock);\n cardView_Stock.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"ResourceAsColor\")\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), StockActivity.class));\n }\n });\n\n final CardView cardView_Caixa = (CardView) v.findViewById(R.id.card_entrar_caixa);\n cardView_Caixa.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"ResourceAsColor\")\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), CaixaActivity.class));\n }\n });\n\n final CardView cardView_relatorio = (CardView) v.findViewById(R.id.card_entrar_despesas);\n cardView_relatorio.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"ResourceAsColor\")\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), ScrollingActivity.class));\n }\n });\n\n final CardView cardView_Vendas = (CardView) v.findViewById(R.id.card_entrar_vendas);\n cardView_Vendas.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"ResourceAsColor\")\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), VendasActivity.class));\n }\n });\n\n return v;\n\n }", "public void showCard()\n {\n ArrayList<Card> superCards = super.removeCards();\n super.addCard(hiddenCard);\n super.addCards(superCards.subList(1, superCards.size()));\n hidden = false;\n }", "void onCardViewTap(View view, int position);", "private void switchTo(String pageValue) {\n\t\tthis.fenetre.getCardLayout().show(this.fenetre.getContentPane(), pageValue);\n\t}", "public void menu(){\n super.goToMenuScreen();\n }", "@Override\n public void onClick(View theView) {\n if(curIndex == deckOfCards.size()-1){\n ArrayList<FlashCard> newDeck = new ArrayList<FlashCard>();\n for(int i = 0; i < deckOfCards.size(); i++){\n newDeck.add(deckOfCards.get(i));\n }\n Intent intent = new Intent(getApplicationContext(), FinishScreenActivity.class);\n intent.putParcelableArrayListExtra(\"data\", newDeck);\n intent.putParcelableArrayListExtra(\"originalDeck\", originalCards);\n startActivity(intent);\n finish();\n }else{\n ++curIndex;\n curCard = deckOfCards.get(curIndex);\n Log.d(TAG, \"on card number \" + curIndex);\n refreshButtons();\n setFrontSide();\n }\n\n }", "public void switchToGameScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"game\");\n \troom.reset();\n }", "@Override\n public void onCardClick(String p) {\n }", "@Override\n public void onEditHat() {\n\n moveToFragment(0);\n }", "public void switchToGameOverScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"gameover\");\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n userProcessContainer.remove(this);\n CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();\n cardLayout.previous(userProcessContainer);\n }", "@FXML\n public void plannerCupboardBtnClicked(){\n //display correct pane and subMenu pane\n subMenuDisplay(PlannerSubMenuPane);\n PlannerCupboardPane.toFront();\n MenuPane.toFront();\n loadIngredients();\n }", "public void link1Action(ActionEvent actionEvent) {\n UIComponent eventComponent = deckBind;\n _animateDeckDisplayedChild(eventComponent, 0);// 0 for first child of deck\n }", "public void showPage_MainContainer(String page){\n if(!(this.currentPage_ActionPanel.equals(page))){\n cardLayout_Action.show(mainActionPanel,page);\n currentPage_ActionPanel = page;\n }\n }", "@Override\r\n\tpublic void onNextRoadClick() {\n\r\n\t}", "private void setSingleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n CardView cardView = (CardView) mainGrid.getChildAt(i);\n final int finalI = i;\n final int finalI1 = i;\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Log.v(\"logmessage\",finalI+\"\");\n String bikeName = bikeList.get(finalI);\n Intent intent = new Intent(BrandListActivity.this, BikeListActivity.class);\n intent.putExtra(\"url\", bikeName);\n Log.v(\"logmessage\", bikeName);\n if (flag!=0){\n intent.putExtra(\"flag\", flag);\n startActivityForResult(intent, 101);\n }\n else {\n startActivity(intent);\n }\n\n }\n });\n }\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \tgetUI().getNavigator().navigateTo(NAME + \"/\" + contenView);\n }", "public void clickonFullyAutomaticFrontLoad() {\n\t\t\n\t}", "@Override\n\tpublic void goToUIMantAmortizacion(String modo) {\n\t\t\t\tif (modo.equalsIgnoreCase(constants.modoNuevo())) {\n\t\t\t\t\tif(uiHomePrestamo!=null){\n\t\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().setModo(modo);\n\t\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().setBean(null,beanPrestamo,lblADevolver.getText());\n\t\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().activarCampos();\n\t\t\t\t\t\tuiHomePrestamo.getContainer().showWidget(4);\t\t\t\t\t\n\t\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().refreshScroll();\n\t\t\t\t\t}else if(uiHomeCobranza!=null){\n\t\t\t\t\t\tuiHomeCobranza.getUiMantAmortizacionImpl().setModo(modo);\n\t\t\t\t\t\tuiHomeCobranza.getUiMantAmortizacionImpl().setBean(null,beanPrestamo,lblADevolver.getText());\n\t\t\t\t\t\tuiHomeCobranza.getUiMantAmortizacionImpl().setBeanGestorCobranza(beanGestorCobranza);\n\t\t\t\t\t\tuiHomeCobranza.getUiMantAmortizacionImpl().activarCampos();\n\t\t\t\t\t\tuiHomeCobranza.getContainer().showWidget(3);\t\t\t\t\t\n\t\t\t\t\t\tuiHomeCobranza.getUiMantAmortizacionImpl().refreshScroll();\n\t\t\t\t\t}\n\t\t\t\t} else if (modo.equalsIgnoreCase(constants.modoEliminar())) {\n\t\t\t\t\tAmortizacionProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\t\t\tif (bean == null){\n\t\t\t\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccionAmortizacion(), null);\n\t\t\t\t\t\t//Window.alert(constants.seleccionAmortizacion());\n\t\t\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccionAmortizacion());\n\t\t\t\t\t\tnot.showPopup();\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().setModo(modo);\n\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().setBean(bean,beanPrestamo,lblADevolver.getText());\n\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().activarCampos();\n\t\t\t\t\tuiHomePrestamo.getContainer().showWidget(4);\t\t\t\t\t\n\t\t\t\t\tuiHomePrestamo.getUiMantAmortizacionImpl().refreshScroll();\n\t\t\t\t}\n\t}", "private void syncCardsWithViews()\n\t{\n\t\t\n\t\t// Remove all cards from all views\n\t\tremoveCardsFromViews();\n\t\t\n\t\t// Add all cards to all views\n\t\taddCardsToViews();\n\t\t\n\t\t// Repaint everything\n\t\trepaintViews();\n\t\t\n\t}", "public void switchToHighScoresScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"highscores\");\n }", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private void setSingleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n CardView cardView = (CardView) mainGrid.getChildAt(i);\n final int finalI = i;\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (finalI == 0) {\n Intent intent = new Intent(MainActivity.this, SoundActivity.class);\n startActivity(intent);\n }\n else if (finalI == 1) {\n Intent intent = new Intent(MainActivity.this, LedActivity.class);\n startActivity(intent);\n }\n else if (finalI == 2) {\n Intent intent = new Intent(MainActivity.this, MagneticActivity.class);\n startActivity(intent);\n }\n else if (finalI == 3) {\n Intent intent = new Intent(MainActivity.this, LightActivity.class);\n startActivity(intent);\n }\n }\n });\n }\n }", "private void panel_switch(int i)\n\t{\n\t\t\n\t\tthis.setVisible(false);\n\t\tif(i == 1)\n\t\t{\n\t\t\tcards.show(parent.getCards(), \"server\");\n\t\t\t\n\t\t}\n\t\telse if(i == 2)\n\t\t\tcards.show(parent.getCards(), \"profile\");\n\t\telse if(i == 3)\n\t\t\tcards.show(parent.getCards(), \"restrict\");\n\t\t\n\t}", "@Override\r\n\tpublic void onBackPressed()\r\n\t{\r\n\t\tif (flipper.getDisplayedChild() != 0)\r\n\t\t{\r\n\t\t\tflipper.showPrevious();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsuper.onBackPressed();\r\n\t\t}\r\n\t}", "public void transitionToHome() throws RemoteException{\n removeAll();\n mainPanel = new MainPanel(contr);\n add(mainPanel, \"span 1\");\n }", "private void changeLayoutFromTag(@FragmentBackStackTags String tag) {\n switch (tag) {\n case TAG_EMOTICON_FRAGMENT:\n //Display bottom bar of not displayed.\n if (mBottomViewContainer != null) mBottomViewContainer.setVisibility(View.VISIBLE);\n\n mEmoticonTabBtn.setSelected(true);\n mGifTabBtn.setSelected(!mEmoticonTabBtn.isSelected());\n mStickerBtn.setSelected(!mEmoticonTabBtn.isSelected());\n mBackSpaceBtn.setVisibility(View.VISIBLE);\n break;\n case TAG_GIF_FRAGMENT:\n //Display bottom bar of not displayed.\n if (mBottomViewContainer != null) mBottomViewContainer.setVisibility(View.VISIBLE);\n\n mEmoticonTabBtn.setSelected(false);\n mGifTabBtn.setSelected(!mEmoticonTabBtn.isSelected());\n mStickerBtn.setSelected(false);\n mBackSpaceBtn.setVisibility(View.GONE);\n break;\n case TAG_STICKERS_FRAGMENT:\n //Display bottom bar of not displayed.\n if (mBottomViewContainer != null) mBottomViewContainer.setVisibility(View.VISIBLE);\n\n mEmoticonTabBtn.setSelected(false);\n mGifTabBtn.setSelected(false);\n mStickerBtn.setSelected(!mEmoticonTabBtn.isSelected());\n mBackSpaceBtn.setVisibility(View.GONE);\n break;\n case TAG_EMOTICON_SEARCH_FRAGMENT:\n //Display bottom bar of not displayed.\n if (mBottomViewContainer != null) mBottomViewContainer.setVisibility(View.GONE);\n break;\n case TAG_GIF_SEARCH_FRAGMENT:\n //Display bottom bar of not displayed.\n if (mBottomViewContainer != null) mBottomViewContainer.setVisibility(View.GONE);\n break;\n default:\n //Do nothing\n }\n }", "@Override\n public void onClick(View view, final int position) {\n if (position == 0) {\n return;\n } else {\n int mypos = recyclerView.getChildViewHolder(view).getAdapterPosition();\n Intent detailed = new Intent(getActivity(), EventDeatilsPage.class);\n detailed.putExtra(\"eventInfo\", childList.get(mypos - 1));\n startActivity(detailed);\n getActivity().overridePendingTransition(R.anim.left_to_right, R.anim.right_to_left);\n }\n }", "@Override\r\n public void moveCard() {\n \r\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"3\");\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\t\n\t\t\t\t}", "private void setUpBackButton() {\n mBackButton = mDetailToolbar.getChildAt(0);\n if (null != mBackButton && mBackButton instanceof ImageView) {\n\n // the scrim makes the back arrow more visible when the image behind is very light\n mBackButton.setBackgroundResource(R.drawable.scrim);\n\n ViewGroup.MarginLayoutParams lpt = (ViewGroup.MarginLayoutParams) mBackButton.getLayoutParams();\n lpt.setMarginStart((int) getResources().getDimension(R.dimen.keyline_1));\n\n ViewGroup.LayoutParams lp = mBackButton.getLayoutParams();\n lp.height = (int) getResources().getDimension(R.dimen.small_back_arrow);\n lp.width = (int) getResources().getDimension(R.dimen.small_back_arrow);\n\n // tapping the back button or the Up button should return to the list of articles\n mBackButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onBackPressed();\n supportFinishAfterTransition();\n }\n });\n }\n }", "@Override\n\tpublic void onNextRoadClick() {\n\t\t\n\t}", "public void goMainStampCard() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager\n .beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_fade_in,\n R.anim.abc_fade_out);\n fragmentTransaction.addToBackStack(null);\n FragmentMainStampCard fragmentMain = FragmentMainStampCard\n .newInstances();\n fragmentTransaction.replace(R.id.container, fragmentMain);\n fragmentTransaction.commit();\n }", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public void onClick(View view) {\n BusinessCard item = (BusinessCard) view.getTag();\n if (mTwoPane) {\n Bundle arguments = new Bundle();\n// arguments.putString(ItemDetailFragment.ARG_ITEM_ID, String.valueOf(item.getId())); // put object in intent\n arguments.putParcelable(ItemDetailFragment.ARG_ITEM_ID, item);\n ItemDetailFragment fragment = new ItemDetailFragment();\n fragment.setArguments(arguments);\n mParentActivity.getSupportFragmentManager().beginTransaction()\n .replace(R.id.item_detail_container, fragment)\n .commit();\n } else {\n Context context = view.getContext();\n Intent intent = new Intent(context, ItemDetailActivity.class);\n intent.putExtra(ItemDetailFragment.ARG_ITEM_ID, item); // put object in intent\n\n // S04M03-22 add options to make transition appear\n// Bundle options = ActivityOptions.makeSceneTransitionAnimation((Activity) view.getContext()).toBundle();\n // S04M03-24 change constructor to allow for shared views\n Bundle options = ActivityOptions.makeSceneTransitionAnimation(\n (Activity) view.getContext(),\n holder.mImageView,\n ViewCompat.getTransitionName(holder.mImageView)\n ).toBundle();\n\n context.startActivity(intent, options);\n }\n }", "private void m125716j() {\n if (!this.f90225r) {\n this.f90225r = true;\n this.f88306d.inflateMenu(R.menu.c4);\n if (this.f88314l != null) {\n this.f88314l.setVisibility(8);\n }\n if (!(this.f88315m == null || this.f88315m.getLayoutParams() == null)) {\n ViewGroup.LayoutParams layoutParams = this.f88315m.getLayoutParams();\n layoutParams.height = DisplayUtils.m87171b(this.f88315m.getContext(), 0.5f);\n this.f88315m.setLayoutParams(layoutParams);\n }\n this.f88306d.setOnMenuItemClickListener(this);\n this.f88306d.setNavigationIcon(R.drawable.t6);\n this.f88306d.setOnClickListener(new View.OnClickListener() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$IGZCfsRJswgFRfHR0GDflMQEQg */\n\n public final void onClick(View view) {\n TopicFragment.this.m125708d((TopicFragment) view);\n }\n });\n this.f88306d.setNavigationOnClickListener(new View.OnClickListener() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$Y1Ui__uQByQMTGugzZrwFtzQixI */\n\n public final void onClick(View view) {\n TopicFragment.this.m125704c((TopicFragment) view);\n }\n });\n this.f88306d.setTintColorResource(R.color.GBK05A);\n this.f88312j.setVisibility(8);\n this.f88312j.setVisibility(0);\n this.f88311i.addOnOffsetChangedListener((AppBarLayout.OnOffsetChangedListener) new AppBarLayout.OnOffsetChangedListener() {\n /* class com.zhihu.android.topic.platfrom.$$Lambda$TopicFragment$HMOYYgVeRnfsTVBPp1nW7VG4ng */\n\n @Override // com.google.android.material.appbar.AppBarLayout.BaseOnOffsetChangedListener, com.google.android.material.appbar.AppBarLayout.OnOffsetChangedListener\n public final void onOffsetChanged(AppBarLayout appBarLayout, int i) {\n TopicFragment.this.m125684a((TopicFragment) appBarLayout, (AppBarLayout) i);\n }\n });\n if (mo69217g() != null && mo69217g().isSuperTopic) {\n this.f88316n.setOnNestedScrollListener(new SuperTopicCoordinatorLayout.AbstractC25932a() {\n /* class com.zhihu.android.topic.platfrom.TopicFragment.C258261 */\n\n @Override // com.zhihu.android.topic.widget.SuperTopicCoordinatorLayout.AbstractC25932a\n /* renamed from: a */\n public void mo110586a() {\n if (TopicFragment.this.m125729x()) {\n TopicFragment.this.f90219I.set(true);\n TopicFragment.this.m125731z();\n }\n }\n });\n }\n }\n }", "@Override\n public void onClick(View v) {\n navController.navigate(R.id.two);\n }", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "@Override\n public void onBackPressed() {\n if (!ecPagerView.collapse())\n super.onBackPressed();\n }", "@Override\n public void putCardMode() {\n gameboardPanel.putCardMode();\n leaderCardsPanel.disableProductionButtons();\n }", "public void navigation() {\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 2;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_RESULTS_SCREEN\");\r\n\t\t}", "protected abstract void iniciarLayout();", "private void continueSetup(){\n bannerImages = ((App) getContext().getApplicationContext()).getBannersList();\n allCategoriesList = ((App) getContext().getApplicationContext()).getCategoriesList();\n\n setupSlidingBanner();\n\n // Add Products Fragment to specified FrameLayout\n productsFragment = new Products();\n Bundle bundle = new Bundle();\n bundle.putBoolean(\"isSubFragment\", true);\n productsFragment.setArguments(bundle);\n fragmentManager.beginTransaction().replace(R.id.products_fragment_home1, productsFragment).commit();\n\n // Add RecentlyViewed Fragment to specified FrameLayout\n recentlyViewed = new RecentlyViewed();\n fragmentManager.beginTransaction().replace(R.id.recently_viewed_fragment_home1, recentlyViewed).commit();\n }", "protected abstract @LayoutRes\n int setNavigationDrawerContainer();", "private void peek() {\n\t\tfor (int card = 0; card < CARDS_SUM; card++) {\n\t\t\t// cheat by finding card face without turning card over\n\t\t\tPlayingCard thisCard = ((PlayingCard) getActivity().findViewById(solo.getImage(card).getId()));\n\t\t\tif (!thisCard.isLocked() && ! thisCard.getVisible()) {\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tif (hMapTabs.size() > 0) {\n\n\t\t\t\t\t\t\tif (mTabHost.getTabWidget().getChildAt(2)\n\t\t\t\t\t\t\t\t\t.isSelected()) {\n\t\t\t\t\t\t\t\tif (hMapTabs.get(Const.TABS[2]).size() > 1) {\n\t\t\t\t\t\t\t\t\tresetFragment();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmTabHost.getTabWidget().setCurrentTab(2);\n\t\t\t\t\t\t\tmTabHost.setCurrentTab(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\tpublic void onNaviViewLoaded() {\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.tab_home:\n setHome();\n break;\n case R.id.tab_store:\n this.mIconHome.setImageResource(R.drawable.home_icon_home);\n this.mIconStore.setImageResource(R.drawable.home_icon_store_press);\n this.mIconCart.setImageResource(R.drawable.home_icon_cart);\n this.mIconMy.setImageResource(R.drawable.home_icon_my);\n this.mHomeText.setTextColor(getResources().getColor(R.color.content_gray));\n this.mStoreText.setTextColor(getResources().getColor(R.color.pink));\n this.mCartText.setTextColor(getResources().getColor(R.color.content_gray));\n this.mMyText.setTextColor(getResources().getColor(R.color.content_gray));\n\n getTabHost().setCurrentTab(1);\n break;\n case R.id.tab_cart_layout:\n setCart();\n break;\n case R.id.tab_my_outer:\n this.mIconHome.setImageResource(R.drawable.home_icon_home);\n this.mIconStore.setImageResource(R.drawable.home_icon_store);\n this.mIconCart.setImageResource(R.drawable.home_icon_cart);\n this.mIconMy.setImageResource(R.drawable.home_icon_my_press);\n this.mHomeText.setTextColor(getResources().getColor(R.color.content_gray));\n this.mStoreText.setTextColor(getResources().getColor(R.color.content_gray));\n this.mCartText.setTextColor(getResources().getColor(R.color.content_gray));\n this.mMyText.setTextColor(getResources().getColor(R.color.pink));\n\n getTabHost().setCurrentTab(3);\n break;\n default:\n break;\n }\n }", "@Override\r\n\tpublic void showNext(){\r\n\t\tint currentNotification = this.getDisplayedChild();\r\n\t\tif(currentNotification < this.getChildCount() - 1){\r\n\t\t\tsetInAnimation(inFromRightAnimation());\r\n\t\t\tsetOutAnimation(outToLeftAnimation());\r\n\t\t\t//Update the navigation information on the next view before we switch to it.\r\n\t\t\tfinal View nextView = this.getChildAt(currentNotification + 1);\r\n\t\t\tupdateView(nextView, currentNotification + 1, 0);\r\n\t\t\t//Flip to next View.\r\n\t\t\tsuper.showNext();\r\n\t\t}\r\n\t}", "public void switchToDescriptionPanel() {\n FragmentManager manager = getActivity().getSupportFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.replace(R.id.container, new DescriptionPanelFragment());\n transaction.commit();\n }", "private void print_da_page() {\n \t\tSystem.out.println(\"**** Hell yeah, print da page\");\n \t\t// des Assert ici pour verifier qq truc sur le local storage serait p-e\n \t\t// bien..\n \n \t\tsetInSlot(SLOT_OPTION_SELECION, cardSelectionOptionPresenter);\n \t\tcardSelectionOptionPresenter.init();\n \t\t\n \t\tsetInSlot(SLOT_BOARD, boardPresenter);\n \n \t\tcardDragController.registerDropController(cardDropPanel);\n \t\t\n \t\tsetStaticFirstComboView();\n \t\twriteInstancePanel();\n \t\tStorage_access.setCurrentProjectInstanceBddId(0);\n \t\t//Storage_access.setCurrentProjectInstance(Storage_access.getInstanceBddId(Storage_access.getCurrentProjectInstance()));\n \t\t\n \t\treDrowStatusCard();\n \t\t\n \t\tthis.boardPresenter.redrawBoard(0,0); //TODO n'enregistrerons nous pas la \"vue par default\"? ou la derniere ?\n \t\t\n \t\twriteCardWidgetsFirstTime();\n \t\t//getView().constructFlex(cardDragController);\n \t\n \t\t\n \t\t\n \t\t//CellDropControler dropController = new CellDropControler(simplePanel);\n \t //\tcardDragController.registerDropController(dropController);\n \n \t}", "public interface CardMovingMvpView extends MvpView {\n void showCardList(CardList cardList);\n}", "@Override\n\tpublic void goToBack() {\n\t\tif(uiHomePrestamo!=null){\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(constants.prestamos());\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\n\t\t}else if(uiHomeCobrador!=null){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tuiHomeCobrador.getContainer().showWidget(2);\n\t\t\tuiHomeCobrador.getUiClienteImpl().cargarClientesAsignados();\n\t\t\tuiHomeCobrador.getUiClienteImpl().reloadTitleCobrador();\n\t\t}\n\t}", "public void navNav() {\n container.getChildren().clear();\n Map<String, String> fxmlRoleRef = new HashMap<>();\n for (int j = 0; j < fxmlRef.length; j++) { fxmlRoleRef.put(roleRef[j], fxmlRef[j]);}\n Label lblWelcome = new Label(\"Velkommen \" + login.getUsername());\n Label lblLogout = new Label(\"Logg ut\");\n lblLogout.getStyleClass().add(\"underline\");\n lblLogout.setOnMouseClicked(event -> navLogin());\n AnchorPane topBar = new AnchorPane(lblWelcome, lblLogout);\n topBar.setLeftAnchor(lblWelcome, 0.0);\n topBar.setRightAnchor(lblLogout, 28.0);\n container.getChildren().add(topBar);\n List<String> roles = login.getRoles();\n for (int i = 0; i < roles.size(); i++) {\n if (fxmlRoleRef.containsKey(roles.get(i))) {\n final int ROLE_INDEX = i;\n Label lblRole = new Label(roles.get(i));\n lblRole.setOnMouseClicked(event -> {\n Stage stage = new Stage();\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"../fxml/\" + fxmlRoleRef.get(roles.get(ROLE_INDEX)) + \".fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (roles.get(ROLE_INDEX).equals(\"Tekniker\")) {\n Tec_Controller controller = fxmlLoader.<Tec_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n controller.init(Integer.parseInt(login.getPersonId()));\n } else if (roles.get(ROLE_INDEX).equals(\"Booking ansvarlig\")) {\n Bookres_Controller controller = fxmlLoader.<Bookres_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n } else if (roles.get(ROLE_INDEX).equals(\"Manager\")) {\n Man_Controller controller = fxmlLoader.<Man_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n controller.init(Integer.parseInt(login.getPersonId()));\n } else if (roles.get(ROLE_INDEX).equals(\"Arrangør\")) {\n Arr_Controller controller = fxmlLoader.<Arr_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n } else if (roles.get(ROLE_INDEX).equals(\"Booking sjef\")) {\n BoB_Controller controller = fxmlLoader.<BoB_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n } else if (roles.get(ROLE_INDEX).equals(\"PR manager\")) {\n PRres_Controller controller = fxmlLoader.<PRres_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n } else if (roles.get(ROLE_INDEX).equals(\"Servering\")) {\n BoB_Controller controller = fxmlLoader.<BoB_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n } else if (roles.get(ROLE_INDEX).equals(\"Admin\")) {\n Adm_Controller controller = fxmlLoader.<Adm_Controller>getController();\n Scene scene = new Scene(root, 800, 600);\n stage.setScene(scene);\n }\n stage.show();\n });\n lblRole.getStyleClass().add(\"btnNav\");\n lblRole.setAlignment(Pos.CENTER);\n container.getChildren().add(lblRole);\n }\n }\n }", "public void setActiveCard(String cardname){\n\t\tCardLayout cl = (CardLayout)(cards.getLayout());\n\t\tcl.show(cards, cardname);\n\t\t//note: if cardname is passed in that doesnt exist, nothing happens\n\t}", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "private void setSingleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n CardView cardView = (CardView) mainGrid.getChildAt(i);\n final int finalI = i;\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent intent = new Intent(BuyChoose.this,ActivityOne.class);\n intent.putExtra(\"info\",\"This is activity from card item index \"+finalI);\n startActivity(intent);\n\n }\n });\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v=inflater.inflate(R.layout.fragment_loan, container, false);\n if (!NetworkStatus.isConnected(getActivity())) {\n getActivity().finish();\n }\n setHasOptionsMenu(true);\n ActionBar actionBar=((AppCompatActivity)getActivity()).getSupportActionBar();\n if (actionBar != null) {\n actionBar.setTitle(\"Loan\");\n }\n cv1=(CardView)v.findViewById(R.id.cv1);\n cv2=(CardView)v.findViewById(R.id.cv2);\n cv3=(CardView)v.findViewById(R.id.cv3);\n cv1.setOnClickListener(this);\n cv2.setOnClickListener(this);\n cv3.setOnClickListener(this);\n v.setFocusableInTouchMode(true);\n v.requestFocus();\n v.setOnKeyListener(new View.OnKeyListener() {\n @Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (event.getAction() == KeyEvent.ACTION_DOWN) {\n if (keyCode == KeyEvent.KEYCODE_BACK) {\n NavigationView navigationView=(NavigationView) getActivity().findViewById(R.id.nav_view);\n navigationView.getMenu().findItem(R.id.dashboard).setChecked(true);\n Fragment fragment1 = new DashboardFragment();\n FragmentTransaction trans1 = getFragmentManager().beginTransaction();\n trans1.replace(R.id.frame, fragment1);\n trans1.addToBackStack(null);\n trans1.commit();\n return true;\n }\n }\n return false;\n }\n });\n return v;\n }" ]
[ "0.67762464", "0.64630187", "0.6389501", "0.6319951", "0.6142674", "0.6108569", "0.60544693", "0.59888524", "0.59753996", "0.59750146", "0.5970341", "0.59637433", "0.5940449", "0.593464", "0.5910273", "0.5879943", "0.5879404", "0.5857654", "0.5844354", "0.5810121", "0.5801266", "0.5795091", "0.57887614", "0.57324165", "0.57260317", "0.5712793", "0.57093453", "0.5707862", "0.57046336", "0.57030064", "0.5701995", "0.56983", "0.5697819", "0.5697394", "0.56972915", "0.5692127", "0.5689883", "0.5688421", "0.56828505", "0.5682757", "0.5663729", "0.5642988", "0.5636407", "0.56315726", "0.5627262", "0.56197315", "0.5603827", "0.5603659", "0.560348", "0.5601683", "0.56008893", "0.5599473", "0.5584445", "0.5576614", "0.5575026", "0.5574509", "0.5571045", "0.55708915", "0.55545014", "0.5551338", "0.55458707", "0.55455077", "0.55407584", "0.55215675", "0.551984", "0.55179125", "0.551566", "0.5514309", "0.5510666", "0.55037117", "0.5497608", "0.54885966", "0.54832613", "0.54785657", "0.5475733", "0.547528", "0.5472422", "0.54702884", "0.5461904", "0.54560566", "0.54548043", "0.5452965", "0.544935", "0.5448576", "0.54481506", "0.5443565", "0.54419464", "0.54400957", "0.54345137", "0.54344904", "0.54340476", "0.54270995", "0.5423773", "0.5421424", "0.53869617", "0.5386931", "0.53856117", "0.53854907", "0.5382976", "0.5379483", "0.5376839" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jLabel8 = new javax.swing.JLabel(); choosePanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jBMassage = new javax.swing.JButton(); jBGrill = new javax.swing.JButton(); jLabel11 = new javax.swing.JLabel(); massagePanel = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jCHalf = new javax.swing.JCheckBox(); jCWhole = new javax.swing.JCheckBox(); jTName = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTPhone = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTComment = new javax.swing.JTextArea(); jLabel7 = new javax.swing.JLabel(); jCStartTime = new javax.swing.JComboBox(); jBCreateMassage = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); bbqPanel = new javax.swing.JPanel(); jBCreateBBQ = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jTBBQPhone = new javax.swing.JTextField(); jTBBQCusAddress = new javax.swing.JTextField(); jTBBQName = new javax.swing.JTextField(); jTBBQCusEmail = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); jTBBQKm = new javax.swing.JTextField(); jTBBQDishes = new javax.swing.JTextField(); jTBBQEventAddress = new javax.swing.JTextField(); jTStartTime = new javax.swing.JTextField(); jPCategory = new javax.swing.JPanel(); jPChosen = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); jPScrollChosen = new javax.swing.JPanel(); jPBasket = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); jPScrollBasket = new javax.swing.JPanel(); jScrollPane4 = new javax.swing.JScrollPane(); jTBBQComments = new javax.swing.JTextArea(); jPanel3 = new javax.swing.JPanel(); jTBBQTotalPrice = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); jLabel8.setText("jLabel8"); setLayout(new java.awt.CardLayout()); choosePanel.setLayout(null); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Opret aftale"); choosePanel.add(jLabel1); jLabel1.setBounds(43, 22, 146, 14); jBMassage.setText("Massage"); jBMassage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBMassageActionPerformed(evt); } }); choosePanel.add(jBMassage); jBMassage.setBounds(43, 42, 146, 23); jBGrill.setText("Grill"); jBGrill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBGrillActionPerformed(evt); } }); choosePanel.add(jBGrill); jBGrill.setBounds(43, 71, 146, 23); jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pictures/event_bkgr.png"))); // NOI18N choosePanel.add(jLabel11); jLabel11.setBounds(0, 0, 242, 140); add(choosePanel, "card2"); massagePanel.setLayout(null); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Opret massage"); massagePanel.add(jLabel2); jLabel2.setBounds(10, 0, 266, 14); jCHalf.setText("Halvkrops"); jCHalf.setOpaque(false); jCHalf.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCHalfActionPerformed(evt); } }); massagePanel.add(jCHalf); jCHalf.setBounds(10, 82, 140, 23); jCWhole.setText("Helkrops"); jCWhole.setOpaque(false); jCWhole.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCWholeActionPerformed(evt); } }); massagePanel.add(jCWhole); jCWhole.setBounds(153, 82, 130, 23); jTName.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTNameFocusLost(evt); } }); massagePanel.add(jTName); jTName.setBounds(150, 60, 117, 20); jLabel3.setText("Kunde:"); massagePanel.add(jLabel3); jLabel3.setBounds(10, 20, 120, 14); jLabel4.setText("Navn:"); massagePanel.add(jLabel4); jLabel4.setBounds(150, 40, 120, 14); jLabel5.setText("Telefon nummer:"); massagePanel.add(jLabel5); jLabel5.setBounds(10, 40, 120, 14); jTPhone.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTPhoneFocusLost(evt); } }); massagePanel.add(jTPhone); jTPhone.setBounds(10, 60, 111, 20); jLabel6.setText("Bemærkninger:"); massagePanel.add(jLabel6); jLabel6.setBounds(10, 110, 260, 14); jTComment.setColumns(20); jTComment.setRows(5); jTComment.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTCommentFocusLost(evt); } }); jScrollPane1.setViewportView(jTComment); massagePanel.add(jScrollPane1); jScrollPane1.setBounds(10, 130, 266, 96); jLabel7.setText("Fra:"); massagePanel.add(jLabel7); jLabel7.setBounds(10, 240, 80, 14); jCStartTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); massagePanel.add(jCStartTime); jCStartTime.setBounds(73, 240, 130, 20); jBCreateMassage.setText("Opret"); jBCreateMassage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBCreateMassageActionPerformed(evt); } }); massagePanel.add(jBCreateMassage); jBCreateMassage.setBounds(70, 270, 130, 23); jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pictures/massage_bkgr.png"))); // NOI18N massagePanel.add(jLabel9); jLabel9.setBounds(0, 0, 290, 340); add(massagePanel, "card3"); bbqPanel.setLayout(null); jBCreateBBQ.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jBCreateBBQ.setText("Opret"); jBCreateBBQ.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBCreateBBQActionPerformed(evt); } }); bbqPanel.add(jBCreateBBQ); jBCreateBBQ.setBounds(630, 640, 290, 31); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kunde", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(18, 27, 36))); // NOI18N jPanel1.setOpaque(false); jPanel1.setLayout(null); jTBBQPhone.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQPhone.setText("Telefonnummer"); jTBBQPhone.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQPhoneFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQPhoneFocusLost(evt); } }); jPanel1.add(jTBBQPhone); jTBBQPhone.setBounds(10, 60, 290, 20); jTBBQCusAddress.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQCusAddress.setText("Adresse"); jTBBQCusAddress.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQCusAddressFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQCusAddressFocusLost(evt); } }); jPanel1.add(jTBBQCusAddress); jTBBQCusAddress.setBounds(10, 90, 290, 20); jTBBQName.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQName.setText("Navn"); jTBBQName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTBBQNameActionPerformed(evt); } }); jTBBQName.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQNameFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQNameFocusLost(evt); } }); jPanel1.add(jTBBQName); jTBBQName.setBounds(10, 30, 290, 20); jTBBQCusEmail.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQCusEmail.setText("Email"); jTBBQCusEmail.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQCusEmailFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQCusEmailFocusLost(evt); } }); jPanel1.add(jTBBQCusEmail); jTBBQCusEmail.setBounds(10, 120, 290, 20); bbqPanel.add(jPanel1); jPanel1.setBounds(0, 0, 310, 150); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Arrangement", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(51, 70, 87))); // NOI18N jPanel2.setOpaque(false); jPanel2.setLayout(null); jTBBQKm.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQKm.setText("Km"); jTBBQKm.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTBBQKmActionPerformed(evt); } }); jTBBQKm.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQKmFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQKmFocusLost(evt); } }); jPanel2.add(jTBBQKm); jTBBQKm.setBounds(10, 90, 290, 20); jTBBQDishes.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQDishes.setText("Kuverter"); jTBBQDishes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTBBQDishesActionPerformed(evt); } }); jTBBQDishes.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQDishesFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQDishesFocusLost(evt); } }); jPanel2.add(jTBBQDishes); jTBBQDishes.setBounds(10, 60, 290, 20); jTBBQEventAddress.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQEventAddress.setText("Adresse"); jTBBQEventAddress.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQEventAddressFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQEventAddressFocusLost(evt); } }); jPanel2.add(jTBBQEventAddress); jTBBQEventAddress.setBounds(10, 30, 290, 20); jTStartTime.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTStartTime.setText("Tid"); jTStartTime.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTStartTimeFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTStartTimeFocusLost(evt); } }); jPanel2.add(jTStartTime); jTStartTime.setBounds(10, 120, 290, 20); bbqPanel.add(jPanel2); jPanel2.setBounds(310, 0, 310, 150); jPCategory.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Valgmuligheder", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(18, 27, 36))); // NOI18N jPCategory.setOpaque(false); jPCategory.setLayout(null); bbqPanel.add(jPCategory); jPCategory.setBounds(0, 150, 310, 530); jPChosen.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Valgte", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(51, 70, 87))); // NOI18N jPChosen.setOpaque(false); jPChosen.setLayout(null); jScrollPane2.setBorder(null); jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); jScrollPane2.setOpaque(false); jPScrollChosen.setOpaque(false); jPScrollChosen.setLayout(null); jScrollPane2.setViewportView(jPScrollChosen); jPChosen.add(jScrollPane2); jScrollPane2.setBounds(10, 20, 290, 500); bbqPanel.add(jPChosen); jPChosen.setBounds(310, 150, 310, 530); jPBasket.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kurv", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(149, 166, 182))); // NOI18N jPBasket.setOpaque(false); jPBasket.setLayout(null); jScrollPane3.setBorder(null); jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); jScrollPane3.setOpaque(false); jPScrollBasket.setOpaque(false); jPScrollBasket.setLayout(null); jScrollPane3.setViewportView(jPScrollBasket); jPBasket.add(jScrollPane3); jScrollPane3.setBounds(10, 20, 290, 430); bbqPanel.add(jPBasket); jPBasket.setBounds(620, 0, 310, 460); jScrollPane4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kommentarer", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(51, 70, 87))); // NOI18N jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane4.setOpaque(false); jTBBQComments.setColumns(20); jTBBQComments.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQComments.setRows(5); jTBBQComments.setBorder(null); jTBBQComments.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTBBQCommentsFocusLost(evt); } }); jScrollPane4.setViewportView(jTBBQComments); bbqPanel.add(jScrollPane4); jScrollPane4.setBounds(620, 460, 310, 110); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Total Pris", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(18, 27, 36))); // NOI18N jPanel3.setOpaque(false); jPanel3.setLayout(null); jTBBQTotalPrice.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQTotalPrice.setText("jTextField1"); jTBBQTotalPrice.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQTotalPriceFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQTotalPriceFocusLost(evt); } }); jPanel3.add(jTBBQTotalPrice); jTBBQTotalPrice.setBounds(10, 20, 290, 30); bbqPanel.add(jPanel3); jPanel3.setBounds(620, 570, 310, 60); jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pictures/bbq_bkgr.png"))); // NOI18N jLabel10.setText("jLabel10"); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, bbqPanel, org.jdesktop.beansbinding.ELProperty.create("${background}"), jLabel10, org.jdesktop.beansbinding.BeanProperty.create("background")); bindingGroup.addBinding(binding); bbqPanel.add(jLabel10); jLabel10.setBounds(0, 0, 940, 680); add(bbqPanel, "card4"); bindingGroup.bind(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public MusteriEkle() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\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\tAlignment.LEADING)\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.addComponent(label22,\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\tGroupLayout.PREFERRED_SIZE,\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\tGroupLayout.DEFAULT_SIZE,\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\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\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\tlayout.createSequentialGroup()\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.addGap(3)\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.6945632", "0.6943359", "0.69363457", "0.6931661", "0.6927987", "0.6925778", "0.6925381", "0.69117576", "0.6911631", "0.68930036", "0.6892348", "0.6890817", "0.68904495", "0.6889411", "0.68838716", "0.6881747", "0.6881229", "0.68778914", "0.6876094", "0.6874808", "0.68713", "0.6859444", "0.6856188", "0.68556464", "0.6855074", "0.68549985", "0.6853093", "0.6853093", "0.68530816", "0.6843091", "0.6837124", "0.6836549", "0.6828579", "0.68282986", "0.68268806", "0.682426", "0.6823653", "0.6817904", "0.68167645", "0.68102163", "0.6808751", "0.680847", "0.68083245", "0.6807882", "0.6802814", "0.6795573", "0.6794048", "0.6792466", "0.67904556", "0.67893785", "0.6789265", "0.6788365", "0.67824304", "0.6766916", "0.6765524", "0.6765339", "0.67571205", "0.6755559", "0.6751974", "0.67510027", "0.67433685", "0.67390305", "0.6737053", "0.673608", "0.6733373", "0.67271507", "0.67262334", "0.67205364", "0.6716807", "0.67148036", "0.6714143", "0.67090863", "0.67077154", "0.67046666", "0.6701339", "0.67006236", "0.6699842", "0.66981244", "0.6694887", "0.6691074", "0.66904294" ]
0.0
-1
End of variables declaration//GENEND:variables
@Override public void actionPerformed(ActionEvent e) { switch (e.getActionCommand()) { case "Mas Customer Chosen": if (editing) { event.setCustomer(cc.getCustomer()); } else { customer = cc.getCustomer(); jTPhone.setText(customer.getPhone()); jTName.setText(customer.getName()); } break; case "BBQ Customer Chosen": if (editing) { } else { customer = cc.getCustomer(); jTBBQName.setText(customer.getName()); jTBBQPhone.setText(customer.getPhone()); jTBBQCusAddress.setText(customer.getAddress()); jTBBQCusEmail.setText(customer.getEmail()); } break; case "Category Meat": showCategoryItem("Meat"); break; case "Category Accompaniment": showCategoryItem("Accompaniment"); break; case "Category Salad": showCategoryItem("Salad"); break; case "Category Grill": showCategoryItem("Grill"); break; case "added to basket": addToBasket(); jTBBQTotalPrice.setText(bbqControl.getBuilder().getTotalPrice() + ""); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21779D() {\n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21784I() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void yy() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.58814824", "0.5854075", "0.5851759", "0.58514243", "0.58418584", "0.58395296", "0.5835063", "0.582234", "0.58090156", "0.5802706", "0.5793836", "0.57862717", "0.5784062", "0.5783567", "0.5782131", "0.57758564", "0.5762871", "0.5759349", "0.5745087", "0.57427835", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.57326084", "0.57301426", "0.57266665", "0.57229686", "0.57175463", "0.5705802", "0.5698347", "0.5697827", "0.569054", "0.5689405", "0.5686434", "0.56738997", "0.5662217", "0.56531453", "0.5645255", "0.5644223", "0.5642628", "0.5642476", "0.5640595", "0.56317437", "0.56294966", "0.56289655", "0.56220204", "0.56180173", "0.56134313", "0.5611337", "0.56112075", "0.56058615", "0.5604383", "0.5602629", "0.56002104", "0.5591573", "0.55856615", "0.5576992", "0.55707216", "0.5569681", "0.55570376", "0.55531484", "0.5551123", "0.5550893", "0.55482954", "0.5547471", "0.55469507", "0.5545719", "0.5543553", "0.55424106", "0.5542057", "0.55410767", "0.5537739", "0.55269134", "0.55236584", "0.55170715", "0.55035424", "0.55020875" ]
0.0
-1
create FF profile and Chrome op[tions objects
public static WebDriver initialise(String browser) { FirefoxProfile firefoxProfile = new FirefoxProfile(); ChromeOptions chromeOptions = new ChromeOptions(); if (browser.equalsIgnoreCase("chrome")) { System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "\\executables\\chromedriver.exe"); chromeOptions.addArguments("--disable-infobars"); chromeOptions.addArguments("--window-size=1920,1080"); chromeOptions.addArguments("--ignore-certificate-errors"); chromeOptions.addArguments("--disable-default-apps"); chromeOptions.addArguments("--disable-popup-blocking"); chromeOptions.addArguments("--incognito"); driver = new ChromeDriver(chromeOptions); } else if (browser.equalsIgnoreCase("firefox")) { System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "\\executables\\geckodriver.exe"); firefoxProfile.setPreference("permissions.default.stylesheet", 2); firefoxProfile.setPreference("permissions.default.image", 2); firefoxProfile.setPreference("dom.ipc.plugins.enabled.libflashplayer.so", false); firefoxProfile.setPreference("geo.enabled", false); driver = new FirefoxDriver(firefoxProfile); } /* set amount of total time for search for element */ driver.manage().timeouts().implicitlyWait(TIMEOUT, TimeUnit.SECONDS); /* set amount of time to page load to complete before trow error */ driver.manage().timeouts().pageLoadTimeout(PAGE_TIMEOUT, TimeUnit.SECONDS); /* * set amount of time to wait for a script to finish execution before throwing * error */ driver.manage().timeouts().setScriptTimeout(SCRIPT_TIMEOUT, TimeUnit.SECONDS); driver.manage().window().maximize(); return driver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver();\n } else if (browser.equals(\"chrome\")) {\n ChromeOptions options = new ChromeOptions();\n options.setBinary(new File(chromeBinary));\n options.addArguments(\"--lang=\" + language);\n driver = new ChromeDriver(options);\n } else {\n System.out.println(\"can't read browser type\");\n }\n }", "public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}", "H getProfile();", "public static FirefoxProfile firefoxProfile() {\r\n\r\n\t\tFirefoxProfile firefoxProfile = new FirefoxProfile();\r\n\t\tfirefoxProfile.setPreference(\"browser.download.folderList\", 2);\r\n\t\tfirefoxProfile.setPreference(\"browser.download.dir\", testAdminReportPath);\r\n\t\tfirefoxProfile.setPreference(\"browser.helperApps.neverAsk.saveToDisk\", \"text/csv;application/vnd.ms-excel\");\r\n\t\tfirefoxProfile.setPreference(\"browser.helperApps.alwaysAsk.force\", false);\r\n\t\tfirefoxProfile.setPreference(\"geo.enabled\", false);\r\n\t\treturn firefoxProfile;\r\n\t}", "private static void initialiseBrowser() {\n\t\tif (System.getProperty(\"proxyname\") != null) {\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"network.proxy.type\", 1);\n\t\t\tprofile.setPreference(\"network.proxy.http\", System.getProperty(\"proxyname\"));\n\t\t\tprofile.setPreference(\"network.proxy.http_port\", 3128);\n\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tsetDriver(driver);\n\t\t}\n\t\telse{\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tsetDriver(driver);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\r\n\r\n\t WebDriver driver;\r\n\t ChromeOptions options=new ChromeOptions();\r\n\t options.addArguments(\"C:\\\\chromedriver.exe\"); \r\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.chrome();\r\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY,options);\r\n\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n driver.get(\"http://www.baidu.com\");\r\n \r\n \r\n \r\n//\t\tWebDriver driver;\r\n//\t\tProfilesIni allProfiles =new ProfilesIni();\r\n// FirefoxProfile profile=allProfiles.getProfile(\"default\");\r\n// DesiredCapabilities capabilities=DesiredCapabilities.firefox();\r\n//\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n//\t\tdriver.get(\"http://www.baidu.com\");\r\n\t}", "public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString browser = \"ff\";\r\n\t\t\r\n\t\tif(browser.equalsIgnoreCase(\"chrome\"))\r\n\t\t{\r\n\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\tWebDriver dr = new ChromeDriver();\r\n\t\t}\r\n\t\r\n\t\t if(browser.equalsIgnoreCase(\"ff\"))\r\n\t\t{\r\n\t\t\tWebDriverManager.firefoxdriver().setup();\r\n\t\t\tWebDriver dr = new FirefoxDriver();\r\n\t\t}\r\n\t\t\r\n\t\t if(browser.equalsIgnoreCase(\"IE\"))\r\n\t\t{\r\n\t\t\tWebDriverManager.iedriver().setup();\r\n\t\t\tWebDriver dr = new InternetExplorerDriver();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "private void setFirefoxDriver() throws Exception {\n\t\t// Disable cache\n\t\tffProfile.setPreference(\"browser.cache.disk.enable\", false);\n\t\tffProfile.setPreference(\"browser.cache.disk_cache_ssl\", false);\n\t\tffProfile.setPreference(\"browser.cache.memory.enable\", false);\n\t\tffProfile.setPreference(\"browser.cache.offline.enable\", false);\n\t\t// Set to download automatically\n\t\tffProfile.setPreference(\"browser.download.folderList\", 2);\n\t\tffProfile.setPreference(\"browser.download.manager.showWhenStarting\", false);\n\t\tffProfile.setPreference(\"browser.helperApps.neverAsk.saveToDisk\", \"application/zip\");\n\t\tffProfile.setPreference(\"browser.download.dir\", BasePage.myTempDownloadsFolder);// \"\\\\temp_downloads\");\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X support\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);// \"\\\\temp_downloads\");\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\t\t// Disable hardware acceleration\n\t\tffProfile.setPreference(\"gfx.direct2d.disabled\", false);\n\t\tffProfile.setPreference(\"layers.acceleration.disabled\", false);\n\t\tFirefoxOptions ffOptions = new FirefoxOptions();\n\n\t\t/*\n\t\t * Set FF to run headless -- Need to make conditional from browser\n\t\t * parameter -- Does NOT work properly with all necessary tests.\n\t\t */\n\t\t// ffOptions.setHeadless(true);\n\n\t\tffOptions.setProfile(ffProfile);\n\t\tcapabilities = DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(FirefoxDriver.PROFILE, ffProfile);\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", firefoxDriverLocation);\n\t\t\tmyDriver = new FirefoxDriver(ffOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), ffOptions);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultFirefoxVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), ffOptions);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultFirefoxVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" FF-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmyDriver = new FirefoxDriver(ffOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "protected DesiredCapabilities getCapabilitiesForFirefox(String currentIOSSimulatorUDID, ExtentTest currentTest, ExtentReportGenerator extentReportGenerator, Integer wdaLocalPort, String scenarioName, String testRunName, String appVersionBeingTested){\n\t\tDesiredCapabilities desCap = new DesiredCapabilities();\n\t\t//desired caps go here\n\t\treturn desCap;\n\t}", "@Before\r\n\tpublic void OpenChrome() {\n\t\tconfig = new ConfigReader();\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",config.getChromePath());\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\texPages = new ExpediaPages(driver);\r\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tdriver=new FirefoxDriver();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//ChromePOM pom=new ChromePOM(driver);\r\n\t\t\r\n\t\t\r\n\t}", "private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\n\t\t\n\t\t_driver = new ChromeDriver(options);\n\t\treturn _driver;\n\t}", "public WebDriver openBrowser(String object, String data) {\n\n\t\ttry {\n\n\t\t\tString osName = System.getProperty(\"os.name\");\n\n\t\t\tlogger.debug(osName + \" platform detected\");\n\n\t\t\tosName = osName.toLowerCase();\n\n\t\t\tlogger.debug(osName);\n\n\t\t\tif (osName.indexOf(\"win\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\t\t\t\t\t\t/*Added by nitin gupta on 23/03/2016\n\t\t\t\t\t\t * This code is used to start firefox under proxy for ZAP\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tif(CONFIG.getProperty(\"ZAP\").equals(Constants.RUNMODE_YES))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t Proxy proxy = new Proxy();\n\t\t\t\t proxy.setHttpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setFtpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setSslProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t capabilities.setCapability(CapabilityType.PROXY, proxy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\t\t\t\tString sep = System.getProperty(\"file.separator\");\n\t\t\t\t\t\tFile dir=new File( System.getProperty(\"user.dir\")+ sep + \"externalFiles\" + sep + \"downloadFiles\");\n\t\t\t\t\t\t if(dir.exists()){\n\t\t\t\t\t\t\tlogger.debug(\"File Exits\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tprofile.setPreference(\"browser.download.folderList\",2);\n\t\t\t\t\t profile.setPreference(\"browser.download.manager.showWhenStarting\",false);\n\t\t\t\t\t profile.setPreference(\"browser.download.dir\", System.getProperty(\"user.dir\")+ sep + \"externalFiles\" + sep + \"downloadFiles\");\n\t\t\t\t\t FirefoxBinary binary = new FirefoxBinary(new File(CONFIG.getProperty(\"mozilla_path\")));\n\t\t\t\t\t profile.addExtension(new File(System.getProperty(\"user.dir\")+ sep + \"externalFiles\"+sep+\"uploadFiles\"+sep+\"wave_toolbar-1.1.6-fx.xpi\"));\n\t\t\t\t\t \n\t\t\t\t\t System.setProperty( \"webdriver.gecko.driver\",System.getProperty(\"user.dir\")+ CONFIG.getProperty(\"gecko_path\")); // Added By Kashish\n\t\t\t\t\t \n\t\t\t\t\t /*Added by Nitin on 23 march 2016,capabilities for starting firefox in proxy mode*/\n\t\t\t\t\t driver = new FirefoxDriver(binary, profile, capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t} else if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.ie.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"ie_path\"));\n\n\t\t\t\t\t\tDesiredCapabilities d = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver(d);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (data.equals(\"Safari\")) {\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new SafariDriver(capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*Added by nitin gupta on 23/03/2016\n\t\t\t\t\t\t * This code is used to start chrome under proxy for ZAP\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tif(CONFIG.getProperty(\"ZAP\").equals(Constants.RUNMODE_YES))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tProxy proxy = new Proxy();\n\t\t\t\t proxy.setHttpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setFtpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setSslProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t capabilities.setCapability(CapabilityType.PROXY, proxy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.setProperty(\t\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+ CONFIG.getProperty(\"chrome_path\"));\n\t\t\t\t\t\tMap<String, Object> prefs = new HashMap<String, Object>(); // Added Code to set Download Path and allowing Multiple downloads on Chrome\n\t\t\t\t\t\tprefs.put(\"profile.content_settings.pattern_pairs.*.multiple-automatic-downloads\", 1);\n\t\t\t\t\t\tprefs.put(\"download.default_directory\", System.getProperty(\"user.dir\")+ File.separator + \"externalFiles\" + File.separator + \"downloadFiles\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\t\t\t// options.setExperimentalOption(\"prefs\", prefs);\n\t\t\t\t\t\t options.addArguments(\"--disable-popup-blocking\"); // Added by Sanjay on 07 march 2016 , to disable popup blocking.\n\t\t\t\t\t\t\n\t\t\t\t\t\t /*Added by Nitin on 23 march 2016, capabilities to driver for starting chrome in proxy mode*/\n\t\t\t\t\t\t capabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\t\t\t\t\t driver = new ChromeDriver(capabilities);\n\t\t\t\t\t\t driver.manage().window().maximize();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\t\t\t\t\twait=new WebDriverWait(driver, explicitwaitTime);\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (osName.indexOf(\"mac\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\n\t\t\t\t\t\tFirefoxBinary binary = new FirefoxBinary(new File(CONFIG.getProperty(\"mozilla_path_mac\")));\n\n\t\t\t\t\t\tdriver = new FirefoxDriver(binary, profile);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t} else if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.ie.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"ie_path\"));\n\n\t\t\t\t\t\tDesiredCapabilities d = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver(d);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Safari\")) {\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tcapabilities.setJavascriptEnabled(false);\n\t\t\t\t\t\tdriver = new SafariDriver(capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.chrome.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"chrome_path_mac\"));\n\t\t\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\t\t\toptions.setBinary(CONFIG.getProperty(\"chrome_binary\"));\n\n\t\t\t\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG\n\n\t\t\t\t\t.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts()\n\n\t\t\t\t\t.implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (osName.indexOf(\"nix\") >= 0 || osName.indexOf(\"nux\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\n\t\t\t\t\t\tFirefoxBinary binary = new FirefoxBinary(new File(\n\n\t\t\t\t\t\tCONFIG.getProperty(\"mozilla_path_linux\")));\n\n\t\t\t\t\t\tdriver = new FirefoxDriver(binary, profile);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\",\n\n\t\t\t\t\t\t\"ie_path_linux\");\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) {\n\n\t\t\t\t\t\tnew DesiredCapabilities();\n\n\t\t\t\t\t\tURL serverurl = new URL(\"http://localhost:9515\");\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\n\n\t\t\t\t\t\t.chrome();\n\n\t\t\t\t\t\tdriver = new RemoteWebDriver(serverurl, capabilities);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG\n\n\t\t\t\t\t.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts()\n\n\t\t\t\t\t.implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\treturn driver;\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "@BeforeTest\n public void setup() {\n\n String browser = Environment.getProperties().browser().toString().toLowerCase();\n\n switch (browser) {\n \n case \"firefox\":\n FirefoxOptions options = new FirefoxOptions(); \n if(Environment.getProperties().headless()){\n options.addArguments(\"--headless\");\n }\n driver = new FirefoxDriver();\n break;\n \n default:\n ChromeOptions optionsChrome = new ChromeOptions();\n if(Environment.getProperties().headless()){\n optionsChrome.addArguments(\"--headless\");\n } \n driver = new ChromeDriver(optionsChrome);\n break;\n } \n\n driver.manage().window().maximize();\n }", "public static ChromeOptions chromeCfg()\n {\n Map<String, Object> prefs = new HashMap<String, Object>();\n ChromeOptions cOptions = new ChromeOptions();\n\n // Settings\n prefs.put(\"profile.default_content_setting_values.cookies\", 2);\n prefs.put(\"network.cookie.cookieBehavior\", 2);\n prefs.put(\"profile.block_third_party_cookies\", true);\n\n // Create ChromeOptions to disable Cookies pop-up\n cOptions.setExperimentalOption(\"prefs\", prefs);\n\n return cOptions;\n }", "protected FirefoxDriver createFirefoxDriver() {\n FirefoxProfile firefoxProfile = new FirefoxProfile();\n firefoxProfile.setPreference(\"intl.accept_languages\",\n getSystemLanguage());\n FirefoxDriver firefoxDriver = new FirefoxDriver(firefoxProfile);\n firefoxDriver.manage().window().maximize();\n return firefoxDriver;\n }", "public static void main(String[] args) {\n\t\tWebDriver driver = new FirefoxDriver();\r\n\t\tdriver.get(\"https://www.facebook.com\");\r\n\t\t/*TakesScreenshot tss = (TakesScreenshot) driver;\r\n\t\tFile source = tss.getScreenshotAs(OutputType.FILE);instead of this we can also write as following*/\r\n\t\tFile source = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\r\n\t\t/*File destination = new File(\"C:\\\\Users\\\\pva\\\\facebook.jpg\");\r\n\t\ttry {\r\n\t\t\tFileUtils.copyFile(source, destination);\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}", "protected DesiredCapabilities getCapabilitiesForChrome(ExtentTest currentTest, ExtentReportGenerator extentReportGenerator){ //local physical device support for android still pending\n\t\tDesiredCapabilities desCap = new DesiredCapabilities();\n\t\t//desired caps go here\n\t\treturn desCap;\n\t}", "public static void main(String[] args) {\n\t\tWebDriverManager.firefoxdriver().setup();\r\n\t\tWebDriver driver = new FirefoxDriver();\r\n\t\t//driver.navigate().to(\"https://www.facebook.com/\");\r\n\r\n\t}", "private static DesiredCapabilities getBrowserCapabilities(String browserType) {\r\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\r\n\t\tswitch (browserType) {\r\n\t\tcase \"firefox\":\r\n\t\t\tSystem.out.println(\"Opening firefox driver\");\r\n\t\t\tcap = DesiredCapabilities.firefox();\r\n\t\t\tbreak;\r\n\t\tcase \"chrome\":\r\n\t\t\tSystem.out.println(\"Opening chrome driver\");\r\n\t\t\tcap = DesiredCapabilities.chrome();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"browser : \" + browserType + \" is invalid, Launching Firefox as browser of choice..\");\r\n\t\t\tcap = DesiredCapabilities.firefox();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn cap;\r\n\t}", "@BeforeMethod\n\tpublic void setUp() {\n\t\tString driverByOS = \"\";\n\t\tif (System.getProperty(\"os.name\").equals(\"Windows 10\")) {\n\t\t\tdriverByOS = \"Drivers/chromedriver.exe\";\n\t\t} \n\t\telse {\n\t\t\tdriverByOS = \"Drivers/chromedriver\";\n\t\t}\n\t\t//para saber en qué sistema Operativo estamos corriendo el proyecto.\n\t\tSystem.out.println(System.getProperty(\"os.name\"));\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverByOS);\n\t\t//Utilizando headless browser HB\n\t\t/*-HB\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\tchromeOptions.addArguments(\"--headless\");\n\t\tdriver = new ChromeDriver(chromeOptions);\n\t\tHB-*/\n\t\tdriver = new ChromeDriver();\n\t\t//driver.manage().window().maximize(); //esto es para maximizar la ventana del navegador\n\t\t//driver.manage().window().fullscreen(); //esto es para poner en fullscreen la ventana del navegador\n\t\t/*driver.manage().window().setSize(new Dimension(200,200));\n\t\tfor (int i = 0; i <= 800; i++) {\n\t\t\tdriver.manage().window().setPosition(new Point(i,i));\n\t\t}*/\n\t\t//driver.manage().window().setPosition(new Point(800,200)); //posicionando la ventana del navegador\n\t\tdriver.navigate().to(\"http://newtours.demoaut.com/\");\n\t\t//Este codigo de abajo permite abrir otra ventana en el navegador\n\t\t//JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;\n\t\t//String googleWindow = \"window.open('http://www.google.com')\";\n\t\t//javaScriptExecutor.executeScript(googleWindow);\n\t\t//tabs = new ArrayList<String> (driver.getWindowHandles());\n\t\t/*try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//Helpers helper = new Helpers();\n\t\t//helper.sleepSeconds(4);\n\t}", "public native ProfileInfo getGenericProfile(int i) throws MagickException;", "@BeforeMethod\n\tpublic void launch()\n\t{\n\t\t\n\t\tdriver=new FirefoxDriver();\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.get(\"https://www.facebook.com/\");\n\t\t\n\t}", "public WebDriver createWebDriver()\n {\n WebDriver result = null;\n \n LoggingHelper.LogInfo(getClass().getName(), \"Initializing the FirefoxDriver instance.\");\n try \n { \n result = new FirefoxDriver(); \n } \n catch(Exception e)\n {\n LoggingHelper.LogError(getClass().getName(), \"Cannot initialize the FirefoxDriver: %s\", e.toString());\n throw e;\n }\n \n LoggingHelper.LogVerbose(getClass().getName(), \"Succesfully initialized the FirefoxDriver instance.\"); \n return result;\n }", "private void getDynamicProfie() {\n getDeviceName();\n }", "public Profile() {}", "private static WebDriver launchFirefox()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.firefox();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setAcceptUntrustedCertificates(true);\n\n\t\t\treturn new FirefoxDriver(profile);\n\n\t\t}\n\n\n\t}", "public void addDevs() {\n ProfileArrayList.add(new Profile(\"Windows\", \"Lead Developer, Web Developer\", \"https://winsub.kr\"));\n ProfileArrayList.add(new Profile(\"RecustomKR\", \"Web Developer\", \"https://winsub.kr\"));\n ProfileArrayList.add(new Profile(\"Kongjak\", \"Android Developer\", \"https://kongjak.com\"));\n ProfileArrayList.add(new Profile(\"천상의나무\", \"Telegram Bot Developer\", \"https://github.com/newpremium\"));\n }", "public static Profile m2911j() {\n if (OP2.a(1).mo9662a()) {\n return (Profile) nativeGetLastUsedProfile();\n }\n throw new IllegalStateException(\"Browser hasn't finished initialization yet!\");\n }", "public BromiumFactoryImpl()\n {\n super();\n }", "public String cmdChanProfile(){\r\n\t\treturn \"get /unit-\" + this.getTbs().getSlot() + \"/port-\" + this.getTbs().getPortNumber() + \"/chan-1/cfgm/chanprofile\";\r\n\t}", "private void init_remoteWebDriver(String browser) {\n\t\tif(browser.equalsIgnoreCase(\"chrome\")) {\n\t\t\tDesiredCapabilities cap = new DesiredCapabilities().chrome();\n\t\t\tcap.setCapability(ChromeOptions.CAPABILITY, optionsManager.getChromeOptions());\n\t\t\t\n\t\t\t//To connect with hub use RemoteWebDriver\n\t\t\ttry {\n\t\t\t\ttlDriver.set(new RemoteWebDriver(new URL(prop.getProperty(\"huburl\")), cap));\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(browser.equalsIgnoreCase(\"firefox\")){\n\t\t\tDesiredCapabilities cap = new DesiredCapabilities().firefox();\n\t\t\tcap.setCapability(FirefoxOptions.FIREFOX_OPTIONS, optionsManager.getFirefoxOptions());\n\t\t\t\n\t\t\ttry {\n\t\t\t\ttlDriver.set(new RemoteWebDriver(new URL(prop.getProperty(\"huburl\")), cap));\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Bean\n @Scope(BeanDefinition.SCOPE_SINGLETON)\n @Lazy(false)\n public TabConfig profileTabConfig() {\n TabConfig bean = new TabConfig();\n bean.setViewName(\"profile\");\n\n List<Tab> tabs = new ArrayList<>();\n\n Tab theTab = new Tab();\n theTab.setPageId(\"GENERAL\");\n theTab.setTitle(\"general\");\n theTab.setJsp(\"../profile-general.jsp\");\n theTab.setCommandClass(org.webcurator.ui.profiles.command.GeneralCommand.class);\n theTab.setValidator(new ProfileGeneralValidator());\n theTab.setTabHandler(new ProfileGeneralHandler());\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"BASE\");\n theTab.setTitle(\"base\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n HeritrixProfileHandler tabHandler = heritrixProfileHandler(\"/crawl-order\");\n tabHandler.setRecursionFilter(new GeneralOnlyRendererFilter());\n theTab.setTabHandler(tabHandler);\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"SCOPE\");\n theTab.setTitle(\"scope\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/scope\"));\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"FRONTIER\");\n theTab.setTitle(\"frontier\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/frontier\"));\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"PREFETCH\");\n theTab.setTitle(\"prefetchers\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/pre-fetch-processors\"));\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"FETCH\");\n theTab.setTitle(\"fetchers\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/fetch-processors\"));\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"EXTRACT\");\n theTab.setTitle(\"extractors\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/extract-processors\"));\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"WRITE\");\n theTab.setTitle(\"writers\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/write-processors\"));\n tabs.add(theTab);\n\n theTab = new Tab();\n theTab.setPageId(\"POST\");\n theTab.setTitle(\"postprocessors\");\n theTab.setJsp(\"../profile-page-view.jsp\");\n theTab.setCommandClass(EmptyCommand.class);\n theTab.setValidator(null);\n theTab.setTabHandler(heritrixProfileHandler(\"/crawl-order/post-processors\"));\n tabs.add(theTab);\n\n bean.setTabs(tabs);\n\n return bean;\n }", "@Before\n public void start(){\n DesiredCapabilities caps = new DesiredCapabilities();\n driver = new FirefoxDriver(new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Nightly\\\\firefox.exe\")), new FirefoxProfile(), caps);\n wait = new WebDriverWait(driver, 10);\n\n //IE\n// DesiredCapabilities caps = new DesiredCapabilities();\n// caps.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);\n// WebDriver driver = new InternetExplorerDriver(caps);\n\n\n }", "private void getProfile() {\n if (this.mLocalProfile.isEmpty()) {\n getDeviceType();\n getDeviceName();\n getScreenResolution();\n getScreenSize();\n }\n }", "public static void main(String[] args) {\n\t\tFBProfile firstUser = new FBProfile();\n\t\tfirstUser.printFBUserDetails();\n\t\tSystem.out.println(\"No of Users \" + FBProfile.noOfUsers);\n\t\t\n\t\t//Calling a Constructor(String, String, Char)\n\t\tFBProfile secondUser = new FBProfile(\"Second\", \"User\", 'M');\n\t\tsecondUser.printFBUserDetails();\n\t\tSystem.out.println(\"No of Users \" + FBProfile.noOfUsers);\n\t\t\n\t\t//Calling the constuctor (String, String, Char, String, int, String, String)\n\t\tFBProfile thirdUser = new FBProfile(\"Third\", \"User\", 'F', \"8003432345\", 25, \"Hartford\", \"[email protected]\");\n\t\tthirdUser.printFBUserDetails();\n\t\tSystem.out.println(\"No of Users \" + FBProfile.noOfUsers);\n\t}", "public DeviceProfile getMultiWindowProfile(Context context, WindowBounds windowBounds) {\n DeviceProfile profile = toBuilder(context)\n .setWindowBounds(windowBounds)\n .setMultiWindowMode(true)\n .build();\n\n profile.hideWorkspaceLabelsIfNotEnoughSpace();\n\n // We use these scales to measure and layout the widgets using their full invariant profile\n // sizes and then draw them scaled and centered to fit in their multi-window mode cellspans.\n float appWidgetScaleX = (float) profile.getCellSize().x / getCellSize().x;\n float appWidgetScaleY = (float) profile.getCellSize().y / getCellSize().y;\n profile.appWidgetScale.set(appWidgetScaleX, appWidgetScaleY);\n profile.updateWorkspacePadding();\n\n return profile;\n }", "@BeforeTest\r\npublic void setUp() throws Exception {\nGraphicsConfiguration gc = GraphicsEnvironment\r\n.getLocalGraphicsEnvironment().getDefaultScreenDevice()\r\n.getDefaultConfiguration();\r\n// Create a instance of ScreenRecorder with the required configurations\r\nscreenRecorder = new ScreenRecorder(gc, new Format(MediaTypeKey,MediaType.FILE, MimeTypeKey, MIME_QUICKTIME),\r\nnew Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,ENCODING_QUICKTIME_JPEG, CompressorNameKey,\r\nENCODING_QUICKTIME_JPEG, DepthKey, (int) 24,FrameRateKey, Rational.valueOf(15), QualityKey, 1.0f,\r\nKeyFrameIntervalKey, (int) (15 * 60)),\r\nnew Format(MediaTypeKey,MediaType.VIDEO, EncodingKey, \"black\", FrameRateKey,Rational.valueOf(30)),\r\nnull);\r\n// Create a new instance of the Firefox driver\r\nFirefoxBinary binary =new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox24\\\\firefox.exe\"));\r\ndriver =new FirefoxDriver(binary, null);\r\ndriver.manage().window().maximize();\r\n// Call the start method of ScreenRecorder to begin recording\r\nscreenRecorder.start();\r\n}", "private static DesiredCapabilities getBrowserCapabilities(String browserType, DesiredCapabilities capability) {\r\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\r\n\t\tswitch (browserType) {\r\n\t\tcase \"firefox\":\r\n\t\t\tSystem.out.println(\"Opening firefox driver\");\r\n\t\t\tcap = DesiredCapabilities.firefox();\r\n\t\t\tcap.merge(capability);\r\n\t\t\tbreak;\r\n\t\tcase \"chrome\":\r\n\t\t\tSystem.out.println(\"Opening chrome driver\");\r\n\t\t\tcap = DesiredCapabilities.chrome();\r\n\t\t\tcap.merge(capability);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"browser : \" + browserType + \" is invalid, Launching Firefox as browser of choice..\");\r\n\t\t\tcap = DesiredCapabilities.firefox();\r\n\t\t\tcap.merge(capability);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn cap;\r\n\t}", "public static android.app.IProfileManager asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof android.app.IProfileManager))) {\nreturn ((android.app.IProfileManager)iin);\n}\nreturn new android.app.IProfileManager.Stub.Proxy(obj);\n}", "public static void main(String[] args) {\n\t\t\n\t\tString browser =\"firefox\";\n\t\tswitch (browser) {\n\t\t\n\t\tcase \"chrome\":\n\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\tdriver=new ChromeDriver();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"IE\":\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver= new InternetExplorerDriver();\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"please pass the correct browser :\" + browser);\n\t\t}\n\n\t}", "public WebDriver createWebDriverInstance(String Browser) throws MalformedURLException\n\t{\n\t\tif(d==null && Browser.equals(\"Firefox\"))\n\t\t{\n\n\t\t\td = new FirefoxDriver();\n\t\t\tlogger.info(\"--FireFox Browser has opened \");\n\t\t}\n\n\t\telse if(d==null && Browser.equals(\"Chrome\"))\n\t\t{\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\toptions.addArguments(\"start-maximized\");\n\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities(DesiredCapabilities.chrome());\n\t\t\tcapabilities.setCapability (CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\tcapabilities.setCapability (ChromeOptions.CAPABILITY,options);\n\t\t\tChromeDriverManager.getInstance().setup();\n\t\t\t\n\t\t\t//Don't Remember Passwords by default\n\t\t\tMap<String, Object> prefs = new HashMap<String, Object>();\n\t\t\tprefs.put(\"credentials_enable_service\", false);\n\t\t\tprefs.put(\"profile.password_manager_enabled\", false);\n\t\t\toptions.setExperimentalOption(\"prefs\", prefs);\n\t\t\t/*\n\t\t\tString path =System.getProperty(\"user.dir\")+File.separator+\"chromedriver.exe\";\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", path);\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();*/\n\t\t\td = new ChromeDriver(capabilities);\n\t\t\tlogger.info(\"--Chrome Browser has opened \");\n\t\t}\n\n\t\telse if (d==null && Browser.equals(\"IE\"))\n\t\t{\n\t\t\tString path =\"binary/IEDriverServer.exe\";\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", path);\n\t\t\tlogger.info(\"--IEDriver has setup\");\n\t\t\tDesiredCapabilities caps = DesiredCapabilities.internetExplorer();\n\t\t\tcaps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);\n\t\t\tcaps.setCapability(\"requireWindowFocus\", true);\n\t\t\tcaps.setCapability(\"enablePersistentHover\", true);\n\t\t\tcaps.setCapability(\"native events\", true);\n\t\t\td = new InternetExplorerDriver(caps);\n\t\t\tlogger.info(\"--IE Browser has opened \");\n\t\t}\n\t\telse if (d==null && Browser.equals(\"IE32bit\"))\n\t\t{\n\t\t\tString path =\"binary/IEDriverServer_32bit.exe\";\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", path);\n\t\t\tlogger.info(\"--IEDriver has setup\");\n\t\t\tDesiredCapabilities caps = DesiredCapabilities.internetExplorer();\n\t\t\tcaps.setCapability(\n\t\t\t\t\tInternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n\t\t\t\t\ttrue);\n\t\t\tcaps.setCapability(\"requireWindowFocus\", true);\n\t\t\tcaps.setCapability(\"enablePersistentHover\", false);\n\t\t\tcaps.setCapability(\"native events\", true);\n\t\t\td = new InternetExplorerDriver(caps);\n\t\t\tlogger.info(\"--IE Browser has opened \");\n\t\t}\n\t\treturn d;\n\n\n\t}", "@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "public WebDriver browserSetup() throws IOException\r\n\t{ \r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tSystem.out.println(\"1.Chrome\\n2.Firefox \\nEnter your choice:\");\r\n\t\tString choice=br.readLine();\r\n\t\t\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t//To start Chrome Driver\r\n\t\tcase \"1\":\r\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Test Automation\\\\Software\\\\chrome\\\\New Version\\\\chromedriver.exe\");\r\n\t\t ChromeOptions options=new ChromeOptions();\r\n\t\t options.addArguments(\"--disable-notifications\");\r\n\t\t driver=new ChromeDriver(options);\r\n\t\t break;\r\n\t\t\r\n\t\t//To start Firefox Driver\r\n\t\tcase \"2\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\***\\\\drivers\\\\geckodriver.exe\");\r\n\t\t\tdriver=new FirefoxDriver();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\t\r\n\t\tdriver.get(url);\r\n\t\t\r\n\t\t//To maximize the window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(8, TimeUnit.SECONDS);\r\n\t\t\r\n\t\treturn driver;\r\n\t}", "public void initDriver() {\n if (getBrowser().equals(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n if (System.getProperty(\"headless\") != null) {\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(true);\n driver = new FirefoxDriver(firefoxOptions);\n } else {\n driver = new FirefoxDriver();\n }\n } else {\n WebDriverManager.chromedriver().setup();\n if (System.getProperty(\"headless\") != null) {\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(true);\n driver = new ChromeDriver(chromeOptions);\n } else {\n driver = new ChromeDriver();\n }\n }\n }", "@Test\n public void test(){\n\n\n FirefoxProfile profile = new FirefoxProfile();\n // profile.EnableNativeEvents = true;\n\n WebDriver driver = new FirefoxDriver(profile);\n driver.get(\"http://www.baidu.com\");\n }", "public ConfigProfile buildProfileTwo() {\n this.topics = \"kafka-data\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = true;\n this.ack = false;\n this.indexes = \"index-1\";\n this.sourcetypes = \"kafka-data\";\n this.sources = \"kafka-connect\";\n this.httpKeepAlive = true;\n this.validateCertificates = false;\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = false;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n return this;\n }", "public static void main(String[] args) throws Exception {\n\t\t\r\n\t\tDifferent_Browser.call_Firefox();\r\n\t\tDifferent_Browser.get_Google();\r\n\t\tDifferent_Browser.close_browser();\r\n\t\t\r\n//\t\tDifferent_Browser.call_chrome();\r\n//\t\tDifferent_Browser.get_Google();\r\n//\t\tDifferent_Browser.close_browser();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.setProperty(\"webdriver.geckodriver.driver\", \"C:\\\\geckodriver.exe\");\n\t\t\n\t\t//create obj of firfox options\n\t\t\n\t\tFirefoxOptions fo=new FirefoxOptions();\n\t\t\n\t\tfo.addArguments(\"--headless\");\n\t\t\n\t\tWebDriver driver = new FirefoxDriver(fo);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.get(\"https://tekschoolofamerica.com/\");\n\t\tSystem.out.println(driver.getTitle());\n\n\t}", "private WebDriver createFireFoxDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.gecko.driver\", \"geckodriver.exe\");\n\t\t_driver = new FirefoxDriver();\n\t\t//TODO check if Ben want?\n\t\t//final EventFiringWebDriver wrap = new EventFiringWebDriver(_driver);\n\t\t// register listener to webdriver\n\t\t//wrap.register(new CustomWebDriverEventListener()); // implements WebDriverEventListener\n\t\t//return wrap;\n\t\treturn _driver;\n\t}", "@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "private static Map<String, String> createNonGroovyPredefinedParms(ServerProfile serverProfile, WebServerMetricsResponsePojo response) {\n\t\tMap<String,String> cmdParms = serverProfile.getParameters()==null ? new HashMap<>() : serverProfile.getParameters();\n\t\tif (System.getProperty(MetricsConstants.METRICS_BASE_DIR) != null){\n\t\t\tcmdParms.put(MetricsConstants.METRICS_BASE_DIR, System.getProperty(MetricsConstants.METRICS_BASE_DIR));\n\t\t}\n\t\tcmdParms.put(MetricsConstants.PROFILE_NAME, serverProfile.getServerProfileName());\n\t\tcmdParms.put(MetricsConstants.PROFILE_SERVER, serverProfile.getServer());\n\t\tcmdParms.put(MetricsConstants.PROFILE_USERNAME, serverProfile.getUsername());\n\t\t\n\t\tif (CommandExecutorDatatypes.POWERSHELL_WINDOWS.getExecutorText().equals(serverProfile.getExecutor())){ \n\t\t\tcmdParms.put(MetricsConstants.PROFILE_PASSWORD, MetricsUtils.actualPwd(serverProfile));\n\t\t}\n\t\treturn cmdParms;\n\t}", "private void optimiseEVProfile()\n\t{\n\t}", "@Override\n protected RemoteWebDriver createLocalDriver() {\n return new FirefoxDriver();\n }", "private void qcomInitPreferences(PreferenceGroup group){\n ListPreference powerMode = group.findPreference(KEY_POWER_MODE);\n ListPreference zsl = group.findPreference(KEY_ZSL);\n ListPreference colorEffect = group.findPreference(KEY_COLOR_EFFECT);\n ListPreference faceDetection = group.findPreference(KEY_FACE_DETECTION);\n ListPreference touchAfAec = group.findPreference(KEY_TOUCH_AF_AEC);\n ListPreference selectableZoneAf = group.findPreference(KEY_SELECTABLE_ZONE_AF);\n ListPreference saturation = group.findPreference(KEY_SATURATION);\n ListPreference contrast = group.findPreference(KEY_CONTRAST);\n ListPreference sharpness = group.findPreference(KEY_SHARPNESS);\n ListPreference autoExposure = group.findPreference(KEY_AUTOEXPOSURE);\n ListPreference antiBanding = group.findPreference(KEY_ANTIBANDING);\n ListPreference mIso = group.findPreference(KEY_ISO);\n ListPreference lensShade = group.findPreference(KEY_LENSSHADING);\n ListPreference histogram = group.findPreference(KEY_HISTOGRAM);\n ListPreference denoise = group.findPreference(KEY_DENOISE);\n ListPreference redeyeReduction = group.findPreference(KEY_REDEYE_REDUCTION);\n ListPreference hfr = group.findPreference(KEY_VIDEO_HIGH_FRAME_RATE);\n ListPreference hdr = group.findPreference(KEY_AE_BRACKET_HDR);\n ListPreference jpegQuality = group.findPreference(KEY_JPEG_QUALITY);\n ListPreference videoSnapSize = group.findPreference(KEY_VIDEO_SNAPSHOT_SIZE);\n ListPreference pictureFormat = group.findPreference(KEY_PICTURE_FORMAT);\n //BEGIN: Added by zhanghongxing at 2013-01-06 for DER-173\n ListPreference videoColorEffect = group.findPreference(KEY_VIDEO_COLOR_EFFECT);\n //END: Added by zhanghongxing at 2013-01-06\n \n \n// ListPreference videoEffect = group.findPreference(KEY_VIDEO_EFFECT);\n\n\n if (touchAfAec != null) {\n filterUnsupportedOptions(group,\n touchAfAec, mParameters.getSupportedTouchAfAec());\n }\n\n if (selectableZoneAf != null) {\n filterUnsupportedOptions(group,\n selectableZoneAf, mParameters.getSupportedSelectableZoneAf());\n }\n\n if (mIso != null) {\n filterUnsupportedOptions(group,\n mIso, mParameters.getSupportedIsoValues());\n }\n\n /* if (lensShade!= null) {\n filterUnsupportedOptions(group,\n lensShade, mParameters.getSupportedLensShadeModes());\n }*/\n\n\t\tif (redeyeReduction != null) {\n filterUnsupportedOptions(group,\n redeyeReduction, mParameters.getSupportedRedeyeReductionModes());\n }\n\n if (hfr != null) {\n filterUnsupportedOptions(group,\n hfr, mParameters.getSupportedVideoHighFrameRateModes());\n }\n\n if (denoise != null) {\n filterUnsupportedOptions(group,\n denoise, mParameters.getSupportedDenoiseModes());\n }\n\n if (pictureFormat != null) {\n // getSupportedPictureFormats() returns the List<Integar>\n // which need to convert to List<String> format.\n List<Integer> SupportedPictureFormatsInIntArray = mParameters.getSupportedPictureFormats();\n List<String> SupportedPictureFormatsInStrArray = new ArrayList<String>();\n for (Integer picIndex : SupportedPictureFormatsInIntArray) {\n SupportedPictureFormatsInStrArray.add(cameraFormatForPixelFormatVal(picIndex.intValue()));\n }\n// if(1 == mParameters.getInt(\"raw-format-supported\")) {\n // getSupportedPictureFormats() doesnt have the support for RAW Pixel format.\n // so need to add explicitly the RAW Pixel Format.\n// SupportedPictureFormatsInStrArray.add(PIXEL_FORMAT_RAW);\n// }\n //BEGIN: Modified by zhanghongxing at 2013-03-12 for FBD-115\n // Remove the picture format.\n // filterUnsupportedOptions(group, pictureFormat, SupportedPictureFormatsInStrArray);\n filterUnsupportedOptions(group, pictureFormat, null);\n //END: Modified by zhanghongxing at 2013-03-12\n }\n\n if (colorEffect != null) {\n filterUnsupportedOptions(group,\n colorEffect, mParameters.getSupportedColorEffects());\n CharSequence[] entries = colorEffect.getEntries();\n if(entries == null || entries.length <= 0 ) {\n filterUnsupportedOptions(group, colorEffect, null);\n }\n }\n\n if (antiBanding != null) {\n filterUnsupportedOptions(group,\n antiBanding, mParameters.getSupportedAntibanding());\n }\n if (autoExposure != null) {\n filterUnsupportedOptions(group,\n autoExposure, mParameters.getSupportedAutoexposure());\n }\n if (!mParameters.isPowerModeSupported())\n {\n filterUnsupportedOptions(group,\n videoSnapSize, null);\n }else{\n filterUnsupportedOptions(group, videoSnapSize, sizeListToStringList(\n mParameters.getSupportedPictureSizes()));\n }\n if (histogram!= null) {\n filterUnsupportedOptions(group,\n histogram, mParameters.getSupportedHistogramModes());\n }\n\n if (hdr!= null) {\n// filterUnsupportedOptions(group,\n// hdr, mParameters.getSupportedAEBracketModes());\n }\n\n //BEGIN: Added by zhanghongxing at 2013-01-06 for DER-173\n if (videoColorEffect != null) {\n //BEGIN: Modified by zhanghongxing at 2013-04-09 for FBD-722/723\n //Remove the front camera video color effect.\n filterUnsupportedOptions(group,\n videoColorEffect, mParameters.getSupportedColorEffects());\n CharSequence[] entries = videoColorEffect.getEntries();\n if(entries == null || entries.length <= 0 ) {\n filterUnsupportedOptions(group, videoColorEffect, null);\n }\n //END: Modified by zhanghongxing at 2013-04-09\n }\n //END: Added by zhanghongxing at 2013-01-06\n \n// if (videoEffect != null) {\n// filterUnsupportedOptions(group,\n// \t\tvideoEffect, mParameters.getSupportedColorEffects());\n// } \n }", "private Proxy createProxyTwo() {\n\t\t\n\t\tWorkingMemoryPointer origin = createWorkingMemoryPointer (\"fakevision\", \"blibli2\", \"VisualObject\");\n\t\tProxy proxy = createNewProxy(origin, 0.35f);\n\t\t\n\t\tFeatureValue blue = createStringValue (\"blue\", 0.73f);\n\t\tFeatureValue red = createStringValue (\"red\", 0.23f);\n\t\tFeature feat = createFeature (\"colour\");\n\t\taddFeatureValueToFeature(feat, blue);\n\t\taddFeatureValueToFeature(feat,red);\n\t\taddFeatureToProxy (proxy, feat);\n\t\t\t\t\n\t\tFeatureValue spherical = createStringValue (\"spherical\", 0.63f);\n\t\tFeature feat2 = createFeatureWithUniqueFeatureValue (\"shape\", spherical);\n\t\taddFeatureToProxy (proxy, feat2);\n\t\t\n\t\tlog(\"Proxy two for belief model successfully created\");\n\t\treturn proxy;\n\t}", "public static WgpuStencilStateFaceDescriptor createHeap(){\n return new WgpuStencilStateFaceDescriptor();\n }", "public void setFirefoxProfileTemplate(String firefoxProfileTemplate) {\n this.firefoxProfileTemplate = firefoxProfileTemplate;\n }", "@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}", "public WebDriver initDriver (Properties prop) {\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equals(\"chrome\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./src/test/resources/chrome/chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver(optionsManager.getChromeOptions());\r\n\t\t}else if(browserName.equals(\"firefox\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"./src/test/resources/firefox/geckodriver.exe\");\r\n\t\t\tdriver = new FirefoxDriver(optionsManager.getFirefoxOptions());\r\n\t\t}\r\n\t\t\r\n\t\teventDriver = new EventFiringWebDriver(driver);\r\n\t\teventListener = new WebEventListener();\r\n\t\teventDriver.register(eventListener);\r\n\t\tdriver = eventDriver;\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\tURL chromeDriverURL = BrowserDriver.class.getResource(\"/drivers/chromedriver.exe\");\n\t\tFile file = new File(chromeDriverURL.getFile()); \n\t\tSystem.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());\n\t\t\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\toptions.addArguments(\"--ignore-certificate-errors\");\n\t\t\n\t\treturn new ChromeDriver(options);\n\t\t}\n\t}", "public void checkPBLinkStatusBySeleniumWithChrome() throws TechnicalException {\n\t\tChromeDriver driver=null;\n\t\t String baseUrl;\n\t\t StringBuffer verificationErrors = new StringBuffer();\n\t\ttry {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", statusProperties.getChrome_driver_path());\n\t\t\tdriver = new ChromeDriver();\n\t\t\tbaseUrl = statusProperties.getInter_pbl_url();\n\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\t//Connection \n\t\t\tdriver.get(baseUrl);\n\t\t\t//specific login for developement environement\n\t\t\tif (driver.getTitle().equals(pblinkProperties.getIndex_title())) {\n\t\t\t\tdriver.findElement(By.cssSelector(\"input[type=\\\"image\\\"]\")).click();\n\t\t\t}else{\n\t\t\t\t//UAt environnement\n\t\t\t\tif (driver.getTitle().equals(pblinkProperties.getSso_title())) {\n\t\t\t\t\t//get ther form\n\t\t\t\t\tlogInSSO(driver, baseUrl);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//check Iframe menu\n\t\t\tcheckScnarioUserListe(driver);\n\t\t} catch (Exception exp) {\n\t\t\tTechnicalException techExp = new TechnicalException(exp);\n\t\t\tif(logger.isErrorEnabled())\n\t\t\t\tlogger.error(techExp.getStrstackTrace());\n\t\t\tthrow techExp; \n\t\t}\n\t\tfinally{\n\t\t\tdriver.quit();\n\t\t\tString verificationErrorString = verificationErrors.toString();\n\t\t\tif (!\"\".equals(verificationErrorString)) {\n\t\t\t\tif(logger.isErrorEnabled())\n\t\t\t\t\tlogger.error(\"ERROR : there are some verifications errors : \"+verificationErrorString);\n\t\t\t\tthrow new TechnicalException(\"ERROR : PBL Internet checking/there are some verifications errors with phantom driver : \"+verificationErrorString);\n\t\t\t}\n\t\t}\n\t}", "public static ChromeOptions chromeoptions() {\r\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\r\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\r\n\t\tchromePrefs.put(\"download.default_directory\", testAdminReportPath);\r\n\t\tChromeOptions options = new ChromeOptions();\r\n\t\toptions.setExperimentalOption(\"prefs\", chromePrefs);\r\n\t\toptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\r\n\t\toptions.setCapability(ChromeOptions.CAPABILITY, options);\r\n\t\toptions.setCapability(\"locationContextEnabled\", false);\r\n\t\treturn options;\r\n\t}", "public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.println(prop.getProperty(\"URL\"));\r\ndriver.get(prop.fetchProp(\"URL\"));\r\n\r\n//System.out.println(\"Hiii\");\r\n\r\n\t}", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "protected List<Profile> createProfiles(String namespace, JsonNode node) {\n List<Profile> profiles = new LinkedList();\n if (Namespace.isNamespaceValid(namespace)) {\n for (Iterator<Map.Entry<String, JsonNode>> it = node.fields(); it.hasNext(); ) {\n Map.Entry<String, JsonNode> entry = it.next();\n profiles.add(new Profile(namespace, entry.getKey(), entry.getValue().asText()));\n }\n } else {\n throw new CatalogException(\n \"Invalid namespace specified \" + namespace + \" for profiles \" + node);\n }\n return profiles;\n }", "void getCapabilties(Browser browser, DesiredCapabilities caps);", "public native ProfileInfo getIptcProfile() throws MagickException;", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "public RemoteWebDriver browserProfileConfigurationRemote(BrowserType browser, String host, String phantomJSDriverBinary){\n\t\tLogger.info(\"Starting \"+browser+\" browser in remote configuration\");\n\n\t\tRemoteWebDriver driver = null;\n\t\tString huburl = \"http://\"+host+\"/wd/hub\";\n\n\t\ttry {\n\t\t\tdriver = new RemoteWebDriver(new URL(huburl), getDesiredCapabilities(browser, phantomJSDriverBinary));\n\t\t} catch (Exception e) {\n\t\t\tLogger.error(\"Fail to start browser in remote configuration\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tLogger.info(\"Started \"+browser+\" browser in remote configuration\");\n\t\treturn driver;\n\t}", "public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}", "WithCreate withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile);", "@Override\n\tpublic ProfileComponentsEvaluationResult<ConformanceProfile> create(CompositeProfileStructure structure) {\n\t\tConformanceProfile target = this.confProfileService.findById(structure.getConformanceProfileId());\n\t\tif(target != null) {\n\t\t\tCompositeProfileDataExtension extension = new CompositeProfileDataExtension();\n\t\t\tList<FlavorCreationDirective> flavorCreationDirectives = this.profileComponentLinksToPermutationMap(structure.getOrderedProfileComponents());\n\t\t\tConformanceProfile continueOn = target;\n\t\t\tfor(FlavorCreationDirective fcd: flavorCreationDirectives) {\n\t\t\t\tcontinueOn = this.browse(continueOn, fcd, extension);\n\t\t\t}\n\t\t\tString ext = structure.getFlavorsExtension();\n\t\t\textension.prune(ext);\n\t\t\ttarget.setId(structure.getId() + '_' + ext);\n\t\t\ttarget.setName(structure.getName());\n\t\t\treturn new ProfileComponentsEvaluationResult<>(new DataFragment<>(continueOn, extension), extension.generatedResourceMetadataList);\n\t\t}\n\t\treturn null;\n\t}", "public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}", "HumanProfile getUserProfile();", "private WebSSOProfile getWebSSOprofile(SAMLProcessorImpl processor, CachingMetadataManager metadata) throws Exception {\n\t\treturn new WebSSOProfileImpl(processor, metadata);\n\t}", "private Browser prepBrowser(final Browser prepBr) {\n if (agent.get() == null) {\r\n agent.set(UserAgents.stringUserAgent(BrowserName.Chrome));\r\n }\r\n prepBr.getHeaders().put(\"User-Agent\", agent.get());\r\n prepBr.getHeaders().put(\"Accept-Language\", \"en-AU,en;q=0.8\");\r\n prepBr.getHeaders().put(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\");\r\n prepBr.getHeaders().put(\"Accept-Charset\", null);\r\n prepBr.setCookie(MAINPAGE, \"language\", \"en_au\");\r\n prepBr.setReadTimeout(3 * 60 * 1000);\r\n prepBr.setConnectTimeout(3 * 60 * 1000);\r\n return prepBr;\r\n }", "public static void main(String[] args) {\n\r\n\t\tWorkingwithfirefox wc = new Workingwithfirefox();\r\n\t\t\r\n\t\twc.invokeBroser();\r\n\t\twc.getTitleOfThePage();\r\n\t\twc.closeBrowser();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void setProfile(List<Step> arg0, List<Step> arg1) {\n\t\t\n\t}", "private static WebDriver newHtmlUnitDiver() {\n\t\tcapabilities = new DesiredCapabilities().htmlUnit();\n\t\tcapabilities.setBrowserName(\"HtmlUnit\");\n\t\tsetCommonCapabilities();\n\n//\t\treturn new HtmlUnitDriver(capabilities);\n\t\treturn new HtmlUnitDriver(true);\n\t}", "public static ICC_Profile getICC_Profile(int colorSpace) {\n/* 111 */ synchronized (ICC_Profile.class) {\n/* 112 */ return ICC_Profile.getInstance(colorSpace);\n/* */ } \n/* */ }", "@Before\n public void setup() {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(FirefoxDriver.MARIONETTE, false); // new schema disable\n webdriver = new FirefoxDriver(caps);\n wait = new WebDriverWait(webdriver, 10);\n\n }", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriver driver = new browser_methods().getDriver(\"chrome\");\r\n\t\tdriver.get(\"http://newtours.demoaut.com/\");\r\n\r\n\t}", "@Before(\"@First\")\n\tpublic void beforeFirst() {\n\t\tSystem.out.println(\"Launch FF browser---first\");\n\t\tSystem.out.println(\"Enter the free crm url--first\");\n\t}", "private IProfileFacade createAndInitializeProfileFacade(\n \t\t\tIFile profileApplicationFile, Collection<Profile> profiles)\n \t\t\tthrows CoreException, IOException {\n \n \t\tIProfileFacade facade = createNewProfileFacade(profileApplicationFile);\n \t\tfor (Profile profile : profiles) {\n \t\t\tfacade.loadProfile(profile);\n \t\t}\n \t\tprofileApplicationFile.refreshLocal(IFile.DEPTH_ZERO, new NullProgressMonitor());\n \t\treturn facade;\n \t}", "public Profile(String imei, String softwareVersion, String simCountryIso, String simOperator, String simOperatorName, String simSerialNumber,\n String imsiNumber, String macAddress, String ipAddress, ArrayList<String> networksSSID, String osVersion,\n String sdkVersion, ArrayList<String> googleAccounts, ArrayList<String> memorizedAccounts, String deviceName,\n String screenResolution, String keyboardLanguage, ArrayList<String> inputMethods, ArrayList<String> installedApplications) {\n\n this.imei = imei;\n this.softwareVersion = softwareVersion;\n this.simCountryIso = simCountryIso;\n this.simOperator = simOperator;\n this.simOperatorName = simOperatorName;\n this.simSerialNumber = simSerialNumber;\n this.imsiNumber = imsiNumber;\n this.macAddress = macAddress;\n this.ipAddress = ipAddress;\n this.networksSSID = networksSSID;\n this.osVersion = osVersion;\n this.sdkVersion = sdkVersion;\n this.googleAccounts = googleAccounts;\n this.memorizedAccounts = memorizedAccounts;\n this.deviceName = deviceName;\n this.screenResolution = screenResolution;\n this.keyboardLanguage = keyboardLanguage;\n this.inputMethods = inputMethods;\n this.installedApplications = installedApplications;\n this.changedInformation = \"\";\n }", "public WebElement profileSetUpTab() {\n\t\treturn getElementfluent(By.xpath(\"//menuitem[contains(text(),'Profile')]\"));\n\t}", "public WebDriver getBrowserObject(BrowserType btype) throws Exception {\n\t\ttry {\n\t\t\tswitch(btype){\n\t\t\tcase Chrome:\n\t\t\t\tChromeBrowser chrome = ChromeBrowser.class.newInstance();\n\t\t\t\tChromeOptions chromeOptions = chrome.getChromeOptions();\n\t\t\t\treturn chrome.getChromeDriver(chromeOptions);\n\t\t\tcase FireFox:\n\t\t\t\tFirefoxBrowser ff = FirefoxBrowser.class.newInstance();\n\t\t\t\tFirefoxOptions ffOptions = ff.getFirefoxOptions();\n\t\t\t\treturn ff.getFirefoxDriver(ffOptions);\n\t\t\t\t\n\t\t\tcase Iexplorer:\n\t\t\t\tIExploreBrowser ie = IExploreBrowser.class.newInstance();\n\t\t\t\tInternetExplorerOptions ieoptions = ie.getIExplorerCapabilities();\n\t\t\t\treturn ie.getIExplorerDriver(ieoptions);\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new Exception(\"Driver not found \"+btype.name());\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tlog.info(e.getMessage());\n\t\t\tthrow e;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tOpenIMAJGrabber grabber = new OpenIMAJGrabber();\n\n\t\tDevice device = null;\n\t\tPointer<DeviceList> devices = grabber.getVideoDevices();\n\t\tfor (Device d : devices.get().asArrayList()) {\n\t\t\tdevice = d;\n\t\t\tbreak;\n\t\t}\n\n\t\tboolean started = grabber.startSession(320, 240, 30, Pointer.pointerTo(device));\n\t\tif (!started) {\n\t\t\tthrow new RuntimeException(\"Not able to start native grabber!\");\n\t\t}\n\n\t\tlong t1 = System.currentTimeMillis();\n\n\t\tint n = 1000;\n\t\tint i = 0;\n\t\tdo {\n\t\t\tgrabber.nextFrame();\n\t\t\tgrabber.getImage().getBytes(320 * 240 * 3); // byte[]\n\t\t} while (++i < n);\n\n\t\tlong t2 = System.currentTimeMillis();\n\n\t\tSystem.out.println(\"Capturing time: \" + (t2 - t1));\n\n\t\tgrabber.stopSession();\n\t}", "PointerByReference wkhtmltoimage_create_global_settings();", "public static WebDriver startFirefox() {\n\t\tDesiredCapabilities cap = DesiredCapabilities.firefox();\n\t\tcap.setCapability(\"marionette\", true);\n\t\treturn new FirefoxDriver(cap);\n\t}", "public static void setHash_profiles() {\n\t\t\r\n\t\tProfilePojo pf1 = new ProfilePojo(1, \"Sonal\");\r\n\t\tProfilePojo pf2 = new ProfilePojo(2, \"Komal\");\r\n\t\tProfilePojo pf3 = new ProfilePojo(3, \"Sanidh\");\r\n\t\tProfilePojo pf4 = new ProfilePojo(4, \"Vanshika\");\r\n\t\thash_profiles.put((long) 1, pf1);\r\n\t\thash_profiles.put((long) 2, pf2);\r\n\t\thash_profiles.put((long) 3, pf3);\r\n\t\thash_profiles.put((long) 4, pf4);\r\n\t\t\r\n\t}", "public void saveProfiles() throws IOException\n {\n try\n {\n profFile.getParentFile().mkdirs();\n profFile.delete();\n profFile.createNewFile();\n PrettyPrinterXmlWriter pp = new PrettyPrinterXmlWriter(new SimpleXmlWriter(new FileWriter(profFile)));\n pp.writeXmlVersion();\n pp.writeEntity(\"XNATProfiles\");\n if (this.size() != 0)\n {\n for (XNATProfile ip : this)\n {\n pp.writeEntity(\"XNATProfile\")\n .writeAttribute(\"profileName\", ip.getProfileName())\n \n .writeEntity(\"serverURL\")\n .writeText(ip.getServerURL().toString())\n .endEntity() \n // encrypt(sc.getServerURL().toString()));\n \n .writeEntity(\"userid\")\n .writeText(ip.getUserid())\n .endEntity()\n \n .writeEntity(\"projectList\");\n \n for (String is : ip.getProjectList())\n pp.writeEntity(\"project\")\n .writeText(is)\n .endEntity();\n \n pp.endEntity()\n .writeEntity(\"dicomReceiverHost\")\n .writeText(ip.getDicomReceiverHost())\n .endEntity()\n \n .writeEntity(\"dicomReceiverPort\")\n .writeText(ip.getDicomReceiverPort())\n .endEntity()\n \n .writeEntity(\"dicomReceiverAeTitle\")\n .writeText(ip.getDicomReceiverAeTitle())\n .endEntity()\n \n .endEntity();\n }\n }\n pp.writeEntity(\"preferredProfile\")\n .writeText(currentProfile)\n .endEntity()\n .endEntity()\n .close();\n }\n catch (IOException exIO)\n \t\t{\n throw exIO;\n }\n }", "private static void test() {\n int num = 10;\n// List<Integer> integers = List.of(1, 2, 3, 4, 5);\n// Map<String, Integer> names = Map.of(\"name1\", 12, \"name2\", 20);\n\n var integers = List.of(1, 2, 3, 4, 5);\n var names = Map.of(\"name1\", 12, \"name2\", 20);\n\n var driver = DriverFactory.getDriver(\"chrome\"); // -> it can be WebDriver as well.\n\n }", "public static void main(String[] args) {\n\t\tWebDriver driver;\n\t\t\n\t\t System.setProperty(\"webdriver.gecko.driver\",\n\t\"C:\\\\Users\\\\dell\\\\Downloads\\\\Compressed\\\\geckodriver-v0.20.1-win64_2\\\\geckodriver.exe\");\n\t\t \n\t\t driver=new FirefoxDriver();\n\t\t \n\t\t driver.get(\"https://www.google.com\");\n\t\t \n\t\t ScreenShot(driver,\"c://test.png\");\n\t\t \n\t}", "DeviceProfile(Context context, InvariantDeviceProfile inv, Info info, WindowBounds windowBounds,\n boolean isMultiWindowMode, boolean transposeLayoutWithOrientation,\n boolean useTwoPanels) {\n\n this.inv = inv;\n this.isLandscape = windowBounds.isLandscape();\n this.isMultiWindowMode = isMultiWindowMode;\n this.transposeLayoutWithOrientation = transposeLayoutWithOrientation;\n windowX = windowBounds.bounds.left;\n windowY = windowBounds.bounds.top;\n\n isScalableGrid = inv.isScalable && !isVerticalBarLayout() && !isMultiWindowMode;\n\n // Determine sizes.\n widthPx = windowBounds.bounds.width();\n heightPx = windowBounds.bounds.height();\n availableWidthPx = windowBounds.availableSize.x;\n availableHeightPx = windowBounds.availableSize.y;\n\n mInfo = info;\n isTablet = info.isTablet(windowBounds);\n isPhone = !isTablet;\n isTwoPanels = isTablet && useTwoPanels;\n\n aspectRatio = ((float) Math.max(widthPx, heightPx)) / Math.min(widthPx, heightPx);\n boolean isTallDevice = Float.compare(aspectRatio, TALL_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0;\n\n // Some more constants\n context = getContext(context, info, isVerticalBarLayout()\n ? Configuration.ORIENTATION_LANDSCAPE\n : Configuration.ORIENTATION_PORTRAIT);\n mMetrics = context.getResources().getDisplayMetrics();\n final Resources res = context.getResources();\n\n if (isTwoPanels) {\n if (isLandscape) {\n mTypeIndex = InvariantDeviceProfile.INDEX_TWO_PANEL_LANDSCAPE;\n } else {\n mTypeIndex = InvariantDeviceProfile.INDEX_TWO_PANEL_PORTRAIT;\n }\n } else {\n if (isLandscape) {\n mTypeIndex = InvariantDeviceProfile.INDEX_LANDSCAPE;\n } else {\n mTypeIndex = InvariantDeviceProfile.INDEX_DEFAULT;\n }\n }\n\n hotseatQsbHeight = res.getDimensionPixelSize(R.dimen.qsb_widget_height);\n boolean isTaskBarEnabled = LineageSettings.System.getInt(context.getContentResolver(),\n LineageSettings.System.ENABLE_TASKBAR, isTablet ? 1 : 0) == 1;\n isTaskbarPresent = isTaskBarEnabled && ApiWrapper.TASKBAR_DRAWN_IN_PROCESS\n && FeatureFlags.ENABLE_TASKBAR.get();\n if (isTaskbarPresent) {\n taskbarSize = res.getDimensionPixelSize(R.dimen.taskbar_size);\n }\n\n edgeMarginPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);\n\n desiredWorkspaceHorizontalMarginPx = getHorizontalMarginPx(inv, res);\n desiredWorkspaceHorizontalMarginOriginalPx = desiredWorkspaceHorizontalMarginPx;\n\n allAppsOpenVerticalTranslate = res.getDimensionPixelSize(\n R.dimen.all_apps_open_vertical_translate);\n\n folderLabelTextScale = res.getFloat(R.dimen.folder_label_text_scale);\n folderContentPaddingLeftRight =\n res.getDimensionPixelSize(R.dimen.folder_content_padding_left_right);\n folderContentPaddingTop = res.getDimensionPixelSize(R.dimen.folder_content_padding_top);\n\n cellLayoutBorderSpacePx = getCellLayoutBorderSpace(inv);\n allAppsCellSpacePx = new Point(\n pxFromDp(inv.borderSpaces[InvariantDeviceProfile.INDEX_ALL_APPS].x, mMetrics, 1f),\n pxFromDp(inv.borderSpaces[InvariantDeviceProfile.INDEX_ALL_APPS].y, mMetrics, 1f));\n cellLayoutBorderSpaceOriginalPx = new Point(cellLayoutBorderSpacePx);\n folderCellLayoutBorderSpaceOriginalPx = pxFromDp(inv.folderBorderSpace, mMetrics, 1f);\n folderCellLayoutBorderSpacePx = new Point(folderCellLayoutBorderSpaceOriginalPx,\n folderCellLayoutBorderSpaceOriginalPx);\n\n int cellLayoutPaddingLeftRightMultiplier = !isVerticalBarLayout() && isTablet\n ? PORTRAIT_TABLET_LEFT_RIGHT_PADDING_MULTIPLIER : 1;\n int cellLayoutPadding = isScalableGrid\n ? 0\n : res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_layout_padding);\n\n if (isTwoPanels) {\n cellLayoutPaddingLeftRightPx = 0;\n cellLayoutBottomPaddingPx = 0;\n } else if (isLandscape) {\n cellLayoutPaddingLeftRightPx = 0;\n cellLayoutBottomPaddingPx = cellLayoutPadding;\n } else {\n cellLayoutPaddingLeftRightPx = cellLayoutPaddingLeftRightMultiplier * cellLayoutPadding;\n cellLayoutBottomPaddingPx = 0;\n }\n\n workspacePageIndicatorHeight = res.getDimensionPixelSize(\n R.dimen.workspace_page_indicator_height);\n mWorkspacePageIndicatorOverlapWorkspace =\n res.getDimensionPixelSize(R.dimen.workspace_page_indicator_overlap_workspace);\n\n iconDrawablePaddingOriginalPx =\n res.getDimensionPixelSize(R.dimen.dynamic_grid_icon_drawable_padding);\n\n dropTargetBarSizePx = res.getDimensionPixelSize(R.dimen.dynamic_grid_drop_target_size);\n dropTargetDragPaddingPx = res.getDimensionPixelSize(R.dimen.drop_target_drag_padding);\n dropTargetTextSizePx = res.getDimensionPixelSize(R.dimen.drop_target_text_size);\n\n workspaceSpringLoadedBottomSpace =\n res.getDimensionPixelSize(R.dimen.dynamic_grid_min_spring_loaded_space);\n\n workspaceCellPaddingXPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_padding_x);\n\n numShownHotseatIcons =\n isTwoPanels ? inv.numDatabaseHotseatIcons : inv.numShownHotseatIcons;\n numShownAllAppsColumns =\n isTwoPanels ? inv.numDatabaseAllAppsColumns : inv.numAllAppsColumns;\n hotseatBarSizeExtraSpacePx = 0;\n hotseatBarTopPaddingPx =\n res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_top_padding);\n hotseatBarBottomPaddingPx = (isTallDevice ? 0\n : res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_non_tall_padding))\n + res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_padding);\n hotseatBarSidePaddingEndPx =\n res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_side_padding);\n // Add a bit of space between nav bar and hotseat in vertical bar layout.\n hotseatBarSidePaddingStartPx = isVerticalBarLayout() ? workspacePageIndicatorHeight : 0;\n hotseatExtraVerticalSize =\n res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_extra_vertical_size);\n updateHotseatIconSize(\n pxFromDp(inv.iconSize[InvariantDeviceProfile.INDEX_DEFAULT], mMetrics, 1f));\n\n qsbBottomMarginOriginalPx = isScalableGrid\n ? res.getDimensionPixelSize(R.dimen.scalable_grid_qsb_bottom_margin)\n : 0;\n\n overviewShowAsGrid = isTablet && FeatureFlags.ENABLE_OVERVIEW_GRID.get();\n overviewTaskMarginPx = overviewShowAsGrid\n ? res.getDimensionPixelSize(R.dimen.overview_task_margin_focused)\n : res.getDimensionPixelSize(R.dimen.overview_task_margin);\n overviewTaskMarginGridPx = res.getDimensionPixelSize(R.dimen.overview_task_margin_grid);\n overviewTaskIconSizePx = res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_size);\n overviewTaskIconDrawableSizePx =\n res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size);\n overviewTaskIconDrawableSizeGridPx =\n res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size_grid);\n overviewTaskThumbnailTopMarginPx = overviewTaskIconSizePx + overviewTaskMarginPx * 2;\n if (overviewShowAsGrid) {\n if (isLandscape) {\n overviewActionsTopMarginGesturePx = res.getDimensionPixelSize(\n R.dimen.overview_actions_top_margin_gesture_grid_landscape);\n overviewActionsBottomMarginGesturePx = res.getDimensionPixelSize(\n R.dimen.overview_actions_bottom_margin_gesture_grid_landscape);\n overviewPageSpacing = res.getDimensionPixelSize(\n R.dimen.overview_page_spacing_grid_landscape);\n } else {\n overviewActionsTopMarginGesturePx = res.getDimensionPixelSize(\n R.dimen.overview_actions_top_margin_gesture_grid_portrait);\n overviewActionsBottomMarginGesturePx = res.getDimensionPixelSize(\n R.dimen.overview_actions_bottom_margin_gesture_grid_portrait);\n overviewPageSpacing = res.getDimensionPixelSize(\n R.dimen.overview_page_spacing_grid_portrait);\n }\n overviewActionsButtonSpacing = res.getDimensionPixelSize(\n R.dimen.overview_actions_button_spacing_grid);\n } else {\n overviewActionsTopMarginGesturePx = res.getDimensionPixelSize(\n R.dimen.overview_actions_margin_gesture);\n overviewActionsBottomMarginGesturePx = overviewActionsTopMarginGesturePx;\n overviewActionsButtonSpacing = res.getDimensionPixelSize(\n R.dimen.overview_actions_button_spacing);\n overviewPageSpacing = res.getDimensionPixelSize(R.dimen.overview_page_spacing);\n }\n overviewActionsMarginThreeButtonPx = res.getDimensionPixelSize(\n R.dimen.overview_actions_margin_three_button);\n // Grid task's top margin is only overviewTaskIconSizePx + overviewTaskMarginGridPx, but\n // overviewTaskThumbnailTopMarginPx is applied to all TaskThumbnailView, so exclude the\n // extra margin when calculating row spacing.\n int extraTopMargin = overviewTaskThumbnailTopMarginPx - overviewTaskIconSizePx\n - overviewTaskMarginGridPx;\n overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing)\n - extraTopMargin;\n overviewGridSideMargin = isLandscape\n ? res.getDimensionPixelSize(R.dimen.overview_grid_side_margin_landscape)\n : res.getDimensionPixelSize(R.dimen.overview_grid_side_margin_portrait);\n\n // Calculate all of the remaining variables.\n extraSpace = updateAvailableDimensions(res);\n\n // Now that we have all of the variables calculated, we can tune certain sizes.\n if (isScalableGrid && inv.devicePaddings != null) {\n // Paddings were created assuming no scaling, so we first unscale the extra space.\n int unscaledExtraSpace = (int) (extraSpace / cellScaleToFit);\n DevicePadding padding = inv.devicePaddings.getDevicePadding(unscaledExtraSpace);\n\n int paddingWorkspaceTop = padding.getWorkspaceTopPadding(unscaledExtraSpace);\n int paddingWorkspaceBottom = padding.getWorkspaceBottomPadding(unscaledExtraSpace);\n int paddingHotseatBottom = padding.getHotseatBottomPadding(unscaledExtraSpace);\n\n workspaceTopPadding = Math.round(paddingWorkspaceTop * cellScaleToFit);\n workspaceBottomPadding = Math.round(paddingWorkspaceBottom * cellScaleToFit);\n extraHotseatBottomPadding = Math.round(paddingHotseatBottom * cellScaleToFit);\n\n hotseatBarSizePx += extraHotseatBottomPadding;\n\n qsbBottomMarginPx = Math.round(qsbBottomMarginOriginalPx * cellScaleToFit);\n } else if (!isVerticalBarLayout() && isPhone && isTallDevice) {\n // We increase the hotseat size when there is extra space.\n\n if (Float.compare(aspectRatio, TALLER_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0\n && extraSpace >= Utilities.dpToPx(TALL_DEVICE_EXTRA_SPACE_THRESHOLD_DP)) {\n // For taller devices, we will take a piece of the extra space from each row,\n // and add it to the space above and below the hotseat.\n\n // For devices with more extra space, we take a larger piece from each cell.\n int piece = extraSpace < Utilities.dpToPx(TALL_DEVICE_MORE_EXTRA_SPACE_THRESHOLD_DP)\n ? 7 : 5;\n\n int extraSpace = ((getCellSize().y - iconSizePx - iconDrawablePaddingPx * 2)\n * inv.numRows) / piece;\n\n workspaceTopPadding = extraSpace / 8;\n int halfLeftOver = (extraSpace - workspaceTopPadding) / 2;\n hotseatBarTopPaddingPx += halfLeftOver;\n hotseatBarSizeExtraSpacePx = halfLeftOver;\n } else {\n // ie. For a display with a large aspect ratio, we can keep the icons on the\n // workspace in portrait mode closer together by adding more height to the hotseat.\n // Note: This calculation was created after noticing a pattern in the design spec.\n hotseatBarSizeExtraSpacePx = getCellSize().y - iconSizePx\n - iconDrawablePaddingPx * 2 - workspacePageIndicatorHeight;\n }\n\n updateHotseatIconSize(iconSizePx);\n\n // Recalculate the available dimensions using the new hotseat size.\n updateAvailableDimensions(res);\n }\n updateWorkspacePadding();\n\n flingToDeleteThresholdVelocity = res.getDimensionPixelSize(\n R.dimen.drag_flingToDeleteMinVelocity);\n\n // This is done last, after iconSizePx is calculated above.\n Path dotPath = GraphicsUtils.getShapePath(DEFAULT_DOT_SIZE);\n mDotRendererWorkSpace = new DotRenderer(iconSizePx, dotPath, DEFAULT_DOT_SIZE);\n mDotRendererAllApps = iconSizePx == allAppsIconSizePx ? mDotRendererWorkSpace :\n new DotRenderer(allAppsIconSizePx, dotPath, DEFAULT_DOT_SIZE);\n }", "public static void main(String[] args) {\n\n\n\n\n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\ramesh\\\\IdeaProjects\\\\aytomation_2\\\\.idea\\\\Chrome Driver\\\\chromedriver.exe\");\n System.out.println(\"neelam\");\n WebDriver driver = new ChromeDriver();\n\n\n driver.navigate().to(\"https://en-gb.facebook.com/login/\");\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\n // driver.findElement(By.id(\"password\")).sendKeys(\"DDLJ2796\");\n // driver.findElement(By.xpath(\"//*[@id=\\\"loginbutton\\\"]\")).click();\n //TakesScreenshot ts =(TakesScreenshot)driver;\n // File Srcfile = ts.getScreenshotAs(OutputType.FILE);\n\n\n }" ]
[ "0.551255", "0.53611946", "0.53093034", "0.5291327", "0.51320046", "0.50564414", "0.50548255", "0.50454247", "0.50056446", "0.4982926", "0.49657503", "0.4943287", "0.4882339", "0.48539153", "0.48525602", "0.4837359", "0.47919038", "0.47894815", "0.4768063", "0.4709145", "0.47016606", "0.46941492", "0.46665946", "0.46381566", "0.4620207", "0.461602", "0.46095657", "0.46083477", "0.45927218", "0.4591693", "0.45891282", "0.45875856", "0.4585112", "0.45743495", "0.4573", "0.45719025", "0.45451507", "0.45436656", "0.45436305", "0.45335612", "0.45328864", "0.4528645", "0.45232585", "0.45074007", "0.44909742", "0.44898695", "0.44897246", "0.44893038", "0.44798478", "0.4474838", "0.44746473", "0.4473285", "0.44727865", "0.44726163", "0.44712654", "0.4453944", "0.4446746", "0.4443609", "0.4440522", "0.44389206", "0.443862", "0.44360983", "0.4433799", "0.4429498", "0.44268388", "0.44195062", "0.4418567", "0.44179896", "0.44146806", "0.44132966", "0.44124934", "0.44104597", "0.44037014", "0.44036907", "0.44027248", "0.43860137", "0.43834683", "0.4378335", "0.43778792", "0.43762738", "0.43706113", "0.4369884", "0.43683726", "0.43627495", "0.43627203", "0.43619996", "0.43599156", "0.4357331", "0.43514055", "0.43496653", "0.43486822", "0.43486688", "0.43474588", "0.43471503", "0.4346596", "0.43455544", "0.4344125", "0.43289196", "0.4321664", "0.4317048" ]
0.46660522
23
/ WebElement returns element based on different locator
public static WebElement returnElement(String locatorType, String locatorPath) { WebDriverWait wait = new WebDriverWait(driver, TIMEOUT); switch (locatorType.toLowerCase()) { case "id": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id(locatorPath)))); // driver.findElement(By.id(locatorPath)); case "xpath": return driver.findElement(By.xpath(locatorPath)); case "name": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(locatorPath)))); // driver.findElement(By.name(locatorPath)); case "classname": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(locatorPath)))); // driver.findElement(By.className(locatorPath)); case "cssselector": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector(locatorPath)))); // driver.findElement(By.cssSelector(locatorPath)); case "linktext": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText(locatorPath)))); // driver.findElement(By.linkText(locatorPath)); case "tagname": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.tagName(locatorPath)))); // driver.findElement(By.tagName(locatorPath)); default: throw new RuntimeException("Unknown locator " + locatorType + " : " + locatorPath); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebElement getElement(String locator){\n\t\tWebElement webElement = null;\n\t\twaitForElementVisibility(locator);\n\t\ttry{\n\t\t\tif(locator.startsWith(\"//\")) {\t\n\t\t\t\twebElement = driver.findElement(By.xpath(locator));\t\t\t\t\n\t\t\t}else if( locator.startsWith(\"css=\")) {\n\t\t\t\tlocator=locator.substring(4);\n\t\t\t\twebElement = driver.findElement(By.cssSelector(locator));\n\t\t\t}else if( locator.startsWith(\"class=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.className(locator));\n\t\t\t}else if( locator.startsWith(\"name=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.name(locator));\n\t\t\t}else if( locator.startsWith(\"link=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.linkText(locator));\n\t\t\t}else if( locator.startsWith(\"tag=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.tagName(locator));\n\t\t\t} else\n\t\t\t\twebElement = driver.findElement(By.id(locator));\n\t\t\tlog.debug(\"ELEMENT FOUND WITH LOCATOR : \"+locator);\n\t\t}catch (NoSuchElementException ex) {\n\t\t\tlog.debug(\"No such element \"+locator);\n\t\t\treturn webElement;\n\t\t} catch(Exception ex) {\n\t\t\tlog.debug(\"ELEMENT NOT FOUND WITH LOCATOR : \"+locator);\n\t\t ex.printStackTrace();\n\t\t return webElement;\n\t\t}\n\t\treturn webElement;\t\t\n\t}", "protected WebElement findWebElement (By webElementSelector){\n\t\ttry {\n\t\t\treturn webDriver.findElement(webElementSelector);\t\n\t\t} catch (NoSuchElementException noSuchElement) {\n\t\t\tthrow new AssertionError(\"Cannot find the web element with selector \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "protected WebElement find(By locator) {\n try {\n return driver.findElement(locator);\n } catch (NoSuchElementException e) {\n log.error(\"Element not found: [\" + locator + \"]\");\n log.error(e.toString());\n return null;\n }\n }", "public WebElement getElement(By locator) {\n\t\tWebElement element= driver.findElement(locator);\n\t\treturn element;\n\t}", "public WebElement getElement(By locator ){\n \tWebElement element=null;\n \ttry{\n \t\t element=driver.findElement(locator);\n \t}catch(Exception e){\n \t\tSystem.out.println(\"some exception occured while creating web element \"+ locator);\n \t} \t\n \treturn element;\n }", "public WebElement getElement(String locatorKey){\r\n\t\tWebElement e=null;\r\n\t\ttry{\r\n\t\tif(locatorKey.endsWith(\"_id\"))\r\n\t\t\te = driver.findElement(By.id(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_name\"))\r\n\t\t\te = driver.findElement(By.name(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_xpath\"))\r\n\t\t\te = driver.findElement(By.xpath(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_class\"))\r\n\t\t\te = driver.findElement(By.className(prop.getProperty(locatorKey)));\r\n\t\telse{\r\n\t\t\treportFailure(\"Locator not correct - \" + locatorKey);\r\n\t\t\tAssert.fail(\"Locator not correct - \" + locatorKey);\r\n\t\t}\r\n\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\t// fail the test and report the error\r\n\t\t\treportFailure(ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t\tAssert.fail(\"Failed the test - \"+ex.getMessage());\r\n\t\t}\r\n\t\treturn e;\r\n\t}", "public WebElement findElement(By locator) {\n try {\n WebElement element = getDriver().findElement(locator);\n return element;\n } catch (NoSuchElementException e) {\n error(\"Exception Occurred in while finding element with definition :: \" + locator);\n error(Throwables.getStackTraceAsString(e));\n throw new NoSuchElementException(e.getMessage());\n }\n }", "public WebElement findElement(By locator){\n\t\tWebElement element = null;\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\n\t\ttry {\n\t\t\twaitForElement(locator);\n\t\t\twaitForElement(ExpectedConditions.refreshed(ExpectedConditions.presenceOfElementLocated(locator)));\n\t\t\twaitForElement(ExpectedConditions.refreshed(ExpectedConditions.visibilityOfElementLocated(locator)));\n\t\t\telement = driver.findElement(locator);\n\t\t\t//((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", element);\n\n\t\t}catch(Exception e)\n\t\t{\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Element with locator [\"+ locator.toString() +\"] was not found.\");\n\t\t}\n\t\treturn element;\n\t}", "public WebElement returnElementByXpath(String xpath){\n WebElement element;\n element = driver.findElement(By.xpath(xpath));\n return element;\n }", "public WebElement getElement(By locator) {\n\t\tWebElement ele = null;\n\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, EXPLICIT_WAIT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t\tele = driver.findElement(locator);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TimeoutException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn ele;\n\n\t}", "public WebElement apply(WebDriver driver ) {\n return driver.findElement(By.xpath(\"/html/body/div[1]/section/div[2]/div/div[1]/div/div[1]/div/div/div/div[2]/div[2]/div/div/div/div/div[1]/div/div/a/i\"));\n }", "public WebElement getObject(WebDriver driver,String locatorType, String locator){\r\n\t\ttry{\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\r\n\t\t\r\n\t\t\tif(locatorType.equalsIgnoreCase(\"name\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.name(locator)).isDisplayed() && driver.findElement(By.name(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : name=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.name(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"id\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.id(locator)).isDisplayed() && driver.findElement(By.id(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : id=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.id(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"linkText\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.linkText(locator)).isDisplayed() && driver.findElement(By.linkText(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : linkText=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.linkText(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"partialLinkText\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.partialLinkText(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.partialLinkText(locator)).isDisplayed() && driver.findElement(By.partialLinkText(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : partialLinkText=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.partialLinkText(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"className\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.className(locator)).isDisplayed() && driver.findElement(By.className(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : className=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.className(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"tagName\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.tagName(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.tagName(locator)).isDisplayed() && driver.findElement(By.tagName(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : tagName=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.tagName(locator)));\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"xpath\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.xpath(locator)).isDisplayed() && driver.findElement(By.xpath(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : xpath=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.xpath(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"css\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.cssSelector(locator)).isDisplayed() && driver.findElement(By.cssSelector(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : cssSelector=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.cssSelector(locator)));\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tTestLogger.logError(\"Locator of type :\"+locatorType+\" is not valid\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}catch(NoSuchElementException exception){\r\n\t\t\tTestLogger.logError(\"No such element found with attrribute : \"+locatorType+\"=\"+locator);\r\n\t\t\texception.printStackTrace();\r\n\t\t\tdriver.close();\r\n\t\t\tTestBase.driver = null;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tdriver.close();\r\n\t\t\tTestBase.driver = null;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public WebElement findElement(By element) {\r\n\t\t\r\n\t\treturn driver.findElement(element);\r\n\t\t\t\r\n\t}", "public WebElement getElementShort(By locator) {\n\t\tWebElement ele = null;\n\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, IMPLICITE_WAIT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t\tele = driver.findElement(locator);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TimeoutException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn ele;\n\n\t}", "Object getComponent(WebElement element);", "public WebElement element(String strElement) throws Exception {\n String locator = prop.getProperty(strElement); \n // extract the locator type and value from the object\n String locatorType = locator.split(\";\")[0];\n String locatorValue = locator.split(\";\")[1];\n // System.out.println(By.xpath(\"AppLogo\"));\n \n // for testing and debugging purposes\n System.out.println(\"Retrieving object of type '\" + locatorType + \"' and value '\" + locatorValue + \"' from the Object Repository\");\n \n // wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//input[@id='text3']\")));\n try {\n\n\n \tif(locatorType.equalsIgnoreCase(\"Id\"))\n \t\treturn driver.findElement(By.id(locatorValue)); \n \telse if(locatorType.equalsIgnoreCase(\"Xpath\")) \n \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}catch(Exception e) {\n// \t\t\tdriver.navigate().refresh();\n//\n// \t\t\t@SuppressWarnings({ \"unchecked\", \"deprecation\", \"rawtypes\" })\n// \t\t\tWait<WebDriver> wait = new FluentWait(driver) \n// \t\t\t.withTimeout(8, TimeUnit.SECONDS) \n// \t\t\t.pollingEvery(1, TimeUnit.SECONDS) \n// \t\t\t.ignoring(NoSuchElementException.class);\n// \t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locatorValue))));\n// \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}\n \n \n \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n\n \n } catch (NoSuchElementException | StaleElementReferenceException e) {\n \t\t\n if(locatorType.equalsIgnoreCase(\"Id\"))\n return driver.findElement(By.id(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Xpath\")) \n return driver.findElement(By.xpath(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n }\n throw new NoSuchElementException(\"Unknown locator type '\" + locatorType + \"'\"); \n \t}", "public WebElement findElementClickable(By locator){\n\t\tWebElement element = null;\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\n\t\ttry {\n\n\t\t\twaitForElement(locator);\n\t\t\twaitForElement(ExpectedConditions.refreshed(ExpectedConditions.elementToBeClickable(locator)));\n\t\t\telement = driver.findElement(locator);\n\t\t\t//((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", element);\n\t\t\treturn element;\n\n\t\t}catch(Exception e)\n\t\t{\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Element with locator [\"+ locator.toString() +\"] was not found.\");\n\n\t\t}\n\t}", "public WebElement apply(WebDriver arg0) //We are defining the function taking the WebDriver as input \n {\n WebElement ele = arg0.findElement(By.xpath(spath));\n return ele;\n }", "public By getLocator(String elementName) {\n\t\t// Read value using the logical name as Key\n\t\tString locator = properties.getProperty(elementName);\n\t\t// Split the value which contains locator type and locator value\n\t\tString temp[] = locator.split(\":\", 2);\n\t\tString locatorType = temp[0];\n\t\tString locatorValue = temp[1];\n\t\t// Return a instance of By class based on type of locator\n\t\tif (locatorType.toLowerCase().equals(\"id\")) {\n\t\t\treturn By.id(locatorValue);\n\t\t} else if (locatorType.toLowerCase().equals(\"name\"))\n\t\t\treturn By.name(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"classname\")) || (locatorType.toLowerCase().equals(\"class\")))\n\t\t\treturn By.className(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"tagname\")) || (locatorType.toLowerCase().equals(\"tag\")))\n\t\t\treturn By.tagName(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"mtagname\")) || (locatorType.toLowerCase().equals(\"mtag\")))\n\t\t\treturn MobileBy.tagName(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"linktext\")) || (locatorType.toLowerCase().equals(\"link\")))\n\t\t\treturn By.linkText(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"partiallinktext\"))\n\t\t\treturn By.partialLinkText(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"cssselector\")) || (locatorType.toLowerCase().equals(\"css\")))\n\t\t\treturn By.cssSelector(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"xpath\"))\n\t\t\treturn By.xpath(locatorValue);\n\t\telse\n\t\t\tAssert.fail(\"Locator type '\" + locatorType + \"' not defined!!\");\n\t\treturn null;\n\t}", "public WebElement locateElement(String locatorValue) {\n\t\tWebElement findElementById = getter().findElement(By.id(locatorValue));\r\n\t\treturn findElementById;\r\n\t}", "public static WebElement getObject(String xpathKey){\n\ttry{\n\treturn driver.findElement(By.xpath(OR.getProperty(xpathKey)));\n\t}catch(Throwable t){\n\t\t//report error\n\t\treturn null;\n\t\n}\n}", "public static WebElement findElement(String locatorType, String locatorPath) {\r\n\r\n\t\telement = returnElement(locatorType, locatorPath);\r\n\t\telement.isDisplayed();\r\n\r\n\t\treturn element;\r\n\t}", "public WebElement getXpathElements(String XPlocator, String XPtype) {\n\t\t\tXPtype = XPtype.toLowerCase();\n\t\t\tif (XPtype.equals(\"textarea\")) {\n\t\t\t\tSystem.out.println(\"Element found with textarea: \" + XPlocator);\n\t\t\t\treturn this.driver.findElement(By.xpath(XPlocator));\n\t\t\t\t\n\t\t\t}\n\n\t\t\telse if (XPtype.equals(\"input\")) {\n\t\t\t\tSystem.out.println(\"Element found with input: \" + XPlocator);\n\t\t\t\treturn this.driver.findElement(By.xpath(XPlocator));\n\t\t\t}\n\n\t\t\t// add more locator types here\n\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Locator type not supported\");\n\t\t\treturn null;\n\t\t}", "public static WebElement getObject(String xpathKey){\n\t\t\n\t\tWebElement obj = null;\n\t\tobj = driver.findElement(By.xpath(OR.getProperty(xpathKey)));\n\t\treturn obj;\n\t}", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, ElementType type);", "Element getElement();", "@Test\n public void locatorsCombinationTest() throws Exception {\n /* Search the word \"test\" on Google */\n driver.get(\"https://www.google.co.uk/search?dcr=0&ei=qTR0WquJOojosAXBu5KoBA&q=octane&oq=octane&gs_l=psy-ab.3..0i71k1l4.861.861.0.1157.1.1.0.0.0.0.0.0..0.0....0...1c.1.64.psy-ab..1.0.0....0.rHW5osH_iok\");\n\n /* Using the standard devtools */\n driver.findElement(By.xpath(\"//*[@id='rhs_block']/div[1]/div[1]/div/div[1]/div[2]/div[1]/div/div[1]/div/div/div[2]/div[1]/span\"));\n\n /* Using the selenium OIC and combination of locators */\n driver.findElement(new ByEach(\n By.tagName(\"span\"),\n By.visibleText(\"Octane\")\n ));\n\n /* This test demonstrates the power of combinated locators :\n * Provide new ways to locate Web elements\n * Give more flexibility, accuracy and robustness\n * */\n }", "private WebElement getXpath(String xpathInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.xpath(xpathInfo)));\n\t\treturn element;\n\t}", "WebElement getSearchButton();", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, Class<? extends IElement> clazz);", "public WebElement game() { return driver.findElement(gameLocator); }", "public WebElement getElement(WebDriver driver, By locator, int timeout) throws Exception {\n for (int i = 0; i <= timeout; i++) {\n try {\n element = driver.findElement(locator);\n log.info(\"Found element with : \" + locator);\n return element;\n } catch (Exception e) {\n log.info(i + \". Trying to find element with \" + locator);\n }\n Thread.sleep(2000);\n }\n StackTraceElement stackTrace = new Throwable().getStackTrace()[1];\n log.error(\"Cannot find element with : \" + locator);\n log.error(\"Cannot find element : \" + stackTrace.getClassName() + \".\" + stackTrace.getMethodName());\n throw new Exception(\"Unable to find Element\");\n }", "Element getElement(String id);", "public static MobileElement element(By locator) {\n return w(driver.findElement(locator));\n }", "public static WebElement webAction(final By locator) {\n\t\tWait<WebDriver> wait = new FluentWait<WebDriver>(SharedSD.getDriver())\n\t\t\t\t.withTimeout(15, TimeUnit.SECONDS)\n\t\t\t\t.pollingEvery(1, TimeUnit.SECONDS)\n\t\t\t\t.ignoring(NoSuchElementException.class)\n\t\t\t\t.ignoring(StaleElementReferenceException.class)\n\t\t\t\t.ignoring(ElementNotFoundException.class)\n\t\t\t\t.withMessage(\n\t\t\t\t\t\t\"Webdriver waited for 15 seconds but still could not find the element therefore Timeout Exception has been thrown\");\n\n\t\tWebElement element = wait.until(new Function<WebDriver, WebElement>() {\n\t\t\tpublic WebElement apply(WebDriver driver) {\n\t\t\t\treturn driver.findElement(locator);\n\t\t\t}\n\t\t});\n\n\t\treturn element;\n\t}", "private WebElement getCssSelectorElement(String cssSelectorInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.cssSelector(cssSelectorInfo)));\n\t\treturn element;\n\t}", "public By autoLocator(String locator){\n \ttry{\n \t\tif(locator.startsWith(\"//\")){\n \t\t\treturn By.xpath(locator);\n \t\t}else if (locator.startsWith(\"class=\")){\n \t\t\tlocator = locator.split(\"=\")[1];\n \t\t return By.className(locator);\n \t\t}else if (locator.startsWith(\"css=\")) {\n \t\t\tlocator=locator.substring(4);\n \t\t\t\treturn By.cssSelector(locator);\n \t\t}else\n \t\t\treturn By.id(locator);\n \t} catch (NoSuchElementException noSuchElementException){\n \t\treturn null;\n \t}\n }", "public WebElement findElement(String sElement) {\n\t\treturn findElement(sCurrentPage,sElement);\n\t}", "public List<WebElement> findElements(By locator) {\n try {\n List<WebElement> element = getDriver().findElements(locator);\n return element;\n } catch (NoSuchElementException e) {\n error(\"element not found\" + locator);\n throw new NoSuchElementException(e.getMessage());\n }\n }", "private List<WebElement> findElements(String strategy, String locator, boolean xpath) {\n if (elementId.equals(\"\")) {\n return (List<WebElement>) driver.executeAtom(atoms.findElementsJs, xpath, strategy, locator);\n } else {\n return (List<WebElement>) driver.executeAtom(atoms.findElementsJs, xpath, strategy, locator, this);\n }\n }", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, IElementSupplier<T> supplier);", "Element asElement();", "@Override\n\tpublic WebElement $x(String xpath) {\n\t\tList<WebElement> els = this.findElements(By.xpath(xpath));\n\t\tif (els.size() >= 0) {\n\t\t\treturn els.get(0);\n\t\t}\n\t\treturn null;\n\t}", "public static WebElement getObject(String xpathKey){\n\t\tString strXpath = xpathKey;\n\t\t\n\t\tif(strXpath.startsWith(\"//\")){\n\t\t\t\n\t\t\treturn driver.findElement(By.xpath((xpathKey).trim()));\n\t\t\n\t\t}else{\n\t\t\t\n\t\t\treturn driver.findElement(By.id((xpathKey).trim()));\n\t\t}\n\t}", "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "public WebElement waitForElement(By locator) {\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\t\treturn waitForElement(locator,explicitWait());\n\t}", "public static WebElement getElementByxpath(String xpath) throws Exception {\n\t\tWebElement element = null;\n\t\ttry {\n\t\t\telement = driver.findElement(By.xpath(xpath));\n\t\t\t// element =\n\t\t\t// explicitlyWait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)));\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn element;\n\t}", "public WebElement apply(WebDriver d) {\n\t\t\t\t\treturn d.findElement(by);\n\t\t\t\t}", "@Override\r\n public Element findElement()\r\n {\n return null;\r\n }", "public String getValue(final String elementLocator);", "@Test\r\n public void findShadowDOMWithSeleniumFindElement () {\n WebElement shadowHost = driver.findElement(By.tagName(\"book-app\"));\r\n\r\n // #2 Execute JavaScript To Return The Shadow Root\r\n JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;\r\n WebElement shadowRoot = (WebElement) jsExecutor.executeScript(\r\n \"return arguments[0].shadowRoot\", shadowHost);\r\n\r\n // #3 Find The WebElement Then Perform An Action On The WebElement\r\n WebElement app_header = shadowRoot.findElement(By.tagName(\"app-header\"));\r\n WebElement app_toolbar\r\n = app_header.findElement(By.cssSelector(\".toolbar-bottom\"));\r\n WebElement book_input_decorator\r\n = app_toolbar.findElement(By.tagName(\"book-input-decorator\"));\r\n WebElement searchField = book_input_decorator.findElement(By.id(\"input\"));\r\n searchField.sendKeys(\"Shadow DOM With Find Element\");\r\n }", "public WebElement find_Element_Locators(String locators, String id) {\n\t\tWebElement find_Element = null;\n\t\ttry {\n\t\t\tif (locators.equalsIgnoreCase(\"id\")) {\n\t\t\t\tfind_Element = driver.findElement(By.id(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"name\")) {\n\t\t\t\tfind_Element=driver.findElement(By.name(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"xpath\")) {\n\t\t\t\t find_Element = driver.findElement(By.xpath(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"tagName\")) {\n\t\t\t\tfind_Element = driver.findElement(By.tagName(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"className\")) {\n\t\t\t\tfind_Element = driver.findElement(By.className(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"cssSelector\")) {\n\t\t\t\tfind_Element = driver.findElement(By.cssSelector(id));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn find_Element;\n\t}", "public List<WebElement> locateElements(String type, String value) {\n\t\ttry {\r\n\t\t\tswitch(type.toLowerCase()) {\r\n\t\t\tcase \"id\": return getter().findElements(By.id(value));\r\n\t\t\tcase \"name\": return getter().findElements(By.name(value));\r\n\t\t\tcase \"class\": return getter().findElements(By.className(value));\r\n\t\t\tcase \"link\": return getter().findElements(By.linkText(value));\r\n\t\t\tcase \"xpath\": return getter().findElements(By.xpath(value));\r\n\t\t\t}\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.err.println(\"The Element locator:\"+type+\" value not found: \"+value);\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public WebElement ProfileManagementLink()\n{\n return driver.findElement(By.xpath(\".//*[@id='ibm-primary-links']/li[2]/a\"));\n}", "@Override\npublic void findElement(String by) {\n\t\n}", "public String getText(final String elementLocator);", "private static By parseWebBy(String locator, By parentBy) {\n WebLocator lc = parseWebLocator(locator);\n switch (lc.getType()) {\n case ID:\n return By.id(lc.getValue());\n case LINK:\n return By.linkText(lc.getValue());\n case PARTIAL_LINK:\n return By.partialLinkText(lc.getValue());\n case TAG:\n return By.tagName(lc.getValue());\n case NAME:\n return By.name(lc.getValue());\n case CLASS:\n return By.className(lc.getValue());\n case CSS:\n return new ByCss(lc.getValue());\n case XPATH:\n if (lc.getValue().endsWith(\"/\")) {\n return By.xpath(lc.getValue().substring(0, lc.getValue().length() - 1));\n }\n return By.xpath(lc.getValue());\n case IDENTIFIER:\n return new ByIdOrName(lc.getValue());\n case ALT:\n return new ByAlt(lc.getValue());\n case DOM:\n return new ByDom(lc.getValue());\n case INDEX:\n return new ByIndex(parentBy, Integer.parseInt(lc.getValue()));\n case VARIABLE:\n return new ByVariable(lc.getValue());\n default:\n break;\n }\n throw new InvalidSelectorException(\"Invalid selector.\");\n }", "protected void findWebElementAndType (By webElementSelector, String text){\n\t\tWebElement inputBox = findWebElement(webElementSelector);\n\t\ttry {\n\t\t\tinputBox.sendKeys(text);\n\t\t} catch (ElementNotVisibleException e){\n\t\t\tthrow new AssertionError(\"Found the web element, but it's not visible to send keys. \" + webElementSelector.toString());\n\t\t}\n\t}", "public abstract LocalAbstractObject getObject(String locator) throws NoSuchElementException;", "public WebElement findElementByName(String NameValue) {\n\t\ttry {\n\t\t\tElement = driver.findElement(By.name(NameValue));\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t\treturn Element;\n\n\t}", "protected void findWebElementAndClick (By webElementSelector){\n\t\tWebElement button = findWebElement(webElementSelector);\n\t\ttry {\t\t\n\t\t\tbutton.click();\n\t\t} catch (StaleElementReferenceException e) {\n\t\t\tthrow new AssertionError(\"Found the web element, but cannot perform click action. \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "public WebElement findElementByXPath(String XPathValue) {\n\t\ttry {\n\t\t\tElement = driver.findElement(By.xpath(XPathValue));\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t\treturn Element;\n\n\t}", "Object element();", "Object element();", "public WebElement apply(WebDriver fdriver) \n\t\t\t{\n\t\t\t\n\t\t\t\tSystem.out.println(\"Checking for the element!!\");\n\t\t\t\tWebElement element = fdriver.findElement(By.id(\"targetid\"));\n\t\t\t\tif(element != null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Target element found\");\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t}", "public T find(T element);", "public boolean isElementPresent(final String elementLocator);", "static WebElement create_path(WebDriver driver,String a[])\n\t{\n\t\tWebElement element= null;\n\t\t//String element=\"\",\n\t\tString b;\n\t\tb=a[1];\n\t\t//System.out.println(\ta[2]);\n\t\tswitch(b)\n\t\t{\n\t\tcase \"id\" : \n\t\t\t element = driver.findElement(By.id(a[2]));\n\t\t\t break;\n\t\tcase \"xpath\" :\n\t\t\t element = driver.findElement(By.xpath(a[2]));\n\t\t\t break;\n\t\tcase \"css\" :\n\t\t\t element = driver.findElement(By.cssSelector(a[2]));\n\n\t\t\t \n\t\t}\n\t\treturn element;\n\t}", "private WebElement getCheckBoxElementWithoutSearchbyText(String widgetID, String value) {\n/* 53 */ List<WebElement> elementsList = this.webdriver.findElements(By.xpath(\".//*[@id='attribute-tree-\" + widgetID + \"']//span[text() = '\" + value + \"']\"));\n/* 54 */ if (elementsList.size() > 0) {\n/* 55 */ return elementsList.get(0);\n/* */ }\n/* 57 */ return null;\n/* */ }", "default <T extends IElement> List<T> findElements(By locator, ElementType type) {\n return findElements(locator, type, ElementsCount.MORE_THEN_ZERO);\n }", "private static WebLocator parseWebLocator(String locator) {\n Pattern p = Pattern.compile(\"^([A-Za-z ]+)=([\\\\S\\\\s]+)\");\n Matcher m = p.matcher(locator);\n WebLocator lc = new WebLocator();\n if (m.find()) {\n lc.setType(WebLocatorType.fromStrategy(m.group(1).toLowerCase()));\n lc.setValue(m.group(2));\n } else {\n if (locator.startsWith(\"/\")) {\n lc.setType(WebLocatorType.XPATH);\n } else if (locator.startsWith(\"document\")) {\n lc.setType(WebLocatorType.DOM);\n } else {\n lc.setType(WebLocatorType.IDENTIFIER);\n }\n lc.setValue(locator);\n }\n return lc;\n }", "protected WebElement aguardaElemento(WebElement elemento) {\n Log.info(\"Aguardando elemento: \" + getReferenceNameElement(elemento));\n try {\n return aguardaElemento(ExpectedConditions.refreshed(ExpectedConditions.visibilityOf(elemento)));\n } catch (Exception e) {\n throw new AutomacaoBusinessException(\"Não foi encontrado o elemento: \" + getReferenceNameElement(elemento));\n }\n }", "Element getElement(Position pos);", "@DISPID(1001)\n @PropGet\n ms.html.IHTMLElement element();", "public Element findByName(String name) {\n for (Element element : this){\n if (element.getName().equals(name)) return element;\n }\n return null;\n }", "protected List<WebElement> findListOfElements(By locator) {\n waitForVisibilityOf(locator);\n return driver.findElements(locator);\n }", "protected WebElement proxyForLocator(ClassLoader loader,\n\t\t\tElementLocator locator) {\n\t\tInvocationHandler handler = new LocatingElementHandler(locator);\n\n\t\tWebElement proxy = (WebElement) Proxy.newProxyInstance(loader,\n\t\t\t\tnew Class[] {WebElement.class, WrapsElement.class,\n\t\t\t\t\t\tLocatable.class }, handler);\n\t\treturn proxy;\n\t}", "@Override\n\tpublic T find(T targetElement) {\n\t\tif(contains(targetElement))\n\t\t return targetElement;\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}", "public WebElement apply(WebDriver d) {\n\t\t\t\t\treturn element;\n\t\t\t\t}", "@Test(priority = 5)\n public void openDifferentElementsPageTest() {\n driver.findElement(new By.ByLinkText(\"SERVICE\")).click();\n driver.findElement(By.xpath(\"//a[contains(text(),'Different elements')]\")).click();\n }", "protected WebElement aguardaElemento(ExpectedCondition<WebElement> expect) {\n try {\n return wait.until(ExpectedConditions.refreshed(expect));\n } catch (Exception e) {\n throw new AutomacaoBusinessException(\"Não foi encontrado o elemento conforme expectativa: \" + expect, e);\n }\n }", "Elem getElem();", "Elem getQualifiedElem();", "private String getElement(WebElement webElement) {\n if (webElement != null) {\n if (webElement.getText() != null) {\n return webElement.getText();\n } else if (webElement.getTagName() != null) {\n return webElement.getTagName();\n } else {\n return null;\n }\n } else {\n return null;\n }\n }", "public By getMobileLocator(String elementName, String dynamicElementValue) {\n\n\t\tString locatorValue;\n\t\t// Read value using the logical name as Key\n\t\tString locator = properties.getProperty(elementName);\n\t\t// Split the value which contains locator type and locator value\n\t\tif(locator == null) {\n\t\tLoggers.logErrorMessage(\"The element name \"+elementName+\" is not present in locators file\",true);\n\t\t\tthrow new InvalidParameterException(MessageFormat.format(\"Missing value for key {0}!\", elementName));\n\t\t}\n\t\tString temp[] = locator.split(\":\", 2);\n\t\tString locatorType = temp[0];\n\t\tif (dynamicElementValue == null) {\n\t\t\tlocatorValue = temp[1];\n\t\t} else {\n\t\t\tlocatorValue = temp[1].replace(\"$1\", dynamicElementValue);\n\t\t}\n\t\t// Return a instance of By class based on type of locator\n\t\tif (locatorType.toLowerCase().equals(\"mid\")) {\n\t\t\treturn By.id(locatorValue);\n\t\t} else if (locatorType.toLowerCase().equals(\"aid\"))\n\t\t\treturn MobileBy.AccessibilityId(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"mname\"))\n\t\t\treturn MobileBy.name(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"mclassname\")) || (locatorType.toLowerCase().equals(\"mclass\")))\n\t\t\treturn MobileBy.className(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"mxpath\"))\n\t\t\treturn MobileBy.xpath(locatorValue);\n\t\telse {\n\t\t\tLoggers.logErrorMessage(\"Locator type '\" + locatorType + \"' not defined!!\",true);\n\t\t\tAssert.fail(\"Locator type '\" + locatorType + \"' not defined!!\");\n\t\treturn null;\n\t\t}\n\t}", "public E element () throws NoSuchElementException;", "String getElement();", "public static By parseBy(String locator, ContextAwareWebDriver webDriver) {\n if (webDriver.isWebContext()) {\n return parseWebBy(locator, null);\n } else {\n return parseMobileBy(locator, null);\n }\n }", "<T extends IElement> List<T> findElements(By locator, ElementType type, ElementsCount count);", "private <T extends Element> T getNearestElement(Element element, Class<T> klass) {\n List elements = element.nearestDescendants(klass);\n if (elements == null || elements.isEmpty()) {\n return null;\n }\n\n return (T) elements.get(0);\n }", "public WebElement apply(WebDriver driver) \n\t\t\t\t\t{\n\t\t\t\t\t\tif(we.isDisplayed()){\n\n\t\t\t\t\t\t\treturn we;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t}", "public RTWElementRef getAsElement(int i);", "public WebElement userLoginDiv() {\r\n return driver.findElement(By.id(\"block-system-main\"));\r\n\r\n}", "@Override\r\n\tpublic List<WebElement> findElements() {\n\t\thandleContext(bean.getIn());\r\n\t\treturn driver.getRealDriver().findElements(bean.getBys().get(0));\r\n\t}", "public WebElement waitForElement(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.presenceOfElementLocated(locator)));\n\t}", "protected void findWebElementAndSelect(By webElementSelector, String value){\n\t\ttry {\n\t\t\tSelect dropdown = new Select(findWebElement(webElementSelector));\n\t\t\tdropdown.selectByVisibleText(value);\n\t\t} catch (UnexpectedTagNameException e) {\n\t\t\tthrow new AssertionError(\"Cannot create select item basing on webElement \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "private Target getMatchingTarget(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Target target : targets)\n {\n String label = target.getName();\n\n if (label.equals(targetName))\n {\n return target;\n }\n }\n\n return null;\n }", "protected IRubyElement findElementToSelect(IRubyElement je) {\r\n\t\tif (je == null)\r\n\t\t\treturn null;\r\n\r\n\t\tswitch (je.getElementType()) {\r\n\t\t\tcase IRubyElement.RUBY_MODEL :\r\n\t\t\t\treturn null;\r\n\t\t\tcase IRubyElement.RUBY_PROJECT:\r\n\t\t\t\treturn je;\r\n\t\t\tcase IRubyElement.SOURCE_FOLDER_ROOT:\r\n\t\t\t\tif (je.getElementName().equals(ISourceFolderRoot.DEFAULT_PACKAGEROOT_PATH))\r\n\t\t\t\t\treturn je.getParent();\r\n\t\t\t\telse\r\n\t\t\t\t\treturn je;\r\n\t\t\tdefault :\r\n\t\t\t\treturn findElementToSelect(je.getParent());\r\n\t\t}\r\n\t}", "private WebElement getid(String idInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.id(idInfo)));\n\t\treturn element;\n\t}", "Elem getPointedElem();" ]
[ "0.7492095", "0.70938635", "0.7062717", "0.7042798", "0.6965454", "0.69141805", "0.68481636", "0.68000126", "0.67499036", "0.67171603", "0.6699032", "0.6673118", "0.6662596", "0.66337585", "0.6603423", "0.6555641", "0.64377034", "0.6403251", "0.6349805", "0.63410825", "0.63157487", "0.62519693", "0.62042576", "0.61920434", "0.61611444", "0.6151568", "0.6073701", "0.6069038", "0.6050268", "0.60270035", "0.6023966", "0.6020349", "0.59988767", "0.5989355", "0.5982079", "0.5964662", "0.5962219", "0.5958197", "0.59184664", "0.5916308", "0.59152454", "0.5863034", "0.5860268", "0.58592194", "0.5848898", "0.5841019", "0.5832038", "0.5806934", "0.57970864", "0.5789454", "0.57831883", "0.5782965", "0.57591397", "0.57558095", "0.57094777", "0.5702424", "0.56920093", "0.5665479", "0.56552094", "0.56544363", "0.56515706", "0.5648622", "0.563162", "0.563162", "0.5614222", "0.5604712", "0.56043553", "0.55930066", "0.55573684", "0.5546473", "0.5525909", "0.54985404", "0.5498237", "0.5494955", "0.547676", "0.54618794", "0.54605407", "0.5456397", "0.5450961", "0.544696", "0.5441934", "0.54408", "0.5434054", "0.5423156", "0.5416249", "0.54021513", "0.54007614", "0.5393801", "0.53897154", "0.53867227", "0.5378075", "0.53731716", "0.53716487", "0.5365151", "0.53624964", "0.5360966", "0.5334854", "0.53339756", "0.53331363", "0.5324144" ]
0.6537315
16
/ findElement using 'returnElement' and verify is Displayed
public static WebElement findElement(String locatorType, String locatorPath) { element = returnElement(locatorType, locatorPath); element.isDisplayed(); return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean find(String sElement){\n\t\tboolean bReturn = false;\n\t\ttry{\n\t\t\tbReturn = findElement(sElement).isDisplayed();\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception occured in finding the WebElement: \"+e.getMessage());\n\t\t}\n\t\t\n\t\treturn bReturn;\n\t}", "private boolean elementDisplayed(String xpath){\n try {\n WebElement element = Driver.getDriver().findElement(By.xpath(xpath));\n return element.isDisplayed();\n }catch(Exception e){\n return false;\n }\n }", "public static void isPupupPreasent(WebElement ele ,String objectName) {\n if (ele.isDisplayed())\n\t{System.out.println(ele +\"Is displayed in he screen\");}\n else \n\t{System.out.println(ele+\"not found in the Screen\");}\n\n\n}", "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "public boolean isDisplayed(WebElement ElementToCheck){\n\t\tWebDriverWait wait = new WebDriverWait(driverInstance, Constants.DRIVER_WAIT);\n\t\ttry{\n\t\t\twait.until(ExpectedConditions.visibilityOf(ElementToCheck));\n\t\t\treturn ElementToCheck.isDisplayed();\n\t\t}\n\t\tcatch(Exception E){\n\t\t\tLog.error(\"Element is not getting displayed\");\n\t\t\treturn false;\n\t\t}\n\t}", "public void isElementVisible(WebElement elem) {\n try {\n driverWait.until(ExpectedConditions.visibilityOf(elem));\n System.out.println(\"Element is present in the page\");\n } catch (Exception e) {\n Assert.fail(\"Element isn't present in the page\");\n }\n }", "public static void verify_element_is_displayed(By locator) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(element);\n\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\tassertEquals(true, element.isDisplayed());\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\n\t\t}\n\n\t}", "boolean isDisplayed();", "public void verifyElementIsVisible(String elementName) {\n wait.forElementToBeDisplayed(5, returnElement(elementName), elementName);\n Assert.assertTrue(\"FAIL: Yellow Triangle not present\", returnElement(elementName).isDisplayed());\n }", "private void waitforvisibleelement(WebDriver driver2, WebElement signoutimg2) {\n\t\r\n}", "public boolean isElementPresent(WebElement elementName, int timeout){\n //https://github.com/appium/java-client/issues/617\n\t/*try{\n\t WebDriverWait wait = new WebDriverWait(getDriver(), timeout);\n\t wait.until(ExpectedConditions.visibilityOf(elementName));\n\t return true;\n\t}catch(Exception e){\n\t return false;\n\t}*/\n try{\n int counter = 0;\n while(counter < timeout){\n Thread.sleep(1000);\n counter++;\n try{\n if(elementName.isDisplayed()){\n //if(ExpectedConditions.visibilityOf(elementName) !=null ){\n return true;\n }else{\n continue;\n }\n }catch(Exception e){\n continue;\n }\n }\n System.out.println(\"ELEMENT NOT FOUND - \" + elementName + \" AFTER \" + timeout );\n return false;\n }catch(Exception e){\n return false;\n }\n }", "public boolean isElementDisplayed(By locator) {\n\t\ttry {\n\t\t\tfindElement(locator);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isDisplayed();", "public static void verifyElementIsDisplayed(MobileElement mobileElement, String expectedText) {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n WebDriverWait wait = new WebDriverWait(driver, 25);\n wait.until(ExpectedConditions.visibilityOf(mobileElement));\n if (mobileElement.isDisplayed())\n ReportHelper.logReportStatus(LogStatus.PASS, \"The text \" + expectedText + \" is displayed\");\n else\n ReportHelper.logReportStatus(LogStatus.FAIL, \"The element \" + expectedText + \" is not displayed\");\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"The element \" + expectedText + \" is not displayed\");\n\n }\n }", "public static boolean displayed(WebElement element){\n waitForVisibility(element);\n return element.isDisplayed();\n }", "public static void isElementDisplayed(WebElement element) {\n \tboolean elementDisplayed= element.isDisplayed();\n \t\n \tif(elementDisplayed) {\n \t\tSystem.out.println(element+\" \"+\"object is Displayed\");\n \t}\n \telse {\n \t\tSystem.out.println(element+\" \"+\"object is not Displayed\");\n \t}\n }", "public String isWebElementDisplayed(String object, String data) {\n\t\tlogger.debug(\"Entered into isWebElementDisplayed\");\n\n\t\ttry {\n\t\t\tboolean element = false;\n\t\t\tint size = explictWaitForElementSize(object);\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tlogger.debug(size + \" no of objects found\");\n\t\t\tif (size >= 1) {\n\t\t\t\telement = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).isDisplayed();\n\t\t\t\tlogger.debug(\"element is displayed \");\n\t\t\t\tif (element) {\n\t\t\t\t\tlogger.debug(\"element present..\" + element);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" -- element is being displayed\";\n\t\t\t\t} else\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- element present but is hidden \";\n\n\t\t\t} else\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" element not present\";\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}", "public boolean elementIsDisplayed(By locator){\n \twaitForElementPresent(locator);\n \treturn getElement(locator).isDisplayed();\n }", "public ChosenItemPage rememberElementAndFindIt(){\n showxButton.click(); //делает выпадющее меню количества выбора показываемых товаров\n waitVisibilityOf(showx12Button); \n showx12Button.click(); //выбираем показывать по 12\n WebElement firstItem=results.get(0);\n waitVisibilityOf(firstItem);\n String name=firstItem.getText(); //name of the product in the first item\n\n Assert.assertEquals(\"Показывать по 12 не установлено\",\n \"Показывать по 12\", showx.getText());\n\n Stash.put(Stash.firstItemName, name); //remeber first item\n fillField(name,headerSearch);\n headerSearch.sendKeys(Keys.ENTER);\n return new ChosenItemPage();\n }", "public void assertVisible(final String elementLocator);", "public boolean isVisible(final String elementLocator);", "public static void isEleDisplayed(WebElement element, AndroidDriver driver, String elementName) throws IOException {\n\t\ttry {\n\t\t\tlogger.info(\"---------Verifying element is displayed or not ---------\");\n\n\t\t\tWait<AndroidDriver> wait = new FluentWait<AndroidDriver>(driver).withTimeout(1, TimeUnit.MINUTES)\n\t\t\t\t\t.pollingEvery(250, TimeUnit.MICROSECONDS).ignoring(NoSuchElementException.class);\n\t\t\tif (element.isDisplayed()) {\n\t\t\t\tSystem.out.println(elementName + \"------ is displayed\");\n\t\t\t\tMyExtentListners.test.pass(\"Verify \" + \"\\'\" + elementName + \"\\'\" + \" is displayed || \" + \"\\'\"\n\t\t\t\t\t\t+ elementName + \"\\'\" + \" is displayed \");\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + \"\\'\" + elementName + \"\\'\"\n\t\t\t\t\t+ \" is displayed || \" + \"\\'\" + elementName + \"\\'\" + \" is not displayed \", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tSystem.out.println(elementName + \"------ is not displayed\");\n\t\t\tthrow e;\n\t\t}\n\t}", "public static boolean waitForElement(WebDriver driver, WebElement element) {\r\n boolean statusOfElementToBeReturned = false;\r\n WebDriverWait wait = new WebDriverWait(driver, flipKartMaxElementWait);\r\n try {\r\n WebElement waitElement = wait.until(ExpectedConditions.visibilityOf(element));\r\n if (waitElement.isDisplayed() && waitElement.isEnabled()) {\r\n statusOfElementToBeReturned = true;\r\n }\r\n } catch (Exception ex) {\r\n \tSystem.out.println(\"Unable to find a element\" + ex.getMessage());\r\n }\r\n\t\treturn statusOfElementToBeReturned;\r\n }", "public static boolean isDisplayed(final WebElement element) {\n try {\n defaultWait.until(ExpectedConditions.visibilityOf(element));\n return true;\n } catch (Exception exception) {\n Log.info(\"Element not displayed on UI :\" + element.toString() + \" \" + exception.getMessage());\n return false;\n }\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 static boolean elementIsDisplayed(String targetxpath){\n WebDriverWait wait = new WebDriverWait(drv, 5);\n return wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(targetxpath))).isDisplayed();\n }", "public boolean isElementPresent(WebElement element) {\n try{\n return element.isDisplayed();\n }catch (RuntimeException e){\n return false;\n }\n }", "protected boolean isElementDisplayed(By locator){\n \tboolean displayed;\n \ttry {\n \t\tdisplayed = new WebDriverWait(DRIVER, 10)\n \t\t.until(ExpectedConditions.presenceOfElementLocated(locator)).isDisplayed();\n \t}catch (TimeoutException e){\n \t displayed = false;\t\n \t}\n\n \treturn displayed; \n }", "public WebElement element(String strElement) throws Exception {\n String locator = prop.getProperty(strElement); \n // extract the locator type and value from the object\n String locatorType = locator.split(\";\")[0];\n String locatorValue = locator.split(\";\")[1];\n // System.out.println(By.xpath(\"AppLogo\"));\n \n // for testing and debugging purposes\n System.out.println(\"Retrieving object of type '\" + locatorType + \"' and value '\" + locatorValue + \"' from the Object Repository\");\n \n // wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//input[@id='text3']\")));\n try {\n\n\n \tif(locatorType.equalsIgnoreCase(\"Id\"))\n \t\treturn driver.findElement(By.id(locatorValue)); \n \telse if(locatorType.equalsIgnoreCase(\"Xpath\")) \n \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}catch(Exception e) {\n// \t\t\tdriver.navigate().refresh();\n//\n// \t\t\t@SuppressWarnings({ \"unchecked\", \"deprecation\", \"rawtypes\" })\n// \t\t\tWait<WebDriver> wait = new FluentWait(driver) \n// \t\t\t.withTimeout(8, TimeUnit.SECONDS) \n// \t\t\t.pollingEvery(1, TimeUnit.SECONDS) \n// \t\t\t.ignoring(NoSuchElementException.class);\n// \t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locatorValue))));\n// \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}\n \n \n \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n\n \n } catch (NoSuchElementException | StaleElementReferenceException e) {\n \t\t\n if(locatorType.equalsIgnoreCase(\"Id\"))\n return driver.findElement(By.id(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Xpath\")) \n return driver.findElement(By.xpath(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n }\n throw new NoSuchElementException(\"Unknown locator type '\" + locatorType + \"'\"); \n \t}", "public boolean isElementPresent(WebElement element) {\n wait.until(ExpectedConditions.elementToBeClickable(element));\n// wait.until(ExpectedConditions.visibilityOf(element));\n return element.isDisplayed();\n }", "public static void VerifySum()\r\n\t {\r\n\t WebElement BagSum = Browser.instance.findElement(BagValueSum);\r\n\t\r\n\t if(BagSum.getAttribute(\"value\").equals(output))\r\n\t {\r\n\t\tSystem.out.println(\"Bag Value Sum is Matching\"); \r\n\t } \r\n\t else\r\n\t {\r\n\t\t System.out.println(\"Bag Value Sum is not matching\");\r\n\t }\r\n\r\n\t\tWebDriverWait wait=new WebDriverWait(Browser.instance,10);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(cancelButton));\r\n\t\tBrowser.instance.findElement(cancelButton).click();\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(confirmYesButton));\r\n\t\tBrowser.instance.findElement(confirmYesButton).click();\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n\r\n}", "public WebElement waitForDisplay(final WebElement webelement)\n {\n return waitForDisplay(webelement, DEFAULT_TIMEOUT);\n }", "@Override\r\n public Element findElement()\r\n {\n return null;\r\n }", "public static WebElement displayedElement(List<WebElement> elements){\n\t\n\t\t\n\t\tfor (WebElement element:elements)\n\t {\n\t if (element.isDisplayed()) // correct method: isDisplayed()\n\t return element;\n\t }\n\t\treturn null;\n\t}", "public static boolean verifyVisibilityOfElement(WebElement element) {\n\t\ttry {\n\n\t\t\tif (element.isDisplayed())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isContentDisplayed();", "private static boolean isElementPresentAndDisplay(WebDriver driver, By by) {\n\t\ttry {\n\t\t\treturn driver.findElement(by).isDisplayed();\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean waitForVisibility(By targetElement) {\n try {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.visibilityOfElementLocated(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception Occurred while waiting for visibility of element with definition :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }", "public void checkVisibility(WebElement element) {\n wait = new WebDriverWait(driver, 15, 50);\n wait.until(ExpectedConditions.visibilityOf(element));\n }", "@Override\n public boolean isVisible(){\n \n try\t{\n new WebDriverWait(driver, 1)\n .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.visibilityOfElementLocated(locator));\n \n return true;\n }\n catch (NoSuchElementException ex){\n return false;\n }\n catch (TimeoutException ex){\n return false;\n }\n \n }", "public WebElement userLoginDiv() {\r\n return driver.findElement(By.id(\"block-system-main\"));\r\n\r\n}", "public static boolean isDisplayed(WebElement element) {\r\n\t\tboolean isElDisplayed = false;\r\n\t\ttry {\r\n\r\n\t\t\tif (element.isDisplayed()) {\r\n\t\t\t\tisElDisplayed = true;\r\n\t\t\t}\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.assertTrue(false, \"WebElement not found \" + e);\r\n\t\t}\r\n\r\n\t\treturn isElDisplayed;\r\n\t}", "Object getComponent(WebElement element);", "public boolean elementIsVisible(WebElement element) {\n\t\ttry {\n\t\t\tif (element.isDisplayed())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public void ValidateProductSearchIsSuccessfull(){\n\t if (driver.findElement(search_refinement_categories_segment).isDisplayed()){\n\t Assert.assertTrue(true);\n\t logger.info(\"Search Page is displayed because refinement category is displayed\");\n\t }\n\t else{\n\t logger.fatal(\"Search Page is not displayed because refinement category is not displayed\");\n\t Assert.fail(\"Search Page is not displayed because refinement category is not displayed\");\n\t }\n\t }", "boolean hasElement();", "Element getElement();", "public void assertElementPresent(final String elementLocator);", "public static boolean is_displayed(By locator) throws CheetahException {\n\t\tboolean displayed = false;\n\t\ttry {\n\t\t\twait_for_element(locator);\n\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\n\t\t\tif (element.isDisplayed()) {\n\t\t\t\tdriverUtils.highlightElement(element);\n\t\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\t\tdisplayed = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t\treturn displayed;\n\t}", "public WebElement waitForDisplay(final WebElement webElement, int timeoutInSeconds)\n {\n WebDriverWait myWait = new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS);\n return myWait.ignoring(StaleElementReferenceException.class)\n .until(ExpectedConditions.visibilityOf(webElement));\n }", "public void elementToBeVisible(WebElement element) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 120);\n\t\t\twait.until(ExpectedConditions.visibilityOf (element));\n\t\t} catch (StaleElementReferenceException ex) {\n\t\t\tSystem.out.println(\"Stale Element exception:\" + ex.toString());\n\t\t\tAssert.fail(\"Stale Element exception:\" + ex.toString());\n\t\t} catch (NoSuchElementException ex) {\n\t\t\tSystem.out.println(\"No such element exception:\" + ex.toString());\n\t\t\tAssert.fail(\"No such element exception:\" + ex.toString());\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Exception in elementToBeVisible method:\" + ex.toString());\n\t\t\tAssert.fail(\"Exception in elementToBeVisible method:\" + ex.toString());\n\t\t}\n\t}", "private boolean isElementPresent(By cssSelector) {\n\treturn false;\n}", "public void verify_AddSubCategoriesPage_DisplayedElements() {\n\n\t\tboolean bstatus;\n\n\t\tbstatus = isElementDisplayed(select_mainCategory, true);\n\t\tReporter.log(bstatus, \"Main Category drop displayed \", \"Main Category drop down not displayed\");\n\n\t\tbstatus = isElementDisplayed(edit_SubCategory, true);\n\t\tReporter.log(bstatus, \"Sub Category text field displayed\", \"Sub Category text field not displayed\");\n\n\t\tbstatus = isElementDisplayed(select_AssignedOrder, true);\n\t\tReporter.log(bstatus, \"Assigned order drop down displayed\", \"Assigned order drop down not displayed\");\n\n\t\tbstatus = isElementDisplayed(btn_Submit, true);\n\t\tReporter.log(bstatus, \"Submit button displayed\", \"Submit button not displayed\");\n\n\t}", "public Boolean isElementPresent(WebElement element) {\r\n\t\ttry {\r\n\t\t\twaitForElementVisible(element);\r\n\t\t\telement.isDisplayed();\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public String isWebElementNotDisplayed(String object, String data) {\n\t\tlogger.debug(\"Entered into isWebElementDisplayed\");\n\n\t\ttry {\n\t\t\tboolean element = false;\n\t\t\tint size = explictWaitForElementSize(object);\n\t\t\t//waitForPageLoad(driver);\n\t\t\tlogger.debug(size + \" no of objects found\");\n\t\t\tif (size >= 1) {\n\t\t\t\telement =explictWaitForElementUsingFluent(object).isDisplayed();\n\t\t\t\tlogger.debug(\"element is displayed \");\n\t\t\t\tif (element) {\n\t\t\t\t\tlogger.debug(\"element present..\" + element);\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- element is being displayed which is not expected\";\n\t\t\t\t} else\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" -- element present but is hidden \";\n\n\t\t\t} else\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" element not present\";\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}", "public WebElement checkVisibilityOf(final WebElement element) {\n return (new WebDriverWait(webDriver, WAIT_TIME)).until(ExpectedConditions.visibilityOf(element));\n }", "public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}", "public boolean isElementPresent(final String elementLocator);", "public static String verifyElements() throws SQLException, InterruptedException, IOException\n\t{\n\n\t\tAPPLICATION_LOGS.debug(\"Executing test case : Verifying all the attributes of the Login Page\");\n\t\tFacebookLibrary.navigate();\n\t\t// Verify whether Username input-box, Password input-box and SignIn button present on the page or not\n\t\tBoolean usernameFieldPresent=FunctionLibrary.isElementPresent(locatorUserNameInputBox, nameUserNameInputBox);\n\t\tBoolean passwdFieldPresent=FunctionLibrary.isElementPresent(locatorPasswordInputBox, namePasswordInputBox);\n\t\tBoolean signInButtonPresent=FunctionLibrary.isElementPresent(locatorLogInButton, nameLogInButton);\n\n\t\tif(!usernameFieldPresent && !passwdFieldPresent && !signInButtonPresent )\n\t\t{\n\t\t\treturn \"Fail : Username Field or Password Field or SignIn button is not present on the page \";\n\t\t}\n\t\treturn \"Pass: All elements are present in the Login Page\";\n\n\n\t}", "public boolean emailisdisplayed() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tflag = element.isDisplayed();\r\n\t\t\t\tAssert.assertTrue(flag, \"Email is is not dispalyed and enabled\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Email Id NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn flag;\r\n\t\t\t\r\n\t\t}", "public String isElementPresent(String object, String data) {\n\t\tlogger.debug(\"Entered into isElementPresent()\");\n\t\ttry {\n\t\t\tboolean element = false;\n\t\t\tint size = explictWaitForElementSize(object);\n\n\t\t\tif (size >= 1) {\n\n\t\t\t\telement =explictWaitForElementUsingFluent(object).isDisplayed();\n\t\t\t\tlogger.debug(\"element \" + element);\n\t\t\t\tif (element == true) {\n\t\t\t\t\tlogger.debug(\"element present..\" + element);\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- element present which is not expected \";\n\t\t\t\t} else\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" -- element not present \";\n\n\t\t\t} else\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--element not present\";\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}", "public static boolean isEleDisplayed(WebElement element, AndroidDriver driver, int seconds, int loop)\n\t\t\tthrows IOException, InterruptedException {\n\n\t\tboolean flag = false;\n\n\t\tint count = loop;\n\t\twhile (count > 0) {\n\t\t\ttry {\n\t\t\t\tlogger.info(\"---------Verifying element is displayed or not ---------\");\n\t\t\t\tcount--;\n\t\t\t\telement.isDisplayed();\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\n\t\t\t} catch (RuntimeException e) {\n\t\t\t\tThread.sleep(seconds * 1000);\n\t\t\t\tflag = false;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}", "public boolean isVisible() {\n\t\treturn element.isDisplayed();\n\t}", "@Test\n public void BalanceIsShown() {\n onView(withId(R.id.balanceText)).check(matches(isDisplayed()));\n onView(withId(R.id.balanceField)).check(matches(isDisplayed()));\n }", "public void waitElementToBeVisible(WebElement webElement) {\n wait.until(ExpectedConditions.visibilityOf(webElement));\n }", "public static boolean isElementDisplayed(By locator) {\n\t\ttry\n\t\t{\n\t\t\tSeleniumDriverManager.getManager().getDriver().manage().timeouts()\n\t\t\t.implicitlyWait(IMPLICIT_WAIT/5, TimeUnit.SECONDS);\n\t\t\tSeleniumDriverManager.getManager().getDriver().findElement(locator);\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tSeleniumDriverManager.getManager().getDriver().manage().timeouts()\n\t\t\t.implicitlyWait(IMPLICIT_WAIT, TimeUnit.SECONDS);\n\t\t}\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}", "@Test\r\n public void findShadowDOMWithSeleniumFindElement () {\n WebElement shadowHost = driver.findElement(By.tagName(\"book-app\"));\r\n\r\n // #2 Execute JavaScript To Return The Shadow Root\r\n JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;\r\n WebElement shadowRoot = (WebElement) jsExecutor.executeScript(\r\n \"return arguments[0].shadowRoot\", shadowHost);\r\n\r\n // #3 Find The WebElement Then Perform An Action On The WebElement\r\n WebElement app_header = shadowRoot.findElement(By.tagName(\"app-header\"));\r\n WebElement app_toolbar\r\n = app_header.findElement(By.cssSelector(\".toolbar-bottom\"));\r\n WebElement book_input_decorator\r\n = app_toolbar.findElement(By.tagName(\"book-input-decorator\"));\r\n WebElement searchField = book_input_decorator.findElement(By.id(\"input\"));\r\n searchField.sendKeys(\"Shadow DOM With Find Element\");\r\n }", "boolean isTooltipPresent(WebElement field){\n actions.moveToElement(field).build().perform();\n String tooltipId = field.getAttribute(\"aria-describedby\");\n if (tooltipId!=null)\n return true;\n else\n return false;\n /*\n By tooltipLocator = By.className(\"ui-tooltip-content\");\n List <WebElement> tooltipList = driver.findElements(tooltipLocator);\n if (!tooltipList.isEmpty())\n return true;\n else return false;\n */\n }", "public boolean Exist(WebElement element)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn element.isDisplayed();\n\t\t}\n\t\tcatch (NoSuchElementException e)\n\t\t{\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean checkIfElementsArePresentAndDisplayed(By locator) {\n boolean isDisplayed = true;\n List<WebElement> listOfElements = findListOfElements(locator);\n if (listOfElements != null && !listOfElements.isEmpty()) {\n for (WebElement element : listOfElements) {\n if (element.getSize() == null && !element.isDisplayed()) {\n isDisplayed = false;\n }\n }\n }\n return isDisplayed;\n }", "public void waitForElementToVisisble(WebElement elementToCheck){\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.visibilityOf(elementToCheck));\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tLog.error(\"Element not visible\");\n\t\t}\n\t}", "public WebElement textboxABNegGroupBPooledRh()\r\n\t{\r\n\t\telement = driver.findElement(By.id(\"d8302171783270p4294967382\"));\r\n\t\treturn element;\r\n\t}", "@Test(priority =1)\r\n\tpublic void button() {\r\n button = driver.findElement(By.cssSelector(\"button.black\"));\r\n assertFalse(button.isDisplayed());\r\n //sf.assertFalse(button.isDisplayed());\r\n System.out.println(\"Print this\");\r\n\t}", "@Test(priority=13)\n\tpublic void verifySearchIconIsDisplayingOnHeader() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.SearchIconOnHeader);\n Assert.assertTrue(verifyElementPresent(overviewPage.SearchIconOnHeader), \"Search icon is not displaying on header\");\n\t}", "public boolean veirfyUserOnSummerDressesPage(){\n WebElement page = driver.findElement(By.cssSelector(\"div[class='cat_desc']\"));\n boolean pageStatus = page.isDisplayed();\n return pageStatus;\n }", "private WebElement getXpath(String xpathInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.xpath(xpathInfo)));\n\t\treturn element;\n\t}", "@Test\n\tpublic void TC_01_Web_Element() {\n\t\tdriver.findElement(By.id(\"\")); //**\n\t\t\n\t\t//Tim nhieu element\n\t\tdriver.findElements(By.id(\"\"));//**\n\t\t\n\t\t//If chi thao tac vs element 1 lan thi ko can khai bao bien\n\t\tdriver.findElement(By.id(\"small-searchterms\")).sendKeys(\"Apple\");//**\n\t\t\n\t\t//If can thao tac element nhieu lan thi nen khai bao bien\n\t\tWebElement searchTextbox = driver.findElement(By.id(\"small-searchterms\"));\n\t\tsearchTextbox.clear();//**\n\t\tsearchTextbox.sendKeys(\"Apple\");\n\t\tsearchTextbox.getAttribute(\"value\");//**\n\t\t\n\t\t//driver.findElement(By.id(\"small-searchterms\")).clear();\n\t\t//driver.findElement(By.id(\"small-searchterms\")).sendKeys(\"Apple\");\n\t\t//driver.findElement(By.id(\"small-searchterms\")).getAttribute(\"value\");\n\t\t\n\t\t//Count co bao nhieu element thoa dieu kien\n\t\t//Verify so luong element tra ve nhu mong doi\n\t\t//Thao tac vs all cac loai element giong nhau trong 1 page (checkbox/textbox)\n\t\tList<WebElement> checkboxes = driver.findElements(By.xpath(\"//div[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\t\n\t\t//Lay ra so luong\n\t\tAssert.assertEquals(checkboxes.size(), 6);\n\t\t\n\t\tWebElement singleElement = driver.findElement(By.className(\"\"));\n\t\t\n\t\t//Textbox TextArea/ Edittable dropdown\n\t\t//Du lieu duoc toan ven\n\t\tsearchTextbox.clear();\n\t\tsearchTextbox.sendKeys(\"\");\n\t\t\n\t\t//Button/Link/radio/checkbox/custom dropdown/..\n\t\tsingleElement.click();//**\n\t\t\n\t\t//Cac ham co tien to bat dau bang get lun lun tra ve du lieu \n\t\t//getTitle/ getCurrentUrl/ getPageSource/ getAttribute/ getCssValue/ getText/ get...\n\t\tsingleElement = driver.findElement(By.xpath(\"//input[@id='Firstname']\"));\n\t\tsingleElement.getAttribute(\"\");\n\t\t\n\t\t//Automation\n\t\tsingleElement = driver.findElement(By.xpath(\"//input[@id='small-searchterms']\"));\n\t\tsingleElement.getAttribute(\"placeholder\");\n\t\t//Search store\n\t\t\n\t\t//Lay ra gia tri cua cac thuoc tinh css thuong dung de test GUI\n\t\t//Font/Size/Color/Background/...\n\t\tsingleElement = driver.findElement(By.cssSelector(\"search-box-button\"));\n\t\tsingleElement.getCssValue(\"background-color\");//*\n\t\t//#4ab2f1\n\t\tsingleElement.getCssValue(\"text-transform\");\n\t\t//uppercase\n\t\t\n\t\t//Lay ra toa do element so voi page hien tai (get gox ben ngoai)\n\t\tsingleElement.getLocation();\n\t\t\n\t\t//lay ra kich thuoc cua element (rong x cao) -> get goc ben trong element\n\t\tsingleElement.getSize();\n\t\t\n\t\t//Location + size\n\t\tsingleElement.getRect();\n\t\t\n\t\t//Chup hinh loi => dua vao html export\n\t\tsingleElement.getScreenshotAs(OutputType.FILE);//*\n\t\t\n\t\t\n\t\t//id/class/css/name...//tu 1 element ko bik tagname -> lay ra duoc tagname truyen vao cho 1 locator khac\n\t\tsingleElement = driver.findElement(By.xpath(\"//div[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\tString searchButtonTagname = singleElement.getTagName();//*\n\t\t\n\t\tsearchTextbox = driver.findElement(By.xpath(\"//\" + searchButtonTagname + \"[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\t//input\n\t\t\n\t\t//xpath\n\t\t//tagname[@attribute='value']\n\t\t\n\t\t\n\t\t//lay ra text element (header/link/message/...)\n\t\tsingleElement.getText();//**\n\t\t\n\t\t//Cac ham co tien to la isXXX thi tra ve kieu Boolean (100%)\n\t\t//true/false\n\t\t\n\t\t//kiem tra xem 1 element la hien thi cho nguoi dung thao tac hay ko\n\t\t//true: dang hien thi\n\t\t//false: ko hien thi\n\t\tsingleElement.isDisplayed();//**\n\t\t\n\t\t//kiem tra xem 1 element la disable hay ko\n\t\t//disable: user ko thao tac duoc\n\t\t//true: ko thao tac duoc\n\t\t//false: co the thao tac\n\t\tsingleElement.isEnabled();//*\n\t\t\n\t\t//kiem tra xem 1 element da duoc chon roi hay chua\n\t\t//checkbox/ radio/ dropdown\n\t\t//true: da chon roi\n\t\t//false: chua duoc chon\n\t\tsingleElement.isSelected();//*\n\t\t\n\t\t//no thay cho hanh vi ENTER vao textbox/button\n\t\t//chi dung duoc trong form (Login/search/register/...)\n\t\tsingleElement.submit();\n\t\t\n\t\tsingleElement = driver.findElement(By.id(\"small-searchterms\"));\n\t\tsingleElement.sendKeys(\"Apple\");\n\t\tsingleElement.submit();\n\t\t\n\t\t\n\t\t\n\t}", "@Then(\"search results are displayed\")\n\tpublic void search_results_are_displayed() throws Exception {\n\t\t//Waits for the result page to load\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\n\t\t//Saves all results that match our book ID\n\t\tWebDriverWait wait = new WebDriverWait(driver, 20);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath(resultsPage)));\n\t\tList<WebElement> results = driver.findElements(By.xpath(resultsPage));\n\n\t\t//Verifies that my book id is really among the results\n\n\t\tif(results.size() > 1) {\n\t\t\tfor(int i = 0; i < results.size(); ++i) {\n\t\t\t\tproduto = results.get(i).getAttribute(\"data-product\");\n\t\t\t\tif (produto.contains(id)) {\n\t\t\t\t\tSystem.out.println(\"\\nA busca encontrou o meu livro!\");\n\t\t\t\t\tSystem.out.println(id);\n\t\t\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(\"Livro não encontrado!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"\\nNenhum resultado encontrado!\\n\");\n\t\t\t}\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\n\t\t}", "public void waitForVisibilityOfWebElement(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.visibilityOf(webElement));\r\n\t}", "public Boolean waitUntilElementAppears(WebDriver driver, final String xpath) throws NumberFormatException, IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\ttry {\n\t\t\t\t\tExpectedCondition<Boolean> e = new ExpectedCondition<Boolean>() {\n\t\t\t\t public Boolean apply(WebDriver driver) {\t\t\t\t \t\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() == 0);\n\t\t\t\t }\n\t\t\t\t };\n\t\t\t\t wait.until(e);}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) { fileWriterPrinter(\"\\nElement not found!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for Element appearence: \" + waitTimeConroller(start, 30, xpath) + \" sec\");\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() == 0);\n\t\t\t\t}", "public static WebElement informationUpdatedDialog_txt(WebDriver driver){\t\t\t\t\t\t\t\n\t\telement = driver.findElement(By.id(\"divMessageOK\"));\t\t\t\t\t\t\n\t\treturn element;\t\t\t\t\t\t\n\t}", "@Then(\"^I see Product name displayed$\")\n public void i_see_Product_name_displayed() throws Throwable {\n \t driver.findElement(By.linkText(\"Product Name+\")).isDisplayed();\n \n }", "private void waitForElementToBeLoad(String string) {\n\t\n}", "@Then(\"user verifies that {string} message is displayed\")\n public void user_verifies_that_message_is_displayed(String expectedWarningMessage) {\n\n String actualWarningMessage = loginPage.getWarningMessageText();\n Assert.assertEquals(expectedWarningMessage,actualWarningMessage);\n // Assert.assertTrue(loginPage.warningMessage.isDisplayed()); //if the webelement is setted as public\n\n\n\n }", "protected WebElement findWebElement (By webElementSelector){\n\t\ttry {\n\t\t\treturn webDriver.findElement(webElementSelector);\t\n\t\t} catch (NoSuchElementException noSuchElement) {\n\t\t\tthrow new AssertionError(\"Cannot find the web element with selector \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "public String waitForElementVisibility(String object, String data) {\n logger.debug(\"Waiting for an element to be visible\");\n int start = 0;\n int time = (int) Double.parseDouble(data);\n try {\n while (true) {\n if(start!=time)\n {\n if (driver.findElements(By.xpath(OR.getProperty(object))).size() == 0) {\n Thread.sleep(1000L);\n start++;\n }\n else {\n break; }\n }else {\n break; } \n }\n } catch (Exception e) {\n return Constants.KEYWORD_FAIL + \"Unable to close browser. Check if its open\" + e.getMessage();\n }\n return Constants.KEYWORD_PASS;\n }", "private WebElement getid(String idInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.id(idInfo)));\n\t\treturn element;\n\t}", "@Override\npublic void findElement(String by) {\n\t\n}", "public void verifyAssetsAreDisplayedInTheCompletedList(String asset) {\n\t\tWebElement completeAsset =driver.findElement(By.xpath(\"//span[text()='Completed']/../../div/span[text()='\"+asset+\"']\"));\n\t\tmoveToElement(completeAsset);\n\t\tAssert.assertTrue(completeAsset.isDisplayed());\n \treportInfo();\n\n\t}", "public static WebElement waitForElementToBeVisible(By locator, int timeOut){\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeOut);\n\t\treturn wait.until(ExpectedConditions.visibilityOf(getElement(locator)));\n\n\t}", "public boolean waitForVisibilityOfElement(By locator) {\r\n\t\ttry {\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\r\n\t\t\treturn true;\r\n\t\t} catch (ElementNotVisibleException e) {\r\n\t\t\tSystem.out.println(\"ElementNotVisibleException\" + e.getMessage());\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "Object element();", "Object element();", "String getElem();", "public static boolean isDisplayed(WebElement element) {\n\t\tboolean displayed = element.isDisplayed();\n\t\treturn displayed;\n\n\t}", "public void verifyGeneralTrainingIsDisplayed() {\n\t\t moveToElement(generalTraining);\n Assert.assertTrue(generalTraining.isDisplayed());\t\n reportInfo();\n\t }", "public Boolean isElementPresent(By targetElement) throws Exception {\n try {\n info(\"Verifying Element Present By :: \" + targetElement);\n Boolean isPresent = getDriver().findElements(targetElement).size() > 0;\n return isPresent;\n } catch (Exception e) {\n error(\"Exception Occurred in while checking for element's presence :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new Exception(Throwables.getStackTraceAsString(e));\n }\n }", "@Override\n public boolean isPresent(long seconds){\n if (seconds < 0) {\n return false;\n }\n try\t{\n WebElement element = (WebElement) (new WebDriverWait(driver, seconds))\n .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.presenceOfElementLocated(locator));\n this.element = element;\n return true;\n }\n catch (NoSuchElementException ex){\n this.noSuchElementException = new NoSuchElementException(locator.toString());;\n return false;\n }\n catch (TimeoutException ex){\n this.noSuchElementException = new NoSuchElementException(locator.toString());\n return false;\n }\n }", "public void verifyQuickNavigatorIsDisplayed() {\n\t\tmoveToElement(burgerButton);\n\t\tAssert.assertTrue(isElementPresent(burgerButton));\n\t\treportInfo();\n\t\t}" ]
[ "0.68481094", "0.6807739", "0.67868286", "0.67065394", "0.6548599", "0.6512935", "0.65061057", "0.6439857", "0.64022297", "0.6392444", "0.6343488", "0.6327336", "0.6317484", "0.6298903", "0.6265613", "0.6262495", "0.62545776", "0.6219663", "0.62189823", "0.6165913", "0.6151887", "0.61292017", "0.6118367", "0.61138326", "0.6113711", "0.6095602", "0.6091912", "0.6072667", "0.6072663", "0.6067113", "0.60194194", "0.6009599", "0.6004937", "0.6003736", "0.5993865", "0.5992331", "0.5964472", "0.59069854", "0.59017426", "0.58991045", "0.5897082", "0.5893351", "0.587031", "0.58535033", "0.58414", "0.58366984", "0.5831527", "0.5815633", "0.58078796", "0.5800711", "0.57972765", "0.5793758", "0.5792609", "0.578008", "0.57717484", "0.5767087", "0.57634306", "0.57513", "0.5742229", "0.5735461", "0.5734807", "0.5732449", "0.57311887", "0.572276", "0.57057524", "0.5688489", "0.5679212", "0.5677268", "0.5672731", "0.5669582", "0.56689686", "0.5663246", "0.56490684", "0.5641889", "0.56403995", "0.5636662", "0.56362873", "0.56239295", "0.56182915", "0.56170166", "0.56152475", "0.5609532", "0.55968684", "0.5596634", "0.5584443", "0.55810463", "0.5576934", "0.55739194", "0.5560115", "0.55555815", "0.5552145", "0.55506986", "0.55477834", "0.5546534", "0.5546534", "0.5545408", "0.5542897", "0.55428445", "0.554247", "0.5533769", "0.55318165" ]
0.0
-1
/ Method for finding Fields and Highlight them before enter a value
public static WebElement findFieldAndSentKeys(WebElement element, String value) { element.isDisplayed(); HighLightElement(element); element.sendKeys(value); Reporter.log(" Enter value : " + value); return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }", "public void addToHighlightedFields(XmlNode xmlNode) {\n\t\t\n\t\t// if empty, just add\n\t\tif (highlightedFields.size() == 0) {\n\t\t\thighlightedFields.add(xmlNode);\n\t\t\txmlNode.setHighlighted(true);\n\t\t}\n\t\t\n\t\t// need to highlight all fields between currently selected fields and newly selected field\n\t\telse {\n\t\t\tint siblingIndex = xmlNode.getMyIndexWithinSiblings();\n\t\t\t\n\t\t\t// get the max and min indexes of highlighted fields\n\t\t\tint highlightedIndexMax = highlightedFields.get(0).getMyIndexWithinSiblings();\n\t\t\tint highlightedIndexMin = highlightedFields.get(0).getMyIndexWithinSiblings();\n\t\t\tfor (XmlNode highlightedField: highlightedFields) {\n\t\t\t\tint index = highlightedField.getMyIndexWithinSiblings();\n\t\t\t\tif (index > highlightedIndexMax) highlightedIndexMax = index;\n\t\t\t\tif (index < highlightedIndexMin) highlightedIndexMin = index;\n\t\t\t}\n\t\t\t\n\t\t\tXmlNode parentNode = xmlNode.getParentNode();\n\t\t\t\n\t\t\t// if so, add at end of list or at the start\n\t\t\tif (siblingIndex > highlightedIndexMax) {\n\t\t\t\tfor (int i=highlightedIndexMax +1; i<siblingIndex + 1 ; i++) {\n\t\t\t\t\tXmlNode siblingDataFieldNode = parentNode.getChild(i);\n\t\t\t\t\thighlightedFields.add(siblingDataFieldNode);\n\t\t\t\t\tsiblingDataFieldNode.setHighlighted(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (siblingIndex < highlightedIndexMin) {\n\t\t\t\tfor (int i=highlightedIndexMin -1; i>siblingIndex - 1 ; i--) {\n\t\t\t\t\tXmlNode siblingDataFieldNode = parentNode.getChild(i);\n\t\t\t\t\thighlightedFields.add(0, siblingDataFieldNode);\n\t\t\t\t\tsiblingDataFieldNode.setHighlighted(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void setHighlightedFields(SearchResponse<T, P> response, final QueryResponse solrResponse) {\n if ((hlFieldPropertyPropertiesMap != null) && (solrResponse.getHighlighting() != null) && !solrResponse\n .getHighlighting().isEmpty()) {\n for (String docId : solrResponse.getHighlighting().keySet()) {\n setHighlightedFieldValues(response, solrResponse, docId);\n }\n }\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value4.getSelectionStart();\r\n int aend = value4.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value4.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value4.setSelection(astart - 1, aend - 1);\r\n } else\r\n value4.setSelection(astart, aend);\r\n\r\n if (value4.getText().length() > 0 && value4.getText().length() < 2) {\r\n value4.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value4Enable = false;\r\n } else {\r\n value4.setTextColor(0xff000000); //BLACK color\r\n Value4Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "private void setHighlightedFieldValues(SearchResponse<T, P> response, final QueryResponse solrResponse,\n String docId) {\n T bean = getByKey(response, docId);\n if (bean != null) {\n Map<String, List<String>> docHighlights = solrResponse.getHighlighting().get(docId);\n for (String solrField : hlFieldPropertyPropertiesMap.keySet()) {\n if (docHighlights.containsKey(solrField)) {\n for (String hlValue : docHighlights.get(solrField)) { // get each snippet\n setHighlightedFieldValue(bean, solrField, hlValue);\n }\n }\n }\n }\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value3.getSelectionStart();\r\n int aend = value3.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value3.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value3.setSelection(astart - 1, aend - 1);\r\n } else\r\n value3.setSelection(astart, aend);\r\n\r\n if (value3.getText().length() > 0 && value3.getText().length() < 2) {\r\n value3.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value3Enable = false;\r\n } else {\r\n value3.setTextColor(0xff000000); //BLACK color\r\n Value3Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value1.getSelectionStart();\r\n int aend = value1.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value1.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value1.setSelection(astart - 1, aend - 1);\r\n } else\r\n value1.setSelection(astart, aend);\r\n\r\n if (value1.getText().length() > 0 && value1.getText().length() < 2) {\r\n value1.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value1Enable = false;\r\n } else {\r\n value1.setTextColor(0xff000000); //BLACK color\r\n Value1Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n\r\n }\r\n\r\n }", "private void setHighlightedFieldValue(T bean, String solrField, String hlValue) {\n try {\n if (List.class\n .isAssignableFrom(PropertyUtils.getPropertyType(bean, solrField2javaPropertiesMap.get(solrField)))) {\n List<String> listProperty =\n (List<String>) PropertyUtils.getProperty(bean, solrField2javaPropertiesMap.get(solrField));\n // Cleans the hl markers\n String hlCleanValue = cleanHighlightingMarks(hlValue);\n // Position of the value\n int hlValueIndex = listProperty.indexOf(hlCleanValue);\n if (hlValueIndex != -1) { // replace the value with the highlighted value\n listProperty.remove(hlValueIndex);\n listProperty.add(hlValueIndex, hlValue);\n }\n\n } else if (HighlightableList.class\n .isAssignableFrom(PropertyUtils.getPropertyType(bean, solrField2javaPropertiesMap.get(solrField)))) {\n HighlightableList property =\n (HighlightableList) PropertyUtils.getProperty(bean, solrField2javaPropertiesMap.get(solrField));\n // Cleans the hl markers\n String hlCleanValue = cleanHighlightingMarks(hlValue);\n // Position of the value\n List<String> values = property.getValues();\n int hlValueIndex = values.indexOf(hlCleanValue);\n if (hlValueIndex != -1) { // replace the value with the highlighted value\n property.replaceValue(hlValueIndex, hlValue);\n }\n\n } else {\n String propertyName = solrField2javaPropertiesMap.get(solrField);\n if (PropertyUtils.getPropertyDescriptor(bean, propertyName).getPropertyType().isAssignableFrom(String.class)) {\n BeanUtils.setProperty(bean, propertyName, hlValue);\n }\n }\n } catch (IllegalAccessException e) {\n LOG.error(\"Error accessing field for setting highlighted value\", e);\n throw new SearchException(e);\n } catch (InvocationTargetException e) {\n LOG.error(\"Error setting highlighted value\", e);\n throw new SearchException(e);\n } catch (NoSuchMethodException e) {\n LOG.error(\"Error invoking method to set highlighted value\", e);\n throw new SearchException(e);\n }\n }", "@Override\n public boolean highlightEmptyFields() {\n boolean returnValue = false;\n if (titleField.getText().toString().trim().isEmpty()) {\n titleField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (descriptionField.getText().toString().trim().isEmpty()) {\n descriptionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (questionField.getText().toString().trim().isEmpty()) {\n questionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer1Field.getText().toString().trim().isEmpty()) {\n answer1Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer2Field.getText().toString().trim().isEmpty()) {\n answer2Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer3Field.getText().toString().trim().isEmpty()) {\n answer3Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer4Field.getText().toString().trim().isEmpty()) {\n answer4Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer5Field.getText().toString().trim().isEmpty()) {\n answer5Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n return returnValue;\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value2.getSelectionStart();\r\n int aend = value2.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value2.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value2.setSelection(astart - 1, aend - 1);\r\n } else\r\n value2.setSelection(astart, aend);\r\n\r\n if (value2.getText().length() > 0 && value2.getText().length() < 2) {\r\n value2.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value2Enable = false;\r\n } else {\r\n value2.setTextColor(0xff000000); //BLACK color\r\n Value2Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "private void enableFields() {\n\t\t\t\t\t\tholderMain.editTextParametername.setEnabled(true);\n\t\t\t\t\t\tholderMain.editTextParameterValue.setEnabled(true);\n\n\t\t\t\t\t}", "private void setAddrInputFields(){\n \ttextFieldCurrents.put(jTextFieldStart, jTextFieldStart.getText());\n\t\ttextFieldCurrents.put(jTextFieldEnd, jTextFieldEnd.getText());\n\t\tselectedFormat = jComboBoxFormat.getSelectedIndex();\n\t\tquickSearch = jCheckBoxQuickSearch.isSelected();\n }", "public void validateTextField ()\r\n\t{\r\n\t\tif (isEditValid ())\r\n\t\t{\r\n\t\t\tsuper.setBackground (UIConstants.GEOPOD_GREEN);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsuper.setBackground (UIConstants.GEOPOD_RED);\r\n\t\t}\r\n\t}", "private boolean badEntryFound() {\n boolean flag = false;\n \n if(positionComboBox.getSelectedIndex() <= 0)\n {\n positionLabel.setForeground(Color.red);\n positionComboBox.requestFocusInWindow();\n flag = true;\n }\n else\n {\n positionLabel.setForeground(Color.black);\n }\n \n if(firstTextField.getText().trim().isEmpty())\n {\n fNameLabel.setForeground(Color.red);\n firstTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n fNameLabel.setForeground(Color.black);\n }\n \n if(lastTextField.getText().trim().isEmpty())\n {\n lNameLabel.setForeground(Color.red);\n lastTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n lNameLabel.setForeground(Color.black);\n }\n \n if(codeTextField.getText().trim().isEmpty())\n {\n codeLabel.setForeground(Color.red);\n codeTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n codeLabel.setForeground(Color.black);\n }\n \n \n return flag;\n }", "public void formatFields() {\r\n\t}", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "public void rowField()\n\t{ \n\t\tviewTable.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e)\n\t\t\t{\n\t\t\t\tint c;\n\t\t\t\tString id ,oldname,oladdress,oldcontact,oldemail,oldusername, oldpassword;\n\t\t\t\tDefaultTableModel viewTablemodel = (DefaultTableModel)viewTable.getModel();\n\t\t\t\tc=viewTable.getSelectedRow();\n\t\t\t\tid= viewTablemodel.getValueAt(c, 1).toString();\n\t\t\t\toldname= viewTablemodel.getValueAt(c,2).toString();\n\t\t\t\toldcontact= viewTablemodel.getValueAt(c,3).toString();\n\t\t\t\toladdress= viewTablemodel.getValueAt(c,4).toString();\n\t\t\t\toldemail= viewTablemodel.getValueAt(c,5).toString();\n\t\t\t\toldusername= viewTablemodel.getValueAt(c,6).toString();\n\t\t\t\toldpassword= viewTablemodel.getValueAt(c,7).toString();\n\t\t\t\tupdatePanel(id, oldname, oldcontact, oladdress, oldemail, oldusername, oldpassword);\n\t\t\t\tsetRowCount(viewTable.getSelectedRow());\n\t\t\t}\n\t\t});\n\t}", "private void enableFields() {\n\t\ttxtStockCenterName.setEnabled(false);\n\t\trdBtnPreferredNo.setEnabled(false);\n\t\trdBtnPreferredYes.setEnabled(false);\n\n\t\t//disable Facility Details fields\n\t\ttxtPharmacyName.setEnabled(false);\n\t\ttxtStreetAdd.setEnabled(false);\n\t\ttxtCity.setEnabled(false);\n\t\ttxtTel.setEnabled(false);\n\t\ttxtPharmacistName1.setEnabled(false);\n\t\ttxtPharmacyAssistant.setEnabled(false);\n\t\tgrpLabel.setEnabled(false);\n\n\t\tif(rdBtnAddStockCenter.getSelection()) {\n\t\t\ttxtStockCenterName.setEnabled(true);\n\t\t\tbtnSearch.setVisible(false);\n\t\t}\n\t\telse if(rdBtnUpdateStockCenter.getSelection()) {\n\t\t\ttxtStockCenterName.setEnabled(true);\n\t\t\tbtnSearch.setVisible(true);\n\t\t\tbtnSearch.setEnabled(true);\n\t\t}\n\t\telse {\n\t\t\ttxtPharmacyName.setEnabled(true);\n\t\t\ttxtStreetAdd.setEnabled(true);\n\t\t\ttxtCity.setEnabled(true);\n\t\t\ttxtTel.setEnabled(true);\n\t\t\ttxtPharmacistName1.setEnabled(true);\n\t\t\ttxtPharmacyAssistant.setEnabled(true);\n\t\t\tgrpLabel.setEnabled(true);\n\t\t\tbtnSearch.setVisible(false);\n\t\t}\n\n\t\t//}\n\t}", "public void focusGained(FocusEvent e)\r\n/* 21: */ {\r\n/* 22: 64 */ JTextComponent c = getComponent();\r\n/* 23: 65 */ if (c.isEnabled())\r\n/* 24: */ {\r\n/* 25: 66 */ setVisible(true);\r\n/* 26: 67 */ setSelectionVisible(true);\r\n/* 27: */ }\r\n/* 28: 69 */ if ((!c.isEnabled()) || (!this.isKeyboardFocusEvent) || (!Options.isSelectOnFocusGainActive(c))) {\r\n/* 29: 72 */ return;\r\n/* 30: */ }\r\n/* 31: 74 */ if ((c instanceof JFormattedTextField)) {\r\n/* 32: 75 */ EventQueue.invokeLater(new Runnable()\r\n/* 33: */ {\r\n/* 34: */ public void run()\r\n/* 35: */ {\r\n/* 36: 77 */ PlasticFieldCaret.this.selectAll();\r\n/* 37: */ }\r\n/* 38: */ });\r\n/* 39: */ } else {\r\n/* 40: 81 */ selectAll();\r\n/* 41: */ }\r\n/* 42: */ }", "default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted', 'true')\", element());\n }", "B highlightExpression(String highlightExpression);", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n String turnToString2 = txt_search.getText();\n\n try {\n\n if(begSearch != -1){\n txt_area.setCaretPosition(begSearch);\n begSearch = txt_area.getText().indexOf(turnToString2,begSearch);\n lbl_search_res.setText(\"\");\n }\n if(begSearch != -1){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n else if (begSearch <= txt_area.getText().length() && begSearch >= 0){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n if(begSearch == -1){\n lbl_search_res.setText(\"Can not found.\");\n }\n begSearch = begSearch + 1;\n\n //System.out.print(\" \"+begSearch);\n\n }\n catch (BadLocationException ex) {\n begSearch = -1;\n }\n\n }", "public void setSearchNameTextFieldBackgroundColor(String color) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyBackgroundColor\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchNameTextField_propertyBackgroundColor\", color == null ? \"\" : \"background: \" + color);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchNameTextFieldBackgroundColor(\" + escapeString(color) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private void initFields(){\r\n \tintDocumentFilter = new IntegerDocumentFilter();\r\n \tJLabel label;\r\n \r\n \tlabel=new JLabel(\"Gen Chain Length\");\r\n \r\n \tgenChainLengthField = new JTextField(5);\r\n \tdoc = (PlainDocument)genChainLengthField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(genChainLengthField);\r\n \r\n \tlabel=new JLabel(\"Gen Chain Length Flux\");\r\n \r\n \tgenChainLengthFluxField = new JTextField(5);\r\n \tdoc = (PlainDocument)genChainLengthFluxField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(genChainLengthFluxField);\r\n \r\n \tlabel=new JLabel(\"Step Gen Distance\");\r\n \r\n \tstepGenDistanceField = new JTextField(5);\r\n \tdoc = (PlainDocument)stepGenDistanceField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(stepGenDistanceField);\r\n \r\n \tlabel=new JLabel(\"Rows\");\r\n \r\n \trowsField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Number of total rows in maze\");\r\n \tdoc = (PlainDocument)rowsField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(rowsField);\r\n \r\n \tlabel=new JLabel(\"Columns\");\r\n \r\n \tcolsField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Number of total columns in maze.\");\r\n \tdoc = (PlainDocument)colsField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(colsField);\r\n \r\n \tlabel=new JLabel(\"Start Row\");\r\n \r\n \tstartRowField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Row of starting position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)startRowField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(startRowField);\r\n \r\n \tlabel=new JLabel(\"Start Column\");\r\n \r\n \tstartColField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Column of starting position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)startColField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(startColField);\r\n \r\n \tlabel=new JLabel(\"End Row\");\r\n \r\n \tendRowField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Row of ending (goal) position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)endRowField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(endRowField);\r\n \r\n \tlabel=new JLabel(\"End Column\");\r\n \r\n \tendColField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Column of ending (goal) position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)endColField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(endColField);\r\n \r\n \tlabel=new JLabel(\"Cell Width\");\r\n \r\n \tcellWidthField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Width of a single cell in pixels\");\r\n \tdoc = (PlainDocument)cellWidthField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(cellWidthField);\r\n \r\n \tlabel=new JLabel(\"Progressive Reveal Radius\");\r\n \r\n \tprogRevealRadiusField = new JTextField(5);\r\n \tdoc = (PlainDocument)progRevealRadiusField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(progRevealRadiusField);\r\n \r\n \tlabel=new JLabel(\"Progressive Draw\");\r\n \r\n \tprogDrawCB = new JCheckBox();\r\n \tlabel.setToolTipText(\"Whether maze should be drawn progressively or not (immediately)\");\r\n \tthis.add(label);\r\n \tthis.add(progDrawCB);\r\n \r\n \tlabel=new JLabel(\"Progressive Draw Speed\");\r\n \r\n \tprogDrawSpeedField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Size of chunks in which maze should be drawn progressively (larger is faster)\");\r\n \tdoc = (PlainDocument)progDrawSpeedField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(progDrawSpeedField);\r\n \r\n \r\n \r\n \r\n \tokButton = new JButton(\"OK\");\r\n \tokButton.addActionListener(new ActionListener(){\r\n \t\tpublic void actionPerformed(ActionEvent e){\r\n \t\t writeback();\r\n \t\t JDialog parentDialog = (JDialog)(getRootPane().getParent());\r\n \t\t parentDialog.setVisible(false);\r\n \t\t}\r\n \t });\r\n \tthis.add(okButton);\r\n \r\n \tcancelButton = new JButton(\"Cancel\");\r\n \tcancelButton.addActionListener(new ActionListener(){\r\n \t\tpublic void actionPerformed(ActionEvent e){\r\n \t\t JDialog parentDialog = (JDialog)(getRootPane().getParent());\r\n \t\t parentDialog.setVisible(false);\r\n \t\t}\r\n \t });\r\n \tthis.add(cancelButton);\r\n }", "private void redFieldCPRNoAndZip(TextField cprTextField, KeyEvent event) {\n\n char firstLetterCheck = 0;\n\n char backSlashASCII = 8;\n char deleteASCII = 127;\n\n int maxLength = 9;\n\n boolean backSlash = (int) event.getCharacter().charAt(firstLetterCheck) != backSlashASCII;\n boolean deleteButton = (int) event.getCharacter().charAt(firstLetterCheck) != deleteASCII;\n\n\n if (cprTextField.getLength() <= maxLength) {\n if (backSlash && deleteButton && !Character.isDigit(event.getCharacter().charAt(firstLetterCheck)) && cprTextField.getLength() >= 0) {\n event.consume();\n cprTextField.setStyle(\"-fx-text-box-border:red;-fx-control-inner-background:red;-fx-faint-focus-color:red;\");\n } else {\n cprTextField.setStyle(\"-fx-text-box-border:#feefff;-fx-control-inner-background:white;-fx-faint-focus-color:white;\");\n }\n\n } else if (cprTextField.getLength() > maxLength) {\n event.consume();\n cprTextField.setStyle(\"-fx-text-box-border:#feefff;-fx-control-inner-background:white;-fx-faint-focus-color:white;\");\n }\n }", "public int visitFieldStart(final FieldStart fieldStart) {\n mBuilder.append(\"Found field: \" + fieldStart.getFieldType() + \"\\r\\n\");\n mBuilder.append(\"\\tField code: \" + fieldStart.getField().getFieldCode() + \"\\r\\n\");\n mBuilder.append(\"\\tDisplayed as: \" + fieldStart.getField().getResult() + \"\\r\\n\");\n\n return VisitorAction.CONTINUE;\n }", "private boolean select(JFormattedTextField ftf, AttributedCharacterIterator iterator, DateFormat.Field field) {\n/* 231 */ int max = ftf.getDocument().getLength();\n/* */ \n/* 233 */ iterator.first();\n/* */ \n/* */ do {\n/* 236 */ Map attrs = iterator.getAttributes();\n/* */ \n/* 238 */ if (attrs != null && attrs.containsKey(field)) {\n/* */ \n/* 240 */ int start = iterator.getRunStart(field);\n/* 241 */ int end = iterator.getRunLimit(field);\n/* */ \n/* 243 */ if (start != -1 && end != -1 && start <= max && end <= max)\n/* */ {\n/* 245 */ ftf.select(start, end);\n/* */ }\n/* 247 */ return true;\n/* */ } \n/* 249 */ } while (iterator.next() != Character.MAX_VALUE);\n/* 250 */ return false;\n/* */ }", "public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n fieldList.setSelectedValue(field, false);\n insertTextForTag(overrideField);\n }", "private void setupOptionalFields() {\n // Optional fields <-> labels\n Map<AutoCompleteTextView, TextView> map = new HashMap<>();\n map.put(mBind.backgroundEdit, mBind.backgroundLabel);\n map.put(mBind.maxWidthEdit, mBind.maxWidthLabel);\n map.put(mBind.maxHeightEdit, mBind.maxHeightLabel);\n\n for (Map.Entry<AutoCompleteTextView, TextView> e : map.entrySet()) {\n // On every keystroke, check if field is empty, and if yes, strike through its label\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n int mode = e.getValue().getPaintFlags();\n if (e.getKey().getText().toString().equals(\"\"))\n mode = Util.setFlag(mode, Paint.STRIKE_THRU_TEXT_FLAG);\n else\n mode = Util.unsetFlag(mode, Paint.STRIKE_THRU_TEXT_FLAG);\n e.getValue().setPaintFlags(mode);\n }\n });\n }\n }", "private void swhFieldConditions() {\n\n gameScreenBackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field);\n\n swhImageView.setSelected(false);\n baseHitImageView.setSelected(false);\n\n lfTextView.setSelected(false);\n rfTextView.setSelected(false);\n cfTextView.setSelected(false);\n cTextView.setSelected(false);\n pTextView.setSelected(false);\n oneBTextView.setSelected(false);\n twoBTextView.setSelected(false);\n threeBTextView.setSelected(false);\n ssTextView.setSelected(false);\n\n leftFieldPoints.setVisibility(View.GONE);\n rightFieldpoints.setVisibility(View.GONE);\n centerFieldPoints.setVisibility(View.GONE);\n\n hideAllFieldPosBadges();\n swhLabel.setVisibility(View.GONE);\n\n homeRunImageView.setEnabled(true);\n runScore.setEnabled(true);\n possiblePoints.setText(\"0 / 0\");\n baseHitImageView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.base_hit);\n\n positionsEnable();\n\n //disable basehit\n baseHitImageView.setEnabled(false);\n baseHitImageView.setAlpha((float) 0.6);\n\n //enable swh\n swhImageView.setEnabled(true);\n swhImageView.setAlpha((float) 1.0);\n\n\n }", "private void jLabelSearchMouseEntered(java.awt.event.MouseEvent evt) {\n setColor(jPanel1);\n }", "public void doField(String callerName) throws LexemeException {\n\t\tlogMessage(\"<field>-->{,ID}\");\n\t\tfunctionStack.push(\"<field>\");\n\t\twhile (ifPeek(\"COMMA_\")) {\n\t\t\tif (ifPeek(\"COMMA_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t}\n\t\tif (ifPeek(\"SEMI_COL_\")) {\n\t\t\tconsumeToken();\n\t\t\tlogVerboseMessage(callerName);\n\t\t\tfunctionStack.pop();\n\t\t\treturn;\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "private void jTextField13FocusGained(java.awt.event.FocusEvent evt) {\n search();\r\n }", "@Override\n public void startEdit() {\n super.startEdit();\n\n if (text_field == null) {\n createTextField();\n }\n setText(null);\n setGraphic(text_field);\n text_field.selectAll();\n }", "public static String generateSiteEditFieldMarking(Field field) {\r\n \tif(field != null){\r\n\t return String.format(fieldseformat, \r\n\t \t\tfield.getXPath()\r\n\t );\r\n \t}\r\n \treturn \"\";\r\n }", "@Test\n\t @WebTest\n\t public void DemoTest1() throws InterruptedException {\n\t Grid.driver().get(\"http://www.google.com/\");\n\t \n\t TextField field = new TextField(\"id=lst-ib\");\n\n\t //Thread will wait until TextFiled element present in the browser\n\t WebDriverWaitUtils.waitUntilElementIsPresent(field.getLocator());\n\n\t //Search for the string 'SeLion' in the text box\n\t field.type(\"Selenium\\n\");\n\t }", "public void requestFocusOnFirstField() {\n btnLookup.requestFocus();\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n //txtReferredBy.requestFocus(); (commented because the lookup should always be through btnLookup\n btnLookup.requestFocus();\n }\n });\n }\n });\n }", "Fields fields();", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 473, 710);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(Color.GRAY);\r\n\t\tpanel.setBounds(0, 0, 468, 710);\r\n\t\tframe.getContentPane().add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\ttfTc = new JTextField();\r\n\t\ttfTc.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvoid regexKontrol() {\r\n\t\t\t\tString kimlik = tfTc.getText();\r\n\t\t\t\tif (kimlik.matches(\"[0-9]{11}\")==true) {\r\n\t\t\t\t\tbkimlik = true;\r\n\t\t\t\t\ttfTc.setBorder(BorderFactory.createLineBorder(Color.green,3));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbkimlik = false;\r\n\t\t\t\t\ttfTc.setBorder(BorderFactory.createLineBorder(Color.red,3));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\ttfTc.setBounds(150, 150, 236, 39);\r\n\t\tpanel.add(tfTc);\r\n\t\ttfTc.setColumns(10);\r\n\t\t\r\n\t\ttfAdi = new JTextField();\r\n\t\ttfAdi.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvoid regexKontrol() {\r\n\t\t\t\tString isim = tfAdi.getText();\r\n\t\t\t\tif (isim.matches(\"[a-zA-Z ]{3,20}\")==true) {\r\n\t\t\t\t\ttfAdi.setBorder(BorderFactory.createLineBorder(Color.green,3));\r\n\t\t\t\t\tbadi = true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbadi = false;\r\n\t\t\t\t\ttfAdi.setBorder(BorderFactory.createLineBorder(Color.red,3));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfAdi.setColumns(10);\r\n\t\ttfAdi.setBounds(150, 203, 236, 39);\r\n\t\tpanel.add(tfAdi);\r\n\t\t\r\n\t\ttfSoyadi = new JTextField();\r\n\t\ttfSoyadi.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvoid regexKontrol() {\r\n\t\t\t\tString soyisim = tfSoyadi.getText();\r\n\t\t\t\tif (soyisim.matches(\"[a-zA-Z ]{3,20}\")==true) {\r\n\t\t\t\t\ttfSoyadi.setBorder(BorderFactory.createLineBorder(Color.green,3));\r\n\t\t\t\t\tbsoyadi = true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ttfSoyadi.setBorder(BorderFactory.createLineBorder(Color.red,3));\r\n\t\t\t\t\tbsoyadi = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfSoyadi.setColumns(10);\r\n\t\ttfSoyadi.setBounds(150, 254, 236, 39);\r\n\t\tpanel.add(tfSoyadi);\r\n\t\t\r\n\t\ttfMail = new JTextField();\r\n\t\ttfMail.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvoid regexKontrol() {\r\n\t\t\t\tString mail = tfMail.getText();\r\n\t\t\t\tif (mail.matches(\"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\"\r\n\t\t\t\t\t\t+ \"\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.\"\r\n\t\t\t\t\t\t+ \")+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]\"\r\n\t\t\t\t\t\t+ \"[0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\"\r\n\t\t\t\t\t\t+ \"\\\\x0e-\\\\x7f])+)\\\\])\")==true) {\r\n\t\t\t\t\ttfMail.setBorder(BorderFactory.createLineBorder(Color.green,3));\r\n\t\t\t\t\tbmail = true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ttfMail.setBorder(BorderFactory.createLineBorder(Color.red,3));\r\n\t\t\t\t\tbmail = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfMail.setColumns(10);\r\n\t\ttfMail.setBounds(150, 306, 236, 39);\r\n\t\tpanel.add(tfMail);\r\n\t\t\r\n\t\tJButton btnTamamla = new JButton(\"Tamamla\");\r\n\t\tbtnTamamla.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t JOptionPane.showMessageDialog(new JFrame(), \"Kayıt başarıyla oluşturuldu.\", \"Bilgi\", JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnTamamla.setBackground(Color.YELLOW);\r\n\t\tbtnTamamla.setBorder(null);\r\n\t\tbtnTamamla.setBounds(150, 454, 180, 55);\r\n\t\tpanel.add(btnTamamla);\r\n\t\t\r\n\t\tJLabel lblTc = new JLabel(\"TC Kimlik:\");\r\n\t\tlblTc.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblTc.setFont(new Font(\"Tahoma\", Font.PLAIN, 19));\r\n\t\tlblTc.setBounds(46, 153, 90, 33);\r\n\t\tpanel.add(lblTc);\r\n\t\t\r\n\t\tJLabel lblAdi = new JLabel(\"\\u0130sim:\");\r\n\t\tlblAdi.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblAdi.setFont(new Font(\"Tahoma\", Font.PLAIN, 19));\r\n\t\tlblAdi.setBounds(46, 206, 90, 33);\r\n\t\tpanel.add(lblAdi);\r\n\t\t\r\n\t\tlblSoyadi = new JLabel(\"Soyisim:\");\r\n\t\tlblSoyadi.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblSoyadi.setFont(new Font(\"Tahoma\", Font.PLAIN, 19));\r\n\t\tlblSoyadi.setBounds(46, 257, 90, 33);\r\n\t\tpanel.add(lblSoyadi);\r\n\t\t\r\n\t\tlblEposta = new JLabel(\"E-Posta:\");\r\n\t\tlblEposta.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblEposta.setFont(new Font(\"Tahoma\", Font.PLAIN, 19));\r\n\t\tlblEposta.setBounds(46, 309, 90, 33);\r\n\t\tpanel.add(lblEposta);\r\n\t\t\r\n\t\tlblTelefon = new JLabel(\"Cep Tel. :\");\r\n\t\tlblTelefon.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblTelefon.setFont(new Font(\"Tahoma\", Font.PLAIN, 19));\r\n\t\tlblTelefon.setBounds(46, 359, 90, 33);\r\n\t\tpanel.add(lblTelefon);\r\n\t\t\r\n\t\tJFormattedTextField tfTelefon = new JFormattedTextField();\r\n\t\ttfTelefon.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tregexKontrol();\r\n\t\t\t}\r\n\t\t\tvoid regexKontrol() {\r\n\t\t\t\tString telefon = tfTelefon.getText();\r\n\t\t\t\tif (telefon.matches(\"[0-9]{10}\")==true) {\r\n\t\t\t\t\ttfTelefon.setBorder(BorderFactory.createLineBorder(Color.green,3));\r\n\t\t\t\t\tbtelefon = true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ttfTelefon.setBorder(BorderFactory.createLineBorder(Color.red,3));\r\n\t\t\t\t\tbtelefon = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfTelefon.setDisabledTextColor(Color.RED);\r\n\t\ttfTelefon.setBounds(150, 353, 236, 39);\r\n\t\t\r\n\t\tpanel.add(tfTelefon);\r\n\t\t\r\n\t\tJLabel lblBackground = new JLabel(\"\");\r\n\t\tlblBackground.setBorder(null);\r\n\t\tlblBackground.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tlblBackground.setIcon(new ImageIcon(Gui.class.getResource(\"/simpleregister/automataregex.png\")));\r\n\t\tlblBackground.setBackground(Color.LIGHT_GRAY);\r\n\t\tlblBackground.setBounds(36, 28, 416, 575);\r\n\t\tpanel.add(lblBackground);\r\n\t\t\r\n\t\tThread thread = new Thread() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile(true) {\r\n\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Thread içindeyim:\"+bkimlik+\" \"+badi+\" \"+bsoyadi+\" \"+bmail+\" \"+btelefon);//SORULACAK!!! bu satırı kapatınca buton aktif olmuyor!\r\n\t\t\t\t\tif (bkimlik == true && badi==true && bsoyadi == true && bmail == true && btelefon ==true ) {\r\n\t\t\t\t\t\tbtnTamamla.setEnabled(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tbtnTamamla.setEnabled(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t};\r\n\t\t\tthread.start();\r\n\t\t\r\n\t}", "private void validExpresion(){\n\t\tString valores =\"+/*-^sinbqrcotah.\";\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint tam = fun.length-1;\n\t\tif(tam > 0){\n\t\t\tif(valores.indexOf(fun[tam]) != -1){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t\t}\n\t\t}\n\n\t\tif(this.getText().equals(\"+\") || this.getText().equals(\"-\") || this.getText().equals(\".\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\n\t\telse if(this.getText().equals(\"s\") || this.getText().equals(\"c\") || this.getText().equals(\"t\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\n\t\telse if(this.getText().equals(\"(\") || this.getText().equals(\"a\") || this.getText().equals(\"i\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\t}", "public static void onlyEnterField(WebElement element, String sLog, WebElement ajax, InputField value)\n\t{\n\t\tenterField(element, sLog, ajax, Framework.getTimeoutInMilliseconds(), bException, value, false);\n\t}", "@Test\n public void fieldForms() throws Exception {\n Document doc = new Document(getMyDir() + \"Form fields.docx\");\n\n FieldFormCheckBox fieldFormCheckBox = (FieldFormCheckBox) doc.getRange().getFields().get(1);\n Assert.assertEquals(\" FORMCHECKBOX \\u0001\", fieldFormCheckBox.getFieldCode());\n\n FieldFormDropDown fieldFormDropDown = (FieldFormDropDown) doc.getRange().getFields().get(2);\n Assert.assertEquals(\" FORMDROPDOWN \\u0001\", fieldFormDropDown.getFieldCode());\n\n FieldFormText fieldFormText = (FieldFormText) doc.getRange().getFields().get(0);\n Assert.assertEquals(\" FORMTEXT \\u0001\", fieldFormText.getFieldCode());\n //ExEnd\n }", "private void enterCriteriaToSerachField(String text) {\n WebElement searchField = findElementWithWait(By.id(\"gh-ac\"));\n searchField.clear();\n searchField.sendKeys(text);\n searchField.sendKeys(Keys.RETURN);\n }", "public void createFieldEditors()\n\t{\n\t}", "@When(\"^enter the value in the search selenuim text box$\")\n\tpublic void enter_the_value_in_the_search_selenuim_text_box() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@id='gsc-i-id1']\")).sendKeys(\"cucumber\");\n\t // throw new PendingException();\n\t}", "public void actionPerformed(ActionEvent e)\n {\n int pos = findFieldButtonPosition();\n formatEditor.setCaretPosition(pos);\n }", "private Object[] scanRows(int field, NFilterColumn fc, SRange range, \n\t\t\tSSheet worksheet, STable table, //ZSS-988 \n\t\t\tSFill filterFill, boolean byFontColor, //ZSS-1191 \n\t\t\tSCustomFilters custFilters,\n\t\t\tSDynamicFilter dynaFilter, STop10Filter top10Filter) { //ZSS-1192\n\t\tSortedSet<FilterRowInfo> orderedRowInfos = \n\t\t\t\tnew TreeSet<FilterRowInfo>(new FilterRowInfoComparator());\n\t\t\n\t\t//ZSS-1191\n\t\tLinkedHashSet<SFill> ccitems = new LinkedHashSet<SFill>(); //ZSS-1191: CELL_COLOR\n\t\tLinkedHashSet<SFill> fcitems = new LinkedHashSet<SFill>(); //ZSS-1191: FONT_COLOR\n\t\tint[] types = new int[] {0, 0, 0}; //0: date, 1: number, 2: string\n\t\t\n\t\tblankRowInfo = new FilterRowInfo(BLANK_VALUE, \"(Blanks)\");\n\t\tfinal Set criteria1 = fc == null ? null : fc.getCriteria1();\n\t\tboolean hasBlank = false;\n\t\tboolean hasSelectedBlank = false;\n\t\tfinal int top = range.getRow() + 1;\n\t\tint bottom = range.getLastRow();\n\t\tfinal int columnIndex = range.getColumn() + field - 1;\n\t\tfinal SFont defaultFont = worksheet.getBook().getDefaultFont(); //ZSS-1191\n\t\tFormatEngine fe = EngineFactory.getInstance().createFormatEngine();\n\t\tboolean isItemFilter = filterFill == null //ZSS-1191 \n\t\t\t\t&& custFilters == null //ZSS-1192\n\t\t\t\t&& dynaFilter == null && top10Filter == null; //ZSS-1193\n\t\t//ZSS-1195\n\t\tfinal SCell cell = worksheet.getCell(range.getRow(), columnIndex);\n\t\tString colName = null;\n\t\tif (!cell.isNull() && cell.getType() != CellType.BLANK) {\n\t\t\tFormatResult fr = fe.format(cell, new FormatContext(ZssContext.getCurrent().getLocale()));\n\t\t\tcolName = fr.getText();\n\t\t}\n\t\tif (colName == null || Strings.isBlank(colName)) {\n\t\t\tfinal String ab = CellReference.convertNumToColString(columnIndex);\n\t\t\tcolName = \"(Column \"+ab+\")\";\n\t\t}\n\n\t\tfor (int i = top; i <= bottom; i++) {\n\t\t\t//ZSS-988: filter column with no criteria should not show option of hidden row \n\t\t\tif (isItemFilter && (criteria1 == null || criteria1.isEmpty())) { //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\tif (worksheet.getRow(i).isHidden())\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal SCell c = worksheet.getCell(i, columnIndex);\n\t\t\t\n\t\t\t//ZSS-1191\n\t\t\tfinal SCellStyle style = c.isNull() ? null : c.getCellStyle();\n\t\t\tfinal SFill ccfill = style == null ? BLANK_FILL : style.getFill();\n\t\t\tccitems.add(ccfill);\n\t\t\tfinal SFont font = style == null ? null : style.getFont();\n\t\t\tfinal boolean isDefaultFont = defaultFont.equals(font);\n\t\t\tfinal SFill fcfill = font == null || isDefaultFont ? \n\t\t\t\tBLANK_FILL : new FillImpl(FillPattern.NONE, font.getColor(), ColorImpl.WHITE);\n\t\t\tfcitems.add(fcfill);\t\t\t\n\t\t\tint type0 = 3; //ZSS-1241\n\t\t\t\n\t\t\tif (!c.isNull() && c.getType() != CellType.BLANK) {\n\t\t\t\tFormatResult fr = fe.format(c, new FormatContext(ZssContext.getCurrent().getLocale()));\n\t\t\t\tString displaytxt = fr.getText();\n\t\t\t\tif(!hasBlank && displaytxt.trim().isEmpty()) { //ZSS-707: show as blank; then it is blank\n\t\t\t\t\thasBlank = true;\n\t\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\t} else {\t\t\t\t\n\t\t\t\t\tObject val = c.getValue(); // ZSS-707\n\t\t\t\t\tif(c.getType()==CellType.NUMBER && fr.isDateFormatted()){\n\t\t\t\t\t\tval = c.getDateValue();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//ZSS-1191: Date 1, Number 2, String 3, Boolean 4 is Number; Error 5 and Blank 6.\n\t\t\t\t\tfinal int type = FilterRowInfo.getType(val);\n\t\t\t\t\ttype0 = (type == 4 ? 2 : type) - 1; //ZSS-1241\n\t\t\t\t\t\n\t\t\t\t\tFilterRowInfo rowInfo = new FilterRowInfo(val, displaytxt);\n\t\t\t\t\t//ZSS-299\n\t\t\t\t\torderedRowInfos.add(rowInfo);\n\t\t\t\t\t//ZSS-1191, ZSS-1192, ZSS-1193: color/custom/dynamic/top10 filter excludes item filter\n\t\t\t\t\tif (isItemFilter) { \n\t\t\t\t\t\tif (criteria1 == null || criteria1.isEmpty() || criteria1.contains(displaytxt)) { //selected\n\t\t\t\t\t\t\trowInfo.setSelected(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!hasBlank){\n\t\t\t\thasBlank = true;\n\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t}\n\t\t\t\n\t\t\t//ZSS-1241: Date 0, Number 1, String 2\n\t\t\tif (type0 < 3) {\n\t\t\t\ttypes[type0] = types[type0] + 1;\n\t\t\t}\n\t\t}\n\t\t//ZSS-988: Only when it is not a table filter, it is possible to change the last row.\n\t\tif (table == null) {\n\t\t\t//ZSS-988: when hit Table cell; must stop\n\t\t\tint blm = Integer.MAX_VALUE;\n\t\t\tfinal SSheet sheet = range.getSheet();\n\t\t\tfor (STable tb : sheet.getTables()) {\n\t\t\t\tfinal CellRegion rgn = tb.getAllRegion().getRegion();\n\t\t\t\tfinal int l = rgn.getColumn();\n\t\t\t\tfinal int r = rgn.getLastColumn();\n\t\t\t\tfinal int t = rgn.getRow();\n\t\t\t\tif (l <= columnIndex && columnIndex <= r && t > bottom && blm >= t)\n\t\t\t\t\tblm = t - 1;\n\t\t\t}\n\n\t\t\tfinal int maxblm = Math.min(blm, worksheet.getEndRowIndex());\n\t\t\t//ZSS-704: user could have enter non-blank value along the filter, must add that into\n\t\t\tfinal int left = range.getColumn();\n\t\t\tfinal int right = range.getLastColumn();\n\t\t\tboolean leaveLoop = false;\n\t\t\tfor (int i = bottom+1; i <= maxblm ; ++i) {\n\t\t\t\tfinal SCell c = worksheet.getCell(i, columnIndex);\n\t\t\t\t\n\t\t\t\tint type0 = 3; //ZSS-1241\n\n\t\t\t\tif (!c.isNull() && c.getType() != CellType.BLANK) {\n\t\t\t\t\tFormatResult fr = fe.format(c, new FormatContext(ZssContext.getCurrent().getLocale()));\n\t\t\t\t\tString displaytxt = fr.getText();\n\t\t\t\t\tif(!hasBlank && displaytxt.trim().isEmpty()) { //ZSS-707: show as blank; then it is blank\n\t\t\t\t\t\thasBlank = true;\n\t\t\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\t\t} else {\n\t\t\t\t\t\tObject val = c.getValue(); // ZSS-707\n\t\t\t\t\t\tif(c.getType()==CellType.NUMBER && fr.isDateFormatted()){\n\t\t\t\t\t\t\tval = c.getDateValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//ZSS-1191: Date 1, Number 2, String 3, Boolean 4 is Number; Error 5 and Blank 6\n\t\t\t\t\t\tfinal int type = FilterRowInfo.getType(val);\n\t\t\t\t\t\ttype0 = (type == 4 ? 2 : type) - 1; // ZSS-1241\n\t\t\t\t\t\t\n\t\t\t\t\t\tFilterRowInfo rowInfo = new FilterRowInfo(val, displaytxt);\n\t\t\t\t\t\t//ZSS-299\n\t\t\t\t\t\torderedRowInfos.add(rowInfo);\n\t\t\t\t\t\t//ZSS-1191, ZSS-1192: color/custom/dynamic/top10 filter excludes item filter\n\t\t\t\t\t\tif (filterFill == null && custFilters == null) { \n\t\t\t\t\t\t\tif (criteria1 == null || criteria1.isEmpty() || criteria1.contains(displaytxt)) { //selected\n\t\t\t\t\t\t\t\trowInfo.setSelected(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//really an empty cell?\n\t\t\t\t\tint[] ltrb = getMergedMinMax(worksheet, i, columnIndex);\n\t\t\t\t\tif (ltrb == null) {\n\t\t\t\t\t\tif (neighborIsBlank(worksheet, left, right, i, columnIndex)) {\n\t\t\t\t\t\t\tbottom = i - 1;\n\t\t\t\t\t\t\tleaveLoop = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti = ltrb[3];\n\t\t\t\t\t}\n\t\t\t\t\tif (!leaveLoop && !hasBlank) { //ZSS-1233\n\t\t\t\t\t\thasBlank = true;\n\t\t\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (leaveLoop) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//ZSS-1241: Date 0, Number 1, String 2\n\t\t\t\tif (type0 < 3) {\n\t\t\t\t\ttypes[type0] = types[type0] + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//ZSS-1191\n\t\t\t\tfinal SCellStyle style = c.isNull() ? null : c.getCellStyle();\n\t\t\t\tfinal SFill ccfill = style == null ? BLANK_FILL : style.getFill();\n\t\t\t\tccitems.add(ccfill);\n\t\t\t\tfinal SFont font = style == null ? null : style.getFont();\n\t\t\t\tfinal SFill fcfill = font == null ? BLANK_FILL : new FillImpl(FillPattern.SOLID, font.getColor(), null);\n\t\t\t\tfcitems.add(fcfill);\n\t\t\t}\n\t\t}\n\t\tif (hasBlank) {\n\t\t\torderedRowInfos.add(blankRowInfo);\n\t\t}\n\t\t\n\t\t//ZSS-1241 determine the candidate\n\t\t//which kind of filter (DateFilter/NumberFilter/TextFilter); \n\t\t//0: date, 1: number, 2: string; if same count; Text > Number > Date\n\t\tint candidate = 2; \n\t\tint max = types[2];\n\t\tif (max < types[1]) {\n\t\t\tcandidate = 1;\n\t\t\tmax = types[1];\n\t\t}\n\t\tif (max < types[0]) {\n\t\t\tcandidate = 0;\n\t\t}\n\t\t\n\t\treturn new Object[] {orderedRowInfos, bottom, \n\t\t\t\tccitems.size() > 1 ? ccitems : Collections.EMPTY_SET, //ZSS-1191 \n\t\t\t\tnew Integer(candidate+1), //ZSS-1192\n\t\t\t\tfcitems.size() > 1 ? fcitems : Collections.EMPTY_SET, //ZSS-1191\n\t\t\t\tcolName}; //ZSS-1195\n\t}", "public void changeFields() throws Exception {\n jTextField1.setText(String.valueOf(article.getItemCode()));\n jTextField2.setText(article.getName());\n jTextField3.setText(String.valueOf(article.getBrandCode()));\n jTextField4.setText(String.valueOf(article.getSalePrice()));\n jTextField5.setText(String.valueOf(article.getCostPrice()));\n jTextField6.setText(String.valueOf(article.getStock()));\n jTextField7.setText(article.getObservation());\n jTextField8.setText(String.valueOf(article.getHeadingCode()));\n \n }", "protected abstract void createFieldEditors();", "public void focusGained(FocusEvent e) {\n if (e.getSource()==jtf[flp1][flp2]){ // agar Object Khanehaye jadwal bashad-\n jtf[flp1][flp2].setEnabled(true);// -angah Gabele neweshtan mishawad.\n setEdit();\n }\n if(e.getSource()==jmEdit) // agar object menuye Edit bashad-\n if(jtf[txp1][txp2].getBackground()==Color.yellow){ // -darSurate Fa'al Budan-\n jtf[txp1][txp2].setEnabled(true); // -angah akharin khane fa'al shode-\n jtf[txp1][txp2].grabFocus(); // -nabayad gere fa'al gardad.\n setNotSaved();\n }\n if (e.getSource()==jmFile || e.getSource()==jmFunction) // Menoye File wa Function-\n for(int i=0; i<30; i++) // -baroye Khanehaye Entekhab shode-\n for(int j=0; j<26; j++) // -gable ejra hastand.\n if(jtf[i][j].getBackground()==Color.yellow){\n jtf[i][j].setEnabled(false);\n jtf[i][j].setBackground(Color.blue);\n setSelected();\n setNotEdit();\n }\n }", "public static void rich_text_format(String fieldsText) {\n\t\tif (AndroidLocators.findElements_With_Xpath(\"//*[contains(@text,'\" + fieldsText\n\t\t\t\t+ \"')]/parent::*/parent::*/android.widget.LinearLayout/android.widget.EditText\").size() > 0) {\n\t\t\tAndroidLocators.sendInputusing_XPath(\"//*[contains(@text,'\" + fieldsText\n\t\t\t\t\t+ \"')]/parent::*/parent::*/android.widget.LinearLayout/android.widget.EditText\");\n\t\t}\n\t}", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "private void redFieldNumber(TextField phoneNumTextField, KeyEvent event) {\n\n char firstLetterCheck = 0;\n\n char plusSymbolASCII = 43;\n char backSlashASCII = 8;\n char deleteASCII = 127;\n\n boolean backSlash = (int) event.getCharacter().charAt(firstLetterCheck) != backSlashASCII;\n boolean deleteButton = (int) event.getCharacter().charAt(firstLetterCheck) != deleteASCII;\n\n if (phoneNumTextField.getLength()==0 && event.getCharacter().charAt(firstLetterCheck)!=plusSymbolASCII){\n event.consume();\n }\n\n if (phoneNumTextField.getLength() <= plusSymbolASCII) {\n if (backSlash && deleteButton && !Character.isDigit(event.getCharacter().charAt(firstLetterCheck)) && phoneNumTextField.getLength() > 0) {\n event.consume();\n phoneNumTextField.setStyle(\"-fx-text-box-border:#ff2000;-fx-control-inner-background:red;-fx-faint-focus-color:red;\");\n } else {\n phoneNumTextField.setStyle(\"-fx-text-box-border:#feefff;-fx-control-inner-background:white;-fx-faint-focus-color:white;\");\n }\n }\n }", "@Override\n\tpublic void focusGained(FocusEvent arg0) {\n\t\tif(arg0.getSource()==text_customerID)\n\t\t\ttext_customerID.selectAll();\n\n \n \n\t\telse {}\n\t}", "private boolean fieldsAreFilled(){\n return !textboxName.isEnabled() && !textboxInitialValue.isEnabled();\n }", "private void nextFocusedField(KeyEvent ke) {\r\n Gui.sumFieldFocused(); //Aumenta el contador\r\n //Si el foco esta en algun nodo del formulario \r\n if(Gui.getFieldFocused() < Gui.getFieldsSize()){\r\n //Se Enfoca el nuevo nodo correspondiente\r\n Gui.getFields()[Gui.getFieldFocused()].requestFocus(); \r\n }else{ //Sino\r\n// botonGuardar(); //Guardar los datos\r\n } \r\n }", "@Override\n public void mousePressed(MouseEvent e) {\n// textFieldModifierNom_Match.setText(selectedMatch.getCodeMatch());\n\t }", "private void rowCountTextFldFocusLost(java.awt.event.FocusEvent evt) {\n }", "@Override\n public void mouseEntered(MouseEvent evt) {\n Cell cell = (Cell) evt.getSource();\n preActionColor = cell.getBackground();\n\n // Highlight Valid Cells\n for (Cell aCell : view.getGamePanel().getViewCellList()) {\n if (cell.getPosition().getRow() == aCell.getPosition().getRow()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getColumn() == aCell.getPosition().getColumn()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getSubgrid() == aCell.getPosition().getSubgrid()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n }\n\n cell.setBackground(APP_GREEN);\n }", "@Test //ExSkip\n public void fieldCollection() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.insertField(\" DATE \\\\@ \\\"dddd, d MMMM yyyy\\\" \");\n builder.insertField(\" TIME \");\n builder.insertField(\" REVNUM \");\n builder.insertField(\" AUTHOR \\\"John Doe\\\" \");\n builder.insertField(\" SUBJECT \\\"My Subject\\\" \");\n builder.insertField(\" QUOTE \\\"Hello world!\\\" \");\n doc.updateFields();\n\n FieldCollection fields = doc.getRange().getFields();\n\n Assert.assertEquals(6, fields.getCount());\n\n // Iterate over the field collection, and print contents and type\n // of every field using a custom visitor implementation.\n FieldVisitor fieldVisitor = new FieldVisitor();\n\n Iterator<Field> fieldEnumerator = fields.iterator();\n\n while (fieldEnumerator.hasNext()) {\n if (fieldEnumerator != null) {\n Field currentField = fieldEnumerator.next();\n\n currentField.getStart().accept(fieldVisitor);\n if (currentField.getSeparator() != null) {\n currentField.getSeparator().accept(fieldVisitor);\n }\n currentField.getEnd().accept(fieldVisitor);\n } else {\n System.out.println(\"There are no fields in the document.\");\n }\n }\n\n System.out.println(fieldVisitor.getText());\n testFieldCollection(fieldVisitor.getText()); //ExSkip\n }", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "public Color getHighlight();", "public void focusGained(FocusEvent e) {\n Component c = e.getComponent();\n if (c instanceof JFormattedTextField) {\n selectItLater(c);\n } else if (c instanceof JTextField) {\n ((JTextField)c).selectAll();\n }\n }", "public void createFieldEditors() {\t\t\n\t\t\n//\t\taddField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, \n//\t\t\t\tMessages.UMAPPreferencePage_1, getFieldEditorParent()));\n\t\tgroup = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n\t\tgroup.setText(Messages.UMAPPreferencesHeader);\n\t\tgroup.setLayout(new GridLayout());\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgd.horizontalSpan = 1;\n\t\tgroup.setLayoutData(gd);\t\t\n\t\t\n//\t\tgroup2 = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n//\t\tgroup2.setText(Messages.UmapStringButtonFieldEditor_0);\n//\t\tgd.horizontalSpan = 2;\n//\t\tgroup2.setLayoutData(gd);\n//\t\tgroup2.setLayout(new GridLayout());\n\t\t\n\t\t\n\t\tvalidation = new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN,\tMessages.UMAPPreferencePage_2, group);\n\t\taddField( validation );\n\n\t\tclassAbreviation = new StringFieldEditor(PreferenceConstants.P_CLASS_NAME, Messages.UMAPPreferencePage_3, group);\n\t\tclassAbreviation.setEmptyStringAllowed(false);\n\t\tclassAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\tintfAbreviation = new StringFieldEditor(PreferenceConstants.P_INTF_NAME, Messages.UMAPPreferencePage_4, group);\n\t\tintfAbreviation.setEmptyStringAllowed(false);\n\t\tintfAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\texcAbreviation = new StringFieldEditor(PreferenceConstants.P_EXCP_NAME, Messages.UMAPPreferencePage_5, group);\n\t\texcAbreviation.setEmptyStringAllowed(false);\n\t\texcAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\t\n//\t\tprojectAbbreviation = new StringFieldEditor(PreferenceConstants.P_PROJ_NAME, Messages.UMAPPreferencePage_6, group);\n//\t\tprojectAbbreviation.setEmptyStringAllowed(true);\n\n//\t\tStringFieldEditor name = new StringFieldEditor(PreferenceConstants.P_USER_NAME, Messages.UmapStringButtonFieldEditor_2, group2);\n//\t\t\n//\t\tStringFieldEditor pass = new StringFieldEditor(PreferenceConstants.P_PWD, Messages.UmapStringButtonFieldEditor_3, group2);\n\t\t\n//\t\tURIStringButtonFieldEditor button = new URIStringButtonFieldEditor(PreferenceConstants.P_URI, Messages.UmapStringButtonFieldEditor_1, group2);\n\t\t\n//\t\taddField(name);\n//\t\taddField(pass);\n//\t\taddField(button);\n\t\t\n\t\taddField( classAbreviation );\n\t\taddField( intfAbreviation );\n\t\taddField( excAbreviation );\n//\t\taddField( projectAbbreviation );\t\t\n\t}", "public void drawField(Graphics2D g2) {\n\t\t\tArrayList<String> fieldCoords = (ArrayList<String>) controller\n\t\t\t\t\t.getFieldCoords();\n\t\t\tFigure[] fieldFigures = controller.getPgArray();\n\n\t\t\tString pattern = \" \";\n\t\t\tint k = 0;\n\t\t\tfor (String src : fieldCoords) {\n\t\t\t\tString[] parts = src.split(pattern);\n\n\t\t\t\tString firstValue = parts[0];\n\t\t\t\tint i = Integer.parseInt(firstValue);\n\t\t\t\tString secondValue = parts[1];\n\t\t\t\tint j = Integer.parseInt(secondValue);\n\n\t\t\t\tif (fieldFigures[k] != null) {\n\t\t\t\t\tint c = fieldFigures[k].getPlayerID();\n\t\t\t\t\tswitch (c) {\n\t\t\t\t\tcase NULL:\n\t\t\t\t\t\tdrawFigure(g2, i, j, Color.GREEN);\n\t\t\t\t\t\tdrawFigureID(g2, i, j, k);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase EINS:\n\t\t\t\t\t\tdrawFigure(g2, i, j, Color.YELLOW);\n\t\t\t\t\t\tdrawFigureID(g2, i, j, k);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ZWEI:\n\t\t\t\t\t\tdrawFigure(g2, i, j, Color.BLUE);\n\t\t\t\t\t\tdrawFigureID(g2, i, j, k);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DREI:\n\t\t\t\t\t\tdrawFigure(g2, i, j, Color.RED);\n\t\t\t\t\t\tdrawFigureID(g2, i, j, k);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tg2.setColor(Color.WHITE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tg2.setColor(Color.WHITE);\n\t\t\t\t\tg2.fillRect(i, j, WIDTHREC, HEIGHTREC);\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\n\t\t}", "void beginGeoField();", "private void prepareTextField(javax.swing.JTextField tx){\n \tif(textFieldDefaults.get(tx).equals(tx.getText())){\n \t\ttx.setText(\"\");\n \t\ttx.setForeground(Color.BLACK);\n \t}\n }", "private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new FieldRelatedLabel(\"Email\", 750, 270);\n\n invalidEmailLabel = new InvalidFormEntryLabel(\"Email must follow the format:\\[email protected]\", 910, 290, false);\n\n emailTF = new TextField();\n emailTF.relocate(750, 300);\n emailTF.textProperty().addListener(e->{FormValidatorPokeMongo.handleEmail(emailTF, invalidEmailLabel); });\n\n sceneNodes.getChildren().addAll(emailLabel, invalidEmailLabel, emailTF);\n }", "java.lang.String getField1066();", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "java.lang.String getField1170();", "private void resetFieldColors() {\r\n userText.setBackgroundColor(ContextCompat.getColor(this, R.color.cleanBackground));\r\n passText.setBackgroundColor(ContextCompat.getColor(this, R.color.cleanBackground));\r\n }", "@Override\n public void mousePressed(MouseEvent e) {\n Object selected = comboBox.getSelectedItem();\n JTextField[] textFieldArray = new JTextField[] {idField, nameField, majorField};\n\n // Checks that fields aren't blank prior to continuing\n for (JTextField field : textFieldArray) {\n if (field.getText().equals(\"\")) {\n displayStatusPanel(\n \"Error: Input may not be blank.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n return;\n }\n }\n\n if (selected.equals(\"Insert\")) {\n insertEntry();\n } else if (selected.equals(\"Delete\")) {\n deleteEntry();\n } else if (selected.equals(\"Find\")) {\n findEntry();\n } else if (selected.equals(\"Update\")) {\n updateEntry();\n }\n }", "@Override\r\n public void afterTextChanged(Editable editable) {\n checkFieldsForEmptyValues();\r\n }", "@Override\n public void run() {\n\t\t\t\t\ttable.getDisplay().timerExec(100, new Runnable() {\n\t\t\t\t\t\t@Override\n public void run() {\n//\t\t\t\t\t\t\tfindText.setBackground(PropertyChangeListener.getColor(found == null && matchCount == 0 ? new RGB(255, 0, 0) : new RGB(255, 255, 255)));\n\t\t\t\t\t\t\tif (!wrapped)\n\t\t\t\t\t\t\t\thexEditor.getEditorSite().getActionBars().getStatusLineManager().setMessage(found == null && matchCount == 0 ? Messages.HexEditorControl_7 : matchCount > 0 ? Messages.HexEditorControl_8 + matchCount + Messages.HexEditorControl_9 : null);\n\t\t\t\t\t\t\tupdateStatusPanel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}", "protected boolean exploreFields(PreflightContext ctx, List<PDField> lFields) throws IOException\n {\n if (lFields != null)\n {\n // the list can be null if the field doesn't have children\n for (Object obj : lFields)\n {\n if (obj instanceof PDField)\n {\n if (!validateField(ctx, (PDField) obj))\n {\n return false;\n }\n }\n else if (obj instanceof PDAnnotationWidget)\n {\n // \"A field's children in the hierarchy may also include widget annotations\"\n ContextHelper.validateElement(ctx, ((PDAnnotationWidget) obj).getCOSObject(), ANNOTATIONS_PROCESS);\n }\n else\n {\n addValidationError(ctx, new ValidationError(ERROR_SYNTAX_BODY,\n \"Field can only have fields or widget annotations as KIDS\"));\n }\n }\n }\n return true;\n }", "private void checkHighlight(Point p) {\n\t\t\tfor (ChannelPanelBox box : boxList) {\n\t\t\t\tif (box.contains(p))\n\t\t\t\t\tbox.highlight(true);\n\t\t\t\telse\n\t\t\t\t\tbox.highlight(false);\n\t\t\t}\n\t\t}", "@Test\n public void getFieldCode() throws Exception {\n Document doc = new Document(getMyDir() + \"Nested fields.docx\");\n FieldIf fieldIf = (FieldIf) doc.getRange().getFields().get(0);\n\n // There are two ways of getting a field's field code:\n // 1 - Omit its inner fields:\n Assert.assertEquals(\" IF > 0 \\\" (surplus of ) \\\" \\\"\\\" \", fieldIf.getFieldCode(false));\n\n // 2 - Include its inner fields:\n Assert.assertEquals(\" IF \\u0013 MERGEFIELD NetIncome \\u0014\\u0015 > 0 \\\" (surplus of \\u0013 MERGEFIELD NetIncome \\\\f $ \\u0014\\u0015) \\\" \\\"\\\" \",\n fieldIf.getFieldCode(true));\n\n // By default, the GetFieldCode method displays inner fields.\n Assert.assertEquals(fieldIf.getFieldCode(), fieldIf.getFieldCode(true));\n //ExEnd\n }", "@Override\n public void afterTextChanged(Editable editable) {\n checkFieldsForEmptyValues();\n }", "@Override\n\tpublic void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n\t\t\n\t}", "@Override\n public ArrayList<HashMap> extractFields(List<Field> fields) {\n FieldExtractor extractor\n = new FieldExtractor((Element) fetcher.getHTMLDocument(), source);\n return extractor.run(fields);\n }", "public static void checkRepeatablefields() {\n\t\ttry {\n\t\t\tif (AndroidLocators.xpath(\"//*[@class='android.widget.LinearLayout']/android.widget.Button[@text='ADD']\")\n\t\t\t\t\t.isDisplayed()) {\n\t\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='ADD']\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" ---- Section fields form not found ---- \");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public void scan(WheatField wheatField)\n {\n for(int i =0; i<wheatField.getFieldSize(); i++)\n {\n for(int j =0; j<wheatField.getFieldSize(); j++)\n {\n wheatField.field[i][j].setPosition(new Position(i,j));\n }\n }\n }", "public void createFieldEditors() {\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SPACES_PER_TAB, \"Spaces per tab (Re-open editor to take effect.)\", getFieldEditorParent(), 2 ) );\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SECONDS_TO_REEVALUATE, \"Seconds between syntax reevaluation\", getFieldEditorParent(), 3 ) );\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.OUTLINE_SCALAR_MAX_LENGTH, \"Maximum display length of scalar\", getFieldEditorParent(), 4 ) );\n\t\taddField(new BooleanFieldEditor(PreferenceConstants.OUTLINE_SHOW_TAGS, \"Show tags in outline view\", getFieldEditorParent() ) );\n\n addField(new BooleanFieldEditor(PreferenceConstants.SYMFONY_COMPATIBILITY_MODE, \"Symfony compatibility mode\", getFieldEditorParent() ) );\t\t\n\t\n addField(new BooleanFieldEditor(PreferenceConstants.AUTO_EXPAND_OUTLINE, \"Expand outline on open\", getFieldEditorParent() ) );\n \n String[][] validationValues = new String[][] {\n \t\t{\"Error\", PreferenceConstants.SYNTAX_VALIDATION_ERROR}, \n \t\t{\"Warning\", PreferenceConstants.SYNTAX_VALIDATION_WARNING}, \n \t\t{\"Ignore\", PreferenceConstants.SYNTAX_VALIDATION_IGNORE}\n };\n addField(new ComboFieldEditor(PreferenceConstants.VALIDATION, \"Syntax validation severity\", validationValues, getFieldEditorParent()));\n\t\n\t}", "@Override\n public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n int indeks = e.getXIndex();\n// if(xData[0].equalsIgnoreCase(\"Kelebihan Kalori\")){\n// indeks += 1;\n// }\n System.out.println(\"Index: \" + indeks);\n if (e == null)\n return;\n\n else {\n if (arrayX.get(indeks).equalsIgnoreCase(\"breakfast\")) {\n Set<String> setPagi = spref.getStringSet(\"SetPagi\", null);\n PlaceholderFragment.showToast(getContext(), setPagi, \"Breakfast\");\n } else if (arrayX.get(indeks).equalsIgnoreCase(\"lunch\")) {\n Set<String> setSiang = spref.getStringSet(\"SetSiang\", null);\n PlaceholderFragment.showToast(getContext(), setSiang, \"Lunch\");\n } else if (arrayX.get(indeks).equalsIgnoreCase(\"dinner\")) {\n Set<String> setMalam = spref.getStringSet(\"SetMalam\", null);\n PlaceholderFragment.showToast(getContext(), setMalam, \"Dinner\");\n } else if (arrayX.get(indeks).equalsIgnoreCase(\"Not consumed\")) {\n\n } else if (arrayX.get(indeks).equalsIgnoreCase(\"Kelebihan Kalori\")) {\n\n }\n }\n }", "private void initHighlightLines()\r\n\t{\t\t\r\n\t\tfofHighlightRect = lang.newRect(new Offset(-2, -2, \"sourceCode\", AnimalScript.DIRECTION_NW), new Offset(2, 13*21, \"sourceCode\", AnimalScript.DIRECTION_NE), \"fofHighlightRect\", null, fofSourceCodeHighlightRect);\r\n\t\taddAdjHighlightRect = lang.newRect(new Offset(0, 5, \"fofHighlightRect\", AnimalScript.DIRECTION_SW), new Offset(2, 2, \"sourceCode\", AnimalScript.DIRECTION_SE), \"addAdjHighlightRect\", null, addAdjSourceCodeHighlightRect);\r\n\t\t\r\n\t\tfofHighlightRect.hide();\r\n\t\taddAdjHighlightRect.hide();\r\n\t}", "private void fillSearchFields() {\n view.setMinPrice(1);\n view.setMaxPrice(10000);\n view.setMinSQM(1);\n view.setMaxSQM(10000);\n view.setBedrooms(1);\n view.setBathrooms(1);\n view.setFloor(1);\n view.setHeating(false);\n view.setLocation(\"Athens\");\n }", "private void updateGrid() {\n if (intersection != null) {\n colorizeGrid();\n for (int x = 0; x < field.length; x++) {\n for (int y = 0; y < field[0].length; y++) {\n field[x][y].setText(intersection.getLetterCode(x, y));\n }\n }\n }\n }", "public void searchFunction1() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView_recylce.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "public void paint(final Graphics g) {\n Rectangle r = TextUtils.getEditorRect(component);\n for (int i = 0; i < highlights.size(); i++) {\n HighlightImpl hElem = highlights.getElem(i);\n int start = hElem.getStartOffset();\n int end = hElem.getEndOffset();\n if (hElem.needSimplePaint()) {\n hElem.getPainter().paint(g, start, end, r, component);\n }\n }\n }", "public boolean getHighlight();", "public static void setHandleKeyPress(TextField field, Function<String, Boolean> setter, Runnable onPass) {\n field.setOnKeyPressed(evt -> {\n KeyCode code = evt.getCode();\n if (field.getStyle().isEmpty() && (code.isLetterKey() || code.isDigitKey() || code == KeyCode.BACK_SPACE)) {\n field.setStyle(\"-fx-text-inner-color: darkgreen;\");\n } else if (code == KeyCode.ENTER) {\n boolean pass = setter.apply(field.getText());\n if (pass && onPass != null)\n onPass.run();\n\n field.setStyle(pass ? null : \"-fx-text-inner-color: red;\");\n }\n });\n }", "public Object visit(Field node){\n ClassTreeNode treeNode = classMap.get(currentClass);\n String fieldName = node.getName();\n if(SemanticAnalyzer.reservedIdentifiers.contains(fieldName)){\n errorHandler.register(Error.Kind.SEMANT_ERROR, classMap.get(currentClass).getASTNode().getFilename(),\n node.getLineNum(),\n \"Reserved word \" + fieldName + \" cannot be used as an identifier\");\n\n }\n treeNode.getVarSymbolTable().add(node.getName(), node.getType());\n //System.out.println(\"Field found: \" + node.getName() + \" added to \" + currentClass);\n return null;\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER){\n\t\t\tif(state == 0){\n\t\t\t\tint temp = numberHighlight.i;\n\t\t\t\t//stop number highlight thread;\n\t\t\t\tnumberHighlight.cancel(true);\n\t\t\t\t//update text field with number\n\t\t\t\ttextField.setText(textField.getText() + String.valueOf(temp));\n\t\t\t\tnumberButton[temp].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionHighlight.execute();\n\t\t\t\tstate = 1;\n\t\t\t}\n\t\t\telse if(state == 1){\n\t\t\t\top = functionHighlight.i;\n\t\t\t\ttextField.setText(textField.getText() + getFunc(op));\n\t\t\t\t//stop function highlight thread\n\t\t\t\tfunctionHighlight.cancel(true);\n\t\t\t\t//one object can only be run once therefore new object needs to be created\n\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\tnumberHighlight.execute();\n\t\t\t\tstate = 2;\n\t\t\t}\n\t\t\telse if(state == 2){\n\t\t\t\tint temp = numberHighlight.i;\n\t\t\t\tnumberHighlight.cancel(true);\n\t\t\t\ttextField.setText(textField.getText() + String.valueOf(temp));\n\t\t\t\tnumberButton[temp].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\ttextField.setText(evaluateExpr(textField.getText()));\n\t\t\t\t//after evaluation return to function enter state\n\t\t\t\tstate = 1;\n\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\tfunctionHighlight.execute();\n\t\t\t}\n\t\t}\n\t\t//clear the user input\n\t\tif(e.getKeyCode() == KeyEvent.VK_C){\n\t\t\tif(state == 1){\n\t\t\t\t\top = functionHighlight.i;\n\t\t\t\t\tfunctionHighlight.cancel(true);\n\t\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\t\tnumberHighlight.execute();\n\t\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t}\n\t\t\t\telse if(state == 2){\n\t\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t}\n\t\t\t\telse if(state ==3){\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\t\tnumberHighlight.execute();\n\t\t\t\t}\n\t\t}\n\t}", "@Override\n public void mousePressed(MouseEvent e) {\n//\t textFieldModifierNom_Match.setText(selectedMatch.getCodeMatch());\n\t }", "private void selectFieldsToDisplay()\n\t{\n\t\t_X_A0.setEnabled(true);\n\t\t_Y_A0.setEnabled(true);\n\t\tif ( _downStream == ProjectData.CAMS_NO_DOWNSTREAM || \n\t\t _downStream == ProjectData.LEVER_NO_DOWNSTREAM || \n\t\t _downStream == ProjectData.LEVER_PUSHER_TUGS)\n\t\t{\n\t\t\t_X_d.setEnabled(false);\n\t\t\t_Y_d.setEnabled(false);\n\t\t}\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE || \n\t\t\t _downStream != ProjectData.LEVER_FOUR_JOIN)\n\t\t{\n\t\t\t_X_s.setEnabled(false);\n\t\t\t_Y_s.setEnabled(false);\n\t\t}\n\t\t_ro_min.setEnabled(true);\n\t\t_L3.setEnabled(true);\n\t\tif ( _camProfile != ProjectData.LEVER_DOUBLE_CAM &&\n\t\t\t _camProfile != ProjectData.LEVER_BEAD_CAM &&\n\t\t\t _camProfile != ProjectData.SLIDER_DOUBLE_CAM &&\n\t\t\t _camProfile != ProjectData.SLIDER_BEAD_CAM)\n\t\t{\n\t\t\t_L31.setEnabled(false);\n\t\t}\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE ||\n\t\t\t _camType == ProjectData.ROLLER_LEVER && _downStream == ProjectData.LEVER_NO_DOWNSTREAM)\n\t\t{\n\t\t\t_L3p.setEnabled(false);\n\t\t}\n\t\tif ( _downStream == ProjectData.CAMS_NO_DOWNSTREAM || \n\t\t\t _downStream == ProjectData.LEVER_NO_DOWNSTREAM || \n\t\t\t _downStream == ProjectData.LEVER_PUSHER_TUGS)\n\t\t{\n\t\t\t_L4.setEnabled(false);\n\t\t}\n\t\t/*On L5 easier to use opposite logic.*/\n\t\t_L5.setEnabled(false);\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE && _downStream == ProjectData.CAMS_CRANK \n\t\t\t\t||\n\t\t\t _camType == ProjectData.ROLLER_LEVER && _downStream == ProjectData.LEVER_FOUR_JOIN)\n\t\t{\n\t\t\t_L5.setEnabled(true);\n\t\t}\n\t\t_L1.setEnabled(false);\n\t\t_rR.setEnabled(true);\n\t\t_rG.setEnabled(true);\n\t\t/*On ep easier to use opposite logic.*/\n\t\t_ep.setEnabled(false);\n\t\tif ( _camProfile == ProjectData.SLIDER_DOUBLE_CAM )\n\t\t{\n\t\t\t_ep.setEnabled(true);\n\t\t}\n\t\t/*On y easier to use opposite logic.*/\n\t\t_y.setEnabled(false);\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE || _downStream == ProjectData.LEVER_PUSHER_TUGS)\n\t\t{\n\t\t\t_y.setEnabled(true);\n\t\t}\n\t\tif ( _downStream == ProjectData.LEVER_NO_DOWNSTREAM ||\n\t\t\t _downStream == ProjectData.CAMS_CRANK)\n\t\t{\n\t\t\t_delta.setEnabled(false);\n\t\t}\n\t\tif ( _camProfile != ProjectData.LEVER_DOUBLE_CAM &&\n\t\t\t _camProfile != ProjectData.LEVER_BEAD_CAM )\t\n\t\t{\n\t\t\t_gama.setEnabled(false);\n\t\t}\n\t\t_miu_an_min.setEnabled(true);\n\t\t_miu_ab_min.setEnabled(true);\n\t\t_n.setEnabled(true);\n\t}", "@And(\"^I searched for \\\"([^\\\"]*)\\\"$\")\t\t\t//Currently used by Order search & Passive Device Container \r\n\tpublic void i_searched_for_device(String field) throws Exception {\r\n\t\tSystem.out.println(field);\r\n\t\tenduser.fill_fields(field);\r\n\t\t//enduser.click_searchBtn();\t \r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tenableFields();\n\n\t\t\t}" ]
[ "0.59010625", "0.57599", "0.5633858", "0.5551414", "0.5470681", "0.54304504", "0.542936", "0.54200757", "0.5347626", "0.5331333", "0.5247111", "0.5238523", "0.52343845", "0.5208479", "0.5166409", "0.5136758", "0.5134517", "0.50818664", "0.506982", "0.5037013", "0.5019025", "0.501891", "0.5014063", "0.5011171", "0.5004821", "0.50024396", "0.49908277", "0.4965126", "0.49409518", "0.4890526", "0.48829225", "0.48804125", "0.48753923", "0.48506755", "0.48450312", "0.48392916", "0.4839287", "0.48169577", "0.48041058", "0.48040316", "0.4794565", "0.47920266", "0.47814548", "0.47662055", "0.4748206", "0.47401384", "0.4739529", "0.47365272", "0.47355545", "0.47303686", "0.472682", "0.4722542", "0.47199324", "0.4713755", "0.47020856", "0.46964902", "0.46956998", "0.46859914", "0.46858555", "0.46810365", "0.46715865", "0.46577594", "0.46552876", "0.46491736", "0.4648758", "0.46435046", "0.46250764", "0.46055242", "0.4601175", "0.4599278", "0.4594248", "0.45937055", "0.45868808", "0.45818806", "0.45793957", "0.45785412", "0.45768386", "0.45766935", "0.45679042", "0.45670873", "0.45659265", "0.45617205", "0.45549625", "0.45543578", "0.4550124", "0.45431373", "0.45416784", "0.45415857", "0.45404068", "0.4540282", "0.45397082", "0.4539005", "0.45338607", "0.453299", "0.45301896", "0.4530126", "0.45297617", "0.45283738", "0.45277095", "0.45271078" ]
0.45533946
84
/Simulate KeyTab prese/release event using Robot class
public static void keyPressAndReleaseTab() { Robot robot = null; try { robot = new Robot(); } catch (AWTException e) { // TODO Auto-generated catch block e.printStackTrace(); } robot.keyPress(KeyEvent.VK_TAB); // here we simulate PRESS a TAB robot.keyRelease(KeyEvent.VK_TAB); // here we simulate RELEASE a TAB }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyTab(){\n\n try {\n driver.switchTo().activeElement().sendKeys(Keys.TAB);\n\t\t\tLOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass \");\n\n }catch(Exception e)\n {\n\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail \");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while clicking on Tab button\");\n\t\t\n }\n }", "@Override\n\tpublic void processKeyPressed(KeyEvent e) {\n\t\tsuper.processKeyPressed(e);\n\t\tif (e.isConsumed())\n\t\t\treturn;\n\n\t\tif (e.getKeyCode() == KeyEvent.VK_TAB)\n\t\t\tgameText.keyPressed();\n\t}", "@Override\n public void triggerKeyRelease(KeyEvent e) {\n\n }", "public void call(KeyEvent event) {\n if(event.getKeyCode() == KeyEvent.KeyCode.KEY_TAB) {\n if(event.isShiftPressed()) {\n Core.getShared().getFocusManager().gotoPrevFocusableNode();\n } else {\n Core.getShared().getFocusManager().gotoNextFocusableNode();\n }\n }\n \n //check for arrow keys\n switch(event.getKeyCode()) {\n case KEY_LEFT_ARROW:\n case KEY_RIGHT_ARROW:\n case KEY_DOWN_ARROW:\n case KEY_UP_ARROW:\n handleArrowKeys(event);\n }\n }", "public static void main(String[] args) throws Exception {\n\t\t\t\tlaunchBrowser(\"ch\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tRobot rb = new Robot();\n\t\t\t\trb.keyPress(KeyEvent.VK_TAB);\n\t\t\t\trb.keyRelease(KeyEvent.VK_TAB);\n\t\t\t\tThread.sleep(2000);\n\t\t\t\trb.keyPress(KeyEvent.VK_A); //--> to type a letter A\n\t\t\t\trb.keyRelease(KeyEvent.VK_A);\n\t\t\t\trb.keyPress(KeyEvent.VK_D); \n\t\t\t\trb.keyRelease(KeyEvent.VK_D);\n\t\t\t\trb.keyPress(KeyEvent.VK_M); \n\t\t\t\trb.keyRelease(KeyEvent.VK_M);\n\t\t\t\trb.keyPress(KeyEvent.VK_I); \n\t\t\t\trb.keyRelease(KeyEvent.VK_I);\n\t\t\t\trb.keyPress(KeyEvent.VK_N); \n\t\t\t\trb.keyRelease(KeyEvent.VK_N);\n\t\t\t\trb.keyPress(KeyEvent.VK_1); \n\t\t\t\trb.keyRelease(KeyEvent.VK_1);\n\t\t\t\trb.keyPress(KeyEvent.VK_2); \n\t\t\t\trb.keyRelease(KeyEvent.VK_2);\n\t\t\t\trb.keyPress(KeyEvent.VK_3); \n\t\t\t\trb.keyRelease(KeyEvent.VK_3);\n\t\t\t\t//rb.keyPress(KeyEvent.VK_AT); \n\t\t\t\t//rb.keyRelease(KeyEvent.VK_AT);\n\t\t\t\trb.keyPress(KeyEvent.VK_G); \n\t\t\t\trb.keyRelease(KeyEvent.VK_G);\n\t\t\t\trb.keyPress(KeyEvent.VK_M); \n\t\t\t\trb.keyRelease(KeyEvent.VK_M);\n\t\t\t\trb.keyPress(KeyEvent.VK_A); \n\t\t\t\trb.keyRelease(KeyEvent.VK_A);\n\t\t\t\trb.keyPress(KeyEvent.VK_I); \n\t\t\t\trb.keyRelease(KeyEvent.VK_I);\n\t\t\t\trb.keyPress(KeyEvent.VK_L); \n\t\t\t\trb.keyRelease(KeyEvent.VK_L);\n\t\t\t\trb.keyPress(KeyEvent.VK_PERIOD); \n\t\t\t\trb.keyRelease(KeyEvent.VK_PERIOD);\n\t\t\t\trb.keyPress(KeyEvent.VK_C); \n\t\t\t\trb.keyRelease(KeyEvent.VK_C);\n\t\t\t\trb.keyPress(KeyEvent.VK_O); \n\t\t\t\trb.keyRelease(KeyEvent.VK_O);\n\t\t\t\trb.keyPress(KeyEvent.VK_M); \n\t\t\t\trb.keyRelease(KeyEvent.VK_M);\n\t\t\t\tThread.sleep(5000);\n\t\t\t\trb.keyPress(KeyEvent.VK_TAB);\n\t\t\t\trb.keyRelease(KeyEvent.VK_TAB);\n\t\t\t\tThread.sleep(2000);\n\t\t\t\trb.keyPress(KeyEvent.VK_TAB);\n\t\t\t\trb.keyRelease(KeyEvent.VK_TAB);\n\t\t\t\tThread.sleep(2000);\n\t\t\t\trb.keyPress(KeyEvent.VK_ENTER);\n\t\t\t\trb.keyRelease(KeyEvent.VK_ENTER);\n\t\t\t\t\n\t\t\t\t//File upload test cases we used to do that --> \n\t\t\t\t//This will work on focus basis --> Recomended\n\t\t\t\t//No gurantee whether it is success or not\n\t\t\t\t// Always recomended we have to ask the developers to write elements/Automation supported codes\n\t\t\t\t\n\t\t\t\t//This is recomended but can be used in browser only\n\t\t\t\t//driver.findElement(By.xpath(\"//button[contains(text(),'Login to Account')]\")).sendKeys(keys.ENTER);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void keyDown() {\n\n driver.switchTo().activeElement().sendKeys(Keys.ARROW_DOWN);\n driver.switchTo().activeElement().sendKeys( Keys.ENTER);\n\n\n }", "public final void keyPressed(KeyEvent keyevent) {\n idleTime = 0; //idleTime\n int i = keyevent.getKeyCode(); //get the code\n int j = keyevent.getKeyChar(); //get the char\n\n //start detection algorithms xD\n\n\n /*\n if(i == 38) { //up\n client.inputString = \"fail\";\n client.inputTaken = true;\n }\n \n if(i == 40) { //down\n client.inputString = \"fail\";\n client.inputTaken = true;\n }\n */\n\n\n if (i == 86) { //V\n pressingV = true;\n }\n if (i == 17) { //CTRL\n pressingCtrl = true;\n }\n\n if (i == KeyEvent.VK_F1) {\n client.setTab(0);\n }\n if (i == KeyEvent.VK_F2) {\n client.setTab(1);\n }\n if (i == KeyEvent.VK_F3) {\n client.setTab(2);\n }\n if (i == KeyEvent.VK_F4) {\n client.setTab(3);\n }\n if (i == KeyEvent.VK_F5) {\n client.setTab(4);\n }\n if (i == KeyEvent.VK_F6) {\n client.setTab(5);\n }\n if (i == KeyEvent.VK_F7) {\n client.setTab(6);\n }\n if (i == KeyEvent.VK_F8) {\n client.setTab(8);\n }\n if (i == KeyEvent.VK_F9) {\n client.setTab(9);\n }\n if (i == KeyEvent.VK_ESCAPE) {\n client.setTab(10); //logout tab\n }\n if (i == KeyEvent.VK_F10) {\n client.setTab(11);\n }\n if (i == KeyEvent.VK_F11) {\n client.setTab(12);\n }\n if (i == KeyEvent.VK_F12) {\n client.setTab(13);\n }\n\n //WTF do these DO!!!\n if (j < 30) {\n j = 0;\n }\n\n\n if (i == 37) //left arrow\n {\n j = 1;\n }\n if (i == 39) //right arrow\n {\n j = 2;\n }\n if (i == 38) //up arrow\n {\n j = 3;\n }\n if (i == 40) //down arrow\n {\n j = 4;\n }\n\n\n if (i == 17) {\n j = 5;\n }\n if (i == 8) {\n j = 8;\n }\n if (i == 127) {\n j = 8;\n }\n if (i == 9) {\n j = 9;\n }\n if (i == 10) {\n j = 10;\n }\n if (i >= 112 && i <= 123) {\n j = (1008 + i) - 112;\n }\n if (i == 36) {\n j = 1000;\n }\n if (i == 35) {\n j = 1001;\n }\n if (i == 33) {\n j = 1002;\n }\n if (i == 34) {\n j = 1003;\n }\n\n if (j > 0 && j < 128) {\n keyArray[j] = 1;\n }\n if (j > 4) { //not arrow keys\n charQueue[anInt33] = j; //writeIndex for the key code\n anInt33 = anInt33 + 1 & 0x7f; //writeIndex\n }\n }", "public boolean pressTab() {\n\t\treturn false;\n\t}", "public native void onKeyDown( KeyEvent event, long time, int keyCode, int metaState, int unicodeChar, int repeatCount );", "public void keyPressed(KeyEvent e) {\r\n\r\n\t\tif (getAceptarKeyLikeTabKey()) {\r\n\t\t\tint key = e.getKeyCode();\r\n\t\t\tif (key == KeyEvent.VK_ENTER) {\r\n\t\t\t\ttransferFocus();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void keyPressed(KeyEvent e) {}", "@SuppressWarnings(\"deprecation\")\n void updateFocusTraversalKeys() {\n /*\n * Fix for 4514331 Non-editable JTextArea and similar\n * should allow Tab to keyboard - accessibility\n */\n EditorKit editorKit = getEditorKit(editor);\n if (editorKit instanceof DefaultEditorKit) {\n Set<AWTKeyStroke> storedForwardTraversalKeys = editor.\n getFocusTraversalKeys(KeyboardFocusManager.\n FORWARD_TRAVERSAL_KEYS);\n Set<AWTKeyStroke> storedBackwardTraversalKeys = editor.\n getFocusTraversalKeys(KeyboardFocusManager.\n BACKWARD_TRAVERSAL_KEYS);\n Set<AWTKeyStroke> forwardTraversalKeys =\n new HashSet<AWTKeyStroke>(storedForwardTraversalKeys);\n Set<AWTKeyStroke> backwardTraversalKeys =\n new HashSet<AWTKeyStroke>(storedBackwardTraversalKeys);\n if (editor.isEditable()) {\n forwardTraversalKeys.\n remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));\n backwardTraversalKeys.\n remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,\n InputEvent.SHIFT_MASK));\n } else {\n forwardTraversalKeys.add(KeyStroke.\n getKeyStroke(KeyEvent.VK_TAB, 0));\n backwardTraversalKeys.\n add(KeyStroke.\n getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));\n }\n LookAndFeel.installProperty(editor,\n \"focusTraversalKeysForward\",\n forwardTraversalKeys);\n LookAndFeel.installProperty(editor,\n \"focusTraversalKeysBackward\",\n backwardTraversalKeys);\n }\n\n }", "@Override\n\tpublic void pressTab() {\n\t\tSystem.out.println(\"Change active control.\");\n\t\t\n\t\tchangeCurrentControl(false);\n\t\t\n\t\tif (getCurrentControlIndex() < getControls().size() - 1) \n\t\t\tsetCurrentControlIndex(getCurrentControlIndex() + 1);\n\t\telse \n\t\t\tsetCurrentControlIndex(0);\n\n\t\tchangeCurrentControl(true);\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(4));\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(keyDown!=e.getKeyCode()-65&&e.getKeyCode()-65>=0&&e.getKeyCode()-65<=25) {\n\t\t\tif(keyDown>-1) {\n\t\t\t\tk1.pressed(keyDown, false);\n\t\t\t\tk2.pressed(-1, false);\n\t\t\t}\n\t\t\tk1.pressed(e.getKeyCode()-65, true);\n\t\t\t\n\t\t\tint n = machine.run(e.getKeyCode()-65);\n\t\t\tk2.pressed(n, true);\n\t\t\tkeyDown = e.getKeyCode()-65;\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\tmachine.space();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n\t\t\tmachine.back();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tmachine.enter();\n\t\t}\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(3));\r\n\t\t\t}", "@Override\n public void handle(KeyEvent event) {\n if (event.getCode() == KeyCode.ENTER || kcUp.match(event) || kcDown.match(event)) {\n /*\n * Requests Focus for the first Field in the currently selected Tab.\n */\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n /*\n * Checks, if the KeyCombination for Next-Tab is pressed.\n */\n } else if (kcPlus.match(event)) {\n /*\n * Switches to the next Tab to the right (first One, if the rightmost Tab was already \n * selected) and requests Focus for it's first Field.\n */\n tabs.getSelectionModel().select(Math.floorMod(\n tabs.getSelectionModel().getSelectedIndex() + 1, 4));\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n /*\n * Checks, if the KeyCombination for Previous-Tab is pressed.\n */\n } else if (kcMinus.match(event)) {\n /*\n * Switches to the next Tab to the left (first One, if the leftmost Tab was already \n * selected) and requests Focus for it's first Field.\n */\n tabs.getSelectionModel().select(Math.floorMod(\n tabs.getSelectionModel().getSelectedIndex() - 1, 4));\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n }\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(1));\r\n\t\t\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\r\n switchKey(e.getKeyCode(), true);\r\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) \n\t{\n\t\tint key = e.getKeyCode();\n\t\tif(key == e.VK_SPACE)\n\t\t{\n\t\t\thome = false;\n\t\t\tinstruction = false;\n\t\t}\n\t\tif(key == e.VK_R)\n\t\t{\n\t\t\thome = true;\n\t\t}\n\t\tif(key == e.VK_Z)\n\t\t{\n\t\t\thome = false;\n\t\t}\n\t\tif(key == e.VK_B)\n\t\t{\n\t\t\thome = true;\n\t\t}\n\t}", "public void keyPressed() { \n\t\twantsFrameBreak = true;\n\t\t//key = e.getKeyChar();\n\t\tkeyPressed = true;\n\t\tif (System.nanoTime() - acted > .033e9f) {\n\t\t\t_keyPressed();\n\t\t}\n\t}", "void keyHome();", "@Override\n public void triggerKeyPress(KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menuSelection++;\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menuSelection--;\n if (menuSelection < 0) {\n menuSelection = menuLengths[menuState] - 1;\n }\n } else if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n handleEnterPress();\n }\n\n menuSelection %= menuLengths[menuState];\n\n }", "public void keyPressed(KeyEvent e) {\r\n\t\t\t\tint k = e.getKeyCode();\r\n\t\t\t\tif (k == KeyEvent.VK_CONTROL) {\r\n\t\t\t\t\talphabetize();\r\n\t\t\t\t\ttable.validate();\r\n\t\t\t\t}\r\n\t\t\t}", "public void keyPressed( KeyEvent e ) { }", "public void testShortcuts() {\n TestMode mode2 = new TestMode2();\n\n inputScheme.addMode(2, mode2);\n inputScheme.switchMode(2);\n // CMD+ALT+s\n mode2.addShortcut(new EventShortcut(ModifierKeys.ACTION | ModifierKeys.ALT, 's') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // SHIFT+TAB\n mode2.addShortcut(new EventShortcut(ModifierKeys.SHIFT, KeyCodeMap.TAB) {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // CMD+\\\n mode2.addShortcut(new EventShortcut(ModifierKeys.ACTION, '\\\\') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // ;\n mode2.addShortcut(new EventShortcut(ModifierKeys.NONE, ';') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // .\n mode2.addShortcut(new EventShortcut(ModifierKeys.ALT, '.') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // PAGE_UP\n mode2.addShortcut(new EventShortcut(ModifierKeys.NONE, KeyCodeMap.PAGE_UP) {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // feed in javascript keycode representations\n TestSignalEvent evt1 = new TestSignalEvent('A');\n TestSignalEvent evt2 = new TestSignalEvent('A', ModifierKeys.ACTION, ModifierKeys.ALT);\n TestSignalEvent evt3 = new TestSignalEvent('S');\n TestSignalEvent evt4 = new TestSignalEvent('S', ModifierKeys.ACTION, ModifierKeys.ALT);\n TestSignalEvent evt5 = new TestSignalEvent(KeyCode.TAB, ModifierKeys.SHIFT);\n TestSignalEvent evt6 = new TestSignalEvent(KeyCode.BACKSLASH, ModifierKeys.ACTION);\n TestSignalEvent evt7 = new TestSignalEvent(KeyCode.SEMICOLON);\n TestSignalEvent evt8 = new TestSignalEvent(KeyCode.PERIOD, ModifierKeys.ALT);\n TestSignalEvent evt9 = new TestSignalEvent(KeyCode.PAGE_UP);\n \n // evt1..3 shouldn't fire the callback, only evt4..6 should\n inputScheme.initFlag(0, 1);\n assertFalse(sendSignal(evt1));\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(evt2));\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(evt3));\n assertEquals(inputScheme.getFlag(), 0);\n assertTrue(sendSignal(evt4));\n assertEquals(inputScheme.getFlag(), 1);\n inputScheme.initFlag(0, 2);\n assertTrue(sendSignal(evt5));\n assertEquals(inputScheme.getFlag(), 2);\n inputScheme.initFlag(0, 3);\n assertTrue(sendSignal(evt6));\n assertEquals(inputScheme.getFlag(), 3);\n inputScheme.initFlag(0, 4);\n assertTrue(sendSignal(evt7));\n assertEquals(inputScheme.getFlag(), 4);\n inputScheme.initFlag(0, 5);\n assertTrue(sendSignal(evt8));\n assertEquals(inputScheme.getFlag(), 5);\n inputScheme.initFlag(0, 6);\n assertTrue(sendSignal(evt9));\n assertEquals(inputScheme.getFlag(), 6);\n \n // now try out StreamShortcuts, such as vi quit: \":q!\"\n \n mode2.addShortcut(new StreamShortcut(\":q!\") {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n });\n \n TestSignalEvent x = new TestSignalEvent('X');\n TestSignalEvent excl = new TestSignalEvent('1', ModifierKeys.SHIFT); // !\n TestSignalEvent q = new TestSignalEvent('Q');\n TestSignalEvent upperQ = new TestSignalEvent('Q', ModifierKeys.SHIFT);\n TestSignalEvent colon = new TestSignalEvent(KeyCode.SEMICOLON, null, ModifierKeys.SHIFT);\n\n inputScheme.initFlag(0, 2);\n assertFalse(sendSignal(x)); // random entry\n assertEquals(inputScheme.getFlag(), 0);\n assertTrue(sendSignal(colon)); // beginning of command\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(upperQ)); // test uppercase vs lowercase\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(excl));\n assertEquals(inputScheme.getFlag(), 0);\n \n // do the combo :q!\n assertTrue(sendSignal(colon));\n assertTrue(sendSignal(q));\n assertTrue(sendSignal(excl));\n assertEquals(inputScheme.getFlag(), 2); // triggers callback\n assertFalse(sendSignal(x)); // should reset\n }", "@DISPID(-2147412107)\n @PropGet\n java.lang.Object onkeydown();", "public void keyPressed(KeyEvent e) { }", "public void keyReleased (KeyEvent e){}", "@Override\r\n\tpublic void keyReleased(KeyEvent e)\r\n\t{\n\t\tif (e.getKeyCode() == KeyEvent.VK_SPACE)\r\n\t\t{\r\n\t\t\tjump();\r\n\t\t}\r\n\t}", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyReleased(KeyEvent e) {}", "public void keyReleased(KeyEvent e) {}", "public void keyReleased(KeyEvent e) {}", "@Override\n public void onKeyDown(MHKeyEvent e)\n {\n \n }", "void setTabindex(int tabindex);", "public void keyReleased(KeyEvent e){}", "void keyPress(int key);", "public void keyPressed(KeyEvent e) {\n\t\t\t\t\t}", "public void keyPressed(KeyEvent e){\n\t\t\t\n\t\t\tif (canbemoved){\n\t\t\t\tif(e.getKeyCode() == KeyEvent.VK_A){t.move(-200);}\n\t\t\t\telse if (e.getKeyCode() == KeyEvent.VK_D){ t.move(200); }\n\t\t\t\tcanbemoved = false;\n\t\t\t}\n\t\t\t\n\t\t}", "public void keyPressed(KeyEvent e) {\n\t\t\t\t}", "public void keyPressed(KeyEvent e) {\n\t\t\t\t}", "public void keyPressed(KeyEvent e) {\n\t\t\t\t}", "public void hitKey() {\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(0));\r\n\t\t\t}", "public void keyPressed(KeyEvent e) {\n\r\n\t}", "public void keyPressed(KeyEvent e) {\n\t\t\r\n\t}", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "public void keyPressed(KeyEvent e) {\n \t\tswitch (e.getKeyCode()) {\n \t\t\tcase KeyEvent.VK_LEFT:\n \t\t\t\tif (!isPaused && !isOver) {\n \t\t\t\t\trb.setAccel(new Point2D.Double(-3, 0));\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_RIGHT:\n \t\t\t\tif (!isPaused && !isOver) {\n \t\t\t\t\trb.setAccel(new Point2D.Double(+3, 0));\n \t\t\t\t}\n \t\t\t\tbreak;\n \n \t\t\tcase KeyEvent.VK_ESCAPE:\n \t\t\t\tSystem.exit(0);\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_SPACE:\n\t\t\t\tif (isStarted && !isOver) {\n \t\t\t\t\ttogglePaused();\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_WINDOWS:\n \t\t\t\tif (!isStarted) {\n \t\t\t\t\tstartGame();\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t}\n \t}", "public void keyPressed(KeyEvent e)\n {\n \tint keyCode = e.getKeyCode();\n \tswitch(keyCode)\n \t{\n \t\tcase KeyEvent.VK_LEFT:\t//left arrow\n \t\t\ttanksGame.leftKey();\n \t\t\tbreak;\n \t\tcase KeyEvent.VK_UP:\t//up arrow\n \t\t\ttanksGame.upKey();\n \t\t\tbreak;\n \t\tcase KeyEvent.VK_DOWN:\t//down arrow\n \t\t\ttanksGame.downKey();\n \t\t\tbreak;\n \t\tcase KeyEvent.VK_RIGHT:\t//right arrow\n \t\t\ttanksGame.rightKey();\n \t\t\tbreak;\n \t\tcase KeyEvent.VK_ENTER: //enter\n \t\t tanksGame.enterKey();\n \t\t\tbreak;\n \t\tdefault:\n \t\t\t// ignore other keys\n \t\t\tbreak;\n \t}\n \t\n }", "public void keyPressed(KeyEvent e) {\n }", "@Override\r\n public void keyReleased(KeyEvent e) {\r\n switchKey(e.getKeyCode(), false);\r\n }", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onKeyPressed(KeyEvent event) {\n }", "@Override\n\tpublic void keyPressed(KeyEvent evt) {\n\t\t\n\t}", "@Override\n\tpublic void onKeyRelease(KeyEvent e) {\n\t\t\n\t}", "public void keyReleased(KeyEvent e)\n {\n \n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "default void interactWith(Key key) {\n\t}", "boolean mo1311a(KeyEvent keyEvent);", "public void keyPressed(KeyEvent e) {\n\t\t\tathlete.keyPressed(e);\n\t\t}", "public void processKeyEvent(Component paramComponent, KeyEvent paramKeyEvent)\n/* */ {\n/* 1118 */ if (consumeProcessedKeyEvent(paramKeyEvent)) {\n/* 1119 */ return;\n/* */ }\n/* */ \n/* */ \n/* 1123 */ if (paramKeyEvent.getID() == 400) {\n/* 1124 */ return;\n/* */ }\n/* */ \n/* 1127 */ if ((paramComponent.getFocusTraversalKeysEnabled()) && \n/* 1128 */ (!paramKeyEvent.isConsumed()))\n/* */ {\n/* 1130 */ AWTKeyStroke localAWTKeyStroke1 = AWTKeyStroke.getAWTKeyStrokeForEvent(paramKeyEvent);\n/* 1131 */ AWTKeyStroke localAWTKeyStroke2 = AWTKeyStroke.getAWTKeyStroke(localAWTKeyStroke1.getKeyCode(), localAWTKeyStroke1\n/* 1132 */ .getModifiers(), \n/* 1133 */ !localAWTKeyStroke1.isOnKeyRelease());\n/* */ \n/* */ \n/* */ \n/* 1137 */ Set localSet = paramComponent.getFocusTraversalKeys(0);\n/* */ \n/* 1139 */ boolean bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1140 */ boolean bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1142 */ if ((bool1) || (bool2)) {\n/* 1143 */ consumeTraversalKey(paramKeyEvent);\n/* 1144 */ if (bool1) {\n/* 1145 */ focusNextComponent(paramComponent);\n/* */ }\n/* 1147 */ return; }\n/* 1148 */ if (paramKeyEvent.getID() == 401)\n/* */ {\n/* 1150 */ this.consumeNextKeyTyped = false;\n/* */ }\n/* */ \n/* 1153 */ localSet = paramComponent.getFocusTraversalKeys(1);\n/* */ \n/* 1155 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1156 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1158 */ if ((bool1) || (bool2)) {\n/* 1159 */ consumeTraversalKey(paramKeyEvent);\n/* 1160 */ if (bool1) {\n/* 1161 */ focusPreviousComponent(paramComponent);\n/* */ }\n/* 1163 */ return;\n/* */ }\n/* */ \n/* 1166 */ localSet = paramComponent.getFocusTraversalKeys(2);\n/* */ \n/* 1168 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1169 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1171 */ if ((bool1) || (bool2)) {\n/* 1172 */ consumeTraversalKey(paramKeyEvent);\n/* 1173 */ if (bool1) {\n/* 1174 */ upFocusCycle(paramComponent);\n/* */ }\n/* 1176 */ return;\n/* */ }\n/* */ \n/* 1179 */ if ((!(paramComponent instanceof Container)) || \n/* 1180 */ (!((Container)paramComponent).isFocusCycleRoot())) {\n/* 1181 */ return;\n/* */ }\n/* */ \n/* 1184 */ localSet = paramComponent.getFocusTraversalKeys(3);\n/* */ \n/* 1186 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1187 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1189 */ if ((bool1) || (bool2)) {\n/* 1190 */ consumeTraversalKey(paramKeyEvent);\n/* 1191 */ if (bool1) {\n/* 1192 */ downFocusCycle((Container)paramComponent);\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "public void keyPressed(KeyEvent e) {\n\t\t\t\tgetCmdNXT().commandPressedTerrorist(e.getKeyChar());\r\n\t\t\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t}", "@Override\r\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\n }", "public void keyReleased(KeyEvent arg0) {}", "@Override\r\n public void keyPressed(KeyEvent ke) {\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n public void keyPressed(KeyEvent e) {\n\n }", "@Override\n public void keyPressed(KeyEvent e) {\n\n }", "public void keyPressed( KeyEvent e ) {\n\t\tboolean stepDurChange = false;\n\t\tif (RLPanel.enableSpeedControls \n\t\t\t\t&& e.getKeyChar() == '+') { // speed up\n\t\t\tstepDurChange = true;\n\t\t\tRunLocalExperiment.stepDurInMilliSecs = Math.max(RunLocalExperiment.stepDurInMilliSecs / Math.cbrt(2.0), 1); // speed doubles every 3 presses\n\t\t}\n\t\telse if (RLPanel.enableSpeedControls \n\t\t\t\t&& e.getKeyChar() == '-') { // slow down\n\t\t\tstepDurChange = true;\n\t\t\tRunLocalExperiment.stepDurInMilliSecs = Math.max((RunLocalExperiment.stepDurInMilliSecs * Math.cbrt(2.0)), 1.0); // speed halves every 3 presses\n\t\t}\n\t\telse if (e.getKeyChar() == '0') { // stop exp\n\t\t\trunLocal.stopExp();\n\t\t}\n\t\telse if (RLPanel.enableSingleStepControl \n\t\t\t\t&& e.getKeyChar() == '1') { // take step (only makes sense when stopped)\n\t\t\trunLocal.takeStep(true);\n\t\t}\n\t\telse if (e.getKeyChar() == '2') { // start exp\n\t\t\trunLocal.startExp();\n\t\t}\n\t\tif (stepDurChange) { // handle change in step duration\n\t\t\trunLocal.stopExp();\n\t\t\ttimeOfLastDurChange = getCurrentTimeInSecs();\n\t\t\trunLocal.startExp();\n\t\t}\n\t\tif (e.getKeyChar() == 'u') { // start exp\n\t\t\tupdate(null, null);\n\t\t}\n\t\te.consume();\n\t\t\n\t}", "@Override\r\n public void keyPressed( KeyEvent cIniKeyEvent)\r\n {\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n \t Robot r;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tr = new Robot();\r\n\t\t\t\t int keyCode = KeyEvent.VK_ENTER; // the A key\r\n\t\t\t\t r.keyPress(keyCode);\t\t\t\t \r\n\t\t\t\t} catch (AWTException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tactivarBoton();\r\n\t}", "public void keyReleased(KeyEvent arg0) {\n\t\n}" ]
[ "0.7281928", "0.7076205", "0.68337595", "0.6670787", "0.6523778", "0.651222", "0.64484954", "0.6345433", "0.6261707", "0.62422854", "0.6223131", "0.6221481", "0.6207557", "0.61841786", "0.61775863", "0.6176849", "0.6172016", "0.6164785", "0.614375", "0.6135592", "0.61332846", "0.6127329", "0.61270076", "0.6121783", "0.60824555", "0.60759884", "0.60732746", "0.6066581", "0.60449255", "0.6005592", "0.6001402", "0.5997526", "0.5997526", "0.5997526", "0.5991015", "0.5991015", "0.5991015", "0.59890205", "0.5986356", "0.5980142", "0.5977356", "0.59699386", "0.59605384", "0.5954892", "0.5954892", "0.5954892", "0.59542525", "0.59507084", "0.5946884", "0.5915688", "0.59010327", "0.5885116", "0.5882443", "0.5879035", "0.5874044", "0.5870185", "0.5870185", "0.5870185", "0.5870185", "0.58627677", "0.58546305", "0.58514327", "0.58454555", "0.58365744", "0.58365744", "0.58365744", "0.58340305", "0.5833719", "0.5833457", "0.5833136", "0.58102196", "0.5808363", "0.58046705", "0.5803902", "0.5802509", "0.5798907", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.57913285", "0.5788336", "0.5788336", "0.57829314", "0.5782456", "0.57780164", "0.5776701", "0.57703626" ]
0.8502423
0
/ Highlights the fileds in yellow color apply for the filed that is under typing
public static void HighLightElement(WebElement element) { js = (JavascriptExecutor) driver; js.executeScript("arguments[0].setAttribute('style','background: yellow; border: 2px solid red;')", element); try { Thread.sleep(10); } catch (Exception e) { System.out.println(e.getMessage()); } js.executeScript("arguments[0].setAttribute('style','border: solid 2px white')", element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSearchNameTextFieldBackgroundColor(String color) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyBackgroundColor\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchNameTextField_propertyBackgroundColor\", color == null ? \"\" : \"background: \" + color);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchNameTextFieldBackgroundColor(\" + escapeString(color) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void validateTextField ()\r\n\t{\r\n\t\tif (isEditValid ())\r\n\t\t{\r\n\t\t\tsuper.setBackground (UIConstants.GEOPOD_GREEN);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsuper.setBackground (UIConstants.GEOPOD_RED);\r\n\t\t}\r\n\t}", "private void setupOptionalFields() {\n // Optional fields <-> labels\n Map<AutoCompleteTextView, TextView> map = new HashMap<>();\n map.put(mBind.backgroundEdit, mBind.backgroundLabel);\n map.put(mBind.maxWidthEdit, mBind.maxWidthLabel);\n map.put(mBind.maxHeightEdit, mBind.maxHeightLabel);\n\n for (Map.Entry<AutoCompleteTextView, TextView> e : map.entrySet()) {\n // On every keystroke, check if field is empty, and if yes, strike through its label\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n int mode = e.getValue().getPaintFlags();\n if (e.getKey().getText().toString().equals(\"\"))\n mode = Util.setFlag(mode, Paint.STRIKE_THRU_TEXT_FLAG);\n else\n mode = Util.unsetFlag(mode, Paint.STRIKE_THRU_TEXT_FLAG);\n e.getValue().setPaintFlags(mode);\n }\n });\n }\n }", "@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tif (field.getText().equals(name)) {\r\n\t\t\t\t\tfield.setText(\"\");\r\n\t\t\t\t\tfield.setForeground(Color.black);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent e) {\n\t\tif(!tfPolje.getText().trim().equals(\"\")){\r\n\t\t\ttfPolje.setBackground(Color.WHITE);\r\n\t\t}\r\n\t}", "private void changeColors(){\n \n Color vaccanceColor = vaccance.getValue();\n String vaccRGB = getRGB(vaccanceColor);\n databaseHandler.setTermColor(\"vaccance\", vaccRGB);\n \n Color travailColor = travail.getValue();\n String travailRGB = getRGB(travailColor);\n databaseHandler.setTermColor(\"travail\", travailRGB);\n \n Color AnnivColor = anniverssaire.getValue();\n String summerSemRGB = getRGB(AnnivColor);\n databaseHandler.setTermColor(\"annivessaire\", summerSemRGB);\n \n Color formationColor = formation.getValue();\n String formationRGB = getRGB(formationColor);\n databaseHandler.setTermColor(\"formation\", formationRGB);\n \n Color workshopColor = workshop.getValue();\n String workshopRGB = getRGB(workshopColor);\n databaseHandler.setTermColor(\"workshop\", workshopRGB);\n \n Color certifColor = certif.getValue();\n String certifRGB = getRGB(certifColor);\n databaseHandler.setTermColor(\"certif\", certifRGB);\n \n Color importantColor = important.getValue();\n String importantRGB = getRGB(importantColor);\n databaseHandler.setTermColor(\"important\", importantRGB);\n \n Color urgentColor = urgent.getValue();\n String allHolidayRGB = getRGB(urgentColor);\n databaseHandler.setTermColor(\"urgent\", allHolidayRGB);\n \n \n \n }", "private void _updateField(Color c) {\n if (_isBackgroundColor) {\n _colorField.setBackground(c);\n }\n else {\n _colorField.setForeground(c);\n }\n _colorField.setText(getLabelText() + \" (\"+_option.format(c)+\")\");\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "private void resetFieldColors() {\r\n userText.setBackgroundColor(ContextCompat.getColor(this, R.color.cleanBackground));\r\n passText.setBackgroundColor(ContextCompat.getColor(this, R.color.cleanBackground));\r\n }", "public TextFieldFuncion(String texto,Color color){\n\t\tsuper(texto);\n\t\tthis.texto = texto;\n\t\tsetForeground(Color.GRAY);\n\t\tsetBorder(BorderFactory.createLineBorder(color,1));\n\t\taddFocusListener(this);\n\t\taddKeyListener(new KeyEventText());\n\t}", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value3.getSelectionStart();\r\n int aend = value3.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value3.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value3.setSelection(astart - 1, aend - 1);\r\n } else\r\n value3.setSelection(astart, aend);\r\n\r\n if (value3.getText().length() > 0 && value3.getText().length() < 2) {\r\n value3.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value3Enable = false;\r\n } else {\r\n value3.setTextColor(0xff000000); //BLACK color\r\n Value3Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "@Override\r\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tif (field.getText().equals(\"\")) {\r\n\t\t\t\t\tfield.setText(name);\r\n\t\t\t\t\tfield.setForeground(Color.LIGHT_GRAY);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n \n if (hasFocus) {\n //Log.d(\"XXX\", \"has focus\");\n EditText field = (EditText) v;\n field.setHintTextColor(Color.GRAY);\n field.setTextColor(Color.BLACK);\n }\n }", "private void redFieldCPRNoAndZip(TextField cprTextField, KeyEvent event) {\n\n char firstLetterCheck = 0;\n\n char backSlashASCII = 8;\n char deleteASCII = 127;\n\n int maxLength = 9;\n\n boolean backSlash = (int) event.getCharacter().charAt(firstLetterCheck) != backSlashASCII;\n boolean deleteButton = (int) event.getCharacter().charAt(firstLetterCheck) != deleteASCII;\n\n\n if (cprTextField.getLength() <= maxLength) {\n if (backSlash && deleteButton && !Character.isDigit(event.getCharacter().charAt(firstLetterCheck)) && cprTextField.getLength() >= 0) {\n event.consume();\n cprTextField.setStyle(\"-fx-text-box-border:red;-fx-control-inner-background:red;-fx-faint-focus-color:red;\");\n } else {\n cprTextField.setStyle(\"-fx-text-box-border:#feefff;-fx-control-inner-background:white;-fx-faint-focus-color:white;\");\n }\n\n } else if (cprTextField.getLength() > maxLength) {\n event.consume();\n cprTextField.setStyle(\"-fx-text-box-border:#feefff;-fx-control-inner-background:white;-fx-faint-focus-color:white;\");\n }\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (s.toString().equalsIgnoreCase(\"\")) {\n mTextTarget.setTextColor(getResources().getColor(R.color.black));\n mTextTarget.setEnabled(false);\n } else {\n //Not sure what this color is exactly doing\n //mTextTarget.setTextColor(getResources().getColorStateList(R.color.text_field_back_color));\n mTextTarget.setEnabled(true);\n }\n\n }", "private void redFieldNumber(TextField phoneNumTextField, KeyEvent event) {\n\n char firstLetterCheck = 0;\n\n char plusSymbolASCII = 43;\n char backSlashASCII = 8;\n char deleteASCII = 127;\n\n boolean backSlash = (int) event.getCharacter().charAt(firstLetterCheck) != backSlashASCII;\n boolean deleteButton = (int) event.getCharacter().charAt(firstLetterCheck) != deleteASCII;\n\n if (phoneNumTextField.getLength()==0 && event.getCharacter().charAt(firstLetterCheck)!=plusSymbolASCII){\n event.consume();\n }\n\n if (phoneNumTextField.getLength() <= plusSymbolASCII) {\n if (backSlash && deleteButton && !Character.isDigit(event.getCharacter().charAt(firstLetterCheck)) && phoneNumTextField.getLength() > 0) {\n event.consume();\n phoneNumTextField.setStyle(\"-fx-text-box-border:#ff2000;-fx-control-inner-background:red;-fx-faint-focus-color:red;\");\n } else {\n phoneNumTextField.setStyle(\"-fx-text-box-border:#feefff;-fx-control-inner-background:white;-fx-faint-focus-color:white;\");\n }\n }\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(!tfPolje.getText().trim().equals(\"\")){\r\n\t\t\ttfPolje.setBackground(Color.WHITE);\r\n\t\t}\r\n\t}", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value4.getSelectionStart();\r\n int aend = value4.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value4.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value4.setSelection(astart - 1, aend - 1);\r\n } else\r\n value4.setSelection(astart, aend);\r\n\r\n if (value4.getText().length() > 0 && value4.getText().length() < 2) {\r\n value4.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value4Enable = false;\r\n } else {\r\n value4.setTextColor(0xff000000); //BLACK color\r\n Value4Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value1.getSelectionStart();\r\n int aend = value1.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value1.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value1.setSelection(astart - 1, aend - 1);\r\n } else\r\n value1.setSelection(astart, aend);\r\n\r\n if (value1.getText().length() > 0 && value1.getText().length() < 2) {\r\n value1.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value1Enable = false;\r\n } else {\r\n value1.setTextColor(0xff000000); //BLACK color\r\n Value1Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n\r\n }\r\n\r\n }", "private boolean checkFieldColor(EditText et, Boolean bool) {\n\n if (et.getHint().toString().contains(\"Email\") && bool && !isValidEmail(et.getText().toString())) {\n et.setBackground(getResources().getDrawable(R.color.progressWeak));\n return false;\n\n } else if (et.getText().length() == 0 && bool == true) {\n et.setBackgroundColor(Color.RED);\n return false;\n } else\n return true;\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value2.getSelectionStart();\r\n int aend = value2.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value2.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value2.setSelection(astart - 1, aend - 1);\r\n } else\r\n value2.setSelection(astart, aend);\r\n\r\n if (value2.getText().length() > 0 && value2.getText().length() < 2) {\r\n value2.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value2Enable = false;\r\n } else {\r\n value2.setTextColor(0xff000000); //BLACK color\r\n Value2Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "private void logTextColors() {\n // Get ColorStateLists (defines text colors for all possible states that the View can be in)\n ColorStateList cslEditText = mBind.maxWidthEdit.getTextColors();\n ColorStateList cslTextView = mBind.maxWidthLabel.getTextColors();\n\n // The standard Android enabled and disabled states (used in the ColorStateLists)\n int enabledState = android.R.attr.state_enabled;\n int disabledState = -android.R.attr.state_enabled;\n\n // Get the text colours for the enabled and disabled states\n int defaultColor = 0xFFFFFFFF;\n int editTextEnabled = cslEditText.getColorForState(new int[] {enabledState}, defaultColor);\n int editTextDisabled = cslEditText.getColorForState(new int[] {disabledState}, defaultColor);\n int textViewEnabled = cslTextView.getColorForState(new int[] {enabledState}, defaultColor);\n int textViewDisabled = cslTextView.getColorForState(new int[] {disabledState}, defaultColor);\n\n // Output\n Log.v(LOG_TAG, \"Text colour EditText enabled: \" + Integer.toHexString(editTextEnabled));\n Log.v(LOG_TAG, \"Text colour EditText disabled: \" + Integer.toHexString(editTextDisabled));\n Log.v(LOG_TAG, \"Text colour TextView enabled: \" + Integer.toHexString(textViewEnabled));\n Log.v(LOG_TAG, \"Text colour TextView disabled: \" + Integer.toHexString(textViewDisabled));\n\n // Example results on API level 23 with dark text on light background theme\n // (Compare with https://material.google.com/style/color.html#color-color-schemes):\n // EditText enabled: 0xDE000000: black, opacity 222/255 (87.06%) -> primary text\n // EditText disabled: 0x3A000000: black, opacity 58/255 (22.75%) -> 26.1% of primary text\n // TextView enabled: 0x8A000000: black, opacity 138/255 (54.12%) -> secondary text\n // TextView disabled: 0x24000000: black, opacity 36/255 (14.12%) -> 26.1% of secondary text\n }", "public void colorText() {\r\n String theColor = textShape.getText();\r\n if (theColor.contains(\"blue\")) {\r\n textShape.setForegroundColor(Color.BLUE);\r\n }\r\n else if (theColor.contains(\"red\")) {\r\n textShape.setForegroundColor(Color.RED);\r\n }\r\n else {\r\n textShape.setForegroundColor(Color.BLACK);\r\n }\r\n }", "@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(!tfPolje.getText().trim().equals(\"\")){\r\n\t\t\ttfPolje.setBackground(Color.WHITE);\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public void focusLost(FocusEvent event) {\r\n if (event.getSource() instanceof TextField) {\r\n int value;\r\n int red = currentColor.getRed();\r\n int green = currentColor.getGreen();\r\n int blue = currentColor.getBlue();\r\n try {\r\n value = Integer.parseInt(((TextField) event.getSource()).getText());\r\n } catch (Exception e) {\r\n value = -1;\r\n }\r\n if (event.getSource() == redInput) {\r\n if (value >= 0 && value < 256)\r\n red = value;\r\n else\r\n redInput.setText(String.valueOf(red));\r\n } else if (event.getSource() == greenInput) {\r\n if (value >= 0 && value < 256)\r\n green = value;\r\n else\r\n greenInput.setText(String.valueOf(green));\r\n } else if (event.getSource() == blueInput) {\r\n if (value >= 0 && value < 256)\r\n blue = value;\r\n else\r\n blueInput.setText(String.valueOf(blue));\r\n }\r\n currentColor = new Color(red, green, blue);\r\n newSwatch.setForeground(currentColor);\r\n colorCanvas.setColor(currentColor);\r\n }\r\n }", "public void updateGrepStyle()\n\t{\n\t\tgrepStyle.setName(textName.getText());\n\t\tgrepStyle.setBold(cbBold.getSelection());\n\t\tgrepStyle.setItalic(cbItalic.getSelection());\n\t\tgrepStyle.setForeground(cpForeground.getEffectiveColor());\n\t\tgrepStyle.setBackground(cpBackground.getEffectiveColor());\n\t\tgrepStyle.setUnderline(cpUnderline.isChecked());\n\t\tgrepStyle.setUnderlineColor(cpUnderline.getColor()); \n\t\tgrepStyle.setStrikeout(cpStrikethrough.isChecked());\n\t\tgrepStyle.setStrikeoutColor(cpStrikethrough.getColor());\n\t\tgrepStyle.setBorder(cpBorder.isChecked());\n\t\tgrepStyle.setBorderColor(cpBorder.getColor());\n\t}", "private void clearInputFieldStyle(){\n nameInput.styleProperty().setValue(\"\");\n cogInput.styleProperty().setValue(\"\");\n wheelBaseInput.styleProperty().setValue(\"\");\n frontRollDistInput.styleProperty().setValue(\"\");\n cornerWeightFLInput.styleProperty().setValue(\"\");\n cornerWeightRLInput.styleProperty().setValue(\"\");\n cornerWeightRRInput.styleProperty().setValue(\"\");\n cornerWeightFRInput.styleProperty().setValue(\"\");\n }", "@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }", "public static void errorStyle(EditText edt, int color){\n Drawable drawable = edt.getBackground(); // get current EditText drawable\n drawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP); // change the drawable color\n\n if(Build.VERSION.SDK_INT > 16) {\n edt.setBackground(drawable); // set the new drawable to EditText\n }else{\n edt.setBackgroundDrawable(drawable); // use setBackgroundDrawable because setBackground required API 16\n }\n }", "private void changeColors(EditText et, TextView tv, String color){\n ViewCompat.setBackgroundTintList(et, ColorStateList.valueOf(Color.parseColor(color)));\n tv.setTextColor(Color.parseColor(color));\n }", "@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\n\t\t\t\tif (s.toString().equals(\"\")) {\n\t\t\t\t\tchangeBackColor();\n\t\t\t\t} else {\n\t\t\t\t\tbtn_transfer_ok.setBackgroundColor(getResources().getColor(R.color.tv_leaveItem_state_green));\n\t\t\t\t\tbtn_transfer_ok.setTextColor(android.graphics.Color.parseColor(\"#ffffff\"));\n\t\t\t\t}\n\t\t\t}", "private void prepareTextField(javax.swing.JTextField tx){\n \tif(textFieldDefaults.get(tx).equals(tx.getText())){\n \t\ttx.setText(\"\");\n \t\ttx.setForeground(Color.BLACK);\n \t}\n }", "private void TextFieldEditableProperty(boolean booleanEditProperty,double opacity){\n txtCategoryNo.setEditable(booleanEditProperty);\n txtCategoryName.setEditable(booleanEditProperty);\n btnSave.setDisable(!booleanEditProperty);\n\n txtCategoryNo.setOpacity(opacity);\n txtCategoryName.setOpacity(opacity);\n\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_selected);\n\n } else {\n mInputLayout\n .setBackgroundResource(R.drawable.textfield_search_default);\n }\n }", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "private void createTextField(){\n Font font = new Font(\"Verdana\", Font.BOLD,3*getGameContainer().getWidth()/100);\n TrueTypeFont ttf = new TrueTypeFont(font,true);\n int fieldWidth = getGameContainer().getWidth()/3;\n int fieldHeight = getGameContainer().getHeight()/18;\n nameField = new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,24*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n nameField.setBackgroundColor(Color.white);\n nameField.setTextColor(Color.black);\n passwordField= new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,32*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n passwordField.setBackgroundColor(Color.white);\n passwordField.setTextColor(Color.black);\n }", "@Override\n\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}", "TextField getTf();", "static void patchAutocomplete() throws NoSuchFieldException, IllegalAccessException {\n if (!MTConfig.getInstance().isMaterialTheme()) {\n return;\n }\n final Color defaultValue = UIUtil.getListSelectionBackground();\n final Color autocompleteSelectionBackground = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.selectionBackground\"), defaultValue);\n final Color autocompleteSelectionForeground = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.selectionForeground\"), defaultValue);\n final Color autocompleteSelectionForegroundGreyed = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.selectionForegroundGreyed\"), defaultValue);\n final Color autoCompleteBackground = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.background\"), defaultValue);\n final Color autocompleteForeground = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.foreground\"), defaultValue);\n final Color autocompleteSelectionUnfocused = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.selectionUnfocus\"), defaultValue);\n final Color autocompleteSelectedGreyedForeground = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.selectedGreyedForeground\"), defaultValue);\n final Color autocompletePrefixForegroundColor = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.prefixForeground\"), defaultValue);\n final Color autocompleteSelectedPrefixForegroundColor = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.selectedPrefixForeground\"), defaultValue);\n final Color autocompleteUserSelectedPrefixForegroundColor = ObjectUtils.notNull(UIManager.getColor(\"Autocomplete.userSelectedPrefixForeground\"), defaultValue);\n\n final Field[] fields = LookupCellRenderer.class.getDeclaredFields();\n final Object[] colorFields = Arrays.stream(fields)\n .filter(f -> f.getType().equals(Color.class))\n .toArray();\n\n StaticPatcher.setFinalStatic((Field) colorFields[0], autoCompleteBackground);\n StaticPatcher.setFinalStatic((Field) colorFields[1], autocompleteForeground);\n StaticPatcher.setFinalStatic((Field) colorFields[2], autocompleteSelectedGreyedForeground);//grayed fore ground\n StaticPatcher.setFinalStatic((Field) colorFields[3], autocompleteSelectionBackground);//selected background color\n StaticPatcher.setFinalStatic((Field) colorFields[4], autocompleteSelectionUnfocused);//selected non focused background color\n StaticPatcher.setFinalStatic((Field) colorFields[5], autocompleteSelectionForeground);//selected foreground color\n StaticPatcher.setFinalStatic((Field) colorFields[6], autocompleteSelectionForegroundGreyed);//selected grayed foreground color\n StaticPatcher.setFinalStatic((Field) colorFields[7], autocompletePrefixForegroundColor);//prefix foreground color\n StaticPatcher.setFinalStatic((Field) colorFields[8], autocompleteSelectedPrefixForegroundColor);//selected prefix foreground color\n Optional.of(colorFields)\n .filter(colorField -> colorField.length > 9)\n .map(colorField -> (Field) colorFields[9])\n .ifPresent(colorField -> ToolBoxKt.runSafely(()->\n StaticPatcher.setFinalStatic(colorField, autocompleteUserSelectedPrefixForegroundColor)));//selected prefix foreground color\n }", "private void applyForegroundColor() {\r\n\t\tthis.control.setForeground(PromptSupport.getForeground(this.control));\r\n\t}", "public void updateColourInfo(String col) {\n /**\n * Handles a few special cases where the colour is not set or where the\n * colouring would class with the black background.\n *\n */\n switch (col) {\n case \"LIGHTBLACK\":\n selectedCol.setText(\"Selected Ball Colour: BLACK\");\n selectedCol.setColour(\"GREY\");\n break;\n case \"NONE\":\n selectedCol.setText(\"Selected Ball Colour: NONE\");\n selectedCol.setColour(\"WHITE\");\n break;\n default:\n selectedCol.setText(\"Selected Ball Colour: \" + col);\n selectedCol.setColour(col);\n break;\n }\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}", "@Override\n\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\n\t\t\tchar[] contraseņa;\n\t\t\tcontraseņa = contraseņa1.getPassword();\n\t\t\tif(contraseņa.length<8||contraseņa.length>12)\n\t\t\t{\n\t\t\t\tcontraseņa1.setBackground(Color.RED);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcontraseņa1.setBackground(Color.WHITE);\n\t\t\t}\n\t\t}", "private void resetTextField(javax.swing.JTextField tx){\n \tif(tx.getText().equals(\"\")){\n \t\ttx.setForeground(new java.awt.Color(170, 170, 170));\n \t\ttx.setText(textFieldDefaults.get(tx));\n }\n }", "public void setOptions(String col, String dif)\n {\n difficult = dif;\n color = col;\n }", "private void syncColourCodeInputBorders()\n {\n String newStyle = \"-fx-border-style: hidden hidden solid hidden; -fx-border-width: 3; -fx-border-color: \" + colourToRgb(toolColour) + \";-fx-border-radius:4px;\";\n rgbInput.setStyle(newStyle);\n hexInput.setStyle(newStyle);\n }", "@Override\n\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\n\t\t}", "@Override\n public String getType() {\n return \"Color change\";\n }", "public void setColor()\n {\n String PREF_FILE_NAME = \"PrefFile\";\n final SharedPreferences preferences = getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE);\n\n if(preferences.getBoolean(\"ColorBlind\", false)) {\n View box1 = this.findViewById(R.id.username);\n box1.setBackgroundColor(0xffffffff);\n\n View box2 = this.findViewById(R.id.password);\n box2.setBackgroundColor(0xffffffff);\n\n View box3 = this.findViewById(R.id.Login);\n box3.setBackgroundColor(0xffffffff);\n\n }\n }", "Color userColorChoose();", "private void setColorForDialog(int color) {\n titleEditText.setTextColor(color);\n descriptionEditText.setTextColor(color);\n colorTextView.setTextColor(color);\n titleTextView.setTextColor(color);\n descriptionTextView.setTextColor(color);\n\n\n // convert color from int format to HEX -> to save in db\n chosenColor = String.format(\"#%06X\", (0xFFFFFF & color));\n }", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "Integer getTxtColor();", "public void setFontColor(int red, int green, int blue, int alpha){\n if(isTheColorInputCorrect(red, green, blue, alpha)){\n fontColor = new Color(red, green, blue); \n }\n }", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "private void makeFormattedTextField(){\n textField = new JTextField(\"\"+ShapeFactory.getRoundness(), 3);\n //add listener that happens after each type and make the field accept only numbers between 0 to 100\n textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n super.keyTyped(e);\n typeEvent(e);\n }\n });\n }", "protected void applyFont() {\n\t\tif (fields != null) {\n\t\t\tIterator<FieldEditor> e = fields.iterator();\n\t\t\twhile (e.hasNext()) {\n\t\t\t\tFieldEditor pe = e.next();\n\t\t\t\t// pe.applyFont();\n\t\t\t}\n\t\t}\n\t}", "private static void setFieldDataToIndexTextField(String fieldName, Map<String, Object> indexFieldProperties) {\n // create keyword type property\n Map<String, Object> textTypeProperty = new HashMap<>();\n textTypeProperty.put(\"type\", \"text\");\n textTypeProperty.put(\"fielddata\", true);\n addFieldMapping(fieldName, textTypeProperty, indexFieldProperties);\n }", "private void onColourWheelInput(MouseEvent e)\n {\n int x = (int)e.getX(), y = (int)e.getY();\n try\n {\n setColour(pickerWheel.getImage().getPixelReader().getColor(x, y), true);\n syncSliderInput();\n syncHexInput();\n syncRgbInput();\n } catch (IndexOutOfBoundsException ex){}\n }", "@FXML\n public void highlightProfile()\n {\n profileButton.setOnMouseEntered(mouseEvent -> profileButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "public void focusGained(FocusEvent e) {\n if (e.getSource()==jtf[flp1][flp2]){ // agar Object Khanehaye jadwal bashad-\n jtf[flp1][flp2].setEnabled(true);// -angah Gabele neweshtan mishawad.\n setEdit();\n }\n if(e.getSource()==jmEdit) // agar object menuye Edit bashad-\n if(jtf[txp1][txp2].getBackground()==Color.yellow){ // -darSurate Fa'al Budan-\n jtf[txp1][txp2].setEnabled(true); // -angah akharin khane fa'al shode-\n jtf[txp1][txp2].grabFocus(); // -nabayad gere fa'al gardad.\n setNotSaved();\n }\n if (e.getSource()==jmFile || e.getSource()==jmFunction) // Menoye File wa Function-\n for(int i=0; i<30; i++) // -baroye Khanehaye Entekhab shode-\n for(int j=0; j<26; j++) // -gable ejra hastand.\n if(jtf[i][j].getBackground()==Color.yellow){\n jtf[i][j].setEnabled(false);\n jtf[i][j].setBackground(Color.blue);\n setSelected();\n setNotEdit();\n }\n }", "@Override\r\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\tif (new String(pass.getPassword()).equals(name)) {\r\n\t\t\t\t\tpass.setText(\"\");\r\n\t\t\t\t\tpass.setEchoChar('.');\r\n\t\t\t\t\tpass.setForeground(Color.black);\r\n\t\t\t\t}\r\n\t\t\t}", "private void checkIfRedName(TextField nameTextField, KeyEvent event) {\n\n final Tooltip tooltip = new Tooltip();\n tooltip.setText(\"Enter the name \");\n nameTextField.setTooltip(tooltip);\n\n nameTextField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (!newValue.matches(\"\\\\sa-zA-Z*\")) {\n nameTextField.setText(newValue.replaceAll(\"[^\\\\sa-zA-Z]\", \"\")); // Allows only wirte a letters!\n }\n });\n\n\n }", "public void edit()\n {\n openProperties(getHighlightedActors());\n }", "@Override\n\tprotected boolean inputEnter(View view, DragEvent event)\n\t{// Make red darker\n\t\tview.setBackgroundColor(RED);\n\t\treturn true;\n\t}", "public void setColor(String color){\n this.color = color;\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }", "KeyColor(String name){\n this.name = name;\n }", "@Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if(!isCursorColorSet) {\n try {\n final Field mEditorField = TextView.class.getDeclaredField(\"mEditor\");\n mEditorField.setAccessible(true);\n final Object mEditor = mEditorField.get(contentEditText);\n Field mCursorDrawableField = mEditor.getClass().getDeclaredField(\"mCursorDrawable\");\n mCursorDrawableField.setAccessible(true);\n Drawable[] mCursorDrawable = ((Drawable[])mCursorDrawableField.get(mEditor));\n for(Drawable drawable : mCursorDrawable) {\n if(drawable != null) {\n drawable.setColorFilter(ViewUtils.getColorByAttrId(PublishActivity.this, R.attr.themeColorAccentInverse), PorterDuff.Mode.SRC_IN);\n }\n }\n isCursorColorSet = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void formatFields() {\r\n\t}", "protected void do_otherGenderTF_focusLost(FocusEvent arg0) {\n\t\tif(otherGenderTF.getText().isEmpty()){\n\t\t\tlblChildGender.setForeground(Color.RED);\n\t\t}\n\t\telse if(! childFirstNameTF.getText().isEmpty()){\n\t\t\tlblChildGender.setForeground(Color.BLACK);\n\t\t}\n\t}", "private void designFW(FunctionWord functionWord) {\n\t\tint start = functionWord.getStartPosition();\n\t\tint end = functionWord.getEndPosition();\n\t\tStyleConstants.setForeground(STYLE, designer.getColor(functionWord));\n\t\tdoc.setCharacterAttributes(start, end - start + 1, STYLE, true);\n\t}", "public void setIndicateColor(Color c){\n\t\tthis.indicateColor=c;\n\t}", "private void addTextChangeListener(final EditText et) {\n\n final Drawable orgDrawable = et.getBackground();\n\n et.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n if (charSequence.length() != 0) {\n et.setBackgroundDrawable(orgDrawable);\n }\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n\n }\n });\n\n }", "@Override\n public void startEdit() {\n super.startEdit();\n\n if (text_field == null) {\n createTextField();\n }\n setText(null);\n setGraphic(text_field);\n text_field.selectAll();\n }", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}", "public void Color() {\n\t\t\r\n\t}", "void changeColor(Color color) {\r\n currentColor = color;\r\n redInput.setText(String.valueOf(color.getRed()));\r\n greenInput.setText(String.valueOf(color.getGreen()));\r\n blueInput.setText(String.valueOf(color.getBlue()));\r\n newSwatch.setForeground(currentColor);\r\n }", "public void setColor(String c);", "@Override\n public GralColor setForegroundColor(GralColor color)\n {\n return null;\n }", "private boolean badEntryFound() {\n boolean flag = false;\n \n if(positionComboBox.getSelectedIndex() <= 0)\n {\n positionLabel.setForeground(Color.red);\n positionComboBox.requestFocusInWindow();\n flag = true;\n }\n else\n {\n positionLabel.setForeground(Color.black);\n }\n \n if(firstTextField.getText().trim().isEmpty())\n {\n fNameLabel.setForeground(Color.red);\n firstTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n fNameLabel.setForeground(Color.black);\n }\n \n if(lastTextField.getText().trim().isEmpty())\n {\n lNameLabel.setForeground(Color.red);\n lastTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n lNameLabel.setForeground(Color.black);\n }\n \n if(codeTextField.getText().trim().isEmpty())\n {\n codeLabel.setForeground(Color.red);\n codeTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n codeLabel.setForeground(Color.black);\n }\n \n \n return flag;\n }", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\trepaint();\n\t\t\t}", "private void updateModel() {\n // Reset the credentials background\n currentPassword.setBackground(Themes.currentTheme.dataEntryBackground());\n\n\n }", "private void modificarFuente(){\n\n if(campoDeTexto.getText().toString().length()>5){\n Editable txtEditable = campoDeTexto.getText();\n\n //modifica el tipo de fuente\n txtEditable.setSpan(new TypefaceSpan(\"sans-serif-condensed\"),0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el color de la fuente\n txtEditable.setSpan(new ForegroundColorSpan(Color.YELLOW),0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el estilo de fuente\n txtEditable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el tamaño de la fuente. El valor boleano es para indicar la independencia del tamaño agregado\n //con respecto a la densida depixeles del dispositivo\n txtEditable.setSpan(new AbsoluteSizeSpan(30, true), 0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }", "void seeGreen() {\n\t\tbar.setForeground(Color.GREEN);\n\t}", "private void styleIngredientBrowsePane(){\n //Ingredients Browser / Edit\n InterfaceStyling.setHighlightStyling(ingredCalorieInputBrowse, ingredientColor , defaultColor);\n InterfaceStyling.setHighlightStyling(ingredSugarInputBrowse, ingredientColor , defaultColor);\n InterfaceStyling.setHighlightStyling(ingredProteinInputBrowse, ingredientColor , defaultColor);\n InterfaceStyling.setHighlightStyling(ingredFiberInputBrowse, ingredientColor , defaultColor);\n InterfaceStyling.setHighlightStyling(ingredCarbsInputBrowse, ingredientColor , defaultColor);\n InterfaceStyling.setHighlightStyling(ingredFatInputBrowse, ingredientColor , defaultColor);\n InterfaceStyling.buttonStyle(updateIngredsBtn, ingredientColor, ingredientColorDark);\n InterfaceStyling.toggleButtonStyle(ingredBrowseEditToggle, ingredientColor);\n InterfaceStyling.setHighlightStyling(ingredQuantityNameInputBrowse, ingredientColor, defaultColor);\n InterfaceStyling.setHighlightStyling(ingredQuantityAmountInputBrowse, ingredientColor, defaultColor);\n\n //Style all the labels in the Pane\n for (Node n: IngredientsBrowseSubPane.getChildren()){\n if (n.getClass().isInstance(new Label())){\n ((Label) n).setFont(InterfaceStyling.titleFontNonBold);\n ((Label) n).setTextFill((Paint.valueOf(defaultTextColor)));\n }\n }\n }", "@Override\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif (hasFocus)\n\t\t\t\t\tpromocodeEdit.setBackgroundResource(R.drawable.formfield);\n\t\t\t\telse if (promocodeEdit.getText().toString().equals(\"\"))\n\t\t\t\t\tpromocodeEdit\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.promo_btn_gray);\n\t\t\t}", "private void setHighlightedFields(SearchResponse<T, P> response, final QueryResponse solrResponse) {\n if ((hlFieldPropertyPropertiesMap != null) && (solrResponse.getHighlighting() != null) && !solrResponse\n .getHighlighting().isEmpty()) {\n for (String docId : solrResponse.getHighlighting().keySet()) {\n setHighlightedFieldValues(response, solrResponse, docId);\n }\n }\n }", "public void clouleurFondEcran() {\n this.setBackground(Color.WHITE);\n jPanel3.setBackground(Color.WHITE);\n jPanel2.setBackground(Color.WHITE);\n jPanel5.setBackground(Color.WHITE);\n jTable2.setBackground(Color.WHITE);\n jTextField3.setBackground(Color.WHITE);\n }", "@Override\n\tpublic String addcolor() {\n\t\treturn \"Green color is applied\";\n\t}", "private void setStyleToIndicateCommandFailure() {\n //override style and disable syntax highlighting\n commandTextField.overrideStyle(ERROR_STYLE_CLASS);\n }", "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }", "@Override\n public Color getFontColor(){\n return Color.BLACK;\n }", "public char getSeekerColor() {\n return getCharProperty(\"RequestedColor\");\n }", "void seeRed() {\n\t\tbar.setForeground(Color.RED);\n\t}", "private void displayNameFields() {\n FieldRelatedLabel nameLabel = new FieldRelatedLabel(\"Name\", 750, 170);\n\n invalidNameLabel = new InvalidFormEntryLabel(\"Name must only contain letters,\\nspaces, dots and apostrophes\", 910, 190, false);\n\n nameTF = new TextField();\n nameTF.relocate(750, 200);\n nameTF.textProperty().addListener(e->FormValidatorPokeMongo.handleName(nameTF, invalidNameLabel));\n\n sceneNodes.getChildren().addAll(nameLabel, invalidNameLabel, nameTF);\n }" ]
[ "0.62756264", "0.6017962", "0.59557503", "0.5949795", "0.58116615", "0.5782239", "0.5670654", "0.5512713", "0.5508575", "0.54423827", "0.5407272", "0.5403355", "0.5365366", "0.5357588", "0.5310866", "0.5290668", "0.5278329", "0.52752316", "0.52672666", "0.5241766", "0.52182096", "0.52180624", "0.52096516", "0.5178538", "0.51519316", "0.5150101", "0.51443094", "0.5117647", "0.5111992", "0.5106471", "0.50851136", "0.50344396", "0.5019668", "0.500704", "0.49960223", "0.49742007", "0.49567825", "0.49529898", "0.4935578", "0.4931902", "0.4927346", "0.4923269", "0.49207616", "0.49173197", "0.49145856", "0.4902288", "0.48994523", "0.48906025", "0.4890142", "0.48881823", "0.48803267", "0.48690632", "0.48608086", "0.48603252", "0.4851832", "0.48500937", "0.4841608", "0.48387071", "0.4836325", "0.48343185", "0.4833424", "0.4819269", "0.48063216", "0.47937435", "0.4790865", "0.47844976", "0.4781704", "0.4771383", "0.47691187", "0.47647107", "0.47634774", "0.47622573", "0.47565836", "0.4753877", "0.47494376", "0.47446686", "0.47373888", "0.4728682", "0.47285745", "0.47278374", "0.4724846", "0.4724245", "0.4708231", "0.47071505", "0.46969375", "0.469312", "0.46908256", "0.46894434", "0.46890348", "0.4683311", "0.4682826", "0.46690106", "0.46681717", "0.46680623", "0.4660787", "0.46594432", "0.46577838", "0.46525997", "0.46510077", "0.4650025", "0.464889" ]
0.0
-1
/ method for scroll down
public static void scrollDown(WebElement Element) { js = (JavascriptExecutor) driver; js.executeScript("arguments[0].scrollIntoView();", Element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void scrollDown() {\n try {\n Robot robot = new Robot();\n robot.keyPress(KeyEvent.VK_PAGE_DOWN);\n robot.keyRelease(KeyEvent.VK_PAGE_DOWN);\n } catch(Exception e) {\n // do nothing\n }\n\n }", "public synchronized void scrollDown()\r\n\t{\r\n\t\treferenceImage.scrollDown();\r\n\t\tdisplayedImage.scrollDown();\r\n\t}", "void scroll(int scrollTop);", "public void scrollDown() {\n JavaScriptExecutor javaScriptExecutor = new JavaScriptExecutor();\n Long value = (Long) javaScriptExecutor.executeScript(\"return window.pageYOffset;\");\n javaScriptExecutor.executeScript(\"scroll(0, \" + (value + 1000) + \");\");\n }", "public void scrollPageDown(){\r\n \r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"window.scrollTo(0,6000)\");\r\n }", "public void movePageDown(){\n mEventHandler.onScroll(null, null, 0, getHeight());\n mACPanel.hide();\n }", "public abstract void scroll(long ms);", "int getScrollTop();", "public abstract void onScrollUp();", "public void scrollDownEvent() throws InterruptedException {\n String currentDoc = \"\";\n do {\n currentDoc = driver.getPageSource();\n JavascriptExecutor jse = (JavascriptExecutor) driver;\n jse.executeScript(\"window.scrollTo(0,Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.clientHeight));\");\n Thread.sleep(4000);\n } while (!currentDoc.equals(driver.getPageSource()));\n System.out.println(\"We are in the end of the page\");\n }", "boolean canScrollUp();", "public static void scrollDown() {\n WebElement bottomButton = Browser.driver.findElement(CHANGE_CURRENCY_BOTTOM_BUTTON);\n JavascriptExecutor jse = (JavascriptExecutor)Browser.driver;\n jse.executeScript(\"arguments[0].scrollIntoView(true)\", bottomButton);\n }", "public void scrollDown(long coordinatedFromTop) {\n JavaScriptExecutor javaScriptExecutor = new JavaScriptExecutor();\n javaScriptExecutor.executeScript(\"scroll(0, \" + coordinatedFromTop + \");\");\n }", "public void onScroll(State state, int positionY);", "public void onScrollDown(View view) {\n if (!checkReady()) {\n return;\n }\n\n changeCamera(CameraUpdateFactory.scrollBy(0, SCROLL_BY_PX));\n }", "public abstract boolean scroll(Direction direction);", "public void scrollUp() {\n JavaScriptExecutor javaScriptExecutor = new JavaScriptExecutor();\n Long value = (Long) javaScriptExecutor.executeScript(\"return window.pageYOffset;\");\n javaScriptExecutor.executeScript(\"scroll(0, \" + (value - 1000) + \");\");\n }", "@Override\n public void run() {\n moveScrollDown();\n }", "void setScrollTop(int scrollTop);", "private void scrollDown(int deltaY) {\n if (!mIsRefreshing && getScrollY() <= 0 && reachTopEdge()) {\n final int curHeaderViewHeight = getCurrentHeaderViewHeight();\n if (curHeaderViewHeight < mHeaderViewHeight) {\n int newHeaderViewHeight = curHeaderViewHeight + deltaY;\n if (newHeaderViewHeight < mHeaderViewHeight) {\n setHeaderViewHeight(newHeaderViewHeight);\n return ;\n } else {\n setHeaderViewHeight(mHeaderViewHeight);\n deltaY = newHeaderViewHeight - mHeaderViewHeight;\n }\n }\n }\n\n scrollBy(0, -deltaY);\n }", "@Override\n public boolean scrolled(int arg0) {\n return false;\n }", "@Override\n public void onScrollDown() {\n Go_UpButton.setVisibility(View.VISIBLE);\n }", "int getScrollOffsetY();", "public static void scrollDown(WebDriver driver) {\n\t\tJavascriptExecutor jse = (JavascriptExecutor) driver;\n\t\tjse.executeScript(\"scroll(0, 250)\");\n\t}", "@Override\n public void scrollVertical(int direction) {\n return;\n }", "void onScroll(boolean bDragging);", "public synchronized void scrollUp()\r\n\t{\r\n\t\treferenceImage.scrollUp();\r\n\t\tdisplayedImage.scrollUp();\r\n\t}", "@Override\n protected void scrollEnd() {\n ScrollView scrollView = (ScrollView)mScrollLayout;\n if(Utils.isCornerBottom(mCurrentCorner)){\n scrollView.fullScroll(View.FOCUS_UP);\n }\n else{\n scrollView.fullScroll(View.FOCUS_DOWN);\n }\n }", "@Override\n\tpublic boolean scrolled(int arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int arg0) {\n\t\treturn false;\n\t}", "public void computeScroll() {\n /* 93 */\n if (this.mChartTouchListener instanceof PieRadarChartTouchListener) {\n /* 94 */\n ((PieRadarChartTouchListener) this.mChartTouchListener).computeScroll();\n /* */\n }\n /* */\n }", "public void scrollUp() {\n JavascriptExecutor jse = (JavascriptExecutor)driver;\n jse.executeScript(\"window.scrollBy(0, -500)\", new Object[]{\"\"});\n }", "@FXML\n private void handleMainListPanelScrollDown() {\n mainTaskListPanel.scrollToNext();\n }", "private void scrollerFinished()\n\t{\n\t\tif (!mFingerDown)\n\t\t{\n\t\t\treadjustScrollToMiddleItem();\n\t\t}\n\t\t\n\t}", "@Override\r\n public boolean onScroll(float displacement, float delta, float velocity) {\n return false;\r\n }", "public void scrollDownEvent(int timesToRepeat) throws InterruptedException {\n String currentDoc = \"\";\n for (int i = 0; i < timesToRepeat; i++) {\n currentDoc = driver.getPageSource();\n JavascriptExecutor jse = (JavascriptExecutor) driver;\n jse.executeScript(\"window.scrollTo(0,Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.clientHeight));\");\n Thread.sleep(4000);\n }\n }", "void onPull(int scrollY);", "void onScrollEnd(State state, int positionY, int duration);", "@Override\r\n public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state){\r\n // Nothing to do when there are no attached items or dy = 0.\r\n if(getChildCount() == 0 || dy == 0){\r\n return 0;\r\n }\r\n return scrollBy(dy, recycler, state);\r\n\r\n }", "protected boolean scroll(int amount) {\n\t// Does nothing\n\treturn false;\n}", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n\t\t\tpublic boolean scrolled(int amount) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean scrolled(int amount) {\n\t\t\t\treturn false;\n\t\t\t}", "public void movePageUp(){\n mEventHandler.onScroll(null, null, 0, -getHeight());\n mACPanel.hide();\n }", "@Override\n public void onScrollStarted(\n int scrollOffsetY, int scrollExtentY, boolean isDirectionUp) {\n hide();\n }", "@Override\r\n public boolean canScrollVertically(){\r\n return true;\r\n }", "private void scrollTo(final View view) {\n\n new Handler().post(new Runnable() {\n @Override\n public void run() {\n scroll.smoothScrollTo(0, view.getBottom());\n }\n });\n }", "@Override\r\n public void onDownMotionEvent() {\n mFirstScroll = mDragging = true;\r\n }", "public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }", "@Override\n public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {\n }", "@FXML\n private void handleMainListPanelScrollUp() {\n mainTaskListPanel.scrollToPrevious();\n }", "@Override\n public void onAbsoluteScrollChange(int i) {\n }", "public void moveDown()\n {\n if (!this.search_zone.isDownBorder(this.y_position))\n {\n this.y_position = (this.y_position + 1);\n }\n }", "@Listen(\"onClick = #scroll\")\n\tpublic void scrollIntoView() {\n\t\ttreeModel.setOpenObjects(treeModel.getRoot().getChildren());\n\t\tTreeitem[] items = tree.getItems().toArray(new Treeitem[0]);\n\t\tClients.scrollIntoView(items[items.length - 1]); //last item is /WEB-INF\n\t}", "private void drawVerticalScrollBar(){\n }", "void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY);", "private void sendScroll() {\n\t\tfinal Handler handler = new Handler();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (mTopIndex <= mFinalIndex) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t\t}\n\t\t\t\t\thandler.post(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\tmTopIndex += 0.1;\n\t\t\t\t\t\t\tscrollView.scrollBy(0, (int) mTopIndex);\n\t\t\t\t\t\t\tif (mTopIndex >= mFinalIndex) {\n\t\t\t\t\t\t\t\tmTopIndex = 0;\n\t\t\t\t\t\t\t\tscrollView.fullScroll(ScrollView.FOCUS_UP);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Check if scroll completed or not\n\t\t\t\t\t\t\tif (mFirstScroll && (mPrevY == scrollView.getScrollY())) {\n\t\t\t\t\t\t\t\tmFinalIndex = mTopIndex + 5;\n\t\t\t\t\t\t\t\tmFirstScroll = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmPrevY = scrollView.getScrollY();\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}).start();\n\t}", "@Override\r\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\r\n\t}", "@FXML\n private void handleFilteredListPanelScrollDown() {\n filteredTaskListPanel.scrollToNext();\n }", "void scrollToFinishActivity();", "private void doBuildScroller() {\r\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\t\tbForceScrollDown = false;\n\t\t\t\t}", "public void computeScroll() {\n if (!this.mDragHelper.continueSettling(true)) return;\n if (!this.mCanSlide) {\n this.mDragHelper.abort();\n return;\n }\n ViewCompat.postInvalidateOnAnimation((View)this);\n }", "@Override public void computeScroll() {\n super.computeScroll();\n if (scroller != null) {\n scroller.computeScroll();\n }\n }", "@Override\n public boolean scrolled(final int amount) {\n return false;\n }", "@Override\n\t\t\tpublic void onScrollingFinished(WheelView view) {\n\t\t\t}", "public void scrollToYPos(int y) {\n verticalScroll = y;\n repaint();\n }", "boolean hasScrollOffsetY();", "@Override\n\tpublic boolean scrolled(int amount)\n\t{\n\t\treturn false;\n\t}", "public void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}", "public void scrollToTop()\n {\n ensureIndexIsVisible(0);\n }", "public void slideDown() {\n TranslateAnimation animate = new TranslateAnimation(\n 0, // fromXDelta\n 0, // toXDelta\n 0, // fromYDelta\n hotelDetailMenuRelative.getHeight()); // toYDelta\n animate.setDuration(500);\n animate.setFillAfter(true);\n hotelDetailMenuRelative.startAnimation(animate);\n }", "@Override\n public void onScrolled(int distanceX, int distanceY) {\n\n }", "private void scrollUp(int deltaY) {\n final int scrollY = getScrollY();\n if (scrollY < 0) {\n if (scrollY < deltaY) { // both scrollY and deltaY are less than 0\n scrollBy(0, -deltaY);\n return;\n } else {\n scrollTo(0, 0);\n deltaY -= scrollY;\n\n if (deltaY == 0) {\n return;\n }\n }\n }\n\n if (!mIsRefreshing) {\n int curHeaderViewHeight = getCurrentHeaderViewHeight();\n if (curHeaderViewHeight > 0) {\n\n int newHeaderViewHeight = curHeaderViewHeight + deltaY;\n if (newHeaderViewHeight > 0) {\n setHeaderViewHeight(newHeaderViewHeight);\n\n return;\n } else {\n setHeaderViewHeight(0);\n\n deltaY = newHeaderViewHeight;\n }\n }\n }\n\n if (reachBottomEdge()) {\n scrollBy(0, -deltaY);\n }\n }", "@Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n if (dx > 0 && isScrollBottom()) {\n needLoadMore();\n }\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n if (getChildCount() <= 0) {\n return super.onTouchEvent(event);\n }\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n oldY = event.getY();\n downY = oldY;\n break;\n case MotionEvent.ACTION_MOVE:\n float newY = event.getY();\n float moveLengthY = newY - oldY;\n Log.e(TAG, \"old=\" + oldY + \", new=\" + newY + \", moveLengthY=\" + moveLengthY+\", \"+(int) moveLengthY);\n oldY = newY;\n //scrollBy(0, -moveLengthY);\n if ((topViewPosition == 0&&moveLengthY>0) || (bottomViewPosition == mAdapter.getCount() - 1&&moveLengthY<0)) {\n return true;\n }\n offsetChildrenTopAndBottom((int) moveLengthY);\n int start = 0;\n int count = 0;\n int childCount = getChildCount();\n boolean down = moveLengthY > 0;\n if (down) {//向下滑\n for (int i = childCount - 1; i >= 0; i--) {\n final View child = getChildAt(i);\n if (child.getTop() <= getMeasuredHeight()) {\n break;\n } else {\n start = i;\n count++;\n mScrapViews.add(child);\n bottomViewPosition--;\n }\n }\n } else {\n for (int i = 0; i < childCount; i++) {\n final View child = getChildAt(i);\n if (child.getBottom() >= 0) {\n break;\n } else {\n count++;\n mScrapViews.add(child);\n topViewPosition++;\n Log.e(TAG, \"onTouchEvent: count=\"+count+\", topViewPosition=\"+topViewPosition );\n }\n }\n }\n if (count > 0) {\n detachViewsFromParent(start, count);\n //mRecycler.removeSkippedScrap();\n }\n fillGap(down);\n break;\n case MotionEvent.ACTION_UP:\n float slideLength = event.getY() - downY;//移动距离\n int scrollY = getScrollY();//距顶部距离\n Log.e(TAG, \"onSingleTapUp-\" + event.getX() + \", \" + event.getY() + \",slideLength=\" + slideLength + \",scrollY=\" + scrollY);\n //if (Math.abs(slideLength) > 0 && Math.abs(scrollY) < getHeight() / 2) {\n if (topViewPosition == 0) {//到顶部了或最底部了\n //int y = (int) event.getY();\n //int x= (int) event.getX();\n// if(slideLength+scrollY!=0){\n// slideLength=-scrollY;\n// }\n View firstView = getFirstView();\n Log.e(TAG, \"topViewPosition = \"+topViewPosition+\", \" + firstView.getTop());\n //mSlide.startScroll(0, firstView.getTop(), 0, 0, 1000);\n //invalidate();\n offsetChildrenTopAndBottom(firstView.getTop(),1000);\n } else if (bottomViewPosition == mAdapter.getCount() - 1) {\n View lastView = getLastView();\n Log.e(TAG, \"bottomViewPosition = \"+bottomViewPosition+\", \" + lastView.getBottom());\n //mSlide.startScroll(0, lastView.getBottom(), 0, getMeasuredHeight(), 1000);\n //invalidate();\n offsetChildrenTopAndBottom(lastView.getBottom(),1000);\n } else {\n Log.e(TAG, \"scrollY=\" + scrollY + \", getWidth2=\" + getHeight() / 2);\n }\n Log.e(TAG, \"onTouchEvent: size=\"+mScrapViews.size());\n break;\n\n }\n return true;\n }", "public void scrollDown() throws Exception {\n Dimension size = driver.manage().window().getSize();\n //Starting y location set to 80% of the height (near bottom)\n int starty = (int) (size.height * 0.80);\n //Ending y location set to 20% of the height (near top)\n int endy = (int) (size.height * 0.20);\n //endy=driver.findElement(By.xpath(\"//*[@text='Terms']\")).getLocation().getY();\n //x position set to mid-screen horizontally\n int startx = size.width / 2;\n\n TouchAction touchAction = new TouchAction(driver);\n \n int i=8;\n while(i-->0) {\n touchAction\n .press(PointOption.point(startx, starty))\n .waitAction(new WaitOptions().withDuration(Duration.ofSeconds(1)))\n .moveTo(PointOption.point(startx, endy))\n .release().perform();\n }\n// touchAction.tap(PointOption.point(startx, endy)).perform();\n// touchAction.moveTo(PointOption.point(startx, endy)).perform();\n System.out.println(\"Tap Complete\");\n \n// new TouchAction((PerformsTouchActions) driver)\n// .moveTo(new PointOption<>().point(startx, endy))\n// .release()\n// .perform();\n\n}", "private void scrollToBottom() {\n UiDevice uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());\n int deviceHeight = uiDevice.getDisplayHeight();\n\n int statusBarHeight = statusBarHeight();\n int navigationBarHeight = navigationBarHeight();\n\n int padding = 20;\n int swipeSteps = 5;\n int viewPortBottom = deviceHeight - statusBarHeight - navigationBarHeight;\n int fromY = deviceHeight - navigationBarHeight - padding;\n int toY = statusBarHeight + padding;\n int delta = fromY - toY;\n while (viewPortBottom < scaleAbsoluteCoordinateToViewCoordinate(TEST_PAGE_HEIGHT)) {\n uiDevice.swipe(50, fromY, 50, toY, swipeSteps);\n viewPortBottom += delta;\n }\n // Repeat an addition time to avoid flakiness.\n uiDevice.swipe(50, fromY, 50, toY, swipeSteps);\n }", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}", "@Override\n public boolean onScroll(MotionEvent downEvent, MotionEvent moveEvent, float distanceX, float distanceY) {\n return PickNavigateController.this.onScrollHandler(downEvent, moveEvent, distanceX, distanceY);\n }", "public static void scrollDown(int pixel) {\n\t\tgetJSObject().executeScript(\"window.scrollBy(0,\" + pixel + \")\");\n\t}", "@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }", "@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }", "@Override\n\tpublic void onScroll(int left, int top, int oldl, int oldt) {\n\t\tif (!isBtnClick) {\n\t\t\tdouble level;\n\t\t\tSystem.out.println(\"now:\" + left + \" old:\" + oldl);\n\t\t\tlevel = (double) left / (double) MyMath.dip2px(this, 40);\n\t\t\tSystem.out.println(\"level:\" + level);\n\t\t\tlevel = new BigDecimal(Double.toString(level)).setScale(0,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP).doubleValue();\n\t\t\tint index = (int) level;\n\t\t\tif (mCheckedIndex != index) {\n\t\t\t\tsetCheckAt(index);\n\t\t\t\tSystem.out.println(\"滚动到:\" + index);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tfinal ListView lw = (ListView) view.findViewById(R.id.listView_calldata);\n\n\t\t\t if(scrollState == 0) \n\t\t\t Log.i(\"a\", \"scrolling stopped...\");\n\n\n\t\t\t if (view.getId() == lw.getId()) {\n\t\t\t final int currentFirstVisibleItem = lw.getFirstVisiblePosition();\n\t\t\t if (currentFirstVisibleItem > mLastFirstVisibleItem) {\n\t\t\t //mIsScrollingUp = false;\n\t\t\t Log.i(\"a\", \"scrolling down...\");\n\t\t\t \n\t\t\t if (gridView.getVisibility() == View.VISIBLE) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgridView.setVisibility(View.GONE);\n\t\t\t\t\t\t\tdialPad_collapse_iv.setImageResource(R.drawable.ic_action_collapse);\n\t\t\t }\n \n\t\t\t } else if (currentFirstVisibleItem < mLastFirstVisibleItem) {\n\t\t\t //mIsScrollingUp = true;\n\t\t\t Log.i(\"a\", \"scrolling up...\");\n\t\t\t \n\t\t \n\t\t\t }\n\n\t\t\t mLastFirstVisibleItem = currentFirstVisibleItem;\n\t\t\t } \n\t\t\t}", "public void useScrolling() {\n\t\t((JavascriptExecutor)driver).executeScript(\"return document.readyState\").equals(\"complete\");\n\t\t\n\t\t((JavascriptExecutor)driver).executeScript(\"window.scrollBy(0, 1200)\");\n\t\t// document.getElementsByClassName(\" \");\n\t\t// document.getElementsById(\" \");\n\t\t\n\t}", "public void recallScrollPos() {\n if (_primaryPlot!=null) {\n recallScrollPos(_scrollInfo.get(_primaryPlot).makeCopy());\n }\n }" ]
[ "0.79169255", "0.78559375", "0.76537544", "0.7585526", "0.73402303", "0.71742", "0.7019972", "0.69910234", "0.69802696", "0.6898991", "0.68945706", "0.68032765", "0.6801112", "0.6761069", "0.67484045", "0.6727997", "0.67197114", "0.6700339", "0.6676445", "0.6673527", "0.66667855", "0.6651214", "0.6625496", "0.6618245", "0.6608503", "0.65899086", "0.65805864", "0.65304637", "0.6501473", "0.6501473", "0.6495936", "0.64610076", "0.6456993", "0.6412564", "0.64049256", "0.639525", "0.6346218", "0.6346046", "0.6343607", "0.63194335", "0.63007176", "0.63007176", "0.63007176", "0.63007176", "0.6281437", "0.6281437", "0.6279576", "0.62673914", "0.62669444", "0.6259285", "0.6251112", "0.6250097", "0.62463427", "0.62352073", "0.62135315", "0.6209011", "0.6204126", "0.6201982", "0.61949694", "0.61889946", "0.6180096", "0.6173657", "0.6155789", "0.61447525", "0.6125725", "0.6124235", "0.61184263", "0.61105883", "0.6106086", "0.6095398", "0.6093051", "0.6082288", "0.6072194", "0.6066675", "0.6058718", "0.60561645", "0.6053774", "0.6050662", "0.6050442", "0.6044598", "0.6042718", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.60383683", "0.6037197", "0.60170305", "0.6010383", "0.6010383", "0.60090303", "0.6004981", "0.6004849", "0.6001836" ]
0.0
-1
/ method for click on WebElement using JavascriptExecutor
public static void JSclickOnWebElement(WebElement element) { js = (JavascriptExecutor) driver; js.executeScript("arguments[0].click();", element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void fw_javascriptClick() {\n WrapsDriver wd = (WrapsDriver) element;\n ((JavascriptExecutor) wd.getWrappedDriver()).executeScript(\"arguments[0].click();\", element);\n }", "public void clickJS(WebElement element) {\n\t\tgetExecutor().executeScript(\"arguments[0].click();\", element);\n\t\t\n\t}", "protected void clickJs(WebElement elemento) {\n\t\texecuteJavaScript(elemento, \"click()\");\n\t}", "public void click_JS(By locator)\n\t\t{\n\t\t\tWebElement element = findElementClickable(locator);\n\t\t\ttry {\n\t\t\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\t\t\texecutor.executeScript(\"arguments[0].click();\", element);\n\t\t\t\tLOGGER.info(\"Step : \" + Thread.currentThread().getStackTrace()[2].getMethodName() + \": Pass\");\n\t\t\t}catch(Exception e)\n\t\t\t{\n\t\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n\t\t\t\tthrow new NotFoundException(\"Exception \"+ e +\" thrown while clicking on object using locator \"+locator);\n\n\t\t\t}\n\n\t\t}", "public void clickOnElement (String locator){\n String jQuerySelector = \"return $(\\\"\" + locator + \"\\\").get(0);\";\n WebElement element = (WebElement) js.executeScript(jQuerySelector);\n element.click();\n }", "public void jsClick(By locator) {\n JavascriptExecutor executor = (JavascriptExecutor) driver;\n waitForVisibilityOf(locator);\n executor.executeScript(\"arguments[0].click();\", find(locator));\n }", "public static void clickByJS(WebDriver driver, WebElement element) {\n\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\texecutor.executeScript(\"arguments[0].click();\", element);\n\t}", "public static void javascriptClick(WebElement element, WebDriver driver) {\n\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\texecutor.executeScript(\"arguments[0].click();\", element);\n\t}", "public boolean clickUsingJavaScript(WebElement element){\n\t \tboolean res = true;\n\t \ttry {\n\t JavascriptExecutor executor = (JavascriptExecutor)driver;\n\t executor.executeScript(\"arguments[0].click();\", element);\n\t\t\t} catch (Exception e) {\n\t\t\t\tres = false;\n\t\t\t}\n\t \treturn res;\n\t }", "public void click(WebElement element) {\nelement.click();\n\t}", "public void clickSalvar (){driver.findElement(botaoSalvar).click();}", "public static void jsClick(String locatorValue) throws CheetahException {\n\n\t\ttry {\n\t\t\tJavascriptExecutor js = (JavascriptExecutor) CheetahEngine.getDriverInstance();\n\t\t\tString action = locatorValue + \".click();\";\n\t\t\tCheetahEngine.logger.logMessage(null, SeleniumActions.class.getName(), \"JavaScriptExecutor - Click\",\n\t\t\t\t\tConstants.LOG_INFO);\n\t\t\tjs.executeScript(action);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\n\t}", "public boolean jsClick(By locator){\n \tboolean isClicked = false;\n \tfor(int attempt=0;attempt<3;attempt++) {\n \ttry {\n \t\tif(!isClicked) {\n \t\t//waitForElementClickable(locator);\n \t\t\twaitForElementPresent(elementTimeout);\n WebElement element = driver.findElement(locator);\n JavascriptExecutor executor = (JavascriptExecutor)driver;\n executor.executeScript(\"arguments[0].click();\", element);\n isClicked = true;\n \t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tisClicked = false;\n\t\t}\n \t}\n \treturn isClicked;\n }", "protected void findWebElementAndClick (By webElementSelector){\n\t\tWebElement button = findWebElement(webElementSelector);\n\t\ttry {\t\t\n\t\t\tbutton.click();\n\t\t} catch (StaleElementReferenceException e) {\n\t\t\tthrow new AssertionError(\"Found the web element, but cannot perform click action. \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "public void performClick() {\n\t\tgetWrappedElement().click();\n\t}", "public static boolean clickOnElementUsingJavaScript(WebDriver driver, WebElement element)\n\t\t\tthrows InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\t\t\tjs.executeScript(\"arguments[0].click();\", element);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"element is not clicked.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured. \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "protected void moveOnWebElementClickJS(WebElement mainElement, WebElement clickElement) {\n String mouseOverScript = \"if(document.createEvent){var evObj = document.createEvent('MouseEvents');evObj.initEvent('mouseover', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('onmouseover');}\";\n js.executeScript(mouseOverScript, mainElement);\n HighlightElementClick(clickElement);\n //\tWebElement clickElement = untilElementIsClickable(subMenuHtmlText);\n js.executeScript(\"arguments[0].click();\", clickElement);\n//\t\tjs.executeScript(mouseOverScript, clickElement);\n//\t\tclickWebElement(clickElement);\n }", "@Test\n\t@TestProperties(name = \"Click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickElement() {\n\t\tfindElement(by, locator).click();\n\t}", "public final void click() {\n getUnderlyingElement().click();\n }", "public void clickItem(WebElement element) throws Exception {\n try {\n element.click();\n } catch (StaleElementReferenceException e){\n By by = By.id(element.getAttribute(\"id\"));\n element = findElementWithRetry(by, 10);\n JavascriptExecutor js = (JavascriptExecutor)driver;\n js.executeScript(\"arguments[0].click();\", element);\n } catch (Exception e){\n JavascriptExecutor js = (JavascriptExecutor)driver;\n js.executeScript(\"arguments[0].click();\", element);\n }\n }", "public static void click_DOM(WebDriver driver, String sLocator, String sLog, String sJavaScript)\n\t{\n\t\tclick_DOM(driver, sLocator, sLog, sJavaScript, bException);\n\t}", "public void clickOn(WebElement element) {\r\n\t\telement.click();\r\n\t}", "public void click(WebDriver driver, By byWebElement) {\n }", "public static WebElement clickByJavascript(WebDriver driver, String objectLocator) throws Exception {\n\t\tString[] parts = objectLocator.split(\":\");\n\t\tif (parts.length < 2) {\n\t\t\tthrow new RuntimeException(\"No type is specified in object locator: \" + objectLocator);\n\t\t}\n\t\tString type = parts[0];\n\t\tString object = parts[1];\n\n\t\tWebElement element;\n\t\ttry {\n\t\t\tif (type.equals(\"id\")) {\n\t\t\t\telement = driver.findElement(By.id(object));\n\t\t\t} else if (type.equals(\"name\")) {\n\t\t\t\telement = driver.findElement(By.name(object));\n\t\t\t} else if (type.equals(\"class\")) {\n\t\t\t\telement = driver.findElement(By.className(object));\n\t\t\t} else if (type.equals(\"link\")) {\n\t\t\t\t;\n\t\t\t\telement = driver.findElement(By.linkText(object));\n\t\t\t} else if (type.equals(\"partiallink\")) {\n\t\t\t\t;\n\t\t\t\telement = driver.findElement(By.partialLinkText(object));\n\t\t\t} else if (type.equals(\"css\")) {\n\t\t\t\telement = driver.findElement(By.cssSelector(object));\n\t\t\t} else if (type.equals(\"xpath\")) {\n\t\t\t\telement = driver.findElement(By.xpath(object));\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Please provide correct element locating strategy\");\n\t\t\t}\n\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", element);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(objectLocator + \": exception occurred: \" + e.getClass().toString());\n\t\t\tthrow e;\n\t\t}\n\t\treturn element;\n\t}", "public static void clickOnElement(WebElement element) {\n\t\telement.click();\n\t}", "public void doubleClickJS(WebElement element) {\n\t\tgetExecutor().executeScript(\"var evt = document.createEvent('MouseEvents');\"\n\t\t\t\t+ \"evt.initMouseEvent('dblclick',true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0,null);\"\n\t\t\t\t+ \"arguments[0].dispatchEvent(evt);\", element);\n\t}", "public void myClick(WebElement element) \n\t{\n\t\twaitHelper.waitForElement(element, ObjectReader.reader.getExplicitWait());\n\t\telement.click();\t\n\t}", "@Override\r\n public void afterClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "@DISPID(-2147412104)\n @PropGet\n java.lang.Object onclick();", "public void clickOnElement (By locator){\n appiumDriver.findElement(locator).click();\n }", "public static void click_DOM(WebElement clickElement, String sLog, WebElement addJS_to_Element)\n\t{\n\t\tclick_DOM(clickElement, sLog, addJS_to_Element, bException);\n\t}", "public static void click(final WebElement element) {\n try {\n defaultWait.until(ExpectedConditions.visibilityOf(element));\n element.click();\n } catch (Exception exception) {\n Log.logError(\"Element not displayed on UI :\" + element + \" \" + exception.getMessage());\n throw new ElementNotVisibleException(\"Cant Find Element\" + element.toString());\n }\n }", "void clickSomewhereElse();", "public void click(WebElement element) {\n\t\telement.click();\n\t}", "public void clickElement(WebElement element) {\n wait = new WebDriverWait(eventDriver, 20);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n element.click();\n }", "@Override\r\npublic void afterClickOn(WebElement arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "private void clickInvite(){\n WebDriverHelper.clickElement(inviteButton);\n }", "public void clickById(String id) {\n\n\n driver.findElementById(id).click();\n\n\n }", "public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }", "public SeleniumQueryObject click() {\n\t\tLOGGER.debug(\"Clicking \"+this+\".\");\n\t\treturn ClickFunction.click(this, this.elements);\n\t}", "public void clickElement(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\n\t\t} catch (NullPointerException e1) {\n\t\t\te1.printStackTrace();\n\n\t\t}\n\t}", "public void elementClick(WebElement element) {\n\t\telementToBeClickable(element);\n\t\telement.click();\n\t}", "public static void click(WebElement element) {\r\n\t\ttry{\r\n\t\t(element).click();\r\n\t\tlog(element+\" is clicked successfully=PASS\");\r\n\t }\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlog(\"Failed to click\"+element+\"=FAIL\");\r\n\t\t}\r\n\t}", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "HtmlPage clickLink();", "@Override\r\n public void beforeClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "public void clickProductDetailsAddToCartBtn(){\n clickElement(productDetailsAddToCart);\n }", "public void actionClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\tActions action = new Actions(driver);\r\n\t\taction.click(element).build().perform();\r\n\t}", "public void clickOnWebElement(WebElement element) {\r\n try {\r\n Thread.sleep(2000);\r\n element.click();\r\n logger.info(\"Element was clicked\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n logger.error(\"Cannot work with element\");\r\n Assert.fail(\"Cannot work with element\");\r\n }\r\n }", "public void ClickAddtoCartiteminCustomersalsoViewed(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoViewedtitle\").split(\",\", 2);\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:- Add to Cart button should be clicked in CustomeralsoViewed table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoViewed table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public void click() throws ApplicationException, ScriptException {\n mouse.click(driver, locator);\n }", "public void clickElement(String strElement, WebElement element) {\n log.traceEntry();\n try {\n if (webWaitsutil.isElementPresent(element) && element.isEnabled()) {\n log.info(\"Clicking element: [{}]\", strElement);\n scrollIntoView(element);\n highlightElement(element);\n element.click();\n } else {\n driver.manage().timeouts().implicitlyWait(ZERO_TIMEOUT, TimeUnit.SECONDS);\n WebDriverWait driverWait = new WebDriverWait(driver, EXPLICIT_WAIT_TIMEOUT);\n driverWait.until(ExpectedConditions.elementToBeClickable(element));\n log.info(\"Clicking element: [{}]\", strElement);\n scrollIntoView(element);\n highlightElement(element);\n element.click();\n }\n } catch (Exception e) {\n log.error(\"Unable to click element! [{}] -- [{}]\", strElement, e.getMessage());\n } finally {\n driver.manage().timeouts().implicitlyWait(FileMgmtUtility.getNumberValue(CommonConstants.DEFAULT_TIMEOUT), TimeUnit.SECONDS);\n }\n log.traceExit();\n }", "public void ClickAddtoCartiteminCustomersalsoOrdered(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoOrderedtitle\").split(\",\", 2);\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:- Add to Cart button should be clicked in CustomeralsoOrdered table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoOrdered table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public static void clickOnElement(By by){ driver.findElement(by).click();\n }", "public void click(By locator){\n\t\tWebElement element = findElementClickable(locator);\n\n\t\ttry {\n\n try {\n element.click();\n }catch(StaleElementReferenceException e)\n {\n\t\t\t\telement = findElementClickable(locator);\n\t\t\t\telement.click();\n }\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while clicking on object using locator \"+locator);\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n }", "public void clickOnElement(String elementName) {\n wait.forElementToBeDisplayed(15, returnElement(elementName), elementName);\n returnElement(elementName).click();\n }", "@Override\r\npublic void beforeClickOn(WebElement arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "@Override\n\tpublic void afterClickOn(WebElement element, WebDriver driver) {\n\t\t\n\t}", "public void execute(Element element) {\n if (\"true\".equals(element.getStyle().getProperty(\"visible\"))\n && element.getState().isRelease()) {\n String method = element.getStyle().getProperty(\"onClick\");\n String controller = element.getUI().getController();\n if (method != null && controller != null) {\n UIUtil.invokeClickMethod(controller, method);\n }\n }\n }", "public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}", "public void clickElementLocation(By anyElement)\n {\n\n Actions execute = new Actions(driver);\n execute.moveToElement(findElement(anyElement)).click().perform();\n }", "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 }", "public void afterClickOn(WebElement element, WebDriver driver) {\n\t}", "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}", "public void click(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public static void clickOnElem(String locator) {\n try {\n // Check and click by cssSelector\n driver.findElement(By.cssSelector(locator)).click();\n } catch (Exception e1) {\n try {\n // Check and click by name\n driver.findElement(By.name(locator)).click();\n } catch (Exception e2) {\n try {\n // Check and click by xpath\n driver.findElement(By.xpath(locator)).click();\n } catch (Exception e3) {\n // Check and click by id\n driver.findElement(By.id(locator)).click();\n }\n }\n }\n }", "public static void clickElement(WebElement obj, String objName) throws IOException {\r\n\r\n\t\tif (obj.isDisplayed()){\r\n\t\t\tobj.click();\r\n\t\t\tUpdate_Report( \"Pass\", \"clickElement\", objName +\" is clicked\");\r\n\t\t}else{\r\n\t\t\tUpdate_Report( \"Fail\", \"clickElement\", objName +\" is not displayed please check your application \");\r\n\t\t}\r\n\t}", "private static Object executeJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing javascript: \" + script);\n return ((JavascriptExecutor) driver).executeScript(script);\n }", "public void clickOnWebElement(By by){\n driver.findElement(by).click();\n }", "public static void clickElement(WebDriver driver, WebElement element) throws Exception {\n\n\t\tlogger.info(\"Clicking element \" + element);\n\t\tif(driver instanceof InternetExplorerDriver)\n\t\t{\n\t\t\tmoveToElementAndClick(driver, element);\n\t\t}\n\t\telse{\n\t\t\tif (isElementClickable(driver, element)) {\n\t\t\t\thighlightElementBorder(driver, element);\n\t\t\t\telement.click();\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Element not in state of clickable\");\n\t\t\t}\n\t\t}\n\n\t\tlogger.info(\"Waited and Clicked on element \");\n\n\t}", "@Test\n\t@TestProperties(name = \"Double click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void doubleClickElement() {\n\t\tnew Actions(driver).doubleClick(findElement(by, locator)).doubleClick().perform();\n\t}", "public void click(By elementDefinition) throws Exception {\n try {\n waitForVisibility(elementDefinition);\n waitForElementClickable(elementDefinition);\n info(\"Performing click operation on element :: \" + elementDefinition);\n getDriver().findElement(elementDefinition).click();\n } catch (Exception e) {\n error(\"Exception occurred while trying to click element with definition \" + elementDefinition);\n error(Throwables.getStackTraceAsString(e));\n throw new Exception(Throwables.getStackTraceAsString(e));\n }\n }", "public String clickWebElement(String object, String data) {\n\t\tlogger.debug(\"Clicking on element\");\n\t\tWebElement ele=null;\n\t\ttry {\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\t\n\t\t\tisInConsistentAlert(object,data);\n\t\t\t ele = explictWaitForElementUsingFluent(object);\n\t\t\t JavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\t\texecutor.executeScript(\"arguments[0].scrollIntoView(true);\", ele);\n\t\t\tele.click();\n\t\t\t//browserSpecificPause(object, data);\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(ElementNotVisibleException ex)\n {\n \tif(new ApplicationSpecificKeywordEventsUtil().clickJs(ele).equals(Constants.KEYWORD_PASS))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL;\n }\n\t\tcatch(StaleElementReferenceException ex){\n\t\t\tele.click();\n\t\t}\n\t\tcatch(WebDriverException ex){\n\t\t\ttry{\n\t\t\t\tString exceptionMessage=ex.getMessage();\n\t\t\t\t\tif(exceptionMessage.contains(\"Element is not clickable at point\"))\n\t\t\t\t\t{\n\t\t\t\tif(new ApplicationSpecificKeywordEventsUtil().clickJs(ele).equals(Constants.KEYWORD_PASS))\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn Constants.KEYWORD_FAIL;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t\treturn Constants.KEYWORD_FAIL+\"not able to Click\"+ex.getMessage();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\n\t\t\t\t\treturn Constants.KEYWORD_FAIL+e.getMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} \n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" \" + e.getMessage() + \" Not able to click\";\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}", "public void clickProductDetailsViewInCartBtn(){\n clickElement(productDetailsViewInCart);\n }", "public static void jsAction(String locatorValue, String act) throws CheetahException {\n\t\ttry {\n\t\t\tJavascriptExecutor js = (JavascriptExecutor) CheetahEngine.getDriverInstance();\n\t\t\tString action = locatorValue + act;\n\t\t\tCheetahEngine.logger.logMessage(null, SeleniumActions.class.getName(),\n\t\t\t\t\t\"JavaScriptExecutor - Generic (user defined) Action: \" + act, Constants.LOG_INFO);\n\t\t\tjs.executeScript(action);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "public void clickLikeBtn() {\n likeBtn.click();\n }", "public void clickOnWebChatWidget() throws Exception {\n\t\twdriver.findElement(By.xpath(WebData.webChatWidget)).click();\n\t}", "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 }", "@And (\"^I click on \\\"([^\\\"]*)\\\"$\")\n\tpublic void click_on(String object){\n\t\tString result = selenium.clickButton(object);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "public static void jQ(JavascriptExecutor executor, String cmd, WebElement element) {\n Preconditions.checkNotNull(executor, \"The executor cannot be null.\");\n Preconditions.checkNotNull(cmd, \"The command cannot be null.\");\n Preconditions.checkNotNull(element, \"The element cannot be null.\");\n String jQueryCmd = String.format(\"jQuery(arguments[0]).%s\", cmd);\n executor.executeScript(jQueryCmd, unwrap(element));\n }", "public void navigateToElement(WebDriver driver, By element) {\n\t if (driver instanceof JavascriptExecutor) {\n\t\t ((JavascriptExecutor) driver).executeScript(\"window.scrollBy(0,\" + (\n\t\t\t\t - driver.findElement(element).getLocation().getY()\n\t\t\t\t + driver.manage().window().getSize().height/2\n\t\t\t\t ) + \")\", \"\");\n\t }\t \n\t}", "public void scrollIntoView(WebElement element){\r\n\t\tJavascriptExecutor je = (JavascriptExecutor)Global.driver;\r\n\t\tje.executeScript(\"arguments[0].click();\", element);\r\n\t}", "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}", "@And (\"^I click \\\"([^\\\"]*)\\\"$\")\n\tpublic void click(String object){\n\t\tString result = selenium.click(object);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "public static String scrollToElementUsingJavaSript(WebDriver driver, WebElement element) {\n\t\ttry {\n\t\t\tif (driver != null) {\n\t\t\t\tJavascriptExecutor jse = (JavascriptExecutor) driver;\n\t\t\t\tjse.executeScript(\"arguments[0].scrollIntoView();\", element);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Driver is not initialised.\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public void ClickMyAccountSubmitbutton(){\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:- My Account Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountSubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountSubmit\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void Inter() throws InterruptedException {\n\t\t//Adv.click();\n\t\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\t\t//js.executeScript(\"arguments[0].click()\", Elemnt);\n\t\t//Thread.sleep(3000);\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\", Interactiontab);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Interaction tab has opened successfully\");\n\t\t\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\", Sortable);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Sortable tab has opened successfully\");\n\t\t\n\t\tGrid.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has opened successfully\");\n\n\t\tGridThree.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected firstnumber successfully\");\n\n\t\tGridNine.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected Second number successfully\");\n\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\", Selectable);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Selectable tab has opened successfully\");\n\t\t\n\t\tList3.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"List tab has selected first number successfully \");\n\t\t\n\t\tList1.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"List tab has selected second number successfully \");\n\t\t\n\t\t\n\t\tGridSelect.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has opened successfully in Selectable tab\");\n\n\t\tGridSeven.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected firstnumber successfully\");\n\t\t\n\t\tGridfive.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected firstnumber successfully\");\n\t\t\n\t\t\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\",Resize);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Resize tab has opened successfully\");\n\t\t\n\t\tActions act= new Actions(driver);\n\t\tact.dragAndDropBy(arrow, 20, 15).perform();;\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Size has been changed successfully\");\n\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\",drop);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Dropable tab has opened successfully\");\n\t\t\n\t\tActions action=new Actions(driver);\n\t\taction.dragAndDrop(drag, drop1).perform();\n\t\tLogger5.log(Status.PASS, \"Simple drag has performed successfully\");\n\n\t\t\n\t\taccept.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Accept tab has opened successfully\");\n\t\t\n\t\tActions a =new Actions(driver);\n\t\ta.dragAndDrop(aceptable, drop2);\n\t\tThread.sleep(5000);\n\t\tLogger5.log(Status.PASS, \"Accept drag has performed successfully\");\n\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\",dragable);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Draggable tab has opened successfully\");\n\t\t\n\t\tAxis.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Axis restricted tab has opened successfully\");\n\t\t\t\n\t\n\t\tPoint p=xaxis.getLocation();\n\t\tSystem.out.println(\"Position of X-axis is :-\" +p.getX());\n\t\tSystem.out.println(\"Position of Y-axis is :-\" +p.getY());\n\t\tActions x=new Actions(driver);\n\t\tx.dragAndDropBy(xaxis, -100, p.getY());\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"X Axis has moved successfully\");\n\t\n\t\tActions y=new Actions(driver);\n\t\ty.dragAndDropBy(yaxis, 0, 900);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Y Axis has moved successfully\");\n\t}", "public static void sendKeysByJS(WebDriver driver, WebElement element,\n\t\t\tString sData) throws InterruptedException {\n\t\tThread.sleep(750);\n\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\texecutor.executeScript(\"arguments[0].value=arguments[1];\", element,\n\t\t\t\tsData);\n\t}", "@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 public void serialization_withClickAfterwards() throws Exception {\n final String html =\n \"<html><head>\\n\"\n + \"<script>\\n\"\n + \" function foo() {\\n\"\n + \" document.getElementById('mybox').innerHTML='hello world';\\n\"\n + \" return false;\\n\"\n + \" }\\n\"\n + \"</script></head>\\n\"\n + \"<body><div id='mybox'></div>\\n\"\n + \"<a href='#' onclick='foo()' id='clicklink'>say hello world</a>\\n\"\n + \"</body></html>\";\n final HtmlPage page = loadPageWithAlerts(html);\n assertEquals(\"\", page.getElementById(\"mybox\").getTextContent());\n\n final WebClient clientCopy = clone(page.getWebClient());\n final HtmlPage pageCopy = (HtmlPage) clientCopy.getCurrentWindow().getTopWindow().getEnclosedPage();\n pageCopy.getElementById(\"clicklink\").click();\n assertEquals(\"hello world\", pageCopy.getElementById(\"mybox\").getTextContent());\n }", "public void click(String locator) {\n waitForElementClickable(locator);\n driver.findElement(By.xpath(locator)).click();\n }", "public void waitElementToBeClickable(WebElement webElement) {\n wait.until(ExpectedConditions.elementToBeClickable(webElement));\n }", "public void HiddenButton(WebDriver driver)\n\t{\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\tWebElement hiddenButton = driver.findElement(By.xpath(\"Path\"));\n\t\tString script = \"arguments[0].click();\";\n\t\t\n\t\tjs.executeScript(script, hiddenButton);\n\t\t\n\t}", "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}", "@When(\"^Clicking on login button$\")\npublic void clicking_on_login_button() throws Throwable {\n driver.findElement(By.xpath(\"//*[@id=\\\"loginfrm\\\"]/button\")).click();\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 clickEvent(String CSSSelector) throws InterruptedException {\n driver.findElement(By.cssSelector(CSSSelector)).click();\n Thread.sleep(5000);\n }", "protected void click(By locator) {\n waitForVisibilityOf(locator, 5);\n waitForElementToBeClickable(locator);\n find(locator).click();\n }", "public void clickloginbutton(){\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:- Login Button should be clicked\");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnLogin\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Login Button is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login button is not clicked with WebElement \"+elementProperties.getProperty(\"btnLogin\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnLogin\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void click(WebElement element) {\r\n\t\tif (isDisplayed(element)) {\r\n\t\t\telement.click();\r\n\t\t} else {\r\n\t\t\tAssert.assertTrue(false, \"WebElement not clickable \" + element);\r\n\t\t}\r\n\t}" ]
[ "0.81257105", "0.7600447", "0.7520132", "0.7498927", "0.74909794", "0.7413594", "0.7304591", "0.72155976", "0.71179986", "0.6712867", "0.6683877", "0.6634604", "0.6612461", "0.6584776", "0.6560243", "0.6554451", "0.6428508", "0.64137024", "0.6370915", "0.63153034", "0.63026685", "0.6248432", "0.6238159", "0.61992323", "0.6180182", "0.61712694", "0.6157321", "0.6143282", "0.61223507", "0.6121071", "0.60899234", "0.60840267", "0.60359424", "0.60291946", "0.6008412", "0.5997325", "0.59801584", "0.5973587", "0.5948425", "0.59209436", "0.591872", "0.58861357", "0.588464", "0.58742195", "0.5861711", "0.5858139", "0.5847029", "0.5843028", "0.5813075", "0.57989264", "0.57909375", "0.5790738", "0.5780051", "0.5761078", "0.5753462", "0.57472736", "0.57454115", "0.57416964", "0.5728586", "0.57266456", "0.5726191", "0.5724442", "0.5700439", "0.56866264", "0.5675036", "0.56748897", "0.5672489", "0.5667428", "0.5664168", "0.5652718", "0.56512165", "0.564325", "0.56318283", "0.5627796", "0.56139034", "0.55983305", "0.5590911", "0.5590529", "0.55736935", "0.5568641", "0.5566602", "0.5553841", "0.5543441", "0.5541522", "0.55344695", "0.55319244", "0.5529688", "0.5524163", "0.5520482", "0.5505644", "0.5505031", "0.5489818", "0.5489118", "0.54889446", "0.54879725", "0.54660535", "0.5462046", "0.5460775", "0.5451491", "0.54446596" ]
0.7106858
9
/ Work on Dropdowns
public static void select(WebElement select1, String value) { Select select = new Select(select1); select.selectByVisibleText(value); Reporter.log("Selecting from dropdown value as : " + value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dropdown(HttpServletRequest request, HttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> Entering... \");\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.SEXDISTRIBUTIONDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.AGEUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRUSDROP, Constants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRALTREATUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.ADMINISTRATIVEROUTEDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t}", "public void Dropdownselection(WebElement ele) {\t\t\n\t\t\n\t Select dropdown = new Select(ele);\n\t//Get all options\n\tList<WebElement> dd = dropdown.getOptions();\n\t int iCnt = dd.size();\n Random num = new Random();\n int iSelect = num.nextInt(iCnt);\n dropdown.selectByIndex(iSelect);\n System.out.println(\"Element Name 1 : \" +ele.getAttribute(\"value\"));\n\t}", "public static void main(String[] args) {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tChromeDriver driver = new ChromeDriver();\n\t\tdriver.get(\"http://leafground.com/\");\n\t\tdriver.findElementByLinkText(\"Drop down\").click();\n\t\t\n\t\tWebElement qIndex= driver.findElementById(\"dropdown1\");\n\t\tSelect dd1 = new Select(qIndex);\n\t\tdd1.selectByIndex(1);\n\t\t\n\t\t\n\t\tWebElement qText= driver.findElementByName(\"dropdown2\");\n\t\tSelect dd2 = new Select(qText);\n\t\tdd2.selectByVisibleText(\"Appium\");\n\t\t\n\t\t\n\t\tWebElement qValue= driver.findElementById(\"dropdown3\");\n\t\tSelect dd3 = new Select(qValue);\n\t\tdd3.selectByVisibleText(\"UFT/QTP\");\n\t\t\n\t\tWebElement qCount= driver.findElementByClassName(\"dropdown\");\n\t\tSelect dd4 = new Select(qCount);\n\t\tList<WebElement> options = dd4.getOptions();\n\t\tint count = options.size();\n\t\tSystem.out.println(count);\n\t\t\n\t\tWebElement qSend= driver.findElementByXPath(\"//div[@class='example'][5]/select\");\n\t\tqSend.sendKeys(Keys.DOWN);\n\t\t\n\t\tWebElement qMultiple = driver.findElementByXPath(\"//div[@class='example'][6]/select\");\n\t\tSelect dd6 = new Select(qMultiple);\n\t\tboolean multiple = dd6.isMultiple();\n\t\tif(multiple==true)\n\t\t{\n\t\t\tSystem.out.println(\"This field is multiple selected\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"This field is not multiple selected\");\n\t\t}\n\t\tqMultiple.sendKeys(Keys.CONTROL);\n\t\tdd6.selectByValue(\"1\");\n\t\tdd6.selectByValue(\"3\");\n\t\t\n\t}", "@Test(priority = 13)\n public void selectDropdownTest() {\n Select colors = new Select(driver.findElement(By.cssSelector(\"div.colors select\")));\n colors.selectByVisibleText(\"Yellow\");\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown53() {\n return build_f_ListDropDown53();\n }", "public void searchFilter(){\n\t\t\n\t\tdriver.findElement(By.xpath(\"//div[@class='_3uDYxP']//select[@class='_2YxCDZ']\")).click();\n\t\tSystem.out.println(\"drop-downselected\");\n\t}", "private void dropBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dropBox1ActionPerformed\n int sqlSelector = getSelections();\n sqlBuilder(sqlSelector);\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown9() {\n return build_f_ListDropDown9();\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu22() {\n return build_f_DropDownMenu22();\n }", "public String getDropdown() {\n\t\treturn dropdown;\n\t}", "public void clickOnGroupNameDropdownButton() {\r\n\t\tsafeClick(vehicleLinkPath.replace(\"ant-card-head-title\", \"ant-select ant-select-enabled\"), MEDIUMWAIT);\r\n\t}", "@Test\n public void test5_html_dropdown_handling(){\n //Locate the HTML dropdown as a regular web element\n WebElement websiteDropdown = driver.findElement(By.xpath(\"//div[@class='dropdown']/a\"));\n\n //3. Click to non-select dropdown\n websiteDropdown.click();\n\n //4. Select Facebook from dropdown\n WebElement facebookLink = driver.findElement(By.xpath(\"//a[.='Facebook']\"));\n\n facebookLink.click();\n\n //5. Verify title is “Facebook - Log In or Sign Up”\n String actualTitle = driver.getTitle();\n String expectedTitle = \"Facebook - Log In or Sign Up\";\n\n Assert.assertEquals(actualTitle, expectedTitle, \"Actual title does not match expected title!\");\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu57() {\n return build_f_DropDownMenu57();\n }", "WebElement getStatusSelectField();", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown44() {\n return build_f_ListDropDown44();\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown66() {\n return build_f_ListDropDown66();\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu73() {\n return build_f_DropDownMenu73();\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown71() {\n return build_f_ListDropDown71();\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\chris\\\\OneDrive\\\\Documents\\\\chromedriver ver-94\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://www.leafground.com/pages/Dropdown.html\");\r\n\t \r\n\t\t// for dropdown select class is used\r\n\t// To select program using index by creating select class\r\n\t\t\r\n\t\tWebElement index = driver.findElement(By.id(\"dropdown1\"));\r\n\t\tSelect select = new Select(index);\r\n\t\tselect.selectByIndex(1);\r\n\t\tselect.selectByIndex(2);\r\n\t\r\n // To select program using text by creating select class\r\n\t\t\r\n\t\tWebElement text = driver.findElement(By.name(\"dropdown2\"));\r\n\t\tSelect select1 = new Select(text);\r\n\t\tselect1.selectByVisibleText(\"Loadrunner\");\r\n\t\t\r\n // To select program using value using select class\r\n\t\t\r\n\t\tWebElement value = driver.findElement(By.id(\"dropdown3\"));\r\n\t\tSelect select2 = new Select(value);\r\n\t\tselect2.selectByValue(\"3\");\r\n\t\t\r\n // To know how many options are present\r\n\t\t\r\n\t /*List<WebElement> optionlist = select2.getOptions();\r\n\t int size = optionlist.size();\r\n\t System.out.println(size);*/\r\n\t\t\r\n\t //or\r\n\t\t\r\n\t List<WebElement> optionlist = select2.getOptions();\r\n\t System.out.println(optionlist.size());\r\n\t \r\n\t int size=optionlist.size(); \r\n\t for (int i= 0;i<size;i++)\r\n\t {\r\n\t\t System.out.println(optionlist.get(i).getText());\r\n\t }\r\n\t \r\n // Select using sendkeys\r\n\t\r\n\tWebElement element = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[5]/select\"));\r\n\t//element.sendKeys(\"Selenium\"); // even if you write partial texts ex: \"Sel\" it still selects\r\n\telement.sendKeys(\"App\");\r\n\t\r\n\t// to select program without using select class\r\n\t\r\n\tWebElement withoutselect = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[6]/select\"));\r\n\twithoutselect.sendKeys(\"Load\");\r\n\t\r\n\t}", "public void clickOnVehicleNameDropdownButton() {\r\n\t\tsafeClick(vehicleLinkPath.replace(\"ant-card-head-title\", \"ant-select ant-select-enabled\"), MEDIUMWAIT);\r\n\t}", "public void setUpDropdowns(){\n\t\t\n\t\tString[] numberList = {\"2\",\"3\",\"4\"};\n\t\tframe.getContentPane().removeAll();\n\t\t\n\t\touterPanel = new JPanel();\t\t\n\t\touterPanel.setLayout(new FlowLayout()); \n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t\t\n\t\t//JComboBox = Dropwdown list\n\t\tfinal JComboBox<String> dropdownList = new JComboBox<>(numberList);\n\t\tdropdownList.setSelectedIndex(0);\n\t\t//frame.getContentPane().add(dropdownList);\n\t\tfinal JLabel amountOfPlayers = new JLabel(\"Give the amount of players: \");\n\t\tamountOfPlayers.setForeground(Color.WHITE);\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));\n\t\tJLabel instructions = new JLabel();\n\t\tPictureCreateClass instructionsP = new PictureCreateClass(URLs.INSTRUCTIONS,400,400);\n\t\tImage image = instructionsP.getImage();\n\t\tImageIcon icon = new ImageIcon(image);\n\t\tinstructions.setIcon(icon);\n\t\tpanel.add(amountOfPlayers);\n\t\tpanel.add(dropdownList);\n\t\tJPanel uberOuterPanel = new JPanel();\n\t\tuberOuterPanel.setLayout(new FlowLayout());\n\t\tuberOuterPanel.setBackground(Color.BLACK);\n\t\tuberOuterPanel.add(instructions);\n\t\tuberOuterPanel.add(outerPanel);\n\t\touterPanel.add(panel);\n\t\tframe.add(uberOuterPanel);\n\t\tpanel.setBackground(Color.BLACK);\n\t\touterPanel.setBackground(Color.BLACK);\n\t\tJButton returnButton = new JButton(\"Go to Menu\");\n\t\touterPanel.add(Box.createHorizontalStrut(100));\n\t\touterPanel.add(returnButton);\n\t\treturnButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tMenu m = new Menu(frame);\n\t\t\t\tm.makeMenu();\n\t\t\t}\n\t\t});\n\t\t\n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t\tdropdownList.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>)e.getSource();\n\t\t\t\tamountPlayers = Integer.parseInt((String)cb.getSelectedItem());\n\t\t\t\tpanel.remove(dropdownList);\n\t\t\t\tamountOfPlayers.setText(\"Type the player names\");\n\t\t\t\tsetUpPlayers(amountOfPlayers);\n\t\t\t}\t\n\t\t});\n\t}", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu11() {\n return build_f_DropDownMenu11();\n }", "private void verifyDropdownsAndActiveTesterFields()\n\t{\n\t\ttry\n\t\t{\n\t\t\t//verify default selection in Select Date dropdown and its available options\n\t\t\tSelect selectDateDD = new Select(getElement(\"StakeholderDashboard_selectDateDropDown_Id\"));\t\n\t\t\t\n\t\t\tif (assertTrue(getElement(\"StakeholderDashboard_selectDateDropDown_Id\").isDisplayed())) \n\t\t\t{\n\t\t\t\t\tString dateFilterOption = selectDateDD.getFirstSelectedOption().getText();\n\t\t\t\t\t\n\t\t\t\t\tif (compareStrings(\"Select Filter\", dateFilterOption)) \n\t\t\t\t\t {\n\t\t\t\t\t\t APP_LOGS.debug(\"Date Filter dropdown value set to 'Select Filter' option.\");\t\t\t\t\t\t\t \n\t\t\t\t\t\t comments += \"\\n Date Filter dropdown value set to 'Select Filter' option.(Pass)\";\t\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t else \n\t\t\t\t\t {\n\t\t\t\t\t\tfail=true;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcomments += \"\\n Date Filter dropdown value is not set to 'Select Filter' option.(Fail) \";\t\t\t\t\t\t\t\n\t\t\t\t\t\tAPP_LOGS.debug(\"Date Filter dropdown value is not set to 'Select Filter' option. Test case failed\");\t\t\t\t\t\t\t\n\t\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"Select Date dropdown not set to 'Select Filter' option\");\n\t\t\t\t\t }\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t\tfail=true;\t\t\t\t\t\n\t\t\t\t\tcomments += \"\\n 'Select Date' dropdown is not displayed on Consolidated View tab.(Fail) \";\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"'Select Date' dropdown is not displayed on Consolidated View tab. Test case failed\");\t\t\t\t\t\n\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"'Select Date' dropdown not visible\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//verify default selection in Fiscal Year dropdown and its available options like FY14, FY15\n\t\t\tSelect selectFiscalYearDD = new Select(getElement(\"StakeholderDashboard_fiscalYearDropDown_Id\"));\n\t\t\t\n\t\t\tif (assertTrue(getElement(\"StakeholderDashboard_fiscalYearDropDown_Id\").isDisplayed())) \n\t\t\t{\n\t\t\t\t\tString defaultSelectedFiscalYear = selectFiscalYearDD.getFirstSelectedOption().getText();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\t\t\t\t\t\n\t\t\t\t\tDate date = new Date();\t\t\t\t\t\n\t\t\t\t\tsystemDate = dateFormat.format(date);\n\t\t\t\t\t\n\t\t\t\t\tmonth = Integer.parseInt(systemDate.substring(0, 2));\n\t\t\t\t\n\t\t\t\t\tif(month >= 7)\t\t\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\tfiscalYear = Integer.parseInt(systemDate.substring(8))+1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (compareIntegers(fiscalYear, Integer.parseInt(defaultSelectedFiscalYear.substring(3)))) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tAPP_LOGS.debug(\"Current fiscal year \"+fiscalYear+\" is displayed in 'Fiscal Year' dropdown as default. \");\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcomments += \"\\n Current fiscal year \"+fiscalYear+\" is displayed in 'Fiscal Year' dropdown as default.(Pass) \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfail=true;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcomments += \"\\n Current fiscal year \"+fiscalYear+\" is NOT displayed in 'Fiscal Year' dropdown as default.(Fail) \";\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tAPP_LOGS.debug(\"Current fiscal year \"+fiscalYear+\" is NOT displayed in 'Fiscal Year' dropdown as default. Test case failed\");\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"current fiscal year \"+fiscalYear+\" is not displayed selected in 'Fiscal Year' dropdown\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfiscalYear = Integer.parseInt(systemDate.substring(8));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (compareIntegers(fiscalYear, Integer.parseInt(defaultSelectedFiscalYear.substring(3)))) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tAPP_LOGS.debug(\"Current fiscal year \"+fiscalYear+\" is displayed in 'Fiscal Year' dropdown as default. \");\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcomments += \"\\n Current fiscal year \"+fiscalYear+\" is displayed in 'Fiscal Year' dropdown as default.(Pass) \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfail=true;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcomments += \"\\n Current fiscal year \"+fiscalYear+\" is NOT displayed in 'Fiscal Year' dropdown as default.(Fail) \";\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tAPP_LOGS.debug(\"Current fiscal year \"+fiscalYear+\" is NOT displayed in 'Fiscal Year' dropdown as default. Test case failed\");\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"current fiscal year \"+fiscalYear+\" is not displayed selected in 'Fiscal Year' dropdown\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t\tfail=true;\t\t\t\t\t\t\n\t\t\t\t\tcomments += \"\\n 'Fiscal Year' dropdown is not displayed on Stakeholder Dashboard Page.(Fail) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"'Fiscal Year' dropdown is not displayed on Stakeholder Dashboard Page. Test case failed\");\t\t\t\t\t\t\n\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"'Fiscal Year' dropdown not displayed\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//verify quarter checkboxes visible or not and current quarter is selected by default or not\n\t\t\tif (assertTrue(getElement(\"StakeholderDashboard_Q1Checkbox_Id\").isDisplayed() \n\t\t\t\t\t&& getElement(\"StakeholderDashboard_Q2Checkbox_Id\").isDisplayed() \n\t\t\t\t\t&& getElement(\"StakeholderDashboard_Q3Checkbox_Id\").isDisplayed() \n\t\t\t\t\t&& getElement(\"StakeholderDashboard_Q4Checkbox_Id\").isDisplayed())) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t\tif(assertTrue((!getElement(\"StakeholderDashboard_Q1Checkbox_Id\").isSelected())\n\t\t\t\t\t\t\t&& (!getElement(\"StakeholderDashboard_Q2Checkbox_Id\").isSelected())\n\t\t\t\t\t\t\t&& (!getElement(\"StakeholderDashboard_Q3Checkbox_Id\").isSelected())\n\t\t\t\t\t\t\t&& (!getElement(\"StakeholderDashboard_Q4Checkbox_Id\").isSelected())))\n\t\t\t\t\t{\n\t\t\t\t\t\tcomments += \"\\n Any/All Quarter checkboxes/checkbox are/is unselected on Stakeholder Dashboard Page.(Pass) \";\t\t\t\t\t\t\n\t\t\t\t\t\tAPP_LOGS.debug(\"Any/All Quarter checkboxes/checkbox are/is unselected on Stakeholder Dashboard Page.\");\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\t\t\t\t\t\t\n\t\t\t\t\t\t\tfail=true;\t\t\t\t\t\t\n\t\t\t\t\t\t\tcomments += \"\\n Any/All Quarter checkboxes/checkbox is/are selected.(Fail) \";\t\t\t\t\t\t\n\t\t\t\t\t\t\tAPP_LOGS.debug(\"Any/All Quarter checkboxes/checkbox is/are selected. Test case failed\");\t\t\t\t\t\t\n\t\t\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"Quarter checkboxes selected\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t\tfail=true;\t\t\t\t\t\t\n\t\t\t\t\tcomments += \"\\n Any/All Quarter checkboxes/checkbox are/is not displayed on Stakeholder Dashboard Page.(Fail) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Any/All Quarter checkboxes/checkbox are/is not displayed on Stakeholder Dashboard Page. Test case failed\");\t\t\t\t\t\t\n\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"Quarter checkboxes not available\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//verify if active tester count is visible or not\n\t\t\tif(assertTrue(!getElement(\"StakeholderDashboardConsolidatedView_activeTesterCount_Id\").isDisplayed()))\n\t\t\t{\n\t\t\t\t\tcomments += \"\\n Active Tester Count NOT Visible.(Pass) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Active Tester Count NOT Visible.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t\tfail=true;\t\t\t\t\t\t\n\t\t\t\t\tcomments += \"\\n Active Tester Count visible.(Fail) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Active Tester Count visible. Test case failed\");\t\t\t\t\t\t\n\t\t\t\t\tTestUtil.takeScreenShot(this.getClass().getSimpleName(), \"ActiveTesterCountVisible\");\n\t\t\t}\n\t\t\t\n\t\t\t//verify execution bar graph displays or not\n\t\t\tif(assertTrue(!getElement(\"StakeholderDashboardConsolidatedView_executionBarGraph_Id\").isDisplayed()))\n\t\t\t{\n\t\t\t\t\tcomments += \"\\n Execution bar graph NOT visible.(Pass) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Execution bar graph NOT visible.(Pass) \");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\tfail=true;\n\t\t\t\t\tcomments += \"\\n Execution bar graph visible.(Fail) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Execution bar graph visible.\");\n\t\t\t}\n\t\t\t\n\t\t\t//verify executed count link visible or not\n\t\t\tif(assertTrue(!getElement(\"StakeholderDashboardConsolidatedView_executedStatusCountLabel_Id\").isDisplayed()))\n\t\t\t{\n\t\t\t\t\tcomments += \"\\n Executed count NOT visible.(Pass) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Executed count NOT visible.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\tfail=true;\n\t\t\t\t\tcomments += \"\\n Executed count visible.(Fail) \";\t\t\t\t\t\t\n\t\t\t\t\tAPP_LOGS.debug(\"Executed count visible.\");\n\t\t\t}\t\t\n\t\t\t\n\t\t}\n\t\tcatch(Throwable t)\n\t\t{\n\t\t\tt.printStackTrace();\n\t\t\tfail=true;\n\t\t}\n\t}", "private void openDropdown() {\n if (dropdownLinearLayout.getVisibility() != View.VISIBLE) {\n ScaleAnimation anim = new ScaleAnimation(1, 1, 0, 1);\n anim.setDuration(getResources().getInteger(R.integer.dropdown_amination_time));\n dropdownLinearLayout.startAnimation(anim);\n dropdownTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.icn_dropdown_close, 0);\n// feelTextsListView\n dropdownLinearLayout.setVisibility(View.VISIBLE);\n }\n }", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu46() {\n return build_f_DropDownMenu46();\n }", "public void tldDropdown(int index)\n\t{\n\t\tSelect s=new Select(driver.findElement(_tldSelect));\n\t\ts.selectByIndex(index);\n\t\tlog.info(\"Selected TLD\");\n\t}", "public final void updateDropdown() {\n Msg.send(\"Updating Dropdown...\");\n messages.removeAllItems();\n //Populates the dropdown\n for (int j = 0; j < lines.size(); j++) {\n String messageStr = (String) lines.get(j);\n if (j < 10) {\n System.out.println(\"Message: \" + messageStr);\n }\n String[] parts = messageStr.split(\";\");\n String num = parts[0];\n String title = parts[1];\n messages.addItem(num + \". \" + title);\n }\n }", "public ActionForward dropdown(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> ... \");\n \n \t\t// blank out the FORMDATA Constant field\n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\t// setup dropdown menus\n \t\tthis.dropdown(request, response);\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction> exiting... \");\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}", "void setupToolbarDropDown(List<? extends CharSequence> dropDownItemList);", "private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown20() {\n return build_f_ListDropDown20();\n }", "private void updateEnumDropDowns( final DSLDropDown source ) {\n\n //Copy selections in UI to data-model, used to drive dependent drop-downs\n updateSentence();\n\n final int sourceIndex = dropDownWidgets.indexOf( source );\n for ( DSLDropDown dd : dropDownWidgets ) {\n if ( dropDownWidgets.indexOf( dd ) > sourceIndex ) {\n dd.refreshDropDownData();\n }\n }\n\n //Copy selections in UI to data-model again, as updating the drop-downs\n //can lead to some selected values being cleared when dependent drop-downs\n //are used.\n updateSentence();\n }", "private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown55() {\n return build_f_ListDropDown55();\n }", "private void add() {\n \t\r\n\tArrayAdapter<String> adp=new ArrayAdapter<String>(this,\r\n\t\tandroid.R.layout.simple_dropdown_item_1line,li);\r\n\t \t\r\n\tadp.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\tauto.setThreshold(1);\r\n\tauto.setAdapter(adp);\r\n\tsp.setAdapter(adp);\r\n\t\r\n }", "@Test\n public void testDropDown() throws Exception {\n final ListBoxModel bin = wrapper.getDescriptor().doFillBinConfigItems();\n assertEquals(2, bin.size());\n assertEquals(\"bin1\", bin.get(0).name);\n assertEquals(\"bin1\", bin.get(0).value);\n assertEquals(\"bin2\", bin.get(1).name);\n assertEquals(\"bin2\", bin.get(1).value);\n \n final ListBoxModel metrics = wrapper.getDescriptor().doFillMetricsConfigItems();\n assertEquals(3, metrics.size());\n assertEquals(\"<unset>\", metrics.get(0).name);\n assertEquals(\"<unset>\", metrics.get(0).value);\n assertEquals(\"metrics1\", metrics.get(1).name);\n assertEquals(\"metrics1\", metrics.get(1).value);\n assertEquals(\"metrics2\", metrics.get(2).name);\n assertEquals(\"metrics2\", metrics.get(2).value);\n \n final ListBoxModel access = wrapper.getDescriptor().doFillServerConfigItems();\n assertEquals(3, access.size());\n assertEquals(\"<unset>\", access.get(0).name);\n assertEquals(\"<unset>\", access.get(0).value);\n assertEquals(\"access1\", access.get(1).name);\n assertEquals(\"access1\", access.get(1).value);\n assertEquals(\"access2\", access.get(2).name);\n assertEquals(\"access2\", access.get(2).value); \n }", "public void category1() {\r\n\t\tmySelect1.click();\r\n\t}", "@Override\r\n\tpublic void adminSelectAdd() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu68() {\n return build_f_DropDownMenu68();\n }", "public static void selectDropDown(WebElement obj, String selectItem, String objname) throws Exception{\r\n\t\tif(obj.isDisplayed()){\r\n\t\t\tSelect options = new Select(obj);\r\n\t\t\toptions.selectByVisibleText(selectItem);\r\n\t\t\tUpdate_Report(\"Pass\", \"selectFromDropDown\", \"Menu item \" +selectItem+ \" is Selected\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tUpdate_Report(\"Fail\", \"selectFromDropDown\", objname + \" DropDown menu is not displayed please check your application\");\r\n\t\t}\r\n\t}", "@Test(priority = 3)\n public void serviceDropdownMenuTest() {\n driver.findElement(new By.ByLinkText(\"SERVICE\")).click();\n List<WebElement> elements = driver.findElements(By.cssSelector(\"ul.dropdown-menu li\"));\n assertEquals(elements.size(), 9);\n }", "private void BuildingCombo() {\n \n }", "public static List getOtherDropdownItems(Connection conn) throws ServletException, SQLException, ObjectNotFoundException {\r\n List<DropdownItem> items;\r\n String sql = \"select item.id AS dropdownId, item_group.short_name || ': ' || item.name AS dropdownValue \" +\r\n \t\"FROM item,item_group WHERE item.ITEM_GROUP_ID = item_group.ID \" +\r\n \t\"AND (ITEM_GROUP_ID > 3 AND ITEM_GROUP_ID < 9) ORDER BY ITEM_GROUP_ID,item.name\";\r\n if ((Constants.DISPLAY_ALL_DRUGS_WHEN_DISPENSING != null) && (Constants.DISPLAY_ALL_DRUGS_WHEN_DISPENSING.equals(\"1\"))) {\r\n \tsql = \"select item.id AS dropdownId, item.name AS dropdownValue \" +\r\n \t\"FROM item,item_group WHERE item.ITEM_GROUP_ID = item_group.ID \" +\r\n \t\"AND (ITEM_GROUP_ID > 3) ORDER BY ITEM_GROUP_ID,item.name\";\r\n }\r\n \tArrayList values = new ArrayList();\r\n \t//item = (DropdownItem) DatabaseUtils.getBean(conn, DropdownItem.class, sql, values);\r\n BeanProcessor beanprocessor = new AuditInfoBeanProcessor();\r\n RowProcessor convert = new ZEPRSRowProcessor(beanprocessor);\r\n items = DatabaseUtils.getList(conn, DropdownItem.class, sql, values, convert);\r\n \treturn items;\r\n }", "public static void main(String[] args)\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"/Users/anbarasiannamalai/eclipse-workspace/MyFirstProject/chromedriver\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"http://leafground.com/pages/Dropdown.html\");\n\t\tWebElement Dropdown1 = driver.findElement(By.id(\"dropdown1\"));\n\t\tSelect selectdrop = new Select(Dropdown1);\n\t\tselectdrop.selectByIndex(1);\n\t\t//Thread.sleep(3000);\n\t\t//selectdrop.selectByValue(\"4\");\n\t\t//selectdrop.selectByVisibleText(\"Appium\");\n\t\tList<WebElement> listoptions =selectdrop.getOptions();\n\t\tint size = listoptions.size();\n\t\tSystem.out.println(\"NUmber of list in the dropdown\"+ size);\n\t\tDropdown1.sendKeys(\"Loadrunner\");\n\t\t\n\t\tWebElement mutlislectbox = driver.findElement(By.xpath(\"//*[@id=\\'contentblock\\']/section/div[6]/select\"));\n\t\tSelect multislect = new Select(mutlislectbox);\n\t\tmultislect.selectByValue(\"1\");\n\t\tmultislect.selectByValue(\"2\");\n\t\t\n\n\t\t//driver.quit();\n\n\t}", "public void setDropDownToFeelGood() {\n scrollNWClick(scroll, \"Feelgood\");\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!isEdit) {\r\n\t\t\t\t\txb_popup.showAsDropDown(xbet, 0, 1, xbet.getWidth(),\r\n\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT);\r\n\t\t\t\t}\r\n\t\t\t}", "public void selectOption(WebElement element,String text) {\nSelect s=new Select(element);\n//List<WebElement> options = s.getOptions();\n//WebElement webElement = options.get(index);\n//String text = webElement.getText();\ns.selectByVisibleText(text);\n\n\n}", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "public static void dropdown_DOM(WebDriver driver, String sLocator, String sLog, String sJavaScript,\n\t\t\tDropDown dropdown)\n\t{\n\t\tif (dropdown.using == Selection.Skip)\n\t\t{\n\t\t\tLogs.log.info(\"Skipped entering '\" + sLog + \"'\");\n\t\t\treturn;\n\t\t}\n\n\t\tWebElement element = Framework.findElementAJAX(driver, sLocator);\n\t\tList<WebElement> options = Framework.getOptions(element);\n\t\tif (options.size() < 2)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tLogs.log.warn(\"There were not enough options to make a selection for '\" + sLog + \"'. \"\n\t\t\t\t\t\t+ \"(There is AJAX that requires more than 1 option.)\");\n\n\t\t\t\t// Verify that the only option is the option the user wanted\n\t\t\t\tVerify.dropDown(element, dropdown, true);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tString sOptionsAvailable = \"No Options Available\";\n\t\t\t\tif (options.size() == 1)\n\t\t\t\t{\n\t\t\t\t\tDropDownDefaults selected = DropDownDefaults.defaultsFromElement(element);\n\t\t\t\t\tsOptionsAvailable = selected.toString();\n\t\t\t\t}\n\n\t\t\t\tLogs.logError(\"Drop down options: '\" + sOptionsAvailable + \"'\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDropDownDefaults defaults = DropDownDefaults.defaultsFromElement(element);\n\t\t\tAJAX.dropdown_DOM(driver, sLocator, sLog, sJavaScript, dropdown, defaults);\n\t\t\telement = Framework.findElementAJAX(driver, sLocator);\n\t\t\tVerify.dropDown(element, dropdown, false);\n\t\t}\n\t}", "private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu55() {\n return build_f_DropDownMenu55();\n }", "public void selectDropDuwn(String dropDownValue) {\n\t\t\n\t\ttry {\n\t\t\tTestLog.log.info(\"check dropdown exist\");\n\t\t\tif (driver.findElement(dropDown).isDisplayed()) {\n\t\t\t\tTestLog.log.info(\"select from dropdown list\");\n\t\t\t\tSelect drpRecords = new Select(driver.findElement(dropDown));\n\t\t\t\tdrpRecords.selectByVisibleText(dropDownValue);\n\t\t\t} else {\n\t\t\t\tTestLog.log.info(\"dropdown does not exist\");\n\t\t\t\tSystem.out.println(\"Table Entry dropdown not visible\");\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tTestLog.log.info(\"Could not find dropdown\" + ex);\n\t\t}\n\n\t}", "public void selectOptionInDepartment(String department, String optionsLinkText) {\r\n\t\tint departmentCode;\r\n\t\tint optionsListCode;\r\n\t\tswitch (department) {\r\n\t\tcase \"Amazon Prime\":\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tbreak;\r\n\t\tcase \"Amazon Prime Video\":\r\n\t\t\tdepartmentCode = 2;\r\n\t\t\toptionsListCode = 2;\r\n\t\t\tbreak;\r\n\t\tcase \"Prime Music\":\r\n\t\t\tdepartmentCode = 3;\r\n\t\t\toptionsListCode = 3;\r\n\t\t\tbreak;\r\n\t\tcase \"Savings Programs\":\r\n\t\t\tdepartmentCode = 4;\r\n\t\t\toptionsListCode = 4;\r\n\t\t\tbreak;\r\n\t\tcase \"Appstore for Android\":\r\n\t\t\tdepartmentCode = 5;\r\n\t\t\toptionsListCode = 5;\r\n\t\t\tbreak;\r\n\t\tcase \"Echo & Alexa\":\r\n\t\t\tdepartmentCode = 7;\r\n\t\t\toptionsListCode = 6;\r\n\t\t\tbreak;\r\n\t\tcase \"Fire Tablets & Fire TV\":\r\n\t\t\tdepartmentCode = 8;\r\n\t\t\toptionsListCode = 7;\r\n\t\t\tbreak;\r\n\t\tcase \"Kindle\":\r\n\t\t\tdepartmentCode = 9;\r\n\t\t\toptionsListCode = 8;\r\n\t\t\tbreak;\r\n\t\tcase \"Books & Audible\":\r\n\t\t\tdepartmentCode = 11;\r\n\t\t\toptionsListCode = 9;\r\n\t\t\tbreak;\r\n\t\tcase \"Video Games & Twitch Prime\":\r\n\t\t\tdepartmentCode = 12;\r\n\t\t\toptionsListCode = 10;\r\n\t\t\tbreak;\r\n\t\tcase \"Music, Movies & TV Shows\":\r\n\t\t\tdepartmentCode = 13;\r\n\t\t\toptionsListCode = 11;\r\n\t\t\tbreak;\r\n\t\tcase \"Electronics\":\r\n\t\t\tdepartmentCode = 14;\r\n\t\t\toptionsListCode = 12;\r\n\t\t\tbreak;\r\n\t\tcase \"Home, Garden, Pets & Tools\":\r\n\t\t\tdepartmentCode = 15;\r\n\t\t\toptionsListCode = 13;\r\n\t\t\tbreak;\r\n\t\tcase \"Grocery & Whole Foods Market\":\r\n\t\t\tdepartmentCode = 16;\r\n\t\t\toptionsListCode = 14;\r\n\t\t\tbreak;\r\n\t\tcase \"Health & Beauty\":\r\n\t\t\tdepartmentCode = 17;\r\n\t\t\toptionsListCode = 15;\r\n\t\t\tbreak;\r\n\t\tcase \"Toys, Kids, Baby & STEM\":\r\n\t\t\tdepartmentCode = 18;\r\n\t\t\toptionsListCode = 16;\r\n\t\t\tbreak;\r\n\t\tcase \"Clothing, Shoes & Jewelry\":\r\n\t\t\tdepartmentCode = 19;\r\n\t\t\toptionsListCode = 17;\r\n\t\t\tbreak;\r\n\t\tcase \"Handmade\":\r\n\t\t\tdepartmentCode = 20;\r\n\t\t\toptionsListCode = 18;\r\n\t\t\tbreak;\r\n\t\tcase \"Sports & Outdoors\":\r\n\t\t\tdepartmentCode = 21;\r\n\t\t\toptionsListCode = 19;\r\n\t\t\tbreak;\r\n\t\tcase \"Automotive & Industrial\":\r\n\t\t\tdepartmentCode = 22;\r\n\t\t\toptionsListCode = 20;\r\n\t\t\tbreak;\r\n\t\tcase \"Boutiques Francophones\":\r\n\t\t\tdepartmentCode = 23;\r\n\t\t\toptionsListCode = 21;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tLog.info(\" The given Department Name: \" + department\r\n\t\t\t\t\t+ \" is either incorrect or is not defined in the method: selectDepartmentByHoveringMouse\"\r\n\t\t\t\t\t+ \" of NavBarAmazonHomePage.class,Please Check.\");\r\n\t\t}\r\n\r\n\t\tWebElement desiredDepartment = driver.findElement(By.cssSelector(\r\n\t\t\t\t\"#nav-flyout-shopAll > div.nav-template.nav-flyout-content.nav-tpl-itemList > span:nth-child(\"\r\n\t\t\t\t\t\t+ departmentCode + \")\"));\r\n\t\tseHoverOnElement(NavBarAmazonHomePage.get().btnNavbarShopByDepartment, \"btnNavbarShopByDepartment\");\r\n\t\tseWaitForClickableWebElement(driver, desiredDepartment, 20);\r\n\t\tseHoverOnElement(desiredDepartment, department);\r\n\t\tselectOptionByLinkText(optionsListCode, optionsLinkText);\r\n\t}", "public void showDropDown() {\n/* 592 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void selectDropdownValueFromDropdownHeaderTopupMenu(String strDropdownValue) {\r\n\t\tBy locator = By.xpath(\"//ul[@class='dropdown-menu']/li/a[text()='\" + strDropdownValue + \"']\");\r\n\t\tdriver.findElement(locator).click();\r\n\t}", "public SelenideElement rolesDropDownButton () {\n return formPageRoot().$(\"button.dropdown-toggle\");\n }", "private void llenarCombo(HTMLSelectElement combo, String tabla, String codigo, String descripcion, String condicion, String defecto, boolean dejarBlanco) {\n/* 436 */ if (dejarBlanco) {\n/* 437 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 438 */ op.setValue(\"\");\n/* 439 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 440 */ combo.appendChild(op);\n/* */ } \n/* 442 */ TGeneralDAO rsTGen = new TGeneralDAO();\n/* 443 */ Collection<TGeneralDTO> arr = rsTGen.cargarTabla(tabla, codigo, descripcion, condicion);\n/* 444 */ rsTGen.close();\n/* 445 */ Iterator<TGeneralDTO> iterator = arr.iterator();\n/* 446 */ while (iterator.hasNext()) {\n/* 447 */ TGeneralDTO regGeneral = (TGeneralDTO)iterator.next();\n/* 448 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 449 */ op.setValue(\"\" + regGeneral.getCodigoS());\n/* 450 */ op.appendChild(this.pagHTML.createTextNode(regGeneral.getDescripcion()));\n/* 451 */ if (defecto != null && defecto.equals(regGeneral.getCodigoS())) {\n/* 452 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 453 */ escogida.setValue(\"on\");\n/* 454 */ op.setAttributeNode(escogida);\n/* */ } \n/* 456 */ combo.appendChild(op);\n/* */ } \n/* */ }", "public SelenideElement rolesDropdown() {\n return formPageRoot().$(\".dropdown-menu\");\n }", "private void initializeDropBoxes(String[] sql, int selector)\n {\n if(selector == 1000)\n {\n //Gathers results from sql code\n String branchCodesS[] = processComboBox(sql[0]);\n String productBrandS[] = processComboBox(sql[1]);\n String productTypeS[] = processComboBox(sql[2]);\n \n //Builds combo Box based on sql result\n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n //Controls which boxes are still active\n dropBox1.setEnabled(true);\n dropBox2.setEnabled(true);\n dropBox3.setEnabled(true);\n jButton1.setEnabled(true);\n }\n else\n {\n if(selector == 1001)\n {\n String branchCodesS[] = processComboBox(sql[0]);\n String productBrandS[] = processComboBox(sql[1]);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n \n dropBox3.setModel(model);\n dropBox1.setEnabled(true);\n dropBox2.setEnabled(true);\n dropBox3.setEnabled(false);\n }\n else\n {\n if(selector == 1010)\n {\n String branchCodesS[] = processComboBox(sql[0]);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = processComboBox(sql[2]);\n \n DefaultComboBoxModel model = \n new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n \n dropBox3.setModel(model);\n dropBox1.setEnabled(true);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(true);\n \n }\n else\n {\n if(selector == 1011)\n {\n String branchCodesS[] = processComboBox(sql[0]);\n String productBrandS[] = new String[1];\n productBrandS[0] = \n dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = \n dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n \n DefaultComboBoxModel model = \n new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(true);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n }\n else\n {\n if(selector == 1100)\n {\n String branchCodesS[] = new String[1];\n branchCodesS[0] = \n dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = processComboBox(sql[1]);\n String productTypeS[] = processComboBox(sql[2]);\n\n DefaultComboBoxModel model = \n new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(true);\n dropBox3.setEnabled(true);\n }\n else\n {\n if(selector == 1101)\n {\n String branchCodesS[] = new String[1];\n branchCodesS[0] = \n dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = \n processComboBox(sql[1]);\n String productTypeS[] = new String[1];\n productTypeS[0] = \n dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n \n DefaultComboBoxModel model = \n new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(true);\n dropBox3.setEnabled(false);\n }\n else\n {\n if(selector == 1110)\n {\n String branchCodesS[] = new String[1];\n branchCodesS[0] = \n dropBox1.getSelectedItem().toString();\n String productBrandS[] = new String[1];\n productBrandS[0] = \n dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = \n processComboBox(sql[2]);\n\n DefaultComboBoxModel model = \n new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(true);\n }\n else\n {\n if(selector == 2111)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = \n dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = \n dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = \n dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n \n //Additional preps for writing results to\n // text field - Lines lets me detect what\n // is there alread to prevent duplicates\n // - Sales Total String is what holds\n // the dollar amount returned from the sql\n String[] lines = displayField.getText().split(\"\\n\");\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = \n new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n //Formats and writes to text field\n DecimalFormat myFormatter = \n new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = \n myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n \n }\n }\n \n }\n else\n {\n if(selector == 2000)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n \n String[] lines = displayField.getText().split(\"\\n\");\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n DecimalFormat myFormatter = new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n }\n }\n }\n else\n {\n if(selector == 2001)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n \n String[] lines = displayField.getText().split(\"\\n\");\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n DecimalFormat myFormatter = \n new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n }\n }\n }\n else\n {\n if(selector == 2010)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n\n String[] lines = displayField.getText().split(\"\\n\");\n\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n DecimalFormat myFormatter = new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n }\n }\n }\n else\n {\n if(selector == 2011)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n\n String[] lines = displayField.getText().split(\"\\n\");\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n DecimalFormat myFormatter = \n new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n }\n }\n }\n else\n {\n if(selector == 2100)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n\n String[] lines = displayField.getText().split(\"\\n\");\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n DecimalFormat myFormatter = \n new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n }\n }\n }\n else\n {\n if(selector == 2101)\n {\n String output;\n String branchCodesS[] = new String[1];\n branchCodesS[0] = dropBox1.getSelectedItem().toString();\n dropBox1.setSelectedIndex(0);\n String productBrandS[] = new String[1];\n productBrandS[0] = dropBox2.getSelectedItem().toString();\n dropBox2.setSelectedIndex(0);\n String productTypeS[] = new String[1];\n productTypeS[0] = dropBox3.getSelectedItem().toString();\n dropBox3.setSelectedIndex(0);\n\n String[] lines = displayField.getText().split(\"\\n\");\n String[] salesTotalS = processComboBox(sql[0]);\n output = salesTotalS[1] + \"\";\n \n DefaultComboBoxModel model = new DefaultComboBoxModel(branchCodesS);\n dropBox1.setModel(model);\n model = new DefaultComboBoxModel(productBrandS);\n dropBox2.setModel(model);\n model = new DefaultComboBoxModel(productTypeS);\n dropBox3.setModel(model);\n \n dropBox1.setEnabled(false);\n dropBox2.setEnabled(false);\n dropBox3.setEnabled(false);\n jButton1.setEnabled(false);\n \n DecimalFormat myFormatter = \n new DecimalFormat(\"$###,###,###,##0.00\");\n String temp = myFormatter.format(parseDouble(output));\n if(lines[lines.length-1] !=null)\n {\n if(!lines[lines.length-1].contains(temp))\n {\n displayField.append(\"The total sales for \\n Branch: \" \n + dropBox1.getSelectedItem().toString() +\"\\n\"\n + \"Brand :\" + dropBox2.getSelectedItem().toString() \n + \"\\nProduct Type: \" + dropBox3.getSelectedItem().toString()\n + \"\\nis \" + temp + \"\\n\\n\");\n }\n }\n } \n }\n }\n } \n } \n }\n }\n }\n }\n }\n }\n }\n }\n }\n \n }", "public void clickNavigatorDropDown() {\r\n\t\ttry {\r\n\t\t\t(new WebDriverWait(driver, 120)).until(ExpectedConditions\r\n\t\t\t\t\t.elementToBeClickable(By\r\n\t\t\t\t\t\t\t.xpath(\"(//input[@name='Bala_Test']\")));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// Do nothing\r\n\t\t}\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(By\r\n\t\t\t\t.xpath(\"(//span/span[@class='k-select'])[1]\")));\r\n\t\tWebElement navigatorDropDown = driver.findElement(By\r\n\t\t\t\t.xpath(\"(//span/span[@class='k-select'])[1]\"));\r\n\t\tsleep(5000);\r\n\t\tnavigatorDropDown.click();\r\n\t\tReporter.log(\"Navigator Drop Down Clicked<br/>\");\r\n\t}", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "@When(\"^Sort By dropdown box appeared and selected option$\")\n\tpublic void sort_By_dropdown_box_appeared_and_selected_option() throws Throwable {\n\t\tSelect product = new Select(driver.findElement(By.xpath(\"//*[@id=\\\"selectProductSort\\\"]\")));\n\t\tproduct.selectByVisibleText(\"Product Name: A to Z\");\n\t}", "public static void dropDownByIndex(WebElement element, int index) {\r\n\t\ttry {\r\n\t\t\tSelect dropdown = new Select(element);\r\n\t\t\tdropdown.selectByIndex(index);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"WebElement not found : \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected JMenuBar createDropDownMenu()\r\n {\r\n\r\n // Setup menu Items String values that are shared\r\n setSharedMenuItemStrings();\r\n // Make a new Action Trigger, as it is generic and used in many places.\r\n ActionTrigger actionTrigger = new ActionTrigger();\r\n // Add\tall the Horizontal elements\r\n JMenuBar result = new JMenuBar();\r\n\r\n // to the button group - Set the Fraction Decimal Visible as being\r\n // selected below.\r\n com.hgutil.data.Fraction.setShowAsFraction(false);\r\n\r\n // Create two individual check button menu items, and add\r\n ButtonGroup fractionGroup = new ButtonGroup();\r\n HGMenuItem fractionCheck =\r\n new HGMenuItem(\r\n HGMenuListItem.JCHECKBOXMNUITEM,\r\n getString(\"WatchListTableModule.edit_menu.fractions_on_text\"),\r\n fractionCmd,\r\n null,\r\n KeyEvent.VK_F,\r\n InputEvent.CTRL_MASK,\r\n fractionGroup,\r\n false);\r\n HGMenuItem decimalCheck =\r\n new HGMenuItem(\r\n HGMenuListItem.JCHECKBOXMNUITEM,\r\n getString(\"WatchListTableModule.edit_menu.decimals_on_text\"),\r\n decimalCmd,\r\n null,\r\n KeyEvent.VK_D,\r\n InputEvent.CTRL_MASK,\r\n fractionGroup,\r\n true);\r\n JMenu viewColumnNumbers =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.view_columns_fields_as\"),\r\n 'C',\r\n new Object[] { fractionCheck, decimalCheck },\r\n actionTrigger);\r\n\r\n // Lets build a Menu List of Columns that we can either \r\n // view or not view\r\n // Build Check Boxes, for all Items, except the Symbol Column\r\n HGMenuItem[] columnsChecks = new HGMenuItem[StockData.columns.length];\r\n for (int k = 1; k < StockData.columns.length; k++)\r\n {\r\n columnsChecks[k] =\r\n new HGMenuItem(\r\n HGMenuListItem.JCHECKBOXMNUITEM,\r\n StockData.columns[k].getTitle(),\r\n null,\r\n null,\r\n 0,\r\n 0,\r\n null,\r\n true,\r\n new ColumnKeeper(StockData.columns[k]));\r\n }\r\n\r\n // Add in the Viewing menu\r\n JMenu viewColumns =\r\n HGMenuItem.makeMenu(getString(\"WatchListTableModule.edit_menu.view_columns_text\"), 'V', columnsChecks, null);\r\n\r\n JMenu insertRows =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.view_insert_row_text\"),\r\n 'I',\r\n new Object[] { insertBeforeCmd, insertAfterCmd },\r\n actionTrigger);\r\n\r\n JMenu editMenu = null;\r\n editMenu =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.title\"),\r\n 'E',\r\n new Object[] {\r\n viewColumns,\r\n viewColumnNumbers,\r\n null,\r\n insertRows,\r\n deleteRowCmd,\r\n null,\r\n addNewWatchListCmd,\r\n deleteWatchListCmd,\r\n renameListCmd,\r\n null,\r\n printListCmd,\r\n null,\r\n tableProps },\r\n actionTrigger);\r\n\r\n // Add the Edit Menu to the result set the Alignment and return the MenuBar\r\n result.add(editMenu);\r\n result.setAlignmentX(JMenuBar.LEFT_ALIGNMENT);\r\n return result;\r\n }", "public void generateMenu () \n {\n mCoffeeList = mbdb.getCoffeeMenu();\n for(int i =0;i<mCoffeeList.size();i++){\n coffeeTypeCombo.addItem(mCoffeeList.get(i).toString());\n }\n mWaffleList = mbdb.getWaffleMenu();\n for(int j =0;j<mWaffleList.size();j++){\n waffleTypeCombo.addItem(mWaffleList.get(j).toString());\n }\n }", "@Test\n public void test2_verify_state_dropdown() throws InterruptedException{\n // we need to locate the dropdown\n\n Select stateDropdown = new Select(driver.findElement(By.xpath(\"//select[@id='state']\")));\n //3. Select Illinois --> selecting by visible text\n Thread.sleep(1000);\n stateDropdown.selectByVisibleText(\"Illinois\");\n\n //4. Select Virginia --> selecting by value\n Thread.sleep(1000);\n stateDropdown.selectByValue(\"VA\");\n\n //5. Select California --> select by index\n Thread.sleep(1000);\n stateDropdown.selectByIndex(5);\n //6. Verify final selected option is California.\n String expectedResult = \"California\";\n String actualResult = stateDropdown.getFirstSelectedOption().getText();\n\n Assert.assertEquals(actualResult, expectedResult, \"Actual vs expected is not equal!\");\n //Use all Select options. (visible text, value, index)\n }", "public WebElement selectSavedCardDropDown() {\n\t\treturn findElement(repositoryParser, PAGE_NAME, \"dropDownOption\");\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\"C:\\\\Users\\\\Ash\\\\Selenium JARs and Bindings\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\n\t\tdriver.get(\"http://www.spicejet.com\");\n\n\t\t/*DEMO 1: STATIC DROP DOWNS\n\t\t * Exploring static drop down box \"Adult\"\n\t\t */\n\t\t\n\t\t/*\n\t\t * Static drop downs are basic drop downs. They do not have dual behavior as\n\t\t * search-edit box/ drop down boxes. Athough you can inspect the static drop\n\t\t * down, upon clicking open a static drop box, you cannot inspect the individual\n\t\t * items inside it.\n\t\t */\n\n\t\t/*\n\t\t * Getting a handle on the drop down. You cannot operate complex elements such\n\t\t * as drop downs with methods such as \"click\"/\"sendKeys\" meant for simpler\n\t\t * elements like input boxes and links. Instantiating the SELECT class with your\n\t\t * drop down elements as an argument to its constructor gives you access to\n\t\t * methods to manipulate your drop down box.\n\t\t */\n\t\tWebElement dropDown = driver.findElement(By.id(\"ctl00_mainContent_ddl_Adult\"));\n\n\t\t// Leveraging the SELECT class to access several methods that aid in drop down\n\t\t// operation\n\t\tSelect selectObj = new Select(dropDown);\n\t\tselectObj.selectByValue(\"3\");\n\t\tselectObj.selectByVisibleText(\"4\");\n\t\tselectObj.selectByIndex(4); // Selects \"5\" on the DD. Looks like index values begin with 0.\n\t\t// Print the selected value\n\t\tSystem.out.println(\"Selection based on index: \" + selectObj.getFirstSelectedOption().getText() + \".\");\n\n\t\t// Desired value to select:\n\t\tString valueToSelect = \"9\";\n\t\tint result = 0;\n\t\t// will be reset in the if condition in the while loop later\n\n\t\t/*\n\t\t * Voluntary exercise Trying to retrieve all options in the list, comparing the\n\t\t * desired value to select with the current value and then selecting the value\n\t\t * in the drop down\n\t\t */\n\t\tList<WebElement> options = selectObj.getOptions();\n\t\tIterator<WebElement> iterator = options.listIterator();\n\t\t// Begin looping..\n\t\tLOOP: // Label for this loop. Optionally used with break to make code readable. Very\n\t\t\t\t// handy with multiple loops.\n\t\twhile (iterator.hasNext()) {\n\t\t\tString currentValue = iterator.next().getText();\n\t\t\tSystem.out.println(\"Currently looping through value: \" + currentValue + \".\");\n\t\t\t/*\n\t\t\t * Combined one step process of the 2 lines of code above\n\t\t\t * selectObj.selectByValue(iterator.next().getText());\n\t\t\t */\n\n\t\t\tif (currentValue.equals(valueToSelect)) {\n\t\t\t\t/*\n\t\t\t\t * Comparison cannot be done using \"=\".Results in compilation error. Comparison\n\t\t\t\t * is done using \"==\". Works great for integersBut when it comes to String,\n\t\t\t\t * compares the STRING OBJECTS. So, when you debug the two string objects, even\n\t\t\t\t * though their values may match their \"id\" in java (do not confuse with\n\t\t\t\t * Selenium element locator id!) will differ and therefore the comparison\n\t\t\t\t * evaluates to FALSE, therefore never gets through the condition\n\t\t\t\t */\n\n\t\t\t\tselectObj.selectByValue(valueToSelect);\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Desired value was found in drop down and selected accordingly: \" + valueToSelect + \".\");\n\t\t\t\tresult = 1; // Change the flag to 1 (your indicator for success)\n\t\t\t\tbreak LOOP; // Break out of the loop. Don't have to look further. And this way result flag\n\t\t\t\t\t\t\t// contains the latest value\n\t\t\t\t// and you can use this to perform the check before printing the failure\n\t\t\t\t// message, after having completed looping\n\t\t\t} // \"else\" is not needed coz all you need is to let your result flag stay as-is\n\t\t\t\t// i.e, 0, when the if condition has not met\n\t\t} // end while loop\n\n\t\tif (result == 0) {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Desired value NOT found in the drop down. Sorry, cannot select: \" + valueToSelect + \".\");\n\t\t}\n\n\t\t/*DEMO 2: DYNAMIC DROP DOWNS\n\t\t * Playing with 2 dynamic drop downs: \"From\" and \"To\"\n\t\t */\n\n\t\t/*Dynamic drop down automation \n\t\t * The commented code looks perfectly fine but doesn't work on dynamic drop downs. The drop down itself gets inspected as an INPUT tag element. There is a\n\t\t * SLECT tag class above it that looks (very intuitively) as the more suitable code but using it in the scripts gives an \"element not visible error\". On\n\t\t * the other hand if you decide to stick to the inspected results (INPUT tag class), Selenium's SELCET class will certainly does not take a non-SELECT tag based\n\t\t * element for instantiation as it's constructor argument!See relevant word document that has step-by-step experimentation details.\n\t\t * WebElement dynDropDown =\n\t\t * driver.findElement(By.id(\"ctl00_mainContent_ddl_originStation1\"));\n\t\t * dynDropDown.click(); \n\t\t * Select selectObj2 = new Select(dynDropDown);\n\t\t * selectObj2.selectByValue(\"ATQ\");\n\t\t */\n\t\t\n\t\t/*Since you can't leverage Selenium's perfect looking SELECT class on dynamic drop downs, you decide to work with the inspected INPUT tag based element\n\t\t * Inspection identifies the dynamic drop down as:\n\t\t * \t\t<input id=\"ctl00_mainContent_ddl_originStation1_CTXT\" name=\"ctl00_mainContent_ddl_originStation1_CTXT\" selectedtext=\"\" selectedvalue=\"\" value=\"\" class=\"select_CTXT\" menuselection=\"false\" autocomplete=\"off\" style=\"width: 250px; height: 43px; border: 1px solid rgb(153, 153, 153);\">\n\t\t */\n\t\t\n\t\t//\"Arrival\" drop down on spicejet.com\n\t\tdriver.findElement(By.id(\"ctl00_mainContent_ddl_originStation1_CTXT\")).click(); \n\t\t\n\t\t/*Since cannot leverage SELENIUM's SELECT class to select the values, you have to locate the individual value by inspecting it and clicking on it\n\t\t * in the traditional way\n\t\t * Option elements under the drop down do not have individual ID's or classname.LinkText can change. Value attribute would be a better option.\n\t\t * Therefore, going for XPATH\n\t\t */\n\t\tdriver.findElement(By.xpath(\"//a[@value='GOP']\")).click(); //Note that \"value\" attribute based XPATH can cause conflicts for options under the \"destination\" drop down\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//since it's not bound by it's class or id for recognition. \n\t\t/*Similar logic applied to the \"destination\" drop down\n\t\t * Note that this drop down clicks on its own after the origin is selected\n\t\t * It does not populate until an origin is seleced\n\t\t * Also, the items populated depend on the origin (i.e, some options may not be available!)\n\t\t */\n\t\t\n\t\t/*Don't need to do this.\n\t\t*driver.findElement(By.id(\"ctl00_mainContent_ddl_destinationStation1_CTXT\")).click();\n\t\t*/\n\t\t\n\t\t/*You expect this to work but Selenium gives you an \"element not visible\" error:\n\t\t * driver.findElement(By.xpath(\"//a[@value='UDR']\")).click();\n\t\t * because Selenium is trying to click 'UDR' option under the origin drop down even though the currently open drop down is destination due to the\n\t\t * shared code <div id=\"dropdownGroup1\"> under Origin and Destination both\n\t\t * Needs some tweaking to get this to work on the destination drop down by wrapping the xpath and explicitly specifying it as the second instance\n\t\t */\n\t\t\n\t\tdriver.findElement(By.xpath(\"(//a[@value='UDR'])[2]\")).click();\n\t\t\n\t\t\n\t\t/*DEMO 4: CheckBoxes\n\t\t * Playing with the checkbox \"Indian Armed Forces\"\n\t\t */\n\t\tdriver.findElement(By.id(\"ctl00_mainContent_chk_IndArm\")).click(); //Check\n\t\t//driver.findElement(By.id(\"ctl00_mainContent_chk_IndArm\")).click(); //Uncheck\n\t\t\n\t\t/*What you truly want is to be able to verify the prevailing state of the checkbox (checked or unchecked)\n\t\t * and take action accordingly.\n\t\t *As one of its basic methods, Selenium's \"isSelected\" method can be leveraged to accomplish this \n\t\t */\n\t\tboolean checkBoxState = driver.findElement(By.id(\"ctl00_mainContent_chk_IndArm\")).isSelected();\n\t\tif (checkBoxState) {\n\t\t\tSystem.out.println(\"The check box state is:\" +checkBoxState +\". Nothing to do.\");\n\t\t}else {\n\t\t\tSystem.out.println(\"The check box state is: \"+checkBoxState+\". About to make the selection now...\");\n\t\t\tdriver.findElement(By.id(\"ctl00_mainContent_chk_IndArm\")).click();\n\t\t\tSystem.out.println(\"The new checkbox state is: \" +driver.findElement(By.id(\"ctl00_mainContent_chk_IndArm\")).isSelected()+\".\");\n\t\t}\n\t\t\n\t\t/*Note that the dynamic drop down that we explored earlier if left open (clicked open) without choosing any\n\t\t*value, it has potential to OVERALAP this and other checkboxes in the vicinity in which case Java will throw\n\t\t*a \"element not clickable at point(x,y). Other element will receive this click\" error. Make sure the element \n\t\t*is visible.\n\t\t*/\n\t\t\n\t\t//Next demo on Radio Buttons. Continued in Basics07_ExploringElements2.java class\n\t}", "private void loadDropDownInfo() {\n\t\tif(isConnected) {\n\t\t\ttry {\n\t\t\t\tlocationBuilder = connection.getLocationData();\n\n\t\t\t\tbuildingComboData = locationBuilder.getBLDGList();\n\t\t\t\tcampusComboData = locationBuilder.getCampusList();\n\t\t\t\troomComboData = locationBuilder.getRMList();\n\n\t\t\t\tbuildingCombo.setItems(buildingComboData);\n\t\t\t\tcampusCombo.setItems(campusComboData);\n\t\t\t\troomCombo.setItems(roomComboData);\n\n\t\t\t\tbuildingCombo.getSelectionModel().selectFirst();\n\t\t\t\tcampusCombo.getSelectionModel().selectFirst();\n\t\t\t\troomCombo.getSelectionModel().selectFirst();\n\t\t\t} // End try statement \n\t\t\tcatch (SQLException e) {\n\t\t\t\tsetNotificationAnimation(\"Connection Problem, Could Not Pull Information\", Color.RED);\n\t\t\t} // End catch statement \n\t\t} // End if statement\n\t\telse {\n\t\t\tsetNotificationAnimation(\"Not Connect\", Color.RED);\n\t\t} // End else statement \n\t}", "private static boolean dropdown(WebElement element, String sLog, WebElement ajax, int nMaxWaitTime,\n\t\t\tboolean bException, boolean bTabOff, DropDown dd)\n\t{\n\t\tif (dd.using == Selection.Skip)\n\t\t{\n\t\t\tLogs.log.info(\"Skipped entering '\" + sLog + \"'\");\n\t\t\treturn true;\n\t\t}\n\n\t\t// Need to get an exact option to be selected for comparison\n\t\tDropDown useDD;\n\t\tif (dd.using == Selection.Index && Conversion.parseInt(dd.option) < 0)\n\t\t{\n\t\t\tString sOption = Rand.randomIndexOption(element, dd);\n\t\t\tint nIndex = Conversion.parseInt(sOption);\n\t\t\tif (nIndex < 0 || nIndex < dd.minIndex)\n\t\t\t\tLogs.logError(\"The index (\" + sOption + \") is not valid for the drop down '\" + sLog + \"'\");\n\n\t\t\tuseDD = new DropDown(Selection.Index, sOption, dd.minIndex);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tuseDD = dd.copy();\n\t\t}\n\n\t\tDropDownDefaults initialState = DropDownDefaults.defaultsFromElement(element);\n\t\tif (initialState.equivalent(useDD, true))\n\t\t{\n\t\t\tLogs.log.info(\"The drop down '\" + sLog\n\t\t\t\t\t+ \"' was skipped because it already has the desired option (\" + initialState.toString()\n\t\t\t\t\t+ \")\");\n\t\t\treturn true;\n\t\t}\n\n\t\t// Use regular drop down selection method\n\t\tFramework.dropDownSelect(element, sLog, useDD);\n\n\t\tif (bTabOff)\n\t\t{\n\t\t\t// Get current selected option again\n\t\t\tint nAfterAction = Framework.getSelectedIndex(element);\n\n\t\t\t// Did selected option change?\n\t\t\tif (Conversion.parseInt(initialState.index) != nAfterAction)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Trigger AJAX by tabbing off element\n\t\t\t\t\telement.sendKeys(Keys.TAB);\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tLogs.logError(\"Tabbing off element ('\" + sLog + \"') generated the following exception: \"\n\t\t\t\t\t\t\t+ ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// No AJAX should be triggered\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Wait for AJAX to complete\n\t\tif (Framework.wasElementRefreshed(ajax, nMaxWaitTime))\n\t\t{\n\t\t\t// AJAX completed successfully before timeout\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// AJAX did not complete before timeout & user wants an exception thrown\n\t\t\tif (bException)\n\t\t\t{\n\t\t\t\tString sError = \"AJAX did not complete before timeout occurred.\";\n\t\t\t\tLogs.logError(new GenericActionNotCompleteException(sError));\n\t\t\t}\n\t\t}\n\n\t\t// AJAX did not complete before timeout (and user did not want an exception thrown)\n\t\tLogs.log.warn(\"AJAX did not complete before timeout occurred\");\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Raghuvicky\\\\Desktop\\\\Lib's\\\\chromedriver.exe\");\r\n\tWebDriver driver = new ChromeDriver();\r\n\tdriver.get(\"http://www.spicejet.com\");\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_originStation1_CTXT']\")).click();\r\n\tdriver.findElement(By.xpath(\"//a[@value='GOI']\")).click();\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Adult']\")).click();\r\n\tSelect dropdown=new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Adult']\")));\r\n\tdropdown.selectByIndex(3);\r\n\tdropdown.selectByValue(\"6\");\r\n\tdropdown.selectByVisibleText(\"9 Adults\");\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).click();\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).click();\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\t\r\n\tSelect dropdown1 = new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Child']\")));\r\n\tdropdown1.selectByValue(\"2\");\r\n\tdropdown1.selectByVisibleText(\"4 Children\");\r\n\t\r\n\t//selecting dropdown for currency\r\n\tSelect dropdown2=new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_DropDownListCurrency']\")));\r\n\tdropdown2.selectByValue(\"INR\");\r\n\t\r\n\t}", "public SelenideElement dropDownOption(String text) {\n return rolesDropdown().$$(\"a\").find(Condition.text(text));\n }", "public void selectDropdownHeaderOnTopupMenu(String strDropdownName) {\r\n\t\tBy locator = By.xpath(\"//div[@id='navbar-brand-centered']//li[@class='dropdown']//a[@data-toggle='dropdown']\");\r\n\t\tList<WebElement> list = driver.findElements(locator);\r\n\t\tfor (WebElement webElement : list) {\r\n\t\t\tString actualDropdownname = webElement.getText();\r\n\t\t\tif (actualDropdownname.equals(strDropdownName)) {\r\n\t\t\t\twebElement.click();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n spnDistrict.setAdapter(C.getArrayAdapter(\"select ZIlLAID||'-'||ZILLANAMEENG DistName from Zilla where DIVID='\" + Global.Left(spnDiv.getSelectedItem().toString(), 2) + \"'\"));// Global.Left(spnDiv.getSelectedItem().toString(),2)\n spnDistrict.setSelection(DivzillaSelect(\"zilla\"));\n\n\n }", "public void selectlistname(String selectlist){\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:- Link should be selected in the dropdown\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"dropdowncurrentlist\"));\r\n\t\t\tclick(locator_split(\"dropdowncurrentlist\"));\r\n\r\n\t\t\twaitforElementVisible(returnByValue(getValue(\"listselectname\")));\r\n\t\t\tclick(returnByValue(getValue(\"listselectname\")));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- list is slected\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Favorities is not clicked \"+elementProperties.getProperty(\"dropdowncurrentlist\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"dropdowncurrentlist\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\t\r\n\r\n\r\n\t}", "public TDropListItem getSwitcherFac();", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "void multiSelection(DynamicTable table, String element) {\n //String upElement = element.substring(0,1).toUpperCase() +\n // element.substring(1);\n //................MULTIPLE SELECTION--Add DROP-DOWN MENU ....................\n Select multiTypeSelect = new Select(\"pmultitype\");\n multiTypeSelect.addOption(new Option(\"Only 1 \"+element+\" required\",\"1\", false));\n multiTypeSelect.addOption(new Option(\"12 month \"+element+\"s\", \"2\", false));\n multiTypeSelect.addOption(new Option(\"4 seasonal \"+element+\"\", \"3\", false));\n multiTypeSelect.addOption(new Option(\"A \"+element+\" / month (yrs*12)\", \"4\", false));\n\n //................PLOT TYPE SELECTION input box....................\n table.addRow(ec.cr2ColRow(\n chFSize(\"Multi-\"+element+\" Selection: \",\"-1\"), multiTypeSelect));\n\n }", "public void validateContentsInDropDown() {\n\t\ttry {\n\t\t\tList<WebElement>dropDownList=driver.findElements(By.xpath(\"//app-nav-bar/div/div/ul[@class='dropdown-menu sp-dropdown']/li\"));\n\t\t\tfor(int i=0;i<dropDownList.size();i++) {\n\t\t\t\tLog.addMessage(\"Element \"+i+\" is:\"+driver.findElement(By.xpath(\"//app-nav-bar/div/div/ul[@class='dropdown-menu sp-dropdown']/li[\"+i+\"]/a\")).getText());\n\t\t\t}\n\t\t\tLog.addMessage(\"Contents in Drop Down list are validated\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Validation of Hamburger menu contents failed\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to validate Hamburger menu contents\");\n\t\t}\n\t}", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}", "public static void dropDownAction(WebDriver driver, String locatorType, String locatorValue, String testdata) throws Exception\r\n{\r\n\tif(locatorType.equalsIgnoreCase(\"xpath\"))\r\n\t{\r\n\t\tint value = Integer.parseInt(testdata);\r\n\t\tWebElement element = driver.findElement(By.xpath(locatorValue));\r\n\t\tSelect select = new Select(element);\r\n\t\tselect.selectByIndex(value);\r\n\t\t\r\n\t}\r\n\tif(locatorType.equalsIgnoreCase(\"id\"))\r\n\t{\r\n\t\tint value = Integer.parseInt(testdata);\r\n\t\tWebElement element = driver.findElement(By.xpath(locatorValue));\r\n\t\tSelect select = new Select(element);\r\n\t\tselect.selectByIndex(value);\r\n\t\t\r\n\t}\r\n}", "String getSelect();", "String getSelect();", "public Option[] SetSitesDropDownData(){\n List<SiteDTO> instDTOList = this.getinventory$GatheringSessionBean().SetSitesDropDownData();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(SiteDTO sDTO : instDTOList){\n option = new Option(sDTO.getSiteId(), sDTO.getDescription().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public void openPrimaryButtonDropdown() throws Exception {\n\t\tgetControl(\"primaryButtonDropdown\").click();\n\t\tVoodooUtils.pause(500);\n\t}", "public static void dropdown(WebElement element, String sLog, WebElement ajax, DropDown dd)\n\t{\n\t\tdropdown(element, sLog, ajax, Framework.getTimeoutInMilliseconds(), bException, false, dd);\n\t}", "public void dropDown1_processValueChange(ValueChangeEvent event) {\n \n }", "public Option[] SetBreedDropDownData(){\n List<BreedDTO> instDTOList = this.getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().getAllBreeds();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(BreedDTO instDTO : instDTOList){\n option = new Option(instDTO.getBreedId(), instDTO.getName().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }", "public void SelectDropdownByIndex(WebElement wb, int index) {\n\t\tSelect sel = new Select(wb);\n\t\tsel.selectByIndex(index);\n\t}", "public void selectDropDownUsingIndex(WebElement ele, int index) {\n\t\tSelect dropdown=new Select(ele);\r\n\t\tdropdown.selectByIndex(index);\r\n\t}", "public static void dropdownIndex(WebElement element, String value) {\n\t\ts = new Select(element);\n\t\tInteger index = Integer.valueOf(value);\n\t\ts.selectByIndex(index);\n\t}", "public void updateDropDownList(String newName) {\r\n selectDatasetList.clear();\r\n selectDatasetList.addItem(\"Select Dataset\");\r\n selectSubDatasetList.clear();\r\n\r\n selectSubDatasetList.addItem(\"Select Sub-Dataset\");\r\n selectSubDatasetList.setVisible(false);\r\n getDatasetsList(newName);//get available dataset names\r\n SelectionManager.Busy_Task(false, true);\r\n }", "public synchronized void clkSortByDropdown() {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(btnSortBy, \"Sort By\", 30);\n\t\t\tWebActionUtil.clickOnWebElement(btnSortBy, \"sort by\", \"Unable to click sort by drop down \");\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to click sort by\");\n\t\t\tAssert.fail(\"Unable to click sort by\");\n\t\t}\n\t}", "private void selectOptionByLinkText(int optionsListCode, String optionsLinkText) {\r\n\t\ttry {\r\n\t\t\tboolean OptionFound = false;\r\n\t\t\tList<WebElement> options = driver.findElements(By.cssSelector(\r\n\t\t\t\t\t\"#nav-flyout-shopAll > div.nav-subcats > div:nth-child(\" + optionsListCode + \") a>span.nav-text\"));\r\n\t\t\tfor (WebElement givenOption : options) {\r\n\t\t\t\tif (givenOption.getText().equals(optionsLinkText)) {\r\n\t\t\t\t\tseHoverOnElement(givenOption, optionsLinkText);\r\n\t\t\t\t\tseClickOnElement(givenOption, optionsLinkText);\r\n\t\t\t\t\tOptionFound = true;\r\n\t\t\t\t\tLog.info(\"Successfully selected option: \" + optionsLinkText);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (OptionFound == false) {\r\n\t\t\t\tLog.info(\"Unable of find given option: \" + optionsLinkText\r\n\t\t\t\t\t\t+ \". Please check the LinkText of given option\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.error(\r\n\t\t\t\t\t\"Exception occured while selecting the SubDepartment : \" + optionsLinkText + \" \" + e.getMessage());\r\n\t\t}\r\n\t}", "public void dropDownInventory(ComboBox combo) throws SQLException {\r\n dataAccess = new Connection_SQL(\"jdbc:mysql://localhost:3306/items\", \"root\", \"P@ssword123\");\r\n combo.setItems(dataAccess.menuInventory());\r\n }", "@Test\n public void test4_multiple_value_select_dropdown() throws InterruptedException{\n\n //3. Select all the options from multiple select dropdown.\n // Locate the dropdown\n\n Select multipleSelectDropdown = new Select(driver.findElement(By.xpath(\"//select[@name='Languages']\")));\n\n //Creating a list of web elements to store all of the options inside of this dropdown\n\n List<WebElement> allOptions = multipleSelectDropdown.getOptions();\n\n //Loop through the options to select all of them\n\n for(WebElement eachOption : allOptions){\n Thread.sleep(500);\n eachOption.click(); // this will click each option with every iteration\n\n //4. Print out all selected values.\n System.out.println(\"Selected: \" + eachOption.getText());\n\n //Asserting the option is actually selected or not\n Assert.assertTrue(eachOption.isSelected(), \"The option: \"+eachOption.getText()+\" is not selected!\");\n\n }\n //5. Deselect all values.\n multipleSelectDropdown.deselectAll();\n\n for(WebElement eachOption : allOptions){\n //Assert.assertTrue(!eachOption.isSelected()); //it will be false boolean value, with ! we make it \"true\"\n\n // assertFalse method looks for \"false\" boolean value to pass the test.\n Assert.assertFalse(eachOption.isSelected());\n }\n }", "private void add(){\r\n ArrayAdapter<String> adp3 = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\r\n adp3.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n txtAuto3.setThreshold(1);\r\n txtAuto3.setAdapter(adp3);\r\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //2. go to https://amazon.com\n driver.get(\"http:amazon.com\");\n // driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n\n //3. Verify the All departments is selected by default\n\n String expectedText=\"All Departments\";\n WebElement selected=driver.findElement(By.id(\"searchDropdownBox\"));\n String selectedText=selected.findElements(By.xpath(\"//option[@selected='selected']\")).get(0).getText();\n\n if (expectedText.equals(selectedText)){\n System.out.println(\"PASS\");\n }else{\n System.out.println(\"FAIL\");\n System.out.println(\"Expected: \"+expectedText);\n System.out.println(\"Actual: \"+selectedText);\n }\n\n\n //4. verify that all options are sorted alphabetically\n\n\n //allOptions.add(driver.findElement(By.xpath(\"//select/[*]\")));\n WebElement dropdown = driver.findElement(By.id(\"searchDropdownBox\"));\n List<WebElement> allOptions= dropdown.findElements(By.tagName(\"option\"));\n String [] links=new String [allOptions.size()];\n\n for (int i=1, a=0; i<=allOptions.size()&& a<allOptions.size(); i++, a++){\n\n\n links [a]=((driver.findElement(By.xpath(\"//select/*[\"+i+\"]\")).getText()));\n\n }\n\n for (int i=0; i<links.length;i++){\n for (int j=0; j<links[i].length(); j++) {\n if (links[i].charAt(j) == ' ') {\n links[i]= links[i].replace(\" \", \"\");\n }\n }\n }\n\n\n\n char z=' ';\n for (int i=0; i<links.length-1; i++) {\n if((!(links[i].toLowerCase().equals(\"women\") ||links[i].toLowerCase().equals(\"men\")||links[i].toLowerCase().equals(\"girls\") ||links[i].toLowerCase().equals(\"boys\")||links[i].toLowerCase().equals(\"baby\") )))\n {\n if (links[i].toLowerCase().charAt(0) <= links[i + 1].toLowerCase().charAt(0))\n {\n continue;\n }\n else\n {\n System.out.println(\"Dropdown menu is not sorted\");\n z ='n';\n break;\n }\n }\n else\n {\n continue;\n }\n }\n\n if (z!='n'){\n System.out.println(\"Dropdown menu is sorted\");\n }\n\n\n //5.Click on the menu icon on the left\n\n WebElement menu=driver.findElement(By.id(\"nav-hamburger-menu\"));\n menu.click();\n\n //6.click on Full Store directory\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n WebElement fullStore0=driver.findElement(By.partialLinkText(\"Full Store\"));\n fullStore0.click();\n\n\n\n\n\n\n }", "public void clickBulkActionsDropdown() {\n waitForVisibleElement(eleEngagementOverViewStatusText, \"Engagement overview status\");\n engagementOverViewStatusBefore = eleEngagementOverViewStatusText.getText().trim();\n\n waitForVisibleElement(eleEngagementOverViewToDoText, \"Engagement overview todo\");\n engagementOverViewToDoBefore = eleEngagementOverViewToDoText.getText().trim();\n\n clickElement(bulkActionsDropdownEle, \"Bulk Actions Dropdown List\");\n }", "public static void main(String[] args) throws Exception {\n\t\tSystem.setProperty(\"brower.type\", \"firefox\");\r\n\t\tWebDriver driver = DriverUtils.getDriver();\r\n\t\tdriver.get(\"http://localhost:5555/demo/survey/cybbbk/qdjcqk\");\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tSelect select= new Select(driver.findElement(By.name(\"vcZy\")));\r\n\t\tselect.selectByVisibleText(\"学生\");\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tselect.selectByIndex(4);//index是从0往下数的\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tselect.selectByValue(\"10\");\r\n\t\t//判断哪个被选中\r\n\t\tfor(int i=0; i<select.getOptions().size();i++) {\r\n\t\t\tif(select.getOptions().get(i).getAttribute(\"selected\")!=null){\r\n\t\t\t\tSystem.out.println(select.getOptions().get(i).getText());//打印显示的文本\r\n\t\t\t\tSystem.out.println(select.getOptions().get(i).getAttribute(\"value\"));//打印Value的值\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t\tselect.selectByIndex(0);;\r\n\t\t\r\n\t\tfor(int i=0; i<select.getOptions().size();i++) {\r\n\t\t\tThread.sleep(500);\r\n\t\t\tselect.selectByIndex(i);\r\n\t\t}\t\r\n\t\t\r\n\t\tdriver.findElement(By.partialLinkText(\"检查情况\")).click();\r\n\t\tSelect select1= new Select(driver.findElement(By.name(\"vcZy1\")));\r\n\t\tselect1.selectByVisibleText(\"学生\");\r\n\t\tselect1.selectByIndex(4);\r\n\t\tselect1.selectByValue(\"05\");\r\n\t\tSystem.out.println(select.getFirstSelectedOption().getText());\r\n\t\tselect1.deselectByIndex(4);//只能适用于多选下拉式列表框\r\n\t\t\r\n\t\tfor(int i=0; i<select1.getOptions().size();i++) {\r\n\t\t\tif(select1.getOptions().get(i).getAttribute(\"selected\")!=null){\r\n\t\t\t\tSystem.out.println(select1.getOptions().get(i).getText());//打印显示的文本\r\n\t\t\t\tSystem.out.println(select1.getOptions().get(i).getAttribute(\"value\"));//打印Value的值\r\n\t\t\t}\r\n\t\t}\r\n\t\tThread.sleep(1000);\r\n\t\tselect1.deselectAll();\r\n\t\t\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.quit();\r\n\t}", "public void genderDropDownTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.genderDropDownLocator, \"Gender drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.genderDropDownLocator, QuoteForm_ComponentObject.defaultGenderLocator, \r\n\t\t\t\t\tQuoteForm_ComponentObject.genderValidSelectionLocator,QuoteForm_ComponentObject.genderInvalidSelectionLocator, \"Select\", \"Male\");\r\n\t\t}\r\n\t}", "private void renderCombobox(){\r\n\r\n\t\tCollection<String> sitesName= new ArrayList<String>();\r\n\t\t\tfor(SiteDto site : siteDto){\r\n\t\t\t\tsitesName.add(site.getSiteName());\r\n\t\t\t}\r\n\t\t\r\n\t\tComboBox siteComboBox = new ComboBox(\"Select Site\",sitesName);\r\n\t\tsiteName = sitesName.iterator().next();\r\n\t\tsiteComboBox.setValue(siteName);\r\n\t\tsiteComboBox.setImmediate(true);\r\n\t\tsiteComboBox.addValueChangeListener(this);\r\n\t\tverticalLayout.addComponent(siteComboBox);\r\n\t}" ]
[ "0.6938634", "0.6819145", "0.64171827", "0.6399045", "0.6388262", "0.6338847", "0.63312733", "0.6327344", "0.63100046", "0.6308896", "0.6284004", "0.6274356", "0.6272924", "0.6263097", "0.62487125", "0.6244566", "0.62318087", "0.62161463", "0.6212172", "0.6193816", "0.61932683", "0.61841553", "0.6176308", "0.61758673", "0.61226517", "0.61192834", "0.6113195", "0.61095124", "0.6099442", "0.6077542", "0.6042846", "0.6025281", "0.60249436", "0.6018203", "0.5997816", "0.5982688", "0.59826297", "0.59763014", "0.5975954", "0.597088", "0.59707576", "0.59474003", "0.59299505", "0.58822256", "0.58786637", "0.587473", "0.5851404", "0.5848276", "0.58459336", "0.58261937", "0.5824008", "0.5808526", "0.5805834", "0.57899755", "0.5789692", "0.578802", "0.5784727", "0.5779499", "0.5774614", "0.576914", "0.57669234", "0.5759076", "0.5758296", "0.5756017", "0.5754985", "0.57435364", "0.5734898", "0.5733455", "0.57286", "0.5719806", "0.5710197", "0.57001644", "0.56762844", "0.5673079", "0.56676084", "0.5662237", "0.564791", "0.5647413", "0.56460625", "0.5640424", "0.5640424", "0.56401837", "0.5638701", "0.5637585", "0.56309724", "0.56304365", "0.56252843", "0.5612267", "0.56059164", "0.5605601", "0.56013", "0.5594001", "0.5590085", "0.55895734", "0.5586391", "0.55847794", "0.55788755", "0.55775857", "0.5559139", "0.55568993", "0.555106" ]
0.0
-1
/ Page title assert
public static void pageTitleVerify(String expected) { String actual = driver.getTitle(); Assert.assertEquals(actual, expected); Reporter.log("Page title is Verified"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \n\tpublic void homePageTitleTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\t\t\n\t\t//Fetch title \n\t\tString title = homePage.getTitle();\n\t\t\n\t\t//Assert title content \n\t\tAssert.assertTrue(title.equals(\"Lorem Ipsum - All the facts - Lipsum generator\"));\n\t}", "@Test\n\tpublic void titlevalidation() throws IOException\n\t{\n\t\t\n\t\tLandingpage l=new Landingpage(driver);\n\t\t//compare text from the browser with the actual text\n\t\t//here comes assertion\n\t\tAssert.assertEquals(l.title().getText(),\"FEATURED COURSES\");\n\t\tlog.info(\"Compared properly\");\n\t\t\n\t}", "@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }", "@Test(priority=0)\n\tpublic void titleVerification() {\n\t\tString expectedTitle = \"Facebook – log in or sign up\";\n\t\tString actualTitle = driver.getTitle();\n\t\tAssert.assertEquals(actualTitle, expectedTitle);\n\t}", "public void validateTitle()\r\n\t{\r\n\t\tString titleDisplayed = this.heading.getText();\r\n\t\tassertEquals(titleDisplayed, \"Dashboard\");\r\n\t\tSystem.out.println(\"Value is asserted\");\r\n\t\t\t}", "public void verifyPageTitle(String page) {\n\t\tWebElement title=driver.findElement(By.xpath(\"//a[contains(text(),'\"+page+\"')]\"));\n\t\tmoveToElement(title);\n\t\tAssert.assertTrue(isElementPresent(title),\"The [\"+page+\"] is not present]\");\n\t}", "public String validatePageTitle(){\n\treturn driver.getTitle();\t\n\t}", "private void checkTitle(final WebDriver driver) {\r\n\t\tfinal String title = driver.getTitle();\r\n\t\tAssert.assertEquals(\"Wrong page title\", PAGE_TITLE, title);\r\n\t}", "public void assertTitle(final String title);", "public boolean verifyTitle(String title) {\n\t\tif (getter().getTitle().equals(title)) {\r\n\t\t\tSystem.out.println(\"Page title: \"+title+\" matched successfully\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Page url: \"+title+\" not matched\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test(priority=3, dependsOnMethods= {\"validateUrl\"})\n\tpublic void validateTtitle() {\n\t\t\n\t\tString actualTtitle = driver.getTitle();\n\t\tString expectedTitle = \"Messenger\";\n\t\tAssert.assertEquals(actualTtitle, expectedTitle);\n\t\t\n\t\t\n\t\t\n\t\tReporter.log(\"Validating the messanger page title\");\n\t\t\n\t}", "@Test\n\tpublic void accountsPageTitleTest(){\n\t\tSystem.out.println(\"Test 1\");\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(\"Page Title is: \" + title);\n\t\tAssert.assertEquals(title, \"My Account\"); // Assert is a Class and AssertEquals is a Static method as it is referred by class name\n\t}", "@Test\n\n public void validateAppTitle() throws IOException {\n LandingPage l = new LandingPage(driver);\n //compare the text from the browser with actual text.- Error..\n Assert.assertEquals(l.getTitle().getText(), \"FEATURED COURSES\");\n\n System.out.println(\"Test running from Inside docker for tests dated 22-03-2020\");\n System.out.println(\"Test completed\");\n\n ;\n\n\n }", "@When(\"^User checks$\")\r\n\r\n\tpublic void user_cahecks_the_title() throws Throwable {\n\r\n\t\tSystem.out.println(\"Page Title \" + driver.getTitle());\r\n\r\n\t\tActualTitle =driver.getTitle();\r\n\r\n\t}", "@When(\"^title of the page is Guru$\")\n\tpublic void title_of_the_page_is_Guru() {\n\t\tString title= driver.getTitle();\n\t\t Assert.assertEquals(title, \"Guru99 Bank Home Page\");\n\t\t System.out.println(title);\n\t}", "@Test\r\n\t\tpublic void testShowsCorrectTitle() {\r\n\t\t\t\r\n\t\t\t// Simply check that the title contains the word \"Hoodpopper\"\r\n\t\t\t\r\n\t\t\tString title = driver.getTitle();\r\n\t\t\tassertTrue(title.contains(\"Hoodpopper\"));\r\n\t\t}", "@Test(priority = 2, dependsOnMethods = {\n\t\t\t\"navigatetosyndicationstatus\" }, description = \"To Verify Title and Title Text\")\n\tpublic void VerifyTitleTxt() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tdata.VerifyTitlenText();\n\t\taddEvidence(CurrentState.getDriver(), \"To Verify Title and Title Text\", \"yes\");\n\t}", "@Then(\"^get the title home page$\")\r\n public void test_amazon_login_page_title() {\r\n\r\n driver.manage().timeouts().pageLoadTimeout(4, TimeUnit.SECONDS);\r\n driver.manage().timeouts().implicitlyWait(4, TimeUnit.SECONDS);\r\n\r\n String title = driver.getTitle();\r\n Assert.assertEquals(\"Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more\", title);\r\n }", "@SmallTest\n\tpublic void testTitle() {\n\t\tassertEquals(getActivity().getTitle(), solo.getString(R.string.title_activity_memory_game));\n\t}", "public static void verifyPageTitle(WebDriver driver,String expectedTitle)\n\t{\n\t\tWebDriverWait wait = new WebDriverWait(driver,20);\n\t\twait.until(ExpectedConditions.titleContains(expectedTitle));\n\t\tString actualTitle = driver.getTitle();\n\t\tif(actualTitle.equals(expectedTitle))\n\t\t{\n\t\t\tSystem.out.println(\"The Expected Page is Dispalyed--->\"+expectedTitle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"The Expected Page is not Dispalyed--->\"+actualTitle);\n\t\t}\n\t}", "public void verifyPage() {\n\t\twaitForPageToLoad();\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\t\tAssert.assertEquals(title,\"News: India News, Latest Bollywood News, Sports News, Business & Political News, National & International News | Times of India\");\n\t}", "public boolean checkPageTitle(String title) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME).until(ExpectedConditions.titleIs(title));\n }", "@Then(\"^I should see \\\"([^\\\"]*)\\\" page$\")\n public void i_should_see_page(String arg1) throws Throwable {\n settings.verifyPageTitle(arg1);\n\n\n }", "protected void VerifyExpectedPageIsShown(String expectedTitle) {\n\t\tString actualTitle = getPageTitle();\n\t\t\n\t\tif (!expectedTitle.equals(actualTitle))\n\t\t\tReports.logAMessage(LogStatus.FAIL, \"The actual page title '\" + actualTitle + \"' is not equal to the expected page title '\" + expectedTitle + \"'\");\n\t\t\n\t\tassertEquals(expectedTitle, actualTitle);\n\t}", "public void verifyDashboardTitle() {\n app.azzert().titleEquals(\"PECOS\");\n }", "public boolean verifyPageTitle(String pageTitle) {\n commonMethods.switchToFrame(driver, \"frameMain\");\n String headerName = $(header).text();\n switchTo().defaultContent();\n return (headerName.contains(pageTitle));\n }", "public void validateTitle( WebDriver driver,String title) {\n\t\t\ttry {\n\t\t\tAssert.assertEquals(driver.getTitle(), title);\n\t\t\tlogger.log(LogStatus.INFO, \"Document title is validated\"+driver.getTitle());\n\t\t\t}\n\t\t\tcatch(AssertionError e)\n\t\t\t{\n\t\t\t\tlog.logReport(\"Document title is not matched with Expected \"+title);\n\t\t\t\tlogger.log(LogStatus.INFO, \"Document title is not matched with Expected \"+title );\n\t\t\t}\n\t\t}", "@Test(priority = 2)\n //@Parameters({\"browser\"})\n public void testPageTitleA2() throws Exception{\n driver.get(\"http://www.snapdeal.com\");\n //Thread.sleep(5000);\n String strPageTitle = driver.getTitle();\n System.out.println(\"SnapDeal : \"+strPageTitle);\n try{\n Assert.assertTrue(strPageTitle.contains(\"Amazon\"), \"SnapDeal : Page title doesn't match : \"+strPageTitle);\n }catch (Exception e){\n System.out.println(e);\n }\n //Thread.sleep(5000);\n // driver.quit();\n }", "public void testGetTitle() {\n System.out.println(\"getTitle\");\n Wizard instance = new Wizard();\n String expResult = \"\";\n String result = instance.getTitle();\n assertEquals(expResult, result);\n }", "@Test(priority = 1,enabled = true)\n //@Parameters({\"browser\"})\n public void testPageTitleA1() throws Exception{\n driver.navigate().to(\"http://www.youtube.com\");\n //Thread.sleep(5000);\n String strPageTitle = driver.getTitle();\n System.out.println(\"Youtube : \"+strPageTitle);\n Assert.assertTrue(strPageTitle.contains(\"Flipkart\"), \"Youtube : Page title doesn't match : \"+strPageTitle);\n //Thread.sleep(5000);\n // driver.quit();\n }", "public String validateLoginPageTitile(){\n return driver.getTitle();//qani vor gettitley stringa get berum menq\n }", "@Test(dependsOnMethods = \"testAddTitleRequiredFields\")\n\tpublic void testAddTitle() {\n\t\t\n\t\t//Instantiate titles page object.\n\t\tTitlesPage titlesPageObject = new TitlesPage(driver);\n\t\t\n\t\t//Set the local title name variable to value created in titles page object.\n\t\ttitle = titlesPageObject.getTitleName();\n\t\t\n\t\t//Enter in the name value into the 'Name' field.\n\t\tReporter.log(\"Enter in a name value into the 'Name' field.<br>\");\n\t\ttitlesPageObject.enterTitleName();\n\t\t\n\t\t//Click the 'Create Title' button.\n\t\tReporter.log(\"Click the 'Create Title' button.<br>\");\n\t\ttitlesPageObject.clickCreateTitleButton();\n\t\t\n\t\t//Verify the success message is displayed to indicate a successful title creation.\n\t\tReporter.log(\"Verify an success message is displayed to indicate a successful title creation.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageSuccessMessage(), \"Unable to verify the title was successfully created; please investigate.\");\n\t\t\n\t\t//Verify the newly created title exists in the list of titles.\n\t\tReporter.log(\"Verify the newly created title value of [ \"+ title +\" ] is displayed in the list of titles on the page.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitleInList(title, true), \"Unable to verify the newly created title was found in the list of titles; please investigate.\");\n\t\t\n\t}", "@Test\n public void panelTitleTest() {\n Player.GetItem item = getPlayerHandler().getMediaItem();\n onView(withId(R.id.title)).check(matches(withText(item.getTitle())));\n }", "protected boolean titlePageNeeded(){\n return true;\n }", "public boolean checkPageTitleContains(String title) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.titleContains(title));\n }", "public boolean verifyTitle(String expTitle)\n\t{\n\t\tif(expTitle.equals(driver.getTitle().trim()))// if 1.1 started here\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void verifyTitleField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Title Field validations and its appropriate error message\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.ValidateAddnewUserTitleField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}", "public String validateAddVehiclePageTitleTitle(){\n\t\treturn driver.getTitle();\n\t}", "boolean hasTitle();", "@Feature(value = \"Site testing\")\n @Stories(value = {@Story(value = \"Main page functionality\"),\n @Story(value = \"Service page functionality\")})\n @Test(priority = 1)\n public void mainPageTitleBeforeLoginTest() {\n checkMainPageTitle(mainPage);\n }", "public String validateLoginPageTitle() {\n\t\treturn driver.getTitle();\n\t\t\n\t}", "public void title(WebDriver driver) {\r\n double start = System.currentTimeMillis();\r\n driver.getTitle();\r\n double res = (System.currentTimeMillis() - start) / 1000;\r\n String result = String.valueOf(res);\r\n if (!driver.getTitle().equals(\"\")) {\r\n log = \"+\";\r\n PASSED_TEST++;\r\n } else {\r\n log = \"!\";\r\n FAILED_TEST++;\r\n }\r\n resultTitle = log + \" [checkPageTitle \\\"\" + driver.getTitle() + \"\\\"]\" + \" \" + result + \"\\n\";\r\n resTime += res;\r\n countTESTS++;\r\n }", "@Test(priority=1)\r\n\tpublic void getTitle() {\r\n\t\tString title=driver.getTitle();\r\n\t\tSystem.out.println(( title).toUpperCase());\r\n\t}", "public void verifySessionIntroTitle(){\r\n String actualIntroHeading = driver.findElement(By.className(introHeadingClassLocator)).getText().trim();\r\n Assert.assertTrue(actualIntroHeading.contains(expectedIntroHeading),\"Intro Title is present.\");\r\n }", "public boolean titlePresent(String title){\n\t\t\t boolean pageRedirected = false;\n\t pageRedirected = driver.getTitle().equals(title);\n\t Reporter.log(\"==========title Presnt for ProductPage======\", true);\n\t \n\t return pageRedirected;\n\t }", "public String validateLoginPageTitle() {\n\t\treturn driver.getTitle();\n\t}", "public static void verify_browser_title(String expectedTitle) throws CheetahException {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(CheetahEngine.getDriverInstance(), 2);\n\t\t\twait.until(ExpectedConditions.titleContains(expectedTitle));\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new CheetahException(e);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "@Test \n\tpublic void homePageHeaderTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// Validate page header \n\t\tString header = homePage.getHeader();\n\t\tAssert.assertTrue(header.equals(\"\"));\n\n\t\t// Fetch latin quote: \n\t\tString latinQuote = homePage.getQuote(\"latin\");\n\t\tAssert.assertEquals(\"\\\"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\\\"\", latinQuote);\n\n\t\t// Fetch english quote, which is: \n\t\tString englishQuote = homePage.getQuote(\"english\"); \n\t\tAssert.assertEquals(\"\\\"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain...\\\"\",englishQuote); \n\t}", "@Test\t\r\n\r\npublic void forgot(){\n\t\r\n driver.findElement(By.partialLinkText(\"Forgot\")).click();\r\n System.out.println(\"the forgotpage title is \"+\" \"+driver.getTitle());\r\n String expectedTitle = \"Forgot Password | Can't Log In | Facebook\";\r\n String actualTitle = driver.getTitle();\r\n softassert.assertEquals(actualTitle, expectedTitle);\r\n softassert.assertAll();\r\n \r\n}", "public void waitForPageTitle(String pageTitle) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\twait.until(ExpectedConditions.titleContains(pageTitle.split(\",\")[0]));\n\t\t} catch (Exception ex) {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\twait.until(ExpectedConditions.titleContains(pageTitle.split(\",\")[1]));\n\t\t}\n\t}", "public boolean isValidTitle(Title title);", "public void testGetSetTitle() {\n exp = new Experiment(\"10\");\n exp.setTitle(\"test\");\n assertEquals(\"test/set title does not work\", \"test\", exp.getTitle());\n }", "@Test\n public void titleTest() {\n // TODO: test title\n }", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "@Then(\"^titel of page is \\\"([^\\\"]*)\\\"$\")\r\n public void titel_of_page_is(String arg1) throws Throwable {\n throw new PendingException();\r\n }", "@Test\n @Then(\"Headphones page is opened\")\n public void s08_HPUrlCheck() {\n String currentHPTitle = driver.getTitle();\n if (currentHPTitle.contains(\"Наушники\")) {\n System.out.println(\"Step08 PASSED\");\n }\n else\n {\n System.out.println(\"Step08 FAILED\");\n }\n System.out.println(\"Step08 PASSED\");\n }", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "protected abstract void setTitle();", "@Test\n public void dashboardPageTest(){\n test = report.createTest(\"Dashboard Page Title Test\");\n test.info(\"logging in to application\");\n loginPage.login(\"driver_username\", \"driver_password\");\n wait.until(ExpectedConditions.textToBePresentInElement(dashboardPage.pageHeader,\"Quick Launchpad\"));\n String actual = dashboardPage.pageHeader.getText();\n test.info(\"verifying page title\");\n assertEquals(actual, \"Quick Launchpad\");\n test.pass(\"PASS: Dashboard Page Title Test\");\n }", "public String verifyTitle(String object, String data) {\n\t\tlogger.debug(\"Verifying title\");\n\t\ttry {\n\t\t\tString actualTitle = driver.getTitle();\n\t\t\tString expectedTitle = data.trim();\n\t\t\tif (actualTitle.equals(expectedTitle))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Title not verified \" + expectedTitle + \" -- \" + actualTitle;\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Error in retrieving title\";\n\t\t}\n\t}", "@When(\"I am on Home page\")\n public void homepage_i_am_on_home_page() {\n homePage = new HomePage(driver);\n homePage.check_page_title();\n }", "@Test\n\tpublic void testGetPageName() {\n\t\tString pageName = rmitAnalyticsModel.getPageName();\n\t\tAssert.assertNotNull(pageName);\n\t\tAssert.assertEquals(\"rmit:content:rmit.html\", pageName);\n\t}", "public String getPageTitle()\n {\n return page == null ? StringUtils.EMPTY : page.getElementInfo().getTitle();\n }", "@Test(dependsOnMethods = \"testUpdateTitleRequiredFields\")\n\tpublic void testUpdateTitle() {\n\t\t\n\t\t//Instantiate titles page object.\n\t\tTitlesPage titlesPageObject = new TitlesPage(driver);\n\t\t\n\t\t//Set the local updated title name variable to value created in titles page object.\n\t\tupdatedTitle = titlesPageObject.getTitleName();\n\t\t\n\t\t//Enter in the name value into the 'Name' field.\n\t\tReporter.log(\"Enter in a name value into the 'Name' field.<br>\");\n\t\ttitlesPageObject.clearTitleNameField();\n\t\ttitlesPageObject.enterTitleName();\n\t\t\n\t\t//Click the 'Update Title' button.\n\t\tReporter.log(\"Click the 'Update Title' button.<br>\");\n\t\ttitlesPageObject.clickUpdateTitleButton();\n\t\t\n\t\t//Verify the success message is displayed to indicate an successful title update.\n\t\tReporter.log(\"Verify an success message is displayed to indicate a successful title update.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageSuccessMessage(), \"Unable to verify the title was successfully updated; please investigate.\");\n\t\t\n\t\t//Verify the newly created title exists in the list of titles.\n\t\tReporter.log(\"Verify the newly updated title value of [ \"+ updatedTitle +\" ] is displayed in the list of titles on the page.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitleInList(updatedTitle, true), \"Unable to verify the newly updated title was found in the list of titles; please investigate.\");\n\t\t\n\t}", "public void validateTitle(String title){\n boolean isValid = title != null && !title.isEmpty();\n setTitleValid(isValid);\n }", "@Then(\"User can view the dashboard\")\npublic void user_can_view_the_dashboard() {\n addCust = new AddcustomerPage(driver);\n Assert.assertEquals(\"Dashboard / nopCommerce administration\", addCust.getPageTitle());\n \n}", "@Test\n\tpublic void testAddTitleRequiredFields() {\n\t\t\n\t\t//Instantiate login page object.\n\t\tLoginPage loginPageObject = new LoginPage(driver);\n\t\t\n\t\t//Navigate to BlueSource.\n\t\tReporter.log(\"Navigate to the BlueSource website.<br>\");\n\t\tloginPageObject.navigatetoBlueSource();\n\t\tAssert.assertTrue(loginPageObject.verifySuccessfulNavigation(), \"Unable to successfully verify navigation to BlueSource; please investigate.\");\n\t\t\n\t\t//Login to the BlueSource website.\n\t\tReporter.log(\"Verify a successful login to BlueSource.<br>\");\n\t\tloginPageObject.login(Users.COMPANYADMIN.getUsername());\n\t\tAssert.assertTrue(loginPageObject.verifySuccessfulLogin(), \"Unable to successfully verify a successful sign-in to the BlueSource website; please investigate.\");\n\t\t\n\t\t//Instantiate titles page object.\n\t\tTitlesPage titlesPageObject = new TitlesPage(driver);\n\t\t\n\t\t//Navigate to the 'Titles' page.\n\t\tReporter.log(\"Navigate to the 'Titles' page.<br>\");\n\t\ttitlesPageObject.clickTitlesLink();\n\t\t\n\t\t//Verify a successful navigation to the 'Titles' page.\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageDisplayed(), \"Unable to successfully verify the 'Titles' page is displayed; please investigate.\");\n\t\t\n\t\t//Click the 'New Title' button.\n\t\tReporter.log(\"Click the 'New Title' link.<br>\");\n\t\ttitlesPageObject.clickNewTitleLink();\n\t\t\n\t\t//Click the 'Create Title' button.\n\t\tReporter.log(\"Click the 'Create Title' button.<br>\");\n\t\ttitlesPageObject.clickCreateTitleButton();\n\t\t\n\t\t//Verify the error message is displayed to indicate an unsuccessful title creation.\n\t\tReporter.log(\"Verify an error message is displayed to indicate an unsuccessful title creation due to missing required fields.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageError(), \"Unable to verify the title was not allowed to be successfully created without a name value; please investigate.\");\n\t\n\t}", "public void assertWindowTitle(String seriesName) {\r\n\r\n\t\tString windowText = driver.getTitle();\r\n\t\t// Assert.assertEquals(\"Text not found!\", windowText.contains(seriesName));\r\n\t\tAssert.assertEquals(true, windowText.contains(seriesName));\r\n\t}", "public void assertTitleEquals(String expectedTitle) {\n\t\tString actual = solo.getCurrentActivity().getTitle().toString();\n\t\tassertTrue(\"Title \\\"\" + actual + \"\\\" doesn't match expected \\\"\"\n\t\t\t\t+ expectedTitle + \"\\\"\", expectedTitle.equals(actual));\n\t}", "public void setTitle(java.lang.String title);", "public static void VerifyTitleText_ContentTitle(String xPath, String headerTag){\n\t\tString actualTitleTextContentTitle = null;\n\t\tfor(int i=1; i<=3; i++){\n\t\ttry{\n\t\t\tactualTitleTextContentTitle=Driver.findElement(By.xpath(xPath + i + \"]/\" + headerTag + \"[1]\")).getText();\n\t\t\tAssert.assertEquals(actualTitleTextContentTitle, dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.info(\"The Actual AboutUs Title Text is - \"+actualTitleTextContentTitle);\n\t\t\tlog.info(\"The Expected AboutUs Title Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs Title Text are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs Title Text is - \"+actualTitleTextContentTitle);\n\t\t\tlog.error(\"The Expected AboutUs Title Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs TitleText ContentTitle are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Override article ContentTitle element On TitleText Container\");\n\t\t}\t\t\n\t }\n\t}", "@Given(\"Goto settings page and verify title\")\n\tpublic void goto_settings_page_and_verify_title() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(\"//div[@id='sidebar-wrapper']/div/a[4]/span[2]\")).click();\n\t\tThread.sleep(2000);\n\t\tString SettingsTitle = driver.getTitle();\n\t\tSystem.out.println(\"THe page title is: \" +SettingsTitle);\n\t\tThread.sleep(2000);\n\t}", "@Test\r\n\tpublic void testGetTitleMU() {\r\n\t\tassertEquals(\"MeetingUnit\", meetingu1.getTitle());\r\n\t}", "public void setTitle(String title) { this.title = title; }", "public static boolean verifyTitleOfWebPage(WebDriver driver, String expected) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (driver != null) {\n\t\t\t\tString actualtitle = driver.getTitle();\n\t\t\t\tif (actualtitle.equalsIgnoreCase(expected))\n\n\t\t\t\t\treturn true;\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Expected is \" + expected + \" but found \" + actualtitle);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Driver is not initilased.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured. \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean verifyPageTitle(By by) {\n commonMethods.switchToFrame(driver, \"frameMain\");\n Boolean isDisplayed = $(by).isDisplayed();\n switchTo().defaultContent();\n return isDisplayed;\n }", "protected GuiTestObject title() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"title\"));\n\t}", "public static void printTitle( String title )\r\n {\n }", "public void testSetTitle() {\n System.out.println(\"setTitle\");\n String s = \"\";\n Wizard instance = new Wizard();\n instance.setTitle(s);\n }", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "void setTitle(java.lang.String title);", "@TestCaseId( id = 1 )\n\t@Steps ( steps = {\n\t\t\t@Step( number = 1, description = \"WHEN user navigates to main page\",\n\t\t\t\t expectedResults = {\n\t\t\t\t\t\t\"THEN url matches the current locale and environment\",\n\t\t\t\t\t\t\"AND the site title, matches the locale defined title\",\n\t\t\t\t })\n\t})\n\t@Test ( description = \"Testing the Locale Common Header Branding initial state and functionality\",\n\t\t\tenabled = true,\n\t\t\tgroups = { \"US\", \"UK\", \"AU\" }\n\t)\n\tpublic void homePage_InitialState_Title_And_Url( ITestContext testContext ) throws Exception\n\t{\n\t\t//logger.info( \"Starting executing method < '{}' > for < '{}' >\", testContext.getName(), testContext.getIncludedGroups() );\n\n\t\tPreConditions.checkNotNull( this.homePage, \"Home page is null, before starting test\" );\n\n\t\t/* THEN url matches the current locale and environment */\n\n\t\tfinal String REASON1 = \"Asserting home page url based locale and environment\";\n\t\tfinal Matcher<String> EXPECTED_URL = JMatchers.is( SiteSessionManager.get().getBaseUrl().toExternalForm() );\n\t\tfinal String ACTUAL_URL = homePage.getCurrentUrl();\n\t\tSiteSessionManager.get().createCheckPoint( \"VALIDATE_URL\" ).assertThat( REASON1, ACTUAL_URL, EXPECTED_URL );\n\n\t\t/* AND the site title, matches the locale */\n\n\t\tfinal String REASON2 = \"Asserting home page title match the locale defined title\";\n\t\t//final Matcher<String> EXPECTED_TITLE = JMatchers.is( ( String ) SiteProperty.HOME_PAGE_TITLE.fromContext() );\n\t\t//final String ACTUAL_TITLE = homePage.getTitle();\n\t\t//SiteSessionManager.get().createCheckPoint( \"VALIDATE_TITLE\" ).assertThat( REASON2, ACTUAL_TITLE, EXPECTED_TITLE );\n\n\t\tSiteSessionManager.get().assertAllCheckpoints();\n\n\t}" ]
[ "0.85012156", "0.8310284", "0.81920433", "0.8122344", "0.8104787", "0.8056806", "0.7957889", "0.79486275", "0.78725594", "0.7799794", "0.7766285", "0.77540046", "0.765251", "0.7609786", "0.76053447", "0.757149", "0.7569918", "0.7458053", "0.7427964", "0.7405227", "0.7383089", "0.7368564", "0.73514926", "0.73102957", "0.73035884", "0.7275987", "0.72600317", "0.7219824", "0.71606344", "0.71428967", "0.71313107", "0.71276665", "0.7126635", "0.71116567", "0.7096685", "0.7089414", "0.7074529", "0.70517826", "0.7048274", "0.70230633", "0.70195234", "0.7013754", "0.6995948", "0.69721717", "0.6971753", "0.6958757", "0.69316745", "0.69265735", "0.6913203", "0.688491", "0.68564296", "0.68511754", "0.6834588", "0.6818318", "0.6818318", "0.6818318", "0.6818318", "0.6818318", "0.67394316", "0.6726936", "0.671387", "0.6707391", "0.67000514", "0.6696857", "0.6664194", "0.66609466", "0.66436", "0.6640167", "0.6633528", "0.66288966", "0.66277957", "0.6616268", "0.6607797", "0.6598372", "0.65934116", "0.6591693", "0.6580887", "0.6579271", "0.6571016", "0.65686566", "0.65516174", "0.65488136", "0.6547757", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.6539178", "0.653705", "0.6534274" ]
0.79199517
8
/method performing Page zoom out
public static void zoomOutPage(int percent) { JavascriptExecutor js = (JavascriptExecutor) base.driver; js.executeScript("document.body.style.zoom='" + percent + "%'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void zoomOut() { zoomOut(1); }", "public void zoomOut() {\n \t\tzoom(-1);\n \t}", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }", "public void zoomScaleOut() {\n \t\tzoomScale(SCALE_DELTA_OUT);\n \t}", "public void zoomOut() {\n zoomToLength(currentViewableRange.getLength() * 2);\n }", "public void zoomOut() {\r\n \t\tgraph.setScale(graph.getScale() / 1.25);\r\n \t}", "private void actionZoomOut ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\t//---- Calculate zoom scale factor\r\n\t\t\tdouble zoom = mainFormLink.getComponentPanelCenter().getComponentPanelImageView().transformZoom(-FormMainMouse.DEFAULT_ZOOM_DELTA); \r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\r\n\r\n\t\t\t//---- Set the current zoom, display the zoom scale factor in the GUI\r\n\t\t\tFormMainMouse.imageViewZoomScale = zoom;\r\n\t\t\tmainFormLink.getComponentPanelDown().getComponentLabelZoom().setText(String.valueOf(zoom));\r\n\t\t}\r\n\t}", "public static void zoomOut(){\n for(int i=0; i<6; i++){\n driver.findElement(By.tagName(\"html\")).sendKeys(Keys.chord(Keys.CONTROL, Keys.SUBTRACT));\n }\n }", "public final void zoomOut(final int zoomStep) {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no zoom\r\n\r\n if (image == null) {\r\n return;\r\n }\r\n\r\n int zoomTmp = this.zoom;\r\n\r\n //\r\n // if zoom is best fit\r\n // calculate the zoom based on container size\r\n\r\n if (zoomTmp == ZOOM_BEST_FIT) {\r\n zoomTmp = ImageUtils.calculateSizeToFit(image, imageCanvas.getSize()).width * ZOOM_REAL_SIZE / image.getWidth();\r\n }\r\n\r\n //\r\n // calculate new zoom based on the step parameter\r\n\r\n int newZoom = (int) Math.floor(((double) zoomTmp) / ((double) zoomStep)) * zoomStep;\r\n\r\n// if (newZoom == zoomTmp) {\r\n newZoom = newZoom - zoomStep;\r\n// }\r\n\r\n System.out.println(newZoom);\r\n \r\n setZoom(newZoom);\r\n }", "private void checkForZoomOut(){\n if(checkOut == 1){\n zoomLevel--;\n adjustZoomFactor();\n checkOut = 0;\n checkIn = 1;\n } else{\n checkOut = 1;\n checkIn = 0;\n }\n }", "public void onZoomOut(View view) {\n if (!checkReady()) {\n return;\n }\n\n changeCamera(CameraUpdateFactory.zoomOut());\n }", "public void zoomIn() { zoomIn(1); }", "public void handleEndZoom(ActionEvent event){\n zoomPane.setVisible(false);\n }", "public void unzoom() {\n\t\tdisp.unzoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public void zoomIn() {\n if (zoom > 0) {\n zoom--;\n spielPanel.setZoom(zoom);\n }\n }", "protected abstract void handleZoom();", "public void zoomIn() {\n \t\tzoom(1);\n \t}", "public boolean zoomOut() {\n if (this.zoomLevel > 0) {\n this.setZoomLevel(this.zoomLevel - 1);\n this.rescale();\n }\n\n return this.zoomLevel > 0;\n }", "protected void zoomToPast(){\n //zoom out\n int maxTimeSpread = widgg.timeorg.lastShortTimeDateInCurve - widgg.timeorg.firstShortTimeDateInCurve;\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread < 0x3fffffff) { widgg.timeorg.timeSpread *=2; }\n else { widgg.timeorg.timeSpread = 0x7fffffff; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n \n }", "@Test\n public void zoomInAndOut() throws Exception {\n assertEquals(calendarPanel.getCalendarView().getMonthPage(), calendarPanel.getPageBase());\n\n //zoom in to Week Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getWeekPage(), calendarPanel.getPageBase());\n\n //zoom in to Day Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getDayPage(), calendarPanel.getPageBase());\n\n //can't zoom in anymore, stays at Day Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getDayPage(), calendarPanel.getPageBase());\n\n //zoom out to Week Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getWeekPage(), calendarPanel.getPageBase());\n\n //zoom out to Month Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getMonthPage(), calendarPanel.getPageBase());\n\n //zoom out to Year Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getYearPage(), calendarPanel.getPageBase());\n\n //can't zoom out anymore, stays at Year Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getYearPage(), calendarPanel.getPageBase());\n\n //zoom in to Month Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getMonthPage(), calendarPanel.getPageBase());\n }", "public void zoomToFit() { zoomToFit(null); }", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "public void zoomIn()\n {\n zoomIn(1, width >> 1, height >> 1);\n }", "public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}", "void onZoom() {\n\t\tmZoomPending=true;\n\t}", "void multitouchZoom(int new_zoom);", "public void wheelZoom(MouseWheelEvent e) {\n try {\n int wheelRotation = e.getWheelRotation();\n Insets x = getInsets(); //Top bar space of the application\n Point p = e.getPoint();\n p.setLocation(p.getX() , p.getY()-x.top + x.bottom);\n if (wheelRotation > 0 && zoomLevel != 0) {\n //point2d before zoom\n Point2D p1 = transformPoint(p);\n transform.scale(1 / 1.2, 1 / 1.2);\n //point after zoom\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomOut();\n repaint();\n\n } else if (wheelRotation < 0 && zoomLevel != 20) {\n Point2D p1 = transformPoint(p);\n transform.scale(1.2, 1.2);\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomIn();\n repaint();\n }\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }", "public void zoomScaleIn() {\n \t\tzoomScale(SCALE_DELTA_IN);\n \t}", "public void movePageDown(){\n mEventHandler.onScroll(null, null, 0, getHeight());\n mACPanel.hide();\n }", "public void zoomIn() {\n\t\tif (this.zoom + DELTA_ZOOM <= MAX_ZOOM)\n\t\t\tthis.setZoom(this.zoom + DELTA_ZOOM);\n\t}", "public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}", "public boolean zoomOut(final boolean userAction) {\n return zoomOutAbout(mMapView.getCenter(), userAction);\n }", "public boolean canZoomOut() {\n\treturn getZoom() > getMinZoom();\n}", "public void mapViewLayedOut() {\n if (mPointToGoTo != null) {\n setCenter(mPointToGoTo);\n mPointToGoTo = null;\n }\n if (mZoomToZoomTo != -1) {\n setZoom(mZoomToZoomTo);\n mZoomToZoomTo = -1;\n }\n\n }", "private void ZoomOutCircle(double zoom, double circle_speed){\n final double COEFFICIENT=14;\n circle.setRadius(COEFFICIENT*(circle_speed-zoom));\n }", "public void zoomIn() {\n if (currentViewableRange.getLength() > 1) {\n zoomToLength(currentViewableRange.getLength() / 2);\n }\n }", "public void zoomIn() {\r\n \t\tgraph.setScale(graph.getScale() * 1.25);\r\n \t}", "private void checkForZoomIn(){\n if(checkIn == 1){\n zoomLevel++;\n adjustZoomFactor();\n checkOut = 1;\n checkIn = 0;\n } else{\n checkOut = 0;\n checkIn = 1;\n }\n\n }", "public void onZoom(View view){\n if(view.getId() == R.id.Bzoomin){\n mMap.animateCamera(CameraUpdateFactory.zoomIn());\n }\n if(view.getId()==R.id.Bzoomout){\n mMap.animateCamera(CameraUpdateFactory.zoomOut());\n }\n }", "public void onViewportOut() {\n View child;\n AppWidgetHostView widgetView;\n AppWidgetProviderInfo widgetInfo;\n Intent intent;\n\n for (int i = this.getChildCount() - 1; i >= 0; i--) {\n try {\n child = this.getChildAt(i);\n if (child instanceof AppWidgetHostView) {\n widgetView = ((AppWidgetHostView) child);\n\n // Stop all animations in the view\n stopAllAnimationDrawables(widgetView);\n\n // Notify the widget provider\n widgetInfo = widgetView.getAppWidgetInfo();\n int appWidgetId = widgetView.getAppWidgetId();\n intent = new Intent(LauncherIntent.Notification.NOTIFICATION_OUT_VIEWPORT)\n .setComponent(widgetInfo.provider);\n intent.putExtra(LauncherIntent.Extra.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n getContext().sendBroadcast(intent);\n }\n } catch (Exception e) {\n // LauncherApplication.reportExceptionStack(e);\n }\n }\n }", "public void movePageUp(){\n mEventHandler.onScroll(null, null, 0, -getHeight());\n mACPanel.hide();\n }", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "protected abstract void onScalePercentChange(int zoom);", "private void dragZoom() {\n\n\t\tint width = this.getWidth();\n\n\t\tint start = cont.getStart();\n\t\tdouble amount = cont.getLength();\n\n\t\tint newStart = (int) DrawingTools.calculatePixelPosition(x ,width,amount,start);\n\t\tint newStop = (int) DrawingTools.calculatePixelPosition(x2,width,amount,start);\n\t\tx = x2 = 0;\n\n\t\tint temp;\n\t\tif (newStop < newStart){\n\t\t\ttemp = newStart;\n\t\t\tnewStart = newStop;\n\t\t\tnewStop = temp;\n\t\t}\n\n\t\tcont.changeSize(newStart,newStop);\n\n\t}", "private void actionZoomIn ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\t//---- Calculate zoom scale factor\r\n\t\t\tdouble zoom = mainFormLink.getComponentPanelCenter().getComponentPanelImageView().transformZoom(+FormMainMouse.DEFAULT_ZOOM_DELTA); \r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\r\n\r\n\t\t\t//---- Set the current zoom, display the zoom scale factor in the GUI\r\n\t\t\tFormMainMouse.imageViewZoomScale = zoom;\r\n\t\t\tmainFormLink.getComponentPanelDown().getComponentLabelZoom().setText(String.valueOf(zoom));\r\n\t\t}\r\n\t}", "public void zoom_control()\n {\n simpleZoomControls.setOnZoomInClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _cnt++;\n int ss = _cnt / 60; int ss1 = _cnt % 60;\n _str_break = get_string(ss, ss1);\n mTxtBreakTime.setText(_str_break);\n }\n });\n // perform setOnZoomOutClickListener event on ZoomControls\n simpleZoomControls.setOnZoomOutClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _cnt--;\n if(_cnt <= 0) _cnt = 0;\n\n int ss = _cnt / 60; int ss1 = _cnt % 60;\n _str_break = get_string(ss, ss1);\n mTxtBreakTime.setText(_str_break);\n }\n });\n }", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "public void resetGraphicsWindowZoomAndMeasurement() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.graphicsTabItem.setModeState(GraphicsMode.RESET);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.graphicsTabItem.setModeState(GraphicsMode.RESET);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}", "public void zoomOnAddress(){\n adjustZoomLvl(16000);\n adjustZoomFactor();\n }", "@Override\n\t\t\tpublic void onMapZoom(MapZoomEvent eventObject)\n\t\t\t{\n\t\t\t}", "private void resetViewport() {\n final Viewport v = new Viewport(chart.getMaximumViewport());\n v.bottom = viewportBottom;\n v.top = viewportTop;\n v.left = 0;\n v.right = numberOfPoints - 1;\n if (v.right < 1){\n v.right = 1;\n }\n chart.setMaximumViewport(v);\n chart.setCurrentViewport(v);\n }", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "private void scaleImagePanel(float scale){\n float oldZoom = imagePanel.getScale();\n float newZoom = oldZoom+scale;\n Rectangle oldView = scrollPane.getViewport().getViewRect();\n // resize the panel for the new zoom\n imagePanel.setScale(newZoom);\n // calculate the new view position\n Point newViewPos = new Point();\n newViewPos.x = (int)(Math.max(0, (oldView.x + oldView.width / 2) * newZoom / oldZoom - oldView.width / 2));\n newViewPos.y = (int)(Math.max(0, (oldView.y + oldView.height / 2) * newZoom / oldZoom - oldView.height / 2));\n scrollPane.getViewport().setViewPosition(newViewPos);\n }", "protected void zoomToPresent(){\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread > 100) { widgg.timeorg.timeSpread /=2; }\n else { widgg.timeorg.timeSpread = 100; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n }", "private void onExit()\n {\n if (settings.window_size_remember)\n {\n settings.window_size_last = html_panel.getSize();\n settings.saveWindowSize();\n }\n \n System.exit(1);\n }", "public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "public void handleZoom(MouseEvent event){\n ImageView imageView = (ImageView) event.getSource();\n Image imageToShow = imageView.getImage();\n zoomImage.setImage(imageToShow);\n zoomPane.setVisible(true);\n }", "protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}", "public void onZoomIn(View view) {\n if (!checkReady()) {\n return;\n }\n changeCamera(CameraUpdateFactory.zoomIn());\n }", "@FXML\n void zOutPressed(ActionEvent event) {\n\t\tcanvas.setScaleX(canvas.getScaleX()*0.9);\n\t\tcanvas.setScaleY(canvas.getScaleY()*0.9);\n }", "@Override\n public void onMapZoomChanged(float zoom) {\n presenter.onMapZoomChanged(zoom);\n }", "public void zoomToFactor(double d) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void mouseWheelMoved(MouseWheelEvent e) {\n\t\t\t\tif(enabled){\n\t\t\t\tImageIcon tap = null;\n\t\t\t\tif (e.getWheelRotation() < 0) {\n\t\t\t\t\t// zoom in - increase size\n\n\t\t\t\t\tif (zoom_count < 0) {\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tzoom_count++;\n\t\t\t\t\t// fetch key frame number and get x, y of that frame in new\n\t\t\t\t\t// tapestry then crop image to that frame\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\tif (zoom_count == 1) {\n\t\t\t\t\t\tint pix = indexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = sceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 5;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=1;\n\n\t\t\t\t\t} else if (zoom_count >= 2) {\n\n\t\t\t\t\t\tint pix = zoom1IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom1SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(2).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom2 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(2).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(2).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(2).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(2).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=2;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\n\t\t\t\t} else {\n\t\t\t\t\t// zoom out - decrease size\n\t\t\t\t\tif (zoom_count > 2) {\n\t\t\t\t\t\tzoom_count = 2;\n\t\t\t\t\t}\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tif (zoom_count >= 2) {\n\t\t\t\t\t\tint pix = zoom2IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom2SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\t\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count = 1;\n\n\t\t\t\t\t} else if (zoom_count <= 1) {\n\t\t\t\t\t\ttap = new ImageIcon(nameOfTapestry + \"_\" + method + \"_\" + threshold + \".png\");\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}", "public void terminateDrag(LayerEvent event) {\r\n\t\tif (!_isZoomingOut && !_isZoomingIn) return;\r\n\r\n\t\tif (_zoomInFilter.accept(event) || _zoomOutFilter.accept(event)) {\r\n\t\t\t_isZoomingIn = _zoomInFilter.accept(event);\r\n\t\t\t_isZoomingOut = _zoomOutFilter.accept(event);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t// Use the positions of the rubberband to perform the zoom\r\n\t\tif( _rubberBand.getHeight() < 2.0 || _rubberBand.getWidth() < 2.0) {\r\n\t\t\t//We treat this as a single click zoom at center\r\n\t\t\tif (_isZoomingIn) {\r\n\t\t\t\t// TODO make the click factor zooming settable instead of 125%/80% which is a good default\r\n\t\t\t\tzoom(_rubberBand.getCenterX(), _rubberBand.getCenterY(), 1.25);\r\n\t\t\t\t} \r\n\t\t\telse if (_isZoomingOut) {\r\n\t\t\t\tzoom(_rubberBand.getCenterX(), _rubberBand.getCenterY(), 0.8);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// We treat this as the scale to fit the bounds of these converted coordinates\r\n\t\t\tif (((TrekCanvas)trekPane.getCanvas()).isControlDown()) {\r\n\t\t\t\t// We treat this as the zoom to fit the bounds of these converted coordinates\r\n\t\t\t\tDimension visSize = trekPane.getVisibleSize();\r\n\t\t\t\tdouble xZoomAmount = visSize.getWidth()/_rubberBand.getWidth();\r\n\t\t\t\tdouble yZoomAmount = visSize.getHeight()/_rubberBand.getHeight();\r\n\t\t\t if (_isZoomingOut) {\r\n\t\t\t \txZoomAmount = 1.0/xZoomAmount;\r\n\t\t\t\t\tyZoomAmount = 1.0/yZoomAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\tscale(_rubberBand.getCenterX(), _rubberBand.getCenterY(), xZoomAmount, yZoomAmount);\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// We treat this as the zoom to fit the bounds of these converted coordinates\r\n\t\t\t\tDimension visSize = trekPane.getVisibleSize();\r\n\t\t\t\tdouble currAspect = visSize.getHeight()/visSize.getWidth();\r\n\t\t\t\tdouble zoomAmount = 1.0;\r\n\t\t\t if (currAspect >= 1.0) {\r\n\t\t\t\t zoomAmount = visSize.getHeight()/_rubberBand.getHeight();\r\n\t\t\t\t\tif (_isZoomingOut) zoomAmount = 1.0/zoomAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tzoomAmount = visSize.getWidth()/_rubberBand.getWidth();\r\n\t\t\t\t\tif (_isZoomingOut) zoomAmount = 1.0/zoomAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\tzoom(_rubberBand.getCenterX(), _rubberBand.getCenterY(), zoomAmount);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t_overlayLayer.repaint(_rubberBand);\r\n\t\t_overlayLayer.remove(_rubberBand);\r\n\t\t_rubberBand = null;\r\n\t\t}", "public void zoom(boolean in) {\n\t\tAbstractGridGroupRenderer gr = (AbstractGridGroupRenderer) gallery.getGroupRenderer();\n\t\tint height = gr.getItemHeight();\n\t\tint width = gr.getItemWidth();\n\t\t\n\t\tif(in){\n\t\t\theight *= 2;\n\t\t\twidth *= 2;\n\t\t}else{\n\t\t\theight /= 2;\n\t\t\twidth /= 2;\n\t\t}\n\t\t\n\t\tif(height < 64 || width < 64){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(height > 512 || width > 512){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tgr.setItemSize(width, height);\n\t\tgallery.setItemCount(ResourceTypes.TYPES.length);\n\t}", "public void zoomPokemon(){\n }", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "public ProductGalleryPage zoomIn() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(zoomInElement), 2000);\n driver.findElement(By.xpath(zoomInElement)).click();\n return this;\n }", "private void resetTransitionEffect() {\n for (int i = 0; i < getChildCount(); i++) {\n View page = getPageAt(i);\n page.setPivotX(0);\n page.setPivotY(0);\n page.setRotation(0);\n page.setRotationX(0);\n page.setRotationY(0);\n // YUNOS BEGIN PB\n // ##modules(HomeShell): ##author:guoshuai.lgs\n // ##BugID:(5587344) ##date:2014/11/18\n // ##decription: Do not set EDIT_SCALE for AppsCustomizePagedView\n if (mLauncher.isEditMode() && (this instanceof Workspace)) {\n page.setScaleX(EDIT_SCALE);\n page.setScaleY(EDIT_SCALE);\n } else {\n page.setScaleX(1f);\n page.setScaleY(1f);\n }\n if (mLauncher.isEditMode() && (this instanceof Workspace)) {\n page.setTranslationX(page.getWidth() * (1 - EDIT_SCALE) / 2);\n } else {\n page.setTranslationX(0f);\n }\n // YUNOS END PB\n page.setTranslationY(0f);\n page.setVisibility(VISIBLE);\n page.setAlpha(1f);\n\n ViewGroup container;\n if (page instanceof CellLayout) {\n CellLayout cellLayout = (CellLayout) page;\n container = cellLayout.getShortcutAndWidgetContainer();\n } else if (page instanceof PagedViewCellLayout) {\n PagedViewCellLayout cellLayout = (PagedViewCellLayout) page;\n container = cellLayout.getChildrenLayout();\n } else if (page instanceof PagedViewGridLayout) {\n container = (ViewGroup) page;\n } else {\n // never\n return;\n }\n for (int j = 0; j < container.getChildCount(); j++) {\n View view = container.getChildAt(j);\n view.setPivotX(view.getMeasuredWidth() * 0.5f);\n view.setPivotY(view.getMeasuredHeight() * 0.5f);\n view.setRotation(0);\n view.setRotationX(0);\n view.setRotationY(0);\n view.setScaleX(1f);\n view.setScaleY(1f);\n view.setTranslationX(0f);\n view.setTranslationY(0f);\n view.setVisibility(VISIBLE);\n view.setAlpha(1f);\n }\n }\n }", "@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}", "@Override\n public void onHandle(EventObject eventObject)\n {\n \t\t\t\t Scheduler.get().scheduleDeferred(new ScheduledCommand() \n \t\t\t {\n \t\t\t\t \t@Override\n \t\t\t\t \tpublic void execute()\n \t\t\t\t \t{\n \t\t\t\t \t\topenLayersMap.getMap().zoomTo(ZOOM_LEVEL);\n \t\t\t \t\t\t\tSystem.out.println(\"@MapComponent, @zoomend, Reverting to Map Zoom: \"+openLayersMap.getMap().getZoom());\n \t\t\t\t \t}\n \t\t\t });\n }", "@Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n\n zoomer = true;\n\n //Zoom in\n if (e.getWheelRotation() < 0) {\n zoomFactor *= 1.1;\n repaint();\n }\n //Zoom out\n if (e.getWheelRotation() > 0) {\n zoomFactor /= 1.1;\n repaint();\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Zoom less\");\r\n\t\t\t}", "@Override\n public void transformPage(View view, float position) {\n view.setTranslationX(view.getWidth()* -position);\n //Active the vertical slide\n float yPosition = position * view.getHeight();\n view.setTranslationY(yPosition);\n }", "@Override\r\n\t\t\tpublic void handle(ScrollEvent e) {\n\t\t\t\tif (e.isControlDown() && getSkinnable().isScalableOnScroll()) {\r\n\t\t\t\t\tdouble delta = e.getDeltaY();\r\n\t\t\t\t\tdouble newValue = localScaleFactor.get();\r\n\t\t\t\t\tif (delta > 0) { // Increasing the zoom.\r\n\t\t\t\t\t\tnewValue = newValue + ZOOM_DELTA;\r\n\t\t\t\t\t\tif (newValue > ZOOM_MAX) {\r\n\t\t\t\t\t\t\tnewValue = ZOOM_MAX;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (delta < 0) { // Decreasing the zoom.\r\n\t\t\t\t\t\tnewValue = newValue - ZOOM_DELTA;\r\n\t\t\t\t\t\tif (newValue < ZOOM_MIN) {\r\n\t\t\t\t\t\t\tnewValue = ZOOM_MIN;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlocalScaleFactor.set(newValue);\r\n\t\t\t\t\ttakeSnap(prevX.get(), prevY.get());\r\n\t\t\t\t}\r\n\t\t\t\t// If scrolled with ALT key press\r\n\t\t\t\telse if (e.isAltDown() && getSkinnable().isResizableOnScroll()) {\r\n\t\t\t\t\tfinal double delta = e.getDeltaY();\r\n\t\t\t\t\tif (delta > 0) { // Increasing the size.\r\n\t\t\t\t\t\tlocalRadius.set(localRadius.get() + RADIUS_DELTA);\r\n\t\t\t\t\t\tshiftViewerContent(prevX.get(), prevY.get(), localRadius.get(), localScaleFactor.get());\r\n\t\t\t\t\t} else if (delta < 0) { // Decreasing the size.\r\n\t\t\t\t\t\tif (localRadius.get() > MIN_RADIUS) {\r\n\t\t\t\t\t\t\tlocalRadius.set(localRadius.get() - RADIUS_DELTA);\r\n\t\t\t\t\t\t\tshiftViewerContent(prevX.get(), prevY.get(), localRadius.get(), localScaleFactor.get());\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}", "private void toggleZoom(float x, float y) {\n if (getZoomFactor() == MAX_ZOOM_FACTOR) {\n setZoomFactor(MIN_ZOOM_FACTOR);\n }\n else {\n setZoomFactor(MAX_ZOOM_FACTOR);\n }\n moveCameraToPosWithinBoardBounds(x, y);\n }", "@Override\n public boolean touchDown(float x, float y, int pointer, int button) {\n prevZoomFactor = getZoomFactor();\n return false;\n }", "@Override\n\tpublic void handleScale(float scale, int moveYDistance) {\n\t\t scale = 0.6f + 0.4f * scale;\n//\t ViewCompat.setScaleX(mMoocRefreshView, scale);\n//\t ViewCompat.setScaleY(mMoocRefreshView, scale);\n\t}", "public void setZoom(int ps) {\n P_SCALE = ps;\n //EMBOSS = P_SCALE*8;\n }", "@Override\n\tpublic void onZoomChanged(GeoPoint center, double diagonal) {\n\t}", "public void zoom(int s) {\r\n\t\tzoom += s * ZOOM_FACTOR;\r\n\t}", "protected void end() {\n\t\tint page = maxPage;\n\t\tif (mListener != null) {\n\t\t\tmListener.OnJump(page);\n\t\t}\n\t\thide();\n\t}", "public void zoomToAreaOfInterest() {\n Envelope aoe = context.getViewport().getBounds();\n if (aoe.getWidth() == 0) {\n aoe.expandBy(.001, 0);\n }\n\n if (aoe.getHeight() == 0) {\n aoe.expandBy(0, .001);\n }\n Rectangle2D rect = new Rectangle2D.Double(aoe.getMinX(), aoe.getMinY(),\n aoe.getWidth(), aoe.getHeight());\n getCamera().animateViewToCenterBounds(rect, true, 0);\n }", "@Override\n public void mapScaleChanged(MapScaleChangedEvent mapScaleChangedEvent) {\n// if (drawGraphicLayer.getGraphics() == null || drawGraphicLayer.getGraphics().size() == 0) {\n// if (mapScaleChangedEvent.getSource().getMapScale() >= 94249 && cars != null) {\n// Log.i(TAG, \"mapScaleChanged: Zooming Out\");\n// graphicsOverlay.clearSelection();\n// graphicsOverlay.getGraphics().clear();\n//\n//\n// for (CarStatus car : cars) {\n//\n// Point point = (Point) GeometryEngine.project(new Point(car.getLongitude(), car.getLatitude(), spatialReference), mapView.getSpatialReference());\n// Graphic carGraphic = null;\n//\n//\n// if (car.getStatus().equals(\"Moving\")) {\n// greenMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.green));\n// greenMarker.setWidth(18f);\n// greenMarker.setHeight(36f);\n// greenMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, greenMarker);\n// } else if (car.getStatus().equals(\"Stopped\")) {\n// redMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.reed));\n// redMarker.setWidth(18f);\n// redMarker.setHeight(36f);\n// redMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, redMarker);\n// } else if (car.getStatus().equals(\"Disconnected\")) {\n// yellowMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.yellow));\n// yellowMarker.setWidth(18f);\n// yellowMarker.setHeight(36f);\n// yellowMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, yellowMarker);\n// }else if (car.getStatus().equals(\"Disabled\")) {\n// blueMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.blue));\n// blueMarker.setWidth(18f);\n// blueMarker.setHeight(36f);\n// blueMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, blueMarker);\n// }\n// graphicsOverlay.getGraphics().add(carGraphic);\n// }\n// } else if (mapScaleChangedEvent.getSource().getMapScale() < 94249 && cars != null) {\n// Log.i(TAG, \"mapScaleChanged: Zooming In\");\n// graphicsOverlay.clearSelection();\n// graphicsOverlay.getGraphics().clear();\n//\n// for (CarStatus car : cars) {\n//\n// Point point = (Point) GeometryEngine.project(new Point(car.getLongitude(), car.getLatitude(), spatialReference), mapView.getSpatialReference());\n// Graphic carGraphic = null;\n//\n// if (car.getStatus().equals(\"Moving\")) {\n// greenMarker.setWidth(32f);\n// greenMarker.setHeight(64f);\n// carGraphic = new Graphic(point, greenMarker);\n// } else if (car.getStatus().equals(\"Stopped\")) {\n// redMarker.setWidth(32f);\n// redMarker.setHeight(64f);\n// carGraphic = new Graphic(point, redMarker);\n// } else if (car.getStatus().equals(\"Disconnected\") || car.getStatus().equals(\"Disabled\")) {\n// yellowMarker.setWidth(32f);\n// yellowMarker.setHeight(64f);\n// carGraphic = new Graphic(point, yellowMarker);\n// }\n// graphicsOverlay.getGraphics().add(carGraphic);\n// }\n// }\n// }\n }", "public static void zoomIn(){\n for(int i=0; i<6; i++){\n driver.findElement(By.tagName(\"html\")).sendKeys(Keys.chord(Keys.CONTROL, Keys.ADD));\n }\n }", "public void zoomIn(){\n\t\t zoomed = modifyDimensions(picture.getWidth(),getHeight()); //in primul pas se maresc dimensiunile pozei\n\t\t for(int i = 0; i < zoomed.getHeight(); i += 2) {\n\t for(int j = 0; j < zoomed.getWidth(); j += 2) {\n\t zoomed.setRGB(j, i, picture.getRGB(j / 2,i / 2));\n\n\t if (j + 1 < zoomed.getWidth()) {\n\t zoomed.setRGB(j + 1, i, mediePixeli(picture.getRGB(j / 2, i / 2), picture.getRGB((j + 2) / 2, i / 2))); // intre doua coloane se adauga media pixelilor din acestea\n\t }\n\t }\n\t }\n\n\n\t for(int i = 1; i < zoomed.getHeight(); i += 2){\n\t \tfor(int j = 0; j < zoomed.getWidth(); j++ ){\n\t zoomed.setRGB(j, i, mediePixeli(picture.getRGB((j - 1) / 2, i / 2), picture.getRGB((j + 1) / 2, (i / 2))));\n\t }\n\t }\n\t \n\t }", "public void downPressed()\r\n {\r\n worldPanel.newMapPos(0,zoom);\r\n miniMap.newMapPos(0,1);\r\n }", "@Override\r\n\tpublic void onScaleEnd(ScaleGestureDetector detector) {\n\t}", "@Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n // Check direction of rotation\n if (e.getWheelRotation() < 0) {\n // Zoom in for up\n tr_z += 0.01f;\n } else {\n // Zoom out for down\n tr_z -= 0.01f;\n }\n }", "public void zoomNPinch(WebElement element){\n driver.zoom(element);\n driver.pinch(element);\n }", "public int getKeyZoomOut() {\r\n return getKeyDown();\r\n }", "void transformPage(View page, float position);", "@Override\n\tpublic void onScaleEnd(ScaleGestureDetector detector) {\n\t}", "@Override\n\t\t\tpublic void onPageScrollStateChanged(int state) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onPageScrollStateChanged(int state) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onPageScrollStateChanged(int state) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t \t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t \t\t\t\t webview.startAnimation(MyAnimations.getScaleAnimation(0.0f,\r\n\t\t \t\t\t\t\t\t1.0f, 1.0f, 1.0f, 300));\r\n\t\t \t\t\t}", "@Override\r\n\t\t \t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t \t\t\t\t webview.startAnimation(MyAnimations.getScaleAnimation(0.0f,\r\n\t\t \t\t\t\t\t\t1.0f, 1.0f, 1.0f, 300));\r\n\t\t \t\t\t}" ]
[ "0.8550541", "0.83910125", "0.8209417", "0.79753524", "0.7722066", "0.7665774", "0.75678277", "0.73767895", "0.7210883", "0.7167359", "0.7118093", "0.6931929", "0.6870649", "0.6865086", "0.66352826", "0.6628437", "0.65013516", "0.6465141", "0.63760746", "0.6355219", "0.6293479", "0.62886405", "0.6270665", "0.6243378", "0.6190599", "0.5935337", "0.5914586", "0.5906138", "0.5898912", "0.58957255", "0.58919245", "0.5872685", "0.58652467", "0.58625096", "0.58427346", "0.5808359", "0.57815564", "0.5774849", "0.57618535", "0.5749513", "0.5746081", "0.57427347", "0.57414", "0.57399064", "0.5677045", "0.5634298", "0.5596824", "0.55716467", "0.5544953", "0.5529532", "0.55213976", "0.55183065", "0.5512984", "0.54838836", "0.5472903", "0.54639065", "0.5458641", "0.54529935", "0.5448877", "0.5441969", "0.5439183", "0.5437598", "0.5430329", "0.5415664", "0.54154885", "0.5400154", "0.53973216", "0.53945446", "0.5391093", "0.5390434", "0.5388055", "0.537526", "0.53592724", "0.535741", "0.5348307", "0.531496", "0.52751213", "0.52610695", "0.5240025", "0.5229715", "0.5214647", "0.52129245", "0.51996493", "0.5198052", "0.51960087", "0.519118", "0.51890194", "0.5187276", "0.5174187", "0.5168637", "0.5160767", "0.5155163", "0.51432455", "0.51430666", "0.51362485", "0.5135884", "0.5135884", "0.5135884", "0.5135003", "0.5135003" ]
0.7032662
11
/ method for getting a Text from an WebElement
public static String getElementText(WebElement element) { return element.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getWebElementText(WebElement element) {\n return element.getText();\n }", "public String getElementText(WebElement element) {\n log.traceEntry();\n String placeholder = \"\";\n try {\n if (webWaitsutil.isElementPresent(element)) {\n highlightElement(element);\n placeholder = element.getText();\n removeHighlightedElement(element);\n }\n } catch (Exception e) {\n log.error(\"Unable to get element text! [{}]\", e.getMessage());\n }\n return log.traceExit(placeholder);\n }", "static String getElementText(Element e) {\n if (e.getChildNodes().getLength() == 1) {\n Text elementText = (Text) e.getFirstChild();\n return elementText.getNodeValue();\n }\n else\n return \"\";\n }", "public String getElementText(WebElement ele) {\n\t\tString text = ele.getText();\r\n\t\treturn text;\r\n\t}", "public static final String getElementText(Element element) {\n\t\tNodeList nl = element.getChildNodes();\n\t\tfor (int i = 0; i < nl.getLength(); i++) {\n\t\t\tNode c = nl.item(i);\n\t\t\tif ((c instanceof Text)) {\n\t\t\t\treturn ((Text) c).getData();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String getTextValue(WebElement element) {\r\n\t\tString textValue = null;\r\n\t\ttry {\r\n\t\t\ttextValue = element.getText();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"WebElement not found \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn textValue;\r\n\t}", "public static String getText(WebElement element) {\n\t\treturn element.getText();\n\t}", "public static String getText(WebElement element) {\n\t\treturn element.getText();\n\t}", "public String getText() {\n // element.getTextContent() breaks in jdk 1.4, so is implemented manually\n return getTextContent(element, new StringBuffer()).toString();\n }", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "@Override\n\t\t\tpublic String getText(Object element) {\n\t\t\t\treturn \"test\";\n\t\t\t}", "public WebElement getText(String identifier) {\n return findTextElement(identifier);\n }", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "public String getText(final String elementLocator);", "private String getElement(WebElement webElement) {\n if (webElement != null) {\n if (webElement.getText() != null) {\n return webElement.getText();\n } else if (webElement.getTagName() != null) {\n return webElement.getTagName();\n } else {\n return null;\n }\n } else {\n return null;\n }\n }", "@Override\n\t\t\tpublic String getText(Object element) {\n\t\t\t\treturn \"test5\";\n\t\t\t}", "public static String getText(Element n) {\n return getText(n, (String) null);\n }", "public String getPlainText(Element element) {\n FormattingVisitor formatter = new FormattingVisitor();\n NodeTraversor.traverse(formatter, element);\n\n return formatter.toString().trim();\n }", "public String getText() throws NoSuchSelectorException, NoSuchElementException {\n\t\treturn element().getAttribute(\"value\");\n\t}", "String getText ();", "public String getText(Object element) {\n String retval = \"\";\n Object index;\n if (element instanceof Integer) {\n index = element != null ? element : Integer.valueOf(0);\n retval = (String) values.get(index);\n } else if(element instanceof Short) {\n index = element != null ? element : Short.valueOf((short)0);\n retval = (String) values.get(index);\n }\n return retval;\n }", "public String getText();", "public String getText();", "public String getText();", "public String getText();", "public static String getTextFromHiddenElement(JavascriptExecutor executor, WebElement element) {\n return returningJQ(executor, \"text()\", element);\n }", "public static String getTextFromHiddenElement(WebElement element) {\n return getTextFromHiddenElement(getExecutorFromElement(element), element);\n }", "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 String getText() {\n return text.getText();\n }", "public String getTextFromElement(By locator) {\n\t\tString text = null;\n\t\ttry {\n\t\t\ttext = SharedSD.getDriver().findElement(locator).getText();\n\t\t} catch (NoSuchElementException e) {\n\t\t\tAssert.fail(\"Element is not found with this locator: \" + locator.toString());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn text;\n\t}", "public java.lang.String getText()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEXT$18, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getText() {\n if (!this.a_text.isEnabled())\n return null;\n\n return this.a_text.getText();\n }", "public java.lang.String getText()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEXT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public static String gettext(WebElement elename, AndroidDriver driver, String elementName) throws IOException {\n\t\tlogger.info(\"--------- get text from element ---------\");\n\t\tString eleText = null;\n\t\ttry {\n\t\t\teleText = elename.getText();\n\t\t} catch (Exception e) {\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName)); // exception\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(MobileActionUtil.capture(driver, elementName));\n\t\t\tAssert.fail(\"Unable to fetch text from \" + \"\\'\" + elename + \"\\'\");\n\n\t\t}\n\t\treturn eleText;\n\t}", "@DISPID(-2147417085)\n @PropGet\n java.lang.String innerText();", "String getTextValue();", "private String getTextFromTagName(Element element, String tagName) {\n NodeList elements = element.getElementsByTagName(tagName);\n Node node = elements.item(0);\n return node.getTextContent();\n }", "public String getText()\n {\n return (this.text);\n }", "public String getText() {\n\t\t\treturn text.get();\n\t\t}", "public String getText() {\n return mTextContainer.getText();\n }", "@Override\n public String getText() {\n return getWrappedElement().getAttribute(\"value\");\n }", "public java.lang.String getText() {\n return this.text;\n }", "public java.lang.String getText() {\n return instance.getText();\n }", "public String getText() {\r\n return this.text;\r\n }", "String getElementStringValue(Object element);", "String getElement();", "private String getTextValue(Element ele, String tagName) {\r\n\t\tString textVal = null;\r\n\t\tNodeList nl = ele.getElementsByTagName(tagName);\r\n\t\tif(nl != null && nl.getLength() > 0) {\r\n\t\t\tElement sl = (Element)nl.item(0);\r\n\t\t\ttextVal = sl.getFirstChild().getNodeValue();\r\n\t\t}\r\n\r\n\t\treturn textVal;\r\n\t}", "public String getTextValue (Node node);", "public String text() {\r\n\t\treturn jquery.text(this, webDriver);\r\n\t}", "public String getText() {\r\n return text;\r\n }", "private String getText(Node node) throws ParserException{\n NodeList list = node.getChildNodes();\n for (int i=0; i < list.getLength(); i++){\n if(list.item(i).getNodeType() == Node.TEXT_NODE) {\n return list.item(i).getTextContent().trim();\n }\n }\n throw new ParserException(\"Node has no text element, at: \"+ dom.compareDocumentPosition(node));\n }", "public String getTextFromElement(By by) {\n return driver.findElement(by).getText();\n }", "public String getTextFromElement(By by) {\n return driver.findElement(by).getText();\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText()\r\n {\r\n return this.text;\r\n }", "String getText(int id);", "public String getText() {\n if (_lastTag == null)\n return null;\n return _lastTag.getChildText();\n }", "String getToText();", "public String readText (By elementBy) {\r\n return getDriver().findElement(elementBy).getText().toString();\r\n }", "public String getText() {\n return this.text;\n }", "public String getText() {\n return this.text;\n }", "public String getText() {\n return this.text;\n }", "public String getText() {\n return this.text;\n }", "public String getText() {\n return this.text;\n }", "public String getText() {\n return this.text;\n }", "public TypeElement getText() {\n return this.te.getText();\n }", "public String getText(String locator) {\n waitForElement(locator);\n return driver.findElement(By.xpath(locator)).getText();\n }", "public java.lang.String getText() {\n \t\treturn text;\n \t}", "public String getText() {\r\n return text;\r\n }", "public String getText() {\r\n return text;\r\n }", "protected Text getText() {\n \t\treturn text;\n \t}", "@Override\n\tpublic String getText(Object element) {\n\t\tif (element instanceof VDMNode) {\n\t\t\tVDMNode vdmNode = (VDMNode) element;\n\t\t\tString nodeName = vdmNode.getNodeName(); \n\t\t\tif (VDMConstants.NODE_NAME_LDEVICE.equals(nodeName)) {\n\t\t\t\treturn vdmNode.getAttribute(\"inst\");\n\t\t\t} else if (VDMConstants.NODE_NAME_LN.equals(nodeName)) {\n\t\t\t\treturn vdmNode.getAttribute(\"lnClass\") + \"_\" + vdmNode.getAttribute(\"inst\");\n\t\t\t} else if (VDMConstants.NODE_NAME_DO.equals(nodeName) || VDMConstants.NODE_NAME_SDO.equals(nodeName)) {\n\t\t\t\treturn vdmNode.getAttribute(\"name\");\n\t\t\t} else if (VDMConstants.NODE_NAME_DA.equals(nodeName) || VDMConstants.NODE_NAME_BDA.equals(nodeName)) {\n\t\t\t\treturn vdmNode.getAttribute(\"name\");\n\t\t\t} else {\n\t\t\t\treturn element.toString();\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public java.lang.String getText() {\n return text_;\n }", "public String getTextOnPage()\n {\n return mainText.getText();\n }", "public String getText(Object element)\n {\n if (element instanceof Profile)\n {\n Profile profile = (Profile) element;\n return profile.getName();\n }\n return null;\n }", "public String getText(){\r\n\t\treturn text;\r\n\t}", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }" ]
[ "0.8059507", "0.772823", "0.7707582", "0.7666648", "0.76468164", "0.7591153", "0.758452", "0.758452", "0.755356", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.7330122", "0.72816986", "0.72721183", "0.72721183", "0.72721183", "0.72721183", "0.72721183", "0.72721183", "0.72721183", "0.7209896", "0.7205199", "0.7140138", "0.7078167", "0.7033828", "0.7000487", "0.693338", "0.68929404", "0.6880958", "0.6880958", "0.6880958", "0.6880958", "0.68294704", "0.68238443", "0.68011224", "0.6763758", "0.6726049", "0.67174184", "0.67107373", "0.67074186", "0.67057556", "0.66897357", "0.6679155", "0.6632556", "0.6608605", "0.66024005", "0.65987283", "0.65676427", "0.65634686", "0.65572464", "0.6550713", "0.6548973", "0.65436214", "0.6541106", "0.65347254", "0.6533382", "0.6522696", "0.65225047", "0.65173835", "0.65173835", "0.6514473", "0.6514473", "0.6514473", "0.6514473", "0.6514473", "0.65073484", "0.64999694", "0.6499226", "0.6498722", "0.64970934", "0.6493813", "0.6493813", "0.6493813", "0.6493813", "0.6493813", "0.6493813", "0.6471538", "0.64709145", "0.64697206", "0.64633477", "0.64633477", "0.64611685", "0.6452951", "0.6451889", "0.6442897", "0.64361507", "0.64284134", "0.6426353", "0.6426353", "0.6426353", "0.6426353", "0.6426353", "0.6426353", "0.6426353" ]
0.78551674
1
/FileWriter method can write down in a .txt particular data getted from an WebElement
public static String FileWriter(WebElement ele,String filePath) throws IOException { File f1 = new File(filePath); java.io.FileWriter fw = new java.io.FileWriter(f1); String text = ele.getText(); Reporter.log(text); // System.out.println(text); fw.write(text); fw.close(); return text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void writeDataToTxtFile() {\n\n }", "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 }", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public void writeToTextFile(String filename){\n try{\n FileWriter myWriter = new FileWriter(filename); \n myWriter.write(toString());\n myWriter.close();\n } \n catch(IOException e) { \n System.out.println(\"An error occurred.\"); \n e.printStackTrace();\n } \n }", "public abstract void write(T dataElement);", "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 }", "private void writeToFile(E entity){\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(this.fileName,true))) {\n bw.write(entity.toFile());\n bw.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t}", "private void writeToFile() throws IOException {\n\t\tFileWriter write = new FileWriter(path);\n\t\tPrintWriter print_line = new PrintWriter(write);\n\t\t\n\t\tEnumeration<String> fd_key_Enum = fileData.keys();\n\t\tEnumeration<String> fd_value_Enum = fileData.elements();\n\t\twhile (fd_key_Enum.hasMoreElements() && fd_value_Enum.hasMoreElements()) {\n\t\t\tprint_line.printf(\"%s\" + \"%n\", fd_key_Enum.nextElement() + \":\" + fd_value_Enum.nextElement());\n\t\t}\n\t\t\n\t\tprint_line.close();\n\t\twrite.close();\n\t}", "public void saveText(List<E> elements, String path){\n\n try (FileOutputStream fos = new FileOutputStream(path)){\n\n PrintWriter out = new PrintWriter(new BufferedOutputStream(fos));\n\n for (E el : elements) {\n out.println(el);\n }\n }\n catch (IOException ioe){\n System.out.println(\"Exception Can't find path or can't close stream\");\n }\n\n }", "public void writeContentToFile(String writeInformation)\n {\n try\n {\n PrintWriter printWriter = new PrintWriter(filename);\n try\n {\n printWriter.println(writeInformation);\n } finally\n {\n printWriter.close();\n }\n } catch (Exception e)\n {\n System.out.println(\"cannot write to file called \" + filename);\n }\n }", "public static void writeToStringToFile(Player p)\r\n {\r\n try \r\n { \r\n //Create file \r\n PrintWriter fileOutput = new PrintWriter(new FileWriter(\"playersData.txt\", true), true); \r\n\r\n //Write data from given ArrayList to the file \r\n fileOutput.println(p);\r\n\r\n //Close file\r\n fileOutput.close();\r\n } \r\n catch (IOException ioException) \r\n { \r\n //Output error message \r\n System.out.println(\"Error: The file cannot be created\"); \r\n }//end try \r\n }", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "private static void writeData(String file, String writable)\n\t\t\tthrows IOException {\n\t\tFileWriter fw = new FileWriter(FILE_PATH + file + \".txt\", true);\n\t\ttry {\n\t\t\tfw.write(getTime() + writable + \"\\t\");\n\t\t\tfw.write(System.lineSeparator());\n\t\t\tfw.close();\n\t\t} catch (Exception e) {\n\t\t\tfw.write(\"Error processing data: \" + e);\n\t\t}\n\t}", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public abstract void saveToFile(PrintWriter out);", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }", "public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }", "public static void WriteFile(){\n String[] linha;\n FileWriter writer;\n try{\n writer = new FileWriter(logscommissions, true);\n PrintWriter printer = new PrintWriter(writer);\n linha = ManageCommissionerList.ReturnsCommissionerListInString(ManageCommissionerList.comms.size()-1);\n for(int i=0;i<19;i++){\n printer.append(linha[i]+ \"\\n\");\n }\n printer.close();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"Unable to read file\\n\");\n }\n try{\n Commissions temp = ManageCommissionerList.comms.get(ManageCommissionerList.comms.size()-1);\n BufferedImage img = temp.GetWipImage();\n File fl = new File(\"wipimages/wip\" + temp.GetCommissionTitle() + temp.GetUniqueID() + \".jpg\");\n ImageIO.write(img, \"jpg\", fl);\n }catch (Exception e){\n e.printStackTrace();\n System.out.printf(\"Failure to write image file\");\n }\n \n }", "private static void writeDataLog(String string, String result) throws IOException {\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(string), true));\n\t\tbw.write(result);\n\t\tbw.newLine();\n\t\tbw.flush();\n\t\tbw.close();\n\t}", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "private void writeToFile(final String data, final File outFile) {\n try {\n FileOutputStream foutStream = new FileOutputStream(outFile);\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(foutStream);\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n foutStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public abstract void writeToFile( );", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "@Override\n public void saveToFile(List<Product> elements) throws IOException {\n List<String> collect = elements.stream()\n .map(product -> product.toString()) //z wykorzystanie method referencje .map(String::toString)\n .collect(Collectors.toList());\n\n //korzystamy z new io (nio patrz import) a nie jak wczesniej z io (we wprowadzeniu) bo latwiejsze\n Files.write(Paths.get(path), collect);\n\n\n }", "private void writeOutputFile(String str, String file) throws Exception {\n FileOutputStream fout = new FileOutputStream(file);\n\n fout.write(str.getBytes());\n fout.close();\n }", "public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }", "@FXML\n\tprivate void onSaveClicked(){\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\tFile file = new File(\"log.txt\");\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(file, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\twriter = new PrintWriter(bw);\n\t\t\twriter.println(\"New record\");\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\n\t\t\t\twriter.println(list.get(i) +\" & \"+ (dat.get(i)));\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\ttextArea.setText(\"Exception occurred:\" + ioe.getMessage());\n\t\t} finally {\n\t\t\tif (writer != null) {\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\n\t}", "private void saveTextToFile(String content, File file) {\n try {\n PrintWriter writer;\n writer = new PrintWriter(file);\n writer.println(content);\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void writeInfoToFile() {\n createInfoFile(\"infoList.txt\", fwExMessage);\n outFile.println(\"منشی\");\n outFile.println(username);\n outFile.println(password);\n outFile.println(\" \");\n outFile.close();\n }", "public void writeToFile(String outputName) throws Exception{\n if (trials == null || data == null) throw new Exception(\"Must read marker and data file before writing it out\");\n BufferedWriter bw = new BufferedWriter(new FileWriter(outputName));\n \n //.. write out the headers\n for (int i= FIRSTPROBEINDEX; i < header.length; i++) {\n bw.write(header[i]);\n bw.write(\",\");\n }\n \n //.. write out condition\n bw.write(\"condition\");\n \n bw.write(\"\\n\");\n int rowNum =0;\n \n //.. write out actual data\n for (String [] row : data) {\n if (row.length!= header.length) System.out.println(\"Row has \" + row.length + \" whereas header has \" + header.length);\n String label =null;\n for (int i = FIRSTPROBEINDEX; i < row.length; i++) {\n label = getLabel(rowNum); //.. will be null if it doesn't exist\n \n if (label != null ) {\n bw.write(row[i]);\n bw.write(\",\");\n }\n }\n if (label!=null) {\n //System.out.println(\"Writing \" + getLabel(rowNum));\n String condition = getLabel(rowNum);\n bw.write(condition);\n bw.write(\"\\n\");\n \n //.. this is a hack since my program gives an error if a conditon jsut has one line\n if (condition.equals(\"passed\")) duplicateLastLine(bw, row, condition,20 );\n \n }\n rowNum++;\n }\n \n bw.close();\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}", "private void writeToFile(String fileName,String contents) throws IOException{\r\n\t\tFileWriter fw = new FileWriter(fileName,true);\r\n\t\tPrintWriter pw = new PrintWriter(fw);\r\n\t\tpw.write(contents+\"\\r\\n\");\r\n\t\tpw.close();\r\n\t}", "private void writeTo(String logEntry, File logFile) throws IOException {\n try (FileWriter logFileWriter = new FileWriter(logFile, true);) {\n logFileWriter.write(logEntry);\n logFileWriter.write(System.lineSeparator());\n logFileWriter.flush();\n logFileWriter.close();\n }\n}", "public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public static void writeToFile(File fileToWriteTo, String info) throws IOException\n\t{\n\t\tFileWriter write = new FileWriter(fileToWriteTo, true);\n\t\twrite.write(info);\n\t\twrite.close();\n\t}", "protected abstract void writeFile();", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "public void saveFile()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\t\n\t\tfor(CSVItem cItem : itemList)\n\t\t{\n\t\t\tsb.append(cItem.buildCSVString()).append(newLine);\n\t\t\t\n\t\t}\n\t\tString fileString = sb.toString();\n\t\t\n\t\t File newTextFile = new File(filePath);\n\n FileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(newTextFile);\n\t\t\t fw.write(fileString);\n\t\t fw.close();\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}", "private void saveData( ) throws IOException {\n \tString FILENAME = \"data_file\";\n String stringT = Long.toString((SystemClock.elapsedRealtime() - timer.getBase())/1000)+\"\\n\";\n String stringS = textView.getText().toString()+\"\\n\";\n String stringD = Long.toString(System.currentTimeMillis())+\"\\n\";\n FileOutputStream fos;\n\t\ttry {\n\t\t\tfos = openFileOutput(FILENAME, Context.MODE_APPEND); //MODE_APPEND\n\t\t\tfos.write(stringS.getBytes());\n\t\t\tfos.write(stringT.getBytes());\n\t\t\tfos.write(stringD.getBytes());\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "private void toSave() {\n File file4=new File(\"trial.txt\");\n try\n {\n String row;\n BufferedWriter bw=new BufferedWriter(new FileWriter(file4));\n for(int i=0;i<jt.getRowCount();i++)\n {\n row = \"\";\n for(int j=0;j<jt.getColumnCount();j++)\n {\n row += (jt.getValueAt(i, j) +\",\");\n }\n row = row.substring(0, row.length()-1);\n //System.out.println(row);\n bw.write(row);\n bw.newLine();\n }\n bw.close();\n \n \n JOptionPane.showMessageDialog(rootPane,\"Details saved succesfully\");\n }\n \n catch(Exception ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Exception occured\");\n }\n }", "public static void writeFile(String fileToWriteTo, String info) throws IOException\n\t{\n\t\tFileWriter write = new FileWriter(fileToWriteTo, true);\n\t\twrite.write(info);\n\t\twrite.close();\n\t}", "public void writeCharacterToFile() throws Exception\r\n\t{\r\n\t\tPath fileName = Paths.get(name.concat(\"-data.xml\").replaceAll(\" \", \"_\"));\r\n\r\n\t\tif(Files.exists(fileName))\r\n\t\t{\r\n\t\t\tint conf = JOptionPane.showConfirmDialog(null, \"File already exists. Overwrite?\");\r\n\t\t\tif(conf == JOptionPane.OK_OPTION)\r\n\t\t\t{\r\n\t\t\t\tFileIO.deleteFile(fileName);\r\n\t\t\t\twriteCharXML(fileName.toFile());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No file operation completed.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteCharXML(fileName.toFile());\r\n\t\t}\r\n\r\n\r\n\r\n\t}", "public static void writeOut(String iFilename, String iContents)\n {\n File wFile = new File(iFilename);\n BufferedWriter bw = null;\n \n try\n {\n bw = new BufferedWriter(new FileWriter(wFile));\n bw.write(iContents);\n bw.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }", "private void writeToFile() {\n boolean flag = true;\n int expectedPacket = (lastPacket)? sequenceNo: Constants.WINDOW_SIZE;\n for (int i = 0; i < expectedPacket; i++) {\n if(!receivedPacketList.containsKey(i)) {\n flag = false;\n }\n }\n if (flag) {\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Write to file Possible\");\n try (BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(fileSavePath, true))) {\n for (int i = 0; i < receivedPacketList.size(); i++) {\n //System.out.println(new String(receivedPacketList.get(i)));\n stream.write(receivedPacketList.get(i));\n }\n receivedPacketList.clear();\n stream.close();\n } catch (FileNotFoundException ex) {\n \n } catch (IOException ex) {\n \n }\n receivedPacketList.clear();\n expectedList.clear();\n }\n }", "void writeToFile() throws IOException{\n\t\tString fileName = f.getTitle() + \".txt\";\n\t\tfileWrite = new BufferedWriter( new FileWriter(fileName));\n\t\tfileWrite.write(history);\n\t\tSystem.out.println(fileName + \" File Writing Successful!!\");\n\t\tSystem.out.println(\"Data in file :\\n\" + history);\n\t\tfileWrite.flush();\n\t\tFile file = new File(fileName);\n\t\tjava.awt.Desktop.getDesktop().open(file);\n\n\t}", "public void write(String filename, String text) {\n\n try (FileWriter writer = new FileWriter(filename)) {\n writer.write(text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private static void writeToStudentsFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(STUDENTS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tIterator<StudentDetails> iter = ALL_STUDENTS.listIterator(1); //Get all StudentDetails objects from index 1 of ALL_STUDENTS. This is because the value at index 0 is just a dummy student\n\t\twhile(iter.hasNext()){\n\t\t\tStudentDetails student = iter.next();\n\t\t\tbw.write(student.ParseForTextFile()); //writes the Parsed Form of the StudentDetails object to the students.txt file\n\t\t}\n\t\t\n\t\tbw.close();\n\t}", "public void Write_data() {\n // add-write text into file\n try {\n FileOutputStream fileout=openFileOutput(\"savedata11.txt\", MODE_PRIVATE);\n OutputStreamWriter outputWriter=new OutputStreamWriter(fileout);\n outputWriter.write(Integer.toString(_cnt));\n outputWriter.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void writeToFile(File file) {\n\n\t}", "private void writeDeviceInfo() {\n StringBuffer text = new StringBuffer(getDeviceReport());\n dataWriter.writeTextData(text, \"info.txt\");\n }", "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 writeInfoTofile() throws IOException\n\t{\n\t\tFileWriter fstream = new FileWriter(\"booking.txt\",true);\n BufferedWriter out = new BufferedWriter(fstream); //buffer class name out\n out.append(\"name : \"+this.customer_name);\n out.newLine();\n out.append(hotelInfo.getName());// Writing all customer info\n out.newLine();\n out.append(\"country : \"+hotelInfo.getCountry());\n out.newLine();\n out.append(\"Hotel rating : \"+hotelInfo.getStar());\n out.newLine(); \n out.append(\"check-in date : \"+this.checkin_date);\n out.newLine();\n out.append(\"check-out date: \"+this.checkout_date);\n out.newLine();\n out.append(\"Total price : \"+this.totalPrice);\n out.newLine();\n out.close();\n System.out.println(\"Writting successful.\");\n\t}", "private void writeToFile(){\n Calendar c = Calendar.getInstance();\n String dateMedTaken = DateFormat.getDateInstance(DateFormat.FULL).format(c);\n FileOutputStream fos = null;\n\n try {\n fos = openFileOutput(FILE_NAME, MODE_APPEND);\n fos.write(dateMedTaken.getBytes());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(fos != null){\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "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 }", "public static void saveDataToFile() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy MM dd, HH mm\");\n Date date = new Date();\n String fileName= dateFormat.format(date)+\".txt\";\n\n try {\n PrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n writer.print(\"Wins: \");\n writer.println(wins);\n writer.print(\"Draws: \");\n writer.println(draws);\n writer.print(\"Losses: \");\n writer.println(loses);\n writer.close();\n System.out.println(\"File Write Successful\");\n } catch (IOException e) {\n\n }\n\n\n }", "@Test\n\tpublic void testWriteToFile() {\n ArrayList<String> actualLines = new ArrayList<String>();\n\n\t\tactualLines.add(\"Course: Java\");\n\t\tactualLines.add(\"CourseID: 590\");\n\t\tactualLines.add(\"StudentName: Nikhil Kumar\");\n\t\t\n\t\t// Write to file\n\t\tmyFileWriter1.writeToFile(actualLines);\n\t\t\n\t\t// Read the written file to test its contents\n\t\tArrayList<String> expectedLines = readWrittenFile(\"output_test.txt\");\n\t\tassertEquals(expectedLines, actualLines);\n\t}", "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 }", "private void reportToFile() {\n try {\n fileWriter = new FileWriter(\"GameStats.txt\");\n fileWriter.write(reportContent);\n fileWriter.close();\n }\n catch (IOException ioe) {\n System.err.println(\"IO Exception thrown while trying to write to file GameStats.txt\");\n }\n }", "private static void saveToFile(String xmlExtrato, ArrayList diretorios, String sessionId)\n\t{\n\t try\n\t {\n\t //Percorrendo a lista de diretorios e verificando se existe algum valido.\n\t for(int i = 0; i < diretorios.size(); i++)\n\t {\n\t File diretorio = new File((String)diretorios.get(i));\n\t if((diretorio.exists()) && (diretorio.isDirectory()))\n\t {\n\t \t //Salvando o xml em arquivo\n\t \t String fileName = diretorios.get(i) + File.separator + sessionId;\n\t \t File fileExtrato = new File(fileName);\n\t \t FileWriter writer = new FileWriter(fileExtrato);\n\t \t writer.write(xmlExtrato);\n\t \t writer.close();\n\t \t break;\n\t }\n\t }\n\t }\n\t catch(Exception e)\n\t {\n\t e.printStackTrace();\n\t }\n\t}", "private void writeToFile(String data,Context context) {\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(context.openFileOutput(\"config.txt\", Context.MODE_PRIVATE));\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n }\n catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public void WriteStudentstoFile(String path) {\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\twriter = new PrintWriter(path, \"UTF-8\");\n\t\t\tArrayList<Student> data = GetAllStudentData();\n\t\t\tfor (int i = 0; i <= data.size() - 1; i++) {\n\t\t\t\tString f = data.get(i).regID + \",\" + data.get(i).name + \",\" + data.get(i).fatherName + \",\"\n\t\t\t\t\t\t+ data.get(i).section + \",\" + data.get(i).department;\n\t\t\t\twriter.println(f);\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "@Override\n public void storeParsedText() {\n parsedHtmlPages.parallelStream().forEach(parsedHtmlPage -> {\n FileUtility.writeToFile(parsedHtmlPage, FILE_DIRECTORY_NAME + FILE_SEPARATOR + parsedHtmlPage.getTitle());\n });\n }", "void saveRecents(){\n File dotFile = new File( rcFile);\n FileWriter fw;\n BufferedWriter bw;\n PrintWriter pw;\n String str;\n\n // open dotFile\n try{\n // if there is not dotFile, create new one\n fw = new FileWriter( dotFile );\n bw = new BufferedWriter( fw );\n pw = new PrintWriter( bw );\n //write\n for(int i=0;i<MAX_RECENT;i++){\n str = miRecent[i].getText();\n pw.println(str);\n }\n pw.close();\n bw.close();\n fw.close();\n }catch(IOException e){\n }\n\n\n }", "private void writeLogToTxtFile(File logFileTarget, ArrayList<String> logFile) throws IOException {\n\t\tFileWriter FW = new FileWriter(logFileTarget);\n\t\tfor (String line : logFile) {\n\t\t\tFW.write(line + \"\\n\");\n\t\t}\n\t\tFW.close();\n\t}", "private static void writeOutput(String text) {\n try {\n FileWriter outputWriter = new FileWriter(\"output.txt\", true);\n outputWriter.write(text);\n outputWriter.close();\n } catch (Exception e) {\n System.out.println(\"Could not write to file output.txt\");\n }\n }", "public void write() {\n\t\tint xDist, yDist;\r\n\t\ttry {\r\n\t\t\tif (Pipes.getPipes().get(0).getX() - b.getX() < 0) { // check if pipes are behind bird\r\n\t\t\t\txDist = Pipes.getPipes().get(1).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(1).getY() - b.getY() + Pipes.height;\r\n\t\t\t} else {\r\n\t\t\t\txDist = Pipes.getPipes().get(0).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(0).getY() - b.getY() + Pipes.height;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\txDist = -6969;\r\n\t\t\tyDist = -6969;\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Pipe out of bounds\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"DATA.txt\");\r\n\t\t\tFileWriter fr = new FileWriter(file, true);\r\n\t\t\tfr.write(xDist + \",\" + yDist + \",\" + b.getYVel() + \",\" + didJump);\r\n\t\t\tfr.write(System.getProperty(\"line.separator\")); // makes a new line\r\n\t\t\tfr.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Wtrie file error\");\r\n\t\t}\r\n\t}", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "void writeToFile () throws IOException{\n FileWriter deleteFile = new FileWriter(\"Resolved Ticket of \" + this.resovedDate + \".txt\");\n BufferedWriter FileDeleted = new BufferedWriter(deleteFile);\n\n FileDeleted.write(\"Resolution: \" + this.Resolution + \" ; Date: \" + this.resovedDate);\n FileDeleted.close();\n }", "private void saveToFile(File file) throws IOException {\n FileWriter fileWriter = null;\n try {\n fileWriter = new FileWriter(file);\n fileWriter.write(getSaveString());\n }\n finally {\n if (fileWriter != null) {\n fileWriter.close();\n }\n }\n }", "public static void writeFile(String file, Vector<String> data) {\n\n //write details to the current file\n try {\n PrintWriter pw = new PrintWriter(file);\n for(int i = 0; i < data.size(); i++){\n pw.println(data.get(i));\n }\n pw.flush();\n pw.close();\n } catch (FileNotFoundException fnfe){\n System.out.println(fnfe);\n }\n }", "public abstract void save(FileWriter fw) throws IOException;", "public void saveFile(File file, String text) {\r\n\t\t\r\n\t\tif (file==null){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\r\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) {\r\n\r\n\t\t\tbw.write(text);\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void w(String text, File loc) throws Exception {\n\r\n\t\tFileWriter fw = new FileWriter(loc, true);\r\n\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\r\n\t\twriter.newLine();\r\n\t\twriter.write(text);\r\n\r\n\t\twriter.close();\r\n\t\tfw.close();\r\n\t}", "public void writeToFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\ProjectModify\\\\src\\\\Railway.txt\");\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\t\tif(persons[i] != null){\r\n\t\t\t\t\tfw.write(\"Name :\" +persons[i].getName());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Phone Number :\"+persons[i].getPhn()); \r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Age :\"+persons[i].getAge());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Train Name :\"+persons[i].getStrain());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Destination :\"+persons[i].getDestination());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Starting Point :\"+persons[i].getStpoint());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Seat Class :\"+persons[i].getSclass());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Fare :\"+persons[i].getFare());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfw.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public ThingToWriteFile(String filename) { \n\t\ttry { \t\n\t\t\tout = new BufferedWriter(new FileWriter(filename));\n\t\t}\n\t\tcatch (FileNotFoundException ee){\n\t\t\tSystem.out.println(\"File \" + filename + \" not found.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File \" + filename + \" cannot be read.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "private void createFile(String outputData, File file) {\n try {\n FileWriter writer = new FileWriter(file);\n writer.write(outputData);\n writer.close();\n } catch (IOException e) {\n e.getSuppressed();\n }\n }", "public static void textFile() throws IOException\n \t{ \n \t// Initialize the list\n \tArrayList<String[]> list = new ArrayList<String[]>();\n \t// Calling to random string generated by the randGenerator function! \n \tlist.add(new String[] {Datatostring});\n \t\t // File writer\n \tFileWriter Datawriter = new FileWriter(\"NumOUTPUT.txt\",true); // by adding true at the end is save to text file without overwriting older data\n \t\n \t\n \t// For loop for list data\n \tfor(String[] arr: list)\n \t{\n \t\tString appender = \"\";\n \t\tfor(String s : arr)\n \t\t{\n \t\tDatawriter.write(appender + s);\n \t\t\tappender = \",\";\n \t\t}\n \t\tDatawriter.flush();\n \t}\n \tDatawriter.close();\n }", "public void WriteElementString(String nombreElemento, String valorElemento) throws IOException {\r\n\tCerrarElemento();\r\n\tbw.write(\"<\" + nombreElemento + \">\" + Escapar(valorElemento) + \"</\" + nombreElemento + \">\");\r\n }", "public static void write(String fileName, List data) throws IOException {\n PrintWriter out = new PrintWriter(new FileWriter(fileName));\n\n try {\n\t\tfor (int i =0; i < data.size() ; i++) {\n \t\tout.println((String)data.get(i));\n\t\t}\n }\n finally {\n out.close();\n }\n }", "private boolean writeToFile() {\n\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\n\t\ttry {\n\t\t\tString content = getAsXmlString();\n\n\t\t\tfw = new FileWriter(FILENAME + \"w\");\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\tbw.write(content);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (bw != null)\n\t\t\t\t\tbw.close();\n\n\t\t\t\tif (fw != null)\n\t\t\t\t\tfw.close();\n\n\t\t\t\treturn true;\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void write(StringBuilder result) {\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tfileWriter.write(result.toString());\r\n\t\t\t\tfileWriter.flush();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot write to file \"+this.myfilename+\" Logging the result at level INFO now. Cause: \"+e.getMessage());\r\n\t\t\t\tlogger.info(result.toString());\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlogger.info(result.toString());\r\n\t\t}\r\n\t}", "private void writeTextFile(\r\n\t\t\tGDMSMain theMainHomePage,\r\n\t\t\tArrayList<QtlDetailElement> listOfAllQTLDetails, HashMap<Integer, String> hmOfQtlPosition, HashMap<String, Integer> hmOfQtlNameId,\r\n\t\t\tHashMap<Integer, String> hmOfQtlIdandName, String strSelectedExportType, boolean bQTLExists) throws GDMSException {\n\t\t\r\n\t\t\r\n\t\tString strFlapjackTextFile = \"Flapjack\";\r\n\t\tFile baseDirectory = theMainHomePage.getMainWindow().getApplication().getContext().getBaseDirectory();\r\n\t\tFile absoluteFile = baseDirectory.getAbsoluteFile();\r\n\r\n\t\tFile[] listFiles = absoluteFile.listFiles();\r\n\t\tFile fileExport = baseDirectory;\r\n\t\tfor (File file : listFiles) {\r\n\t\t\tif(file.getAbsolutePath().endsWith(\"Flapjack\")) {\r\n\t\t\t\tfileExport = file;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString strFilePath = fileExport.getAbsolutePath();\r\n\t\t//System.out.println(\"strFilePath=:\"+strFilePath);\r\n\t\tgeneratedTextFile = new File(strFilePath + \"\\\\\" + strFlapjackTextFile + \".txt\");\r\n\r\n\t\t/**\twriting tab delimited qtl file for FlapJack \r\n\t\t * \tconsisting of marker chromosome & position\r\n\t\t * \r\n\t\t * **/\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t//factory = new ManagerFactory(GDMSModel.getGDMSModel().getLocalParams(), GDMSModel.getGDMSModel().getCentralParams());\r\n\t\t\tfactory=GDMSModel.getGDMSModel().getManagerFactory();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOntologyDataManager ontManager=factory.getOntologyDataManager();\r\n\t\t\t*/\r\n\t\t\tFileWriter flapjackTextWriter = new FileWriter(generatedTextFile);\r\n\t\t\tBufferedWriter flapjackBufferedWriter = new BufferedWriter(flapjackTextWriter);\r\n\t\t\t//getAllelicValuesByGidsAndMarkerNames\r\n\t\t\t//genoManager.getAlle\r\n\t\t\t//\t\t\t fjackQTL.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\");\r\n\t\t\tflapjackBufferedWriter.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\\teffect\");\r\n\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\tfor (int i = 0 ; i < listOfAllQTLDetails.size(); i++){\r\n\t\t\t\t//System.out.println(listOfAllQTLDetails.get(i));\r\n\t\t\t\tQtlDetailElement qtlDetails = listOfAllQTLDetails.get(i);\r\n\t\t\t\t\r\n\t\t\t\t/*QtlDetailsPK id = qtlDetails.getQtlName().get.getId();\r\n\t\t\t\tInteger qtlId = id.getQtlId();*/\r\n\t\t\t\t//String strQtlName = hmOfQtlIdandName.get(qtlId);\r\n\t\t\t\tString strQtlName =qtlDetails.getQtlName();\r\n\t\t\t\tint qtlId=hmOfQtlNameId.get(strQtlName);\r\n\t\t\t\t//qtlDetails.get\r\n\t\t\t\t//Float clen = qtlDetails.getClen();\r\n\t\t\t\t//Float fEffect = qtlDetails.getEffect();\r\n\t\t\t\tint fEffect = qtlDetails.getEffect();\r\n\t\t\t\tFloat fMaxPosition = qtlDetails.getMaxPosition();\r\n\t\t\t\tFloat fMinPosition = qtlDetails.getMinPosition();\r\n\t\t\t\t//Float fPosition = qtlDetails.getPosition();\r\n\t\t\t\tString fPosition = hmOfQtlPosition.get(qtlId);\r\n\t\t\t\tFloat frSquare = qtlDetails.getRSquare();\r\n\t\t\t\tFloat fScoreValue = qtlDetails.getScoreValue();\r\n\t\t\t\tString strExperiment = qtlDetails.getExperiment();\r\n\t\t\t\t//String strHvAllele = qtlDetails..getHvAllele();\r\n\t\t\t\t//String strHvParent = qtlDetails.getHvParent();\r\n\t\t\t\t//String strInteractions = qtlDetails.getInteractions();\r\n\t\t\t\tString strLeftFlankingMarker = qtlDetails.getLeftFlankingMarker();\r\n\t\t\t\tString strLinkageGroup = qtlDetails.getChromosome();\r\n\t\t\t\t//String strLvAllele = qtlDetails.getLvAllele();\r\n\t\t\t\t//String strLvParent = qtlDetails.getLvParent();\r\n\t\t\t\tString strRightFM = qtlDetails.getRightFlankingMarker();\r\n\t\t\t\t//String strSeAdditive = qtlDetails.getSeAdditive();\r\n\t\t\t\t\r\n\t\t\t\t//String strTrait = qtlDetails.getTrait();\r\n\t\t\t\tString strTrait = qtlDetails.getTRName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(strQtlName + \"\\t\" + strLinkageGroup + \"\\t\" + fPosition + \"\\t\" + fMinPosition + \"\\t\" + fMaxPosition + \"\\t\" +\r\n\t\t\t\t\t\tstrTrait + \"\\t\" + strExperiment + \"\\t \\t\" + fScoreValue + \"\\t\" + frSquare+\r\n\t \"\\t\" + strLeftFlankingMarker+\"/\"+strRightFM + \"\\t\" + fEffect);\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tflapjackBufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new GDMSException(e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t}", "private void saveStringToFile(String s) {\n try {\n FileWriter saveData = new FileWriter(SAVE_FILE);\n BufferedWriter bW = new BufferedWriter(saveData);\n bW.write(s);\n bW.flush();\n bW.close();\n } catch (IOException noFile) {\n System.out.println(\"SaveFile not found.\");\n }\n }", "private static void saveIntoFile() throws IOException {\n\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\");\n\t\tString fileName = \"./ipmi.\" + format.format(new Date()) + \".log\";\n\n\t\tBasicConsumptionList file = new BasicConsumptionList();\n\t\tlogger.debug(\"file:\" + fileName);\n\t\tfile.setWriter(new FileWriter(fileName));\n\n\t\tSystem.err.println(ipmi.execute(Command.IPMI_SENSOR_LIST));\n\n\t\twhile (true) {\n\t\t\tDouble watts = ipmi.getWatt();\n\t\t\tfile.addData(System.currentTimeMillis(), watts);\n\t\t\tfile.commit();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlogger.trace(\"\", e);\n\t\t\t}\n\t\t}\n\t}", "public void save() {\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\t\ttry {\n\t\t\tFile file = new File(\"fileSave.txt\");\n\t\t\tif(!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tfw = new FileWriter(file);\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\t//string to hold text to write on new file\n\t\t\tString text = textArea.getText();\n\t\t\t//write file\n\t\t\tif (text != null) {\n\t\t\t\tbw.write(text);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (bw != null) {\n\t\t\t\t\tbw.close();\n\t\t\t\t\tfw.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException ie2) {\n\t\t\t\tie2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void saveDataToFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // path for new accounts after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // path for existing accounts after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void writeFile(){\n try{\n FileWriter writer = new FileWriter(\"Highscores.txt\");\n for (int i = 0; i<10; i++){\n if (i >= this.highscores.size()){\n break;\n }\n writer.write(String.valueOf(this.highscores.get(i)) + \"\\n\");\n }\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void writeToFileInventory() throws IOException {\n FileWriter write = new FileWriter(path, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = stock.get(i);\n String name = product.getProductName();\n String location = product.getLocation().getLocationInfo();\n int UPC = product.getUpc();\n int quantity = product.getQuantity();\n String cost = String.valueOf(product.price.getCost());\n String threshold = String.valueOf(product.getThreshold());\n String price = String.valueOf(product.price.getRegularPrice());\n String distributor = product.getDistributor();\n textLine =\n name + \",\" + location + \",\" + UPC + \",\" + quantity + \",\" + cost + \",\" + price + \",\" +\n threshold + \",\" + distributor;\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "private void toFile(OutputData data) {\n if(data == null) {\r\n JOptionPane.showMessageDialog(this, \"Dane wynikowe nie zostały jeszcze umieszczone w pamieci\");\r\n return;\r\n }\r\n\r\n // Sprawdzenie sciezki zapisu\r\n String filePath = this.outputFileSelector.getPath();\r\n if(filePath.length() <= 5) {\r\n JOptionPane.showMessageDialog(this, \"Nie można zapisać wyniku w wybranej lokacji!\");\r\n return;\r\n }\r\n\r\n // Zapisujemy plik na dysk\r\n try{\r\n PrintWriter writer = new PrintWriter(filePath, \"UTF-8\");\r\n OutputDataFormatter odf = new OutputDataFormatter(this.outputData);\r\n\r\n String userPattern = this.outputFormatPanel.getPattern();\r\n writer.write(odf.getParsedString(userPattern.length() < 2 ? defaultFormatting : userPattern));\r\n\r\n writer.close();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(this, \"Wystąpił błąd IO podczas zapisu.\");\r\n }\r\n\r\n }", "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line);\t\t\t// write the line out\n\t\ttheOutFile.newLine();\t\t\t\t// skip to the next line\t\t\n\t}", "static void writeFile(String path , String data) throws IOException{\n\t\tFileOutputStream fo = new FileOutputStream(path,true);\n\t\tfo.write(data.getBytes());\n\t\tfo.close();\n\t\tSystem.out.println(\"Done...\");\n\t}", "public void write(String plaintext)\n\t{\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(thisFile);\n\t\t\t//encoder?\n\t\t\twriter.write(words, 0, words.length);\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}" ]
[ "0.6255171", "0.6243989", "0.6219248", "0.6162265", "0.5988351", "0.59576267", "0.5902219", "0.5901193", "0.5838243", "0.5832974", "0.58220613", "0.5812234", "0.58063936", "0.5789654", "0.57819575", "0.577856", "0.57675457", "0.57471406", "0.57377523", "0.57334894", "0.571678", "0.56926423", "0.5682431", "0.567936", "0.5654259", "0.5645961", "0.5645761", "0.562928", "0.56128854", "0.56065184", "0.5601618", "0.5584445", "0.5577369", "0.55752516", "0.5573971", "0.55644125", "0.555533", "0.5549654", "0.5544514", "0.55362", "0.553574", "0.551005", "0.5504377", "0.54963535", "0.5484207", "0.5480531", "0.547819", "0.54770696", "0.5471686", "0.54709727", "0.54693675", "0.54684985", "0.5464438", "0.54624057", "0.54622877", "0.54535216", "0.5453404", "0.5451965", "0.54508644", "0.5432357", "0.54265636", "0.5424161", "0.5414394", "0.54094815", "0.5407755", "0.54062384", "0.5395988", "0.53897405", "0.5385629", "0.5384068", "0.5377663", "0.5368809", "0.536876", "0.53664094", "0.5366185", "0.53661364", "0.5364756", "0.5358947", "0.53581643", "0.53485453", "0.53480154", "0.53469795", "0.5346775", "0.5346206", "0.53440577", "0.5343572", "0.5339262", "0.5333307", "0.5329593", "0.5328279", "0.5326797", "0.5317152", "0.5316597", "0.53068054", "0.53042847", "0.53021234", "0.5301328", "0.5299648", "0.52977043", "0.5297273" ]
0.693814
0
/ check all checkBoxSelection method capturing them by common tagName
public void TermsAndConditionsclickAllCheckBoxes(String tagname, String attribute, String text) { List<WebElement> list = driver.findElements(By.tagName(tagname)); int size = list.size(); for (int i = 0; i < size; i++) { list.get(i).getText(); } for (WebElement webElement : list) { if (webElement.getAttribute(attribute).equals(text)) { base.jSClick(webElement); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }", "public void chk_element(WebDriver driver,String[] selObj, String cusObj){\n\t\t\tfor (int K = 0; K < selObj.length; K++) {\r\n\t\t\t\tWebElement elem = cmf.checkBox(cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\tdriver);\r\n\t\t\t\tif (!elem.isDisplayed()){\r\n\t\t\t\t\t((JavascriptExecutor) driver).executeScript(\r\n\t\t\t \"arguments[0].scrollIntoView();\", elem);\r\n\t\t\t\t}\r\n\t\t\t\tif (elem.getAttribute(\"checked\") == null) {\r\n\t\t\t\t\tcmf.clkElement(driver, cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\t\tselObj[K], extent, test);\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\ttest.log(LogStatus.PASS, \"Region\", \"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\tcmf.sleep(500);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"Element \" + EndUser.custom_region_obj + \"'\" + selObj[K]\r\n\t\t\t\t\t\t\t+ \"']\" + \" already checked\");\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t\ttest.log(LogStatus.INFO, \"Region\",\r\n\t\t\t\t\t\t\t\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "@Step(\"Select and assert checkboxes\")\n public void selectCheckBox() {\n //http://selenide.org/javadoc/3.5/com/codeborne/selenide/SelenideElement.html\n $(\"label:contains('Water')\").scrollTo();\n $(\"label:contains('Water')\").setSelected(true);\n $(\".label-checkbox:contains('Water') input\").shouldBe(checked);\n logList.add(CHECKBOX1.toString());\n $(\".label-checkbox:contains('Wind')\").scrollTo();\n $(\".label-checkbox:contains('Wind')\").setSelected(true);\n $(\".label-checkbox:contains('Wind') input\").shouldBe(checked);\n logList.add(CHECKBOX2.toString());\n }", "public abstract boolean isSelected();", "boolean isSelected();", "boolean isSelected();", "boolean isSelected();", "private boolean[] getCheckBoxes() {\n\t\tHBox n4 = (HBox) uicontrols.getChildren().get(4);\n\t\tCheckBox b1 = (CheckBox) n4.getChildren().get(0);\n\t\tCheckBox b2 = (CheckBox) n4.getChildren().get(1);\n\t\tCheckBox b3 = (CheckBox) n4.getChildren().get(2);\n\t\tCheckBox b4 = (CheckBox) n4.getChildren().get(3);\n\t\tboolean[] boxes = { b1.isSelected(),b2.isSelected(),b3.isSelected(),b4.isSelected()};\n\t\treturn boxes;\n\t}", "static interface ElementSelectionListener {\n \n public void selectionChanged(MultiViewDescription oldOne, MultiViewDescription newOne);\n \n public void selectionActivatedByButton(MouseEvent e);\n \n public void selectionActivatedByButton(ActionEvent e);\n \n }", "CheckBox getCk();", "public abstract boolean hasSelection();", "public void selectCheckBoxes(){\n fallSemCheckBox.setSelected(true);\n springSemCheckBox.setSelected(true);\n summerSemCheckBox.setSelected(true);\n allQtrCheckBox.setSelected(true);\n allMbaCheckBox.setSelected(true);\n allHalfCheckBox.setSelected(true);\n allCampusCheckBox.setSelected(true);\n allHolidayCheckBox.setSelected(true);\n fallSemCheckBox.setSelected(true);\n// allTraTrbCheckBox.setSelected(true);\n }", "public interface IsChecklist extends ISelector, HasAssert<ChecklistAssert>, HasStartIndex {\n void select(String name);\n void select(String... names);\n <TEnum extends Enum<?>> void select(TEnum value);\n <TEnum extends Enum<?>> void select(TEnum... values);\n void select(int index);\n void select(int... indexes);\n\n void check(String... names);\n <TEnum extends Enum<?>> void check(TEnum value);\n <TEnum extends Enum<?>> void check(TEnum... values);\n void check(int index);\n void check(int... indexes);\n\n void checkAll();\n\n void uncheck(String... names);\n <TEnum extends Enum<?>> void uncheck(TEnum value);\n <TEnum extends Enum<?>> void uncheck(TEnum... values);\n void uncheck(int index);\n void uncheck(int... indexes);\n void uncheckAll();\n\n List<String> checked();\n}", "@Override\n\t\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\t\t\tContainer element = (Container) viewHolder.ckBox.getTag();\n\t\t\t\t\t\telement.setSelected(buttonView.isChecked());\n\t\t\t\t\t}", "private void checkSelectable() {\n \t\tboolean oldIsSelectable = isSelectable;\n \t\tisSelectable = isSelectAllEnabled();\n \t\tif (oldIsSelectable != isSelectable) {\n \t\t\tfireEnablementChanged(SELECT_ALL);\n \t\t}\n \t}", "@Override\n\t\t\tpublic void checkbox_select_callBack(boolean ifCheck) {\n\t\t\t\tsuper.checkbox_select_callBack(ifCheck);\n\t\t\t\titemCallBack.call_select(ifCheck,position);\n\t\t\t}", "public boolean isSelected();", "public boolean isSelected();", "protected abstract boolean isEnabledForSelection(T1 object, Vector<T2> globalSelection);", "@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}", "@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}", "@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}", "private void IdentifyCBs()\r\n\t{\r\n\t\t// Create new list of the CB\r\n\t\tthis.CBlist = new ArrayList<CheckBox>(18);\r\n\t \r\n\t // Going through all of the linear layout children\t\t\r\n \t\tfor(int count = 0; count < layoutCB.getChildCount(); count ++) \r\n\t {\r\n\t\t // If the tag of the child is linear layout tagged \"tagsvertical\"\r\n\t\t if((layoutCB.getChildAt(count)).getTag().toString().equals(\"tagsvertical\"))\r\n\t\t {\r\n\t\t\t \t// get the vertical linear-layout of the checkboxes\r\n\t\t \t\tLinearLayout layoutCBvertical = ((LinearLayout) layoutCB.getChildAt(count));\r\n\t\t \r\n\t\t\t // getting all of its children\r\n\t\t\t for(int counter = 0; counter < layoutCBvertical.getChildCount(); counter ++) \r\n\t\t\t {\r\n\t\t\t\t if((layoutCBvertical.getChildAt(counter)).getTag().toString().equals(\"cb\"))\r\n\t\t\t\t {\r\n\t\t\t\t\t // Adding the CH to the list\r\n\t\t\t\t\t CBlist.add((CheckBox) layoutCBvertical.getChildAt(counter));\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t \t}\r\n\t }\r\n\t}", "@Override\r\n public void onClick(View view){\r\n int actualClicked = view.getId();\r\n\r\n for(SpecialPoint box: allCheckBoxes){\r\n int tempId = box.getCheckBox().getId();\r\n CheckBox currentBox = box.getCheckBox();\r\n\r\n if(tempId == actualClicked && currentBox.isChecked()){\r\n currentBox.setChecked(true);\r\n }else{\r\n currentBox.setChecked(false);\r\n }\r\n }\r\n }", "public VirtualCheckBox createCheckBox ();", "@Override \r\n public void onCheckedChanged(CompoundButton buttonView, \r\n boolean isChecked) {\n if(isChecked){ \r\n Log.d(TAG, \"Selected\");\r\n }else{ \r\n Log.d(TAG, \"NO Selected\");\r\n } \r\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n RowData data = (RowData) viewHolder.chkBox.getTag();\n if (isChecked) {\n\n checkBoxState.set(data.position, true);\n Log.i(tag, \"cursor.getPosition(true) with onChecked Listener : \" + data.position);\n }\n else {\n checkBoxState.set(data.position, false);\n Log.i(tag, \"cursor.getPosition(false) with onChecked Listener : \" + data.position);\n }\n }", "boolean applicable(Selection selection);", "@FXML\n private void handleCheckBoxAction(ActionEvent e)\n {\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n if (!checkBoxesHaveBeenClicked)\n {\n checkBoxesHaveBeenClicked = true;\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n }\n \n //ArrayList that will hold all the filtered events based on the selection of what terms are visible\n ArrayList<String> termsToFilter = new ArrayList();\n \n //Check each of the checkboxes and call the appropiate queries to\n //show only the events that belong to the term(s) the user selects\n \n //vaccance\n if (fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is selected\");\n termsToFilter.add(\"vaccance\");\n }\n \n if (!fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"vaccance\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n //travail\n if (springSemCheckBox.isSelected())\n {\n System.out.println(\"travail Sem checkbox is selected\");\n termsToFilter.add(\"travail\");\n }\n if (!springSemCheckBox.isSelected())\n {\n System.out.println(\"travail checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"travail\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //annivessaire\n if (summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is selected\");\n termsToFilter.add(\"annivessaire\");\n }\n if (!summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"annivessaire\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //formation\n if (allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is selected\");\n termsToFilter.add(\"formation\");\n }\n if (!allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"formation\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // certif\n if (allHalfCheckBox.isSelected())\n {\n System.out.println(\"certif checkbox is selected\");\n termsToFilter.add(\"certif\");\n }\n if (!allHalfCheckBox.isSelected())\n {\n System.out.println(\"importantcheckbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"certif\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // imporatnt\n if (allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is selected\");\n termsToFilter.add(\"\");\n }\n if (!allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"important\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n // urgent\n if (allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is selected\");\n termsToFilter.add(\"urgent\");\n }\n if (!allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"urgent\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n// // workshop\n if (allMbaCheckBox.isSelected())\n {\n System.out.println(\"Workshop checkbox is selected\");\n termsToFilter.add(\"workshop\");\n }\n if (!allMbaCheckBox.isSelected())\n {\n System.out.println(\"workshop checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"workshop\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n// \n// // All TRA/TRB\n// if (allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All TRA/TRB checkbox is selected\");\n// termsToFilter.add(\"TRA\");\n// termsToFilter.add(\"TRB\");\n// }\n// if (!allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All Holiday checkbox is now deselected\");\n// int auxIndex = termsToFilter.indexOf(\"TRA\");\n// int auxIndex2 = termsToFilter.indexOf(\"TRB\");\n// if (auxIndex != -1)\n// {\n// termsToFilter.remove(auxIndex);\n// }\n// if (auxIndex2 != -1)\n// {\n// termsToFilter.remove(auxIndex2);\n// }\n// }\n// \n \n System.out.println(\"terms to filter list: \" + termsToFilter);\n \n //Get name of the current calendar that the user is working on\n String calName = Model.getInstance().calendar_name;\n \n System.out.println(\"and calendarName is: \" + calName);\n \n if (termsToFilter.isEmpty())\n {\n System.out.println(\"terms are not selected. No events have to appear on calendar. Just call loadCalendarLabels method in the RepaintView method\");\n selectAllCheckBox.setSelected(false);\n loadCalendarLabels();\n }\n else\n {\n System.out.println(\"Call the appropiate function to populate the month with the filtered events\");\n //Get List of Filtered Events and store all events in an ArrayList variable\n ArrayList<String> filteredEventsList = databaseHandler.getFilteredEvents(termsToFilter, calName);\n \n System.out.println(\"List of Filtered events is: \" + filteredEventsList);\n \n //Repaint or reload the events based on the selected terms\n showFilteredEventsInMonth(filteredEventsList);\n }\n \n \n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n checkBox_seleccionados[position] = holder.chkItem.isChecked();\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\selenium3\\\\\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://www.leafground.com/pages/checkbox.html\");\r\n\r\n\t\tWebElement java = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[1]/div[1]/input\"));\r\n\t\tjava.click();\r\n\t\t// verifiying the selected one \r\n\t\tWebElement seleniumButton = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[2]/div/input\"));\r\n\r\n\t\tboolean seleniumSelected = seleniumButton.isSelected();\r\n\r\n\t\tSystem.out.println(seleniumSelected);\r\n\r\n\t\t// de select the selected one\r\n\t\tWebElement firstelement = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[3]/div[1]/input\"));\r\n\r\n\t\tif(firstelement.isSelected())\r\n\t\t{\r\n\t\t\tfirstelement.click();\r\n\t\t}\r\n\r\n\t\tWebElement secoundElement = driver.findElement(By.xpath(\"//*[@id=\\\"contentblock\\\"]/section/div[3]/div[2]/input\"));\r\n\r\n\t\tif(secoundElement.isSelected())\r\n\t\t{\r\n\t\t\tsecoundElement.click();\r\n\t\t}\r\n\r\n\t}", "public void selectAllCheckBox(){\r\n\t\tfor (WebElement cbox : checkbox) {\r\n\t\t\tif(!cbox.isSelected()){\r\n\t\t\t\tcbox.click();\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}", "public boolean isSelectionListener() {\n return true;\n }", "public boolean getSelection () {\r\n\tcheckWidget();\r\n\tif ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;\r\n\treturn (OS.PtWidgetFlags (handle) & OS.Pt_SET) != 0;\r\n}", "public boolean isSelectionChanged();", "public static WebElement chkbx_selectMultipleVerPdt() throws Exception{\r\n \ttry{\r\n \t\t// UI changed on Date 25-Sep-2015\r\n\t\t//\tdriver.findElement(By.xpath(\"(//*[contains(@class, 'majorPP_check')]//input[@type='checkbox'])[position()=1]\")).click();\r\n\t\t//\tdriver.findElement(By.xpath(\"(//*[contains(@class, 'majorPP_check')]//input[@type='checkbox'])[last()]\")).click();\r\n\t\t\t\r\n\t\t\t// Select all chkbx those are odd number \r\n\t\t\tList<WebElement> chkbx = driver.findElements(\r\n\t\t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\"));\r\n\t\t\tfor(int i=1; i<chkbx.size(); i=i+2){\r\n\t\t\t\tchkbx.get(i).click();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint checkedCount = 0;\r\n\t\t\tfor(int i=0; i<chkbx.size(); i++){\r\n\t\t\t\tif(chkbx.get(i).isSelected()){\r\n\t\t\t\t\tcheckedCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAdd_Log.info(\"Number of selected chkbx ::\" + checkedCount);\r\n\t\t\tAdd_Log.info(\"User select multiple verified product checkboxes.\");\r\n\t\t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Verified Product checkbox are NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\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//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}", "public interface ICheckBoxPainter<E extends JCheckBox, U extends WebCheckBoxUI> extends IAbstractStateButtonPainter<E, U>\n{\n}", "private void UpdateChecboxes()\r\n\t{\n\t\tfor (Iterator<CheckBox> iterator = this.CBlist.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\t// for the next CheckBox\r\n\t\t\tCheckBox currChBox = iterator.next();\r\n\t\t\t\r\n\t\t\t// if the matching tag is true - \r\n\t\t\tif (this.hmTags.get(currChBox.getText()) == true)\r\n\t\t\t{\r\n\t\t\t\t// Check it\r\n\t\t\t\tcurrChBox.setChecked(true);\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private void addHandlersToCheckBox() {\n\t\tmyMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tallMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmyLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tallLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onClick(View v) {\n position = (Integer) v.getTag(R.id.tag_position);\n id= (Long) v.getTag(R.id.tag_id);\n ((CheckBox)v).setChecked(!((CheckBox)v).isChecked());\n onCheckBoxClick(v, position, id);\n }", "@Override\n public void onClick(View v) {\n filteredNewsgroupItems.get(fPosition).setSelected(((CheckBox)v).isChecked());\n }", "@Override\n\tpublic void onClick(ClickEvent event) {\n\t\tif (event.getSource() == select) {\n\t\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\t\tif (cb == null) {Window.alert(\"select \" + row);}\n\t\t\t\tcb.setValue(true);\n\t\t\t}\n\t\t}\n\t\telse if (event.getSource() == remove) {\n\t\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\t\tif (cb == null) {Window.alert(\"remove \" + row);}\n\t\t\t\tcb.setValue(false);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse if (isEnabled()) {\n\t\t\tHTMLTable.Cell cell = field.getCellForEvent(event);\n\t\t\tint selectedRow = cell.getRowIndex();\n\t\t\tCheckBox cb = (CheckBox) field.getWidget(selectedRow, 2);\n\t\t\tcb.setValue (!cb.getValue());\n\t\t\tfireChange(this);\n\t\t}\n\t}", "public TestCheckboxTag1(String theName) {\n super(theName);\n }", "final void initializeCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"initializeCheckBoxes\");\r\n\r\n this.chkMsdtSelection = new HashMap < MicroSensorDataType, JCheckBox >();\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n\t\t\t\tthis.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n false));\r\n } else {\r\n this.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n true));\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"initializeCheckBoxes\");\r\n }", "@Test(priority = 15)\n public void unselectCheckboxesTest() {\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\")).click();\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\")).click();\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\"))\n .isSelected());\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\"))\n .isSelected());\n }", "@Override\n public boolean handleClick(ContentElement element, EditorEvent event) {\n boolean isImplChecked = getImplAsInputElement(element).isChecked();\n boolean isContentChecked =\n \"true\".equalsIgnoreCase(element.getAttribute(CheckConstants.VALUE));\n if (isImplChecked && !isContentChecked) {\n // Now tell group to check this button\n ContentElement group = getGroup(element);\n if (group != null) {\n RadioGroup.check(group, element);\n }\n }\n event.allowBrowserDefault();\n return true;\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n\n\n\n }", "@Test\n public void byAttributesAndStylesTest() throws Exception {\n /* Navigate to the Checkboxes section */\n driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/ul/li[5]/a\")).click();\n\n /* Using the standard devtools */\n WebElement checkedCheckboxByTagName;\n ArrayList<WebElement> checkboxesByTagName = new ArrayList<>();\n checkboxesByTagName.addAll(driver.findElements(By.tagName(\"input\")));\n Iterator<WebElement> it = checkboxesByTagName.iterator();\n while (it.hasNext()){\n checkedCheckboxByTagName = it.next();\n if(checkedCheckboxByTagName.getAttribute(\"checked\") == null){\n checkedCheckboxByTagName = null;\n }\n }\n\n /* Using the selenium OIC and the by attribute locator */\n WebElement checkedCheckboxByAttributes = driver.findElement(By.attribute(\"checked\", \"\"));\n\n /* This test demonstrates the byAttribute locator power :\n * It obviously add another way to locate elements\n * Enhance readability of code\n * Enhance dev-tester efficiency : find directly the item that has the correct attribute VS find all item and then implement a treatment to find the good one\n * */\n }", "private void selectCheckBox(CheckBox checkBox, String cbText[]) {\n checkBox.setSelected(false);\n for (int i = 0; i < cbText.length; i++) {\n if (checkBox.getText().equals(cbText[i])) {\n checkBox.setSelected(true);\n }\n }\n }", "private void checkCheckboxes(Order orderToLoad) {\n Map<String, CheckBox> checkBoxes = new TreeMap<>(){{\n put(\"PNEU\",pneuCB);\n put(\"OIL\",oilCB);\n put(\"BATTERY\",batCB);\n put(\"AC\",acCB);\n put(\"WIPER\",wipCB);\n put(\"COMPLETE\",comCB);\n put(\"GEOMETRY\",geoCB);\n }};\n for (String problem : orderToLoad.getProblems()) {\n if (checkBoxes.containsKey(problem)){\n checkBoxes.get(problem).setSelected(true);\n }\n }\n }", "private ArrayList<String> getCheckboxes() {\n ArrayList<CheckBox> checkBoxes = new ArrayList<>();\n String[] names = {\"PNEU\",\"OIL\",\"BATTERY\",\"AC\",\"WIPER\",\"COMPLETE\",\"GEOMETRY\"}; //LINK NA DB ?\n checkBoxes.addAll(Arrays.asList(pneuCB, oilCB, batCB, acCB, wipCB, comCB, geoCB));\n ArrayList<String> result = new ArrayList<>();\n for (int i = 0; i < checkBoxes.size(); i++) {\n if(checkBoxes.get(i).isSelected()){\n result.add(names[i]);\n }\n }\n return result;\n }", "@Override\n public void onClick(View buttonView) {\n {\n String tgName = (buttonView.getTag(R.string.TOGGLE_GROUP) != null?\n (String)buttonView.getTag(R.string.TOGGLE_GROUP):\n \"\");\n for(CheckBox b: getCheckBoxes()) {\n if (b == buttonView) {\n updateJSON((String)b.getTag(R.string.JSON_ITEM_INDEX), b.getTag(R.string.JSON_OBJECT), b.isChecked());\n continue;\n }\n if (b.getTag(R.string.TOGGLE_GROUP) != null) {\n String btgName = (String) b.getTag(R.string.TOGGLE_GROUP);\n if (tgName.equalsIgnoreCase(btgName)) {\n if (b.isChecked()) {\n updateJSON((String)b.getTag(R.string.JSON_ITEM_INDEX), b.getTag(R.string.JSON_OBJECT), false);\n }\n b.setChecked(false);\n }\n }\n }\n }\n if (!canSelect((CompoundButton)buttonView)) {\n Toast.makeText(\n getContext(),\n \"Limited to [\" + max_select + \"] items.\",\n Toast.LENGTH_SHORT)\n .show();\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\e3027405\\\\Downloads\\\\chromedriver.exe\");\r\n\t\t//Open Chrome Browser\r\n\t\tWebDriver Object=new ChromeDriver();\r\n\t\t//Get URL\r\n\t\tObject.get(\"http://www.leafground.com/pages/checkbox.html\");\r\n\t\t\r\n\t\t//checkbox selection-multiselect\r\n\t\t WebElement checkbox1=Object.findElement(By.xpath(\"//*[@id=\\'contentblock\\']/section/div[1]/input[1]\"));\r\n\t\t checkbox1.click();\r\n\t\t WebElement checkbox2=Object.findElement(By.xpath(\"//*[@id=\\'contentblock\\']/section/div[1]/input[2]\"));\r\n\t\t checkbox2.click();\r\n\t\t \r\n\t\t //verify the checkbox is selected\r\n\t\t \r\n\t\t WebElement is_selected=Object.findElement(By.xpath(\"//*[@id=\\'contentblock\\']/section/div[2]/input\"));\r\n\t\t boolean status=is_selected.isSelected();\r\n\t\t System.out.println(status);\r\n\r\n //deselect if select or vice versa\r\n\t\t \r\n\t\t WebElement firstcheckbox=Object.findElement(By.xpath(\"//*[@id=\\'contentblock\\']/section/div[3]/input[1]\"));\r\n\t\t if(firstcheckbox.isSelected()) {\r\n\t\t\t firstcheckbox.click();\r\n\t\t }else {\r\n\t\t\t firstcheckbox.click();\r\n\t\t }\r\n\t\t \r\n\t\t WebElement secondcheckbox=Object.findElement(By.xpath(\"//*[@id=\\'contentblock\\']/section/div[3]/input[2]\"));\r\n\t\t if(secondcheckbox.isSelected()) {\r\n\t\t\t secondcheckbox.click(); \r\n\t\t }\r\n\t\t else {\r\n\t\t\t secondcheckbox.click(); \r\n\t\t \r\n\t\t }\r\n\t\t \r\n\t\t Object.close();\r\n\t\t \r\n\t}", "@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n }", "private void checkSelection() {\n \t\tboolean oldIsSelection = isSelection;\n \t\tisSelection = text.getSelectionCount() > 0;\n \t\tif (oldIsSelection != isSelection) {\n \t\t\tfireEnablementChanged(COPY);\n \t\t\tfireEnablementChanged(CUT);\n \t\t}\n \t}", "boolean hasStablesSelected();", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }", "@Override\r\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\t\tboolean isChecked) {\n\t\t\t\t\tObject tag = check.getTag();\r\n\r\n\t\t\t\t\tif (isChecked) {\r\n\t\t\t\t\t\t// perform logic\r\n\t\t\t\t\t\tif (!(checkedpositions.contains(tag))) {\r\n\t\t\t\t\t\t\tcheckedpositions.add((Integer) tag);\r\n\t\t\t\t\t\t\tLog.d(\"Checkbox\", \"added \" + tag);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tcheckedpositions.remove(tag);\r\n\t\t\t\t\t\tLog.d(\"Checkbox\", \"removed \" + (Integer) tag);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "CheckboxInfo getCheckboxInfo(int row);", "protected void setCheckedBoxes() {\n checkBoxIfInPreference(findViewById(R.id.concordiaShuttle));\n checkBoxIfInPreference(findViewById(R.id.elevators));\n checkBoxIfInPreference(findViewById(R.id.escalators));\n checkBoxIfInPreference(findViewById(R.id.stairs));\n checkBoxIfInPreference(findViewById(R.id.accessibilityInfo));\n checkBoxIfInPreference(findViewById(R.id.stepFreeTrips));\n }", "public void select() {\n checkboxElement.click();\n }", "public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.checkbox_termos:\n if (checked) {\n termosAceitos = true;\n }else {\n termosAceitos = false;\n }\n break;\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcheckboxsActionPerformed(evt);\n\t\t\t}", "@Test\n public void byTypeTest() throws Exception {\n /* Navigate to the Checkboxes section */\n driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/ul/li[5]/a\")).click();\n\n /* Using the standard devtools */\n ArrayList<WebElement> checkboxesByTagName = new ArrayList<>();\n checkboxesByTagName.addAll(driver.findElements(By.tagName(\"input\")));\n\n\n /* Using the selenium OIC and the by type locator */\n ArrayList<WebElement> checkboxesByType = new ArrayList<>();\n checkboxesByType.addAll(driver.findElements(By.type(\"checkbox\")));\n\n\n /* Display check list */\n checkboxesByTagName.forEach(c -> System.out.println(\" is checked : \" + c.getAttribute(\"checked\")));\n checkboxesByType.forEach(c -> System.out.println(\" is checked : \" + c.getAttribute(\"checked\")));\n\n /* This test demonstrates the byType locator power :\n * It obviously add another way to locate elements\n * Enhance maintainability of code : What if a username field is added <input type=\"text\"> ? --> the test will be broken !\n * */\n }", "public interface CheckedListener {\n void onChecked(View v, boolean checked);\n}", "public interface ISelector {\n void checkAll(boolean isAdd);\n\n boolean iteratorAllValue();\n\n public interface CheckListener {\n void onCheck();\n }\n}", "public boolean canHandle(Object selection);", "public abstract boolean isIndexSelected(int i);", "void onCheckedTriStateChanged(TriStateCheckBox triStateCheckBox, State state);", "public boolean isSelected(){\r\n return selected;\r\n }", "public static WebElement chkbx_selectAllVerPdt() throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> chkbxVerPdt = driver.findElements(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\"));\r\n \t\tfor(WebElement chkbx : chkbxVerPdt){\r\n \t\t\tif(!chkbx.isSelected())\r\n \t\t\t\tchkbx.click();\r\n \t\t\t\r\n \t\t}\r\n \t\tAdd_Log.info(\"All Verified Products checkboxes are selected on the page.\");\r\n \t\t\r\n \t/*\tList<WebElement> chkbx1 = driver.findElements(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox' ]\"));\r\n \t\tint chkbxCount = chkbx1.size();\r\n \t\tAdd_Log.info(\"Total chkbx ::\" + chkbxCount);\t*/\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Verified Products checkboxes are NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void addMySelectionListener(EventListener l);", "@Override\n \t\t\tpublic void checkStateChanged(CheckStateChangedEvent event) {\n \t\t\t\tEntityDefinition eventSource = (EntityDefinition) event.getElement();\n \t\t\t\tif (event.getChecked())\n \t\t\t\t\tselection.add(eventSource);\n \t\t\t\telse\n \t\t\t\t\tselection.remove(eventSource);\n \t\t\t}", "public boolean isMultiSelection()\n\t{\n\t\treturn this.isMultiple();\n\t}", "@FXML\n private void selectAllCheckBoxes(ActionEvent e)\n {\n if (selectAllCheckBox.isSelected())\n {\n selectCheckBoxes();\n }\n else\n {\n unSelectCheckBoxes();\n }\n \n handleCheckBoxAction(new ActionEvent());\n }", "public static WebElement check_PACatfishBanner_AllCatChkbxSelected(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> els = driver.findElements(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'catfishPAList')]//input\")) ;\r\n \t\tfor(WebElement chkbx : els){\r\n \t\t\tif(chkbx.isSelected()){\r\n \t\t\t\tAdd_Log.info(\"All the categories checkboxes in PA Catfish Banner section are selected\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_2ND_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_PASS);\r\n \t\t\t}else{\r\n \t\t\t\tAdd_Log.info(\"All the categories checkboxes in PA Catfish Banner section are NOT selected\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_2ND_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\t\ttestFail.set(0, true);\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t/*\tBoolean isChkbxSelected = driver.findElement(By.xpath(\"//*[@id='catfishAd']//input\")).isSelected();\r\n \t\tAdd_Log.info(\"Is all the categories checkboxes selected ::\" + isChkbxSelected);\r\n \t\t\r\n \t\tif(isChkbxSelected == true){\r\n \t\t\tAdd_Log.info(\"All categories checkboxes in PA Catfish Banner section are selected.\");\r\n \t\t//\tSuiteUtility.WriteResultUtility(\r\n \t\t//\t\t\txls, sheetName, Constant.COL_ALL_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"All categories checkboxes in PA Catfish Banner section are NOT selected.\");\r\n \t\t//\tSuiteUtility.WriteResultUtility(\r\n \t\t//\t\t\txls, sheetName, Constant.COL_ALL_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\t*/\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public boolean isSelected() { return selected; }", "final void refreshCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"refreshCheckBoxes\");\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n this.chkMsdtSelection.get(msdt).setSelected(false);\r\n } else {\r\n this.chkMsdtSelection.get(msdt).setSelected(true);\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"refreshCheckBoxes\");\r\n }", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "public interface OnCheckListener {\r\n\t\t\r\n\t\tvoid onChecked(View v);\r\n\r\n\t}", "protected void checkBox(int slice, int row, int column, int depth, int height, int width) {\n\tif (slice<0 || depth<0 || slice+depth>slices || row<0 || height<0 || row+height>rows || column<0 || width<0 || column+width>columns) throw new IndexOutOfBoundsException(toStringShort()+\", slice:\"+slice+\", row:\"+row+\" ,column:\"+column+\", depth:\"+depth+\" ,height:\"+height+\", width:\"+width);\n}", "public void itemStateChanged(ItemEvent ie) {\n JCheckBox check = (JCheckBox)ie.getSource();\n cb_selection = check.getText(); \n }", "org.apache.xmlbeans.XmlBoolean xgetBox();", "public String checkAllCheckBox(String object, String data) throws InterruptedException {\n\t logger.debug(\"inside 'CheckAllCheckBox' method\");\n\n\t try {\n\n\n\t List<WebElement> all_checkbox = explictWaitForElementList(object);\n\t \n\t if (all_checkbox.size() == 0) {\n\t return Constants.KEYWORD_FAIL + \" no checkbox found\";\n\t }\n\t \n\t for(int i=1;i<=all_checkbox.size();i++)\n\t //for (WebElement checkbox : all_checkbox)\n\t {\n\t \n\t Thread.sleep(2000);\n\t \n\t boolean checked = all_checkbox.get(i-1).isSelected();\n\t if (!checked)\n\t {\n\t String xpathVal=all_checkbox.get(i-1).toString();\n\t if(!xpathVal.contains(Constants.INPUT_NX)){\n\t \n\t if(xpathVal.endsWith(Constants.LABEL_X) || xpathVal.endsWith(Constants.DIV_X) || xpathVal.endsWith(Constants.DIV_CLASS_X) || xpathVal.contains(Constants.LABEL_C_X) || xpathVal.contains(Constants.LABEL_C_X))\n\t { \n\t WebElement ele2 = driver.findElement(By.xpath(\"(\"+OR.getProperty(object)+\")\"+\"[position()=\"+i+\"]\"));\n\t JavascriptExecutor executor = (JavascriptExecutor) driver; // if Xpath is made using label, div as last nodes.\n\t executor.executeScript(\"arguments[0].scrollIntoView(true);\", ele2);\n\n\t executor.executeScript(\"arguments[0].click();\", ele2);\n\t }\n\t }\n\t else{ \n\t WebElement ele1 = driver.findElement(By.xpath(\"(\"+OR.getProperty(object)+\")\"+\"[position()=\"+i+\"]\"+\"/following-sibling::*\")); // if Xpath is made using input as last nodes.\n\t if(ele1.getTagName().equals(Constants.LABEL)){\n\t JavascriptExecutor executor = (JavascriptExecutor) driver;\n\t executor.executeScript(\"arguments[0].scrollIntoView(true);\", ele1);\n\t executor.executeScript(\"arguments[0].click();\", ele1);\n\t } \n\t }\n\t }\n\t \n\t else\n\t continue;\n\t }\n\n\t }\n\t catch(TimeoutException ex)\n\t \n\t {\n\t return Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t }\n\t catch (Exception e) {\n\t \n\t return Constants.KEYWORD_FAIL + e.getMessage();\n\n\t }\n\t return Constants.KEYWORD_PASS + \" checkboxes have been checked\";\n\t }", "public void checkTwoBox(View view) {\n CheckBox firstcheck = (CheckBox) findViewById(R.id.optionQ3_1);\n CheckBox secondcheck = (CheckBox) findViewById(R.id.optionQ3_2);\n CheckBox thirdcheck = (CheckBox) findViewById(R.id.optionQ3_3);\n\n if (firstcheck.isChecked() && secondcheck.isChecked()) {\n thirdcheck.setChecked(false);\n }\n if (thirdcheck.isChecked() && secondcheck.isChecked()) {\n firstcheck.setChecked(false);\n }\n if (thirdcheck.isChecked() && firstcheck.isChecked()) {\n secondcheck.setChecked(false);\n }\n }", "public Boolean isMultipleSelection() {\n return m_multipleSelection;\n }", "protected boolean selectionAccept(Node[] nodes) {\n return true;\n }", "@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }", "@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }", "public Object getCheckedValue();", "public final AntlrDatatypeRuleToken ruleSelectAllCheckboxes() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2109:28: (kw= 'selectAllCheckBoxes' )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2111:2: kw= 'selectAllCheckBoxes'\n {\n kw=(Token)match(input,48,FOLLOW_48_in_ruleSelectAllCheckboxes4242); \n\n current.merge(kw);\n newLeafNode(kw, grammarAccess.getSelectAllCheckboxesAccess().getSelectAllCheckBoxesKeyword()); \n \n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}", "@Override\n protected void listenToUi(UiWatcher watcher) {\n Logger.debug(\"Listening to the checkbox\");\n watcher.listenTo(theCheckBox);\n }", "@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }", "public interface OnCheckedListener {\n void onCheck(boolean isChecked);\n}", "@Override\r\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\r\n String filter = buttonView.getText().toString();\r\n\r\n if (isChecked) {\r\n if (!_filterSelection.contains(filter))\r\n _filterSelection.add(filter);\r\n } else {\r\n int idx = _filterSelection.indexOf(filter);\r\n if (idx > -1)\r\n _filterSelection.remove(idx);\r\n }\r\n }", "public boolean isSelected() {\n/* 3021 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void enableCheckBoxes(){\n fallSemCheckBox.setDisable(false);\n springSemCheckBox.setDisable(false);\n summerSemCheckBox.setDisable(false);\n allQtrCheckBox.setDisable(false);\n allMbaCheckBox.setDisable(false);\n allHalfCheckBox.setDisable(false);\n allCampusCheckBox.setDisable(false);\n allHolidayCheckBox.setDisable(false);\n fallSemCheckBox.setDisable(false);\n// allTraTrbCheckBox.setDisable(false);\n selectAllCheckBox.setDisable(false);\n //Set selection for select all check box to true\n selectAllCheckBox.setSelected(true);\n }", "public boolean isSelected() { \n \treturn selection != null; \n }" ]
[ "0.6129989", "0.60514057", "0.599936", "0.5966948", "0.59621394", "0.59621394", "0.59621394", "0.5954136", "0.5947226", "0.5932173", "0.59053016", "0.5901209", "0.5846942", "0.58276117", "0.58197975", "0.57402265", "0.5733998", "0.5733998", "0.57252586", "0.5704746", "0.5704746", "0.5704746", "0.5665693", "0.5619113", "0.56171423", "0.56138283", "0.5613648", "0.56007046", "0.5585316", "0.5565321", "0.5555758", "0.555547", "0.55413866", "0.5515415", "0.5504929", "0.5478501", "0.54714525", "0.5450473", "0.5429238", "0.5419241", "0.5410442", "0.5393131", "0.53784335", "0.5372564", "0.53696287", "0.53447837", "0.5341305", "0.5338091", "0.5337605", "0.5335382", "0.53345686", "0.53320247", "0.5331671", "0.5326004", "0.53211224", "0.531412", "0.53042907", "0.53031313", "0.53019387", "0.5296235", "0.5293665", "0.5293377", "0.52875334", "0.52862835", "0.5279853", "0.52791566", "0.5275919", "0.5270164", "0.5269996", "0.5268613", "0.52440757", "0.5239255", "0.52355313", "0.5231096", "0.5223821", "0.5219647", "0.52143496", "0.5213082", "0.52115715", "0.52106947", "0.52063435", "0.52062035", "0.5204405", "0.51967597", "0.5196473", "0.51911974", "0.5179276", "0.5178567", "0.51712984", "0.51606816", "0.5159546", "0.51534957", "0.5153208", "0.51431954", "0.5133667", "0.5129807", "0.51278347", "0.51249254", "0.51215744", "0.51202834" ]
0.5240104
71
/ File Reader Method read data from .txt
public static String getStoredString(String filePath, int chars) throws IOException { File f1 = new File(filePath); FileReader fr = new FileReader(f1); char[] chras = new char[chars]; fr.read(chras); String s = new String(chras); System.out.println("The stored String is : " + s); fr.close(); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}", "public void readFile();", "public void readTextFile(String path) throws IOException {\n FileReader fileReader=new FileReader(path);\n BufferedReader bufferedReader=new BufferedReader(fileReader);\n String value=null;\n while((value=bufferedReader.readLine())!=null){\n System.out.println(value);\n }\n }", "public void readFromFile() {\n\n\t}", "String readText(FsPath path);", "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}", "public static void reading(String fileName)\n {\n\n }", "@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}", "public List<String> readFileContents(String filePath) throws APIException;", "@Override\n public void readDataFromTxtFile()\n throws NumberFormatException, DepartmentCreationException, EmployeeCreationException {\n\n }", "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 }", "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 String readFile(){\r\n StringBuffer str = new StringBuffer(); //StringBuffer is a mutable string\r\n Charset charset = Charset.forName(\"UTF-8\"); //UTF-8 character encoding\r\n Path file = Paths.get(filename + \".txt\");\r\n try (BufferedReader reader = Files.newBufferedReader(file, charset)) { // Buffer: a memory area that buffered streams read\r\n String line = null;\r\n while ((line = reader.readLine()) != null) { //Readers and writers are on top of streams and converts bytes to characters and back, using a character encoding\r\n str.append(line + \"\\n\");\r\n }\r\n }\r\n catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n return str.toString();\r\n }", "private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}", "private Object[] fetchTextFile(String filePathString){\n try (Stream<String> stream = Files.lines(Paths.get(filePathString))) {\n return stream.toArray();\n }\n catch (IOException ioe){\n System.out.println(\"Could not find file at \" + filePathString);\n return null;\n }\n\n }", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "public String readFromFile(String filePath){\n String fileData = \"\";\n try{\n File myFile = new File(filePath);\n Scanner myReader = new Scanner(myFile);\n while (myReader.hasNextLine()){\n String data = myReader.nextLine();\n fileData += data+\"\\n\";\n }\n myReader.close();\n } catch(FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n return fileData;\n }", "public String[] getFile() throws IOException {\n\t\n\t\n\ttry {\n\tFileReader reader = new FileReader(path);\n\tBufferedReader textReader = new BufferedReader(reader); // creates buffered file reader again\n\t\n\tint numberOfLines = getLines(); // calls the method above to know how many lines there are\n\tString[ ] textData = new String[numberOfLines]; //creates an array the size of the amount of lines the file has\n\t\n\tfor (int i=0; i < numberOfLines; i++) {\n\t\ttextData[ i ] = textReader.readLine(); // go through file and read each line into its own array space\n\t\t}\n\t\n\ttextReader.close( ); //reader is done\n\treturn textData; // return array\n\t} catch (IOException e) {\n\t\tString[] exceptionString = new String[1];\n\t\texceptionString[0] = \"nothing\";\n\t\treturn exceptionString;\n\t}\n}", "List readFile(String pathToFile);", "private void ReadFile(String fileName){\n\t\tFileInputStream FIS \t= null;\n\t\tBufferedInputStream BIS = null;\n\t\tDataInputStream DIS \t= null;\n\t\tFile file \t\t\t\t= null;\n\t\t//content stores the files content, each line being separated by a '@'\n\t\tfile \t\t = new File(fileName);\n\t\t\n\t\tString content = \"\";\n\t\tString [] splitContent = new String [2];\n\t\t\n\t\ttry{\n\t\t\t//Setup Input Streams\n\t\t\tFIS = new FileInputStream(file);\n\t\t BIS = new BufferedInputStream(FIS);\n\t\t DIS = new DataInputStream(BIS);\n\t\t\t\n\t\t //do the following while the file contains more lines of text\n\t\t while (DIS.available() != 0){\n\t\t \t//read a line of text\n\t\t\t content = DIS.readLine();\n\t\t\t //confirm that the line is of the correct format\n\t\t\t if (content.contains(\"> \")){\n\t\t\t \t//split the line into the user and a list of who they follow\n\t\t\t \tsplitContent = content.split(\"> \");\n\t\t\t \t//create the tweet\n\t\t\t \tif (splitContent[1].length() > 140) throw new IllegalArgumentException(\"Tweet length is too large ( > 140 characters\");\n\t\t\t \tTweet tweet = new Tweet(new User(splitContent[0]), splitContent[1]);\n\t\t\t \ttweets.add(tweet);\n\t\t\t }else{\n\t\t\t \tSystem.out.println(\"ERROR - USER FILE IS NOT OF CORRECT FORMAT\");\n\t\t\t }\n\t\t }\n\t\t // dispose stream resources;\n\t\t FIS.close();\n\t\t BIS.close();\n\t\t DIS.close();\t\t \n\t } catch (FileNotFoundException e) {\n\t \te.printStackTrace();\n\t } catch (IOException e) {\n\t \te.printStackTrace();\n\t }\n\t\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static String readData(String filePath) {\n\n\t\tFile data = new File(filePath); // sets the file data to be the data in the text file\n\t\tBufferedReader br = null; // creates a reference to a buffered reader called 'br' that is not pointing anywhere\n\n\t\tFileReader fr; // creates a reference to a filereader called 'fr'\n\t\ttry {\n\t\t\tfr = new FileReader(data); // creates a new filereader instance\n\t\t\tbr = new BufferedReader(fr); // creates a new bufferedreader\n\t\t\t\t\t\t\t\t\t\t\t// instance\n\t\t\tString line; // create a new String called 'line'\n\t\t\t// ArrayList<String> list = new ArrayList<>();\n\t\t\tString totalInput = \"$\"; // creates a new String called 'totalInput' which is empty\n\n\t\t\twhile ((line = br.readLine()) != null) { // start a while loop that will continue until there is not text left\n\t\t\t\ttotalInput += line + \"-\"; // updates the totalInput String to include the next line of text read in from the file and then start a new line\n\t\t\t}\n\t\t\treturn totalInput; // when the while loop finishes returns the totalInput String\n\t\t}\n\n\t\tcatch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + data.toString());\n\t\t}\n\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to read file: \" + data.toString());\n\t\t}\n\n\t\tfinally {\n\t\t\t\n\t\t}\n\t\treturn null;\n\n\t}", "public interface ReaderFromFile {\n\t\n\tpublic List<Data> readDataFromFile (String filename);\n}", "public void readFile(String name) {\n\t\tString filename = this.path + name;\n\t\tFile file = new File(filename);\n\t\t\n\t\t\n\t\ttry {\t\t \n\t\t\tScanner reader = new Scanner(file);\n\t\t\t\n\t\t\twhile (reader.hasNextLine()) {\n\t\t\t\tString data = reader.nextLine();\n\t\t System.out.println(data);\n\t\t\t}\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t System.out.println(\"File not found!\");\n\t\t} \n\t}", "public abstract T readDataFile(String fileLine);", "public void fileRead(String filename) throws IOException;", "private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\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\t\n\t}", "public String readFileContents(String filename) {\n return null;\n\n }", "public static String readFile() {\n\t\tFileReader file;\n\t\tString textFile = \"\";\n\n\t\ttry {\n\t\t\tfile = new FileReader(path);\n\n\t\t\t// Output string.\n\t\t\ttextFile = new String();\n\n\t\t\tBufferedReader bfr = new BufferedReader(file);\n\n\t\t\ttextFile= bfr.readLine();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading the file\");\n\t\t}\n\t\treturn textFile;\n\n\t}", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "public void GetData(String nameFile) throws IOException {\n File file = new File(nameFile);\n BufferedReader finalLoad = new BufferedReader(new FileReader(file));\n int symbol = finalLoad.read();\n int indexText = 0;\n while (symbol != -1) {\n text[indexText++] = (char) symbol;\n if (indexText >= Constants.MAX_TEXT - 1) {\n PrintError(\"to mach size of file\".toCharArray(), \"\".toCharArray());\n break;\n }\n symbol = finalLoad.read();\n }\n text[indexText++] = '\\n';\n text[indexText] = '\\0';\n finalLoad.close();\n //System.exit(1);\n }", "public String readFromFile() throws IOException {\n return br.readLine();\n }", "public String readFile(String str) {\n\t\t FileReader fileReader;\n\t BufferedReader bufferedReader;\n\t StringBuilder text=new StringBuilder();\n\t \n\t try {\n\t fileReader = new FileReader(str);\n \t bufferedReader = new BufferedReader(fileReader);\n \t String line = null;\n\n \t while((line = bufferedReader.readLine()) != null) \n \t {\n text.append(line+\"\\n\");\n } \n \tbufferedReader.close();\n\t }\n\t \tcatch(FileNotFoundException ex) {\n\t System.out.println(\"Unable to open file '\" + str + \"'\"); \n\t \t}\n\t catch(IOException ex) {\n\t System.out.println(\"Error reading file '\"+ str + \"'\"); \n\t }\n\t catch(Exception ex) {\n\t System.out.println(\"Error \" + ex.getMessage() + \"'\");\n\t ex.printStackTrace();\n\t \n\t }\n\t \n\t\treturn text.toString();\n\t}", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\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\t}", "public Vector<String> read(String path) throws FileNotFoundException, IOException {\n file = new File(path);\n fread = new FileReader(file);\n buf = new BufferedReader(fread);\n\n String temp;\n Vector<String> working = new Vector<String>();\n\n while (true) {\n temp = buf.readLine();\n\n if (temp == null) {\n break;\n } else {\n working.add(temp);\n }\n }\n\n return working;\n }", "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }", "protected abstract void readFile();", "@Override\n\tpublic void ReadTextFile() {\n\t\t// Using a programmer-managed byte-array\n\t\ttry (FileInputStream in = new FileInputStream(inFileStr)) {\n\t\t\tstartTime = System.nanoTime();\n\t\t\tbyte[] byteArray = new byte[bufferSize];\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(byteArray)) != -1) {\n\t\t\t\tsnippets.add(new String(byteArray));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private static void readFile() throws IOException\r\n\t{\r\n\t\tString s1;\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\tSystem.out.println(\"\\ndbs3.txt File\");\r\n\t\twhile ((s1 = br.readLine())!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(s1);\r\n\t\t}//end while loop to read files\r\n\t\t\r\n\t\tbr.close();//close the buffered reader\r\n\t}", "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 }", "public void readFile(File f) {\r\n if(f.getName().endsWith(\".txt\")) {\r\n if(f.getName().equals(\"USQRecorders.txt\")) {\r\n readAndTxt(f); \r\n lab_android.setText(\"Android read in\");\r\n }else if(f.getName().equals(\"mdl_log.txt\")) {\r\n readModLog(f);\r\n lab_moodle.setText(\"Moodle read in\");\r\n }else if(f.getName().equals(\"mdl_chat_messages.txt\") || f.getName().equals(\"mdl_forum_posts.txt\") || f.getName().equals(\"mdl_quiz_attempts.txt\")) {\r\n \treadtabs(f);\r\n }else{\r\n //illegal file name\r\n //JOptionPane.showMessageDialog(null, \"only accept .txt file named 'USQRecorders.txt','mdl_log.txt','mdl_chat_messages.txt','mdl_forum_posts.txt' and 'mdl_quiz_attempts.txt'\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if(fromzip == false) {\r\n copyOldtxt(f);\r\n }\r\n } else if(f.getName().endsWith(\".zip\")) {\r\n if(f.getName().endsWith(\".zip\"))fromzip=true;\r\n readZip(f);\r\n copyOldtxt(f);\r\n //delete original\r\n File del = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File dels[] = del.listFiles();\r\n for(int i=0 ; i<dels.length ; i++){\r\n dels[i].delete();\r\n }\r\n File tmp = new File(workplace + \"/temp/USQ_IMAGE/\");\r\n tmp.delete();\r\n tmp = new File(workplace + \"/temp\");\r\n tmp.delete();\r\n lab_android.setText(\"Android read in\");\r\n } else if(f.getName().endsWith(\".png\")) {\r\n readImage(f);\r\n }\r\n }", "public String readFile(){\n\t\tString res = \"\";\n\t\t\n\t\tFile log = new File(filePath);\n\t\tBufferedReader bf = null;\n\t\t\n\t\ttry{\n\t\t\tbf = new BufferedReader(new FileReader(log));\n\t\t\tString line = bf.readLine();\n\t\t\n\t\t\n\t\t\twhile (line != null){\n\t\t\t\tres += line+\"\\n\";\n\t\t\t\tline = bf.readLine();\n\t\t\t}\n\t\t\n\t\t\treturn res;\n\t\t}\n\t\tcatch(Exception oops){\n\t\t\tSystem.err.println(\"There was an error reading the file \"+oops.getStackTrace());\n\t\t\treturn \"\";\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"There was an error closing the read Buffer \"+e.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "public void readDataFromFile() {\n System.out.println(\"Enter address book name: \");\n String addressBookFile = sc.nextLine();\n Path filePath = Paths.get(\"C:\\\\Users\\\\Muthyala Aishwarya\\\\git\" + addressBookFile + \".txt\");\n try {\n Files.lines(filePath).map(line -> line.trim()).forEach(line -> System.out.println(line));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void loadProgramData() {\n\r\n try {\r\n File f = new File(\"DetailsOfVaccination.txt.txt\"); //Accessing the file\r\n Scanner read = new Scanner(f);\r\n while (read.hasNextLine()) { //Print data in the file line by line\r\n String data = read.nextLine();\r\n System.out.println(data);\r\n }\r\n read.close();\r\n }\r\n catch (FileNotFoundException e) { //Runs if there was an error\r\n System.out.println(\"An error occurred while reading data from the file.\");\r\n e.printStackTrace();\r\n }\r\n }", "public String readFromFile(String path) {\n BufferedReader br = null;\n String returnString =\"\";\n try {\n String sCurrentLine;\n br = new BufferedReader(new FileReader(path));\n while ((sCurrentLine = br.readLine()) != null) {\n returnString+=sCurrentLine;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null)br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n return returnString;\n }", "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}", "private String readFile() {\n try {\n BufferedReader in = new BufferedReader(new FileReader(\"C:\\\\Users\"\n + \"\\\\MohammadLoqman\\\\cs61b\\\\sp19-s1547\"\n + \"\\\\proj3\\\\byow\\\\Core\\\\previousGame.txt\"));\n StringBuilder sb = new StringBuilder();\n String toLoad;\n try {\n toLoad = in.readLine();\n while (toLoad != null) {\n sb.append(toLoad);\n sb.append(System.lineSeparator());\n toLoad = in.readLine();\n }\n String everything = sb.toString();\n return everything;\n } catch (IOException E) {\n System.out.println(\"do nothin\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found\");\n }\n return null;\n\n }", "public abstract void readFromFile( ) throws Exception;", "@Override\n\tpublic void ReadTextFile() {\n\t\t// Using Buffered Stream I/O\n\t\ttry (BufferedInputStream in = new BufferedInputStream(new FileInputStream(inFileStr))) {\n\t\t\tbyte[] contents = new byte[bufferSize];\n\t\t\tstartTime = System.nanoTime();\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(contents)) != -1) {\n\t\t\t\tsnippets.add(new String(contents));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public String getFileText(String filePath) {\n String fileText = \"\"; \n \n File myFile = new File(filePath);\n Scanner myReader; \n \n try {\n myReader = new Scanner(myFile);\n \n while(myReader.hasNext()) {\n fileText+= myReader.nextLine() + \"\\n\"; \n }\n \n } catch (FileNotFoundException ex) {\n logger.log(Level.SEVERE, \"Error getting text from text file\", ex.getMessage()); \n }\n \n return fileText; \n }", "private static String ReadFile(String filePath) {\n StringBuilder sb = new StringBuilder();\n try {\n BufferedReader r = new BufferedReader(new FileReader(filePath));\n String line;\n while ((line = r.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n System.out.println(e.getStackTrace());\n }\n return sb.toString();\n\n }", "public String readFile(String filePath)\n {\n String result = \"\";\n try {\n\n FileReader reader = new FileReader(filePath);\n Scanner scanner = new Scanner(reader);\n\n while(scanner.hasNextLine())\n {\n result += scanner.nextLine();\n }\n reader.close();\n }\n catch(FileNotFoundException ex)\n {\n System.out.println(\"File not found. Please contact the administrator.\");\n }\n catch (Exception ex)\n {\n System.out.println(\"Some error occurred. Please contact the administrator.\");\n }\n return result;\n }", "private void get_text() {\n InputStream inputStream = JsonUtil.class.getClassLoader().getResourceAsStream(\"data.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n this.text = sb.toString().trim();\n }", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\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}", "String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }", "public String readFile(String fName) {\n String msg=\"\";\n try {\n File theFile = new File(fName);\n InputStreamReader iStream = new InputStreamReader(new FileInputStream(theFile));\n int length = (int)theFile.length();\n char input[] = new char[length];\n iStream.read(input);\n msg = new String(input);\n } catch (IOException e) {\n e.printStackTrace();\n } // catch\n return msg;\n }", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "public String readTextFromFile()\n\t{\n\t\tString fileText = \"\";\n\t\tString filePath = \"/Users/zcon5199/Documents/\";\n\t\tString fileName = filePath + \"saved text.txt\";\n\t\tFile inputFile = new File(fileName);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner fileScanner = new Scanner(inputFile);\n\t\t\twhile(fileScanner.hasNext())\n\t\t\t{\n\t\t\t\tfileText += fileScanner.nextLine() + \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tfileScanner.close();\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException fileException)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(baseFrame, \"the file is not here :/\");\n\t\t}\n\t\t\n\t\treturn fileText;\n\t}", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public InputStream readFile( String fileName, FileType type );", "void fileReader(String filename) \r\n\t\t{\r\n\r\n\t\ttry (Scanner s = new Scanner(new FileReader(filename))) { \r\n\t\t while (s.hasNext()) { \r\n\t\t \tString name = s.nextLine(); // read name untill space\r\n\t\t \tString str[] = name.split(\",\");\r\n\t\t \tString nam = str[0]; \r\n\t\t \tint number = Integer.parseInt(str[1]); // read number untill space\r\n\t\t this.addContact(nam, number);\r\n\t\t\r\n\t\t }\t\t \r\n\t\t \r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t}", "public void readData(String infile) throws Exception {\r\n \t\tScanner in = new Scanner(new FileReader(infile));\r\n \t}", "private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }", "String Reader(String FileName, Context context){\n FileInputStream inputStream = null;\n String Text = \"\";\n StringBuilder sb = null;\n try{\n //inputStream = context.openFileInput(FileName);\n inputStream = new FileInputStream(new File(FileName));\n InputStreamReader reader = new InputStreamReader(inputStream);\n BufferedReader buffRead = new BufferedReader(reader);\n sb = new StringBuilder();\n\n while ((Text = buffRead.readLine())!= null){\n sb.append(Text);\n sb.append(\"\\n\");\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return sb.toString();\n }", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\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}", "@SuppressWarnings(\"unused\")\n private String readFile(File f) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n StringBuilder builder = new StringBuilder();\n while (line != null) {\n builder.append(line).append('\\n');\n line = reader.readLine();\n }\n reader.close();\n return builder.toString();\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }", "public void read_file(String filename)\n {\n out.println(\"READ\");\n out.println(filename);\n try\n {\n String content = null;\n content = in.readLine();\n System.out.println(\"READ content : \"+content);\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }", "public String read() {\n\t\tStringBuffer text = new StringBuffer((int)file.length());\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\tString line;\n\t\t\tString ret = \"\\n\";\n\t\t\twhile (!eof) {\n\t\t\t\tline = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\ttext.append(line);\n\t\t\t\t\ttext.append(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\treturn text.toString();\n\t}", "public static String[] readFile(String fn) {\n\n try {\n\n FileReader fr = new FileReader(fn); // read the file\n // store contents in a buffer\n BufferedReader bfr = new BufferedReader(fr);\n // an string array list for storing each line of content\n ArrayList<String> content = new ArrayList<String>();\n String p = null; // temper string for passing each line of contents\n while ((p = bfr.readLine()) != null) {\n content.add(p);\n }\n\n // String array for storing content\n String[] context = new String[content.size()];\n\n for (int i = 0; i < content.size(); i++) {\n context[i] = content.get(i);\n }\n\n bfr.close(); // close the buffer\n return context;\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found: \" + e.getMessage());\n System.exit(0);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n System.out.println(\"I/O Ooops: \" + e.getMessage());\n System.exit(0);\n }\n\n // If an exception occurred we will get to here as the return statement\n // above was not executed\n // so setup a paragraphs array to return which contains the empty string\n String[] context = new String[1];\n context[0] = \"\";\n return context;\n\n }", "public boolean readDataFile();", "public String readFile(String filename)\n {\n StringBuilder texts = new StringBuilder();\n \n try \n {\n FileReader inputFile = new FileReader(filename);\n Scanner parser = new Scanner(inputFile);\n \n while (parser.hasNextLine())\n {\n String line = parser.nextLine();\n texts.append(line + \";\");\n }\n \n inputFile.close();\n parser.close();\n return texts.toString();\n \n }\n \n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n return error;\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n return error;\n } \n }", "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}", "public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}", "public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n FileInputStream fis=new FileInputStream(\"g:/data/info.txt\");\r\n //step-2 (read the data from stream)\r\n int n=fis.available(); //it gives you no of bytes available for reading in stream\r\n System.out.println(\"Total Bytes Available : \"+n);\r\n byte b[]=new byte[n];\r\n fis.read(b); //will take 1st byte from stream and store to b[0], 2nd to b[1], 3rd to b[2]\r\n //converting bytes to String\r\n String st=new String(b);\r\n System.out.println(st);\r\n //step-3 (close the stream)\r\n fis.close();\r\n }", "String[] readFile(File file) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader = null;\n try {\n if (file.isFile()) {\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n return output;\n }", "public int[] readBasicInfo() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Creates a new array to read the first line of data to (is an array because need to convert to int list)\n\t\tString textData;\n\t\t\n\t\t//Reads the first line of the text file into the array\n\t\ttextData = textReader.readLine();\n\t\t\n\t\tint[] data = new int[5];\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[] tempList = new String[6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\ttempList = textData.split(delims);\n\t\tfor (int i = 1; i < tempList.length; i++)\n\t\t\tdata[i-1] = Integer.parseInt(tempList[i]);\n\t\t\n\t\t//Returns the array containing the first line of the text file\n\t\treturn data;\n\t}", "public String readMultipleFromFiles()\n {\n String result = \"\";\n try\n {\n FileReader fileReader = new FileReader(filename);\n try\n {\n StringBuffer stringBuffer = new StringBuffer();\n Scanner scanner = new Scanner(fileReader);\n while (scanner.hasNextLine())\n {\n stringBuffer.append(scanner.nextLine()).append(\"\\n\");\n }\n stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());\n result = stringBuffer.toString();\n } finally\n {\n fileReader.close();\n }\n } catch (FileNotFoundException e)\n {\n System.out.println(\"There is no such file called \" + filename);\n } catch (IOException e)\n {\n System.out.println(\"read \" + filename + \" error!!!\");\n } catch (NumberFormatException e)\n {\n System.out.println(\"content in file \" + filename + \" is error\");\n }\n return result;\n }", "public String readText(String _filename) {\r\n\t\treturn readText(_filename, \"text\", (java.net.URL) null);\r\n\t}", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n\t\t// define a file object for the file on our computer we want to read\n\t\t// provide a path to the file when defining a File object\n\t\t//\n\t\t// paths can be: absolute - code all the parts from the root folder of your OS (Windows)\n\t\t//\n\t\t// paths can be: relative - code the part from the assumed current position to the file\n\t\t//\n\t\t// absolute paths should be avoided - they tightly couple the program to the directory structure it was created on\n\t\t//\t\t\t\t\t\t\t\t\t\t\tif the program is run on a machine with a different directory structure it won't work\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\tbecause the absolute path doesn't exist in a different directory structure\n\t\t//\n\t\t// relative paths are preferred because you have loosely coupled the file to the directory structure\n\t\t//\t\t\tit is more likely that the relative paths will be the same from machine to machine\n\t\t//\n\t\t// path: . = current directory\n\t\t//\t\t/ = then (sub-directory or file follows)\n\t\t//\t\tnumbers.txt - file name\n\n\t\tFile theFile = new File(\"./data/numbers.txt\"); // give the File object the path to our file\n\n\t\t// define a scanner for the File object we created for the file on our computer\n\t\tScanner scannerForFile = new Scanner(theFile); // give Scanner the file object we created\n\n\t\tString aLine = \"\"; // hold a line of input from the file\n\n\n\t\tint sum = 0; // hold the sum of the numbers in a line\n\n\t\t// if we want to get all the lines in the file\n\t\t// we need to go through and get each line in the file one at a time\n\t\t// but we can't get a line from the file if there are no more lines in the file\n\t\t// we can use the Scanner class hasNextLine() method to see if there is another line in the file\n\t\t// we can set a loop to get a line from the file and process it as long as there are lines in the file\n\t\t// we will use while loop since we want loop based on a condition (as long as there are line in the file)\n\t\t// \t\t\tand not a count of lines in the file, in which case we would use a for-loop\n\t\t//\t\t\t\tfor-each-loops only work for collection classes\n\n\t\t// add up each line from my file\n\t\t// the file has one or more numbers separated by a single space in each line\n\n\t\twhile (scannerForFile.hasNextLine()) { // loop while there ia a line in the file\n\n\t\t\taLine = scannerForFile.nextLine(); // get a line from the file and store it in aLine\n\n\t\t\t// break apart the numbers in the line based on spaces\n\t\t\t// String .split() will create an array of Strings of the values separated by the delimiter\n\n\t\t\tString[] theNumbers = aLine.split(\" \"); // break apart the numbers in the line based on spaces\n\n\t\t\tSystem.out.println(\"Line from the file: \" + aLine); // display the line from the file\n\n\t\t\t// reset teh sum to 0 to clear it of the value from the last time through the loop\n\t\t\tsum = 0;\n\n\t\t\t// loop through the array of Strings holding the numbers from the line in the file\n\n\t\t\tfor (String aNumber : theNumbers) { // aNumber will hold the current element that is in the array\n\t\t\t\t\tsum = sum + Integer.parseInt(aNumber); // add the number to a sum after converting the String to an int\n\t\t\t}\n\n\t\t\t// now that we have the sum, we can display it\n\n\t\t\tSystem.out.println(\"Sum of the numbers is: \" + sum);\n\t\t\tSystem.out.println(\"Average of the numbers is: \" + sum / theNumbers.length);\n\n\t\t} // end of while loop\n\n\n\t\t\n}", "String readFile( String filename ) {\n try {\n FileReader fileReader = new FileReader( filename );\n BufferedReader bufferedReader = new BufferedReader( fileReader );\n StringBuilder stringBuilder = new StringBuilder();\n String line = bufferedReader.readLine();\n while( line != null ) {\n stringBuilder.append( line );\n stringBuilder.append( \"\\n\" );\n line = bufferedReader.readLine();\n }\n bufferedReader.close();\n fileReader.close();\n return stringBuilder.toString();\n } catch( Exception e ) {\n playerObjects.getLogFile().WriteLine( Formatting.exceptionToStackTrace( e ) );\n return null;\n }\n }", "public String readFile(File file) {\r\n\t\tString line;\r\n\t\tString allText = \"\";\r\n\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(file))) {\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\r\n\t\t\t\tallText += line + \"\\n\";\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn allText;\r\n\t}", "protected String openReadFile(Path filePath) throws IOException{\n\t\tString line;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t// Read the document\n\t\tBufferedReader reader = Files.newBufferedReader(filePath, ENCODING);\n\t\t// Append each line in the document to our string\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tsb.append(line);\n\t\t\tsb.append(\"\\n\"); // readLine discards new-row characters, re-append them.\n\t\t}\n\t\tif(sb.length() != 0){\n\t\t\tsb.deleteCharAt(sb.length()-1); // However last line doesn't contain one, remove it.\n\t\t}\n\t\treader.close();\n\t\treturn new String(sb.toString());\n\t}", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "public ReadFile (String file) throws java.io.FileNotFoundException\n {\n reader = new java.io.FileReader(file);\t\t//Construct the file reader\n br = new java.io.BufferedReader(reader);\t//Wrap it with a BufferedReader\n assert this.isValid(); \t\t\t//Make sure all is well and we can read the file\n }", "private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String getData(String fileName) {\n StringBuffer sb = new StringBuffer();\n try {\n BufferedReader br = new BufferedReader(new FileReader(fileName));\n String line = br.readLine();\n while (line != null) {\n sb.append(line).append(\"\\n\");\n line = br.readLine();\n }\n br.close();\n } catch (IOException e) {\n System.out.println(\"NO SE\");\n }\n return sb.toString();\n }", "private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }", "public String read(File file) throws IOException {\n\t\t\tInputStream is = null;\r\n\t\t\tis = new FileInputStream(file);\r\n\t\t\t\r\n\t\t\tAccessTextFile test = new AccessTextFile();\r\n//\t\t\tInputStream is = new FileInputStream(\"E:\\\\test.txt\");\r\n\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\ttest.readToBuffer(buffer, is);\r\n\t\t\tSystem.out.println(buffer); // 将读到 buffer 中的内容写出来\r\n\t\t\tis.close();\t\t\r\n\t\t\treturn buffer.toString();\r\n\t\t }", "public String readFileBufferedReader() {\n String result = \"\";\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(new File(ALICE_PATH)));\n\n for (String x = in.readLine(); x != null; x = in.readLine()) {\n result = result + x + '\\n';\n }\n\n } catch (IOException e) {\n }\n\n if(in != null)try {\n in.close();\n } catch (IOException e) {\n }\n\n return result;\n }", "public void readInFile(String filename) {\r\n String lineOfData = new String (\"\");\r\n boolean done = false;\r\n //set up the BufferedReader\r\n BufferedReader fin = null;\r\n\ttry {\r\n fin = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\r\n lineOfData = fin.readLine();\r\n\t}\r\n catch(Exception c) {\r\n System.out.println(\"ERROR: Input read failed!\");\r\n }\r\n\r\n //read in additional strings until the file is empty\r\n while (done != true){\r\n String temp[] = lineOfData.split(\" \");\r\n graph.add(new Edge(temp[0], temp[1], Integer.parseInt(temp[2]))); //add current string to graph\r\n try {\r\n lineOfData = fin.readLine();\r\n if (lineOfData == null){\r\n done = true;\r\n }\r\n }\r\n catch(IOException ioe){\r\n System.out.println(\"ERROR: Input read failed!\");\r\n }\r\n }\r\n }", "public String readLine(int index, String filePath){\n String lineData = \"\";\n try{\n File myFile = new File(filePath);\n Scanner myReader = new Scanner(myFile);\n for(int i = 0; i < index; i++){\n myReader.nextLine();\n }\n lineData = myReader.nextLine();\n myReader.close();\n } catch(FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n return lineData;\n }", "public void readDataFromFile(View view) throws GeneralSecurityException, IOException {\n encryptedFile = new EncryptedFile.Builder(\n context,\n new File(MainActivity.this.getFilesDir(),\"test.txt\"), // File want to read\n mainKey, // Master key for encryption\n EncryptedFile.FileEncryptionScheme.AES256_GCM_HKDF_4KB) // Algorithm or FileEncryptionScheme for encryption\n .build();\n\n\n InputStream inputStream = encryptedFile.openFileInput(); // Open the encrypted file to read\n int next = inputStream.read(); // Read the encrypted file\n\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // ByteArrayOutputStream to print the content of file to read\n\n while (next != -1){\n byteArrayOutputStream.write(next); // Write the file content in byteArrayOutputStream object\n next = inputStream.read(); // Read the next character until it encounter the end (-1)\n }\n\n byte[] plainText = byteArrayOutputStream.toByteArray(); // Convert into byte array\n\n String textString = new String(plainText); // Create a new string with converted plain text byte array\n\n textView.setText(textString); // display the file content in textView\n }", "public String readFile (String pathOfFileSelected) {\n\n File file = new File(pathOfFileSelected);\n\n StringBuilder text = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line;\n\n while ((line = br.readLine()) != null) {\n text.append(line);\n text.append('\\n');\n }\n br.close();\n Log.d(TAG, \"readFile: text: \" +text.toString());\n return text.toString().trim();\n }\n catch (IOException e) {\n Log.e(TAG, \"readFile: \",e );\n return null;\n }\n }", "public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }", "private static String readTextFile(File file) throws IOException {\n return Files.lines(file.toPath()).collect(Collectors.joining(\"\\n\"));\n }" ]
[ "0.73909074", "0.72132057", "0.6965449", "0.69421417", "0.6921939", "0.6915926", "0.68436044", "0.6799726", "0.67565864", "0.675355", "0.67433864", "0.6731762", "0.6723621", "0.67212903", "0.6687326", "0.6681808", "0.6677365", "0.6667487", "0.66002643", "0.6599797", "0.65935856", "0.6593127", "0.657111", "0.6528506", "0.65267706", "0.65259683", "0.65136963", "0.6512252", "0.6500874", "0.6469081", "0.64629304", "0.6461786", "0.64607674", "0.6460757", "0.6441741", "0.64243233", "0.6423381", "0.6412732", "0.64047825", "0.64030766", "0.63892967", "0.63863283", "0.63727164", "0.63501674", "0.6346216", "0.6345007", "0.63372576", "0.6333507", "0.6316859", "0.63129574", "0.62983626", "0.6285476", "0.62829715", "0.6271191", "0.6267891", "0.6255179", "0.62546545", "0.62450397", "0.62399447", "0.6235939", "0.6235169", "0.62189925", "0.6198245", "0.6197251", "0.618715", "0.6187144", "0.61760485", "0.6170474", "0.6156839", "0.61513805", "0.61392653", "0.61336875", "0.6125349", "0.6120273", "0.6107119", "0.61013603", "0.6098323", "0.6093953", "0.6091799", "0.6091443", "0.6091103", "0.6090921", "0.6090709", "0.608849", "0.6080853", "0.6079115", "0.6077973", "0.6075339", "0.6068794", "0.6062696", "0.6061948", "0.60508394", "0.6049771", "0.6049169", "0.6044924", "0.60440516", "0.604283", "0.6041438", "0.6036154", "0.60246545", "0.60229725" ]
0.0
-1
Factory method which returns concrete data adapter by unique name, using configuration file
public static IDatabaseAdapter get(String name) { HashMap<String,Object> config = ConfigManager.getInstance().getDatabaseAdapter(name); if (config==null || !config.containsKey("type")) return null; IDatabaseAdapter result = null; switch (config.get("type").toString()) { case "mysql": result = new MysqlDatabaseAdapter(); break; case "sqlite": result = new SqliteDatabaseAdapter(); break; case "orientdb": result = new OrientDBDatabaseAdapter(); break; case "mongodb": result = new MongoDatabaseAdapter(); } if (result != null) result.configure(config); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CommonAdapter findAdapterByName(final String name) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Find adapter : \" + name);\n }\n return ADAPTERS.get(name);\n }", "DataFactory getDataFactory();", "public Class<? extends DataAdapter> getAdapterClass();", "Builder adapterFactory(TypeAdapterFactory factory);", "public abstract DataType<T> newInstance(String format);", "public AdapterFactory getAdapterFactory()\n {\n return adapterFactory;\n }", "private DataSource.Factory buildDataSourceFactory(DefaultBandwidthMeter bandwidthMeter) {\n return new DefaultDataSourceFactory(this, bandwidthMeter, buildHttpDataSourceFactory(bandwidthMeter));\n }", "public static TypeAdapterFactory create() {\n return new AutoValueGson_MyTypeAdapterFactory();\n }", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "protected abstract MultiTypeAdapter createAdapter();", "abstract public Config createConfigFromString(String data);", "public IDataSource createDataSource(String initFileFullPath) throws Exception {\n\r\n\t\tProperties settings = new Properties();\r\n\t\ttry {\r\n\t\t\tFileInputStream sf = new FileInputStream(initFileFullPath);\r\n\t\t\tsettings.load(sf);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Exception during loading initialization file\");\r\n\t\t\tlogger.error(ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t\tString host = settings.getProperty(\"DBHOST\", \"\");\r\n\t\tString dbUser = settings.getProperty(\"USER\");\r\n\t\tString dbPassword = settings.getProperty(\"PWORD\", \"\");\r\n\t\tString sessionType = settings.getProperty(\"SESSIONTYPE\");\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tlogger.info(\"BMIRDataSource args: \"+host+\" \"+dbUser+\" \"+ dbPassword);\r\n\t\tConnection con = DriverManager.getConnection (host, dbUser, dbPassword);\r\n\t\tif (sessionType.equals(\"Outpatient\")) { \r\n\t\t\treturn new BMIROutPatientDataSource(con, initFileFullPath) ;\r\n\t\t} else if (sessionType.equals(\"Inpatient\")) {\r\n\t\t\treturn new BMIRInPatientDataSource(con, initFileFullPath);\r\n\t\t}\r\n\t\telse \r\n\t\t\tlogger.error(\"No valid session type (must be inpatient or outpatient\");\r\n\t\treturn null;\r\n\t}", "public DataSource createDataSource(String name, ConfigProperties config) {\r\n\r\n\t\tif (name == null) {\r\n\t\t\t// get the default dataSource name from avaje.properties\r\n\t\t\tString dflt = config.getProperty(\"ebean.datasource.default\");\r\n\t\t\tname = config.getProperty(\"datasource.default\", dflt);\r\n\t\t\tif (name == null) {\r\n\t\t\t\tString msg = \"datasource.default has not be defined in system.properties\";\r\n\t\t\t\tthrow new PersistenceException(msg);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tContext ctx = new InitialContext();\r\n\t\t\tString lookupName = getJndiPrefix(config) + name;\r\n\t\t\tDataSource ds = (DataSource) ctx.lookup(lookupName);\r\n\t\t\tif (ds == null) {\r\n\t\t\t\tthrow new PersistenceException(\"JNDI DataSource [\" + lookupName + \"] not found?\");\r\n\t\t\t}\r\n\t\t\treturn ds;\r\n\r\n\t\t} catch (NamingException ex) {\r\n\t\t\tthrow new PersistenceException(ex);\r\n\t\t}\r\n\t}", "public interface ConfigurationService\n{\n /**\n * 根据配置名称查询配置项, 名称需要唯一\n * @param configName\n * @return\n */\n Configuration selectByConfigName(String configName);\n\n}", "public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "Factory getFactory()\n {\n return configfile.factory;\n }", "private Serde<Object> getSerdeFromName(String name, SerializerConfig serializerConfig) {\n String serdeClassName =\n serializerConfig.getSerdeFactoryClass(name).orElseGet(() -> SerializerConfig.getPredefinedSerdeFactoryName(name));\n return ReflectionUtil.getObj(serdeClassName, SerdeFactory.class).getSerde(name, serializerConfig);\n }", "@Override\n\t\t\tprotected IAdapterFactory getDefaultAdapterFactory(Object type) {\n\t\t\t\treturn defaultAdapterFactory;\n\t\t\t}", "private AbstractPlacesAutocompleteAdapter adapterForClass(final Context context, final String adapterClass) {\n Class<AbstractPlacesAutocompleteAdapter> adapterClazz;\n try {\n adapterClazz = (Class<AbstractPlacesAutocompleteAdapter>) Class.forName(adapterClass);\n } catch (ClassNotFoundException e) {\n throw new InflateException(\"Unable to find class for specified adapterClass: \" + adapterClass, e);\n } catch (ClassCastException e) {\n throw new InflateException(adapterClass + \" must inherit from \" + AbstractPlacesAutocompleteAdapter.class.getSimpleName(), e);\n }\n\n Constructor<AbstractPlacesAutocompleteAdapter> adapterConstructor;\n try {\n adapterConstructor = adapterClazz.getConstructor(Context.class, PlacesApi.class, AutocompleteResultType.class, AutocompleteHistoryManager.class);\n } catch (NoSuchMethodException e) {\n throw new InflateException(\"Unable to find valid constructor with params \" +\n Context.class.getSimpleName() +\n \", \" +\n PlacesApi.class.getSimpleName() +\n \", \" +\n AutocompleteResultType.class.getSimpleName() +\n \", and \" +\n AutocompleteHistoryManager.class.getSimpleName() +\n \" for specified adapterClass: \" + adapterClass, e);\n }\n\n try {\n return adapterConstructor.newInstance(context, api, resultType, historyManager);\n } catch (InstantiationException e) {\n throw new InflateException(\"Unable to instantiate adapter with name \" + adapterClass, e);\n } catch (IllegalAccessException e) {\n throw new InflateException(\"Unable to instantiate adapter with name \" + adapterClass, e);\n } catch (InvocationTargetException e) {\n throw new InflateException(\"Unable to instantiate adapter with name \" + adapterClass, e);\n }\n }", "public String getName() {\n return \"Database_adapter-\"+this.name;\n }", "public abstract DataType<T> newInstance(String format, Locale locale);", "private <T> T readConfig(final ConfigurationFactory<T> factory, final String filePath) {\n try (final BufferedReader reader = Files.newBufferedReader(getDataFolder().toPath().resolve(filePath))) {\n return factory.create(YamlConfiguration.loadConfiguration(reader));\n } catch (final IOException e) {\n throw new RuntimeException(String.format(\"Could not read configuration file %s in plugin data-folder\",\n filePath), e);\n }\n }", "@Override\n public void getAdapters() {\n // standard Cricket adapters\n logAdapter = (LoggerAdapterIface) getRegistered(\"Logger\");\n echoAdapter = (EchoHttpAdapterIface) getRegistered(\"Echo\");\n database = (KeyValueDBIface) getRegistered(\"Database\");\n scheduler = (SchedulerIface) getRegistered(\"Scheduler\");\n htmlAdapter = (HtmlGenAdapterIface) getRegistered(\"WWWService\");\n fileReader = (FileReaderAdapterIface) getRegistered(\"FileReader\");\n // optional\n //scriptingService = (HttpAdapterIface) getRegistered(\"ScriptingService\");\n //scriptingEngine = (ScriptingAdapterIface) getRegistered(\"ScriptingEngine\");\n }", "private static DataSourceId createDataSourceId(double scalingFactor) {\n return createDataSourceId(TPCDSAllTablesDataGeneratorRewriter.TPCDS_ALL_TABLES_DATA_GENERATOR,\n Double.toString(scalingFactor));\n }", "protected InvDatasetImpl readDataset( InvCatalogImpl catalog, InvDatasetImpl parent, Element dsElem, URI base) {\r\n\r\n // deal with aliases\r\n String name = dsElem.getAttributeValue(\"name\");\r\n String alias = dsElem.getAttributeValue(\"alias\");\r\n if (alias != null) {\r\n InvDatasetImpl ds = (InvDatasetImpl) catalog.findDatasetByID( alias);\r\n if (ds == null)\r\n factory.appendErr(\" ** Parse error: dataset named \"+name+\" has illegal alias = \"+alias+\"\\n\");\r\n return new InvDatasetImplProxy(name, ds);\r\n }\r\n\r\n InvDatasetImpl dataset = new InvDatasetImpl( parent, name);\r\n readDatasetInfo( catalog, dataset, dsElem, base);\r\n\r\n if (InvCatalogFactory.debugXML) System.out.println (\" Dataset added: \"+ dataset.dump());\r\n return dataset;\r\n }", "public abstract DataType<T> newInstance();", "public Adapter create( Argument[] arguments )\r\n throws UnrecognizedCriteria, InvalidCriteria, CreationException\r\n {\r\n return getFactory().create( arguments ).get_adapter();\r\n }", "default DataType getDataType(DataTypeName id) {return (DataType)this;}", "public interface AdapterInterface {\n}", "public DataSourceFactory() {}", "public interface IConfigurationProvider {\r\n String get(String path);\r\n}", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "public Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\n\t\tpublic <T> T getAdapter(Class<T> adapter) {\n\t\t\treturn null;\n\t\t}", "public DataBase getDataSet() {\r\n DataBase dataset = null;\r\n try {\r\n Statement stmt = conexion.createStatement();\r\n String sql;\r\n sql = \"SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '\" + schema + \"'\";\r\n ResultSet rs = stmt.executeQuery(sql);\r\n dataset = new DataBase();\r\n while (rs.next()) {\r\n \r\n dataset.setCatalog_name(rs.getString(1));\r\n dataset.setSchema_name(rs.getString(2));\r\n dataset.setCharacter_set(rs.getString(3));\r\n dataset.setCollation_name(rs.getString(4));\r\n dataset.setIssued(getIssuedBD(schema));\r\n\r\n }\r\n ArrayList<Table> tables = getTables(schema);\r\n dataset.setTables(tables);\r\n return dataset;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAOBaseDatos.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }", "private synchronized DataSource fromBytes(byte[] bytes) {\n Kryo kryo = new Kryo();\n Input input = new Input(new ByteArrayInputStream(bytes));\n DataSource curDataSource = (DataSource) kryo.readClassAndObject(input);\n input.close();\n return curDataSource;\n }", "public static JsonAdapter.Factory create() {\n return nullSafe(new AutoValueMoshi_AutoValueFactory());\n }", "ITaskFactory<?> load(String classname);", "private static Configuration getConfigurationFromDb(String conf_id) {\n FrontEndDBInterface f = new FrontEndDBInterface();\n Configuration config = f.getConfigInformation(Integer.parseInt(conf_id));\n return config;\n }", "static DataFrameFactory factory() {\n return DataFrameFactory.getInstance();\n }", "public static DatabindingAdapter<IPatternMatch> getDatabindingAdapter(String patternName, boolean generatedMatcher) {\r\n \t\tif (generatedMatcher) {\r\n \t\t\treturn getDatabindingAdapterForGeneratedMatcher(patternName);\r\n \t\t}\r\n \t\telse {\r\n \t\t\treturn getDatabindingAdapterForGenericMatcher(patternName);\r\n \t\t}\r\n \t}", "private CompositeStrategyInterface getStrategyFromClass (String class_name) throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {\n\t\t\n\t \t\n \t// Reflection load of the class\n \tClass<?> c = Class.forName(\"es.um.dis.umutextstats.compositestrategies.\" + class_name);\n \t\n \t\n \t// Create the dimension\n \tCompositeStrategyInterface o = (CompositeStrategyInterface) c.getConstructor().newInstance();\n \t\n \treturn o;\n\t \t\n\t}", "abstract public Config createConfigWithFactory(String path, String factoryPath);", "public DataTypeManager getDataTypeManager();", "static public DataSource getDataSource(Context appContext) {\n // As per\n // http://goo.gl/clVKsG\n // we can rely on the application context never changing, so appContext is only\n // used once (during initialization).\n if (ds == null) {\n //ds = new InMemoryDataSource();\n //ds = new GeneratedDataSource();\n ds = new CacheDataSource(appContext, 20000);\n }\n \n return ds;\n }", "public DataSource createImpl()\n {\n if (_impl == null)\n {\n // create a param defining the datasource\n \n \tJdbcDataSourceParam dsParam = new JdbcDataSourceParam(getName(),\n getJdbcDriver(), getJdbcUrl() , //getJdbcCatalog(),\n getJdbcUser(), getJdbcPassword());//+ \":\" + getJdbcCatalog()\n\n // get/create the datasource\n _impl = DataManager.getDataSource(dsParam);\n\n // get the entities, create and add them\n Vector v = getEntities();\n for (int i = 0; i < v.size(); i++)\n {\n EntityDobj ed = (EntityDobj) v.get(i);\n _impl.addEntity(ed.createImpl());\n }\n\n // get the joins, create and add them\n v = getJoins();\n for (int i = 0; i < v.size(); i++)\n {\n JoinDobj jd = (JoinDobj) v.get(i);\n _impl.addJoin(jd.createImpl());\n }\n }\n\n return _impl;\n }", "public DriverConfig createDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _driverList.add(driver);\n \n return driver;\n }", "public DataType(String dataName) {\n /*try {\n basicType = this.getClass().getName();\n idForDataType = this.getClass().getName();\n } catch (Exception ex) {\n Logger.getLogger(DataType.class).fatal(\"Failed to generate a unique id: \" +\n ex.getMessage(),ex);\n }*/\n this.dataName = dataName;\n }", "public abstract <T> T read(String name, Class<T> clazz);", "public abstract String getDriver() throws DataServiceException;", "public ConfigurationItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "protected abstract D createData();", "public static JRDataSource getDataSource() {\n\t\treturn new CustomDataSource(1000);\n\t}", "abstract public void setUpAdapter();", "public void testGetNewDatastoreAdapter3()\r\n {\r\n DatabaseMetaData md = new DatabaseMetaData();\r\n \r\n //test Derby adapter \r\n md.setProductName(\"Derby\");\r\n md.setProductVersion(\"10\");\r\n DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);\r\n assertNotNull(adapter);\r\n assertEquals(DerbyAdapter.class.getName(), adapter.getClass().getName());\r\n }", "public static synchronized AbstractDAOFactory getInstance(String name) throws DAOConfigurationException {\n\t\tif (instance == null) {\n\t\t\tif (name != null) {\n\t\t\t\tDAOProperties properties = new DAOProperties(name);\n\t\t\t\tString url = properties.getProperty(PROPERTY_URL, true);\n\t\t\t\t// URL as DataSource URL and lookup it in the JNDI.\n\t\t\t\tDataSource dataSource;\n\t\t\t\ttry {\n\t\t\t\t\tdataSource = (DataSource) new InitialContext().lookup(JNDI_ROOT + url);\n\t\t\t\t} catch (NamingException e) {\n\t\t\t\t\tthrow new DAOConfigurationException(\"DataSource '\" + url + \"' is missing in JNDI.\", e);\n\t\t\t\t}\n\t\t\t\tDataSourceDAOFactory dataSourceDAOFactory = DataSourceDAOFactory.getInstance(dataSource);\n\t\t\t\tinstance = dataSourceDAOFactory;\n\t\t\t} else {\n\t\t\t\tthrow new DAOConfigurationException(\"Database name is null.\");\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "protected abstract String getDatasourceName();", "public DataSource getDataSource(final QueriesConfig qryConfig) throws DBMissingValueException {\n validate(qryConfig);\n\n final var connectionString = qryConfig.getConnectionString();\n\n var dataSource = DATA_SOURCES.get(connectionString);\n\n if (dataSource==null) {\n try {\n LOCK.lock();\n dataSource = DATA_SOURCES.get(connectionString);\n if (dataSource==null) {\n LOG.trace(String.format(\"Registering %s to pool.\", connectionString));\n Class.forName(qryConfig.getJdbcDriver());\n\n final var basicDataSource = new BasicDataSource();\n basicDataSource.setUrl(connectionString);\n\n if (qryConfig.getWindowsAuthentication()==null) {\n basicDataSource.setUsername(qryConfig.getUsername());\n basicDataSource.setPassword(qryConfig.getPassword());\n }\n\n basicDataSource.setMinIdle(dbPoolConfig.getMinIdle());\n basicDataSource.setMaxIdle(dbPoolConfig.getMaxIdle());\n basicDataSource.setMaxOpenPreparedStatements(dbPoolConfig.getMaxOpenPreparedStatements());\n dataSource = basicDataSource;\n\n DATA_SOURCES.put(connectionString, dataSource);\n }\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(e);\n } finally {\n LOCK.unlock();\n }\n }\n else {\n LOG.trace(String.format(\"Retrieve %s from pool.\", connectionString));\n }\n\n return dataSource;\n }", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }", "protected IDataSet getDataSet(String fileName) throws Exception {\n return new XlsDataSetLoader().loadDataSet(testClass, fileName);\n }", "private MarketDataProvider getMarketDataProviderForName(String inProviderName)\n {\n populateProviderList();\n return activeProvidersByName.get(inProviderName);\n }", "public interface DataProvider<T> {\n T getData(String key);\n}", "public interface DatabaseReaderSelector {\n DatabaseReader getDbReader(String dbId);\n}", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "@Override\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\n\t}", "public interface IDataFactory<D extends IData>{\n\n D create();\n\n void save(D data, String key, CompoundNBT tag);\n\n void read(D data, String key, CompoundNBT tag);\n\n void saveUpdate(D data, PacketBuffer buf);\n\n void readUpdate(D data, PacketBuffer buf);\n\n default boolean canConvert(Class returnType){\n return false;\n }\n\n default void convert(D data, Object obj){}\n\n /**\n * Used for debugging only\n */\n default D createTest(){\n return create();\n }\n\n}", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "ConfigModel createInstanceOfConfigModel();", "private static Config loadConfig(String name) {\n\n\t\tString path;\n\t\tif (name == null) {\n\t\t\tpath = \"application.json\";\n\t\t} else {\n\t\t\tpath = \"src/\"+extensionsPackage+\"/\" + name + \"/config.json\";\n\t\t}\n\n\t\tGson gson = new Gson();\n\t\tConfig config = null;\n\n\t\ttry {\n\t\t\tconfig = gson.fromJson(new FileReader(path), Config.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn config;\n\t}", "public LibraryAdapterFactory() {\r\n\t}", "public static DataGrabber getInstance(String conexusID) {\n Bundle args = new Bundle();\n args.putString(ID_KEY, conexusID);\n\n DataGrabber grabber = new DataGrabber();\n grabber.setArguments(args);\n return grabber;\n }", "public interface IDataSource {\r\n\t\r\n\t/**\r\n\t * Method to check if there are any stored credential in the data store for the user.\r\n\t * @param userId\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public boolean checkAuth(String userId) throws IOException;\r\n\t\r\n\t/**\r\n\t * Method to build the Uri used to redirect the user to the service provider site to give authorization.\r\n\t * @param userId\r\n\t * @param authCallback callback URL used when the app was registered on the service provider site. Some providers require\r\n\t * to specify it with every request.\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public String buildAuthRequest(String userId, String authCallback) throws IOException;\r\n\t\r\n\t/**\r\n\t * Once the user has authorized the application, the provider redirect it on the app using the callback URL. This method \r\n\t * saves the credentials sent back with the request in the data store.\r\n\t * @param userId\r\n\t * @param params HashMap containing all the parameters of the request\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public void saveAuthResponse(String userId, HashMap<String, String> params) throws IOException;\r\n\t\r\n\t/**\r\n\t * Updates data of a single resource\r\n\t * @param userId\r\n\t * @param name resource name as in the XML config file\r\n\t * @param lastUpdate\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public String updateData(String userId, String resourceName, long lastUpdate) throws IOException;\r\n\t\r\n\t/**\r\n\t * Updates data of all resources\r\n\t * @param userId\r\n\t * @param lastUpdate\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public String[] updateAllData(String userId, long lastUpdate) throws IOException;\r\n\t\r\n}", "public static Factory factory() {\n return ext_dbf::new;\n }", "@JsonCreator\n public static DataType fromString(String name) {\n return fromString(name, DataType.class);\n }", "DataType createDataType();", "public String getAdapter() {\n return adapter;\n }", "public String getAdapterConfigLocation(String namespace);", "public interface ConfigurationService {\n /**\n * Get configuration by key\n *\n * @param configKey\n * @return\n */\n Configuration getConfigByKey(String configKey);\n}", "private ConnectionFactoryDefinition loadConnectionFactory(XMLStreamReader reader) throws XMLStreamException {\n\n ConnectionFactoryDefinition connectionFactory = new ConnectionFactoryDefinition();\n\n connectionFactory.setName(reader.getAttributeValue(null, \"name\"));\n\n String create = reader.getAttributeValue(null, \"create\");\n if (create != null) {\n connectionFactory.setCreate(CreateOption.valueOf(create));\n }\n loadProperties(reader, connectionFactory, \"connectionFactory\");\n\n return connectionFactory;\n\n }", "public interface DataItemSource {\n\tpublic String getDataItemSourceName();\n\n\t/**\n\t * \n\t * @return A new object of the same class as the caller. All fields are reinitialized\n\t * to default state except for the disabled field, which will have the same value as the caller\n\t */\n\tpublic DataItemSource createInstanceOfSameType();\n\n\tpublic boolean isDisabled();\n\n\tpublic void setDisabled(boolean b);\n\n\tpublic ImageIcon getProfileIcon();\n\n}", "Exporter<?, ?> getExporter(String transferDataType);", "public interface IFileConfigurationLoader {\r\n\t\r\n\t/**\r\n\t * <p> Loads a FileConfiguration from the given file. </p>\r\n\t * \r\n\t * @param file File to load from\r\n\t * @return the FileConfiguration\r\n\t */\r\n\tpublic FileConfiguration loadConfiguration(File file);\r\n\t\r\n}", "abstract public Config createConfig(String path);", "@FromString\n public DataField of(final String name) {\n try {\n return instance(name);\n } catch (final IllegalArgumentException e) {\n ArgumentChecker.notNull(name, \"name\");\n final DataField dataField = DataField.parse(name);\n return addInstance(dataField);\n }\n }", "String getDataSource();", "private DataCollector getDataCollector(String name) {\n DataCollector dataCollector = collectors.get(name);\n if (dataCollector == null) {\n dataCollector = new DataCollector();\n }\n return dataCollector;\n }", "@Override\n public BaseDataProvider creatDataProvider() {\n return null;\n }", "public void testGetNewDatastoreAdapter2()\r\n {\r\n DatabaseMetaData md = new DatabaseMetaData();\r\n md.setProductName(\"unknown\");\r\n md.setProductVersion(\"1\");\r\n DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, DerbyAdapter.class.getName(), pluginMgr);\r\n assertNotNull(adapter);\r\n assertEquals(DerbyAdapter.class.getName(), adapter.getClass().getName());\r\n }", "public static Factory factory() {\n return ext_accdt::new;\n }", "@SuppressWarnings(\"rawtypes\")\n @Override\n public Object getAdapter(Class adapter)\n {\n // Compare name as string to compile with RAP,\n // where the RCP IResource class is not available\n if (\"org.eclipse.core.resources.IResource\".equals(adapter.getName()))\n return null;\n return orig.getAdapter(adapter);\n }", "private static AdapterManager getAdapterManager() {\r\n return getPersistenceSession().getAdapterManager();\r\n }", "public interface DispersionDataSource {\n\n}", "public OwlimRepositoryFactory() {\n\t\t\tthis(IWBFileUtil.getFileInDataFolder(Config.getConfig()\n\t\t\t\t\t\t\t.getRepositoryName()).getAbsolutePath()); \n\t\t}", "public DataFactoryImpl() {\n\t\tsuper();\n\t}", "public boolean hasAdapter(Object adaptable, String adapterTypeName);", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }" ]
[ "0.632529", "0.5794697", "0.57155794", "0.56946945", "0.5594392", "0.55807734", "0.5576359", "0.54958856", "0.5489255", "0.5484186", "0.5466684", "0.54644644", "0.5439229", "0.54195297", "0.5376617", "0.5329677", "0.5279799", "0.5260038", "0.52532446", "0.5237464", "0.5207017", "0.5197618", "0.5174874", "0.5139903", "0.5136566", "0.51297194", "0.5122831", "0.5117309", "0.51172477", "0.51096183", "0.51068133", "0.510483", "0.5099785", "0.50979304", "0.50831866", "0.50825906", "0.508255", "0.50785214", "0.505481", "0.50500315", "0.5048492", "0.50429994", "0.5042291", "0.50375813", "0.5026309", "0.50191873", "0.5010694", "0.5009197", "0.50037485", "0.50009614", "0.4996298", "0.4991411", "0.49907333", "0.49826247", "0.49806952", "0.49762326", "0.49715635", "0.49700388", "0.497002", "0.49680072", "0.4957311", "0.4957311", "0.49552628", "0.49537367", "0.49537218", "0.49526608", "0.4926696", "0.49242437", "0.49195248", "0.49148178", "0.49118617", "0.49084198", "0.4908141", "0.4898491", "0.4897558", "0.48923957", "0.48827285", "0.48824638", "0.48814312", "0.4880861", "0.48803025", "0.48747206", "0.48709148", "0.4864707", "0.48564923", "0.48461914", "0.48403934", "0.4830555", "0.4830039", "0.4828121", "0.48249748", "0.48218155", "0.48201954", "0.48126128", "0.48102838", "0.48089233", "0.48068386", "0.4798334", "0.4798299", "0.47924662" ]
0.7103109
0
Method used to apply configuration to data adapter
public void configure(HashMap<String,Object> config) { this.name = config.getOrDefault("name","").toString(); this.collections = (HashMap<String,Object>)config.getOrDefault("collections",new HashMap<>()); try { this.syslogConfig = (HashMap<String,Object>)config.getOrDefault("syslog", LoggerApplication.getInstance().getSyslogConfig()); } catch (Exception e) {e.printStackTrace();} this.syslog = new Syslog(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void Configure( DataMap<String, Serializable> configuration);", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }", "void setConfiguration();", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "protected void additionalConfig(ConfigType config){}", "void applyConfiguration(Configuration configuration);", "public void updateConfig() {\n conf.set(\"racetype\", raceType.name());\n conf.set(\"perkpoints\", perkpoints);\n conf.set(\"health\", getHealth());\n\n if (conf.isSet(\"binds\")) {\n conf.set(\"binds\", null);\n }\n\n if (!binds.getBinds().isEmpty()) {\n for (Bind b : binds.getBinds()) {\n String key = b.getItem().name().toLowerCase() + b.getData();\n conf.set(\"binds.\" + key + \".item\", b.getItem().name());\n conf.set(\"binds.\" + key + \".data\", b.getData());\n List<String> abilities = Lists.newArrayList();\n b.getAbilityTypes().stream().forEach(a -> abilities.add(a.name()));\n conf.set(\"binds.\" + key + \".abilities\", abilities);\n }\n }\n\n\n AbilityFileManager.saveAbilities(this);\n }", "private void config() {\n\t}", "@Override\n public void setConf(Configuration conf) {\n }", "private void initializeAdapter() {\n }", "abstract public void setUpAdapter();", "@Override\n public void configure(List<SensorConfiguration> config) {\n }", "@Override\r\n\tprotected void configure() {\n\t\t\r\n\t}", "@Override\n\tpublic void configure(List<SensorConfiguration> config) {\n\t\t\n\t}", "public void configure(Map<String, String> configuration) throws AlgebricksException;", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "public ExamMagicDataModule(Configuration config){\r\n\t\tthis.config = config;\r\n\t}", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "void configure(DecisionContextItemConfig config);", "@Override\n\tpublic void configure() {\n\n\t}", "@Override\n public void configure() {\n }", "@Override\n public DataSourceConfiguration getConfiguration() {\n return configuration;\n }", "@Override\n\tpublic void configure() {\n\t\t\n\t}", "void configurationUpdated();", "public void updateConfig() {\n String[] config = getConfiguration();\n Config.MEASUREMENT_INTERVAL = (int)Double.parseDouble(config[2]);\n Config.MAX_INJECTION = Double.parseDouble(config[3]);\n Config.MIN_INJECTION = Double.parseDouble(config[4]);\n Config.MAX_CUMULATIVE_DOSE = Double.parseDouble(config[5]);\n }", "private void configureRecyclerView(){\n this.postAdapter = new PostAdapter(generateOptionsForAdapter(PostHelper.getAllMyPosts(BaseActivity.getUid())),\n Glide.with(this), this,false, false);\n\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n recyclerView.setAdapter(this.postAdapter);\n }", "private void RVConfig(ArrayList<HomeViewModel> data) {\n LinearLayoutManager manager = new LinearLayoutManager(mCurrent);\n mRV.setLayoutManager(manager);\n RVHomeAdapter adapter = new RVHomeAdapter(getContext(), data);\n mRV.setAdapter(adapter);\n }", "@Override\n\tprotected void configure() {\n\n\t}", "private DataSourceConfig(DataSourceConfig parent, Map<String, String> conf) {\n $.copy(parent).to(this);\n init(parent.id, conf, true);\n readOnly = true;\n }", "void configure(String name, Map<String, Object> configuration);", "public IConfigAdditionalData provideAdditionalData();", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "@Override\n protected void configure() {\n }", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}", "private void configure() throws InvalidStateException {\r\n // Default options\r\n mRenderer.setBackgroundColor(mContext.getResources().getColor(R.color.white));\r\n mRenderer.setMarginsColor(mContext.getResources().getColor(R.color.white));\r\n mRenderer.setLabelsColor(mContext.getResources().getColor(R.color.grey_darker));\r\n mRenderer.setXLabelsColor(mContext.getResources().getColor(R.color.grey_darker));\r\n mRenderer.setYLabelsColor(0, mContext.getResources().getColor(R.color.grey_darker));\r\n mRenderer.setYLabelsColor(1, mContext.getResources().getColor(R.color.grey_darker));\r\n mRenderer.setXLabelsAlign(Align.CENTER);\r\n mRenderer.setYLabelsAlign(Align.RIGHT);\r\n mRenderer.setYLabelsAlign(Align.LEFT, 1);\r\n mRenderer.setYAxisAlign(Align.RIGHT, 1);\r\n mRenderer.setAxesColor(mContext.getResources().getColor(R.color.grey_lighter));\r\n mRenderer.setLabelsTextSize(mTextSize);\r\n mRenderer.setAxisTitleTextSize(mTextSize);\r\n mRenderer.setApplyBackgroundColor(true);\r\n mRenderer.setShowGrid(true);\r\n\r\n int padding = 10;\r\n mRenderer.setXLabelsPadding(padding);\r\n mRenderer.setYLabelsPadding(padding);\r\n mRenderer.setYLabelsVerticalPadding(padding);\r\n\r\n if (Graph.TYPE_BAR.equals(mData.getType())) {\r\n mRenderer.setBarSpacing(0.5);\r\n }\r\n\r\n // User-configurable options\r\n mRenderer.setXTitle(mData.getConfiguration(\"x-title\", \"\"));\r\n mRenderer.setYTitle(mData.getConfiguration(\"y-title\", \"\"));\r\n mRenderer.setYTitle(mData.getConfiguration(\"secondary-y-title\", \"\"), 1);\r\n\r\n if (Graph.TYPE_BAR.equals(mData.getType())) {\r\n XYMultipleSeriesRenderer.Orientation orientation = getOrientation();\r\n mRenderer.setOrientation(orientation);\r\n if (orientation.equals(XYMultipleSeriesRenderer.Orientation.VERTICAL)) {\r\n mRenderer.setXLabelsAlign(Align.LEFT);\r\n mRenderer.setXLabelsPadding(0);\r\n }\r\n }\r\n\r\n if (mData.getConfiguration(\"x-min\") != null) {\r\n mRenderer.setXAxisMin(parseXValue(mData.getConfiguration(\"x-min\"), \"x-min\"));\r\n }\r\n if (mData.getConfiguration(\"y-min\") != null) {\r\n mRenderer.setYAxisMin(parseYValue(mData.getConfiguration(\"y-min\"), \"y-min\"));\r\n }\r\n if (mData.getConfiguration(\"secondary-y-min\") != null) {\r\n mRenderer.setYAxisMin(parseYValue(mData.getConfiguration(\"secondary-y-min\"), \"secondary-y-min\"), 1);\r\n }\r\n\r\n if (mData.getConfiguration(\"x-max\") != null) {\r\n mRenderer.setXAxisMax(parseXValue(mData.getConfiguration(\"x-max\"), \"x-max\"));\r\n }\r\n if (mData.getConfiguration(\"y-max\") != null) {\r\n mRenderer.setYAxisMax(parseYValue(mData.getConfiguration(\"y-max\"), \"y-max\"));\r\n }\r\n if (mData.getConfiguration(\"secondary-y-max\") != null) {\r\n mRenderer.setYAxisMax(parseYValue(mData.getConfiguration(\"secondary-y-max\"), \"secondary-y-max\"), 1);\r\n }\r\n\r\n boolean showGrid = Boolean.valueOf(mData.getConfiguration(\"show-grid\", \"true\")).equals(Boolean.TRUE);\r\n mRenderer.setShowGridX(showGrid);\r\n mRenderer.setShowGridY(showGrid);\r\n mRenderer.setShowCustomTextGridX(showGrid);\r\n mRenderer.setShowCustomTextGridY(showGrid);\r\n\r\n String showAxes = mData.getConfiguration(\"show-axes\", \"true\");\r\n if (Boolean.valueOf(showAxes).equals(Boolean.FALSE)) {\r\n mRenderer.setShowAxes(false);\r\n }\r\n\r\n // Legend\r\n boolean showLegend = Boolean.valueOf(mData.getConfiguration(\"show-legend\", \"false\"));\r\n mRenderer.setShowLegend(showLegend);\r\n mRenderer.setFitLegend(showLegend);\r\n mRenderer.setLegendTextSize(mTextSize);\r\n\r\n // Labels\r\n boolean hasX = configureLabels(\"x-labels\");\r\n boolean hasY = configureLabels(\"y-labels\");\r\n configureLabels(\"secondary-y-labels\");\r\n boolean showLabels = hasX || hasY;\r\n mRenderer.setShowLabels(showLabels);\r\n // Tick marks are sometimes ugly, so let's be minimalist and always leave the off\r\n mRenderer.setShowTickMarks(false);\r\n }", "@Override\n\tpublic void onConfigurationUpdate() {\n\t}", "public void setConfiguration(Properties props);", "public void loadConfig() {\n\t}", "public void configure() throws ConfigurationException;", "private void configureNode() {\n\t\twaitConfigData();\n\t\tpropagateConfigData();\n\n\t\tisConfigured = true;\n\t}", "public void configurableDataInput() {\n }", "@Override\n\tprotected void initDataSource() {\n\t}", "@Bean\n\tprotected void populateDiscountData()\n\t{\n\n\t\tSystem.out.println(\"Populating regularUserDataConfig !!!!\");\n\n\n\t\tDiscountConfigData firstSlabDiscountConfigData=getFirstSlabForRegularCustomer();\n\t\tDiscountConfigData secondSlabDiscountConfigData=getSecondSlabForRegularCustomer();\n\t\tDiscountConfigData thirdSlabDiscountConfigData=getThirdSlabForRegularCustomer();\n\t\tList<DiscountConfigData> regularDataList= new ArrayList<DiscountConfigData>();\n\t\tregularDataList.add(firstSlabDiscountConfigData);\n\t\tregularDataList.add(secondSlabDiscountConfigData);\n\t\tregularDataList.add(thirdSlabDiscountConfigData);\n\t\tDiscountConfigData.put(DiscountCalConstants.REGULAR_CUSTOMER_TYPE,regularDataList);\n\t\t\n\t\t\n\t\tDiscountConfigData firstSlabDiscountPremiumData=getFirstSlabForPremiumCustomer();\n\t\tDiscountConfigData secondSlabDiscountPremiumData=getSecondSlabForPremiumCustomer();\n\t\tDiscountConfigData thirdSlabDiscountPremiumData=getThirdSlabForPremiumCustomer();\n\t\tDiscountConfigData fourthSlabDiscountPremiumData=getFourthSlabForPremiumCustomer();\n\t\tList<DiscountConfigData> premiumDataList= new ArrayList<DiscountConfigData>();\n\t\tpremiumDataList.add(firstSlabDiscountPremiumData);\n\t\tpremiumDataList.add(secondSlabDiscountPremiumData);\n\t\tpremiumDataList.add(thirdSlabDiscountPremiumData);\n\t\tpremiumDataList.add(fourthSlabDiscountPremiumData);\n\t\tDiscountConfigData.put(DiscountCalConstants.PREMIUM_CUSTOMER_TYPE,premiumDataList);\n\n\n\t}", "@Override\n protected void configure() {\n bind(EurekaInstanceConfig.class).toProvider(MyDataCenterInstanceConfigProvider.class).in(Scopes.SINGLETON);\n }", "void configure();", "public ConfigurationItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "@Override\r\n\tpublic void configEngine(Engine me) {\n\r\n\t}", "@Override\r\n public void configure(Map<String, ?> configs, boolean isKey) {\n \r\n }", "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "@Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n }", "@Override\r\n\tpublic void configure() throws Exception {\n\t\t\r\n\t}", "private void configRecyclerView() {\n if(getActivity().getResources().getConfiguration().orientation==1) {\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),2);\n gridLayoutManager.setSpanSizeLookup(adapter.obtainGridSpanSizeLookUp(2));\n recyclerView.setLayoutManager(gridLayoutManager);\n } else{\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(),3);\n gridLayoutManager.setSpanSizeLookup(adapter.obtainGridSpanSizeLookUp(3));\n recyclerView.setLayoutManager(gridLayoutManager);\n }\n //设置没有网络的状态\n recyclerView.setEmptyView(R.layout.view_empty);\n recyclerView.setProgressView(R.layout.view_complete);\n //写刷新事件\n recyclerView.setRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n recyclerView.postDelayed(new Runnable() {\n @Override\n public void run() {\n adapter.clear();\n currentPage = 1;\n page = 1;\n //getData();\n getLocalData();\n }\n }, 1000);\n }\n });\n }", "void configuration(String source, String name, String value);", "@Override\n\tpublic void configure(Map<String, ?> configs, boolean isKey) {\n\t}", "public abstract void updatePendingConfiguration(Configuration config);", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "public ColumnConfigProvider(ColumnConfig config){\r\n\t\tthis.config = config;\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void configure(Context arg0) {\n\n\t}", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "private void updateConfig(){\n try {\n BeanUtils.copyProperties(config_,newConfig_);//copy the properties of newConfig_ into config_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n }\n }", "private void applyConfig(GraphQLClientConfiguration configuration) {\n if (this.endpoint == null && configuration.getUrl() != null) {\n this.endpoint = URI.create(configuration.getUrl());\n }\n if (this.websocketUrl == null && configuration.getWebsocketUrl() != null) {\n this.websocketUrl = configuration.getWebsocketUrl();\n }\n if (this.headers == null && configuration.getHeaders() != null) {\n this.headers = configuration.getHeaders();\n }\n if (this.initPayload == null && configuration.getInitPayload() != null) {\n this.initPayload = configuration.getInitPayload();\n }\n if (this.websocketInitializationTimeout == null && configuration.getWebsocketInitializationTimeout() != null) {\n this.websocketInitializationTimeout = configuration.getWebsocketInitializationTimeout();\n }\n if (executeSingleOperationsOverWebsocket == null && configuration.getExecuteSingleOperationsOverWebsocket() != null) {\n this.executeSingleOperationsOverWebsocket = configuration.getExecuteSingleOperationsOverWebsocket();\n }\n if (allowUnexpectedResponseFields == null && configuration.getAllowUnexpectedResponseFields() != null) {\n this.allowUnexpectedResponseFields = configuration.getAllowUnexpectedResponseFields();\n }\n\n if (configuration.getWebsocketSubprotocols() != null) {\n configuration.getWebsocketSubprotocols().forEach(protocol -> {\n try {\n WebsocketSubprotocol e = WebsocketSubprotocol.fromString(protocol);\n this.subprotocols.add(e);\n } catch (IllegalArgumentException e) {\n log.warn(e);\n }\n });\n }\n\n VertxClientOptionsHelper.applyConfigToVertxOptions(options, configuration);\n }", "public void\t\tsetConfiguration(Object obj);", "@Override\n\tpublic void configure(Context arg0) {\n\t\t\n\t}", "@Override\n\tpublic void configure(Context arg0) {\n\t\t\n\t}", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "@Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n }", "public abstract boolean updateConfig();", "private void loadConfiguration() {\n // TODO Get schema key value from model and set to text field\n /*\n\t\t * if (!StringUtils.isBlank(schemaKey.getKeyValue())) {\n\t\t * schemaKeyTextField.setText(schemaKey.getKeyValue()); }\n\t\t */\n }", "void configure (Settings settings);", "private void configureRecyclerView(){\r\n // - Reset list\r\n this.users = new ArrayList<>();\r\n // - Create adapter passing the list of Restaurants\r\n this.mCoworkerAdapter = new CoWorkerAdapter(this.users, Glide.with(this), true);\r\n // - Attach the adapter to the recyclerview to populate items\r\n this.recyclerView.setAdapter(this.mCoworkerAdapter);\r\n // - Set layout manager to position the items\r\n this.recyclerView.setLayoutManager(new LinearLayoutManager(RestaurantDetailActivity.this));\r\n }", "@Override\n\tpublic void configure(JSONObject settings)\n\t{\n\t\tthrow new UnsupportedOperationException();\n\t}", "private void saveConfiguration() {\n }", "protected abstract void initializeImpl(Map<String,String> configuration);", "public interface BaseDataSource {\n\n /**\n * 用户登录\n * @param callback\n */\n void userLogin(String mobileNo, CustomObserver callback);\n\n /**\n * 发布内容\n * @param article\n * @param callback\n */\n void publishArticle(ArticleModel article, CustomObserver callback);\n\n /**\n * 获取主题列表\n * @param callback\n */\n void getThemeList(CustomObserver callback);\n\n /**\n * 获取文章列表\n * @param queryType\n * @param sortType\n * @param currentUserId\n * @param city\n * @param latitude\n * @param longtitude\n * @param price\n * @param theme\n * @param userId\n * @param pageNum\n * @param callback\n */\n void queryArticleList(String queryType, String sortType, String currentUserId, String city, double latitude, double longtitude, String price, String theme, String userId, int pageNum, CustomObserver callback);\n\n\n /**\n * 获取文章详情\n * @param issueId\n * @param callback\n */\n void getArticleDetail(String issueId, String userId, CustomObserver callback);\n\n /**\n * 修改用户名称\n * @param name\n * @param userId\n * @param callback\n */\n void resetUserName(String name, String userId,CustomObserver callback);\n\n /**\n * 修改用户头像\n * @param avatar\n * @param userId\n * @param callback\n */\n void resetAvatar(PictureModel avatar, String userId, CustomObserver callback);\n\n /**\n * 修改用户性别\n * @param sex\n * @param userId\n * @param callback\n */\n void resetSex(String sex, String userId,CustomObserver callback);\n\n /**\n * 修改用户性别\n * @param birthday\n * @param userId\n * @param callback\n */\n void resetBirthday(String birthday, String userId,CustomObserver callback);\n\n /**\n * 修改用户位置\n * @param location\n * @param userId\n * @param callback\n */\n void resetLocation(String location, String userId,CustomObserver callback);\n\n /**\n * 获取主题对应价格列表\n * @param theme\n * @param callback\n */\n void getThemePriceList(String theme,CustomObserver callback);\n\n /**\n * 关注功能\n * @param attentionId\n * @param userId\n * @param callback\n */\n void addAttention(String attentionId,String userId,CustomObserver callback);\n\n /**\n * 收藏功能\n * @param issueId\n * @param userId\n * @param callback\n */\n void addCollection(String issueId,String userId,CustomObserver callback);\n\n /**\n * 点赞功能\n * @param issueId\n * @param userId\n * @param callback\n */\n void addLike(String issueId,String userId,CustomObserver callback);\n\n /**\n * 获取关注列表\n * @param type\n * @param userId\n * @param callback\n */\n void getUserList(String type, String userId,CustomObserver callback);\n\n /**\n * 获取用户信息\n * @param attentionId\n * @param userId\n * @param callback\n */\n void getUserInfo(String attentionId, String userId,CustomObserver callback);\n\n /**\n * 删除文章\n * @param issueId\n * @param callback\n */\n void deleteArticle(String issueId,CustomObserver callback);\n\n /**\n * 查询文章\n * @param message\n * @param userId\n * @param callback\n */\n void searchArticle(String message, String userId,CustomObserver callback);\n\n /**\n * 添加评论\n * @param issueId\n * @param content\n * @param pid\n * @param replyUserId\n * @param time\n * @param userId\n * @param callback\n */\n void addComment(String issueId, String content, String pid, String replyUserId, String time, String userId,CustomObserver callback);\n\n /**\n * 查找评论\n * @param issueId\n * @param callback\n */\n void findComment(String issueId, CustomObserver callback);\n\n /**\n * 删除评论\n * @param commentId\n * @param callback\n */\n void deleteComment(String commentId, CustomObserver callback);\n}", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "@Override\n\tpublic void onConfigurationSuccess(ITestResult itr) {\n\t\t\n\t}", "@Override\n public void configure(Configuration conf) throws ConfigurationException\n {\n super.configure( conf );\n lazyLoading = conf.getAttributeAsBoolean( LAZY_LOADING, false);\n getLogger().debug(\"setting lazyLoading: \" + lazyLoading);\n }", "@Override\r\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\r\n\t\tandroid.view.ViewGroup.LayoutParams layoutParams = mContentLayout.getLayoutParams();\r\n\t\tlayoutParams.height = (int) getResources().getDimension(R.dimen.folder_edit_view_height);\r\n\t\tlayoutParams.width = (int) getResources().getDimension(R.dimen.folder_edit_view_width);\r\n\t\tmContentLayout.setLayoutParams(layoutParams);\r\n\t\tif (mGridView != null) {\r\n\t\t\tmGridView.changeOrientation();\r\n\t\t\tmGridView.removeAllViews();\r\n\t\t\tif (mList == null) {\r\n\t\t\t\tinitList();\r\n\t\t\t} else {\r\n\t\t\t\tmGridView.initLayoutData(mList.size());\r\n\t\t\t\tsetAdapter();\r\n\t\t\t\tmIndicator.setTotal(mGridView.getScreenCount());\r\n\t\t\t\tmIndicator.setCurrent(0);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void configuration(String csv) {\n\n\t}", "public Object\tgetConfiguration();", "public abstract Configuration configuration();", "@Override\r\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\r\n//\t\tDisplayMetrics dm = new DisplayMetrics();\r\n//\t\tthis.getWindowManager().getDefaultDisplay().getMetrics(dm);\r\n//\t\twidth = dm.widthPixels;\r\n\t\t//mGridViewAdapter = new LocalPhotoAdapter(this, 0, FileTools.getUrls(GlobalApp.DOWNLOAD_PATH), mGridView, width);\r\n\t\t//mGridView.setAdapter(mGridViewAdapter);\r\n//\t\ttry {\r\n//\t\t\tThread.currentThread().sleep(5000);\r\n//\t\t} catch (InterruptedException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t\tDisplayMetrics dm = new DisplayMetrics();\r\n\t\tthis.getWindowManager().getDefaultDisplay().getMetrics(dm);\r\n\t\twidth = dm.widthPixels;\r\n\t\tfileList = FileTools.getUrls(GlobalApp.DOWNLOAD_PATH);\r\n\t\tmGridViewAdapter = null;\r\n\t\tLog.d(\"1111\",\"new LocalPhotoAdapter\");\r\n\t\t\tmGridViewAdapter = new LocalPhotoAdapter(LocalPhotoWallActivity.this,fileList, mGridView,width);\r\n\t\t\t//mGridViewAdapter.notifyDataSetInvalidated();\r\n\t\t\tmGridView.setAdapter(mGridViewAdapter);\r\n\t\t\tmGridViewAdapter.notifyDataSetInvalidated();\r\n\t\t\ttotalNum.setText(fileList.length+\" files\");\t\r\n\t\t\tmGridView.invalidate();\r\n\t\r\n\t}", "public void configureData(){\n listExpandable = (ExpandableListView) findViewById(R.id.expandableList);\n mlaListData = new MLAListData(user.userType);\n listHashMap = mlaListData.getlist();\n listPrimary = new ArrayList<>(listHashMap.keySet());\n\n // Configure the data in Adapter.\n adapter = new MLAMenuAdapter(this, listHashMap, listPrimary);\n listExpandable.setAdapter(adapter);\n\n drawerLayout = (DrawerLayout) findViewById(R.id.dawerLayout);\n actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.mla_drawer_open, R.string.mla_drawer_close);\n drawerLayout.setDrawerListener(actionBarDrawerToggle);\n\n navDrawerList = (LinearLayout) findViewById(R.id.drawer1);\n actionBar = getSupportActionBar();\n actionBar.setDisplayShowHomeEnabled(true);\n actionBar.setDisplayHomeAsUpEnabled(true);\n }", "public abstract void configure(T object, U configuration);", "void overwriteConfiguration(Map<String, Object> config);", "void config(Config config);", "public void applyConfiguration() throws Exception {\n\t\tLOGGER.info(\"Start day-2 configuration\");\n\t\tdhcpConf();\n\t\tbgpPrefixConf();\n\t\tstaticRoutesConfig();\n\t\tnatConfig();\n\t\tpatConf();\n\t\tconfAcl();\n\t\tLOGGER.info(\"End day-2 configuration\");\n\t}", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "@Override\n\tpublic void configure(JobConf arg0) {\n\t\t\n\t}", "@Override\n\tpublic void configure(AladinScriptActivityConfigurationBean configBean)\n\t\t\tthrows ActivityConfigurationException {\n\t\t\n\t\tif(!( configBean.getTypeOfInput().compareTo(\"File\")==0\n\t\t\t\t|| configBean.getTypeOfInput().compareTo(\"URL\")==0\n\t\t\t\t|| configBean.getTypeOfInput().compareTo(\"String\")==0)){\n\t\t\tthrow new ActivityConfigurationException(\n\t\t\t\t\t\"Invalid input type for the tables\");\n\t\t}\n\t\t\n\t\tif(!( configBean.getTypeOfMode().compareTo(\"gui\")==0\n\t\t\t\t|| configBean.getTypeOfMode().compareTo(\"nogui\")==0)){\n\t\t\tthrow new ActivityConfigurationException(\n\t\t\t\t\t\"Invalid type of process.\");\n\t\t}\n\t\t\n\t\t\n\t\t// Store for getConfiguration(), but you could also make\n\t\t// getConfiguration() return a new bean from other sources\n\t\tthis.configBean = configBean;\n\n\t\t// OPTIONAL: \n\t\t// Do any server-side lookups and configuration, like resolving WSDLs\n\n\t\t// myClient = new MyClient(configBean.getExampleUri());\n\t\t// this.service = myClient.getService(configBean.getExampleString());\n\n\t\t\n\t\t// REQUIRED: (Re)create input/output ports depending on configuration\n\t\tconfigurePorts();\n\t}", "@Override\n public void configure() throws Exception {\n BankAccountManagementService bankAccountManagementService = services.get(BankAccountManagementService.class);\n UserManagementService userManagementService = services.get(UserManagementService.class);\n ObjectMapper mapper = JsonMapperFactory.getObjectMapper();\n if (this.filePathAString == null) {\n throw new Exception(\"No config file provided, please set the cashmanager.config.localfile property\");\n }\n LocalFileDTO fileConfig = mapper.readValue(new File(filePathAString), LocalFileDTO.class);\n this.preferences = new HashMap<String, String>(fileConfig.preferences);\n fileConfig.accounts.forEach((account) ->\n bankAccountManagementService.registerNewAcount(account.getId(), account.getBalance())\n );\n fileConfig.users.forEach((user) ->\n userManagementService.registerUser(user.getId(), user.getPassword())\n );\n }", "public void editDataInConfiguration(String alias, ArrayList<String> actName, ArrayList<String> description, ArrayList<LocalDate> createDate,\n boolean isRelease, ArrayList<ArrayList<Integer>> cprs,\n ArrayList<ArrayList<Integer>> changeIndexs, ArrayList<ArrayList<Integer>> branchIndexs, ArrayList<Integer> branchIndicators,\n ArrayList<Integer> cprIndicators, ArrayList<Integer> nameIndicator, ArrayList<Integer> descriptionIndicator, ArrayList<Integer> tag, ArrayList<Integer> tagIndicator, ArrayList<Integer> createdIndicator,\n ArrayList<Integer> changeIndicator, int instanceCount, int countIndicator, boolean exist, int id) {\n Configuration configuration = dataModel.getConfiguration(id);\n dataModel.addDataToConfiguration(configuration, alias, actName, description, createDate, isRelease, cprs, changeIndexs, branchIndexs,\n cprIndicators, nameIndicator, descriptionIndicator, tag, tagIndicator, createdIndicator, changeIndicator, branchIndicators, instanceCount, countIndicator, exist);\n\n }", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "@Override\n public void configure(@Nonnull AbstractConfigNode node) throws ConfigurationException {\n Preconditions.checkArgument(node instanceof ConfigPathNode);\n try {\n ConfigurationAnnotationProcessor.readConfigAnnotations(getClass(), (ConfigPathNode) node, this);\n Map<String, Object> config = configuration(node);\n ClientBuilder builder = ClientBuilder.newBuilder();\n if (config != null && !config.isEmpty()) {\n for (String key : config.keySet()) {\n builder.property(key, config.get(key));\n }\n }\n builder.connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS);\n builder.readTimeout(readTimeout, TimeUnit.MILLISECONDS);\n\n if (useSSL) {\n builder.sslContext(SSLContext.getDefault());\n }\n client = builder.register(JacksonJaxbJsonProvider.class).build();\n state().setState(EConnectionState.Open);\n } catch (Exception ex) {\n state().setError(ex);\n throw new ConfigurationException(ex);\n }\n }", "@Override\n public void setConfigParams(Map<String, Object> params) {\n\n }" ]
[ "0.67606646", "0.6409498", "0.63346654", "0.6014171", "0.5987238", "0.59855", "0.59681416", "0.58530307", "0.579445", "0.5784371", "0.57681185", "0.5763057", "0.5742769", "0.57293713", "0.5724988", "0.5717831", "0.5717031", "0.57029206", "0.56918544", "0.5646217", "0.56401044", "0.5631829", "0.5610507", "0.5588876", "0.55711347", "0.5570219", "0.55653447", "0.5565052", "0.5562714", "0.5562616", "0.5548781", "0.55438584", "0.5541594", "0.5527537", "0.55264384", "0.54744375", "0.5453735", "0.5453014", "0.5451242", "0.5448301", "0.543773", "0.5435296", "0.5427777", "0.5420111", "0.54116035", "0.5405387", "0.5403376", "0.53974533", "0.5395278", "0.5386424", "0.5354941", "0.53515536", "0.53354317", "0.53349805", "0.53303033", "0.53292954", "0.53246856", "0.53234327", "0.53210545", "0.532079", "0.53189504", "0.5307739", "0.52910995", "0.5280219", "0.5280219", "0.5269203", "0.52659595", "0.52544355", "0.5253447", "0.52528125", "0.5252037", "0.52509904", "0.52503794", "0.5246871", "0.52445006", "0.5232473", "0.5230987", "0.52302134", "0.5220212", "0.5218945", "0.5218458", "0.5215112", "0.5211865", "0.52078307", "0.52060634", "0.5202501", "0.5192576", "0.5192376", "0.5187866", "0.5187866", "0.5187866", "0.5187866", "0.5187866", "0.5187866", "0.5181737", "0.51781577", "0.517727", "0.5176406", "0.5172479", "0.51694113", "0.51509124" ]
0.0
-1
Public method used by consumers to select data from data source
public ArrayList<HashMap<String,Object>> select(String sql,String collectionName) { return processQueryResult(executeSelectQuery(sql),collectionName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract ConnectorResultSet select(DataRequest source) throws ConnectorOperationException;", "@Override\r\n public DataSource selectDataSource(String tenantIdentifier) {\n\r\n tenantIdentifier = initializeTenantIfLost(tenantIdentifier);\r\n\r\n if (!this.dataSourcesMtApp.containsKey(tenantIdentifier)) {\r\n List<MasterTenant> masterTenants = masterTenantRepo.findAll();\r\n LOG.info(\r\n \">>>> selectDataSource() -- tenant:\" + tenantIdentifier + \" Total tenants:\" + masterTenants.size());\r\n for (MasterTenant masterTenant : masterTenants) {\r\n dataSourcesMtApp.put(masterTenant.getTenantId(),\r\n DataSourceUtil.createAndConfigureDataSource(masterTenant));\r\n }\r\n }\r\n return this.dataSourcesMtApp.get(tenantIdentifier);\r\n }", "public void select(String data, String objectName) {\n\t\n}", "void selectDataSource(Long dataSourceId) {\n dataSourcesPanel.selectDataSource(dataSourceId);\n }", "protected abstract void select();", "public EODataSource queryDataSource();", "DataSelector getDataSelector(SqlSearch search) throws FxSqlSearchException;", "@Override\r\n protected DataSource selectAnyDataSource() {\n if (dataSourcesMtApp.isEmpty()) {\r\n List<MasterTenant> masterTenants = masterTenantRepo.findAll();\r\n LOG.info(\">>>> selectAnyDataSource() -- Total tenants:\" + masterTenants.size());\r\n for (MasterTenant masterTenant : masterTenants) {\r\n dataSourcesMtApp.put(masterTenant.getTenantId(),\r\n DataSourceUtil.createAndConfigureDataSource(masterTenant));\r\n }\r\n }\r\n return this.dataSourcesMtApp.values().iterator().next();\r\n }", "private void refreshData() {\n try {\n setDataSource(statement.executeQuery(\"select * from \" + sourceTableName));\n } catch (SQLException e) {\n System.err.println(\"Can't execute statement\");\n e.printStackTrace();\n }\n }", "public void select() {}", "@Override\n protected void processSelect() {\n \n }", "public void select();", "private void selectedDataSourceChanged() {\n\t\tselectedDataSource = (DataSource) jcbDataSource.getSelectedItem();\n\t\tif (selectedDataSource != null) {\n\t\t\ttry {\n\t\t\t\tList<DASType> dasTypeList = selectedDasConnector.getDASTypeList(selectedDataSource);\n\t\t\t\tjcbDasType.removeAllItems();\n\t\t\t\tfor (DASType currentDataType: dasTypeList) {\n\t\t\t\t\tjcbDasType.addItem(currentDataType);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tExceptionManager.getInstance().caughtException(Thread.currentThread(), e, \"Error when retrieving the data types from \" + selectedDataSource);\n\t\t\t}\n\t\t}\n\t}", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Override\n\tpublic void select() {\n\t}", "public void select ();", "String getDataSource();", "public List<ErpBookInfo> selData();", "@Override\r\n protected boolean isUseDataSource() {\r\n return true;\r\n }", "public void setDatasource(String val)\r\n\t{\r\n\t\t_dataSource = val;\r\n\t}", "ManageableHistoricalTimeSeriesInfo select(Collection<ManageableHistoricalTimeSeriesInfo> candidates, String selectionKey);", "@Override\n public String getDataSource()\n {\n return dataSource;\n }", "String afficherDataSource();", "void select();", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "@Override\r\n\tprotected Object getSelectData() {\n\t\treturn null;\r\n\t}", "private void selectedServerChanged() {\n\t\tDASServer selectedServer = (DASServer) jcbServer.getSelectedItem();\n\t\tif (selectedServer != null) {\n\t\t\tselectedDasConnector = new DASConnector(selectedServer.getURL());\n\t\t\ttry {\n\t\t\t\tList<DataSource> dataSourceList = selectedDasConnector.getDataSourceList();\n\t\t\t\tjcbDataSource.removeAllItems();\n\t\t\t\tfor (DataSource currentSource: dataSourceList) {\n\t\t\t\t\tjcbDataSource.addItem(currentSource);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tExceptionManager.getInstance().caughtException(Thread.currentThread(), e, \"Error when retrieving the data sources from \" + selectedServer);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void initDataSource() {\n\t}", "protected abstract void retrievedata();", "@Override\r\n public void select(String name, String origin, String destination) {\n }", "@Override\r\n\tpublic void adminSelectRead() {\n\t\t\r\n\t}", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}", "@Test\n\tpublic void testSingleSourceSelect() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource01.rq\", \"/tests/basic/query_singleSource01.srx\", false);\n\t}", "@Override\r\n\t\t\t\t\tpublic void dragSetData(DragSourceEvent event) {\n\t\t\t\t\t\tLocalSelectionTransfer transfer=LocalSelectionTransfer.getTransfer();\r\n\t\t\t\t\t\tif (transfer.isSupportedType(event.dataType)) {\r\n\t\t\t\t\t\t\ttransfer.setSelection(tableViewer.getSelection());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "public void otherRead(IDataHolder dc);", "protected String getDataSourceId() {\n return getDataSourceId(sourceComboBox);\n }", "public void setDatasource(DataSource source) {\n datasource = source;\n }", "@Override\n\tpublic void setDataSource(DataSource dataSource) {\n\t}", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "public DataSource getDataSource() {\n return _dataSource;\n }", "public interface DatabaseReaderSelector {\n DatabaseReader getDbReader(String dbId);\n}", "public void setDataSource(String newValue) {\n String oldValue = this.dataSource;\n this.dataSource = newValue;\n firePropertyChange(DATA_SOURCE, oldValue, newValue);\n }", "public String getDatasource()\r\n\t{\r\n\t\treturn _dataSource;\r\n\t}", "Source updateDatasourceOAI(Source ds) throws RepoxException;", "private void ini_SelectDB()\r\n\t{\r\n\r\n\t}", "@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}", "@Override\r\n\tpublic Collection selectALLData(Connection con) {\n\t\treturn select(con);\r\n\t}", "protected DataSource getDataSource() {\n\t\treturn dataSource;\n\t}", "public DataPoint getSelDataPoint() { return _selPoint; }", "public void selectDriver();", "public void setDatasource( String ds )\n {\n datasource = ds;\n }", "@Override\n\tprotected void getDataRefresh() {\n\t\t\n\t}", "public DataSource getDataSource() {\n return dataSource;\n }", "List<CptDataStore> selectByExample(CptDataStoreExample example);", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "List<ConfigData> selectByExample(ConfigDataExample example);", "protected abstract String getDatasourceName();", "DatasetFileService getSource();", "@Override\r\n\tpublic List<Map<String, Object>> selectTarget() throws Exception {\n\t\treturn dao.selectTargetManage();\r\n\t}", "DataSources retrieveDataSources() throws RepoxException;", "Select(){\n }", "public DataSource getDataSource() {\n return datasource;\n }", "List fetchBySourceDatabase(String sourceDatabaseName, String sourceID) throws AdaptorException ;", "public abstract Statement queryToRetrieveData();", "Object getCurrentData();", "private synchronized String prepareSelection(DataSource dataSource) {\n String selection = \"\";\n if (dataSource.getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_DATASOURCE_ID + \"=?\";\n }\n if (dataSource.getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_DATASOURCE_TYPE + \"=?\";\n }\n if (dataSource.getPlatform() != null && dataSource.getPlatform().getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFORM_ID + \"=?\";\n }\n if (dataSource.getPlatform() != null && dataSource.getPlatform().getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFROM_TYPE + \"=?\";\n }\n if (dataSource.getPlatformApp() != null && dataSource.getPlatformApp().getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFORMAPP_ID + \"=?\";\n }\n if (dataSource.getPlatformApp() != null && dataSource.getPlatformApp().getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_PLATFROMAPP_TYPE + \"=?\";\n }\n if (dataSource.getApplication() != null && dataSource.getApplication().getId() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_APPLICATION_ID + \"=?\";\n }\n if (dataSource.getApplication() != null && dataSource.getApplication().getType() != null) {\n if (!selection.equals(\"\")) selection += \" AND \";\n selection += C_APPLICATION_TYPE + \"=?\";\n }\n if (selection.equals(\"\"))\n return null;\n return selection;\n }", "public void onSelect(Statement select, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public void setDatasource(DataSource datasource) {\n this.datasource = datasource;\n }", "public String getDataSource() {\n return dataSource;\n }", "public synchronized String getDataSource(){\n\t\treturn dataSource;\n\t}", "EDataSourceType getDataSource();", "public Object getFromData() throws AeBusinessProcessException\r\n {\r\n IAePropertyAlias propAlias = getPropertyAlias();\r\n return AePropertyAliasBasedSelector.selectValue(propAlias, getDataForQueryContext(propAlias), getCopyOperation().getContext());\r\n }", "public String getDataSource() {\n return dataSource;\n }", "@Override\n\tpublic List<LicenseProxyAppointment> selectFromLicenseProxyAppointment(\n\t\t\tString by, String condition, String dataSource) {\n\t\tif (by.trim().equals(\"USER_ID\"))\n\t\t\treturn licenseProxyAppointmentMapper.selectByUserId(condition);\n\t\telse if(by.trim().equals(\"BIZ_ID\"))\n\t\t\treturn licenseProxyAppointmentMapper.selectByBizId(condition);\n\t\telse if(by.trim().equals(\"ORDER_NO\"))\n\t\t\treturn licenseProxyAppointmentMapper.selectByOrderNo(condition);\n\t\telse\n\t\t\treturn null;\n\t}", "List fetchBySourceDatabase(String sourceDatabaseName) throws AdaptorException ;", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "@Override\n\tpublic ResultSet select() {\n\t\treturn null;\n\t}", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "Source createDatasourceOAI(Source ds, Provider prov) throws RepoxException;", "private void getDatasetsList(final String newName) {\r\n DivaClientService.getAvailableDatasets( new AsyncCallback<TreeMap<Integer, String>>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Window.alert(\"DiVAFiles folder is not available please contact the system administrator\");\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n\r\n @Override\r\n public void onSuccess(TreeMap results) {\r\n for (Object o : results.keySet()) {\r\n int key = (Integer) o;\r\n String str = formatTitle((String) results.get(key));\r\n selectDatasetList.addItem(str);\r\n datasetsNames.put(str, key);\r\n selectDatasetList.setItemSelected(0, true);\r\n tempSelectDatasetList.addItem(str);\r\n tempSelectDatasetList.setItemSelected(0, true);\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n updateSubDsSelectionList(newName);\r\n }\r\n\r\n });\r\n\r\n }", "void populateData();", "public ResultSet ServerData() {\n\t\tResultSet rs = null; //new resultset of default value null\r\n\t\ttry {\r\n\r\n\r\n\t\t\tString query = \"SELECT * FROM TBLSERVERS\"; //get all data in the TBLSERVERS table\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(query); //prepare a new statement\r\n\t\t\trs = pst.executeQuery(); //execute statement and store result in a resultset \r\n\t\t} catch (SQLException ex) { //catches SQL exception to prevent an application crash in this case\r\n\t\t\tLogger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\r\n\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "private static void DoSelection()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tString selection = \"o_orderdate > Str (\\\"1996-12-19\\\") && o_custkey < Int (100)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"o_orderkey\");\n\t\texprs.put(\"att2\", \"(o_totalprice * Float (1.5)) + Int (1)\");\n\t\texprs.put(\"att3\", \"o_orderdate + Str (\\\" this is my string\\\")\");\n\t\texprs.put(\"att4\", \"o_custkey\");\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Selection(inAtts, outAtts, selection, exprs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "abstract protected Dataset getNewCandidates();", "@Override\n protected JComboBox getDataSourcesComponent() {\n sourceComboBox = getDataSourcesComponent(true);\n if (selectDefaultDataSource && defaultDataSourceId != null) {\n Map<String, Integer> ids = comboBoxContents(sourceComboBox);\n if (ids.containsKey(defaultDataSourceId)) {\n sourceComboBox.setSelectedIndex(ids.get(defaultDataSourceId));\n defaultDataSourceName = sourceComboBox.getSelectedItem().toString();\n sourceComboBox.setVisible(false);\n }\n }\n return sourceComboBox;\n }", "public synchronized void setDataSource(String dataSource){\n\t\tthis.dataSource=dataSource;\n\t}", "@Override\r\n public ListDataProvider<QualityDataSetDTO> getListDataProvider() {\r\n return listDataProvider;\r\n }", "public static DataSource getDataSource() throws SQLException {\n return getDataSource(FxContext.get().getDivisionId(), true);\n }", "private void fetchData(int whenCode){\n NewConnection c = new NewConnection();\n int custID, custStatus, r = 0;\n String custName, custAddress, custReturnDate;\n DateConverter dc = new DateConverter();\n \n try {\n c.openConnection();\n c.ps = c.con.prepareStatement(\"SELECT * FROM custDetail\");\n c.rs = c.ps.executeQuery();\n while (c.rs.next()){\n custStatus = c.rs.getInt(\"custStatus\");\n if (custStatus == 0){\n custID = Integer.parseInt(c.rs.getString(\"custID\"));\n custName = c.rs.getString(\"custFName\");\n custName += \" \" + c.rs.getString(\"custLName\");\n custAddress = \"<html>\" + c.rs.getString(\"custHouseNo\") + \" \" + c.rs.getString(\"custStreet\") + \"<br>\";\n custAddress += c.rs.getString(\"custBarangay\") + \", \" + c.rs.getString(\"custCityOrTown\");\n if (c.rs.getString(\"custProvince\").isEmpty())\n custAddress += \"</html>\";\n else\n custAddress += \", \" + c.rs.getString(\"custProvince\");\n custReturnDate = c.rs.getString(\"custReturnDate\");\n\n switch (whenCode){\n case 1:\n if (dc.isThisWeek(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n case 2:\n if (dc.isNextWeek(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n\n case 3:\n if (dc.isUpcoming(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n default:\n System.out.println(\"*** An unexpected error occurred at PickUpDate -> fetchDate ***\");\n }\n }\n }\n } \n catch (SQLException ex) {\n Logger.getLogger(PickUpDate.class.getName()).log(Level.SEVERE, null, ex);\n }\n finally {\n c.closeConnection();\n }\n valuesHolder.setN(r);\n }" ]
[ "0.7173947", "0.6257282", "0.6237019", "0.6200492", "0.61549884", "0.6100225", "0.60978967", "0.6079801", "0.6062762", "0.60143673", "0.6000497", "0.59349513", "0.5903909", "0.58415675", "0.58415675", "0.58415675", "0.58415675", "0.58415675", "0.58415675", "0.5841459", "0.58306766", "0.5812373", "0.57884985", "0.5783982", "0.575842", "0.5700383", "0.5699863", "0.5668985", "0.5663224", "0.5619852", "0.5608912", "0.5607376", "0.56017375", "0.55956256", "0.5594688", "0.55659884", "0.5565794", "0.5560301", "0.55437833", "0.5528597", "0.5518124", "0.55161124", "0.55132854", "0.54738545", "0.54669493", "0.54657614", "0.54657614", "0.54657614", "0.5463747", "0.53988177", "0.5389676", "0.537216", "0.5368268", "0.5367771", "0.53663063", "0.53431004", "0.532421", "0.5322065", "0.5311065", "0.5298705", "0.5288267", "0.5271416", "0.52616", "0.52583516", "0.5247708", "0.52452314", "0.52398854", "0.5238293", "0.522757", "0.52248496", "0.5212805", "0.5200992", "0.5198776", "0.51970196", "0.51933354", "0.51929384", "0.51884353", "0.51841736", "0.5183487", "0.5181571", "0.5181461", "0.51734686", "0.5172791", "0.51684195", "0.5168378", "0.5168241", "0.516254", "0.5160962", "0.51565903", "0.5153127", "0.51412004", "0.5135005", "0.51347846", "0.51347846", "0.51347846", "0.51292163", "0.51275116", "0.5121893", "0.51155597", "0.51121485", "0.5107657" ]
0.0
-1
Method used to insert set of records to specified collection in database
public Integer insert(String collectionName,ArrayList<HashMap<String,Object>> data) { return processUpdateQuery(collectionName,data,true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void insertBatch(List<InspectionAgency> recordLst);", "int insert(Collect record);", "private <T, Q extends Query> void executeInsertBatch(Collection<T> objectsToInsert, Function<? super T, ? extends Q> mapFunction) {\n\t\tList<Q> insertStatements = objectsToInsert.stream().map(mapFunction).collect(Collectors.toList());\n\t\tdslContext.batch(insertStatements).execute();\n\t}", "int insertSelective(Collect record);", "int insert(FileSet record);", "void insertBatch(List<Customer> customers);", "@Override\n\tpublic long insertObjs(Collection<T> t) {\n\t\treturn insertObjs(false, t);\n\t}", "public void insert(List<T> entity) throws NoSQLException;", "WriteRequest insert(Iterable<? extends PiEntity> entities);", "protected void insertDataIntoRecordings(Collection<Track> tracks) {\n\t\t// what happens if data already there?\n\t\t// big issue :(\n\t\t\n\t\t\ttry {\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Recordings values (?, ?);\");\n\t\t\t\t\n\t\t\t\tfor (Track t : tracks) {\n\t\t\t\t\tprep.setString(1, t.getArtist());\n\t\t\t\t\tprep.setString(2, t.getName());\n\t\t\t\t\tprep.addBatch();\n\t\t\t\t\tSystem.out.println(\"Added \" +t.getArtist()+ \", \" +t.getName()+\" to recordings\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Recordings\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t\t\t\n\t}", "int insertSelective(CptDataStore record);", "int insertSelective(FileSet record);", "Collection<E> save(Iterable<E> entities);", "@Override\n public void insert(Iterator<Object[]> batch) {\n while (batch.hasNext()) {\n BoundStatement boundStatement = statement.bind(batch.next());\n ResultSetFuture future = session.executeAsync(boundStatement);\n Futures.addCallback(future, callback, executor);\n }\n }", "int insertSelective(BPBatchBean record);", "void insert(Providers record);", "void insertBatch(List<TABLE41> recordLst);", "int insert(CptDataStore record);", "void insertDocuments(Collection<Category> categoryList){\n mongoCollection.drop();\n for(Category category : categoryList){\n String json = gson.toJson(category);\n Document document = Document.parse(json);\n mongoCollection.insertOne(document);\n System.out.println(json);\n }\n }", "int insert(Sequipment record);", "int insert(BPBatchBean record);", "int insertSelective(Assist_table record);", "int insert(Ltsprojectpo record);", "int insertSelective(NjProductTaticsRelation record);", "int insertSelective(TbComEqpModel record);", "<S extends T> Collection<S> save(Iterable<S> entities);", "@Insert\n void insertAll(List<User> users);", "int insertSelective(IceApp record);", "int insertBatch(List<Basicinfo> list);", "int insert(NjProductTaticsRelation record);", "void bulkInsertOrReplace (List<Consumption> entities);", "int insertSelective(PmPost record);", "int insertSelective(Ltsprojectpo record);", "int insert(Mallscroerule record);", "int insertSelective(QuestionOne record);", "int insert(Assist_table record);", "int insert(PmPost record);", "int insert(SupplyNeed record);", "public void insert(ArrayList<T> contactArrayList) throws DaoException;", "int insert(SeGroup record);", "void insertSelective(Providers record);", "protected void insertDataIntoPersons(Collection<User> users) {\n\t\t\ttry {\n\t\t\t\topenConnection();\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Persons VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);\");\n\t\t\t\t//HUGEST IF STATEMENT EVAAAAAAH\n\t\t\t\tfor (User u : users) {\n\t\t\t\t\tif\n\t\t\t\t\t(\n\t\t\t\t\t\t\tu.getName() != null && u.getCountry() != null && \n\t\t\t\t\t\t\tu.getLanguage() != null && u.getGender() != null && \n\t\t\t\t\t\t\tu.getRegisteredDate() != null && u.getRealname() != null && \n\t\t\t\t\t\t\tu.getPlaycount() != 0 && u.getAge() != 0 && u.getNumPlaylists() != 0\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tprep.setString(1, u.getName());\n\t\t\t\t\t\tprep.setInt(2, u.getAge());\n\t\t\t\t\t\tprep.setString(3, u.getCountry());\n\t\t\t\t\t\tprep.setString(4, u.getLanguage());\n\t\t\t\t\t\tprep.setString(5, u.getGender());\n\t\t\t\t\t\tprep.setString(6, u.getRegisteredDate().toString());\n\t\t\t\t\t\tprep.setString(7, u.getRealname());\n\t\t\t\t\t\tprep.setInt(8, u.getPlaycount());\n\t\t\t\t\t\tprep.setInt(9, u.getNumPlaylists());\t\n\t\t\t\t\t\tprep.addBatch();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Persons\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t}", "int insert(Forumpost record);", "int insert(TbSerdeParams record);", "int insertSelective(FinMonthlySnapModel record);", "int insertSelective(DBPublicResources record);", "int insert(Product record);", "public <T> Collection<T> saveAll(Collection<T> entities);", "int insert(InspectionAgency record);", "int insertSelective(Sequipment record);", "int insertSelective(Engine record);", "int insertSelective(Forumpost record);", "@Override\r\n\tpublic Integer insert(Wt_collection record) {\n\t\treturn 0;\r\n\t}", "int insert(Tourst record);", "int insert(SPerms record);", "int insertSelective(Tourst record);", "int insert(ToolsOutIn record);", "int insert(ProcurementSource record);", "int insert(FinMonthlySnapModel record);", "int insertSelective(SupplyNeed record);", "int insertSelective(AccessModelEntity record);", "int insertSelective(SPerms record);", "@Override\n @Transactional\n public void addBulkInsertsAfterExtraction() {\n List<ScrapBook> scrapBooks = new ArrayList<ScrapBook>();\n boolean jobDone = false;\n boolean pause = false;\n while (!jobDone) {\n pause = false;\n int lineCount = 0;\n while (!pause) {\n ++lineCount;\n if (lineCount % 30 == 0) {\n scrapBooks = springJdbcTemplateExtractor.getPaginationList(\"SELECT * FROM ScrapBook\", 1, 30);\n pause = true;\n }\n }\n //convert scrapbook to book and insert into db\n convertedToBookAndInsert(scrapBooks);\n // delete all inserted scrapbooks\n springJdbcTemplateExtractor.deleteCollection(scrapBooks);\n scrapBooks = null;\n if (0 == springJdbcTemplateExtractor.findTotalScrapBook()) {\n jobDone = true;\n }\n }\n }", "@Insert\n void insert(Course... courses);", "void insertSelective(CTelnetServers record);", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "int insert(CompanyExtend record);", "int insertSelective(SeGroup record);", "int insert(Usertype record);", "int insertSelective(QuestionWithBLOBs record);", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }", "int insert(Tour record);", "void insert(Mi004 record);", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "int insertSelective(SwipersDO record);", "int insert(courses record);", "int insertSelective(PmKeyDbObj record);", "public void saveAll(Collection<Product> products);", "void saveAll(Collection<?> entities);", "int insertSelective(Commet record);", "@Override\n\tpublic <T> void insertMany(List<T> list) throws Exception {\n\t\t\n\t}", "@Insert({\"<script>\",\n \"INSERT INTO ${tableName}\",\n \" <trim prefix='(' suffix=')' suffixOverrides=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' separator=','>\",\n \" <if test='value != null'>${colKey}</if>\",\n \" </foreach>\",\n \" </trim>\",\n \"VALUES\",\n \" <foreach collection='records' item='record' separator=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' open='(' separator=',' close=')'>\",\n \" <foreach collection='record' index='dataKey' item='dataValue' separator=','>\",\n \" <if test='value != null and colKey == dataKey'>#{dataValue}</if>\",\n \" </foreach>\",\n \" </foreach>\",\n \" </foreach>\",\n \"</script>\"})\n int batchInsertSelective(@Param(\"tableName\") String tableName, @Param(\"records\") List<Map> records);", "int insert(QuestionOne record);", "int insertSelective(Appraise record);", "int insert(ItemCategory record);", "int insertSelective(TestEntity record);", "int insert(ParkCurrent record);", "void insert(TResearchTeach record);", "int insert(VoteList record);", "int insertSelective(ProcurementSource record);", "int insert(FinancialManagement record);", "int insertSelective(ApplicationDO record);", "int insert(Orderall record);", "int insertSelective(DataSync record);", "int insert(StatementsWithSorting record);", "int insertSelective(SysId record);", "int insertSelective(StudentEntity record);", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "int insertSelective(Emp record);", "int insert(Commet record);" ]
[ "0.70314646", "0.69555086", "0.69315207", "0.6861278", "0.68306994", "0.6828041", "0.6810686", "0.6807302", "0.6730345", "0.6492826", "0.64810145", "0.64693034", "0.6421374", "0.6394349", "0.63339543", "0.6324639", "0.6302735", "0.6288701", "0.628846", "0.6286052", "0.62841785", "0.6253643", "0.62485445", "0.6238229", "0.6222713", "0.62108755", "0.620718", "0.62056875", "0.6205036", "0.61899835", "0.6182048", "0.6174896", "0.6166741", "0.6165961", "0.61641526", "0.6162964", "0.6159996", "0.6145174", "0.6138283", "0.6135606", "0.6135183", "0.6121795", "0.6118794", "0.61168975", "0.61118686", "0.61062634", "0.61020964", "0.60977435", "0.60974234", "0.6091445", "0.6090885", "0.6086625", "0.6080349", "0.6079827", "0.60748893", "0.60741854", "0.60709447", "0.60650194", "0.6056348", "0.60547155", "0.6053571", "0.60490507", "0.60407895", "0.6038636", "0.60377884", "0.60375714", "0.6036114", "0.60272086", "0.60259205", "0.6025861", "0.6020126", "0.60186267", "0.6015961", "0.6002694", "0.6002367", "0.59993", "0.5996284", "0.5995629", "0.5994775", "0.5992821", "0.59924495", "0.59883344", "0.59866524", "0.5984612", "0.59845215", "0.59842503", "0.59785604", "0.59741193", "0.59728616", "0.59687155", "0.5967916", "0.5967094", "0.59641916", "0.5963717", "0.59594536", "0.5955576", "0.59531087", "0.59511244", "0.59466654", "0.5945513" ]
0.5962583
94
Method used to update specified set of records in specified collection of database
public Integer update(String collectionName,ArrayList<HashMap<String,Object>> data) { return processUpdateQuery(collectionName,data,false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKeySelective(Collect record);", "int updateAllComponents(RecordSet inputRecords);", "int updateByPrimaryKeySelective(FileSet record);", "int updateByPrimaryKey(Collect record);", "public <T> Collection<T> updateAll(Collection<T> entities);", "int updateByPrimaryKey(FileSet record);", "abstract Integer processUpdateQuery(String collectionName, ArrayList<HashMap<String,Object>> data, boolean isNew);", "int updateByPrimaryKeySelective(CptDataStore record);", "int updateByPrimaryKeySelective(BPBatchBean record);", "int updateByPrimaryKeySelective(Ltsprojectpo record);", "int updateByPrimaryKeySelective(SupplyNeed record);", "public void updateMultipleRecord(){\n MongoCollection<Document> table = db.getCollection(\"user\");\n Document document = new Document();\n document.put(\"userName\", \"FreeUser\");\n document.put(\"status\", true);\n\n Document updateDocument=new Document(\"$set\", document);\n\n\n table.updateMany(eq(\"userType\", \"Free\"), updateDocument);\n }", "int updateByPrimaryKeySelective(SPerms record);", "int updateByPrimaryKeySelective(IceApp record);", "int updateByPrimaryKeySelective(Assist_table record);", "int updateByPrimaryKeySelective(Yqbd record);", "int updateByPrimaryKeySelective(Forumpost record);", "int updateByPrimaryKeySelective(Abum record);", "int updateByPrimaryKeySelective(CTelnetServers record);", "int updateByPrimaryKeySelective(BaseCountract record);", "int updateByPrimaryKeySelective(Caiwu record);", "int updateByPrimaryKeySelective(BaseReturn record);", "int updateByPrimaryKeySelective(SysId record);", "int updateByPrimaryKeySelective(Engine record);", "int updateByPrimaryKeySelective(Thing record);", "int updateByPrimaryKeySelective(NjOrderWork2 record);", "int updateByPrimaryKeySelective(TbComEqpModel record);", "int updateByPrimaryKeySelective(Sequipment record);", "int updateByPrimaryKeySelective(DataSync record);", "int updateByPrimaryKeySelective(NjProductTaticsRelation record);", "int updateByPrimaryKeySelective(Orderall record);", "@Override\n\tpublic boolean batchUpdate(String[] SQLs) throws RemoteException {\n\t\treturn DAManager.batchUpdate(SQLs);\n\t}", "int updateByPrimaryKeySelective(RecordLike record);", "int updateByPrimaryKeySelective(Access record);", "int updateByPrimaryKeySelective(Commet record);", "int updateByPrimaryKeySelective(ProEmployee record);", "int updateByPrimaryKeySelective(Providers record);", "default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }", "int updateByPrimaryKeySelective(Employee record);", "int updateByPrimaryKeySelective(TBBearPer record);", "int updateByExampleSelective(@Param(\"record\") Collect record, @Param(\"example\") CollectExample example);", "int updateByPrimaryKeySelective(AccessModelEntity record);", "int updateByPrimaryKeySelective(QuestionOne record);", "int updateByPrimaryKeySelective(Table2 record);", "int updateByPrimaryKeySelective(QuestionWithBLOBs record);", "@Test\n\t public void testUpdateCollection(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t\tdoAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t\t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).persist(users);\n\t\t\t\tuserDao.update(users);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing update:.\",se);\n\t\t }\n\t }", "int updateByPrimaryKeySelective(Clazz record);", "int updateByPrimaryKeySelective(SysCode record);", "int updateByPrimaryKeySelective(SwipersDO record);", "int updateByPrimaryKeySelective(Body record);", "int updateByPrimaryKeySelective(Tourst record);", "int updateByExample(@Param(\"record\") Collect record, @Param(\"example\") CollectExample example);", "int updateByPrimaryKeySelective(PrhFree record);", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "int updateByPrimaryKeySelective(SysType record);", "int updateByPrimaryKeySelective(SysOrganization record);", "int updateByPrimaryKeySelective(SeGroup record);", "int updateByPrimaryKeySelective(ApplicationDO record);", "int updateByPrimaryKeySelective(TCpySpouse record);", "int updateByPrimaryKeySelective(CartDO record);", "int updateByPrimaryKeySelective(VoteList record);", "int updateByPrimaryKeySelective(Powers record);", "int updateByPrimaryKeySelective(Addresses record);", "public void update(ComplexCar[] cars) throws DatabaseTestException;", "int updateByPrimaryKeySelective(DBPublicResources record);", "int updateByPrimaryKeySelective(ResourceWithBLOBs record);", "int updateByPrimaryKeySelective(Basicinfo record);", "int updateByPrimaryKeySelective(GirlInfo record);", "int updateByPrimaryKeySelective(Organization record);", "int updateByPrimaryKeySelective(Admin record);", "int updateByPrimaryKey(SupplyNeed record);", "int updateByPrimaryKey(BPBatchBean record);", "int updateByPrimaryKeySelective(ItoProduct record);", "int updateByPrimaryKeySelective(ConfigData record);", "int updateByPrimaryKeySelective(Enfermedad record);", "int updateByPrimaryKeySelective(Storage record);", "int updateByPrimaryKeySelective(Storage record);", "int updateByPrimaryKeySelective(ResourcePojo record);", "@Transactional \n\tpublic void updateAll() {\n\t\t\n\t\tIterator<Pharmacy> newList = pharmacyRepository1.getAllEntity().iterator();\n\t\twhile (newList.hasNext()) {\n\t\t\tPharmacy pharmacy = newList.next();\n\t\t\tlistStockInPharmacy(pharmacy);\n\t\t\t}\n\t\t\n\t}", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "int updateByPrimaryKeySelective(WfCfgModuleCatalog record);", "int updateByPrimaryKeySelective(RepStuLearning record);", "int updateByPrimaryKeySelective(PmKeyDbObj record);", "int updateByPrimaryKeySelective(Product record);", "int updateByPrimaryKeySelective(T record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(HomeWork record);", "int updateByPrimaryKeySelective(Shareholder record);", "int updateByPrimaryKeySelective(TCar record);", "int updateByPrimaryKeySelective(WpPostsWithBLOBs record);", "@SuppressWarnings(\"serial\")\n\t@Test\n\tpublic void updateCollection() {\n\t\tdb.close();\n\t\tEmbeddedConfiguration config = Db4oEmbedded.newConfiguration();\n\t\tconfig.common().objectClass(Car.class).cascadeOnUpdate(true);\n\t\tdb = Db4oEmbedded.openFile(config, DB4OFILENAME);\n\t\tObjectSet<Car> results = db.query(new Predicate<Car>() {\n\t\t\tpublic boolean match(Car candidate) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tAssert.assertTrue(results.hasNext());\n\n\t\tCar car = results.next();\n\n\t\tcar.getHistory().remove(0);\n\t\tdb.store(car.getHistory());\n\t\tresults = db.query(new Predicate<Car>() {\n\t\t\tpublic boolean match(Car candidate) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\twhile (results.hasNext()) {\n\t\t\tcar = results.next();\n\t\t\tfor (int idx = 0; idx < car.getHistory().size(); idx++) {\n\t\t\t\tSystem.out.println(car.getHistory().get(idx));\n\t\t\t}\n\t\t}\n\n\t}", "int updateByPrimaryKeySelective(TestEntity record);", "int updateByPrimaryKey(CptDataStore record);", "int updateByPrimaryKeySelective(Appraise record);", "int updateByPrimaryKeySelective(TABLE41 record);", "int updateByPrimaryKeySelective(SysTeam record);", "int updateByPrimaryKeySelective(FinMonthlySnapModel record);", "int updateByPrimaryKeySelective(MedicalOrdersExecutePlan record);" ]
[ "0.7398918", "0.7219724", "0.7159674", "0.71364516", "0.71322477", "0.70135146", "0.68435323", "0.67258734", "0.66755956", "0.6657106", "0.66559714", "0.662251", "0.6618923", "0.6618451", "0.6610117", "0.6559359", "0.6550652", "0.65446806", "0.65307844", "0.6521165", "0.6520734", "0.651224", "0.6506059", "0.6504857", "0.65026045", "0.6502292", "0.64955753", "0.64930904", "0.6490236", "0.64842075", "0.647306", "0.64677954", "0.6463593", "0.6463555", "0.64613813", "0.6458015", "0.6455684", "0.6448811", "0.6447778", "0.6439827", "0.6428232", "0.64262456", "0.642344", "0.6419607", "0.6419564", "0.64180976", "0.6414488", "0.64104515", "0.6408995", "0.6406144", "0.64003605", "0.6399873", "0.6399715", "0.639905", "0.63905424", "0.63888395", "0.63846284", "0.63798076", "0.63774884", "0.63729435", "0.63712794", "0.6363334", "0.6362407", "0.6358365", "0.6355713", "0.6351199", "0.6341114", "0.63403946", "0.63350993", "0.63301975", "0.6324426", "0.63236105", "0.6323251", "0.63215894", "0.63196486", "0.63185924", "0.63185924", "0.6315037", "0.6310101", "0.6309687", "0.630938", "0.630751", "0.6300761", "0.6300735", "0.6300607", "0.62939036", "0.62939036", "0.62939036", "0.62939036", "0.6292197", "0.62902373", "0.6283662", "0.6283036", "0.62817615", "0.62800133", "0.62790716", "0.6277871", "0.62721014", "0.627116", "0.6270826", "0.6269879" ]
0.0
-1
Databases specific method to send SELECT query to server and return RAW result
Object executeSelectQuery(String sql) { return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "public abstract Statement queryToRetrieveData();", "private QueryResult performMappedQuery() throws VizException {\n\n if (database == null) {\n throw new VizException(\"Database not specified for query\");\n }\n if (query == null) {\n throw new VizException(\"Cannot execute null query\");\n }\n\n QlServerRequest request = new QlServerRequest(query);\n request.setDatabase(database);\n request.setType(QueryType.QUERY);\n request.setParamMap(paramMap);\n\n // set the mode so the handler knows what to do\n if (queryLanguage == null) {\n throw new VizException(\"Query language not specified\");\n } else if (queryLanguage.equals(QueryLanguage.HQL)) {\n request.setLang(QlServerRequest.QueryLanguage.HQL);\n } else {\n request.setLang(QlServerRequest.QueryLanguage.SQL);\n }\n\n // create request object\n QueryResult retVal = null;\n // get result\n AbstractResponseMessage response = (AbstractResponseMessage) ThriftClient\n .sendRequest(request);\n\n if (response instanceof ResponseMessageGeneric) {\n retVal = (QueryResult) ((ResponseMessageGeneric) response)\n .getContents();\n\n } else if (response instanceof ResponseMessageError) {\n ResponseMessageError rme = (ResponseMessageError) response;\n VizServerSideException innerException = new VizServerSideException(\n rme.toString());\n throw new VizServerSideException(rme.getErrorMsg(), innerException);\n }\n\n return retVal;\n }", "public abstract ResultList executeSQL(RawQuery rawQuery);", "SELECT createSELECT();", "Query query();", "private void sendQuery(String sqlQuery) {\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n resultSet = statement.executeQuery(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "protected synchronized ResultSet pureSQLSelect(String query) {\n if(this.connect()) {\n try {\n this.statement = this.connection.createStatement();\n this.resultSet = this.statement.executeQuery(query);\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n this.resultSet = null;\n }\n }\n return this.resultSet;\n }", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "public void getSelect(String query, ArrayList<Object> params) {\r\n\t\tif (null != connection) {\r\n\t\t\tSystem.out.println(QueryProcessor.exec(connection, query, params));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Hubo algún error con la conexión...\");\r\n\t\t}\r\n\t}", "@Override\n public synchronized ResultSet executeQuery(String sql)\n throws SQLException {\n\n // tinySQL only supports one result set at a time, so\n // don't let them get another one, just in case it's\n // hanging out.\n //\n tinySQLResultSet trs;\n result = null; \n statementString = sql;\n\n // create a new tinySQLResultSet with the tsResultSet\n // returned from connection.executetinySQL()\n //\n if ( debug ) {\n System.out.println(\"executeQuery conn is \" + connection.toString());\n }\n trs = new tinySQLResultSet(connection.executetinySQL(this), this);\n return trs; \n }", "public ResultSet queryRawSQL(String sql) throws SQLException{\n return mysql.query(sql);\n }", "private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "public ResultSet ServerData() {\n\t\tResultSet rs = null; //new resultset of default value null\r\n\t\ttry {\r\n\r\n\r\n\t\t\tString query = \"SELECT * FROM TBLSERVERS\"; //get all data in the TBLSERVERS table\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(query); //prepare a new statement\r\n\t\t\trs = pst.executeQuery(); //execute statement and store result in a resultset \r\n\t\t} catch (SQLException ex) { //catches SQL exception to prevent an application crash in this case\r\n\t\t\tLogger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\r\n\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "SelectQuery createSelectQuery();", "public <E extends Writeable> ResultSet read(CharSequence sql);", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "<T extends BaseDto> List<T> executeQuery(String resQuery, QueryResultTransformer<T> transformer, Connection conn);", "Query queryOn(Connection connection);", "public FutureResultWithAnswer queryToServer(Query query) throws IOException, Net4CareException;", "public synchronized Cursor ExecuteRawSql(String s) {//Select Query\n try {\n\n//\t\t\tif(sqLiteDb != null)\n//\t\t\t\tcloseDB(null);\n\n sqLiteDb = openDatabaseInReadableMode();\n Log.d(TAG, \"Actual Query--->>\" + s);\n return sqLiteDb.rawQuery(s, null);\n\n }\n catch (Exception e) {\n e.printStackTrace();\n LogUtility.NoteLog(e);\n return null;\n }\n }", "public QueryResult<T> getResult();", "public abstract ResultList executeQuery(DatabaseQuery query);", "private void sampleQuery(final SQLManager sqlManager, final HttpServletResponse resp)\n throws IOException {\n try (Connection sql = sqlManager.getConnection()) {\n\n // Execute the query.\n final String query = \"SELECT 'Hello, world'\";\n try (PreparedStatement statement = sql.prepareStatement(query)) {\n \n // Gather results.\n try (ResultSet result = statement.executeQuery()) {\n if (result.next()) {\n resp.getWriter().println(result.getString(1));\n }\n }\n }\n \n } catch (SQLException e) {\n LOG.log(Level.SEVERE, \"SQLException\", e);\n resp.getWriter().println(\"Failed to execute database query.\");\n }\n }", "protected abstract void select();", "public ResultSet querySelect(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\n\t \t\t// Exécution d'une requête de lecture\n\t \t\tResultSet result = statement.executeQuery(query);\n\t \t\t\n\t \t\treturn result;\n\t \t}", "public static String SelectQuery_String(String query)\r\n {\n Connection conn = null;\r\n Statement stat = null;\r\n ResultSet rs = null;\r\n String resp = \"\";\r\n try\r\n {\r\n LoadDriver();\r\n conn = DriverManager.getConnection(DB_URL,userName,password);\r\n stat = conn.createStatement();\r\n rs = stat.executeQuery(query);\r\n if(rs.next())\r\n resp = rs.getString(1);\r\n }\r\n catch(SQLException ex)\r\n {\r\n ex.printStackTrace();\r\n }\r\n finally\r\n {\r\n try\r\n {\r\n if(conn != null)\r\n conn.close();\r\n if(stat != null)\r\n stat.close();\r\n if(rs != null)\r\n rs.close();\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n return resp;\r\n }", "<T extends BaseDto, V extends BaseDto> List<T> executeQuery(String reqResQuery, V req, QueryResultTransformer<T> transformer, Connection conn);", "String getBarcharDataQuery();", "List<Map<String,Object>> executeSelectQuery(String query) {\n\n\t\t// preparing the list for the retrieved statements in the database\n\t\tList<Map<String, Object>> statementsList = new ArrayList<>();\n\n\t\ttry {\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tstatement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t\t\t// the ResultSet represents a table of data retrieved in the database\n\t\t\tResultSet rs = statement.executeQuery(query);\n\n\t\t\t// the ResultSetMetaData represents all the metadata of the ResultSet\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint columnsNumber = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tMap<String, Object> statementMap = new HashMap<>();\n\n\t\t\t\tfor (int i = 1; i <= columnsNumber; i++) {\n\n\t\t\t\t\tint columnType = rsmd.getColumnType(i);\n\n\t\t\t\t\tswitch (columnType) {\n\t\t\t\t\t\tcase Types.VARCHAR:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.NULL:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.CHAR:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.TIMESTAMP:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getTimestamp(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.DOUBLE:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getDouble(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.SMALLINT:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getInt(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.DECIMAL:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getBigDecimal(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// adding the Map to the statementsList\n\t\t\t\tstatementsList.add(statementMap);\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// in the end, we return the populated statementsList\n\t\treturn statementsList;\n\t}", "public abstract ConnectorResultSet select(DataRequest source) throws ConnectorOperationException;", "public ResultSet runQuery(String sql){\n\n try {\n\n Statement stmt = conn.createStatement();\n\n return stmt.executeQuery(sql);\n\n } catch (SQLException e) {\n e.printStackTrace(System.out);\n return null;\n }\n\n }", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "public static ResultSet executeSelectQuery(String query){\n\t\tStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\tCachedRowSetImpl cachedRowSet = null;\n\t\ttry{\n\t\t\tconnectDatabase();\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(query);\n\t\t\tcachedRowSet = new CachedRowSetImpl(); // cache the resultset\n\t\t\tcachedRowSet.populate(resultSet);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\t// close the connections\n\t\t\t\tif (resultSet != null) resultSet.close();\n\t\t\t\tif (statement != null) statement.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tdisconnectDatabase();\n\t\t}\n\t\treturn cachedRowSet;\n\t}", "public abstract ExecuteResult<T> execute() throws SQLException;", "public ResultSet executeQuery(String request) {\n try {\r\n return st.executeQuery(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }", "public ResultSet getDataTestUser() throws SQLException{ \r\n String query= (\"select * from \"+Database.Table.TABLE_PRETEST_RESULT);\r\n ResultSet rs = q.querySelect(query);\r\n return rs;\r\n }", "public ResultSet doQuery( String sql) throws SQLException {\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\t// prepare sql statement\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\tif (outstmt == null)\r\n\t\t\treturn null;\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet(); //old\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}", "Row<K, C> execute();", "private void executeQuery() {\n }", "ResultSet getResultSet(String query) {\n try {\n Statement statement = connection.createStatement();\n return statement.executeQuery(query);\n } catch (Exception e) {\n logger.info(\"getResultSet \" + e.getStackTrace().toString());\n return null;\n }\n }", "@Override\n\tpublic ResultSet select() {\n\t\treturn null;\n\t}", "public ResultSet query (String query) throws java.sql.SQLException {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query + \"\\\")\");\n \n try {\n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n ResultSet r = statement.executeQuery(query);\n return r;\n } catch (java.sql.SQLException e) {\n Logger.write(\"RED\", \"DB\", \"Failed to query database: \" + e);\n throw e;\n }\n }", "public abstract void toSQL(StringBuilder ret);", "@Override\n SqlSelect wrapSelect(SqlNode node) {\n throw new UnsupportedOperationException();\n }", "@Override\r\n\tpublic String getSelect() {\n\t\treturn SQL;\r\n\t}", "public ResultSet executeSQL() {\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = pstmt.executeQuery();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\n\t}", "public <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);", "private String queryDatabase() {\n\t\t\t\n\t\t\tString result = \"\";\t\t\t\t\t\t\t\t\t\t// will hold the json string to be returned\n\t \tInputStream isr = null;\t\t\t\t\t\t\t\t\t// used when converting the response to a string\n\t \t\n\t \ttry{\t// set up the http POST\n\t HttpClient httpclient = new DefaultHttpClient();\n\t HttpPost httppost = new HttpPost(\"http://www.christmasgiftideas.eu/widgetQuery.php\"); //YOUR PHP SCRIPT ADDRESS \n\n\t HttpResponse response = httpclient.execute(httppost);\t\t\t\t\t// execute the request and store response\n\t HttpEntity entity = response.getEntity();\n\t isr = entity.getContent();\n\t }\n\t catch(Exception e){\n\t Log.e(\"log_tag\", \"Error in http connection \"+e.toString());\n\t }\n\t \t\n\t // convert response to string\n\t try{\n\t \tBufferedReader reader = new BufferedReader(new InputStreamReader(isr,\"iso-8859-1\"),8);\n\t \tStringBuilder sb = new StringBuilder();\n\t \tString line = null;\n\t \twhile ((line = reader.readLine()) != null) {\n\t \t\tsb.append(line + \"\\n\");\n\t }\n\t \tisr.close();\n\t result=sb.toString();\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tLog.e(\"log_tag\", \"Error converting result \"+e.toString());\n\t \t}\n\t \n\t \treturn result;\t\t// return the json string\n\t}", "public Object[] read_DB(String query) {\n\n Object[] result = new Object[2];\n java.sql.Connection con = null;\n boolean connected;\n try{\n con = DriverManager.getConnection(db_type + host + port + db_name,\n user + \"\",\n password + \"\");\n connected = true;\n }\n catch(SQLException e){\n connected = false;\n System.out.println(\"Error al conectar en la Base de datos: \" + e);\n result[0] = \"Error\";\n result[1] = \"Connecting BD\";\n close_connection(con);\n }\n\n if(connected){\n ResultSet rs;\n try{\n Statement st = con.createStatement();\n rs = st.executeQuery(query);\n\n Vector<String[]> table = makeTable(rs);\n if((table.size() == 1) && (table.get(0)[0] == \"Error\")) {\n result[0] = \"Error\";\n result[1] = table.get(0)[1];\n }\n else{\n result[0] = \"QueryResult\";\n result[1] = table;\n }\n\n close_connection(con);\n }\n catch(SQLException e){\n System.out.println(\"Error al ejecutar la consulta : \" + e);\n result[0] = \"Error\";\n result[1] = \"Executing Query\";\n close_connection(con);\n }\n }\n return result;\n\n }", "public abstract String toSQL();", "@Override\r\n\tpublic String call() throws Exception {\n\t\tSystem.out.println(\"开始query\");\r\n\t\tThread.sleep(2000);\r\n\t\tString result = this.query + \"处理结束\";\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "public Cursor rawQuery(String sql, String[] selectionArgs) {\n sqLiteDatabase.beginTransaction();\n Cursor res = null;\n try {\n res = sqLiteDatabase.rawQuery(sql, selectionArgs);\n sqLiteDatabase.setTransactionSuccessful();\n } catch (Exception e) {\n res = null;\n } finally {\n sqLiteDatabase.endTransaction();\n }\n return res;\n }", "@Test\n public void testProcessSelect() throws Exception {\n\n try {\n String sql = \"select * from ts_task limit 1\";\n ResponseDataDtoV1 resp = textService.processSelect(sql, \"J\");\n System.out.println(\"res: succ \" + JSONFmtUtil.formatJsonConsole(JSONFastJsonUtil.objectToJson(resp)));\n } catch (Exception e) {\n System.out.println(\"res: error \" + e);\n e.printStackTrace();\n }\n\n }", "private void executeRequest(String sql) {\n\t}", "public ResultSet executeQuery() throws SQLException {\n return statement.executeQuery();\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public<T> T execute() throws DatabaseException;", "protected String getSelectSQL() {\n\t\treturn queryData.getString(\"SelectSQL\");\n\t}", "<T> Mono<ExecutableQuery<T>> toExecutableQuery(PreparedQuery<T> preparedQuery);", "public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static EnhancedResultSet query( String sql )\n \t{\n \t\tConnection conn = getConnection();\n \t\t\n \t\t\tEnhancedResultSet ers = null;\n \t\t\n \t\t\ttry {\n \t\t\t\tStatement st = conn.createStatement();\n \t\t\t\t\tResultSet rs = st.executeQuery( sql );\n \t\t \t\t\ters = new EnhancedResultSet( rs );\n \t\t \t\trs.close();\n \t\t\t\tst.close();\n \t\t\t}\n \t\t\tcatch (SQLException ex) {\n \t\t\t\tthrow new RuntimeException( ex );\n \t\t\t}\n \t\t\n \t\treturnConnection( conn );\n \t\n \treturn ers;\n \t}", "public ResultSet query(String sQLQuery) throws SQLException {\n\t Statement stmt = c.createStatement();\n\t ResultSet ret = stmt.executeQuery(sQLQuery);\n\t stmt.close();\n\t return ret;\n\t}", "String query();", "private ResultSet execute_statement(String sql, boolean returns_rs) {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n\n try {\n connection = this.connect(); //connect to database\n statement = connection.createStatement();\n if (returns_rs) {\n resultSet = statement.executeQuery(sql); //calculate resultSet\n } else {\n statement.execute(sql); //execute statement\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n if (!returns_rs) {\n try {\n this.disconnect(null, statement, connection); //disconnect from database\n } catch (SQLException ignored) {\n\n }\n }\n }\n return resultSet;\n }", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "ResponseEntity execute();", "@Override\n public void emitTuples() {\n\n Statement query = queryToRetrieveData();\n logger.debug(String.format(\"select statement: %s\", query.toString()));\n RecordSet rs;\n try {\n rs = store.getClient().query(null, query);\n while(rs.next()){\n Record rec = rs.getRecord();\n T tuple = getTuple(rec);\n outputPort.emit(tuple);\n }\n }\n catch (Exception ex) {\n store.disconnect();\n DTThrowable.rethrow(ex);\n }\n }", "private String getSelectQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeReadQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }", "@Override\n\tprotected List<IvisObject> executeLocalQuery(Object localQuery,\n\t\t\tMap<String, String> subquerySelectors_global_and_local_schema, IvisQuery globalQuery) throws Exception {\n\t\treturn retrieveDataFromDatabase((IvisQuery) localQuery, subquerySelectors_global_and_local_schema, globalQuery);\n\t}", "public static Disease selectOne(String command) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n throw new ApplicationException(\"Not allowed to send sql directly. Rewrite the calling class to not use this query:\\r\\n\" + command);\n }\n \n List<Disease> list = tableToList(Db.getTable(command));\n if (list.Count == 0)\n {\n return null;\n }\n \n return list[0];\n }", "public abstract List createNativeSQLQuery(String query);", "BaseReturn selectByPrimaryKey(String guid);", "private int sendUpdate(String sqlQuery) {\n int result = 0;\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n result = statement.executeUpdate(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "public ResultSet selectData(String sql) throws java.sql.SQLException {\n\t\treturn selectData(sql, -1);\n\t}", "@Override\n public boolean execute(String sql) throws SQLException {\n\n // a result set object\n //\n tsResultSet r;\n\n // execute the query \n //\n r = connection.executetinySQL(this);\n\n // check for a null result set. If it wasn't null,\n // use it to create a tinySQLResultSet, and return whether or\n // not it is null (not null returns true).\n //\n if( r == null ) {\n result = null;\n } else {\n result = new tinySQLResultSet(r, this);\n }\n return (result != null);\n\n }", "public interface IDBQuery {\n String query();\n}", "@Override\n\tpublic ResultSet getResultSet() throws SQLException {\n\t\treturn new CassandraResultSet(driverContext, resultSet);\n\t}", "Qtl fetch(long internalID) throws AdaptorException ;", "@Override\n\tpublic ArrayList<String> getRaw(final String... parameters) {\n\t\treturn this.execute(query,\n\t\t\t\tnew PreparedStatementCallback<ArrayList<String>>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ArrayList<String> doInPreparedStatement(\n\t\t\t\t\t\t\tPreparedStatement arg0) throws SQLException,\n\t\t\t\t\t\t\tDataAccessException {\n\t\t\t\t\t\tArrayList<String> result = new ArrayList<String>();\n\n\t\t\t\t\t\tsetArgs(arg0, parameters);\n\t\t\t\t\t\tResultSet rs = arg0.executeQuery();\n\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\tresult.add(rs.getString(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public abstract String createQuery();", "public <T> int select(final String sqlQuery, final Map<String, Object> param) throws Exception;", "public void selectQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tResultSet result = qe.execSelect();\n\t\tprintResultSet(result);\n\t\tqe.close();\n\t}", "public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }", "@Override\n\tpublic ResultSet executeQuery(final String sql) throws SQLException {\n\n\t\tfinal String transformedSQL = transformSQL(sql);\n\n\t\tif (transformedSQL.length() > 0) {\n\n\t\t\tfinal Statement statement = new SimpleStatement(transformedSQL);\n\n\t\t\tif (getMaxRows() > 0)\n\t\t\t\tstatement.setFetchSize(getMaxRows());\n\n\t\t\tresultSet = session.execute(statement);\n\n\t\t\twarnings.add(resultSet);\n\n\t\t\treturn new CassandraResultSet(driverContext, resultSet);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Collection selectALLData(Connection con) {\n\t\treturn select(con);\r\n\t}", "@Override\n protected Void doInBackground(Void... params) {\n try{\n System.setProperty(\"FBAdbLog\", \"true\");\n Class.forName(\"org.firebirdsql.jdbc.FBDriver\");\n String sCon = \"jdbc:firebirdsql:\"+Server+\":C:/\"+Database+\".FDB?encoding=ISO8859_1\";\n if(con == null){\n\n }\n Connection con = DriverManager.getConnection(sCon, \"SYSDBA\", \"masterkey\");\n etatCon = true;\n String sql = \"SELECT * FROM CLIENT\";\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(sql);\n\n while(rs.next()){\n Log.v(\"TRACKKK\", \"Client : \"+ rs.getString(\"RECORDID\")+ \" \" + rs.getString(\"NAME\") + rs.getString(\"PHONE\") );\n }\n Log.v(\"TRACKKK\", \"==============================================\");\n rs.close();\n\n }\n catch(Exception e){\n Log.e(\"FirebirdExample\", e.getMessage());\n etatCon = false;\n }\n return null;\n }", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "protected ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \n try {\n Statement stmt = getConnection().createStatement();\n rs = stmt.executeQuery(query);\n } catch (SQLException e) {\n String msg = \"Failed to execute query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return rs;\n }", "public ResultSet getDatabase(){\n\t\tString join = \"select* from responses natural join projects\";\n\t\tPreparedStatement database = null;\n\t\ttry{\n\t\t\tdatabase = conn.prepareStatement(join);\n\t\t\tResultSet rs = database.executeQuery();\n\t\t\treturn rs;\n\t\t}catch (SQLException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public static ResultSet executeQuery(String query) {\n\t\t\n\t\tString url = \"jdbc:postgresql://localhost:5432/postgres\";\n String user = \"postgres\";\n String password = \"admin\";\n \n ResultSet rs = null;\n\n try {\n \tConnection con = DriverManager.getConnection(url, user, password);\n \t\tStatement st = con.createStatement();\n \t\n rs = st.executeQuery(query);\n\n\t\t\t/*\n\t\t\t * if (rs.next()) { System.out.println(rs.getString(1)); }\n\t\t\t */\n \n \n\n } catch (SQLException ex) {\n \n System.out.println(\"Exception occured while running query\");\n ex.printStackTrace();\n }\n \n return rs;\n\t}", "protected abstract NativeSQLStatement createNativeAsBinaryStatement();", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "private static Object[] doQuery(String query, Connection connection, Object[] parameters, boolean emptyResultSet,\r\n Class<?>... resultColumnTypes) throws SQLException, LateDeliverablesProcessingException {\r\n PreparedStatement ps = null;\r\n\r\n try {\r\n ps = connection.prepareStatement(query);\r\n\r\n for (int i = 0; i < parameters.length; i++) {\r\n if (parameters[i] instanceof Timestamp) {\r\n ps.setTimestamp(i + 1, (Timestamp) parameters[i]);\r\n } else {\r\n ps.setLong(i + 1, (Long) parameters[i]);\r\n }\r\n }\r\n\r\n ResultSet rs = ps.executeQuery();\r\n\r\n if (!rs.next() && !emptyResultSet) {\r\n throw new LateDeliverablesProcessingException(\"The query should not \"\r\n + \" return an empty result set.\");\r\n }\r\n\r\n Object[] result = new Object[resultColumnTypes.length];\r\n\r\n for (int i = 0; i < resultColumnTypes.length; i++) {\r\n if (resultColumnTypes[i] == Timestamp.class) {\r\n result[i] = rs.getTimestamp(i + 1);\r\n } else if (resultColumnTypes[i] == Boolean.class) {\r\n result[i] = rs.getBoolean(i + 1);\r\n } else if (resultColumnTypes[i] == Long.class) {\r\n result[i] = rs.getLong(i + 1);\r\n } else {\r\n result[i] = rs.getObject(i + 1);\r\n if (result[i] != null && !resultColumnTypes[i].isInstance(result[i])) {\r\n throw new LateDeliverablesProcessingException(\"The result set \"\r\n + \" contains a value of not expected type (\"\r\n + result[i].getClass().getName() + \" obtained, but \"\r\n + resultColumnTypes[i].getName() + \" expected)\");\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n } finally {\r\n // Close the prepared statement\r\n closeStatement(ps);\r\n }\r\n }" ]
[ "0.6533181", "0.6533181", "0.65329677", "0.65309405", "0.65309405", "0.64986485", "0.6415533", "0.6392858", "0.63229525", "0.6240446", "0.61245847", "0.60955846", "0.60577863", "0.60039467", "0.5998865", "0.5962854", "0.59421426", "0.59376687", "0.59227556", "0.59002346", "0.58853406", "0.5868801", "0.58369476", "0.5805153", "0.57527876", "0.56877154", "0.567554", "0.56745946", "0.56458455", "0.5606468", "0.5584896", "0.5580884", "0.5573777", "0.5568216", "0.5562091", "0.55556273", "0.5551948", "0.5514672", "0.54844445", "0.5477259", "0.5471024", "0.5451216", "0.5447318", "0.54389423", "0.5437371", "0.5435427", "0.54317373", "0.5424024", "0.542213", "0.542005", "0.54164284", "0.54144686", "0.54032797", "0.53893137", "0.5387408", "0.5380803", "0.5380341", "0.5374806", "0.5365147", "0.5358587", "0.5357574", "0.5354415", "0.5348401", "0.5346358", "0.5336852", "0.53259546", "0.53219175", "0.5319187", "0.5317161", "0.5315422", "0.5314515", "0.53111273", "0.5306773", "0.5305718", "0.5299655", "0.5298999", "0.5277369", "0.5272305", "0.5271671", "0.5265803", "0.5258483", "0.5255965", "0.52506274", "0.5245946", "0.5234217", "0.52326804", "0.5231488", "0.52293044", "0.52292323", "0.5226383", "0.52263224", "0.52211946", "0.52191645", "0.5215164", "0.52149427", "0.5214574", "0.5213453", "0.5211742", "0.52108264", "0.5210374" ]
0.6646389
0
Method used to transform RAW result of SELECT query returned by server to array of rows
ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) { ArrayList<Map<String,Object>> rawRows = parseQueryResult(result); if (rawRows == null || rawRows.size()==0) return null; ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>(); for (Map<String,Object> rawRow: rawRows) { HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName); if (resultRow.size()>0) resultRows.add(resultRow); } return resultRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"NewApi\")\n private ObjectNode getRowsResultFromQuery(Cursor cur) {\n ObjectNode rowsResult = objectMapper.createObjectNode();\n\n ArrayNode rowsArrayResult = rowsResult.putArray(\"rows\");\n\n if (cur.moveToFirst()) {\n // query result has rows\n int colCount = cur.getColumnCount();\n \n // Build up JSON result object for each row\n do {\n ObjectNode row = objectMapper.createObjectNode();\n for (int i = 0; i < colCount; ++i) {\n String key = cur.getColumnName(i);\n \n // for old Android SDK remove lines from HERE:\n if (android.os.Build.VERSION.SDK_INT >= 11) {\n putValueBasedOnType(cur, row, key, i);\n // to HERE.\n } else {\n row.put(key, cur.getString(i));\n }\n }\n \n rowsArrayResult.add(row);\n \n } while (cur.moveToNext());\n }\n\n return rowsResult;\n }", "public static ArrayList<Object[]> getData(String query){\n ArrayList<Object[]> resultList = new ArrayList<Object[]>();\n ResultSet result;\n ResultSetMetaData rsmd;\n connect();\n try{\n Statement stm = conn.createStatement();\n result = stm.executeQuery(query);\n rsmd = result.getMetaData();\n Object[] obj = new Object[rsmd.getColumnCount()];\n while(result.next()){\n for(int col = 1; col < rsmd.getColumnCount(); col++){\n obj[col-1] = result.getObject(col);\n }\n resultList.add(obj);\n }\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n return resultList;\n }", "public static void parseResultDB(ResultSet rs){\n\n String data[] = {};\n for (Row row : rs){\n if(row['fid'] && row['pid']){\n while (row['qte'] != 0 || row['qte'])\n data[int(row['fid'])] += row ['pid'];\n row['pid']--;\n }\n }\n return data;\n }", "public Object[] toRawArray();", "public Object[] toRow() {\n String dbType = this.getClass().getSimpleName().replace(\"Database\", \"\");\n dbType = dbType.substring(0, 1) + dbType.substring(1).toLowerCase();\n\n return new Object[] {dbType, getDbHost(), getDbName(), getDbUsername(), getDbPassword(), getUniqueId()};\n }", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "public Object [][] getRubrosPresupuesto2(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT idrubro,nombre,saldo,tipo_pago FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][4]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "public java.util.List<com.randioo.tiger_server.protocol.Entity.RowData> getRowDataList() {\n return java.util.Collections.unmodifiableList(result.rowData_);\n }", "public Object [][] getRubrosPresupuesto(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT * FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"MONTO\")); \r\n registro [4] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][5]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ;\r\n rowData [j][4] = reg[4] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "public ArrayList<byte[]> queryData(String tablename, String schema){\n ArrayList<byte[]> res = new ArrayList<byte[]>();\n\n ResultSet resultSet = session.execute(\"SELECT * FROM \" + tablename);\n for (Row row : resultSet) {\n ByteBuffer data = row.getBytes(schema);\n res.add(data.array());\n }\n return res;\n }", "public List<List<Object>> rows() {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n for (List<String> rawRow : getRawRows()) {\n List<Object> newRow = new ArrayList<Object>();\n for (int i = 0; i < rawRow.size(); i++) {\n newRow.add(transformCellValue(i, rawRow.get(i)));\n }\n rows.add(newRow);\n }\n return rows;\n }", "Object[] getDataRow(final int index);", "public static Object[][] getData() {\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "public Object[] getOracleArray()\n/* */ throws SQLException\n/* */ {\n/* 272 */ return getOracleArray(0L, Integer.MAX_VALUE);\n/* */ }", "public interface RowToByteArrayConverter {\r\n byte[] rowToByteArray(ResultSet resultSet);\r\n}", "java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> \n getRowList();", "private Object[] cloneRow() {\n\t\t\treturn (Object[]) (row.clone());\n\t\t}", "public String[][] getData(String stmt, int numOfFields) {\n String[][] result = new String[0][];\n try {\n Statement stmnt = connection.createStatement();\n result = new String[100][100];\n ResultSet rs = stmnt.executeQuery(stmt);\n int row = 0;\n while (rs.next()) {\n for (int i = 1; i <= numOfFields; i++) {\n\n result[row][i - 1] = rs.getString(i);\n\n } //for\n row++;\n } //while\n } //try\n catch (SQLException sqlex) {\n System.out.println(sqlex.getMessage());\n } //catch\n return result;\n }", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "public List<String> getRows();", "public Object[] getData() {\n return rowData;\n }", "public static Object[][] getDataFromDb(String sql){\n\t\tfinal String JDBC_DRIVER = PreAndPost.config.getProperty(\"DB_Pkg\"); \r\n\t\tfinal String DB_URL = PreAndPost.config.getProperty(\"DB_Url\");\r\n\r\n\t\t// Database credentials\r\n\t\tfinal String USER = PreAndPost.config.getProperty(\"DB_User\");\r\n\t\tfinal String PASS = PreAndPost.config.getProperty(\"DB_Pwd\");\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\r\n\t\tObject[][] data = null;\r\n\r\n\t\ttry{\r\n\r\n\t\t\t//STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\r\n\t\t\t//STEP 3: Open a connection\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\r\n\t\t\t//STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\tString count = \"Select count(*) from (\"+sql+\") AS T\";\r\n\t\t\tResultSet rs = stmt.executeQuery(count);\r\n\t\t\trs.next();\r\n\t\t\tint rowCount = rs.getInt(1);\r\n\r\n\t\t\t// Now run the query\r\n\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\tResultSetMetaData rsmd=rs.getMetaData();\r\n\r\n\t\t\t// get the column count\r\n\t\t\tint columnCount = rsmd.getColumnCount();\r\n\t\t\t\r\n\t\t\tdata = new Object[rowCount][columnCount]; // assign to the data provider array\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t//STEP 5: Extract data from result set\r\n\t\t\twhile(rs.next()){\r\n\r\n\t\t\t\tfor (int j = 1; j <= columnCount; j++) {\r\n\t\t\t\t\tswitch (rsmd.getColumnType(j)) {\r\n\t\t\t\t\tcase Types.VARCHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.NULL:\r\n\t\t\t\t\t\tdata[i][j-1] = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.CHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.TIMESTAMP:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDate(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.DOUBLE:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDouble(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.INTEGER:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.SMALLINT:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t//STEP 6: Clean-up environment\r\n\t\t\trs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\r\n\t\t}catch(SQLException se){\r\n\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\r\n\t\t}catch(Exception e){\r\n\r\n\t\t\t//Handle errors for Class.forName\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}finally{\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(stmt!=null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(conn!=null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data;\r\n\r\n\r\n\t}", "public GetProductoSrvRow[] getRows() {\n\t\tGetProductoSrvRow[] rows = new GetProductoSrvRow[select.getRowCount()];\n\t\tfor (int i = 0; i <= select.getRowCount() - 1; i++) {\n\t\t\trows[i] = new GetProductoSrvRow(select, i + 1);\n\t\t};\n\t\treturn rows;\n\t}", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "private List<T> singleRowResult( final Rows<R, C> result ) {\n\n if (logger.isTraceEnabled()) logger.trace( \"Only a single row has columns. Parsing directly\" );\n\n for ( R key : result.getKeys() ) {\n final ColumnList<C> columnList = result.getRow( key ).getColumns();\n\n final int size = columnList.size();\n\n if ( size > 0 ) {\n\n final List<T> results = new ArrayList<>(size);\n\n for(Column<C> column: columnList){\n results.add(columnParser.parseColumn( column ));\n }\n\n return results;\n\n\n }\n }\n\n //we didn't have any results, just return nothing\n return Collections.<T>emptyList();\n }", "java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> \n getRowList();", "public abstract String[] getRowValues(Cursor c);", "public Object[] toArray() {\r\n\t\treturn this.records.toArray();\r\n\t}", "T getRowData(int rowNumber);", "public String[][] convertResultSetToArray(ResultSet objResultSet)\n\t\t\tthrows AFTException {\n\n\t\tString[][] allValues = new String[maxRows][maxColumns];\n\t\tint rowNum = 0;\n\n\t\ttry {\n\n\t\t\tResultSetMetaData rsmd = objResultSet.getMetaData();\n\n\t\t\tint colCount = rsmd.getColumnCount();\n\n\t\t\t// Lets get the column names in first row\n\t\t\tfor (int i = 0; i < colCount; i++) {\n\t\t\t\tallValues[rowNum][i] = rsmd.getColumnName(i + 1);\n\t\t\t}\n\n\t\t\trowNum++;\n\n\t\t\t// If cursor is not at first row\n\t\t\tif (!objResultSet.isFirst()) {\n\t\t\t\twhile (objResultSet.next()) {\n\n\t\t\t\t\t// cannot store more than maxRows rows\n\t\t\t\t\tif (rowNum >= maxRows) {\n\t\t\t\t\t\tLOGGER.warn(\"Only the first \" + maxRows\n\t\t\t\t\t\t\t\t+ \" rows data can be stored.\");\n\t\t\t\t\t\treturn allValues;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int col = 0; col < colCount; col++) {\n\t\t\t\t\t\t// cannot store more than maxColumns columns\n\t\t\t\t\t\tif (col >= maxColumns) {\n\t\t\t\t\t\t\tLOGGER.warn(\"Only the first \" + maxColumns\n\t\t\t\t\t\t\t\t\t+ \" columns data can be stored.\");\n\t\t\t\t\t\t\treturn allValues;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tallValues[rowNum][col] = objResultSet\n\t\t\t\t\t\t\t\t.getString(col + 1);\n\t\t\t\t\t}\n\n\t\t\t\t\trowNum++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(e.toString());\n\t\t\tthrow new AFTException(e);\n\t\t}\n\n\t\tresultsetRowCount = rowNum - 1;\n\n\t\treturn allValues;\n\t}", "@Override\n\tprotected Object[] readCursor(ResultSet rs, int currentRow)\n\t\t\tthrows SQLException {\n\t\treturn super.readCursor(rs, currentRow);\n\t}", "public Object[] read_DB(String query) {\n\n Object[] result = new Object[2];\n java.sql.Connection con = null;\n boolean connected;\n try{\n con = DriverManager.getConnection(db_type + host + port + db_name,\n user + \"\",\n password + \"\");\n connected = true;\n }\n catch(SQLException e){\n connected = false;\n System.out.println(\"Error al conectar en la Base de datos: \" + e);\n result[0] = \"Error\";\n result[1] = \"Connecting BD\";\n close_connection(con);\n }\n\n if(connected){\n ResultSet rs;\n try{\n Statement st = con.createStatement();\n rs = st.executeQuery(query);\n\n Vector<String[]> table = makeTable(rs);\n if((table.size() == 1) && (table.get(0)[0] == \"Error\")) {\n result[0] = \"Error\";\n result[1] = table.get(0)[1];\n }\n else{\n result[0] = \"QueryResult\";\n result[1] = table;\n }\n\n close_connection(con);\n }\n catch(SQLException e){\n System.out.println(\"Error al ejecutar la consulta : \" + e);\n result[0] = \"Error\";\n result[1] = \"Executing Query\";\n close_connection(con);\n }\n }\n return result;\n\n }", "public abstract List<V> makeRowData();", "public abstract void emitRawRow();", "protected List<E> parseResultSet(ResultSet rs) throws DAOException {\n\t\tList<E> result = new ArrayList<>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(parseEntity(rs));\n\t\t\t}\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\n\t\treturn result;\n\t}", "public Row[] getRows() {return rows;}", "public static String[] getRowAsArray(final ILogger aLogger,\r\n final ResultSet aResultSet) {\r\n return getRowAsArray(aLogger, aResultSet, StringUtility.EMPTY);\r\n }", "public Object[] getOracleArray(long paramLong, int paramInt)\n/* */ throws SQLException\n/* */ {\n/* 283 */ int i = sliceLength(paramLong, paramInt);\n/* */ \n/* 285 */ if (i < 0) {\n/* 286 */ return null;\n/* */ }\n/* 288 */ Object localObject = null;\n/* */ \n/* 290 */ switch (this.sqlType)\n/* */ {\n/* */ \n/* */ case -13: \n/* 294 */ localObject = new BFILE[i];\n/* */ \n/* 296 */ break;\n/* */ \n/* */ case 2004: \n/* 299 */ localObject = new BLOB[i];\n/* */ \n/* 301 */ break;\n/* */ \n/* */ \n/* */ case 1: \n/* */ case 12: \n/* 306 */ localObject = new CHAR[i];\n/* */ \n/* 308 */ break;\n/* */ \n/* */ case 2005: \n/* 311 */ localObject = new CLOB[i];\n/* */ \n/* 313 */ break;\n/* */ \n/* */ case 91: \n/* 316 */ localObject = new DATE[i];\n/* */ \n/* 318 */ break;\n/* */ \n/* */ case 93: \n/* 321 */ localObject = new TIMESTAMP[i];\n/* */ \n/* 323 */ break;\n/* */ \n/* */ case -101: \n/* 326 */ localObject = new TIMESTAMPTZ[i];\n/* */ \n/* 328 */ break;\n/* */ \n/* */ case -102: \n/* 331 */ localObject = new TIMESTAMPLTZ[i];\n/* */ \n/* 333 */ break;\n/* */ \n/* */ case -104: \n/* 336 */ localObject = new INTERVALDS[i];\n/* */ \n/* 338 */ break;\n/* */ \n/* */ case -103: \n/* 341 */ localObject = new INTERVALYM[i];\n/* */ \n/* 343 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 2: \n/* */ case 3: \n/* */ case 4: \n/* */ case 5: \n/* */ case 6: \n/* */ case 7: \n/* */ case 8: \n/* 358 */ localObject = new NUMBER[i];\n/* */ \n/* 360 */ break;\n/* */ \n/* */ case -2: \n/* 363 */ localObject = new RAW[i];\n/* */ \n/* 365 */ break;\n/* */ \n/* */ case 100: \n/* 368 */ localObject = new BINARY_FLOAT[i];\n/* */ \n/* 370 */ break;\n/* */ \n/* */ case 101: \n/* 373 */ localObject = new BINARY_DOUBLE[i];\n/* */ \n/* 375 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 0: \n/* */ case 2002: \n/* */ case 2003: \n/* */ case 2006: \n/* */ case 2007: \n/* 386 */ if (this.old_factory == null)\n/* */ {\n/* 388 */ localObject = new ORAData[i];\n/* */ }\n/* */ else\n/* */ {\n/* 392 */ localObject = new CustomDatum[i];\n/* */ }\n/* */ \n/* 395 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case -15: \n/* */ case -9: \n/* 402 */ setNChar();\n/* 403 */ localObject = new CHAR[i];\n/* 404 */ break;\n/* */ \n/* */ case 2011: \n/* 407 */ localObject = new NCLOB[i];\n/* 408 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default: \n/* 414 */ SQLException localSQLException = DatabaseError.createSqlException(getConnectionDuringExceptionHandling(), 48);\n/* 415 */ localSQLException.fillInStackTrace();\n/* 416 */ throw localSQLException;\n/* */ }\n/* */ \n/* */ \n/* 420 */ return getOracleArray(paramLong, (Object[])localObject);\n/* */ }", "@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}", "java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> \n getRowList();", "T deserializeData(R r) throws SQLException;", "protected Utente[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tUtente dto = new Utente();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tUtente ret[] = new Utente[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "public Object[] executeSQLQuery(final String sql) {\n\n long start = System.currentTimeMillis();\n List<?> queryResult = txTemplate\n .execute(new TransactionCallback<List<?>>() {\n @Override\n public List<?> doInTransaction(TransactionStatus status) {\n return getSession(false).createSQLQuery(sql).list();\n }\n });\n logger.debug(\"executeSQLQuery took: \"\n + (System.currentTimeMillis() - start) + \" ms\");\n return queryResult.toArray();\n }", "private JSArray convertToJSArray(ArrayList<Object> row) {\n JSArray jsArray = new JSArray();\n for (int i = 0; i < row.size(); i++) {\n jsArray.put(row.get(i));\n }\n return jsArray;\n }", "protected PaypalIpn[] fetchMultiResults(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tCollection resultList = new ArrayList();\r\n\t\twhile (rs.next()) {\r\n\t\t\tPaypalIpn dto = new PaypalIpn();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\tresultList.add( dto );\r\n\t\t}\r\n\t\t\r\n\t\tPaypalIpn ret[] = new PaypalIpn[ resultList.size() ];\r\n\t\tresultList.toArray( ret );\r\n\t\treturn ret;\r\n\t}", "java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> \n getRowList();", "public com.vmware.vim.sms.RowData[] getRowData() {\n\t\treturn rowData;\n\t}", "int[] normalizedAddedRows() {\r\n IntegerVector list = new IntegerVector();\r\n int size = entries();\r\n for (int i = 0; i < size; ++i) {\r\n byte tc = getCommand(i);\r\n if (tc == TABLE_ADD) {\r\n int row_index = getRowIndex(i);\r\n // If row added, add to list\r\n list.addInt(row_index);\r\n }\r\n else if (tc == TABLE_REMOVE) {\r\n // If row removed, if the row is already in the list\r\n // it's removed from the list, otherwise we leave as is.\r\n int row_index = getRowIndex(i);\r\n int found_at = list.indexOf(row_index);\r\n if (found_at != -1) {\r\n list.removeIntAt(found_at);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Unknown command in journal.\");\r\n }\r\n }\r\n\r\n return list.toIntArray();\r\n }", "public java.sql.Array getArray(int i) throws SQLException\n {\n return m_rs.getArray(i);\n }", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "@Override\n\tpublic ArrayList<String> getRaw(final String... parameters) {\n\t\treturn this.execute(query,\n\t\t\t\tnew PreparedStatementCallback<ArrayList<String>>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ArrayList<String> doInPreparedStatement(\n\t\t\t\t\t\t\tPreparedStatement arg0) throws SQLException,\n\t\t\t\t\t\t\tDataAccessException {\n\t\t\t\t\t\tArrayList<String> result = new ArrayList<String>();\n\n\t\t\t\t\t\tsetArgs(arg0, parameters);\n\t\t\t\t\t\tResultSet rs = arg0.executeQuery();\n\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\tresult.add(rs.getString(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "private ArrayList<String[]> getTableRowData() \n {\n int numRow, numCol;\n ArrayList<String[]> data = new ArrayList<>();\n numRow = jtModel.getRowCount(); \n numCol = jtModel.getColumnCount();\n String[] row;\n for(int i = 0; i< numRow; i++)\n {\n row = new String[numCol];\n for(int j = 0; j< numCol; j++)\n {\n row[j] = jtModel.getValueAt(i, j).toString();\n } \n data.add(row);\n } \n return data;\n }", "public Vector[] getAllRowsData() {\n Vector[] va = new Vector[getModel().getRowCount()];\n getAllRowsData(va);\n return va;\n }", "protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session)\n \t\t\tthrows SQLException, HibernateException {\n \t\treturn row;\n \t}", "public static List<JSONObject> getFormattedResultSet(ResultSet rs){\r\n \r\n List<JSONObject> resList = new ArrayList<>();\r\n \r\n try{\r\n \r\n //getColumn names\r\n ResultSetMetaData rsMeta = rs.getMetaData();\r\n int columnCount = rsMeta.getColumnCount();\r\n List<String> columnNames = new ArrayList<>();\r\n //Loop to get all column names\r\n for(int i = 1; i <= columnCount; i++){\r\n //Adding all retrieved column name to List Object\r\n columnNames.add(rsMeta.getColumnName(i).toUpperCase());\r\n }\r\n \r\n while(rs.next()){\r\n // Convert all object to JSON object \r\n JSONObject obj = new JSONObject();\r\n for(int i = 1; i <= columnCount; i++){\r\n String key = columnNames.get(i - 1);\r\n String value = rs.getString(i);\r\n obj.put(key, value);\r\n }\r\n resList.add(obj);\r\n }\r\n \r\n } catch(SQLException | JSONException ex){\r\n \r\n System.out.println(ex);\r\n \r\n } finally{\r\n \r\n try{\r\n \r\n rs.close();\r\n \r\n }catch(SQLException e){\r\n \r\n System.out.println(e.getMessage());\r\n \r\n }\r\n }\r\n return resList;\r\n }", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "public Object[] getRowData(int currentRowIndex) {\n\n int width;\n try {\n width = currentSheet.getRow(0).getLastCellNum();\n }catch(Exception e){\n throw new IllegalStateException(\"The current sheet referenced in \" + currentSheet.getSheetName() + \" is empty and is not usable.\");\n }\n\n List<Object> rows = new ArrayList<>();\n Cell cell;\n\n for (int currentCell = 0; currentCell < width; currentCell++) {\n\n // empty cell catch\n try {\n cell = currentSheet.getRow(currentRowIndex).getCell(currentCell);\n } catch (Exception e) {\n cell = null;\n }\n\n // cell data retrieval\n Object value = getCellData(cell);\n\n // conversion with width catch\n if (parameterTypes != null && currentCell < parameterTypes.length)\n value = convertToType(value, parameterTypes[currentCell]);\n\n // final value added\n rows.add(value);\n }\n\n return rows.toArray();\n }", "public static final List resultSet2List(ResultSet rs) throws SQLException {\n\t\t// Tries to discover the name of each column\n\t\tfinal ResultSetMetaData metaData = rs.getMetaData();\n\t\tfinal List results = new ArrayList();\n\n\t\t// Puts each line in the result\n\t\twhile (rs.next()) {\n\t\t\tfinal List row = new ArrayList();\n\t\t\tresults.add(row);\n\n\t\t\t// For each field, creates a entry with the column name and its\n\t\t\t// value\n\t\t\tfor (int i = 1, size = metaData.getColumnCount(); i <= size; i++) {\n\t\t\t\trow.add(rs.getObject(i));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "public List selectAll() {\n\t\tList values = new ArrayList();\n\t\topen();\n\t\tCursor c = queryDB();\n\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t//\tvalues.add(hydrateNewObject(c));\n\t\t\t} while (c.moveToNext());\n\t\t}\n\t\t\n\t\tc.close();\n\t\tclose();\n\t\t\n\t\treturn values;\n\t}", "public List<List<String>> executeQueryAndReturnResult (String query) throws SQLException { \n // creates a statement object \n Statement stmt = this._connection.createStatement (); \n \n // issues the query instruction \n ResultSet rs = stmt.executeQuery (query); \n \n /* \n ** obtains the metadata object for the returned result set. The metadata \n ** contains row and column info. \n */ \n ResultSetMetaData rsmd = rs.getMetaData (); \n int numCol = rsmd.getColumnCount (); \n int rowCount = 0; \n \n // iterates through the result set and saves the data returned by the query. \n boolean outputHeader = false;\n List<List<String>> result = new ArrayList<List<String>>(); \n while (rs.next()){\n List<String> record = new ArrayList<String>(); \n for (int i=1; i<=numCol; ++i) \n record.add(rs.getString (i)); \n result.add(record); \n }//end while \n stmt.close (); \n return result; \n }", "private List<Map<String, Object>> prepareQueryResult(final ResultSet resultSet) throws SQLException {\n\n List<Map<String, Object>> result = new ArrayList<>();\n\n ResultSetMetaData metaData = resultSet.getMetaData();\n int count = metaData.getColumnCount();\n List<String> cols = new ArrayList<>(count);\n for (int i = 1; i <= count; i++) {\n cols.add(metaData.getColumnName(i));\n }\n\n boolean hasNext = resultSet.next();\n\n while (hasNext) {\n\n Map<String, Object> map = new LinkedHashMap<>();\n for (String col : cols) {\n Object value = resultSet.getObject(col);\n map.put(col, value);\n\n logger.debug(\"col:\" + col + \" value:\" + value);\n }\n result.add(map);\n\n hasNext = resultSet.next();\n }\n\n return result;\n\n }", "public String[][] datosEstiloViaje()\n {\n ResultSet sql; \n try {\n Connection con = conexion.abrirConexion();\n Statement s = con.createStatement();\n sql = s.executeQuery(\"SELECT `idEstiloViaje`, `tipo` FROM `estiloviaje` ;\");\n //número de registros obrenidos\n int count = 0;\n while (sql.next()) {\n ++count;\n }\n //declaración del array\n String [][] a = new String [count][2];\n //se regresa al primero\n sql.beforeFirst();\n //contador para copiar del resultset al array\n int i = 0;\n //copiar del resultset al array\n while (sql.next())\n {\n a[i][0] = sql.getString(1);\n a[i][1] = sql.getString(2);\n i++;\n } \n conexion.cerrarConexion(con);\n return a;\n }\n catch (SQLException ex)\n {\n return null;\n }\n catch(NullPointerException e){\n JOptionPane.showMessageDialog(null, \"Error al intentar conectar con el servidor.\");\n return null;\n }\n }", "public static Integer[] queryInts( String sql ) {\n \t\treturn query(sql).getColumnAs( 0, Integer[].class );\n \t}", "@Override\n\tpublic List<Object[]> getObjectData(String hql) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction transaction = session.beginTransaction();\n\t\tQuery query = session.createQuery(hql);\n\t\tList<Object[]> lists = query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn lists;\n\t}", "public String[][] selectData(String table, String whereClause) {\n\t\tSQLiteDatabase db = getWritableDatabase();\n\t\tString[][] selectedData = null;\n\t\ttry {\n\t\t\tCursor cur = db.rawQuery(\"Select * From \"+table + \" \"+whereClause, null);\n\t\t\tif(cur !=null) {\n\t\t\t\tif(cur.getCount() != 0) {\n\t\t\t\t\tcur.moveToFirst();\n\t\t\t\t\tselectedData = new String[cur.getCount()][cur.getColumnCount()];\n\t\t\t\t\tfor(int i = 0; i < selectedData.length - 1; i++) {\n\t\t\t\t\t\tcur.moveToNext();\n\t\t\t\t\t\tfor(int j = 0; j < selectedData[i].length - 1; j++) {\n\t\t\t\t\t\t\tselectedData[i][j] = cur.getString(j);\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} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif(db != null) {\n\t\t\t\tdb.close();\n\t\t\t}\n\t\t}\n\t\treturn selectedData;\n\t}", "public abstract ResultList executeSQL(RawQuery rawQuery);", "java.util.List<String>\n getRowsList();", "public String[][] datosActividades(String where)\n {\n ResultSet sql; \n try {\n Connection con = conexion.abrirConexion();\n Statement s = con.createStatement();\n sql = s.executeQuery(\"SELECT actividad.idActividad, actividad.nombre, tiene.foto FROM actividad \" +\n \"INNER JOIN tiene ON actividad.idActividad = tiene.Actividad_idActividad \" +\n \"INNER JOIN posee ON posee.tiene_idTiene = tiene.idTiene \" +\n where);\n //número de registros obrenidos\n int count = 0;\n while (sql.next()) {\n ++count;\n }\n //declaración del array\n String [][] a = new String [count][4];\n //se regresa al primero\n sql.beforeFirst();\n //contador para copiar del resultset al array\n int i = 0;\n //copiar del resultset al array\n while (sql.next())\n {\n a[i][0] = sql.getString(1);\n a[i][1] = sql.getString(2);\n a[i][2] = sql.getString(3);\n i++;\n } \n conexion.cerrarConexion(con);\n return a;\n }\n catch (SQLException ex)\n {\n return null;\n }\n catch(NullPointerException e){\n JOptionPane.showMessageDialog(null, \"Error al intentar conectar con el servidor.\");\n return null;\n }\n }", "List<C> getRow() throws Exception;", "ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}", "public String[] obtenerRegistro(String sqlConsulta) throws SQLException {\n try {\n this.sqlConsulta = sqlConsulta;\n ejecutarResultSet();\n if (!resultSet.first()) {\n return new String[0];\n }\n int cantidadColumnas = resultSet.getMetaData().getColumnCount();\n String[] datoRegistro = new String[cantidadColumnas];\n\n for (int i = 0; i < cantidadColumnas; i++) {\n datoRegistro[i] = resultSet.getString(i + 1);\n }\n return datoRegistro;\n } finally {\n cerrarResultSet();\n }\n\n }", "private List<LinkedHashMap<String, String>> resultSetToArrayList(ResultSet rs) throws SQLException {\r\n ResultSetMetaData md = rs.getMetaData();\r\n int columns = md.getColumnCount();\r\n ArrayList list = new ArrayList(50);\r\n while (rs.next()) {\r\n LinkedHashMap row = new LinkedHashMap(columns);\r\n for (int i = 1; i <= columns; ++i) {\r\n row.put(md.getColumnName(i), rs.getObject(i));\r\n }\r\n list.add(row);\r\n }\r\n return list;\r\n }", "public Object[][] Consulta(String Comsql) {\n Object Datos[][] = null;\n try {\n PreparedStatement pstm = con.prepareStatement(Comsql);\n /* declarando ResulSet que va a contener el resultado de la ejecucion del Query */\n ResultSet rs = pstm.executeQuery();\n /*se ubica en el ultimo registro, para saber cuantos ahi */\n rs.last();\n /*para saber el numero de filas y columnas del ResulSet */\n ResultSetMetaData rsmd = rs.getMetaData();\n /*aqui muestra la cantidad de filas y colmnas ahi */\n int numCols = rsmd.getColumnCount();\n int numFils = rs.getRow();\n /*cojemos nuestro objeto datos y le damos formato, eso es igual a numero de filas y numero de columnas */\n Datos = new Object[numFils][numCols];\n /* nos ubicamos antes de la primera fila */\n rs.beforeFirst();\n\n /*j= filas\n i= columnas\n */\n int j = 0;\n /*recorremos los datos del RS\n */\n while (rs.next()) {\n /*i siempre se inicializa en cero; la condicion va hasta que i sea menor que e numcol; y aumenta de 1 en 1 */\n for (int i = 0; i < numCols; i++) {\n /*aqui le asignamos valor a nuestro arreglo */\n Datos[j][i] = rs.getObject(i + 1);\n }\n j++;\n }\n pstm.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(\"Error : \" + e.getMessage());\n }\n return Datos;\n }", "protected ProductosPuntoVenta[] fetchMultiResults(ResultSet rs)\r\n throws SQLException {\r\n Collection<ProductosPuntoVenta> resultList = new ArrayList<ProductosPuntoVenta>();\r\n while (rs.next()) {\r\n ProductosPuntoVenta dto = new ProductosPuntoVenta();\r\n populateDto(dto, rs);\r\n resultList.add(dto);\r\n }\r\n ProductosPuntoVenta ret[] = new ProductosPuntoVenta[resultList.size()];\r\n resultList.toArray(ret);\r\n return ret;\r\n }", "public Cursor getCursorWithRows() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length())\n .addLengths(\"val123\".length()).setValues(ByteString\n .copyFromUtf8(\"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS TEAMHELLO\"\n +\n \" TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123val123\"))).build());\n return cursor;\n }", "Object[] toArray();", "Object[] toArray();", "Object[] toArray();", "public ResultSet ServerData() {\n\t\tResultSet rs = null; //new resultset of default value null\r\n\t\ttry {\r\n\r\n\r\n\t\t\tString query = \"SELECT * FROM TBLSERVERS\"; //get all data in the TBLSERVERS table\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(query); //prepare a new statement\r\n\t\t\trs = pst.executeQuery(); //execute statement and store result in a resultset \r\n\t\t} catch (SQLException ex) { //catches SQL exception to prevent an application crash in this case\r\n\t\t\tLogger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\r\n\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "public abstract List createNativeSQLQuery(String query);", "private String[] getJSONStringList() throws SQLException {\n String sql = \"select concat(c.chart_type, ', ', c.intermediate_data) content \" +\n \"from pride_2.pride_chart_data c, pride_2.pride_experiment e \" +\n \"where c.experiment_id = e.experiment_id \" +\n \"and e.accession = ? \" +\n \"order by 1\";\n\n Connection conn = PooledConnectionFactory.getConnection();\n PreparedStatement stat = conn.prepareStatement(sql);\n stat.setString(1, accession);\n ResultSet rs = stat.executeQuery();\n\n List<String> jsonList = new ArrayList<String>();\n while (rs.next()) {\n jsonList.add(rs.getString(1));\n }\n\n rs.close();\n conn.close();\n\n return jsonList.toArray(new String[jsonList.size()]);\n }", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public ResultSet getDataTestUser() throws SQLException{ \r\n String query= (\"select * from \"+Database.Table.TABLE_PRETEST_RESULT);\r\n ResultSet rs = q.querySelect(query);\r\n return rs;\r\n }", "private static Object[][] getData(Database d) {\n\t\tdb = d;\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "private static Object[] doQuery(String query, Connection connection, Object[] parameters, boolean emptyResultSet,\r\n Class<?>... resultColumnTypes) throws SQLException, LateDeliverablesProcessingException {\r\n PreparedStatement ps = null;\r\n\r\n try {\r\n ps = connection.prepareStatement(query);\r\n\r\n for (int i = 0; i < parameters.length; i++) {\r\n if (parameters[i] instanceof Timestamp) {\r\n ps.setTimestamp(i + 1, (Timestamp) parameters[i]);\r\n } else {\r\n ps.setLong(i + 1, (Long) parameters[i]);\r\n }\r\n }\r\n\r\n ResultSet rs = ps.executeQuery();\r\n\r\n if (!rs.next() && !emptyResultSet) {\r\n throw new LateDeliverablesProcessingException(\"The query should not \"\r\n + \" return an empty result set.\");\r\n }\r\n\r\n Object[] result = new Object[resultColumnTypes.length];\r\n\r\n for (int i = 0; i < resultColumnTypes.length; i++) {\r\n if (resultColumnTypes[i] == Timestamp.class) {\r\n result[i] = rs.getTimestamp(i + 1);\r\n } else if (resultColumnTypes[i] == Boolean.class) {\r\n result[i] = rs.getBoolean(i + 1);\r\n } else if (resultColumnTypes[i] == Long.class) {\r\n result[i] = rs.getLong(i + 1);\r\n } else {\r\n result[i] = rs.getObject(i + 1);\r\n if (result[i] != null && !resultColumnTypes[i].isInstance(result[i])) {\r\n throw new LateDeliverablesProcessingException(\"The result set \"\r\n + \" contains a value of not expected type (\"\r\n + result[i].getClass().getName() + \" obtained, but \"\r\n + resultColumnTypes[i].getName() + \" expected)\");\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n } finally {\r\n // Close the prepared statement\r\n closeStatement(ps);\r\n }\r\n }", "public double[] getRowData(int row) {\n return data[row];\n }", "List fetchAll() throws AdaptorException ;", "public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }", "public int[] getSelectedRows() {\n ArrayList tmp = new ArrayList(NUMBER_OF_GAMES);\n\n for (int i = 0; i < NUMBER_OF_GAMES; i++) {\n if (singleSystem[i] != 0) {\n tmp.add(new Integer(singleSystem[i]));\n }\n }\n\n // fix upp return value, e.g as a int[].\n int size = tmp.size();\n int[] returnValue = new int[size];\n\n for (int i = 0; i < size; i++) {\n returnValue[i] = ((Integer) tmp.get(i)).intValue();\n }\n\n return returnValue;\n }", "@Override\n\tpublic List<WanchengPO> mapRow(ResultSet rs) throws Exception {\n\t\treturn null;\n\t}", "public Book[] getRecommendBook(){\n\t\n\t String stmnt = String.format(\n \"SELECT * FROM book \" );\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n}", "@NonNull\r\n @SneakyThrows(SQLException.class)\r\n public static <T> List<T> executeQueryToList(ResultSet rs, QueryResultProcessor<T> processor) {\r\n List<T> result = new ArrayList<>();\r\n try {\r\n while (rs.next()) {\r\n result.add(processor.apply(rs));\r\n }\r\n } finally {\r\n rs.close();\r\n }\r\n return result;\r\n }", "java.util.List<? extends io.dstore.engine.procedures.MiCheckPerformanceAd.Response.RowOrBuilder> \n getRowOrBuilderList();", "public ResultSet queryRawSQL(String sql) throws SQLException{\n return mysql.query(sql);\n }", "public List<Object[]> select() {\n return selectColumns(metadata.getColumns());\n }" ]
[ "0.61707807", "0.61429375", "0.6115746", "0.6060453", "0.6028651", "0.6008751", "0.59879094", "0.5878787", "0.58459187", "0.5813331", "0.5760441", "0.5751669", "0.57378507", "0.5727813", "0.57225794", "0.5708294", "0.5694526", "0.5688657", "0.5681253", "0.56765544", "0.5668479", "0.5660111", "0.56246936", "0.55965537", "0.5592073", "0.559095", "0.5553452", "0.5530513", "0.5524055", "0.548844", "0.5485758", "0.54751384", "0.5461111", "0.54361176", "0.54287827", "0.5408733", "0.5406007", "0.54007286", "0.5399567", "0.53971994", "0.53791076", "0.5364027", "0.5363303", "0.5361169", "0.5357939", "0.5352267", "0.5342179", "0.5331994", "0.5325581", "0.53144574", "0.5314079", "0.53037953", "0.5281475", "0.5280884", "0.52766573", "0.52620703", "0.5261903", "0.5259596", "0.52560997", "0.52560323", "0.5252544", "0.5246887", "0.52423507", "0.52399755", "0.52327955", "0.52279353", "0.5223665", "0.5217124", "0.52158004", "0.5193834", "0.5190866", "0.5183342", "0.5170282", "0.5166955", "0.51614404", "0.5158433", "0.5158433", "0.5158433", "0.5138016", "0.5128324", "0.5119563", "0.5117563", "0.51158226", "0.5114918", "0.5113469", "0.5113469", "0.51131326", "0.5112082", "0.5112082", "0.5110059", "0.51027083", "0.51011753", "0.51009446", "0.50987875", "0.50966376", "0.5095072", "0.5094181", "0.5093465", "0.50924116", "0.5088646" ]
0.5197415
69
Method used to transform RAW query result to array of rows (without transofrming field values)
ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"NewApi\")\n private ObjectNode getRowsResultFromQuery(Cursor cur) {\n ObjectNode rowsResult = objectMapper.createObjectNode();\n\n ArrayNode rowsArrayResult = rowsResult.putArray(\"rows\");\n\n if (cur.moveToFirst()) {\n // query result has rows\n int colCount = cur.getColumnCount();\n \n // Build up JSON result object for each row\n do {\n ObjectNode row = objectMapper.createObjectNode();\n for (int i = 0; i < colCount; ++i) {\n String key = cur.getColumnName(i);\n \n // for old Android SDK remove lines from HERE:\n if (android.os.Build.VERSION.SDK_INT >= 11) {\n putValueBasedOnType(cur, row, key, i);\n // to HERE.\n } else {\n row.put(key, cur.getString(i));\n }\n }\n \n rowsArrayResult.add(row);\n \n } while (cur.moveToNext());\n }\n\n return rowsResult;\n }", "public Object[] toRawArray();", "private Object[] cloneRow() {\n\t\t\treturn (Object[]) (row.clone());\n\t\t}", "public static void parseResultDB(ResultSet rs){\n\n String data[] = {};\n for (Row row : rs){\n if(row['fid'] && row['pid']){\n while (row['qte'] != 0 || row['qte'])\n data[int(row['fid'])] += row ['pid'];\n row['pid']--;\n }\n }\n return data;\n }", "public Object[] toRow() {\n String dbType = this.getClass().getSimpleName().replace(\"Database\", \"\");\n dbType = dbType.substring(0, 1) + dbType.substring(1).toLowerCase();\n\n return new Object[] {dbType, getDbHost(), getDbName(), getDbUsername(), getDbPassword(), getUniqueId()};\n }", "public List<List<Object>> rows() {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n for (List<String> rawRow : getRawRows()) {\n List<Object> newRow = new ArrayList<Object>();\n for (int i = 0; i < rawRow.size(); i++) {\n newRow.add(transformCellValue(i, rawRow.get(i)));\n }\n rows.add(newRow);\n }\n return rows;\n }", "public static ArrayList<Object[]> getData(String query){\n ArrayList<Object[]> resultList = new ArrayList<Object[]>();\n ResultSet result;\n ResultSetMetaData rsmd;\n connect();\n try{\n Statement stm = conn.createStatement();\n result = stm.executeQuery(query);\n rsmd = result.getMetaData();\n Object[] obj = new Object[rsmd.getColumnCount()];\n while(result.next()){\n for(int col = 1; col < rsmd.getColumnCount(); col++){\n obj[col-1] = result.getObject(col);\n }\n resultList.add(obj);\n }\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n return resultList;\n }", "private List<T> singleRowResult( final Rows<R, C> result ) {\n\n if (logger.isTraceEnabled()) logger.trace( \"Only a single row has columns. Parsing directly\" );\n\n for ( R key : result.getKeys() ) {\n final ColumnList<C> columnList = result.getRow( key ).getColumns();\n\n final int size = columnList.size();\n\n if ( size > 0 ) {\n\n final List<T> results = new ArrayList<>(size);\n\n for(Column<C> column: columnList){\n results.add(columnParser.parseColumn( column ));\n }\n\n return results;\n\n\n }\n }\n\n //we didn't have any results, just return nothing\n return Collections.<T>emptyList();\n }", "public abstract List<V> makeRowData();", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "public Object [][] getRubrosPresupuesto2(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT idrubro,nombre,saldo,tipo_pago FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][4]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "private Object[] buildResult(RowMetaInterface rowMeta, Object[] rowData) throws KettleValueException\n { Deleting objects: we need to create a new object array\n\t\t// It's useless to call RowDataUtil.resizeArray\n\t\t//\n\t\tObject[] outputRowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n\t\tint outputIndex = 0;\n\t\t\n\t\t// Copy the data from the incoming row, but remove the unwanted fields in the same loop...\n\t\t//\n\t\tint removeIndex=0;\n\t\tfor (int i=0;i<rowMeta.size();i++) {\n\t\t\tif (removeIndex<data.removeNrs.length && i==data.removeNrs[removeIndex]) {\n\t\t\t\tremoveIndex++;\n\t\t\t} else\n\t\t\t{\n\t\t\t\toutputRowData[outputIndex++]=rowData[i];\n\t\t\t}\n\t\t}\n\n // Add the unpivoted fields...\n\t\t//\n for (int i=0;i<data.targetResult.length;i++)\n {\n Object resultValue = data.targetResult[i];\n DenormaliserTargetField field = meta.getDenormaliserTargetField()[i];\n switch(field.getTargetAggregationType())\n {\n case DenormaliserTargetField.TYPE_AGGR_AVERAGE :\n long count = data.counters[i];\n Object sum = data.sum[i];\n if (count>0)\n {\n \tif (sum instanceof Long) resultValue = (long)((Long)sum / count);\n \telse if (sum instanceof Double) resultValue = (double)((Double)sum / count);\n \telse if (sum instanceof BigDecimal) resultValue = ((BigDecimal)sum).divide(new BigDecimal(count));\n \telse resultValue = null; // TODO: perhaps throw an exception here?<\n }\n break;\n case DenormaliserTargetField.TYPE_AGGR_COUNT_ALL :\n if (resultValue == null) resultValue = Long.valueOf(0);\n if (field.getTargetType() != ValueMetaInterface.TYPE_INTEGER)\n {\n resultValue = data.outputRowMeta.getValueMeta(outputIndex).convertData(new ValueMeta(\"num_values_aggregation\", ValueMetaInterface.TYPE_INTEGER), resultValue);\n }\n break;\n default: break;\n }\n outputRowData[outputIndex++] = resultValue;\n }\n \n return outputRowData;\n }", "public Object[] getOracleArray()\n/* */ throws SQLException\n/* */ {\n/* 272 */ return getOracleArray(0L, Integer.MAX_VALUE);\n/* */ }", "public Object [][] getRubrosPresupuesto(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT * FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"MONTO\")); \r\n registro [4] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][5]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ;\r\n rowData [j][4] = reg[4] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "public java.util.List<com.randioo.tiger_server.protocol.Entity.RowData> getRowDataList() {\n return java.util.Collections.unmodifiableList(result.rowData_);\n }", "public abstract void emitRawRow();", "private LogQueryResult\n\tconvertQueryResult( final AttributeList queryResult )\n\t{\n\t final AttributeList fieldAttrs = (AttributeList)((Attribute)queryResult.get( 0 )).getValue();\n\t final String[] fieldHeaders = new String[ fieldAttrs.size() ];\n\t assert( fieldHeaders.length == LogRecordFields.NUM_FIELDS );\n\t for( int i = 0; i < fieldHeaders.length; ++i )\n\t {\n\t final Attribute attr = (Attribute)fieldAttrs.get( i );\n\t fieldHeaders[ i ] = (String)attr.getValue();\n\t //System.out.println( fieldHeaders[ i ] );\n\t }\n\t \n\t // extract every record\n\t final List<List<Serializable>> records =\n\t TypeCast.asList( ((Attribute)queryResult.get( 1 )).getValue() );\n\t final LogQueryEntry[] entries = new LogQueryEntry[ records.size() ];\n\t for( int recordIdx = 0; recordIdx < records.size(); ++recordIdx )\n\t {\n\t final List<Serializable> record = records.get( recordIdx );\n\t TypeCast.checkList( record, Serializable.class );\n\t \n\t assert( record.size() == fieldHeaders.length );\n\t final Serializable[] fieldValues = new Serializable[ fieldHeaders.length ];\n\t for( int fieldIdx = 0; fieldIdx < fieldValues.length; ++fieldIdx )\n\t {\n\t fieldValues[ fieldIdx ] = record.get( fieldIdx );\n\t }\n\t \n\t entries[ recordIdx ] = new LogQueryEntryImpl( fieldValues );\n\t }\n\t \n\t return new LogQueryResultImpl( fieldHeaders, entries );\n\t}", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "HashMap<String,Object> processQueryResultRow(Map<String,Object> rawRow, String collectionName) {\n HashMap<String,Object> resultRow = new HashMap<>();\n for (String key: rawRow.keySet()) {\n Object value = rawRow.get(key);\n if (collectionName != null)\n value = formatFieldValue(collectionName,key,value);\n if (value != null) resultRow.put(key,value);\n }\n return resultRow;\n }", "public Object[] toArray() {\r\n\t\treturn this.records.toArray();\r\n\t}", "java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> \n getRowList();", "Object[] getDataRow(final int index);", "private List<Map<String, Object>> prepareQueryResult(final ResultSet resultSet) throws SQLException {\n\n List<Map<String, Object>> result = new ArrayList<>();\n\n ResultSetMetaData metaData = resultSet.getMetaData();\n int count = metaData.getColumnCount();\n List<String> cols = new ArrayList<>(count);\n for (int i = 1; i <= count; i++) {\n cols.add(metaData.getColumnName(i));\n }\n\n boolean hasNext = resultSet.next();\n\n while (hasNext) {\n\n Map<String, Object> map = new LinkedHashMap<>();\n for (String col : cols) {\n Object value = resultSet.getObject(col);\n map.put(col, value);\n\n logger.debug(\"col:\" + col + \" value:\" + value);\n }\n result.add(map);\n\n hasNext = resultSet.next();\n }\n\n return result;\n\n }", "ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) {\n ArrayList<Map<String,Object>> rawRows = parseQueryResult(result);\n if (rawRows == null || rawRows.size()==0) return null;\n ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>();\n for (Map<String,Object> rawRow: rawRows) {\n HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName);\n if (resultRow.size()>0) resultRows.add(resultRow);\n }\n return resultRows;\n }", "public abstract String[] getRowValues(Cursor c);", "T getRowData(int rowNumber);", "public Cursor getCursorWithRows() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length())\n .addLengths(\"val123\".length()).setValues(ByteString\n .copyFromUtf8(\"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS TEAMHELLO\"\n +\n \" TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123val123\"))).build());\n return cursor;\n }", "@Override\n\tpublic List<WanchengPO> mapRow(ResultSet rs) throws Exception {\n\t\treturn null;\n\t}", "public String[][] getData(String stmt, int numOfFields) {\n String[][] result = new String[0][];\n try {\n Statement stmnt = connection.createStatement();\n result = new String[100][100];\n ResultSet rs = stmnt.executeQuery(stmt);\n int row = 0;\n while (rs.next()) {\n for (int i = 1; i <= numOfFields; i++) {\n\n result[row][i - 1] = rs.getString(i);\n\n } //for\n row++;\n } //while\n } //try\n catch (SQLException sqlex) {\n System.out.println(sqlex.getMessage());\n } //catch\n return result;\n }", "int[] normalizedAddedRows() {\r\n IntegerVector list = new IntegerVector();\r\n int size = entries();\r\n for (int i = 0; i < size; ++i) {\r\n byte tc = getCommand(i);\r\n if (tc == TABLE_ADD) {\r\n int row_index = getRowIndex(i);\r\n // If row added, add to list\r\n list.addInt(row_index);\r\n }\r\n else if (tc == TABLE_REMOVE) {\r\n // If row removed, if the row is already in the list\r\n // it's removed from the list, otherwise we leave as is.\r\n int row_index = getRowIndex(i);\r\n int found_at = list.indexOf(row_index);\r\n if (found_at != -1) {\r\n list.removeIntAt(found_at);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Unknown command in journal.\");\r\n }\r\n }\r\n\r\n return list.toIntArray();\r\n }", "private JSArray convertToJSArray(ArrayList<Object> row) {\n JSArray jsArray = new JSArray();\n for (int i = 0; i < row.size(); i++) {\n jsArray.put(row.get(i));\n }\n return jsArray;\n }", "public static Object[][] getData() {\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "public Object[] getRowData(int currentRowIndex) {\n\n int width;\n try {\n width = currentSheet.getRow(0).getLastCellNum();\n }catch(Exception e){\n throw new IllegalStateException(\"The current sheet referenced in \" + currentSheet.getSheetName() + \" is empty and is not usable.\");\n }\n\n List<Object> rows = new ArrayList<>();\n Cell cell;\n\n for (int currentCell = 0; currentCell < width; currentCell++) {\n\n // empty cell catch\n try {\n cell = currentSheet.getRow(currentRowIndex).getCell(currentCell);\n } catch (Exception e) {\n cell = null;\n }\n\n // cell data retrieval\n Object value = getCellData(cell);\n\n // conversion with width catch\n if (parameterTypes != null && currentCell < parameterTypes.length)\n value = convertToType(value, parameterTypes[currentCell]);\n\n // final value added\n rows.add(value);\n }\n\n return rows.toArray();\n }", "public GetProductoSrvRow[] getRows() {\n\t\tGetProductoSrvRow[] rows = new GetProductoSrvRow[select.getRowCount()];\n\t\tfor (int i = 0; i <= select.getRowCount() - 1; i++) {\n\t\t\trows[i] = new GetProductoSrvRow(select, i + 1);\n\t\t};\n\t\treturn rows;\n\t}", "private Object[] buildEmptyRow() {\n Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n\n return rowData;\n }", "@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}", "public Row[] getRows() {return rows;}", "java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> \n getRowList();", "public ArrayList<byte[]> queryData(String tablename, String schema){\n ArrayList<byte[]> res = new ArrayList<byte[]>();\n\n ResultSet resultSet = session.execute(\"SELECT * FROM \" + tablename);\n for (Row row : resultSet) {\n ByteBuffer data = row.getBytes(schema);\n res.add(data.array());\n }\n return res;\n }", "private ArrayList<String[]> getTableRowData() \n {\n int numRow, numCol;\n ArrayList<String[]> data = new ArrayList<>();\n numRow = jtModel.getRowCount(); \n numCol = jtModel.getColumnCount();\n String[] row;\n for(int i = 0; i< numRow; i++)\n {\n row = new String[numCol];\n for(int j = 0; j< numCol; j++)\n {\n row[j] = jtModel.getValueAt(i, j).toString();\n } \n data.add(row);\n } \n return data;\n }", "public List<String> getRows();", "private List<LinkedHashMap<String, String>> resultSetToArrayList(ResultSet rs) throws SQLException {\r\n ResultSetMetaData md = rs.getMetaData();\r\n int columns = md.getColumnCount();\r\n ArrayList list = new ArrayList(50);\r\n while (rs.next()) {\r\n LinkedHashMap row = new LinkedHashMap(columns);\r\n for (int i = 1; i <= columns; ++i) {\r\n row.put(md.getColumnName(i), rs.getObject(i));\r\n }\r\n list.add(row);\r\n }\r\n return list;\r\n }", "protected List<E> parseResultSet(ResultSet rs) throws DAOException {\n\t\tList<E> result = new ArrayList<>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(parseEntity(rs));\n\t\t\t}\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\n\t\treturn result;\n\t}", "public Object[] getData() {\n return rowData;\n }", "public static Object[] tryGetValuesForProjection(Map<String, Object> row,\r\n\t\t\tString[] projection) {\r\n\r\n\t\tObject[] values = new Object[projection.length];\r\n\t\tint index = 0;\r\n\t\tfor (String fieldName : projection)\r\n\t\t{\r\n\t\t\tif (row.containsKey(fieldName))\r\n\t\t\t{\r\n\t\t\t\tvalues[index++] = row.get(fieldName);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// this row does not have all field mappings so break\r\n\t\t\t\tvalues = null;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn values;\r\n\t}", "java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> \n getRowList();", "public abstract List createNativeSQLQuery(String query);", "public final Column[] getRawColumns() { return columns; }", "List<C> getRow() throws Exception;", "@Override\n\tprotected Object[] readCursor(ResultSet rs, int currentRow)\n\t\t\tthrows SQLException {\n\t\treturn super.readCursor(rs, currentRow);\n\t}", "public static Object[][] getDataFromDb(String sql){\n\t\tfinal String JDBC_DRIVER = PreAndPost.config.getProperty(\"DB_Pkg\"); \r\n\t\tfinal String DB_URL = PreAndPost.config.getProperty(\"DB_Url\");\r\n\r\n\t\t// Database credentials\r\n\t\tfinal String USER = PreAndPost.config.getProperty(\"DB_User\");\r\n\t\tfinal String PASS = PreAndPost.config.getProperty(\"DB_Pwd\");\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\r\n\t\tObject[][] data = null;\r\n\r\n\t\ttry{\r\n\r\n\t\t\t//STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\r\n\t\t\t//STEP 3: Open a connection\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\r\n\t\t\t//STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\tString count = \"Select count(*) from (\"+sql+\") AS T\";\r\n\t\t\tResultSet rs = stmt.executeQuery(count);\r\n\t\t\trs.next();\r\n\t\t\tint rowCount = rs.getInt(1);\r\n\r\n\t\t\t// Now run the query\r\n\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\tResultSetMetaData rsmd=rs.getMetaData();\r\n\r\n\t\t\t// get the column count\r\n\t\t\tint columnCount = rsmd.getColumnCount();\r\n\t\t\t\r\n\t\t\tdata = new Object[rowCount][columnCount]; // assign to the data provider array\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t//STEP 5: Extract data from result set\r\n\t\t\twhile(rs.next()){\r\n\r\n\t\t\t\tfor (int j = 1; j <= columnCount; j++) {\r\n\t\t\t\t\tswitch (rsmd.getColumnType(j)) {\r\n\t\t\t\t\tcase Types.VARCHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.NULL:\r\n\t\t\t\t\t\tdata[i][j-1] = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.CHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.TIMESTAMP:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDate(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.DOUBLE:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDouble(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.INTEGER:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.SMALLINT:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t//STEP 6: Clean-up environment\r\n\t\t\trs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\r\n\t\t}catch(SQLException se){\r\n\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\r\n\t\t}catch(Exception e){\r\n\r\n\t\t\t//Handle errors for Class.forName\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}finally{\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(stmt!=null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(conn!=null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data;\r\n\r\n\r\n\t}", "T deserializeData(R r) throws SQLException;", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "@NonNull\n Collection<TObj> getRowItems(int row) {\n Collection<TObj> result = new LinkedList<>();\n SparseArrayCompat<TObj> array = mData.get(row);\n for (int count = array.size(), i = 0; i < count; i++) {\n int key = array.keyAt(i);\n TObj columnObj = array.get(key);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }", "public Object[] getRawContent() {\n Object[] returnedContent = fFieldsMap.values().toArray(new Object[fFieldsMap.size()]);\n return returnedContent;\n }", "java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> \n getRowList();", "@Override\n\tpublic Object[] toArray() {\n\t\treturn snapshot().toArray();\n\t}", "@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn snapshot().toArray();\n\t\t}", "protected abstract List<?> getRowValues(T dataObject);", "public Book[] getRecommendBook(){\n\t\n\t String stmnt = String.format(\n \"SELECT * FROM book \" );\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n}", "Object[] toArray();", "Object[] toArray();", "Object[] toArray();", "public static List<JSONObject> getFormattedResultSet(ResultSet rs){\r\n \r\n List<JSONObject> resList = new ArrayList<>();\r\n \r\n try{\r\n \r\n //getColumn names\r\n ResultSetMetaData rsMeta = rs.getMetaData();\r\n int columnCount = rsMeta.getColumnCount();\r\n List<String> columnNames = new ArrayList<>();\r\n //Loop to get all column names\r\n for(int i = 1; i <= columnCount; i++){\r\n //Adding all retrieved column name to List Object\r\n columnNames.add(rsMeta.getColumnName(i).toUpperCase());\r\n }\r\n \r\n while(rs.next()){\r\n // Convert all object to JSON object \r\n JSONObject obj = new JSONObject();\r\n for(int i = 1; i <= columnCount; i++){\r\n String key = columnNames.get(i - 1);\r\n String value = rs.getString(i);\r\n obj.put(key, value);\r\n }\r\n resList.add(obj);\r\n }\r\n \r\n } catch(SQLException | JSONException ex){\r\n \r\n System.out.println(ex);\r\n \r\n } finally{\r\n \r\n try{\r\n \r\n rs.close();\r\n \r\n }catch(SQLException e){\r\n \r\n System.out.println(e.getMessage());\r\n \r\n }\r\n }\r\n return resList;\r\n }", "@Override\n\tpublic List<Object[]> getObjectData(String hql) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction transaction = session.beginTransaction();\n\t\tQuery query = session.createQuery(hql);\n\t\tList<Object[]> lists = query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn lists;\n\t}", "public <Q> Q[] asDataArray(Q[] a);", "public static final List resultSet2List(ResultSet rs) throws SQLException {\n\t\t// Tries to discover the name of each column\n\t\tfinal ResultSetMetaData metaData = rs.getMetaData();\n\t\tfinal List results = new ArrayList();\n\n\t\t// Puts each line in the result\n\t\twhile (rs.next()) {\n\t\t\tfinal List row = new ArrayList();\n\t\t\tresults.add(row);\n\n\t\t\t// For each field, creates a entry with the column name and its\n\t\t\t// value\n\t\t\tfor (int i = 1, size = metaData.getColumnCount(); i <= size; i++) {\n\t\t\t\trow.add(rs.getObject(i));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "public Object[] getOracleArray(long paramLong, int paramInt)\n/* */ throws SQLException\n/* */ {\n/* 283 */ int i = sliceLength(paramLong, paramInt);\n/* */ \n/* 285 */ if (i < 0) {\n/* 286 */ return null;\n/* */ }\n/* 288 */ Object localObject = null;\n/* */ \n/* 290 */ switch (this.sqlType)\n/* */ {\n/* */ \n/* */ case -13: \n/* 294 */ localObject = new BFILE[i];\n/* */ \n/* 296 */ break;\n/* */ \n/* */ case 2004: \n/* 299 */ localObject = new BLOB[i];\n/* */ \n/* 301 */ break;\n/* */ \n/* */ \n/* */ case 1: \n/* */ case 12: \n/* 306 */ localObject = new CHAR[i];\n/* */ \n/* 308 */ break;\n/* */ \n/* */ case 2005: \n/* 311 */ localObject = new CLOB[i];\n/* */ \n/* 313 */ break;\n/* */ \n/* */ case 91: \n/* 316 */ localObject = new DATE[i];\n/* */ \n/* 318 */ break;\n/* */ \n/* */ case 93: \n/* 321 */ localObject = new TIMESTAMP[i];\n/* */ \n/* 323 */ break;\n/* */ \n/* */ case -101: \n/* 326 */ localObject = new TIMESTAMPTZ[i];\n/* */ \n/* 328 */ break;\n/* */ \n/* */ case -102: \n/* 331 */ localObject = new TIMESTAMPLTZ[i];\n/* */ \n/* 333 */ break;\n/* */ \n/* */ case -104: \n/* 336 */ localObject = new INTERVALDS[i];\n/* */ \n/* 338 */ break;\n/* */ \n/* */ case -103: \n/* 341 */ localObject = new INTERVALYM[i];\n/* */ \n/* 343 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 2: \n/* */ case 3: \n/* */ case 4: \n/* */ case 5: \n/* */ case 6: \n/* */ case 7: \n/* */ case 8: \n/* 358 */ localObject = new NUMBER[i];\n/* */ \n/* 360 */ break;\n/* */ \n/* */ case -2: \n/* 363 */ localObject = new RAW[i];\n/* */ \n/* 365 */ break;\n/* */ \n/* */ case 100: \n/* 368 */ localObject = new BINARY_FLOAT[i];\n/* */ \n/* 370 */ break;\n/* */ \n/* */ case 101: \n/* 373 */ localObject = new BINARY_DOUBLE[i];\n/* */ \n/* 375 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 0: \n/* */ case 2002: \n/* */ case 2003: \n/* */ case 2006: \n/* */ case 2007: \n/* 386 */ if (this.old_factory == null)\n/* */ {\n/* 388 */ localObject = new ORAData[i];\n/* */ }\n/* */ else\n/* */ {\n/* 392 */ localObject = new CustomDatum[i];\n/* */ }\n/* */ \n/* 395 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case -15: \n/* */ case -9: \n/* 402 */ setNChar();\n/* 403 */ localObject = new CHAR[i];\n/* 404 */ break;\n/* */ \n/* */ case 2011: \n/* 407 */ localObject = new NCLOB[i];\n/* 408 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default: \n/* 414 */ SQLException localSQLException = DatabaseError.createSqlException(getConnectionDuringExceptionHandling(), 48);\n/* 415 */ localSQLException.fillInStackTrace();\n/* 416 */ throw localSQLException;\n/* */ }\n/* */ \n/* */ \n/* 420 */ return getOracleArray(paramLong, (Object[])localObject);\n/* */ }", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "public Cursor getCursorWithRowsAsNull() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length()).addLengths(-1).setValues(\n ByteString.copyFromUtf8(\n \"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS \"\n +\n \"TEAMHELLO TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123\"))).build());\n return cursor;\n }", "private RowDataInvert[] getConfigTableInvert() {\n RowDataInvert order = new RowDataInvert(\"\", \"\", false, \"\", \"ORDER\", \"KM/H\", true, true, false);\r\n //\r\n RowDataInvert batch = new RowDataInvert(\"main_table\", \"batch_id\", false, \"batch_nr\", \"BATCH\", \"\", true, true, false);\r\n //\r\n String fixedComboValues = \"admin,user,useradvanced,developer\";\r\n RowDataInvert fixdValTest = new RowDataInvert(RowDataInvert.TYPE_JCOMBOBOX, fixedComboValues, null, \"\", \"\", \"\", false, \"test\", \"TEST\", \"\", true, true, false);\r\n fixdValTest.enableFixedValues();\r\n //\r\n //\r\n String q_5 = MCRecipe.SQL_B.basic_combobox_query_double_param(\"recipe_id\", \"batch_id\", \"main_table\");\r\n RowDataInvert line = new RowDataInvert(RowDataInvert.TYPE_JCOMBOBOX, q_5, sql, \"\", \"\", \"\", false, \"line_nr\", \"LINE\", \"\", true, true, false);\r\n line.enableComboBoxMultipleValue();\r\n //\r\n String q_6 = MCRecipe.SQL_B.basic_combobox_query(\"duration\", \"main_table\");\r\n RowDataInvert duration = new RowDataInvert(RowDataInvert.TYPE_JCOMBOBOX, q_6, sql, \"\", \"main_table\", \"batch_id\", false, \"duration\", \"DURATION\", \"\", true, true, false);\r\n //\r\n RowDataInvert[] rows = {\r\n fixdValTest,\r\n order,\r\n batch,\r\n // recipe,\r\n line,\r\n duration};\r\n //\r\n return rows;\r\n }", "@Override\n\tpublic ArrayList<String> getRaw(final String... parameters) {\n\t\treturn this.execute(query,\n\t\t\t\tnew PreparedStatementCallback<ArrayList<String>>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ArrayList<String> doInPreparedStatement(\n\t\t\t\t\t\t\tPreparedStatement arg0) throws SQLException,\n\t\t\t\t\t\t\tDataAccessException {\n\t\t\t\t\t\tArrayList<String> result = new ArrayList<String>();\n\n\t\t\t\t\t\tsetArgs(arg0, parameters);\n\t\t\t\t\t\tResultSet rs = arg0.executeQuery();\n\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\tresult.add(rs.getString(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "java.util.List<? extends io.dstore.engine.procedures.MiCheckPerformanceAd.Response.RowOrBuilder> \n getRowOrBuilderList();", "public double[] getRowData(int row) {\n return data[row];\n }", "public abstract ResultList executeSQL(RawQuery rawQuery);", "public Vector[] getAllRowsData() {\n Vector[] va = new Vector[getModel().getRowCount()];\n getAllRowsData(va);\n return va;\n }", "public interface RowToByteArrayConverter {\r\n byte[] rowToByteArray(ResultSet resultSet);\r\n}", "List<List<Object>> getTableValues();", "protected PaypalIpn[] fetchMultiResults(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tCollection resultList = new ArrayList();\r\n\t\twhile (rs.next()) {\r\n\t\t\tPaypalIpn dto = new PaypalIpn();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\tresultList.add( dto );\r\n\t\t}\r\n\t\t\r\n\t\tPaypalIpn ret[] = new PaypalIpn[ resultList.size() ];\r\n\t\tresultList.toArray( ret );\r\n\t\treturn ret;\r\n\t}", "public com.vmware.vim.sms.RowData[] getRowData() {\n\t\treturn rowData;\n\t}", "public Object[] read_DB(String query) {\n\n Object[] result = new Object[2];\n java.sql.Connection con = null;\n boolean connected;\n try{\n con = DriverManager.getConnection(db_type + host + port + db_name,\n user + \"\",\n password + \"\");\n connected = true;\n }\n catch(SQLException e){\n connected = false;\n System.out.println(\"Error al conectar en la Base de datos: \" + e);\n result[0] = \"Error\";\n result[1] = \"Connecting BD\";\n close_connection(con);\n }\n\n if(connected){\n ResultSet rs;\n try{\n Statement st = con.createStatement();\n rs = st.executeQuery(query);\n\n Vector<String[]> table = makeTable(rs);\n if((table.size() == 1) && (table.get(0)[0] == \"Error\")) {\n result[0] = \"Error\";\n result[1] = table.get(0)[1];\n }\n else{\n result[0] = \"QueryResult\";\n result[1] = table;\n }\n\n close_connection(con);\n }\n catch(SQLException e){\n System.out.println(\"Error al ejecutar la consulta : \" + e);\n result[0] = \"Error\";\n result[1] = \"Executing Query\";\n close_connection(con);\n }\n }\n return result;\n\n }", "protected Utente[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tUtente dto = new Utente();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tUtente ret[] = new Utente[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "default Object convert(GenericRowData row) {\n return convert(row, -1);\n }", "public String[][] convertResultSetToArray(ResultSet objResultSet)\n\t\t\tthrows AFTException {\n\n\t\tString[][] allValues = new String[maxRows][maxColumns];\n\t\tint rowNum = 0;\n\n\t\ttry {\n\n\t\t\tResultSetMetaData rsmd = objResultSet.getMetaData();\n\n\t\t\tint colCount = rsmd.getColumnCount();\n\n\t\t\t// Lets get the column names in first row\n\t\t\tfor (int i = 0; i < colCount; i++) {\n\t\t\t\tallValues[rowNum][i] = rsmd.getColumnName(i + 1);\n\t\t\t}\n\n\t\t\trowNum++;\n\n\t\t\t// If cursor is not at first row\n\t\t\tif (!objResultSet.isFirst()) {\n\t\t\t\twhile (objResultSet.next()) {\n\n\t\t\t\t\t// cannot store more than maxRows rows\n\t\t\t\t\tif (rowNum >= maxRows) {\n\t\t\t\t\t\tLOGGER.warn(\"Only the first \" + maxRows\n\t\t\t\t\t\t\t\t+ \" rows data can be stored.\");\n\t\t\t\t\t\treturn allValues;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int col = 0; col < colCount; col++) {\n\t\t\t\t\t\t// cannot store more than maxColumns columns\n\t\t\t\t\t\tif (col >= maxColumns) {\n\t\t\t\t\t\t\tLOGGER.warn(\"Only the first \" + maxColumns\n\t\t\t\t\t\t\t\t\t+ \" columns data can be stored.\");\n\t\t\t\t\t\t\treturn allValues;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tallValues[rowNum][col] = objResultSet\n\t\t\t\t\t\t\t\t.getString(col + 1);\n\t\t\t\t\t}\n\n\t\t\t\t\trowNum++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(e.toString());\n\t\t\tthrow new AFTException(e);\n\t\t}\n\n\t\tresultsetRowCount = rowNum - 1;\n\n\t\treturn allValues;\n\t}", "public ArrayList<MensurationRow> toRow() {\n\t\tArrayList<MensurationRow> arr = new ArrayList<MensurationRow>();\n\t\t\n\t\tarr.addAll(getGenerale().toRow());\n\t\tarr.addAll(getHaut().toRow());\n\t\tarr.addAll(getBas().toRow());\n\t\tarr.addAll(getMain().toRow());\n\t\t\n\t\treturn arr;\n\t}", "List<T> getSQLList(String sql);", "public JSONArray getResponseAsArray(String query) throws RmesException {\n\t\treturn repositoryUtils.getResponseAsArray(query, repositoryUtils.initRepository(config.getRdfServerPublication(), config.getRepositoryIdPublication()));\n\t}", "protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session)\n \t\t\tthrows SQLException, HibernateException {\n \t\treturn row;\n \t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic <T> List<T> mapRowsFromQuery(List<Map<String, Object>> resultSet) {\n\t\tList<BaseIcon> baseIcons = new ArrayList<BaseIcon>();\r\n\t\t\r\n\t\tfor (Map<String, Object> result : resultSet) {\r\n\t\t\tint iconId = (int) result.get(\"iconId\");\r\n\t\t\tString iconName = (String) result.get(\"iconName\");\r\n\t\t\tint iconCounter = (int) result.get(\"iconCounter\");\r\n\t\t\tString iconStatus = (String) result.get(\"iconStatus\");\r\n\t\t\tint typeId = (int) result.get(\"typeId\");\r\n\t\t\tString typeName = (String) result.get(\"typeName\");\r\n\t\t\tint typeClass = (int) result.get(\"typeClass\");\r\n\t\t\t\r\n\t\t\tbaseIcons.add(new BaseIcon(iconId, iconName, iconCounter, iconStatus, new IconType(typeId, typeName, typeClass, 0)));\r\n\t\t}\r\n\t\t\r\n\t\treturn (List<T>) baseIcons;\r\n\t}", "public List selectAll() {\n\t\tList values = new ArrayList();\n\t\topen();\n\t\tCursor c = queryDB();\n\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t//\tvalues.add(hydrateNewObject(c));\n\t\t\t} while (c.moveToNext());\n\t\t}\n\t\t\n\t\tc.close();\n\t\tclose();\n\t\t\n\t\treturn values;\n\t}", "public List<Map<String, Object>> transformResultSetToList(final ResultSet resultSet) throws SQLException {\n ResultSetMetaData resultSetMetaData = resultSet.getMetaData();\n int columns = resultSetMetaData.getColumnCount();\n List<Map<String, Object>> result = new ArrayList<>();\n while (resultSet.next()) {\n Map<String, Object> row = new HashMap<>();\n for (int i = 1; i <= columns; i++) {\n row.put(resultSetMetaData.getColumnLabel(i).toLowerCase(), resultSet.getObject(i));\n }\n result.add(row);\n }\n return result;\n }", "private DataSheet arrayToDs(Object[] row) throws SQLException {\n\t\tString[] columnNames = { this.name };\n\t\tValueType vt = this.getValueType();\n\t\tif (row.length == 0) {\n\t\t\tValueType[] types = { this.dataTypeObject.getValueType() };\n\t\t\treturn new MultiRowsSheet(columnNames, types);\n\t\t}\n\t\tValue[][] values = { vt.toValues(row) };\n\t\treturn new MultiRowsSheet(columnNames, values);\n\t}", "@Override\n\tpublic Object[] toArray() {\n\t\treturn new Object[]{ id, reader.id, bookEntity.id, status, startDate, expireDate, returnDate };\n\t}", "public Object[] getRow(int r) {\n Object[] dta = new Object[data.columns];\n for (int i = 0; i < data.columns; i++)\n dta[i] = data.values[i][r];\n return dta;\n }", "public List<Object[]> getRetencionSRI(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden)\r\n/* 59: */ {\r\n/* 60:107 */ StringBuilder sql = new StringBuilder();\r\n/* 61: */ \r\n/* 62:109 */ sql.append(\" SELECT f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, \");\r\n/* 63:110 */ sql.append(\" CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), \");\r\n/* 64:111 */ sql.append(\" f.identificacionProveedor, c.descripcion, \");\r\n/* 65:112 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) \");\r\n/* 66:113 */ sql.append(\" \\t+COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) ELSE COALESCE(dfp.baseImponibleRetencion, 0) END,0), \");\r\n/* 67:114 */ sql.append(\" coalesce(dfp.porcentajeRetencion, 0), coalesce(dfp.valorRetencion, 0), coalesce(c.codigo, 'NA'), \");\r\n/* 68:115 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA THEN 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD THEN 'ISD' ELSE '' END,'NA'), \");\r\n/* 69:116 */ sql.append(\" CONCAT(f.establecimientoRetencion,'-',f.puntoEmisionRetencion,'-',f.numeroRetencion), \");\r\n/* 70:117 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 71:118 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, f.autorizacion, f.claveAcceso, f.estado,f.idFacturaProveedorSRI, fp.descripcion \");\r\n/* 72:119 */ sql.append(\" FROM DetalleFacturaProveedorSRI dfp \");\r\n/* 73:120 */ sql.append(\" RIGHT OUTER JOIN dfp.conceptoRetencionSRI c \");\r\n/* 74:121 */ sql.append(\" RIGHT OUTER JOIN dfp.facturaProveedorSRI f \");\r\n/* 75:122 */ sql.append(\" LEFT OUTER JOIN f.facturaProveedor fp \");\r\n/* 76:123 */ sql.append(\" LEFT JOIN f.creditoTributarioSRI ct \");\r\n/* 77:124 */ sql.append(\" WHERE MONTH(f.fechaRegistro) =:mes AND f.documentoModificado IS NULL \");\r\n/* 78:125 */ sql.append(\" AND YEAR(f.fechaRegistro) =:anio \");\r\n/* 79:126 */ sql.append(\" AND f.estado!=:estadoAnulado \");\r\n/* 80:127 */ sql.append(\" AND f.indicadorSaldoInicial!=true \");\r\n/* 81:128 */ sql.append(\" AND f.idOrganizacion = :idOrganizacion \");\r\n/* 82:129 */ if (sucursalFP != null) {\r\n/* 83:130 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 84: */ }\r\n/* 85:132 */ if (sucursalRetencion != null) {\r\n/* 86:133 */ sql.append(\" AND f.establecimientoRetencion = :sucursalRetencion \");\r\n/* 87: */ }\r\n/* 88:135 */ if (puntoVentaRetencion != null) {\r\n/* 89:136 */ sql.append(\" AND f.puntoEmisionRetencion = :puntoVentaRetencion \");\r\n/* 90: */ }\r\n/* 91:138 */ sql.append(\" GROUP BY f.idFacturaProveedorSRI, c.codigo, f.numero, f.puntoEmision, \");\r\n/* 92:139 */ sql.append(\" f.establecimiento, f.identificacionProveedor, \");\r\n/* 93:140 */ sql.append(\" c.descripcion, dfp.baseImponibleRetencion, dfp.porcentajeRetencion, dfp.valorRetencion, f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, f.numeroRetencion, \");\r\n/* 94:141 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 95:142 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, c.tipoConceptoRetencion, f.autorizacion, f.claveAcceso, f.estado, \");\r\n/* 96:143 */ sql.append(\" f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion, fp.descripcion \");\r\n/* 97:144 */ if ((orden != null) && (orden.equals(\"POR_RETENCION\"))) {\r\n/* 98:145 */ sql.append(\" ORDER BY f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion \");\r\n/* 99:146 */ } else if ((orden != null) && (orden.equals(\"POR_FACTURA\"))) {\r\n/* 100:147 */ sql.append(\" ORDER BY f.establecimiento, f.puntoEmision, f.numero \");\r\n/* 101:148 */ } else if ((orden != null) && (orden.equals(\"POR_CONCEPTO\"))) {\r\n/* 102:149 */ sql.append(\" ORDER BY c.descripcion \");\r\n/* 103: */ }\r\n/* 104:151 */ Query query = this.em.createQuery(sql.toString());\r\n/* 105:152 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 106:153 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 107:154 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 108:155 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 109:156 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 110:157 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 111:158 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 112:159 */ if (sucursalFP != null) {\r\n/* 113:160 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 114: */ }\r\n/* 115:162 */ if (sucursalRetencion != null) {\r\n/* 116:163 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 117: */ }\r\n/* 118:165 */ if (puntoVentaRetencion != null) {\r\n/* 119:166 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 120: */ }\r\n/* 121:169 */ return query.getResultList();\r\n/* 122: */ }", "public List<String> select(String query) {\n\t\tList<String> result = null;\n\n\t\tif (connection == null)\n\t\t\treturn null;\n\n\t\ttry {\n\t\t\tif (connection.isClosed())\n\t\t\t\treturn null;\n\n\t\t\t// Get data from database\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(query);\n\t\t\tresult = new ArrayList<String>();\n\n\t\t\t// For every result do\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tString line = resultSet.getString(\"geojson\").replaceAll(\" \", \"\");\n\t\t\t\tString prop = resultSet.getString(\"prop\");\n\n\t\t\t\tif (prop == null)\n\t\t\t\t\tprop = \"-\";\n\t\t\t\telse\n\t\t\t\t\tprop = prop.replace(\"\\\"\", \"\\\\\\\"\");\n\n\t\t\t\t// If point, append with prop and type\n\t\t\t\tif (line.contains(\"Point\")) {\n\t\t\t\t\tif (resultSet.getString(\"shop\") != null) {\n\t\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"type\\\":0,\\\"prop\\\":\\\"\"\n\t\t\t\t\t\t\t\t+ prop + \"\\\"}}\");\n\t\t\t\t\t} else if (resultSet.getString(\"tourism\") != null) {\n\t\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"type\\\":1,\\\"prop\\\":\\\"\"\n\t\t\t\t\t\t\t\t+ prop + \"\\\"}}\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"type\\\":2,\\\"prop\\\":\\\"\"\n\t\t\t\t\t\t\t\t+ prop + \"\\\"}}\");\n\t\t\t\t\t}\n\t\t\t\t} else if (line.contains(\"LineString\")) {\n\t\t\t\t\tresult.add(line.substring(0, line.length() - 1) + \",\\\"properties\\\":{\\\"prop\\\":\\\"\" + prop + \"\\\"}}\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public SampletypeBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM sampletype\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\n public byte [] toArray()\n \n {\n final int size = size();\n final byte [] array = \n new byte [size]; \n \n\n int i = 0;\n for (ByteCursor c : this)\n {\n array[i++] = c.value;\n }\n return array;\n }" ]
[ "0.63449526", "0.62988025", "0.6069758", "0.6058757", "0.60295206", "0.60173696", "0.6015432", "0.5883461", "0.58822423", "0.5867945", "0.58180237", "0.57205987", "0.5677566", "0.5673005", "0.5671554", "0.5648682", "0.56279194", "0.5625614", "0.5613075", "0.55904645", "0.55550647", "0.5542319", "0.5539209", "0.55365133", "0.5523218", "0.5499685", "0.54989684", "0.54638666", "0.54564744", "0.5455038", "0.5454377", "0.5448141", "0.54405665", "0.5415352", "0.5409807", "0.53909445", "0.53881884", "0.5373755", "0.5370232", "0.53625584", "0.53326803", "0.5324407", "0.53239775", "0.5315298", "0.5298443", "0.52959764", "0.5291873", "0.52849287", "0.52837163", "0.5278246", "0.52769464", "0.52723503", "0.52705544", "0.5268219", "0.5265556", "0.52538246", "0.523378", "0.51991314", "0.5183459", "0.5182075", "0.5181196", "0.51791924", "0.5178789", "0.5178789", "0.5178789", "0.517625", "0.51734334", "0.517257", "0.5168237", "0.5167941", "0.51627064", "0.5161428", "0.51585615", "0.515003", "0.51488507", "0.5145204", "0.512576", "0.512501", "0.50940746", "0.50939345", "0.5093773", "0.509176", "0.509017", "0.5081547", "0.50761366", "0.50731015", "0.5070268", "0.506714", "0.5065307", "0.5065076", "0.5063555", "0.5050935", "0.50230616", "0.5021501", "0.50208163", "0.5020083", "0.49992293", "0.49955449", "0.4989023", "0.49839178" ]
0.5604263
19
Method used to transform RAW row returned from database server to HashMap
HashMap<String,Object> processQueryResultRow(Map<String,Object> rawRow, String collectionName) { HashMap<String,Object> resultRow = new HashMap<>(); for (String key: rawRow.keySet()) { Object value = rawRow.get(key); if (collectionName != null) value = formatFieldValue(collectionName,key,value); if (value != null) resultRow.put(key,value); } return resultRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset)\n/* */ {\n/* 1406 */ return getHashMapfromResultSetRow(resultset, new ArrayList());\n/* */ }", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "public static void convertRsToMap(ResultSet rs,Map<String,Object> map) throws SQLException{\n\t\tResultSetMetaData rsMeta = rs.getMetaData();\r\n\t\tint columnCount = rsMeta.getColumnCount();\r\n\t\t\r\n\t\tfor(int i = 1; i <= columnCount; i++){\r\n\t\t\tString key = rsMeta.getColumnLabel(i).toLowerCase();\r\n\t\t\t\r\n\t\t\tObject value = rs.getObject(key);\r\n\t\t\t\r\n\t\t\t//if(value instanceof oracle.sql.DATE){\r\n\t\t\t//\tvalue = new java.sql.Date(((oracle.sql.DATE)value).timestampValue().getTime());\r\n\t\t\t//}else if(value instanceof oracle.sql.TIMESTAMP){\r\n\t\t\t//\tvalue = new java.sql.Timestamp(((oracle.sql.TIMESTAMP)value).timestampValue().getTime());\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tmap.put(key, value);\r\n\t\t}\r\n\t}", "public DataRow mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\n\t\tDataRow row = new DataRow();\n\t\t//if (rs.isClosed()){return null;}\n\t\tint cols = rs.getMetaData().getColumnCount();\n\t\t\n\t\tfor (int i=1 ; i <= cols; i++){\n\t\t\tDefaultLobHandler blob = new DefaultLobHandler();\n\t\t\trow.setValue(rs.getMetaData().getColumnName(i), blob.getBlobAsBinaryStream(rs, i));\n\t\t}\n\t\n\t\treturn row;\n\t}", "private ArrayList<HashMap<String, String>> processRetrieve() {\n //Transform and Return Rows to a List of HashMaps\n try {\n if (rs == null) {\n System.out.println(\"rs is null\");\n } else {\n return rsToMaps();\n }\n } catch (SQLException ex) {\n throw new RuntimeException(ex);\n }\n return null;\n }", "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset, ArrayList arraylist)\n/* */ {\n/* 1417 */ HashMap<String, String> hashmap = new HashMap();\n/* 1418 */ if (arraylist == null)\n/* */ {\n/* 1420 */ arraylist = new ArrayList();\n/* */ }\n/* */ try\n/* */ {\n/* 1424 */ ResultSetMetaData resultsetmetadata = resultset.getMetaData();\n/* 1425 */ int i = resultsetmetadata.getColumnCount();\n/* 1426 */ for (int j = 1; j <= i; j++)\n/* */ {\n/* 1428 */ if (!arraylist.contains(resultset.getString(j)))\n/* */ {\n/* 1430 */ hashmap.put(resultsetmetadata.getColumnName(j), resultset.getString(j));\n/* */ }\n/* */ }\n/* */ }\n/* */ catch (Exception exception)\n/* */ {\n/* 1436 */ exception.printStackTrace();\n/* */ }\n/* 1438 */ return hashmap;\n/* */ }", "public Map<Integer, String> getAsText() throws SQLException {\n return retrieveExpected(createNativeAsTextStatement(), STRING);\n\n }", "@Override\n public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n \treturn rs.getString(\"mid\");\n }", "@Override\n\tpublic List<WanchengPO> mapRow(ResultSet rs) throws Exception {\n\t\treturn null;\n\t}", "public Map<Integer, byte[]> getAsBinary() throws SQLException {\n return retrieveExpected(createNativeAsBinaryStatement(), OBJECT);\n }", "public Map<String, String> dataretrivefromemployeetable() throws SQLException, ClassNotFoundException {\n\t\tClass.forName(driver);\r\n\t\t\r\n\t\t//Connection with database\r\n\t\tcon = DriverManager.getConnection(url,username,password);\r\n\t\t\r\n\t\t//create statment \t\t\r\n\t\tstm = con.createStatement();\r\n\t\t\r\n\t\t//execution of sql query and save resultset\r\n\t\trs = stm.executeQuery(mssqlstmt);\r\n\t\t\r\n\t\t//initialize map object that would be returned\r\n\t\tdata = new HashMap<>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tString username = rs.getString(\"username\");\r\n\t\t\tString password = rs.getString(\"password\");\r\n\t\t\tdata.put(username, password);\r\n\t\t}\r\n\t\t\r\n\t\t//resultset closing\r\n\t\trs.close();\r\n\t\t//statement closing\r\n\t\tstm.close();\r\n\t\t//closing connection\r\n\t\tcon.close();\r\n\t\t\r\n/*\t\tdata.put(\"parveen1\", \"123\");\r\n\t\tdata.put(\"parveen2\", \"123\");\r\n\t\tdata.put(\"parveen3\", \"123\");\r\n*/\t\t\r\n\t\treturn data;\r\n\t}", "private Map<String, String> getRow(CSVReaderHeaderAware rowReader)\n throws IOException {\n return rowReader.readMap();\n }", "protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);", "private List<Map<String, Object>> prepareQueryResult(final ResultSet resultSet) throws SQLException {\n\n List<Map<String, Object>> result = new ArrayList<>();\n\n ResultSetMetaData metaData = resultSet.getMetaData();\n int count = metaData.getColumnCount();\n List<String> cols = new ArrayList<>(count);\n for (int i = 1; i <= count; i++) {\n cols.add(metaData.getColumnName(i));\n }\n\n boolean hasNext = resultSet.next();\n\n while (hasNext) {\n\n Map<String, Object> map = new LinkedHashMap<>();\n for (String col : cols) {\n Object value = resultSet.getObject(col);\n map.put(col, value);\n\n logger.debug(\"col:\" + col + \" value:\" + value);\n }\n result.add(map);\n\n hasNext = resultSet.next();\n }\n\n return result;\n\n }", "@Override\n\tpublic Ticket mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\treturn ticketExtractor.extractData(rs);\n\t}", "public HashMap<String, String> GetRawAttributes();", "@Override\n\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\t\tmap.put(\"data\", rs.getString(\"CATEGORY_ID\"));\n\t\t\t\tmap.put(\"value\", rs.getString(\"CATEGORY_NAME\"));\n\t\t\t\t\n\t\t\t\t/*detail.add(map);*/\n\t\t\n\t\t\t\tlog.info(\"Category Suggestion List \"+map);\n\t\t\t\t\n\t\t\t\treturn map;\n\t\t\t}", "public GMUserData mapRow(ResultSet rs, int rowNum) throws SQLException {\n\n\t\tGMUserData pd = new GMUserData();\n\t\tpd.setId(rs.getLong(\"id\"));\n\t\tpd.setUname(rs.getString(\"uname\"));\n\t\tpd.setPw(rs.getString(\"pw\"));\n\t\tpd.setPower(rs.getInt(\"power\"));\n\t\t\n\t\treturn pd;\n\t}", "public HashMap<Integer, String> executeToMap(String query) {\n \t// Create a connection which is used to store info about our connection\n Connection con = null;\n \n //create a local map will be returned later\n HashMap<Integer, String> map = new HashMap<>();\n \n // Statement is used to execute a SQL query\n Statement stmt = null;\n \n // Resultset is the set of info we get back from running our query\n ResultSet rs = null;\n String SQL = query; \n \n\n try {\n // try to import the external driver\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n // try to establish a connection using the connectionUrl variable\n con = DriverManager.getConnection(connectionUrl);\n\n //prepare a new statement\n stmt = con.createStatement();\n //Provide the statement with a query and execute this\n //this will return a resultSet which we will save to rs\n rs = stmt.executeQuery(SQL);\n \n //As long as there are rows in our ResultSet we want to step through them\n //adding each row their id and string to our map;\n while (rs.next()) {\n \tmap.put(rs.getInt(1), rs.getString(2));\n }\n\n }\n\n // Handle any errors that may have occurred.\n catch (Exception e) {\n e.printStackTrace();\n }\n //when we are done with our actions we should close the connection\n finally {\n if (rs != null) try {\n \trs.close();\n \t} catch(Exception e) {}\n if (stmt != null) try { stmt.close(); } catch(Exception e) {}\n if (con != null) try { con.close(); } catch(Exception e) {}\n }\n //return the map\n return map;\n }", "public abstract Map<String, Serializable> toMap();", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\treturn Boolean.TRUE;\n\t\t}", "@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object mapRow(ResultSet arg0, int arg1) throws SQLException {\n\t\treturn null;\n\t}", "public static HashMap<Integer, String> getAll() {\n RocksIterator iter = db.newIterator();\n HashMap<Integer, String> result = new HashMap<>();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n result.put(ByteIntUtilities.convertByteArrayToInt(iter.key()), new String(iter.value()));\n }\n\n iter.close();\n return result;\n }", "public Map<String, Object> toMap(){\n HashMap<String, Object> res = new HashMap<>();\n res.put(\"id\", id);\n res.put(\"type\", type);\n res.put(\"status\", status);\n res.put(\"date\", date);\n res.put(\"sender\", sender);\n res.put(\"content\", content);\n\n return res;\n }", "public Hashtable getRemappedValues() throws Exception;", "boolean onReadRow(int rowIndex, Map<String, String> rowData);", "public Map<String, Object> produceMapFromRS(ResultSet rs, List<String> columns, List<Class> columnClasses) throws SQLException {\n Map<String, Object> result = new HashMap();\n for (int index = 0; index < columns.size(); index++) {\n String column = columns.get(index);\n Class clazz = columnClasses.get(index);\n result.put(column, this.getFromRS(clazz, rs, index + 1));\n }\n return result;\n }", "Map<String, String> asMap();", "T deserializeData(R r) throws SQLException;", "public Object mapRow(ResultSet rs, int rowNumber) throws SQLException {\n\t\tObject result;\n\t\ttry {\n\t\t\tresult = this.defaultConstruct.newInstance((Object[]) null);\n\t\t}\n\t\tcatch (IllegalAccessException e) {\n\t\t\tthrow new DataAccessResourceFailureException(\"Failed to load class \" + this.mappedClass.getName(), e);\n\t\t}\n\t\tcatch (InvocationTargetException e) {\n\t\t\tthrow new DataAccessResourceFailureException(\"Failed to load class \" + this.mappedClass.getName(), e);\n\t\t}\n\t\tcatch (InstantiationException e) {\n\t\t\tthrow new DataAccessResourceFailureException(\"Failed to load class \" + this.mappedClass.getName(), e);\n\t\t}\n\t\tResultSetMetaData meta = rs.getMetaData();\n\t\tint columns = meta.getColumnCount();\n\t\tfor (int i = 1; i <= columns; i++) {\n\t\t\tString field = meta.getColumnName(i).toLowerCase();\n\t\t\tPersistentField fieldMeta = (PersistentField) this.mappedFields.get(field);\n\t\t\tif (fieldMeta != null) {\n\t\t\t\ttry {\n\t\t\t\t\tObject value = null;\n\t\t\t\t\tClass fieldType = fieldMeta.getJavaType();\n\t\t\t\t\tMethod m = result.getClass().getMethod(setterName(fieldMeta.getColumnName()), new Class[]{fieldType});\n\t\t\t\t\tif (fieldType.equals(String.class)) {\n\t\t\t\t\t\tvalue = rs.getString(field);\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(byte.class) || fieldType.equals(Byte.class)) {\n\t\t\t\t\t\tvalue = new Byte(rs.getByte(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(short.class) || fieldType.equals(Short.class)) {\n\t\t\t\t\t\tvalue = new Short(rs.getShort(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(int.class) || fieldType.equals(Integer.class)) {\n\t\t\t\t\t\tvalue = new Integer(rs.getInt(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(long.class) || fieldType.equals(Long.class)) {\n\t\t\t\t\t\tvalue = new Long(rs.getLong(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(float.class) || fieldType.equals(Float.class)) {\n\t\t\t\t\t\tvalue = new Float(rs.getFloat(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(double.class) || fieldType.equals(Double.class)) {\n\t\t\t\t\t\tvalue = new Double(rs.getDouble(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(BigDecimal.class)) {\n\t\t\t\t\t\tvalue = rs.getBigDecimal(field);\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(boolean.class) || fieldType.equals(Boolean.class)) {\n\t\t\t\t\t\tvalue = (rs.getBoolean(field)) ? Boolean.TRUE : Boolean.FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(Date.class)) {\n\t\t\t\t\t\tif (fieldMeta.getSqlType() == Types.DATE) {\n\t\t\t\t\t\t\tvalue = rs.getDate(field);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (fieldMeta.getSqlType() == Types.TIME) {\n\t\t\t\t\t\t\tvalue = rs.getTime(field);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvalue = rs.getTimestamp(field);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (m != null) {\n\t\t\t\t\t\tm.invoke(result, new Object[]{value});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (NoSuchMethodException e) {\n\t\t\t\t\tthrow new DataAccessResourceFailureException(new StringBuffer().append(\"Failed to map field \").append(fieldMeta.getFieldName()).append(\".\").toString(), e);\n\t\t\t\t}\n\t\t\t\tcatch (IllegalAccessException e) {\n\t\t\t\t\tthrow new DataAccessResourceFailureException(new StringBuffer().append(\"Failed to map field \").append(fieldMeta.getFieldName()).append(\".\").toString(), e);\n\t\t\t\t}\n\t\t\t\tcatch (InvocationTargetException e) {\n\t\t\t\t\tthrow new DataAccessResourceFailureException(new StringBuffer().append(\"Failed to map field \").append(fieldMeta.getFieldName()).append(\".\").toString(), e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "@Override\n\t\t\tpublic List<Map<String, Object>> handle(ResultSet rs) throws SQLException {\n\t\t\t\tList<Map<String, Object>> list = new ArrayList<Map<String, Object>>();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"job\", rs.getString(1));\n\t\t\t\t\tmap.put(\"avg\", rs.getDouble(2));\n\t\t\t\t\tlist.add(map);\n\t\t\t\t}\n\n\t\t\t\treturn list;\n\t\t\t}", "Map<String, Object> idFromFlatRow(DataRow flatRow) {\n\n // TODO: should we also check for nulls in ID (and skip such rows) - this will\n // likely be an indicator of an outer join ... and considering SQLTemplate,\n // this is reasonable to expect...\n\n Map<String, Object> id = new TreeMap<>();\n for (int idIndex : idIndices) {\n Object value = flatRow.get(columns[idIndex].getDataRowKey());\n id.put(columns[idIndex].getName(), value);\n }\n\n return id;\n }", "private HashMap<Integer, Category> createHashMapFromResultSet(ResultSet rs) throws SQLException{\n HashMap<Integer, Category> tempHashMap = new HashMap<>();\n //\"category_id\", \"category_name\"\n while(rs.next()){\n int tempCategoryID = rs.getInt(\"category_id\");\n String tempCategoryName = rs.getString(\"category_name\");\n tempHashMap.put(tempCategoryID, new Category(tempCategoryID, tempCategoryName));\n }\n return tempHashMap;\n }", "@Nullable\n\t\t\t@Override\n\t\t\tpublic T mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString title = rs.getString(\"title\");\n\t\t\t\tString author = rs.getString(\"author\");\n\t\t\t\tint numPages = rs.getInt(\"num_pages\");\n\t\t\t\tDate releaseDate = rs.getDate(\"release_date\");\n\t\t\t\tboolean available = rs.getBoolean(\"available\");\n\n\t\t\t\tClass<T> type = null; // TODO: we need the type\n\t\t\t\tT object = null; // TODO: type.newInstance();\n\n\t\t\t\t/* TODO: create instance and fill properties\n\t\t\t\tbook.setId(id);\n\t\t\t\tbook.setTitle(title);\n\t\t\t\tbook.setAuthor(author);\n\t\t\t\tbook.setNumPages(numPages);\n\t\t\t\tbook.setReleaseDate(releaseDate);\n\t\t\t\tbook.setAvailable(available);\n\t\t\t\t*/\n\n\t\t\t\treturn object;\n\t\t\t}", "public List<Map<String, Object>> transformResultSetToList(final ResultSet resultSet) throws SQLException {\n ResultSetMetaData resultSetMetaData = resultSet.getMetaData();\n int columns = resultSetMetaData.getColumnCount();\n List<Map<String, Object>> result = new ArrayList<>();\n while (resultSet.next()) {\n Map<String, Object> row = new HashMap<>();\n for (int i = 1; i <= columns; i++) {\n row.put(resultSetMetaData.getColumnLabel(i).toLowerCase(), resultSet.getObject(i));\n }\n result.add(row);\n }\n return result;\n }", "@Override\n\t\t\t\t\t\tpublic EmrContactDetais mapRow(ResultSet rs,\n\t\t\t\t\t\t\t\tint arg1) throws SQLException {\n\t\t\t\t\t\t\tEmrContactDetais details = new EmrContactDetais();\n\n\t\t\t\t\t\t\tdetails.setName((rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_name\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_name\") : \"\");\n\t\t\t\t\t\t\tdetails.setMobileNumber((rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_number\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_number\") : \"\");\n\t\t\t\t\t\t\tdetails.setRelation((rs.getString(\"relation\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"relation\") : \"\");\n\t\t\t\t\t\t\tdetails.setSeq((rs.getString(\"seq\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"seq\") : \"\");\n\t\t\t\t\t\t\tdetails.setEmergencyContactId((rs.getString(\"contact_id\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_id\") : \"\");\n\t\t\t\t\t\t\tdetails.setCountryCode((rs.getString(\"country_code\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"country_code\") : \"\");\n\t\t\t\t\t\t\tdetails.setAltrMobileNumber((rs.getString(\"altr_contact_number\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"altr_contact_number\") : \"\");\n\t\t\t\t\t\t\tdetails.setAltrCountryCode((rs.getString(\"altr_country_code\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"altr_country_code\") : \"\");\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\treturn details;\n\t\t\t\t\t\t}", "<R> ProcessOperation<R> map(RowMapper<R> rowMapper);", "@Override\n\tpublic Object mapRow(ResultSet rs, int rownum) throws SQLException {\n\t\tint id = rs.getInt(\"id\");\n\t\tint u_id = rs.getInt(\"u_id\");\n\t\tDate last_modified = rs.getDate(\"last_modified\");\n\t\tint attribute_id = rs.getInt(\"attribute_id\");\n\t\t\n\t\t\n\t\tStatBox model = new StatBox();\n\t\tmodel.setId(id);\n\t\tmodel.setU_id(u_id);\n\t\tmodel.setAttribute_id(attribute_id);\n\t\tmodel.setLast_modified(last_modified);\n\t\t\n\t\treturn model;\n\t}", "@Override\r\n\t\tpublic Registration mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tRegistration registration = new Registration();\r\n\t\t\tregistration.setId(rs.getLong(\"id\"));\r\n\t\t\tregistration.setName(rs.getString(\"name\"));\r\n\t\t\tregistration.setAddress(rs.getString(\"address\"));\r\n\t\t\r\n\t\t\treturn registration;\r\n\t\t}", "@Override\r\n\tpublic String mapRow(ResultSet arg0, int arg1) throws SQLException {\n\t\tString pnr = arg0.getString(1);\r\n\t\t\r\n\t\treturn pnr;\r\n\t}", "@Override\n public Map<String, String> get() {\n\n Map<String, String> hugoMap = Maps.newHashMap();\n try {\n final CSVParser parser = new CSVParser(this.reader, CSVFormat.TDF.withHeader());\n for (CSVRecord record : parser) {\n\n hugoMap.put(record.get(0), record.get(1));\n }\n\n } catch (IOException e) {\n log.error(e.getMessage());\n e.printStackTrace();\n }\n return hugoMap;\n }", "private static HashMap<String,String> getRowValues( String[] headerArray, String row ) {\r\n\t\t\r\n\t\tString[] dataArray = ContactsImport.parseCSVLine(row, false);\r\n\t\tHashMap<String,String> values = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//validate: number of elements in the row should be equals to the number of elements in the header\r\n\t\t\tif (dataArray.length != headerArray.length) {\r\n\t\t\t\t\r\n\t\t\t\tthrow( new Exception(\"number of elements doesn't match header row\"));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//store all values in the hashmap\r\n\t\t\t\tvalues = new HashMap<String,String>();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<dataArray.length; i++) {\r\n\t\t\t\t\tvalues.put( headerArray[i], dataArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.error(\"invalid row (\" + e.getMessage() + \"): \" + row);\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t\t\r\n\t}", "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 }", "private static HashMap<String,String> buildColumnMapCar() {\r\n HashMap<String,String> map = new HashMap<String,String>();\r\n map.put(KEY_POINTS, KEY_POINTS);\r\n\r\n map.put(BaseColumns._ID, \"rowid AS \" +\r\n BaseColumns._ID);\r\n\r\n return map;\r\n }", "@Override\n public void convertValueToKey(Map row, Map condition) throws KkmyException {\n\n }", "public static void parseResultDB(ResultSet rs){\n\n String data[] = {};\n for (Row row : rs){\n if(row['fid'] && row['pid']){\n while (row['qte'] != 0 || row['qte'])\n data[int(row['fid'])] += row ['pid'];\n row['pid']--;\n }\n }\n return data;\n }", "public String mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tString column = rs.getString(1);\n\t\t\t\treturn column;\n\t\t\t}", "public HashMap<Integer,T> loadPost() throws IOException, SQLException, ClassNotFoundException;", "public Map<String, Object> toMap() {\n\t\tMap<String, Object> map = new LinkedHashMap<String, Object>();\n\t\tmap.put(\"user_id\", user_id);\n\t\tmap.put(\"username\", username);\n\t\tmap.put(\"password\", \"confidential\");\n\t\tmap.put(\"email\", email);\n\t\tmap.put(\"mobile\", mobile);\n\t\tmap.put(\"dep_id\", dep_id);\n\t\tmap.put(\"creator\", creator);\n\t\tmap.put(\"create_time\", create_time);\n\t\tmap.put(\"last_login_addr\", last_login_addr);\n\t\tmap.put(\"last_login_time\", last_login_time);\n\t\tmap.put(\"user_enable\", user_enable);\n\t\tmap.put(\"user_status\", user_status);\n\t\treturn map;\n\t}", "protected ListMap<Integer, CD4Details> makeResultsMapFromSQL(String sql, Map<String, Object> substitutions) {\n\t\tList<Object> data = Context.getService(MohCoreService.class).executeSqlQuery(sql, substitutions);\n\t\treturn makeResultsMap(data);\n\t}", "static Map<Integer, Map<String, Object>> readTxt(BufferedReader in) throws IOException {\n\t\t\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\"\\t\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\tString[] val = valString.split(\"\\t\");\n\t\t\t\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t\t\n\t\t\t}\t//end for\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the outside container\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\t//end while\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "public abstract Map<String, Object> fetchModelMap() throws ModelException;", "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 }", "Map<String, ?> getOutputData();", "public ClubDetails mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\tClubDetails clubDetails = new ClubDetails();\r\n\t\tclubDetails.setUsername(rs.getString(\"username\"));\r\n\t\tclubDetails.setPassword(rs.getString(\"password\"));\r\n\t\tclubDetails.setNewPassword(rs.getString(\"newPassword\"));\r\n\t\tclubDetails.setClubname(rs.getString(\"clubname\"));\r\n\t\tclubDetails.setEmail(rs.getString(\"email\"));\r\n\t\t//clubDetails.setMemberDetails(new HashSet<MemberDetails>());\r\n\t\tclubDetails.setMembershiptype(rs.getString(\"membershiptype\"));\r\n\t\tclubDetails.setPhonenumber(rs.getLong(\"phonenumber\"));\r\n\t\tclubDetails.setClub_id(rs.getInt(\"club_id\"));\r\n\t\tclubDetails.setRoleId(rs.getInt(\"roleId\"));\r\n\t\treturn clubDetails;\r\n\t}", "public Map<Object, Object[]> selectAsMap(String mapColumn) {\n\n int mapColumnIndex = columnIndex(mapColumn);\n if (mapColumnIndex < 0) {\n throw new IllegalArgumentException(\"Unknown column: \" + mapColumn);\n }\n\n List<Object[]> list = select();\n\n Map<Object, Object[]> map = new HashMap<>();\n\n list.forEach(r -> {\n Object[] existing = map.put(r[mapColumnIndex], r);\n if (existing != null) {\n throw new IllegalArgumentException(\"More than one row matches '\" + r[mapColumnIndex] + \"' value\");\n }\n });\n\n return map;\n }", "static Map<Integer, Map<String, Object>> readCsv(BufferedReader in) throws IOException {\n\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\",\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\t\n\t\t\t/*code found for the regex expression found at \n\t\t\t* http://stackoverflow.com/questions/1757065/java-splitting-a-comma-separated-string-but-ignoring-commas-in-quotes\n\t\t\t* by user Bart Kiers\n\t\t\t*/\n\t\t\tString[] val = valString.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t}\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the list\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "public Object[] toRow() {\n String dbType = this.getClass().getSimpleName().replace(\"Database\", \"\");\n dbType = dbType.substring(0, 1) + dbType.substring(1).toLowerCase();\n\n return new Object[] {dbType, getDbHost(), getDbName(), getDbUsername(), getDbPassword(), getUniqueId()};\n }", "Map getIDPEXDataMap();", "@Override\r\n\t\tpublic Map<String, Class<?>> getTypeMap() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "Hashtable<String, String> unpack_cursor(Cursor cursor)\n {\n \tHashtable<String, String> result = null;\n \tif(cursor == null) return null;\n \telse if(cursor.getCount() == 0) return null;\n \telse\n \t{\n \t\tresult= new Hashtable<String, String>();\n\t \tcursor.moveToFirst(); \n\t \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\t\t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n\t\t\twhile (cursor.moveToNext()) \n\t \t{\n\t \t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n\t \t}\n \t}\n \treturn result;\n }", "public interface RowToByteArrayConverter {\r\n byte[] rowToByteArray(ResultSet resultSet);\r\n}", "public Object mapRow(ResultSet rs, int rowNum) throws SQLException \n\t\t{\n\t\t\tTema tema = new Tema();\n\t\t\ttema.setTema_id(rs.getInt(\"tema_id\"));\n\t\t\ttema.setTitulo(rs.getString(\"titulo\"));\n\t\t\treturn tema;\n\t\t}", "@Override\n\tpublic Allact mapRow(ResultSet rs, int row) throws SQLException {\n\t\tAllact allact=new Allact();\n\t\tallact.setAct_id(rs.getInt(\"act_id\"));\n\t\tallact.setActnum(rs.getInt(\"actnum\"));\n\t\tallact.setHome_id(rs.getInt(\"home_id\"));\n\t\treturn allact;\n\t}", "private List<LinkedHashMap<String, String>> resultSetToArrayList(ResultSet rs) throws SQLException {\r\n ResultSetMetaData md = rs.getMetaData();\r\n int columns = md.getColumnCount();\r\n ArrayList list = new ArrayList(50);\r\n while (rs.next()) {\r\n LinkedHashMap row = new LinkedHashMap(columns);\r\n for (int i = 1; i <= columns; ++i) {\r\n row.put(md.getColumnName(i), rs.getObject(i));\r\n }\r\n list.add(row);\r\n }\r\n return list;\r\n }", "public abstract void emitRawRow();", "ProcessOperation<Map<String, Object>> map();", "@Override\r\n\tpublic City mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\r\n\t\tCity city = new City();\r\n\t\t\r\n\t\t city.setCity(rs.getString(1));\r\n\t\t \r\n\t\t return city;\r\n\t\t\r\n\t}", "@Override\r\n\t\tpublic MemoDto mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\treturn MemoDto.builder()\r\n\t\t\t\t\t.no(rs.getInt(\"no\"))\r\n\t\t\t\t\t.content(rs.getString(\"content\"))\r\n\t\t\t\t\t.when(rs.getString(\"when\"))\r\n\t\t\t\t\t.build();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t}", "public synchronized Map<String, byte[]> getRow(String rowKey,\n Set<byte[]> columns, boolean cacheBlocks) throws IOException {\n HTable table = getTable();\n Get get = new Get(rowKey.getBytes());\n get.setCacheBlocks(cacheBlocks);\n for (byte[] column: columns) {\n get.addColumn(familyName, column);\n }\n Result row = table.get(get);\n if (row.raw().length >= 1) {\n Map<String, byte[]> result = new HashMap<String, byte[]>();\n for (KeyValue kv: row.raw()) {\n result.put(new String(kv.getQualifier()), kv.getValue());\n }\n return result;\n }\n return null;\n }", "@Override\r\n\t\t\t\t\t public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t\t\tStudentVO vo=new StudentVO();\r\n\t\t\t\t\t\tvo.setName(rs.getString(1));\r\n\t\t\t\t\t\tvo.setKor(rs.getInt(2));\r\n\t\t\t\t\t\tvo.setEng(rs.getInt(3));\r\n\t\t\t\t\t\tvo.setMath(rs.getInt(4));\r\n\t\t\t\t\t\tvo.setTotal(rs.getInt(5));\r\n\t\t\t\t\t\tvo.setAvg(rs.getDouble(6));\r\n\t\t\t\t\t\treturn vo;\r\n\t\t\t\t\t }", "@Override\r\n public Object getValueAt(int rowIndex, int columnIndex) {\n Hashtable rowData = chineseHashtables[rowIndex];\r\n return rowData.get(getColumnName(columnIndex));\r\n }", "public Comment mapRow(ResultSet rs, int rownum) throws SQLException {\n\t\tComment comment = new Comment();\n\t\tcomment.setId(rs.getInt(\"id\"));\n\t\tcomment.setContetn(rs.getString(\"comment\"));\n\t\tcomment.setDateComm(rs.getDate(\"date_of_comment\"));\n\t\tcomment.setNumLike(rs.getInt(\"num_like\"));\n\t\tcomment.setIdAlbum(rs.getInt(\"id_album\"));\n\t\tcomment.setIdUser(rs.getInt(\"id_user\"));\n\t\treturn comment;\n\t}", "@Override\n\tpublic Map<String, Object> read(String nombrec) {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withProcedureName(\"pa_mat_produnidadmed_GetNomc\").withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\",OracleTypes.CURSOR,new ColumnMapRowMapper()), new SqlParameter(\"p_nombrecorto\", Types.VARCHAR));\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"p_nombrecorto\", nombrec);\n\t\treturn simpleJdbcCall.execute(in);\n\t}", "@Override\n\tpublic LockThreadInfo mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\tLockThreadInfo lockThreadInfo = new LockThreadInfo(rs.getString(\"tid\"), rs.getString(\"nid\"), rs.getString(\"state\"));\n\t\treturn lockThreadInfo;\n\t}", "void getValues(long id, Map<String,Object> record);", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "public Map<String, String> toMap() {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"id\", id + \"\");\n map.put(\"name\", name);\n map.put(\"value\", value);\n map.put(\"type\", type);\n map.put(\"description\", description);\n\n return map;\n\n }", "Hashtable<String, String> unpack_cursor(Cursor cursor,Hashtable<String, String> result)\n {\n \tif(cursor == null) return null;\n \tcursor.moveToFirst(); \n \tif(result == null)\n \tresult = new Hashtable<String, String>();\n \t\n \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\t\twhile (cursor.moveToNext()) \n \t{\n \t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n \t}\n \treturn result;\n }", "@Override\n\tpublic Map<String, Object> datos(String username) {\n\t\tString SQL=\"select u.idusuario,p.nombre,p.apellidos,p.edad,p.telefono,p.correo,p.dni,r.nomrol from persona as p, usuario as u, trabajador as t,rol as r where u.idusuario=t.idusuario and t.idrol =r.idrol and p.idpersona =u.idpersona and u.username = ? \";\n\t\t\t\tMap<String,Object> map = jdbc.queryForMap(SQL,username);\n\t\treturn map;\n\t}", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}", "@Nonnull\n @Override\n public GraphHead fromRow(@Nonnull Map.Entry<Key, Value> pair) throws IOException {\n EPGMGraphHead content = KryoUtils.loads(pair.getValue().get(), EPGMGraphHead.class);\n content.setId(GradoopId.fromString(pair.getKey().getRow().toString()));\n //read from content\n return content;\n }", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "@Override\n\t public mesconfig mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t mesconfig mes = new mesconfig();\n\t mes.setTitle(rs.getString(1));\n\t mes.setKeyword(rs.getString(2));\n\t mes.setDescription(rs.getString(3));\n\n\t return mes;\n\t }", "Map getIDPSTDDataMap();", "default Object convert(GenericRowData row) {\n return convert(row, -1);\n }", "protected abstract E handleRow(ResultSet rs) throws SQLException;", "private static List<Map<String, String>> proceessResponse(InputStream is) throws IOException {\r\n\t\tList<Map<String, String>> result = new ArrayList<Map<String, String>>();\r\n\t\tHashMap<String, String> record;\r\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is));\r\n\t\tString line = rd.readLine();\r\n\t\tString[] columns = line.split(\",\");\r\n\t\twhile ((line = rd.readLine()) != null) {\r\n\t\t\tString[] values = line.split(\",\");\r\n\t\t\trecord = new HashMap<String, String>();\r\n\t\t\tfor (int i = 0; i < values.length && i < columns.length; i++) {\r\n\t\t\t\trecord.put(columns[i], values[i]);\r\n\t\t\t}\r\n\t\t\tresult.add(record);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static Map<String, ColumnMetaData> buildColumnMetadataMap(ResultSet rs) {\n\t\t/*\n\t\t * LinkedHashmap to preserve key traversal order.\n\t\t * Important as we output rows as arrays of values where the index position in\n\t\t * the row implicitly corresponds to the entry order of the column map.\n\t\t * Reason for this is performance. \n\t\t */\n\t\tMap<String, ColumnMetaData> columnMap = Maps.newLinkedHashMap();\n\t\ttry {\n\t\t\tResultSetMetaData rmd = rs.getMetaData();\n\t\t\tfor (int i=1; i<= rmd.getColumnCount(); i++) {\n\t\t\t\tColumnMetaData cmd = \n\t\t\t\t\tnew ColumnMetaData(rmd.getColumnName(i), rmd.getColumnTypeName(i));\n\t\t\t\tcolumnMap.put(cmd.columnName, cmd);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tThrowables.propagate(e);\n\t\t}\n\t\treturn columnMap;\n\t}", "public java.util.Map<java.lang.String, java.util.ArrayList> m17238b() {\n /*\n r18 = this;\n r3 = new java.util.HashMap;\n r3.<init>();\n r4 = new java.util.ArrayList;\n r4.<init>();\n r5 = new java.util.ArrayList;\n r5.<init>();\n r0 = r18;\n r2 = r0.f20995e;\n r2.lock();\n r6 = r18.m17234d();\n r2 = \"select * from result limit 0,500\";\n r7 = 0;\n r7 = r6.rawQuery(r2, r7);\n L_0x0022:\n r2 = r7.moveToNext();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n if (r2 == 0) goto L_0x0106;\n L_0x0028:\n r2 = new org.json.JSONObject;\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r2.<init>();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r8 = \"_id\";\n r8 = r7.getColumnIndex(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r8 = r7.getInt(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"time\";\n r9 = r7.getColumnIndex(r9);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = r7.getString(r9);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r10 = \"code\";\n r10 = r7.getColumnIndex(r10);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r10 = r7.getInt(r10);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r11 = \"cmd_type\";\n r11 = r7.getColumnIndex(r11);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r11 = r7.getInt(r11);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r12 = \"cmd_id\";\n r12 = r7.getColumnIndex(r12);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r12 = r7.getInt(r12);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r13 = \"result\";\n r13 = r7.getColumnIndex(r13);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r13 = r7.getString(r13);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r14 = \"time\";\n r16 = java.lang.Long.parseLong(r9);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r0 = r16;\n r2.put(r14, r0);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"error_code\";\n r2.put(r9, r10);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n if (r10 != 0) goto L_0x0095;\n L_0x0083:\n r9 = \"cmd_type\";\n r2.put(r9, r11);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"cmd_id\";\n r2.put(r9, r12);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"voice_to_text_result\";\n r2.put(r9, r13);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n L_0x0095:\n r8 = java.lang.Integer.valueOf(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r5.add(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r4.add(r2);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n goto L_0x0022;\n L_0x00a0:\n r2 = move-exception;\n r2.printStackTrace();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n goto L_0x0022;\n L_0x00a6:\n r2 = move-exception;\n r4 = \"SynthesizeResultDb\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x014d }\n r5.<init>();\t Catch:{ all -> 0x014d }\n r8 = \"exception:\";\n r5 = r5.append(r8);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n r2 = r5.append(r2);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r4, r2);\t Catch:{ all -> 0x014d }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n L_0x00d2:\n return r3;\n L_0x00d3:\n r2 = move-exception;\n r2.printStackTrace();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n goto L_0x0022;\n L_0x00d9:\n r2 = move-exception;\n r4 = \"SynthesizeResultDb\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x014d }\n r5.<init>();\t Catch:{ all -> 0x014d }\n r8 = \"exception:\";\n r5 = r5.append(r8);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n r2 = r5.append(r2);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r4, r2);\t Catch:{ all -> 0x014d }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n goto L_0x00d2;\n L_0x0106:\n r2 = \"listId\";\n r3.put(r2, r5);\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r2 = \"list\";\n r3.put(r2, r4);\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n goto L_0x00d2;\n L_0x0120:\n r2 = move-exception;\n r4 = \"SynthesizeResultDb\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x014d }\n r5.<init>();\t Catch:{ all -> 0x014d }\n r8 = \"exception:\";\n r5 = r5.append(r8);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n r2 = r5.append(r2);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r4, r2);\t Catch:{ all -> 0x014d }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n goto L_0x00d2;\n L_0x014d:\n r2 = move-exception;\n r7.close();\n r6.close();\n r0 = r18;\n r3 = r0.f20995e;\n r3.unlock();\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.baidu.tts.e.c.b():java.util.Map<java.lang.String, java.util.ArrayList>\");\n }", "private Map<String, Object> enrich(StreamlineEvent event) {\r\n\r\n\r\n Map<String, Object> enrichedValues = new HashMap<String, Object>();\r\n\r\n StrSubstitutor strSub = new StrSubstitutor(event);\r\n\r\n String enrichSQLToExecute = strSub.replace(this.enrichmentSQLStatement);\r\n ResultSet rst = null;\r\n Statement statement = null;\r\n try {\r\n\r\n LOG.info(\"The SQL with substitued fields to be executed is: \"\r\n + enrichSQLToExecute);\r\n\r\n statement = sqlServerConnection.createStatement();\r\n rst = statement.executeQuery(enrichSQLToExecute);\r\n\r\n if (rst.next()) {\r\n int columnCount = rst.getMetaData().getColumnCount();\r\n for (int i = 1, count=0; i <= columnCount; i++) {\r\n enrichedValues.put(enrichedOutPutFields[count++],\r\n Strings.nullToEmpty(rst.getString(i)));\r\n }\r\n } else {\r\n String errorMsg = \"No results found for enrichment query: \"\r\n + enrichSQLToExecute;\r\n LOG.error(errorMsg);\r\n throw new RuntimeException(errorMsg);\r\n }\r\n } catch (SQLException e) {\r\n String errorMsg = \"Error enriching event[\" + event\r\n + \"] with enrichment sql[\" + this.enrichmentSQLStatement + \"]\";\r\n LOG.error(errorMsg, e);\r\n throw new RuntimeException(errorMsg, e);\r\n\r\n } finally {\r\n DbUtils.closeQuietly(rst);\r\n DbUtils.closeQuietly(statement);\r\n\r\n }\r\n\r\n return enrichedValues;\r\n }", "@Override\n\tprotected Object mapObj(ResultSet rs) throws SQLException {\n\t\tTbTravelerInfo tbTravelerInfo = new TbTravelerInfo() ;\n\t\ttbTravelerInfo.setId(rs.getInt(\"id\")) ;\n\t\ttbTravelerInfo.setIntBillId(rs.getInt(\"intBillId\")) ;\n\t\ttbTravelerInfo.setStrCountry(rs.getString(\"strCountry\")) ;\n\t\ttbTravelerInfo.setStrIndentyNumber(rs.getString(\"strIndentyNumber\")) ;\n\t\ttbTravelerInfo.setStrTravelerName(rs.getString(\"strTravelerName\")) ;\n\t\ttbTravelerInfo.setStrSex(rs.getString(\"strSex\")) ;\n\t\ttbTravelerInfo.setStrBirthday(rs.getString(\"strBirthday\")) ;\n\t\treturn tbTravelerInfo;\n\t}", "public static HashMap<String, Integer> getHashMap() {\n String query;\n HashMap<String, Integer> catID = new HashMap<String, Integer>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category_id, category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n catID.put(rs.getString(\"category\"), rs.getInt(\"category_id\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return catID;\n }", "public static Map<String, Object> csvRecordToMap(CSVRecord csvRecord, String[] headers) {\r\n\t\tMap<String, Object> dataMap = new HashMap<String, Object>();\r\n\t\tfor (int index = 0; index < headers.length; index++) {\r\n\t\t\tString header = headers[index];\r\n\t\t\tString value = csvRecord.get(index);\r\n\t\t\tdataMap.put(header, value);\r\n\t\t}\r\n\t\treturn dataMap;\r\n\t}", "public static HashMap<String, Object> prepareData(String userId) {\n\t\t\n\t\tds = dbHelper.getDataStore();\n\t\t\n\t\tList<Contact> list = ds.createQuery(Contact.class).field(\"userId\")\n\t\t\t\t.equal(userId)\n\t\t\t\t.order(\"first_name\")\n\t\t\t\t.asList();\n\t\t\n\t\tStringBuilder tableRows = new StringBuilder();\n\t\tStringBuilder jsonData = new StringBuilder();\n\t\t \n if(list != null && list.size() > 0) {\n \n logger.info(\"found \" + list.size() + \" contacts\");\n \n for(int i = 0; i < list.size(); i++) {\n Contact c = list.get(i);\n\t\t\ttableRows.append(c.toTableRow(i));\n\t\t\tjsonData.append(\"\\\"\" + i + \"\\\":\" + c.toJson()).append(\",\");\n// logger.info(\"jsonData \" + i + \" = \" + c.toJson());\n }\n\t\t\n jsonData.deleteCharAt(jsonData.lastIndexOf(\",\")); //removes the last comma\n jsonData.insert(0, \"{\" ).append(\"}\"); //name the array\n\n// logger.info(\"jsonData from prepareData = \\n\" + jsonData);\n \n } else {\n logger.warn(\"No user data found for userId \" + userId);\n jsonData.append(\"{}\");\n }\n \n\t\tHashMap<String, Object> map = new HashMap<>();\n\t\tmap.put(\"tableData\", tableRows.toString());\n\t\tmap.put(\"jsonData\", jsonData.toString());\n\t\t\n\t\treturn map;\n\t}", "@Override\n\t\t\tpublic Row map(String value) throws Exception {\n\t\t\t\tString[] str = value.split(\",\");\n\t\t\t\tRow row = new Row(4);\n\t\t\t\tfor(int i=0 ;i<str.length;i++){\n\t\t\t\t\tswitch(i){\n\t\t\t\t\tcase 0:{\n\t\t\t\t\t\tString time = str[i].substring(1,str[i].length()-1);\n\t\t\t\t\t\tTimestamp tms = Timestamp.valueOf(time);\n\t\t\t\t\t\trow.setField(i,tms);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 1:{\n\t\t\t\t\t\tString tmp = str[i].substring(1,str[i].length()-1);;\n\t\t\t\t\t\trow.setField(i,Integer.valueOf(tmp));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 2:\n\t\t\t\t\tcase 3:{\n\t\t\t\t\t\tString time = str[i].substring(1,str[i].length()-1);\n\t\t\t\t\t\trow.setField(i,time);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn row;\n\t\t\t}" ]
[ "0.697868", "0.68452287", "0.6385909", "0.6204232", "0.61927366", "0.59679747", "0.5916653", "0.5902011", "0.5843166", "0.58011824", "0.57747126", "0.57740295", "0.5773735", "0.57670814", "0.5756792", "0.5704995", "0.5686591", "0.56848574", "0.5669112", "0.561747", "0.55742526", "0.5571251", "0.55476445", "0.55116755", "0.5488878", "0.5487657", "0.5486392", "0.548155", "0.5479384", "0.54790664", "0.547409", "0.5447541", "0.5433237", "0.54177487", "0.5397806", "0.53831047", "0.53776836", "0.5362984", "0.53540045", "0.53479254", "0.53288215", "0.5315688", "0.530407", "0.52923197", "0.528115", "0.5266781", "0.52594584", "0.5257844", "0.5256701", "0.52489", "0.5243515", "0.5234722", "0.52281606", "0.52272874", "0.52174103", "0.5206527", "0.5191652", "0.5190745", "0.51869845", "0.5181089", "0.5176191", "0.5172594", "0.5158033", "0.51569563", "0.5146348", "0.51412106", "0.51264894", "0.5122239", "0.51222", "0.5117539", "0.51162344", "0.5115485", "0.5114691", "0.51101094", "0.510324", "0.51028013", "0.5079109", "0.50710577", "0.5070094", "0.50691265", "0.5068702", "0.506684", "0.5065935", "0.5065581", "0.5061339", "0.50605243", "0.5059036", "0.50577486", "0.5054576", "0.50381976", "0.5022652", "0.5019373", "0.50191134", "0.5018632", "0.501683", "0.50107116", "0.5009525", "0.49973956", "0.49958187", "0.49940914" ]
0.70505047
0
Base method, used to insert or update data in database
abstract Integer processUpdateQuery(String collectionName, ArrayList<HashMap<String,Object>> data, boolean isNew);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void updateDatabase();", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "@Override\n public void DataIsInserted() {\n }", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "private void updateDB() {\n }", "public interface InsertData extends Update {\n}", "Dao.CreateOrUpdateStatus createOrUpdate(T data) throws SQLException, DaoException;", "@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}", "int insert(Forumpost record);", "public abstract void insert(DataAction data, DataRequest source) throws ConnectorOperationException;", "@Override\n public void updateDatabase() {\n }", "@Override\n\tpublic void saveOrUpdate(T common, String sql) {\n\t\tcommonDao.saveOrUpdate(common, sql);\n\t}", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "public void insert()\n\t{\n\t}", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "int insert(UserInfo record);", "private void saveData(){\n\t\tdataBase=mHelper.getWritableDatabase();\n\t\tContentValues values=new ContentValues();\n\t\t\n\t\tvalues.put(DbHelper.KEY_NNAME,nname);\n\t\t//values.put(DbHelper.KEY_LNAME,lname );\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tif(isUpdate)\n\t\t{ \n\t\t\t//update database with new data \n\t\t\tdataBase.update(DbHelper.TABLE_NOTE, values, DbHelper.KEY_ID+\"=\"+id, null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//insert data into database\n\t\t\tdataBase.insert(DbHelper.TABLE_NOTE, null, values);\n\t\t}\n\t\t//close database\n\t\tdataBase.close();\n\t\tfinish();\n\t\t\n\t\t\n\t}", "public void insert() throws SQLException;", "int insert(BaseUser record);", "public abstract boolean insert(Log log) throws DataException;", "@Override\n public void save() {\n String query = null;\n super.save();\n ((DataUser) user).save();\n\n if (getId() == 0) {\n String[] values = {super.getId() + \"\", \"\" + getUser().getId()};\n\n query = Database.compose(\n \"INSERT INTO case_workers (person_id, user_id)\",\n \"VALUES('\" + String.join(\"','\", values) + \"')\",\n \"RETURNING id\"\n );\n } else {\n query = Database.compose(\n \"UPDATE case_workers SET\",\n \"person_id = \" + super.getId() + \",\",\n \"user_id = \" + getUser().getId() + \"\",\n \"WHERE id = \" + getId()\n );\n\n }\n\n Database.getInstance().query(query, rs -> {\n if (id == 0) {\n id = rs.getInt(1);\n }\n });\n }", "protected abstract void doSave();", "protected abstract void prepareStatementForUpdate(PreparedStatement statement, T object) throws PersistException;", "int insert(Admin record);", "int insert(Admin record);", "int insert(AccessModelEntity record);", "int insert(Assist_table record);", "@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}", "int insert(Engine record);", "int insert(BaseCountract record);", "protected abstract void fillUpdateStatement (final PreparedStatement statement, final T obj)\n \t\t\tthrows SQLException;", "@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}", "@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 수정을 하다.\");\n\t}", "@Override\n\tprotected void updateImpl(Connection conn, VtbObject anObject)\n\t\t\tthrows SQLException, MappingException {\n\n\t}", "int insert(PmKeyDbObj record);", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "int insert(Product record);", "int insert(PmPost record);", "public abstract void saveOrUpdate(T entity);", "public void update(T object) throws SQLException;", "int insert(BaseReturn record);", "int insert(DashboardGoods record);", "public interface DatabaseWrapper {\n long insert(String table, String nullColumnHack, ContentValues values);\n}", "public void execute() throws ExecuteException {\n\t\t\r\n\t\tInsertQuery query = new InsertQuery(con,this.cmd,this.dataInfoCollection);\r\n\t\t\r\n\t\tquery.setKeyType(keyType);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tquery.executeSQL();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new ExecuteException(e);\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\tquery.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tUpdateInfo updateIfno = query.getResult();\r\n\t\t\r\n\t\tif(keyType == null || keyType.equals(Constanst.KEY_TYPE_AUTO)){\r\n\t\t\tthis.executeInfo.setKeyValue(updateIfno.getKey());\r\n\t\t}else{\r\n\t\t\tthis.executeInfo.setKeyValue(this.keyValue);\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "@Override\n\tprotected String sql() throws OperationException {\n\t\treturn sql.insert(tbObj, fieldValue);\n\t}", "int insert(Goods record);", "int insert(StudentEntity record);", "@Override\n\tpublic void preInsert() {\n\n\t}", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "int insert(Commet record);", "protected abstract void fillInsertStatement (final PreparedStatement statement, final T obj)\n \t\t\tthrows SQLException;", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "int insert(Storage record);", "int insert(Storage record);", "int insert(Basicinfo record);", "@Override\n\t\tprotected void postUpdate(EspStatusDTO t) throws SQLException {\n\t\t\t\n\t\t}", "int insert(HomeWork record);", "public abstract String insert(Object obj) ;", "Update createUpdate();", "public void upsert( Map<String, ? extends Object> data, final ObjectCallback<Qualification> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.putAll(data);\n \n\n \n\n\n \n \n \n invokeStaticMethod(\"upsert\", hashMapObject, new Adapter.JsonObjectCallback() {\n \n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(JSONObject response) {\n \n if(response != null){\n QualificationRepository qualificationRepo = getRestAdapter().createRepository(QualificationRepository.class);\n if(context != null){\n try {\n Method method = qualificationRepo.getClass().getMethod(\"addStorage\", Context.class);\n method.invoke(qualificationRepo, context);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n //qualificationRepo.addStorage(context);\n }\n Map<String, Object> result = Util.fromJson(response);\n Qualification qualification = qualificationRepo.createObject(result);\n\n //Add to database if persistent storage required..\n if(isSTORE_LOCALLY()){\n //http://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string\n try {\n Method method = qualification.getClass().getMethod(\"save__db\");\n method.invoke(qualification);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n }\n\n callback.onSuccess(qualification);\n }else{\n callback.onSuccess(null);\n }\n \n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n \n\n }", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "int insert(BlogDetails record);", "public void insertUser() {}", "int insert(UserInfoUserinfo record);", "public interface DBHelper {\n\n boolean insertUserData(String username);\n\n\n String getData();\n\n}", "@Override\n\tpublic void dbUpdate(MovementModel data, String updateStm)\tthrows DAOSysException {\n//\t\tMovementModel model = data;\n//\t\tConnection connection = null;\n//\t\tPreparedStatement preparedStm = null;\n//\t\ttry\t{\n//\t\t\tconnection = connectToDB();\n//\t\t\tpreparedStm = connection.prepareStatement(updateStm);\n//\n//\t\t\t/*\tGrab values from persistent fields to store in database\t*/\n//\t\t\tpreparedStm.setString(1, model.getComposer());\n//\n// \t\t\tint rowCount = preparedStm.executeUpdate();\n//\t\t\tif (rowCount == 0)\t{\n// \t\t\t\tthrow new DAOSysException(\n// \t\t\t\t\t\"Failed to store state for Movement <\"\n// \t\t\t\t\t+ model.getCompostionName() + \">\");\n// \t\t\t}\n//\n//\t\t}\tcatch (SQLException sex)\t{\n//\t\t\tthrow new DAOSysException(\n//\t\t\t\t\t\"dbUpdate() SQL Exception <\"\n//\t\t\t\t\t+ sex.getMessage() + \">\");\n//\n//\t\t}\tfinally\t{\n//\t\t\ttry\t{\n//\t\t\t\treleaseAll(null, preparedStm, connection);\n//\t\t\t} catch (Exception ex)\t{\n//\t\t\t\tSystem.err.println(\"Error releasing resources <\" + ex.toString());\n//\t\t\t}\n//\t\t}\n\t}", "int insert(Model record);", "int insert(Dormitory record);", "@Override\r\n\tpublic void update(SimpleJdbcTemplate template) throws Exception {\n\t}", "abstract public void insert(final KeyClass data, final RID rid);", "int insert(BasicEquipment record);", "int insert(StudentInfo record);", "public void executeUpdate();", "int insert(AdminTab record);", "@Override\n\tpublic boolean update(String sql) {\n\t\treturn false;\n\t}", "int insert(GoodsPo record);", "int insert(GirlInfo record);", "public void saveOrUpdate(PosPrice posPrice) throws DataAccessException{\n super.saveOrUpdate(posPrice);\n }", "void insert(BnesBrowsingHis record) throws SQLException;", "int insert(NewsInfo record);", "@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}", "int insert(DataSync record);", "int insert(CompanyExtend record);", "int insert(SysCode record);", "int insert(HotelType record);", "@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "public void saveOrUpdate(Transaction transaction) throws Exception;", "void setDataFromDBContent() {\n\n }", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}", "int insert(SupplyNeed record);", "int insert(ArticleDo record);", "public void processInsertar() {\n }", "int insert(Prueba record);", "@Override\n\tpublic void saveOrUpdate(T common, String sql, String secondSql) {\n\t\tcommonDao.saveOrUpdate(common, sql,secondSql);\n\t}", "int insert(Emp record);" ]
[ "0.6657283", "0.6555757", "0.6522189", "0.6440331", "0.6432963", "0.63403344", "0.63161916", "0.6279026", "0.6216459", "0.6203567", "0.62014556", "0.61891264", "0.61839664", "0.6156668", "0.6136865", "0.61368084", "0.6087367", "0.60771096", "0.6075639", "0.6054844", "0.60540533", "0.60460657", "0.60327", "0.6028925", "0.6022655", "0.6022655", "0.6014107", "0.6012168", "0.60102475", "0.60006166", "0.5998897", "0.5991745", "0.5989911", "0.5980431", "0.5979376", "0.5976763", "0.5975273", "0.5961359", "0.5952854", "0.59477895", "0.59416354", "0.593719", "0.5936575", "0.59346056", "0.5932352", "0.59303707", "0.5912029", "0.59069085", "0.58867884", "0.5886051", "0.5884337", "0.58799326", "0.5877073", "0.58764386", "0.5867377", "0.5858895", "0.5858895", "0.5858402", "0.5856671", "0.5854252", "0.5850156", "0.5846154", "0.5845784", "0.5844352", "0.58435285", "0.5843497", "0.5843218", "0.5839375", "0.5838948", "0.583539", "0.58351904", "0.5834169", "0.583147", "0.5825997", "0.5818999", "0.5813289", "0.5811986", "0.5808692", "0.580836", "0.58044314", "0.58033884", "0.5801951", "0.5797439", "0.57968783", "0.5793464", "0.57924753", "0.5783312", "0.57831526", "0.57792276", "0.5769544", "0.5765969", "0.57649916", "0.5763073", "0.5761117", "0.5746702", "0.5746202", "0.5744338", "0.5743471", "0.57397205", "0.5739171" ]
0.5756131
94
Utility Method checks if provided collection field has correct configuration
boolean isValidFieldConfig(String collectionName,String fieldName) { if (getFieldConfigValue(collectionName,fieldName,"name")==null) return false; if (getFieldConfigValue(collectionName,fieldName,"type")==null) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCollectionName();", "protected Boolean isJavaCollection(final Object dataObject, final String fieldName)\n {\n try\n {\n Field fld = dataObject.getClass().getDeclaredField(fieldName);\n if (fld != null)\n {\n return Collection.class.isAssignableFrom(fld.getType());\n \n }\n log.error(\"Couldn't find field [\"+fieldName+\"] in class [\"+getClass().getSimpleName()+\"]\");\n \n } catch (Exception ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(DataModelObjBase.class, ex);\n ex.printStackTrace();\n }\n return null;\n }", "@Override\n protected boolean accept(Field f) {\n\t\t return !Collection.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t!List.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t\t\t!BaseEntity.class.isAssignableFrom(f.getType())\n\t\t \t\t\t\t&& acceptToStringField(f);\n\t\t }", "public boolean isValidSubList(Object fieldValue) {\n return fieldValue != null\n && AbstractPersistentCollection.class.isAssignableFrom(fieldValue.getClass());\n }", "private void checkCollection(SnmpCollection collection) {\n if (collection.getSystems() == null)\n collection.setSystems(new Systems());\n if (collection.getGroups() == null)\n collection.setGroups(new Groups());\n }", "public static boolean isEntityCollection(final ObjectStreamField property) {\r\n\t\t\treturn Collection.class.isAssignableFrom(property.getType());\r\n\t\t}", "HashMap<String,Object> getCollectionFieldsConfig(String collectionName) {\n HashMap<String,Object> collection = getCollectionConfig(collectionName);\n if (collection == null || !collection.containsKey(\"fields\") ||\n !(collection.get(\"fields\") instanceof HashMap<?,?>)) return null;\n return (HashMap<String,Object>)collection.get(\"fields\");\n }", "boolean containsConfigurationField(String fieldName);", "private static boolean isCollection(String typeName) {\r\n logger.debug(\"isCollection: \" + typeName);\r\n return collectionTypes.contains(typeName);\r\n }", "public boolean isTrueCollectionType()\n/* */ {\n/* 236 */ return Collection.class.isAssignableFrom(this._class);\n/* */ }", "QueryElement addNotEmpty(String collectionProperty);", "public boolean isCollection() {\n return this == LOAD || this == PICKUP;\n }", "public boolean hasCollectionProperty( Property propertyId ) {\n Object value = getProperty(propertyId);\n return (value instanceof Collection<?> && !((Collection<?>)value).isEmpty());\n }", "Set<String> getCollectionFields(String collectionName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n Set<String> result = fields.keySet();\n // result.remove(getIdFieldName(collectionName));\n return result;\n }", "QueryElement addOrNotEmpty(String collectionProperty);", "public abstract boolean isCollection(T type);", "@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }", "protected boolean isCollection(Class clazz) {\n\n return Collection.class.isAssignableFrom(clazz);\n }", "@Test(expected=IllegalArgumentException.class)\n public void testNamedParamValueInCollectionTypeValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, \"Moo\"));\n }", "HashMap<String,Object> getFieldConfig(String collectionName,String fieldName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n if (fields == null || !(fields instanceof HashMap<?,?>)|| !fields.containsKey(fieldName)) return null;\n return (HashMap<String,Object>)fields.get(fieldName);\n }", "public void testCollectionPolicy()\r\n {\r\n assertEquals( \"collection\", m_collection, m_directive.getCollectionPolicy() );\r\n }", "private boolean isEmptyCollection(Object value) {\n try {\n return value instanceof Collection && ((Collection<?>) value).isEmpty();\n } catch (Exception e) {\n return true;\n }\n }", "@Test\n public void testGetPropertyValueSetEmptyCollection(){\n assertEquals(emptySet(), CollectionsUtil.getPropertyValueSet(new ArrayList<>(), \"id\", Integer.class));\n }", "protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }", "boolean isCustomiseSet();", "protected Collection createCollectionMatchingType(MappingContext mappingContext) {\n Class<?> collectionType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (collectionType.isAssignableFrom(ArrayList.class)) {\n return new ArrayList();\n } else if (collectionType.isAssignableFrom(LinkedHashSet.class)) {\n return new LinkedHashSet();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported collection type '\" + collectionType + \"'\");\n }\n }", "@Override\n\tpublic boolean verifierCollection(String nomCollection) {\n\t\tMongoIterable<String> names = db.listCollectionNames();\n\t\tMongoCursor<String> cursor = names.cursor(); \n\t\twhile(cursor.hasNext()) {\n\t\t\tif (cursor.next().equals(nomCollection))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void testGetPropertyValueSetNullCollection(){\n assertEquals(emptySet(), CollectionsUtil.getPropertyValueSet(null, \"id\", Integer.class));\n }", "public static boolean isCollection( Object value )\r\n {\r\n if ( value != null )\r\n {\r\n if ( value.getClass().isArray() || value instanceof Collection<?> )\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "private boolean isAcceptable(final Field field) {\n return Modifier.isStatic(field.getModifiers())\n && (field.getType() == String.class || field.getType().isAssignableFrom(List.class) || field.getType()\n .isArray() && field.getType().getComponentType() == String.class);\n }", "@Test\n public void testNamedParamValueInCollectionTypeValidationPassesWhenCorrect() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, 20d));\n }", "protected ValidationComponent createCollectionClassComponent (\n\t\tfinal RelationshipElement field)\n\t{\n\t\treturn new ValidationComponent ()\n\t\t{\n\t\t\tpublic void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tString className = getClassName();\n\t\t\t\tString fieldName = field.getName();\n\n\t\t\t\tif (isCollection(className, fieldName))\n\t\t\t\t{\n\t\t\t\t\tModel model = getModel();\n\t\t\t\t\tString collectionClass = field.getCollectionClass();\n\t\t\t\t\tString fieldType = model.getFieldType(className, fieldName);\n\t\t\t\t\tboolean missingCollectionClass = \n\t\t\t\t\t\tStringHelper.isEmpty(collectionClass);\n\n\t\t\t\t\tif (!missingCollectionClass && \n\t\t\t\t\t\t!model.getSupportedCollectionClasses(fieldType).\n\t\t\t\t\t\tcontains(collectionClass))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.collection_class_invalid\");//NOI18N\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "public static boolean isCollection(final Object collection) {\n\n return collection instanceof Collection;\n }", "@Override\n public boolean isOwningCollection(Item item, Collection c)\n {\n Collection collection = item.getOwningCollection();\n\n if (collection != null && c.getID() == collection.getID())\n {\n return true;\n }\n\n // not the owner\n return false;\n }", "private Collection getFieldsValidationList ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tModel model = getModel();\n\t\tString className = getClassName();\n\t\tPersistenceClassElement persistenceClass = \n\t\t\tgetPersistenceClass(className);\n\n\t\tif (persistenceClass != null)\n\t\t{\n\t\t\tPersistenceFieldElement[] fields = persistenceClass.getFields();\n\t\t\tint i, count = ((fields != null) ? fields.length : 0);\n\t\t\tIterator iterator = \n\t\t\t\tgetMappingClass(className).getFields().iterator();\n\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tPersistenceFieldElement field = fields[i];\n\n\t\t\t\tlist.add(createFieldExistenceComponent(field));\n\n\t\t\t\t// even though this is really the validation step, we \n\t\t\t\t// only want to add the others if the field exists\n\t\t\t\tif (model.hasField(className, field.getName()))\n\t\t\t\t{\n\t\t\t\t\tlist.add(createFieldPersistenceComponent(field));\n\t\t\t\t\tlist.add(createFieldPersistenceTypeComponent(field));\n\t\t\t\t\tlist.add(createFieldConsistencyComponent(field));\n\n\t\t\t\t\tif (isLegalRelationship(field))\n\t\t\t\t\t{\n\t\t\t\t\t\tRelationshipElement rel = (RelationshipElement)field;\n\n\t\t\t\t\t\t/* user modifiable collection class not yet supported\n\t\t\t\t\t\tlist.add(createCollectionClassComponent(rel));*/\n\t\t\t\t\t\tlist.add(createElementClassComponent(rel));\n\t\t\t\t\t\tlist.add(createRelatedClassMatchesComponent(rel));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (iterator.hasNext())\n\t\t\t{\n\t\t\t\tMappingFieldElement field = \n\t\t\t\t\t(MappingFieldElement)iterator.next();\n\t\t\t\tString fieldName = field.getName();\n\n\t\t\t\t// only check this if it is not in the jdo model\n\t\t\t\tif (persistenceClass.getField(fieldName) == null)\n\t\t\t\t{\n\t\t\t\t\tlist.add(createFieldExistenceComponent(field));\n\n\t\t\t\t\t// even though this is really the validation step, we \n\t\t\t\t\t// only want to add the others if the field exists\n\t\t\t\t\tif (model.hasField(className, fieldName))\n\t\t\t\t\t\tlist.add(createFieldConsistencyComponent(field));\n\t\t\t\t}\n\n\t\t\t\tif (!isRelationship(field))\n\t\t\t\t\tlist.add(createColumnOverlapComponent(field));\n\n\t\t\t\t// preliminary fix for CR6239630\n\t\t\t\tif (Boolean.getBoolean(\"AllowManagedFieldsInDefaultFetchGroup\")) // NOI18N\n\t\t \t\t{\n // Do nothing - AllowManagedFieldsInDefaultFetchGroup: \n // disabled single model validation test; \n // may use checked read/write access to managed fields\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlist.add(createFieldDefaultFetchGroupComponent(field));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public boolean checkCollection(String Keyword)\n\t{\n\n\t\t//#CM708975\n\t\t// Refer to Key-Table by the item name. \n\t\tKey ky = getKeyCut(Keyword) ;\n\t\tif (ky == null)\n\t\t\treturn false ;\n\n\t\tif (ky.getTableCollect() == null)\n\t\t\treturn false ;\n\n\t\treturn true ;\n\t}", "public static <T> boolean m6262a(Collection<T> collection) {\n return collection == null || collection.isEmpty();\n }", "private boolean checkField(Field field) {\n if (field.isAnnotationPresent(Transient.class) || field.isAnnotationPresent(JsonIgnore.class)) {\n return false;\n }\n\n return (field.isAnnotationPresent(Column.class) || field.isAnnotationPresent(Id.class) ||\n field.isAnnotationPresent(ManyToOne.class) || field.isAnnotationPresent(ManyToMany.class) ||\n field.isAnnotationPresent(OneToOne.class) || field.isAnnotationPresent(OneToMany.class) ||\n field.isAnnotationPresent(ElementCollection.class) || field.isAnnotationPresent(Embedded.class));\n }", "@Test\r\n public void test_containNull_True() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING, null});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertTrue(\"'containNull' should be correct.\", res);\r\n }", "public boolean isCollection() {\n return m_collection;\n }", "private boolean collectionExist(String id) {\r\n\ttry {\r\n\t contentHostingService.getCollection(id);\r\n\t} catch (Exception e) {\r\n\t return false;\r\n\t}\r\n\treturn true;\r\n }", "public boolean isSetBelongs_to_collection() {\n return this.belongs_to_collection != null;\n }", "@Override\r\n public boolean isDirectEmbeddableCollection() {\r\n return getEmbeddableAccessor() != null;\r\n }", "public boolean isCalendarCollection();", "@Test\r\n public void test_containNull_False() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertFalse(\"'containNull' should be correct.\", res);\r\n }", "public static <T> Collection<T> requireNonEmpty(Collection<T> col) {\n if (col.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return col;\n }", "public boolean getUseCollection()\r\n {\r\n return getString(UseCollection_, \"0\").compareTo(\"on\")==0;\r\n }", "public boolean isEmpty( Collection<?> collection ){\n if( collection == null || collection.isEmpty() ){\n return true;\n }\n return false;\n }", "private static boolean isCollection(String uri) {\r\n return (getResourceName(uri).indexOf('.') == -1);\r\n }", "public boolean isCollection(Class<?> aClass) {\n\t\treturn (this.getCollectionTypes().contains(aClass.getName()));\n\t}", "public abstract boolean isNodeTypeCollection();", "boolean hasFieldId();", "public static <T> Collection<T> requireNullOrNonEmpty(Collection<T> col) {\n if (col != null && col.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return col;\n }", "@Override\n\t\tpublic boolean containsAll(Collection<?> c) {\n\t\t\treturn false;\n\t\t}", "public boolean isComplexCollection() {\n return m_complexCollection;\n }", "private boolean isDecoratableList(Field field) {\n\t\tif (!List.class.isAssignableFrom(field.getType())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Type erasure in Java isn't complete. Attempt to discover the generic\n\t\t// type of the list.\n\t\tType genericType = field.getGenericType();\n\t\tif (!(genericType instanceof ParameterizedType)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tType listType = ((ParameterizedType) genericType)\n\t\t\t\t.getActualTypeArguments()[0];\n\n\t\tif (!WebElement.class.equals(listType)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (field.getAnnotation(UIMapKeyProvider.class) != null);\n\t}", "public static <T> Collection<T> requireNullOrNonEmpty(Collection<T> col, String message) {\n if (col != null && col.isEmpty()) {\n throw new IllegalArgumentException(message);\n }\n return col;\n }", "public void setCollectionName(String collectionName);", "private void setCollection(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n collection_ = value;\n }", "public boolean mo30764d(Collection<?> collection) {\n return C8003l4.m38369c((C7982k4<?>) this, collection);\n }", "boolean hasFieldTypeId();", "public boolean isResultSetCollectionEnabledWithUnreadValueFillIn();", "private CollectionType() {}", "private boolean isCollStatusPending(final Specimen objSpecimen)\r\n\t{\r\n\t\treturn objSpecimen.getCollectionStatus() == null || !Constants.COLLECTION_STATUS_COLLECTED.equals(objSpecimen.getCollectionStatus());\r\n\t}", "public boolean mo29681c(Collection<?> collection) {\n return C8003l4.m38366b((C7982k4<?>) this, collection);\n }", "private static String getCollectionArgument(Map<String, Entity> entitiesMap, FieldType fieldType) {\r\n if (!fieldType.getTypeArguments().isEmpty()) {\r\n return fieldType.getTypeArguments()\r\n .stream()\r\n .map(FieldType::transformName)\r\n .filter(entitiesMap::containsKey)\r\n .findFirst()\r\n .orElse(fieldType.getTypeArguments().get(0));\r\n } else {\r\n return fieldType.getName();\r\n }\r\n }", "private DataType detectCollectionItemType(ListTypeInstance listType){\n\t\tDataType dt = listType.getCollectionItemType();\n\t\tif(dt == null)\n\t\t\tdt = ((CollectionType)listType.getDataTypeType()).getCollectionItemType();\n\t\treturn dt;\t\t\n\t}", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "@Nullable\n public static CollectionConfig createCollection(\n DiagCollector diagCollector, CollectionConfigProto collectionConfigProto) {\n String namePattern = collectionConfigProto.getNamePattern();\n PathTemplate nameTemplate;\n try {\n nameTemplate = PathTemplate.create(namePattern);\n } catch (ValidationException e) {\n diagCollector.addDiag(Diag.error(SimpleLocation.TOPLEVEL, e.getMessage()));\n return null;\n }\n String entityName = collectionConfigProto.getEntityName();\n return new CollectionConfig(namePattern, nameTemplate, entityName);\n }", "private boolean allowFeedsCollectionAccess(AuthzResource resource,\tString method, String subject, String subjectgroup) {\n\t\treturn method != null && (method.equalsIgnoreCase(\"GET\") || method.equalsIgnoreCase(\"POST\"));\n\t}", "@Override\n\tpublic boolean containsAll(Collection<?> c) {\n\t\treturn false;\n\t}", "private boolean checkColNameSet() {\n return (null != colNames && colNames.size() > 0);\n }", "protected abstract void describeCollectionType(final MatchDescription description);", "public static <T> Collection<T> requireNonEmpty(Collection<T> col, String message) {\n if (col.isEmpty()) {\n throw new IllegalArgumentException(message);\n }\n return col;\n }", "public static boolean addToCollection(final FormDataObjIFace dataObject, String fieldName, FormDataObjIFace ref)\n {\n try\n {\n DataObjectGettable getter = DataObjectGettableFactory.get(dataObject.getClass().getName(), FormHelper.DATA_OBJ_GETTER);\n Object dataMember = getter.getFieldValue(dataObject, fieldName);\n \n if (dataMember != null)\n {\n try\n {\n Method method = dataMember.getClass().getMethod(\"add\", Object.class);\n if (method != null)\n {\n method.invoke(dataMember, ref);\n return true;\n \n }\n log.error(\"Missing method add(Object) for this type of set [\"+dataMember.getClass()+\"]\");\n \n } catch (Exception ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(DataModelObjBase.class, ex);\n ex.printStackTrace();\n }\n } else\n {\n log.error(\"DataMember [\"+fieldName+\"] was null in object of class[\"+dataObject.getDataClass().getSimpleName()+\"]\");\n }\n } catch (Exception ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(DataModelObjBase.class, ex);\n ex.printStackTrace();\n }\n return false;\n }", "QueryElement addOrEmpty(String collectionProperty);", "private Object findByNameProperty(String key, Collection collection) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException {\n for (Object candidate : collection) {\n Object candidateName = getProperty(candidate, \"name\");\n if (candidateName != null && key.equals(candidateName.toString())) {\n return candidate;\n }\n }\n return null;\n }", "boolean isSetServiceConfigurationList();", "java.lang.String getCollection();", "protected String checkCollectionKey(String section) throws ActionException {\n\t\tlog.debug(\"evaluating section val: \" + section);\n\t\tString key = StringUtil.checkVal(section).toUpperCase();\n\t\ttry {\n\t\t\tSection.valueOf(key);\n\t\t} catch (Exception e) {\n\t\t\tthrow new ActionException(\"Unknown section value: \" + section);\n\t\t}\n\t\treturn key;\n\t}", "public JsonDeserializer<?> modifyCollectionLikeDeserializer(DeserializationConfig config, CollectionLikeType type, BeanDescription beanDesc, JsonDeserializer<?> deserializer)\n/* */ {\n/* 150 */ return deserializer;\n/* */ }", "public void setCollectionFormat(CollectionFormat collectionFormat) {\n this.collectionFormat = collectionFormat;\n }", "boolean hasKey(String collection, String hkey);", "boolean isSetListOfServiceElements();", "private void verifyField() {\n try {\n if (type != Function.class && type != Foreign.class)\n throw new DataMapperException(\"The field annotated with @ColumnName must be of type Function or Foreign\");\n String[] nameDefaultValue = (String[]) ColumnName.class.getDeclaredMethod(\"name\").getDefaultValue();\n\n checkNameParameter(nameDefaultValue);\n } catch (NoSuchMethodException e) {\n throw new DataMapperException(e);\n }\n }", "@Override\n\tpublic boolean containsAll(Collection<?> c) {\n\t\tthrow new NotImplementedException(\"Not yet implemented\"); \n\t}", "public JsonDeserializer<?> modifyCollectionDeserializer(DeserializationConfig config, CollectionType type, BeanDescription beanDesc, JsonDeserializer<?> deserializer)\n/* */ {\n/* 142 */ return deserializer;\n/* */ }", "public boolean containsAll(Collection<?> arg0) {\n\t\treturn false;\n\t}", "protected void checkIfConfigurationModificationIsAllowed() {\r\n\t\tif (isCompiled()) {\r\n\t\t\tthrow new InvalidDataAccessApiUsageException(\"Configuration can't be altered once the class has been compiled or used.\");\r\n\t\t}\r\n\t}", "public boolean isBigCollection() {\n return (getPersistable().getManagedResources().size()) > BIG_COLLECTION_CHILDREN_COUNT;\n }", "public JSONObject validateCollections(Collections collection){\n\n\t\tInvalidValue[] invalidValues = collectionsValidator.getInvalidValues(collection);\n\t\tHashMap<String, String> errs=new HashMap<String, String>();\n\n\t\tfor (InvalidValue value : invalidValues) { \n\t\t\terrs.put(\"Collection \" + value.getPropertyName(), value.getMessage());\t\t\t \n\t\t}\n\t\treturn createJson(errs);\n\n\t}", "boolean hasField2();", "boolean hasField1();", "boolean hasField3();", "boolean hasField4();", "@Override\n public boolean containsAll(final Collection<?> collection) {\n this.checkCollectionNotNull(collection);\n final Iterator<?> iterator = collection.iterator();\n\n while (iterator.hasNext()) {\n if (!this.contains(iterator.next())) {\n return false;\n }\n }\n\n return true;\n }", "public boolean containsAll(Collection coll) {\n\n return elements.keySet().containsAll(coll);\n }" ]
[ "0.64362854", "0.63278204", "0.60712427", "0.5923533", "0.5907897", "0.5894762", "0.5798755", "0.57757956", "0.5771319", "0.5709895", "0.56713533", "0.5650117", "0.5645303", "0.5622607", "0.5570087", "0.55301476", "0.55261624", "0.55089176", "0.54902", "0.5486837", "0.5476544", "0.5473135", "0.5422285", "0.54195637", "0.53937376", "0.53848785", "0.5377071", "0.5340046", "0.53389806", "0.53353554", "0.5315823", "0.53125215", "0.5299906", "0.5295918", "0.52933097", "0.5230204", "0.5220412", "0.52039874", "0.5197939", "0.5195755", "0.518757", "0.5178478", "0.5171136", "0.516198", "0.51553744", "0.514951", "0.51465225", "0.5146365", "0.51275563", "0.5120307", "0.5106934", "0.51068234", "0.5078457", "0.50777483", "0.5069657", "0.5057772", "0.50507814", "0.5035334", "0.5035211", "0.5029757", "0.5025358", "0.5020762", "0.5016083", "0.50101846", "0.50075305", "0.49933755", "0.4990836", "0.4988838", "0.4988838", "0.4988838", "0.4988838", "0.4978991", "0.4976393", "0.49744254", "0.4969026", "0.49638236", "0.49632576", "0.49624032", "0.49585596", "0.4949024", "0.49363607", "0.49338186", "0.4920941", "0.49180108", "0.49171492", "0.49161968", "0.4915079", "0.49060884", "0.49009216", "0.49008822", "0.49007457", "0.48946258", "0.4892859", "0.4891974", "0.4889734", "0.4883296", "0.4880201", "0.48791897", "0.48778102", "0.4877734" ]
0.7015575
0
Utility method which returns value of specified config parameter of specified field
Object getFieldConfigValue(String collectionName,String fieldName,String variable) { HashMap<String,Object> field = getFieldConfig(collectionName,fieldName); if (field == null) return null; return field.containsKey(variable) ? field.get(variable) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConfigurationValue(String name);", "ParameterConfiguration getParameterConfiguration(String name);", "abstract public String getValue(String fieldname);", "protected String getConfigurationParamValue(String parameter) {\n return configuration.getParameter(parameter);\n }", "java.lang.String getParameterValue();", "Parameter getParameter();", "public static String getParam(String key, String dfault) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return dfault;\n }\n return cur.get(key, dfault);\n }", "@Nullable\n\tObject getFieldValue(String field);", "public static String getParam(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.get(key);\n }", "public Object getParamValue(String label);", "public String getConfigurationField() {\n return configField;\n }", "String getValue(String param)\n\t{\n\t\tString value = null;\n\n\t\tif (userSupplied != null && (value = this.userSupplied.get(param)) != null)\n\t\t{\n\t\t\treturn value;\n\t\t}\n\n\t\tElement element = this.parameters.get(param);\n\t\tif (element == null)\n\t\t{\n\t\t\tlog.debug(\"PISE FILE ERROR, expression uses undefined parameter: \" + param);\n\t\t\treturn null;\n\t\t} \n\t\t// When one parameter has an expression that references the value of a disabled parameter\n\t\t// return \"0\" if it's a switch or \"\" for anything else. Similar to what the gui does in\n\t\t// code generator pise2JSP.ftl getValue() function.\n\t\tif (!element.enabled) \n\t\t{\n\t\t\tif (element.type.equals(\"Switch\"))\n\t\t\t{\n\t\t\t\tlog.debug(\"\\tGETVALUE of disabled parameter: \" + param + \" returns '0'\");\n\t\t\t\treturn \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\tlog.debug(\"\\tGETVALUE of disabled parameter: \" + param + \" returns ''\");\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn element.value;\n\t}", "String getProperty(String property);", "private Object getFieldValue(Field field){\n\t\tObject value = null;\n//\t\tPropertyDescriptor pd;\n//\t\ttry {\n//\t\t\t//to new a PropertyDescriptor, you MUST have getter and setter method in the class,\n//\t\t\t//otherwise it will throw out java.beans.IntrospectionException: Method not found: setId\n//\t\t\tpd = new PropertyDescriptor (field.getName(), getClass());\n//\t\t\tMethod getterMethod = pd.getReadMethod();\n//\t\t\tif(pd!=null){\n//\t\t\t\ttry {\n//\t\t\t\t\tvalue = getterMethod.invoke(this);\n//\t\t\t\t} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {\n//\t\t\t\t\tlog.debug(\"Failed to get value for field '\"+field.getName()+\"'\",e);\n//\t\t\t\t\tfield.setAccessible(true);\n//\t\t\t\t\ttry {\n//\t\t\t\t\t\tvalue = field.get(this);\n//\t\t\t\t\t} catch (IllegalArgumentException | IllegalAccessException e1) {\n//\t\t\t\t\t\tlog.debug(\"Failed to get value for field '\"+field.getName()+\"'\",e1);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t} catch (IntrospectionException e) {\n//\t\t\tlog.debug(\"Failed to get value for field '\"+field.getName()+\"'\",e);\n//\t\t}\n\t\ttry {\n\t\t\t//Firstly try to get it with getter method\n\t\t\t//PropertyUtils needs commons-beanutils.jar on the classpath, otherwise it throw out NoClassDefFoundError,\n\t\t\t//we catch NoClassDefFoundError and let java reflection to do the work\n\t\t\tvalue = PropertyUtils.getProperty(this, field.getName());\n\t\t} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException | java.lang.NoClassDefFoundError e) {\n\t\t\tlog.warn(\"Failed to get value for field '\"+field.getName()+\"'\",e);\n\t\t\tfield.setAccessible(true);\n\t\t\ttry {\n\t\t\t\t//try to get directly the field's value by java reflection\n\t\t\t\tvalue = field.get(this);\n\t\t\t} catch (IllegalArgumentException | IllegalAccessException e1) {\n\t\t\t\tlog.warn(\"Failed to get value for field '\"+field.getName()+\"'\",e1);\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t}", "String getField();", "private static String getLockedValue(CatalogServiceFieldRestRep field) {\n if (Boolean.TRUE.equals(field.getOverride()) && StringUtils.isNotBlank(field.getValue())) {\n return field.getValue();\n }\n else {\n return null;\n }\n }", "Configuration getConfigByKey(String configKey);", "private static String _getConfValue(String s) {\n int pos = s.indexOf('=');\n if (pos > 0)\n return s.substring(pos+1);\n throw new ConfLibException(\"Invalid parameter string \" + s);\n }", "protected abstract String getFieldName(String parameter);", "public String get(Class requestor, String field, String defaultString);", "VarRef lookupField(String fieldUse);", "@Override\n public ConfigValue getConfigValue(String propertyName) {\n return passedCfg.getConfigValue(propertyName);\n }", "public String getField(String field) throws RemoteException;", "String getSettingByKey(String key);", "private static Object prop(Map<String, ?> config, BundleContext bundleContext, String name) {\n Object value = bundleContext.getProperty(name);\n if (value != null) {\n return value;\n }\n\n //Fallback to one from config\n return config.get(name);\n }", "boolean containsConfigurationField(String fieldName);", "public String getParameter( String parm ) {\n return System.getProperty( parm );\n }", "public Object getParam(String param) {\n\t\treturn applicationParams.get(param);\n\t}", "Object getParameter(String name);", "public static Object getSetting(String param, Object defVal, Context context){\n\t\t\t\t\n\t\tObject returnValue = null;\n\t\ttry{\t\t\n\t\tif (defVal instanceof String)\n\t\t\treturnValue = pref().getString(param,(String) defVal);\n\t\telse\n\t\tif (defVal instanceof Integer)\n\t\t\treturnValue = pref().getInt(param,(Integer) defVal);\n\t\telse\n\t\tif (defVal instanceof Boolean)\n\t\t\treturnValue = pref().getBoolean(param,(Boolean) defVal);\n\t\telse\n\t\t\tif (defVal instanceof Long)\n\t\t\t\treturnValue = pref().getLong(param,(Long) defVal);\n\t\telse\n\t\t\tif (defVal instanceof Float)\n\t\t\t\treturnValue = pref().getFloat(param,(Float) defVal);\n\t\telse\n\t\t\treturnValue = defVal;\n\t\t}catch(Exception e){\n\t\t\treturnValue = defVal;\n\t\t\t}\t\t\t\n\t\t\n\t\treturn returnValue;\n\t}", "public int get(String parameter, int offset)\n {\n int paramIndex = getAkParamIndex(parameter);\n int i = getAkSettingIndex(paramIndex, offset);\n if (i == -1)\n throw new IllegalArgumentException(\"The parameter and offset combination is not allowed\");\n\n return values_[i];\n }", "public String getParameterValue(int key){\n return parameters.get(key).value;\n }", "String getVal();", "Value get(ExecutionContext context, String propertyName);", "String getParameter(String key);", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return BUS_UNIT;\n case 1: return DESCRIPTION;\n case 2: return BASE_CURRENCY_ID;\n case 3: return IMPLEMENT_FX;\n case 4: return BUS_UNIT_ID;\n case 5: return CL_APPROVAL;\n case 6: return CL_MAIL_GROUP;\n case 7: return AUTO_RECEIPT_APPL;\n case 8: return ADDRESS_IND;\n case 9: return ALLOW_MISC_INV_CREATION;\n case 10: return ALLOW_ABC_REV_SPLIT_TO_RUN;\n case 11: return ALLOW_MTM_TO_RUN;\n case 12: return GLPOST_DETAILS;\n case 13: return GL_INTERFACE;\n case 14: return ALLOW_AIS_UNBILLED_TO_RUN;\n case 15: return SRC_KEY_VAL;\n case 16: return SRC_CDC_OPER_NM;\n case 17: return SRC_COMMIT_DT_UTC;\n case 18: return TRG_CRT_DT_PART_UTC;\n case 19: return SRC_SCHEMA_NM;\n default: throw new IndexOutOfBoundsException(\"Invalid index: \" + field$);\n }\n }", "java.lang.String getConstantValue();", "String getParam( String paraName );", "protected String getConfigurationElementValue(String property) {\n return ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService().getAPIManagerConfiguration().\n getFirstProperty(property);\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String name);", "public String get(String fieldName) {\n\t\tString xpQuery = getXPathQuery(fieldName);\n\t\treturn getFieldUsingXPath(xpQuery);\n\t}", "protected String getComponentConfigProperty(\n String name,\n org.opencrx.kernel.admin1.jmi1.ComponentConfiguration componentConfiguration\n ) {\n String value = null;\n Collection<org.opencrx.kernel.base.jmi1.Property> properties = componentConfiguration.getProperty();\n for(org.opencrx.kernel.base.jmi1.Property p:properties) {\n if(\n p.getName().equals(name) &&\n (p instanceof org.opencrx.kernel.base.jmi1.StringProperty)\n ) {\n value = ((org.opencrx.kernel.base.jmi1.StringProperty)p).getStringValue();\n break;\n }\n }\n return value;\n }", "public String getProperty( String name, boolean nologvalue )\n {\n String value = null;\n if ( config != null )\n {\n value = ( String ) config.getProperty( name );\n LOG.debug( \"getProperty name [{}] value [{}]\", name, nologvalue ? \"****\" : value );\n }\n else\n {\n LOG.warn( \"getProperty invalid config, can't read prop [{}]\", name );\n }\n return value;\n }", "String getSettingByKey(HawkularUser user, String key, String defaultValue);", "HashMap<String,Object> getFieldConfig(String collectionName,String fieldName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n if (fields == null || !(fields instanceof HashMap<?,?>)|| !fields.containsKey(fieldName)) return null;\n return (HashMap<String,Object>)fields.get(fieldName);\n }", "java.lang.String getFieldOrDefault(\n java.lang.String key,\n java.lang.String defaultValue);", "public String getInitParameter(java.lang.String name)\n {\n \treturn config.getInitParameter(name);\n }", "public String get(Object requestor, String field, String defaultString);", "abstract public String getDisplayValue(String fieldname);", "public String get(Class requestor, String field, String defaultString,\n Object param1);", "private Object getValueByGetMethodCall(Entity entity, String fieldName, Class<?> fieldType) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{\n\t\treturn getValueByGetMethodCall(entity, fieldName, fieldType, NO_PARAMS);\n\t}", "@GetMapping(\"/config-parameters/{id}\")\n @Timed\n public ResponseEntity<ConfigParameter> getConfigParameter(@PathVariable Long id) {\n log.debug(\"REST request to get ConfigParameter : {}\", id);\n ConfigParameter configParameter = configParameterRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(configParameter));\n }", "public String getParameterValue(String name) {\n\t\treturn _parameters.getParameterValue(name);\n\t}", "public String getParameterValue(String name) {\n\treturn (String) _parameters.get(name);\n }", "ParamConfig getWrappedParam(String name);", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "public Object extractParameterValue(MethodParameterContext context)\n\t{\n\t\tObject paramValue = null;\n\n\t\tif (annotationParam == null)\n\t\t\tparamValue = extractParameterFromUrl(context);\n\t\telse\n\t\t\tparamValue = extractParameterFromAnnotation(context);\n\n\t\t// try to use the default value\n\t\tif (paramValue == null && !deaultValue.isEmpty())\n\t\t\tparamValue = AbstractRestResource.toObject(parameterClass, deaultValue, supplier);\n\n\t\treturn paramValue;\n\t}", "public String get(Class requestor, String field, int type,\n String defaultString);", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return site;\n case 1: return service;\n case 2: return sector;\n case 3: return room;\n case 4: return alias;\n case 5: return serialPort;\n case 6: return driver;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public static final\n int ccGetIntegerFieldValue(Object pxInstance, String pxFieldName)\n throws RuntimeException\n {\n if(pxInstance==null){throw E_GENERAL_GET;}\n if(!ccIsValidString(pxFieldName)){throw E_GENERAL_GET;}\n int lpRes=0;\n try {\n Field lpFiled = pxInstance.getClass().getField(pxFieldName);\n lpRes=lpFiled.getInt(pxInstance);\n }catch(Exception e){\n System.err.println(\".ccGetIntegerFieldValue()$failed_with:\"\n + e.getMessage());\n throw E_GENERAL_GET;\n }//..?\n return lpRes;\n }", "public String getThisParameter(String parameterName) {\r\n\t\tlog.debug(\"in GeneListAnalysis.getThisParameter\");\r\n\r\n\t\tParameterValue[] myParameterValues = this.getParameterValues();\r\n\t\t//log.debug(\"parmavalues len = \"+myParameterValues.length);\r\n \tString parameterValue= null;\r\n \tfor (int i=0; i<myParameterValues.length; i++) {\r\n\t\t\tif (myParameterValues[i].getParameter().equals(parameterName)) {\r\n \t\tparameterValue = myParameterValues[i].getValue();\r\n\t\t\t\t//log.debug(\"parameter value = \"+parameterValue);\r\n \t}\r\n \t}\r\n\t\treturn parameterValue;\r\n\t}", "public String getParameterValue(String key) {\n\t\treturn libraryParameter.get(key);\n\t}", "protected String getValueText(ParameterDescriptor parameter) {\n if (parameter.getValue() == null) {\n return getNullValueText();\n } else if (parameter.getType().equals(String.class)) {\n return getStringValueText(parameter.getValue());\n } else if (parameter.getType().equals(Boolean.class)) {\n return getBooleanValueText(parameter.getValue());\n } else {\n return parameter.getValue();\n }\n }", "public String get(String key) {\n\t\tInstant start = Instant.now();\n\t\tString value = getConfig(key);\n\t\tLOGGER.debug(\"Access to config {} to get {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn value;\n\t}", "public Object fetchSpecificFilterValue(String fieldName, FilterOperator operator) {\n if (fieldName == null || filter == null) {\n return null;\n }\n final List<Filter> list = filter.get(fieldName, operator);\n if (list == null || list.isEmpty()) {\n return null;\n }\n return list.get(0).getValue();\n }", "java.lang.String getProperty();", "String getProperty();", "String getProperty();", "String getProperty();", "public String get(Class requestor, String field, int type,\n String defaultString, Object param1);", "public Object getParameter(String name) {\n\t\tIterator itr = this.parameters.getInParameters().iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tParameterExtendedImpl param = ((ParameterExtendedImpl)itr.next());\n\t\t\t\n\t\t\tif(param.getName() != null && param.getName().equalsIgnoreCase(name)){\t\t\t\t\n\t\t\t\treturn param.value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "protected static String getWidgetParameter(String widgetId, String parameterName) {\n Dictionary dictionary = getWidgetParameters(widgetId);\n if (dictionary == null) {\n return null;\n }\n try {\n return dictionary.get(parameterName);\n } catch (java.util.MissingResourceException e) {\n return null;\n }\n }", "public double getParam(String paramName);", "String getProperty(String name, String defaultValue);", "protected abstract String getPropertyValue(Server instance);", "Object getProperty(String key);", "public String getParserParameterValue(String parameterName) {\n\t\tString result = null;\n\t\tif (GenericUtils.assertStringValue(parameterName)) {\n\t\t\tObject tmp = parserParamsProp.get(parameterName);\n\t\t\tresult = tmp == null ? null : tmp.toString();\n\t\t}\n\t\treturn result;\n\t}", "String getSettingByKey(String key, String defaultValue);", "<S> S getSetting(Setting<S> setting);", "java.lang.String getField1168();", "public String get(Class requestor, String field, String defaultString,\n Object param1, Object param2);", "public String readParameter(String simKey, String paramKey) {\n String query = \"\";\n String returnVal = null;\n try {\n query = \"SELECT param_value FROM simulation_parameters WHERE sim_key= '\" + simKey + \"' AND param_key ='\" +\n paramKey + \"'\";\n ResultSet rs = dbCon.executeQuery(query, this);\n\n if (rs.next()) {\n returnVal = rs.getString(\"param_value\");\n }\n rs.close();\n\n\n } catch (SQLException e) {\n System.err.println(\n this.getClass().getCanonicalName() + \" readParameters: SQL-Error during statement: \" + query);\n e.printStackTrace();\n }\n return returnVal;\n }", "protected int readConfigWord(int bus, int unit, int func, int offset) {\n if ((bus < 0) || (bus > 255)) {\n throw new IllegalArgumentException(\n \"Invalid bus value\");\n }\n if ((unit < 0) || (unit > 31)) {\n throw new IllegalArgumentException(\n \"Invalid unit value\");\n }\n if ((func < 0) || (func > 7)) {\n throw new IllegalArgumentException(\n \"Invalid func value\");\n }\n if ((offset < 0) || (offset > 255)) {\n throw new IllegalArgumentException(\n \"Invalid offset value\");\n }\n int address = 0x80000000 | (bus << 16) | (unit << 11) | (func << 8)\n | (offset & ~3);\n synchronized (CONFIG_LOCK) {\n pciConfigIO.outPortDword(PW32_CONFIG_ADDRESS, address);\n return pciConfigIO.inPortWord(PRW32_CONFIG_DATA + (offset & 2));\n }\n }", "String getValue(String type, String key);", "protected String getValue(String fieldName) {\r\n\t\treturn AuthenticatorHelper.getRequestHeader(request,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetProperty(fieldName));\r\n\t}", "String getParameter(HttpServletRequest request, String name) throws ValidationException;", "public static int getIntParam(String key, int dfault) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return dfault;\n }\n return cur.getInt(key, dfault);\n }", "protected int readConfigByte(int bus, int unit, int func, int offset) {\n if ((bus < 0) || (bus > 255)) {\n throw new IllegalArgumentException(\n \"Invalid bus value\");\n }\n if ((unit < 0) || (unit > 31)) {\n throw new IllegalArgumentException(\n \"Invalid unit value\");\n }\n if ((func < 0) || (func > 7)) {\n throw new IllegalArgumentException(\n \"Invalid func value\");\n }\n if ((offset < 0) || (offset > 255)) {\n throw new IllegalArgumentException(\n \"Invalid offset value\");\n }\n int address = 0x80000000 | (bus << 16) | (unit << 11) | (func << 8)\n | (offset & ~3);\n synchronized (CONFIG_LOCK) {\n pciConfigIO.outPortDword(PW32_CONFIG_ADDRESS, address);\n return pciConfigIO.inPortByte(PRW32_CONFIG_DATA + (offset & 3)) & 0xFF;\n }\n }", "public String getVal(String key) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n return kv.get().getCfgVal();\n }\n\n return null;\n }", "public String getParam(String name) {\n // For now, we ignore multiple instances of the same parameter (which is otherwise valid).\n // Also, this is O(n). If it ever becomes important, switch to HashMap<LinkedList>, though\n // order will be lost.\n\n for (NameValuePair pair : queryValues) {\n if (pair.name.equals(name)) {\n return pair.value;\n }\n }\n\n return null;\n }", "protected String getParameter() {\r\n return this.parameter;\r\n }", "public static PropertyInfo getProperty(Field field)\r\n {\r\n String mapKey = field.getProperty() != null ? field.getProperty() : field.getName();\r\n return PropertyInfo.OUR_PROPERTY_INFO_MAP.get(mapKey);\r\n }" ]
[ "0.62043947", "0.61641914", "0.6113447", "0.60360295", "0.5893968", "0.58883786", "0.58475536", "0.5785546", "0.57774603", "0.5754173", "0.57517976", "0.567835", "0.5656306", "0.5645214", "0.5577453", "0.5562489", "0.5560732", "0.5529046", "0.5510998", "0.5500271", "0.5487328", "0.5485453", "0.54848576", "0.5482039", "0.54776967", "0.5457239", "0.542261", "0.5419247", "0.54130626", "0.53885627", "0.53870106", "0.5368177", "0.5366355", "0.53473884", "0.5346524", "0.53317535", "0.5329409", "0.5318015", "0.53166", "0.5307948", "0.5307948", "0.5307948", "0.5306141", "0.5299499", "0.5292729", "0.5282118", "0.52724653", "0.5265266", "0.52603966", "0.52590805", "0.52547914", "0.5250509", "0.5246543", "0.52439004", "0.523123", "0.522238", "0.521286", "0.5212393", "0.52068645", "0.52068645", "0.52068645", "0.52068645", "0.52068645", "0.52068645", "0.5201413", "0.5197744", "0.51827806", "0.5175258", "0.5171643", "0.5168009", "0.5167722", "0.51672107", "0.5166775", "0.51644933", "0.51639885", "0.51639885", "0.51639885", "0.5160066", "0.5136593", "0.5133852", "0.5133151", "0.51319623", "0.5127784", "0.51267725", "0.51207954", "0.5114877", "0.51076543", "0.510113", "0.51010305", "0.5091523", "0.5089621", "0.5083835", "0.5081314", "0.50809723", "0.50802785", "0.5079997", "0.5078335", "0.50776297", "0.5077504", "0.50755954" ]
0.7052262
0
Returns configuration object with all configuration parameters for specified field from config file
HashMap<String,Object> getFieldConfig(String collectionName,String fieldName) { HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName); if (fields == null || !(fields instanceof HashMap<?,?>)|| !fields.containsKey(fieldName)) return null; return (HashMap<String,Object>)fields.get(fieldName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ParameterConfiguration getParameterConfiguration(String name);", "public String getConfigurationField() {\n return configField;\n }", "public FileConfiguration loadConfiguration(File file);", "private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathTool.getAbsolute(RELATIVE_FILE_PATH));\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t\t\t\t\n\t\t\t//optional, but recommended\n\t\t\t//read this - http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tSystem.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n\t NodeList nList = doc.getElementsByTagName(\"param\");\n\t params = new HashMap<>();\n\t for (int temp = 0; temp < nList.getLength(); temp++) {\n\t Node nodo = nList.item(temp);\n\t System.out.println(\"Elemento:\" + nodo.getNodeName());\n\t if (nodo.getNodeType() == Node.ELEMENT_NODE) {\n\t Element element = (Element) nodo;\n\t params.put(element.getAttribute(\"name\"), element.getAttribute(\"value\"));\n\t }\n\t }\n\t\t\t\n\t\t\t\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}", "Configuration getConfigByKey(String configKey);", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "public Parameters getConfigParameters();", "Map<String, Object> readConfig(Request request, String id);", "public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}", "public Config createConfig(String filename);", "ConfigBlock getConfig();", "public abstract Configuration configuration();", "public File getConfigurationFile();", "public String readConfiguration(String path);", "public Config getConfig();", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "private Configuration getConfig() {\n final Configuration config = new Configuration();\n for (final Field field : getClass().getDeclaredFields()) {\n try {\n final Field configField = Configuration.class.getDeclaredField(field.getName());\n field.setAccessible(true);\n configField.setAccessible(true);\n\n final Object value = field.get(this);\n if (value != null) {\n configField.set(config, value);\n getLog().debug(\"using \" + field.getName() + \" = \" + value);\n }\n } catch (final NoSuchFieldException nsfe) {\n // ignored\n } catch (final Exception e) {\n getLog().warn(\"can't initialize attribute \" + field.getName());\n }\n\n }\n if (containerProperties != null) {\n final Properties props = new Properties();\n props.putAll(containerProperties);\n config.setProperties(props);\n }\n if (forceJspDevelopment) {\n if (config.getProperties() == null) {\n config.setProperties(new Properties());\n }\n config.getProperties().put(\"tomee.jsp-development\", \"true\");\n }\n return config;\n }", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "public DatabaseConfig(String conf) throws InvalidConnectionDataException {\n if (conf == null) {\n throw new InvalidConnectionDataException();\n }\n\n HashMap<String, String> map = new HashMap<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(conf))) {\n stream.forEach(line -> addToMap(line, map));\n } catch (IOException e) {\n throw new InvalidConnectionDataException();\n }\n assignFields(map);\n validateFields();\n }", "public static FieldConfiguration getSimFieldConfig(final String _fieldName)\n {\n final Field field = new Field(0, \"\", _fieldName);\n final FieldConfiguration ret = new FieldConfiguration(0)\n {\n /** The Constant serialVersionUID. */\n private static final long serialVersionUID = 1L;\n\n @Override\n public Field getField()\n {\n return field;\n }\n };\n return ret;\n }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "GeneralConfiguration getGeneralConfiguration();", "public abstract CONFIG build();", "C getConfiguration();", "String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public void loadConfig(){\r\n File config = new File(\"config.ini\");\r\n if(config.exists()){\r\n try {\r\n Scanner confRead = new Scanner(config);\r\n \r\n while(confRead.hasNextLine()){\r\n String line = confRead.nextLine();\r\n if(line.indexOf('=')>0){\r\n String setting,value;\r\n setting = line.substring(0,line.indexOf('='));\r\n value = line.substring(line.indexOf('=')+1,line.length());\r\n \r\n //Perform the actual parameter check here\r\n if(setting.equals(\"romfile\")){\r\n boolean result;\r\n result = hc11_Helpers.loadBinary(new File(value.substring(value.indexOf(',')+1,value.length())),board,\r\n Integer.parseInt(value.substring(0,value.indexOf(',')),16));\r\n if(result)\r\n System.out.println(\"Loaded a rom file.\");\r\n else\r\n System.out.println(\"Error loading rom file.\");\r\n }\r\n }\r\n }\r\n confRead.close();\r\n } catch (FileNotFoundException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}", "public ConnectionConfiguration loadConnectionConfiguration(){\n\t\tConnectionConfiguration savedconfig = null;\n\t\ttry {\n\t\t FileInputStream propInFile = new FileInputStream( getConnConfigFile());\n\t\t Properties p = new Properties();\n\t\t p.load( propInFile );\n\n\t\t String server = p.getProperty(\"server\");\n\t\t String user = p.getProperty(\"user\");\n\t\t String passwd = p.getProperty(\"passwd\");\n\t\t \n\t\t if (server != null & user != null & passwd != null){\n\t\t\t savedconfig = new ConnectionConfiguration();\n\t\t\t savedconfig.setServer(server);\n\t\t\t savedconfig.setUser(user);\n\t\t\t savedconfig.setPasswd(passwd);\n\t\t }\n\t\t \n\t\t }\n\t\t catch ( FileNotFoundException e ) {\n\t\t //createConnectionConfigurationDialog(Resources.getString(\"msg_no_config_file\"));\n\t\t }\n\t\t catch ( IOException e ) {\n\t\t //createConnectionConfigurationDialog(Resources.getString(\"msg_config_file_not_readable\"));\n\t }\n\t\t return savedconfig; \n\t}", "boolean containsConfigurationField(String fieldName);", "public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.close();\r\n\t\t\t}catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}", "public T loadConfig(File file) throws IOException;", "public T getConfig() throws InvalidConfigFormatException {\n try {\n Reader settingsFile = new FileReader( getSettingsFileName() );\n T result = gsonObject.fromJson(settingsFile, settingsClass);\n settingsFile.close();\n\n return result;\n } catch (Exception e) {\n throw new InvalidConfigFormatException(\"Can't read config file: \" + e.getMessage() );\n }\n\n }", "@Override\n public Map<String, ConfiguredVariableItem> getConfiguration() {\n return config;\n }", "public void loadConfigurationFromDisk() {\r\n try {\r\n FileReader fr = new FileReader(CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\")) continue;\r\n if (line.equalsIgnoreCase(\"\")) continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n String aux;\r\n switch (str.nextToken().trim()) {\r\n case \"system.voidchain.protocol_version\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.protocolVersion = aux;\r\n continue;\r\n case \"system.voidchain.transaction.max_size\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.transactionMaxSize = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.block.num_transaction\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.numTransactionsInBlock = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.storage.data_file_extension\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.dataFileExtension = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.walletFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.data_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.dataDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.blockFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.walletFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.memory.block_megabytes\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.memoryUsedForBlocks = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.sync.block_sync_port\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockSyncPort = Integer.parseInt(aux);\r\n }\r\n continue;\r\n case \"system.voidchain.crypto.ec_param\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.ecParam = aux;\r\n continue;\r\n case \"system.voidchain.core.block_proposal_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockProposalTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n case \"system.voidchain.blockchain.chain_valid_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockchainValidTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n fr.close();\r\n rd.close();\r\n\r\n if (this.firstRun)\r\n this.firstRun = false;\r\n } catch (IOException e) {\r\n logger.error(\"Could not load configuration\", e);\r\n }\r\n }", "public ConfigProperties read(File fFile) throws GUIReaderException { \n if ( fFile == null || fFile.getName().trim().equalsIgnoreCase(\"\") ) /*no filename for input */\n {\n throw new GUIReaderException\n (\"No input filename specified\",GUIReaderException.EXCEPTION_NO_FILENAME);\n }\n else /* start reading from config file */\n {\n try{ \n URL url = fFile.toURI().toURL();\n \n Map global = new HashMap(); \n Map pm = loader(url, global);\n ConfigProperties cp = new ConfigProperties ();\n cp.setGlobal(global);\n cp.setProperty(pm);\n return cp;\n \n }catch(IOException e){\n throw new GUIReaderException(\"IO Exception during read\",GUIReaderException.EXCEPTION_IO);\n }\n }\n }", "private ConfigurationEntity getPartiallyLoadedConfigEntity() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\tString line;\n\t\ttry(BufferedReader br = new BufferedReader(new FileReader(new ClassPathResource(\"./static/config/config.json\").getFile()))) {\n\t\t\twhile((line = br.readLine())!=null) {\n\t\t\t\tbuilder.append(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new Gson().fromJson(builder.toString(), ConfigurationEntity.class);\n\t}", "public Config(String filename) {\n this.filename = filename;\n }", "Map<String, Object> readConfig(VirtualHost vhost, String id);", "public static Configuration createConfFromUserPayload(byte[] bb)\n throws IOException {\n Preconditions.checkNotNull(bb, \"Bytes must be specified\");\n DataInputBuffer dib = new DataInputBuffer();\n dib.reset(bb, 0, bb.length);\n Configuration conf = new Configuration(false);\n conf.readFields(dib);\n return conf;\n }", "protected Map<String, Object> getConfigurationParameters(){\n\t\treturn configurationParameters;\n\t}", "public void getConfigProperty() {\n Properties properties = new Properties();\n try(InputStream input = new FileInputStream(\"config.properties\");){\n properties.load(input);\n logger.info(\"BASE URL :\" + properties.getProperty(\"BASEURL\"));\n setBaseUrl(properties.getProperty(\"BASEURL\"));\n setLoginMode(properties.getProperty(\"LOGINMODE\"));\n setProjectId(properties.getProperty(\"PROJECTID\"));\n setReportId(properties.getProperty(\"REPORTID\"));\n if (!(properties.getProperty(\"PASSWORD\").trim().equals(\"\"))) {\n setPassword(properties.getProperty(\"PASSWORD\"));\n }\n if (!(properties.getProperty(\"USERNAME\").trim().equals(\"\"))) {\n setUserName(properties.getProperty(\"USERNAME\"));\n }\n }catch(IOException ex) {\n logger.debug(\"Failed to fetch value from configure file: \", ex);\n }\n\n }", "private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }", "public Config parseConfig() throws Exception {\n DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document document = documentBuilder.parse(new File(getFile(configFile)));\n\n return parseConfig(document);\n }", "EntityConfiguration getConfiguration();", "protected Configuration createConfiguration()\r\n/* 76: */ {\r\n/* 77:119 */ this.configuration_d.setNumOfIterations(Integer.parseInt(this.jTextField1.getText()));\r\n/* 78:120 */ this.configuration_d.setPopulationSize(Integer.parseInt(this.popSize_d.getText()));\r\n/* 79:121 */ ((GAConfiguration)this.configuration_d).setCrossoverThreshold(Double.valueOf(this.jTextField2.getText()).doubleValue());\r\n/* 80:122 */ ((GAConfiguration)this.configuration_d).setMutationThreshold(Double.valueOf(this.jTextField3.getText()).doubleValue());\r\n/* 81:123 */ ((GAConfiguration)this.configuration_d).setMethod((String)this.methodList_d.getSelectedItem());\r\n/* 82:124 */ return this.configuration_d;\r\n/* 83: */ }", "private static Configuration getConfigurationFromDb(int conf_id) {\n FrontEndDBInterface db = new FrontEndDBInterface();\n return db.getConfigInformation(conf_id);\n }", "public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "public Object\tgetConfiguration();", "public static DatabaseFieldConfig createFieldConfig(DatabaseType databaseType, Field field) throws SQLException {\n Annotation columnAnnotation = null;\n Annotation basicAnnotation = null;\n Annotation idAnnotation = null;\n Annotation generatedValueAnnotation = null;\n Annotation oneToOneAnnotation = null;\n Annotation manyToOneAnnotation = null;\n Annotation joinColumnAnnotation = null;\n Annotation enumeratedAnnotation = null;\n Annotation versionAnnotation = null;\n\n for (Annotation annotation : field.getAnnotations()) {\n Class<?> annotationClass = annotation.annotationType();\n if (annotationClass.getName().equals(\"javax.persistence.Column\")) {\n columnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Basic\")) {\n basicAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Id\")) {\n idAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.GeneratedValue\")) {\n generatedValueAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.OneToOne\")) {\n oneToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.ManyToOne\")) {\n manyToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.JoinColumn\")) {\n joinColumnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Enumerated\")) {\n enumeratedAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Version\")) {\n versionAnnotation = annotation;\n }\n }\n\n if (columnAnnotation == null && basicAnnotation == null && idAnnotation == null && oneToOneAnnotation == null\n && manyToOneAnnotation == null && enumeratedAnnotation == null && versionAnnotation == null) {\n return null;\n }\n\n DatabaseFieldConfig config = new DatabaseFieldConfig();\n String fieldName = field.getName();\n if (databaseType.isEntityNamesMustBeUpCase()) {\n fieldName = fieldName.toUpperCase();\n }\n config.setFieldName(fieldName);\n\n if (columnAnnotation != null) {\n try {\n Method method = columnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(columnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = columnAnnotation.getClass().getMethod(\"columnDefinition\");\n String columnDefinition = (String) method.invoke(columnAnnotation);\n if (columnDefinition != null && columnDefinition.length() > 0) {\n config.setColumnDefinition(columnDefinition);\n }\n method = columnAnnotation.getClass().getMethod(\"length\");\n config.setWidth((Integer) method.invoke(columnAnnotation));\n method = columnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(columnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = columnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(columnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @Column annotation for field \" + field, e);\n }\n }\n if (basicAnnotation != null) {\n try {\n Method method = basicAnnotation.getClass().getMethod(\"optional\");\n Boolean optional = (Boolean) method.invoke(basicAnnotation);\n if (optional == null) {\n config.setCanBeNull(true);\n } else {\n config.setCanBeNull(optional);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Basic annotation for field \" + field,\n e);\n }\n }\n if (idAnnotation != null) {\n if (generatedValueAnnotation == null) {\n config.setId(true);\n } else {\n // generatedValue only works if it is also an id according to {@link GeneratedValue)\n config.setGeneratedId(true);\n }\n }\n if (oneToOneAnnotation != null || manyToOneAnnotation != null) {\n // if we have a collection then make it a foreign collection\n if (Collection.class.isAssignableFrom(field.getType())\n || ForeignCollection.class.isAssignableFrom(field.getType())) {\n config.setForeignCollection(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setForeignCollectionColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"fetch\");\n Object fetchType = method.invoke(joinColumnAnnotation);\n if (fetchType != null && fetchType.toString().equals(\"EAGER\")) {\n config.setForeignCollectionEager(true);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n } else {\n // otherwise it is a foreign field\n config.setForeign(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(joinColumnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(joinColumnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n }\n }\n if (enumeratedAnnotation != null) {\n try {\n Method method = enumeratedAnnotation.getClass().getMethod(\"value\");\n Object typeValue = method.invoke(enumeratedAnnotation);\n if (typeValue != null && typeValue.toString().equals(\"STRING\")) {\n config.setDataType(DataType.ENUM_STRING);\n } else {\n config.setDataType(DataType.ENUM_INTEGER);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Enumerated annotation for field \"\n + field, e);\n }\n }\n if (versionAnnotation != null) {\n // just the presence of the version...\n config.setVersion(true);\n }\n if (config.getDataPersister() == null) {\n config.setDataPersister(DataPersisterManager.lookupForField(field));\n }\n config.setUseGetSet(DatabaseFieldConfig.findGetMethod(field, false) != null\n && DatabaseFieldConfig.findSetMethod(field, false) != null);\n return config;\n }", "public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }", "public C getConfig()\n {\n return config;\n }", "public void readConfigFile() throws IOException {\r\n Wini iniFileParser = new Wini(new File(configFile));\r\n\r\n databaseDialect = iniFileParser.get(DATABASESECTION, \"dialect\", String.class);\r\n databaseDriver = iniFileParser.get(DATABASESECTION, \"driver\", String.class);\r\n databaseUrl = iniFileParser.get(DATABASESECTION, \"url\", String.class);\r\n databaseUser = iniFileParser.get(DATABASESECTION, \"user\", String.class);\r\n databaseUserPassword = iniFileParser.get(DATABASESECTION, \"userPassword\", String.class);\r\n\r\n repositoryName = iniFileParser.get(REPOSITORYSECTION, \"name\", String.class);\r\n\r\n partitions = iniFileParser.get(DEFAULTSECTION, \"partitions\", Integer.class);\r\n logFilename = iniFileParser.get(DEFAULTSECTION, \"logFilename\", String.class);\r\n logLevel = iniFileParser.get(DEFAULTSECTION, \"logLevel\", String.class);\r\n\r\n maxNGramSize = iniFileParser.get(FEATURESSECTION, \"maxNGramSize\", Integer.class);\r\n maxNGramFieldSize = iniFileParser.get(FEATURESSECTION, \"maxNGramFieldSize\", Integer.class);\r\n String featureGroupsString = iniFileParser.get(FEATURESSECTION, \"featureGroups\", String.class);\r\n\r\n if ( databaseDialect == null )\r\n throw new IOException(\"Database dialect not found in config\");\r\n if ( databaseDriver == null )\r\n throw new IOException(\"Database driver not found in config\");\r\n if ( databaseUrl == null )\r\n throw new IOException(\"Database URL not found in config\");\r\n if ( databaseUser == null )\r\n throw new IOException(\"Database user not found in config\");\r\n if ( databaseUserPassword == null )\r\n throw new IOException(\"Database user password not found in config\");\r\n\r\n if (repositoryName == null)\r\n throw new IOException(\"Repository name not found in config\");\r\n\r\n if (partitions == null)\r\n partitions = 250;\r\n if ( logFilename == null )\r\n logFilename = \"FeatureExtractor.log\";\r\n if ( logLevel == null )\r\n logLevel = \"INFO\";\r\n\r\n if ( featureGroupsString != null ) {\r\n featureGroups = Arrays.asList(featureGroupsString.split(\"\\\\s*,\\\\s*\"));\r\n }\r\n if (maxNGramSize == null)\r\n maxNGramSize = 5;\r\n if (maxNGramFieldSize == null)\r\n maxNGramFieldSize = 500;\r\n\r\n }", "public FileConfiguration getConfig () {\n if (fileConfiguration == null) {\n this.reloadConfig();\n }\n return fileConfiguration;\n }", "static Configuration loadConfiguration(File pluginConfig) throws Exception {\n Properties props = new Properties();\n try (FileInputStream input = new FileInputStream(pluginConfig)) {\n props.load(input);\n }\n\n boolean trustAllHttps = BooleanUtils.toBoolean(props.getProperty(\"trust.all.https\", \"false\"));\n HttpClient client = new HttpClient(trustAllHttps);\n\n List<String> stageEndpoints = new ArrayList<>();\n List<String> agentEndpoints = new ArrayList<>();\n\n Enumeration<?> names = props.propertyNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n if (name.startsWith(\"stage.status.endpoint.\")) {\n stageEndpoints.add(props.getProperty(name));\n } else if (name.startsWith(\"agent.status.endpoint.\")) {\n agentEndpoints.add(props.getProperty(name));\n }\n }\n\n LOGGER.info(String.format(\"Loaded webhook configuration from %s\", pluginConfig.getAbsolutePath()));\n return new Configuration(client, stageEndpoints, agentEndpoints);\n }", "public Properties loadConfig(){\n\t\tprintln(\"Begin loadConfig \");\n\t\tProperties prop = null;\n\t\t prop = new Properties();\n\t\ttry {\n\t\t\t\n\t\t\tprop.load(new FileInputStream(APIConstant.configFullPath));\n\n\t } catch (Exception ex) {\n\t ex.printStackTrace();\n\t println(\"Exception \"+ex.toString());\n\t \n\t }\n\t\tprintln(\"End loadConfig \");\n\t\treturn prop;\n\t\t\n\t}", "private void ReadConfig()\n {\n try\n {\n Yaml yaml = new Yaml();\n\n BufferedReader reader = new BufferedReader(new FileReader(confFileName));\n\n yamlConfig = yaml.loadAll(reader);\n\n for (Object confEntry : yamlConfig)\n {\n //System.out.println(\"Configuration object type: \" + confEntry.getClass());\n\n Map<String, Object> confMap = (Map<String, Object>) confEntry;\n //System.out.println(\"conf contents: \" + confMap);\n\n\n for (String keyName : confMap.keySet())\n {\n //System.out.println(keyName + \" = \" + confMap.get(keyName).toString());\n\n switch (keyName)\n {\n case \"lineInclude\":\n\n for ( String key : ((Map<String, String>) confMap.get(keyName)).keySet())\n {\n lineFindReplace.put(key, ((Map<String, String>) confMap.get(keyName)).get(key).toString());\n }\n\n lineIncludePattern = ConvertToPattern(lineFindReplace.keySet().toString());\n\n break;\n case \"lineExclude\":\n lineExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileExclude\":\n fileExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileInclude\":\n fileIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirExclude\":\n dirExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirInclude\":\n dirIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"urlPattern\":\n urlPattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n }\n }\n }\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", confFileName);\n e.printStackTrace();\n }\n }", "private void parseConfigurations() {\n\t\ttry {\n\t\t\tJsonNode propertiesNode = rawConfig.getProperties();\n\t\t\t\n\t\t\tif(propertiesNode != null && propertiesNode.size() > 0) {\n\t\t\t\tBeanInfoWrapper wrapper = new BeanInfoWrapper(this.beanClazz);\n\t\t\t\tIterator<Map.Entry<String, JsonNode>> it = propertiesNode.fields();\n\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tMap.Entry<String, JsonNode> entry = it.next();\n\t\t\t\t\tString propName = entry.getKey();\n\t\t\t\t\tPropertyDescriptor propDesc = wrapper.getPropertyDesc(propName);\n\t\t\t\t\tif(propDesc == null) {\n\t\t\t\t\t\tthrow new ConfigException(\"Failed to found the property name='\" + propName + \", in class '\" + beanClazz + \"'\");\n\t\t\t\t\t}\n\t\t\t\t\tProperty prop = new Property(this.beanClazz, propDesc);\n\t\t\t\t\tValueNode valueNode = getNodeValue(prop.getType(), entry.getValue(), prop.getContentParamType(), prop.getKeyParamType());\n\t\t\t\t\t\n\t\t\t\t\tproperties.put(prop, valueNode);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getDestroyMethod())) {\n\t\t\t\tdestroyMethod = beanClazz.getMethod(rawConfig.getDestroyMethod());\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getInitMethod())) {\n\t\t\t\tinitMethod = beanClazz.getMethod( rawConfig.getInitMethod());\n\t\t\t}\n\t\t} catch (NoSuchMethodException e) {\n\t\t\tthrow new ConfigException(\"Failed to found the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t\t\n\t\t} catch (SecurityException e) {\n\t\t\tthrow new ConfigException(\"Failed to access the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t}\n\t\t\n\t}", "ConfigurationPackage getConfigurationPackage();", "public FileConfiguration getConfiguration() {\n return configuration;\n }", "public ReadConfigProperty() {\n\n\t\ttry {\n\t\t\tString filename = \"com/unitedcloud/resources/config.properties\";\n\t\t\tinput = ReadConfigProperty.class.getClassLoader().getResourceAsStream(filename);\n\t\t\tif (input == null) {\n\t\t\t\tSystem.out.println(\"Sorry, unable to find \" + filename);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Object getFieldConfigValue(String collectionName,String fieldName,String variable) {\n HashMap<String,Object> field = getFieldConfig(collectionName,fieldName);\n if (field == null) return null;\n return field.containsKey(variable) ? field.get(variable) : null;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private static FileBasedConfigurationBuilder<PropertiesConfiguration> propertiesFileBuilder(final String config) {\n final var propertiesParams = new Parameters()//\r\n .fileBased() //\r\n .setFile(new File(config + PROPERTIES_FILE_EXTENSION)) //\r\n .setListDelimiterHandler(new DefaultListDelimiterHandler(LIST_DELIMITER));\r\n return new FileBasedConfigurationBuilder<>(DEFAULT_CONFIGURATION_FILE_TYPE).configure(propertiesParams);\r\n }", "Collection<String> readConfigs();", "public String getConfiguration(){\n\t\treturn this.config;\n\t}", "private static Configuration getConfigurationFromDb(String conf_id) {\n FrontEndDBInterface f = new FrontEndDBInterface();\n Configuration config = f.getConfigInformation(Integer.parseInt(conf_id));\n return config;\n }", "public String getConfigurationValue(String name);", "public abstract String getConfig();", "Map<String, Object> exportConfiguration();", "public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}", "@Override\n public ConfigRepositoryConfig getConfigRepositoryConfig(){\n outObject = \"getConfigRepositoryConfig\";\n try {\n out.writeObject(outObject);\n } catch (IOException ex) {\n }\n try {\n inObject = (ConfigRepositoryConfig) in.readObject();\n } catch (IOException | ClassNotFoundException ex) {\n }\n return (ConfigRepositoryConfig) inObject;\n }", "@Override\n\tpublic Map<String, String> getConfigParams(IFloodlightModule module) {\n\t Map<String, String> retMap = configParams.get(module.getClass());\n\t if (retMap == null) {\n\t // Return an empty map if none exists so the module does not\n\t // need to null check the map\n\t retMap = new HashMap<String, String>();\n\t configParams.put(module.getClass(), retMap);\n\t }\n\n\t // also add any configuration parameters for superclasses, but\n\t // only if more specific configuration does not override it\n\t for (Class<? extends IFloodlightModule> c : configParams.keySet()) {\n\t if (c.isInstance(module)) {\n\t for (Map.Entry<String, String> ent : configParams.get(c).entrySet()) {\n\t if (!retMap.containsKey(ent.getKey())) {\n\t retMap.put(ent.getKey(), ent.getValue());\n\t }\n\t }\n\t }\n\t }\n\n\t return retMap;\n\t}", "public Config parseConfig(Document document) {\n Config.ConfigBuilder re = new Config.ConfigBuilder();\n\n NodeList configs = document.getElementsByTagName(PROPERTY);\n\n for (int i = 0; i < configs.getLength(); ++i) {\n Node node = configs.item(i);\n\n String name = ((Element) node).getElementsByTagName(NAME).item(0).getTextContent();\n String value = ((Element) node).getElementsByTagName(VALUE).item(0).getTextContent();\n\n switch (name) {\n case KEY_IP:\n re.setHostIp(value);\n break;\n case KEY_PORT:\n re.setHostPort(Integer.parseInt(value));\n break;\n }\n }\n\n return re.build();\n }", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "public PageBeanFieldConfiguration getAllFieldConfigurations(Long startAt, Integer maxResults, List<Long> id, Boolean isDefault) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"isDefault\", isDefault));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfiguration> returnType = new ParameterizedTypeReference<PageBeanFieldConfiguration>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public PageBeanFieldConfigurationItem getFieldConfigurationItems(Long id, Long startAt, Integer maxResults) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'id' is set\n if (id == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'id' when calling getFieldConfigurationItems\");\n }\n // create path and map variables\n final Map<String, Object> uriVariables = new HashMap<String, Object>();\n uriVariables.put(\"id\", id);\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration/{id}/fields\").buildAndExpand(uriVariables).toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public Object lookupConfigurationEntry(String key);", "@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "void configuration(String source, String name, String value);", "abstract public Config createConfig(String path);", "Map<String, String> getConfigProperties();", "abstract public Config createConfigFromString(String data);", "private Configuration searchConfigs(String propertyFile) throws ConfigurationException\n {\n return new PropertiesConfiguration(propertyFile);\n }", "public static void ReadConfig() throws IOException\r\n {\r\n ReadConfiguration read= new ReadConfiguration(\"settings/FabulousIngest.properties\");\r\n \t \r\n fedoraStub =read.getvalue(\"fedoraStub\");\r\n \t username = read.getvalue(\"fedoraUsername\");\r\n \t password =read.getvalue(\"fedoraPassword\");\r\n \t pidNamespace =read.getvalue(\"pidNamespace\");\r\n \t contentAltID=read.getvalue(\"contentAltID\");\r\n \t \r\n \t \r\n \t ingestFolderActive =read.getvalue(\"ingestFolderActive\");\r\n \t ingestFolderInActive =read.getvalue(\"ingestFolderInActive\");\r\n \t\r\n logFileNameInitial=read.getvalue(\"logFileNameInitial\");\r\n \r\n DataStreamID=read.getvalue(\"DataStreamID\");\r\n \t DataStreamLabel=read.getvalue(\"DataStreamLabel\");\r\n \r\n \r\n \r\n }", "RootConfig getConfig();", "public IProjectConfiguration getConfiguration()\n {\n return new ProjectConfiguration(mProject, mCheckConfigs, mFileSets, mFilters,\n mUseSimpleConfig);\n }", "public ReadConfig() \n\t{\n\t\tFile scr = new File(\"./Configuration/config.properties\"); //property file\n\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(scr); // READ the DATA (read mode)\n\t\t\tpro = new Properties(); // pro object\n\t\t\tpro.load(fis); // Load method -load at the \n\n\t\t} catch (final Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Except is \" + e.getMessage());\n\t\t} \n\t}", "private static void readConfigFile() {\n\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(getConfigFile()));\n String sLine = null;\n while ((sLine = input.readLine()) != null) {\n final String[] sTokens = sLine.split(\"=\");\n if (sTokens.length == 2) {\n m_Settings.put(sTokens[0], sTokens[1]);\n }\n }\n }\n catch (final FileNotFoundException e) {\n }\n catch (final IOException e) {\n }\n finally {\n try {\n if (input != null) {\n input.close();\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n\n }", "public Configuration parse() {\n final CommandLineParser parser = new BasicParser();\n final CommandLine cmd;\n\n try {\n cmd = parser.parse(options, args);\n\n if (cmd.hasOption(\"h\"))\n return help();\n\n if (cmd.hasOption(\"f\")) {\n return configurationFromFile(cmd.getOptionValue(\"f\"));\n } else if (cmd.hasOption(\"u\")) {\n return configurationFromUrl(cmd.getOptionValue(\"u\"));\n } else if (0 < args.length) {\n logback.warn(\"Unknown parameter: \" + args[0]);\n return help();\n } else {\n return configurationFromResource();\n }\n\n } catch (final ParseException e) {\n logback.error(\"Failed to parse command line properties\", e);\n return help();\n }\n }", "public PerWorldConfig getConfig(World world){\n \t\treturn config.get(world);\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}", "protected Config getConfig () {\n return this.conf;\n }", "private static HisPatientInfoConfiguration loadConfiguration(String filePath) throws HisServiceException{\n File file = new File(filePath);\n if(file != null && file.exists() && file.isFile() ) {\n try {\n configuration = new Yaml().loadAs(new FileInputStream(file), HisPatientInfoConfiguration.class);\n } catch(FileNotFoundException e) {\n log.error(e.getMessage());\n isOK = false;\n throw new HisServiceException(HisServerStatusEnum.NO_CONFIGURATION);\n }\n }\n else {\n isOK = false;\n }\n return configuration;\n }", "Properties readConfigurationAsProperties(String moduleName) throws Exception;", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "public ConfigCommon getConfig() {\n return config;\n }" ]
[ "0.6285341", "0.62183523", "0.61810076", "0.6166206", "0.60645235", "0.6046059", "0.6046059", "0.6046059", "0.6046059", "0.6018319", "0.6000509", "0.59938294", "0.5907342", "0.5875746", "0.58059883", "0.579685", "0.57943827", "0.5773684", "0.5771637", "0.5748405", "0.5747957", "0.57233685", "0.57224125", "0.57209057", "0.56934404", "0.56433314", "0.56385374", "0.56181204", "0.559395", "0.5589207", "0.55727863", "0.55702204", "0.5567935", "0.5526682", "0.5500791", "0.5498404", "0.54650915", "0.5464311", "0.5462832", "0.5460744", "0.5444032", "0.5412887", "0.5406571", "0.53898096", "0.53745615", "0.53674513", "0.5355366", "0.5334145", "0.53274447", "0.53243303", "0.5321463", "0.53014874", "0.52884173", "0.5285771", "0.5274144", "0.5272766", "0.5265043", "0.526337", "0.5260307", "0.5254349", "0.5253401", "0.52489454", "0.5248328", "0.52367383", "0.5228761", "0.5227162", "0.5227084", "0.5224556", "0.52206284", "0.5211763", "0.5210001", "0.5208206", "0.5204502", "0.51971805", "0.519089", "0.5180846", "0.51756006", "0.5175007", "0.5168338", "0.51664793", "0.5162969", "0.5159481", "0.515583", "0.51543236", "0.5151581", "0.51425904", "0.5141873", "0.51332736", "0.51293164", "0.51285785", "0.51270294", "0.5123934", "0.51203114", "0.5119982", "0.5114445", "0.5111701", "0.5109481", "0.51006263", "0.5098029", "0.50963616" ]
0.5096338
100
Method returns path of Collection configuration, related to fields of collection
HashMap<String,Object> getCollectionFieldsConfig(String collectionName) { HashMap<String,Object> collection = getCollectionConfig(collectionName); if (collection == null || !collection.containsKey("fields") || !(collection.get("fields") instanceof HashMap<?,?>)) return null; return (HashMap<String,Object>)collection.get("fields"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLogCollectionPath();", "String getCollection();", "java.lang.String getCollection();", "public java.lang.String getCollection() {\n return collection_;\n }", "Set<String> getCollectionFields(String collectionName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n Set<String> result = fields.keySet();\n // result.remove(getIdFieldName(collectionName));\n return result;\n }", "@AutoEscape\n\tpublic String getCollectionName();", "public String getCollectionClass ();", "Collection<? extends Object> getCollectionName();", "public String getCollectionName() {\n return collectionName;\n }", "public java.lang.String getCollection() {\n return instance.getCollection();\n }", "public void setCollectionName(String collectionName);", "public void setLogCollectionPath(String path);", "public static List<String> getEntityMappingFieldPaths(Class<?> dtoType, boolean lookingInner, boolean includeCollection) {\n List<String> fieldPaths = new ArrayList<>();\n List<Field> fields = ObjectUtils.getFields(dtoType, true);\n for (Field field : fields) {\n fieldPaths.addAll(getEntityMappingFieldPaths(field, lookingInner, includeCollection));\n }\n return fieldPaths.stream().distinct().collect(Collectors.toList());\n }", "public String getCollectionUrl() {\n\t\tString t = doc.get(\"url\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "@Override\n public String getFormatFunctionName(CollectionConfig collectionConfig) {\n return staticFunctionName(Name.from(collectionConfig.getEntityName(), \"path\"));\n }", "public String collectionId() {\n return collectionId;\n }", "public static List<String> getEntityMappingFieldPaths(Field field, boolean lookingInner, boolean includeCollection) {\n List<String> fieldPaths = new ArrayList<>();\n if (null != field) {\n String fieldPath = field.getName();\n MappingField mappingField = ObjectUtils.getAnnotation(field, MappingField.class);\n if (null != mappingField && !StringUtils.isEmpty(mappingField.entityField())) {\n fieldPath = mappingField.entityField();\n }\n\n Class<?> innerClass = MappingUtils.getFieldType(field);\n boolean isCollection = ObjectUtils.fieldIsCollection(field);\n // Case 1: Field is normal field >> get one entity mapping field has been configuration in MappingField annotation\n // Case 2: Field is another DTO field, lookingInner = true, includeCollection = true >> looking all field of DTO field\n // Case 3: Field is another DTO field, lookingInner = true, includeCollection = false >> only non Collection field will be looking to get mapping fields\n if (lookingInner && validate(innerClass) && (includeCollection || !isCollection)) {\n List<String> innerFieldPaths = getEntityMappingFieldPaths(innerClass, true, true);\n if (!CollectionUtils.isEmpty(innerFieldPaths)) {\n String finalFieldPath = fieldPath.concat(Constants.DOT);\n fieldPaths.addAll(innerFieldPaths.stream().map(finalFieldPath::concat).collect(Collectors.toList()));\n }\n } else if (includeCollection || !isCollection) {\n fieldPaths.add(fieldPath);\n }\n }\n return fieldPaths.stream().distinct().collect(Collectors.toList());\n }", "@Override\n\tpublic java.lang.String getCollectionName() {\n\t\treturn _dictData.getCollectionName();\n\t}", "public String getCollectionClass ()\n\t{\n\t\treturn getRelationshipImpl().getCollectionClass();\n\t}", "HashMap<String,Object> getCollectionConfig(String collectionName) {\n if (!this.collections.containsKey(collectionName)) return null;\n return (HashMap<String,Object>)collections.get(collectionName);\n }", "HashMap<String,Object> getFieldConfig(String collectionName,String fieldName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n if (fields == null || !(fields instanceof HashMap<?,?>)|| !fields.containsKey(fieldName)) return null;\n return (HashMap<String,Object>)fields.get(fieldName);\n }", "abstract public void setLogCollectionPath(String path);", "public com.google.protobuf.ByteString\n getCollectionBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(collection_);\n }", "@Nullable\n public static CollectionConfig createCollection(\n DiagCollector diagCollector, CollectionConfigProto collectionConfigProto) {\n String namePattern = collectionConfigProto.getNamePattern();\n PathTemplate nameTemplate;\n try {\n nameTemplate = PathTemplate.create(namePattern);\n } catch (ValidationException e) {\n diagCollector.addDiag(Diag.error(SimpleLocation.TOPLEVEL, e.getMessage()));\n return null;\n }\n String entityName = collectionConfigProto.getEntityName();\n return new CollectionConfig(namePattern, nameTemplate, entityName);\n }", "public static List<String> getEntityMappingFieldPathsPrimary(Class<?> dtoType, boolean includeCollection) {\n // Get primary key of Entity mapping with DTO\n List<String> entityKeyFields = EntityUtils.getPrimaryKey(getEntityType(dtoType));\n List<Field> fields = ObjectUtils.getFields(dtoType, true);\n // For each field of DTO, if field is another DTO then get also.\n for (Field field : fields) {\n Class<?> fieldType = MappingUtils.getFieldType(field);\n if (validate(fieldType) && (includeCollection || !ObjectUtils.fieldIsCollection(field))) {\n String fieldPath = getEntityMappingFieldPath(field);\n fieldPath = null != fieldPath ? fieldPath + Constants.DOT : Constants.EMPTY_STRING;\n List<String> innerKeyFieldPaths = getEntityMappingFieldPathsPrimary(fieldType, includeCollection)\n .stream().map(fieldPath::concat).collect(Collectors.toList());\n entityKeyFields.addAll(innerKeyFieldPaths);\n }\n }\n return entityKeyFields;\n }", "@Override\n\tpublic String getCollection() {\n\t\treturn null;\n\t}", "public List<String> getCollectionGroupDesignations() {\n return collectionGroupDesignations;\n }", "public static CollectionReference getCollection(){\n return FirebaseFirestore.getInstance().collection(COLLECTION_NAME) ;\n }", "public static String toPathPerElementCollection(String srcPath, boolean nodeModelSource) {\n\t\t\n\t\t//TODO MS rewrite to get freemarker variables back.\n\t\t\n\t\tif(nodeModelSource) {\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\n\t\t\tif(srcPath.startsWith(\"/\") && srcPath.length() > 0) {\n\t\t\t\tsrcPath = srcPath.substring(1);\n\t\t\t}\n\t\t\t\n\t\t\tString[] tokens = srcPath.split(\"/\");\n\t\t\tbuilder.append(\".vars[\\\"\").append(tokens[0]).append(\"\\\"]\");\n\t\t\tif(tokens.length > 1) {\n\t\t\t\tbuilder.append(\"[\\\"\");\n\t\t\t\tfor(int i = 1; i < tokens.length; i++) {\n\t\t\t\t\tif(i > 1) {\n\t\t\t\t\t\tbuilder.append(\"\\\"][\\\"\");\n\t\t\t\t\t}\n\t\t\t\t\tbuilder.append(tokens[i]);\n\t\t\t\t}\n\t\t\t\tbuilder.append(\"\\\"]\");\n\t\t\t}\n\t\t\t\n\t\t\treturn builder.toString();\n\t\t} else {\n\t\t\treturn srcPath;\n\t\t}\n\t}", "public static List<String> getEntityMappingFieldPathsCollection(Class<?> dtoType, boolean lookingInner) {\n List<String> fieldPaths = new ArrayList<>();\n List<Field> fields = ObjectUtils.getFields(dtoType, true);\n for (Field field : fields) {\n if (validate(MappingUtils.getFieldType(field)) && ObjectUtils.fieldIsCollection(field)) {\n fieldPaths.addAll(getEntityMappingFieldPaths(field, lookingInner, true));\n }\n }\n return fieldPaths;\n }", "@Override\n\tpublic long getChangesetCollectionId() {\n\t\treturn _changesetEntry.getChangesetCollectionId();\n\t}", "public Path getCatalogPath() {\n return getRef().catalogPath;\n }", "public Builder setCollection(\n java.lang.String value) {\n copyOnWrite();\n instance.setCollection(value);\n return this;\n }", "public String getConfigurationField() {\n return configField;\n }", "boolean hasCollectionName();", "public String getCollectionsString() {\n\t\treturn getSetString();\n\t}", "public MethodLinkBuilderFactory<GamesCollectionThymeleafController> getCollectionLink() {\n return collectionLink;\n }", "String getIdFieldName(String collectionName) {\n HashMap<String,Object> collection = getCollectionConfig(collectionName);\n if (collection == null || !collection.containsKey(\"idField\")) return null;\n String indexField = collection.get(\"idField\").toString();\n if (!collection.containsKey(\"fields\")) return null;\n HashMap<String,Object> fields = (HashMap<String,Object>)collection.get(\"fields\");\n if (!fields.containsKey(indexField)) return null;\n return indexField;\n }", "public String getCollectionGroupDesignation() {\n return collectionGroupDesignation;\n }", "public com.google.protobuf.ByteString\n getCollectionBytes() {\n return instance.getCollectionBytes();\n }", "@Nonnull\n @Override\n public FeatureType getCollectionFeatureType() {\n return collectionFeatureType;\n }", "public String getCollectionName() {\n\t\tint fin = this.queryInfos.getInputSaadaTable().indexOf(\"(\");\n\t\tif (fin == -1) {\n\t\t\tfin = this.queryInfos.getInputSaadaTable().indexOf(\"]\");\n\t\t}\n\t\tif (fin == -1) {\n\t\t\tfin = this.queryInfos.getInputSaadaTable().length() - 1;\n\t\t}\n\t\tif (this.queryInfos.getInputSaadaTable().startsWith(\"[\")) {\n\t\t\treturn this.queryInfos.getInputSaadaTable().substring(1, fin);\n\t\t} else {\n\t\t\treturn this.queryInfos.getInputSaadaTable().substring(0, fin);\n\t\t}\n\t}", "public String getLogCollectionPrefix();", "public String getOutputKeyCollectionName() {\r\n return OutputKeyCollectionName;\r\n }", "public String getPathToDefinitionFiles() {\n\treturn msPathToDefinitionFiles;\n }", "Class<? extends Collection> getCollectionClass();", "public static List<String> getEntityMappingFieldPathsCollection(Class<?> dtoType) {\n return getEntityMappingFieldPathsCollection(dtoType, false);\n }", "public abstract ArrayList<CustomPath> getAnnotationPathList();", "public String getPropertyPath();", "public String getPropertyPath();", "CollectionReferenceElement createCollectionReferenceElement();", "void addCollectionName(Object newCollectionName);", "public abstract List<String> path();", "public DeleteCollectionNamespacedConfiguration fieldSelector(String fieldSelector) {\n put(\"fieldSelector\", fieldSelector);\n return this;\n }", "public ArrayList<String> getPath() {\n return list;\n }", "@Override\n\tprotected String method() {\n\t\treturn \"getPublishCollections\";\n\t}", "public String getLogCollectionUploadServerUrl();", "com.google.protobuf.ByteString\n getCollectionBytes();", "@Classpath\n @InputFiles\n public FileCollection getClasspath() {\n return _classpath;\n }", "CollectionResource createCollectionResource();", "public abstract String getConfigElementName();", "public DefinitionPath getPath() {\n\t\treturn path;\n\t}", "@Override\n\t@XmlTransient\n\tpublic Path getPath() {\n\t\treturn path;\n\t}", "boolean isValidFieldConfig(String collectionName,String fieldName) {\n if (getFieldConfigValue(collectionName,fieldName,\"name\")==null) return false;\n if (getFieldConfigValue(collectionName,fieldName,\"type\")==null) return false;\n return true;\n }", "public Collection<String> getPaths() {\n // Only return paths of valid configurations\n Set<String> paths = new HashSet<String>();\n for (Map.Entry<String, CachedConfig> entry : confs.entrySet()) {\n if (entry.getValue().state == ConfigState.OK) {\n paths.add(entry.getKey());\n }\n }\n return paths;\n }", "DataCollectionInfo getInfo();", "public Collection getCollection() {\n return mCollection;\n }", "public static CollectionPOJODescriptor generateDescriptor (List<MongoElement> elements) {\n CollectionPOJODescriptorGenerator generator = new CollectionPOJODescriptorGenerator(elements);\n CollectionPOJODescriptor descriptor = new CollectionPOJODescriptor();\n\n elements.forEach(consumer -> {\n ++descriptor.totalPropertyCounter;\n // init the root properties\n if (consumer.parent.equals(\"root\")) {\n descriptor.rootElementNames.add(consumer);\n ++descriptor.rootPropertyCounter;\n }\n\n // init he the nested documents\n if (consumer.type == DocumentTypes.NESTED_DOCUMENT) {\n descriptor.nestedDocuments.put(consumer, generator.elementsUnder(consumer.parent+\".\"+consumer.name));\n } else if (consumer.type == DocumentTypes.DOC_ARRAY) {\n descriptor.nestedArrays.put(consumer, generator.arraysUnder(consumer.parent+\".\"+consumer.name));\n }\n\n\n });\n\n return descriptor;\n }", "private String getPropertyCatalog() {\n return this.property;\n }", "protected String path() {\n return path(getName());\n }", "public Collection getGeneralization()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{\n \t\tCollection col = new ArrayList();\n \t\tcol = instance.getGeneralization(this.refMofId());\n \t\t\n \t\treturn col; \t\t\n \t}\n \n \treturn super_getGeneralization();\n }", "public abstract String getConfigurationFolderKey();", "private Path getClasspath() {\n return getRef().classpath;\n }", "abstract public List<S> getPath();", "StoreCollection getOrCreateCollection( String name);", "private static String getCollectionArgument(Map<String, Entity> entitiesMap, FieldType fieldType) {\r\n if (!fieldType.getTypeArguments().isEmpty()) {\r\n return fieldType.getTypeArguments()\r\n .stream()\r\n .map(FieldType::transformName)\r\n .filter(entitiesMap::containsKey)\r\n .findFirst()\r\n .orElse(fieldType.getTypeArguments().get(0));\r\n } else {\r\n return fieldType.getName();\r\n }\r\n }", "JPACollectionAttribute getCollectionAttribute(final String externalName) throws ODataJPAModelException;", "protected final String collectionString(final Collection c) {\n assert c != null;\n String result = \"{\"; //$NON-NLS-1$\n for (Iterator i = c.iterator(); i.hasNext();) {\n Object item = i.next();\n result = result + item.getClass().getName()\n + \"@\" + item.hashCode(); //$NON-NLS-1$\n if (i.hasNext()) {\n result = result + \", \"; //$NON-NLS-1$\n }\n }\n result = result + \"}\"; //$NON-NLS-1$\n return result;\n }", "public CustomPath getPath() {\n\t\treturn path;\n\t}", "public String getPath() {\n switch(this) {\n case USER: return \"users\";\n case GROUP: return \"groups\";\n case CLIENT: return \"clients\";\n case IDP: return \"identity-provider-settings\";\n case REALM_ROLE: return \"realms\";\n case CLIENT_ROLE: return \"clients\";\n default: return \"\";\n }\n }", "public String getPropertyDACConfig();", "@Override\n public List<OptionsPanel.PathItem> getPath() {\n ArrayList<OptionsPanel.PathItem> path = new ArrayList<>();\n path.add(new PathItem(\"apperance\", \"\"));\n path.add(new PathItem(\"colors\", resourceBundle.getString(\"options.Path.0\")));\n return path;\n }", "public ArrayList<ArrayList<String>> getPathList() {\r\n\t\treturn pathList;\r\n\t}", "public com.google.protobuf.ProtocolStringList\n getPathList() {\n return path_;\n }", "@Override\n public Expression<?> getExpression(CriteriaBuilder cb) {\n return path;\n }", "public String path() {\n return this.path;\n }", "public String path() {\n return this.path;\n }", "public String getSubcollectionInfo () throws SDLIPException {\r\n XMLObject subcolInfo = new sdlip.xml.dom.XMLObject();\r\n tm.getSubcollectionInfo(subcolInfo);\r\n// return postProcess (subcolInfo, \"subcolInfo\", false);\r\n return subcolInfo.getString();\r\n }", "Collection<String> readConfigs();", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic static <T> Path<Object> getPathFromField(Root<T> root, String field) {\n\t\tString[] fieldname = field.split(\"/\");\n\t\tPath<Object> path = null;\n\t\tfor (int idx = 0; idx < fieldname.length; idx++) {\n\n\t\t\tString attributeName = fieldname[idx];\n\n\t\t\tif (path != null) {\n\t\t\t\tpath = path.get(attributeName);\n\t\t\t} else {\n\t\t\t\tpath = root.get(attributeName);\n\t\t\t}\n\n\t\t\tif ((fieldname.length - 1) > idx) {\n\n\t\t\t\tif (path.getJavaType().isAssignableFrom(Set.class)) {\n\n\t\t\t\t\tOptional<Join<T, ?>> opJoin = root.getJoins().stream().filter(p -> p.getAttribute().getName().equals(attributeName))\n\t\t\t\t\t\t\t.findFirst();\n\t\t\t\t\tJoin<T, ?> join = opJoin.orElseGet(() -> root.join(attributeName));\n\t\t\t\t\tpath = join.get(fieldname[++idx]);\n\n\t\t\t\t}\n\n\t\t\t\tif (path.getJavaType().isAssignableFrom(Map.class)) {\n\n\t\t\t\t\tOptional<Join<T, ?>> opJoin = root.getJoins().stream().filter(p -> p.getAttribute().getName().equals(attributeName))\n\t\t\t\t\t\t\t.findFirst();\n\t\t\t\t\tMapJoin join = (MapJoin) opJoin.orElseGet(() -> root.join(attributeName));\n\t\t\t\t\tString f = fieldname[++idx];\n\t\t\t\t\tif (f.equals(\"key\"))\n\t\t\t\t\t\tpath = join.key();\n\t\t\t\t\telse if (f.equals(\"value\"))\n\t\t\t\t\t\tpath = join.value();\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new FormatExceptionException(\"Only key or value you can specify in a map filter, got: \" + f);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn path;\n\t}", "public String getPath(){\n\t\t\treturn this.path;\n\t\t}", "public com.google.protobuf.ProtocolStringList\n getPathList() {\n return path_.getUnmodifiableView();\n }", "public String path() {\n\treturn path;\n }", "public String getSearchForConfigElements()\n {\n return searchForConfigElements;\n }", "@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }", "@Override\r\n public MetadataDescriptor getReferenceDescriptor() {\r\n if (isDirectEmbeddableCollection()) {\r\n return getEmbeddableAccessor().getDescriptor();\r\n } else {\r\n return super.getReferenceDescriptor();\r\n }\r\n }", "String getPath() {\r\n\t\treturn path;\r\n\t}", "public String getPath(){\r\n\t\treturn path;\r\n\t}", "private Object findByNameProperty(String key, Collection collection) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException {\n for (Object candidate : collection) {\n Object candidateName = getProperty(candidate, \"name\");\n if (candidateName != null && key.equals(candidateName.toString())) {\n return candidate;\n }\n }\n return null;\n }", "public Path getPath(){\n return this.path;\n }" ]
[ "0.6349473", "0.63092613", "0.6258524", "0.61345965", "0.60372245", "0.6023729", "0.591983", "0.59140253", "0.5913551", "0.5902763", "0.56759524", "0.5648603", "0.56396616", "0.5629482", "0.55905294", "0.5580353", "0.5577809", "0.55503", "0.5469832", "0.5463266", "0.5422139", "0.5420109", "0.5395272", "0.53585386", "0.53260434", "0.52791864", "0.5277542", "0.52649796", "0.5264098", "0.52634096", "0.5261763", "0.52351856", "0.5185261", "0.5175769", "0.51681274", "0.5162733", "0.51547813", "0.51214135", "0.51097184", "0.5100911", "0.5077617", "0.50648224", "0.5059385", "0.5039916", "0.5026189", "0.4972138", "0.49596167", "0.49349296", "0.49054804", "0.49054804", "0.49045122", "0.4871483", "0.48584047", "0.48523033", "0.48474434", "0.48443165", "0.48409843", "0.48397574", "0.48359305", "0.48295233", "0.4828716", "0.48157555", "0.4813598", "0.4797558", "0.47911584", "0.47858277", "0.47795105", "0.4779054", "0.4757357", "0.47523007", "0.47517836", "0.47416508", "0.47385812", "0.4736497", "0.4726082", "0.47154108", "0.47137427", "0.47034666", "0.46992162", "0.46782407", "0.46781465", "0.46755722", "0.46750185", "0.46669918", "0.46653512", "0.46617737", "0.46617737", "0.46594885", "0.46582407", "0.46392152", "0.46311957", "0.46308357", "0.46261474", "0.4625976", "0.4614055", "0.4612399", "0.46088263", "0.45990744", "0.45987576", "0.45954448" ]
0.60095906
6
Method returns list of field names in collection
Set<String> getCollectionFields(String collectionName) { HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName); Set<String> result = fields.keySet(); // result.remove(getIdFieldName(collectionName)); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getFieldNames()\n {\n return this.fieldMap.keyArray(String.class);\n }", "public String[] getFieldNames();", "public Set<String> getFieldNames ()\n\t{\n\t\treturn m_Fields.keySet();\n\t}", "List<Field> getFields();", "public Set<String> getFieldNames() {\n Set<String> names = new HashSet<String>();\n for (IdentifierProperties field : fields) {\n names.add(field.getName());\n }\n\n return names;\n }", "java.util.List<Field>\n getFieldsList();", "java.lang.String getFields();", "public static synchronized List getFieldNames()\n {\n if (fieldNames == null)\n {\n fieldNames = new ArrayList();\n fieldNames.add(\"NewsletterId\");\n fieldNames.add(\"NewsletterCode\");\n fieldNames.add(\"Status\");\n fieldNames.add(\"Priority\");\n fieldNames.add(\"IssuedDate\");\n fieldNames.add(\"ClosedDate\");\n fieldNames.add(\"SentTime\");\n fieldNames.add(\"EmailFormat\");\n fieldNames.add(\"LanguageId\");\n fieldNames.add(\"CustomerCatId\");\n fieldNames.add(\"CustomerType\");\n fieldNames.add(\"CustLanguageId\");\n fieldNames.add(\"CustCountryId\");\n fieldNames.add(\"RelDocument\");\n fieldNames.add(\"RelDocStatus\");\n fieldNames.add(\"RelProjectId\");\n fieldNames.add(\"RelProductId\");\n fieldNames.add(\"ProjectId\");\n fieldNames.add(\"ProductId\");\n fieldNames.add(\"Subject\");\n fieldNames.add(\"Body\");\n fieldNames.add(\"Notes\");\n fieldNames.add(\"Created\");\n fieldNames.add(\"Modified\");\n fieldNames.add(\"CreatedBy\");\n fieldNames.add(\"ModifiedBy\");\n fieldNames = Collections.unmodifiableList(fieldNames);\n }\n return fieldNames;\n }", "abstract public FieldNames getFieldNames();", "public List<String> getSelectFields() {\n List<String> selectField = new ArrayList<>();\n for (SelectItem item : queryBody.getSelect().getSelectItems()) {\n if (item instanceof SingleColumn) {\n Expression expression = ((SingleColumn)item).getExpression();\n if (expression instanceof Identifier) {\n selectField.add(((Identifier)expression).getValue());\n }\n\n }\n }\n return selectField;\n }", "public List<String> getIndexedFields() {\n\t\t\tList<String> indexedFields = new ArrayList<>();\n\t\t\t\n\t\t\tindexedFields.add(field);\n\t\t\tindexedFields.add(field + \".folded\");\n\t\t\t\n\t\t\treturn indexedFields;\n\t\t}", "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 ArrayList<GOlrField> getFields() {\n\n ArrayList<GOlrField> collection = new ArrayList<GOlrField>();\n\n // Plonk them all in to our bookkeeping.\n for (GOlrField field : unique_fields.values()) {\n collection.add(field);\n }\n\n return collection;\n }", "java.util.List<com.sagas.meta.model.MetaFieldData> \n getFieldsList();", "public List<String> getFields() {\n if (!Strings.isNullOrEmpty(fields)) {\n return Arrays.asList(fields.split(\",\"));\n } else {\n return Collections.emptyList();\n }\n }", "@Override\n public java.util.List<Field> getFieldsList() {\n return fields_;\n }", "public Enumeration getFields()\n {\n ensureLoaded();\n return m_tblField.elements();\n }", "public Field[] getKeyFields();", "public EAdList<EAdField<?>> getFields() {\r\n\t\treturn fields;\r\n\t}", "public String[] getKeyNames() \n {\n DBField f[] = this.getKeyFields();\n String kn[] = new String[f.length];\n for (int i = 0; i < f.length; i++) {\n kn[i] = f[i].getName();\n }\n return kn;\n }", "private String getFields()\n\t{\n\t\tString fields = \"(\";\n\t\t\n\t\tfor(int spot = 0; spot < fieldList.size(); spot++)\n\t\t{\n\t\t\tfields += \"`\" + fieldList.get(spot).getName() + \"`\";\n\t\t\tif(spot == fieldList.size()-1)\n\t\t\t{\n\t\t\t\tfields += \")\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfields += \", \";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn fields;\n\t}", "public List<String> retornaFields() {\n\t\treturn data.retornaFields();\n\t}", "public static final\n List<String> ccListAllFieldName(Class<?> pxClass, Class<?>pxFieldType){\n \n //-- check in\n if(pxClass==null){return null;}\n \n //-- retrieve\n Field[] lpDesField = pxClass.getDeclaredFields();\n if(lpDesField==null){return null;}\n if(lpDesField.length==0){return null;}\n \n //-- filtering\n List<String> lpRes=new LinkedList<String>();\n for(Field it:lpDesField){\n if(it==null){continue;}\n if(pxFieldType==null){continue;}\n if(it.getType().equals(pxFieldType)){\n lpRes.add(it.getName());\n }//+++\n }//..~\n \n return lpRes;\n \n }", "protected Vector collectFields() {\n Vector fields = new Vector(1);\n fields.addElement(this.getField());\n return fields;\n }", "public String getFields() {\n return fields;\n }", "private String[] getNameParts() {\n return field.getName().split(\"_\");\n }", "public Set<String> getFieldApiNames() {\n return fieldDescribe.keySet();\n }", "java.util.List<java.lang.String>\n getProbeFieldsList();", "List<Pair<String, Value>> fields();", "private String[] getDefinedFields(ObjectSet<?> pObjectSet) {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> fieldsList = new ArrayList<String>();\r\n\t\t\r\n\t\tif (pObjectSet != null) {\r\n\t\t\tif (pObjectSet.getDataMappings().size() > 0) {\r\n\t\t\t\tfor(DataMapping mapping : pObjectSet.getDataMappings()) {\r\n\t\t\t\t\tif (!mapping.virtual && !mapping.IsCollection) {\r\n\t\t\t\t\t\tif (mapping.DataBaseDataType != Entity.DATATYPE_ENTITY) {\r\n\t\t\t\t\t\t\tfieldsList.add(mapping.DataBaseFieldName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (fieldsList.size() > 0) {\r\n\t\t\treturnedValue = fieldsList.toArray(new String[fieldsList.size()]);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "@SimpleFunction(description = \"Get the fields in the projects as a list\")\n public YailList GetFieldsList() {\n ArrayList<String> fieldsList = new ArrayList<String>();\n for (RProjectField j : fields) {\n fieldsList.add(j.name);\n }\n return YailList.makeList(fieldsList);\n }", "synchronized public Set<String> getFields() {\n return Collections.unmodifiableSet(new HashSet<>(fields));\n }", "@Override\n\tpublic List<String> listSearchableFields() {\n\t\tList<String> listSearchableFields = new ArrayList<String>();\n\t\tlistSearchableFields.addAll(super.listSearchableFields());\n\n\t\tlistSearchableFields.add(\"firstName\");\n\n\t\tlistSearchableFields.add(\"lastName\");\n\n\t\tlistSearchableFields.add(\"contactDetails.phone\");\n\n\t\tlistSearchableFields.add(\"contactDetails.secondaryPhone\");\n\n\t\tlistSearchableFields.add(\"contactDetails.city\");\n\n\t\treturn listSearchableFields;\n\t}", "public List<Field<T>> getFields()\r\n/* 63: */ {\r\n/* 64:84 */ return this.fields;\r\n/* 65: */ }", "public java.util.List<Field> getFieldsList() {\n if (fieldsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(fields_);\n } else {\n return fieldsBuilder_.getMessageList();\n }\n }", "public ImmutableList<String> getMemberNames() {\n return members.stream().map(m -> m.getName()).collect(ImmutableList.toImmutableList());\n }", "Collection<String> names();", "Fields fields();", "public List<AliasedField> getFields() {\r\n return fields;\r\n }", "ISourceField[] getFields();", "java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList();", "public Vector getFieldLabels() {\n\treturn _vcFieldLabels;\n }", "public FieldDeclaration[] getFields() {\n return m_classBuilder.getFields();\n }", "public String[] getCustomFields(String collectionId) {\r\n String[] toReturn = new String[0];\r\n if (null == collectionId || 0 == collectionId.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"item_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"custom_field_list\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0461\", \"getting list of custom fields wasn't successful: coll_id=\" + collectionId);\r\n } else {\r\n wrapError(\"APIL_0461\", \"getting list of custom fields wasn't successful: coll_id=\" + collectionId);\r\n }\r\n } else {\r\n toReturn = StringTool.stringToArray(response.getValue(\"fields\"), ITEM_DELIMITER);\r\n }\r\n return toReturn;\r\n }", "List<FieldNode> getFields() {\n return this.classNode.fields;\n }", "public String getSearchFields(Class<?>[] cs){\r\n\t\tStringBuffer fields=new StringBuffer();\r\n\t\tSet<String> list=new HashSet<String>();\r\n\t\tfor (Class<?> c:cs){\r\n\t\t\tList<java.lang.reflect.Field> map = ReflectUtil.getFieldMap(c);\r\n\t\t\tfor (java.lang.reflect.Field fld: map) {\r\n\t\t\t\tString name=getFieldName(fld);\r\n\t\t\t\tif (name==null) continue;\r\n\t\t\t\tif ((fld.getModifiers()&128)!=0) continue; //transient\r\n\t\t\t\tif (!list.contains(name)) list.add(name);\r\n\t\t\t}\r\n\t\t\t//System.out.println(\"SEARCHFIELD c=\"+c.getName()+\" fields=\"+list);\r\n\t\t}\r\n\t\tfor (String s:list){\r\n\t\t\tif (fields.length()>0) fields.append(\",\");\r\n\t\t\tfields.append(s);\r\n\t\t}\r\n\t\t\r\n\t\treturn fields.toString();\r\n\t}", "public DBField[] getFields()\n {\n // Note: this method is called frequently\n if (!this.fieldArrayReady) {\n // optimize access to field array\n synchronized (this.fieldMap) {\n if (!this.fieldArrayReady) { // test again inside lock\n this.fieldArray = this.fieldMap.valueArray(DBField.class);\n this.fieldArrayReady = true;\n }\n }\n } \n return this.fieldArray;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic List getFields(){\n\t\treturn targetClass.fields;\n\t}", "public Map<String, String> getFields() {\n return fields;\n }", "public static String[] getBasicFields() {\n\t\t\tList<String> basicFields = new ArrayList<>();\n\t\t\t\n\t\t\tfor(SearchField field : SearchField.values()) {\n\t\t\t\tbasicFields.add(field.field + \".basic\");\n\t\t\t}\n\t\t\t\n\t\t\treturn basicFields.toArray(new String[basicFields.size()]);\n\t\t}", "public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}", "private List getMappingFieldsInternal() {\n if (fields == null) {\n fields = new ArrayList();\n }\n\n return fields;\n }", "public Set<FieldInfo> getKeyFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_keys);\n }", "public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}", "Stream<String> listCollectionNames();", "public java.util.List<Field.Builder>\n getFieldsBuilderList() {\n return getFieldsFieldBuilder().getBuilderList();\n }", "@Override\r\n\tpublic List<String> listSearchableFields() {\r\n\t\tList<String> listSearchableFields = new ArrayList<String>();\r\n\t\tlistSearchableFields.addAll(super.listSearchableFields());\r\n\r\n\t\tlistSearchableFields.add(\"employeeNumber\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.primaryPhone\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.secondaryPhone\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.streetAddress\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.city\");\r\n\r\n\t\tlistSearchableFields.add(\"contactDetails.zip\");\r\n\r\n\t\treturn listSearchableFields;\r\n\t}", "public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }", "protected SqlExpression getFieldsSqlExpression() {\n\t\tSqlCollectionExpression fields = new SqlCollectionExpression();\n\t\t\n\t\tCollection variables = new HashSet(this.variableToDatabaseMapping.values());\t\t\n\t\tIterator i = variables.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tfields.add(new SqlStringExpression((String) i.next()));\n\t\t}\n\t\treturn fields;\n\t}", "public MappingField[] getMappingFields() {\n List myFields = getMappingFieldsInternal();\n return (MappingField[]) myFields.toArray(\n new MappingField[myFields.size()]);\n }", "public abstract Set<ResolvedFieldDeclaration> getDeclaredFields();", "java.util.List<? extends com.sagas.meta.model.MetaFieldDataOrBuilder> \n getFieldsOrBuilderList();", "public String[] getFieldNameMapping() {\r\n return null;\r\n }", "public String getFieldName();", "public static List<String> getAllFieldsForGraphQL(ParseService parseService) {\n return parseService\n .getUserAgentAnalyzer()\n .getAllPossibleFieldNamesSorted()\n // Avoiding this error:\n // \"__SyntaxError__\" in \"AnalysisResult\" must not begin with \"__\", which is reserved by GraphQL introspection.\n // The field \"__SyntaxError__\" is handled separately.\n .stream()\n .filter(name -> !name.startsWith(\"__\"))\n .toList();\n }", "public Iterator<String> fieldIterator() { return flds_lu.keySet().iterator(); }", "public String getDatabaseFields() {\n\t\tSqlExpression expr = this.getFieldsSqlExpression();\n\t\treturn expr != null ? expr.toSqlString() : \"\";\n\t}", "private List<Field> getFields() {\n try {\n List<Field> fields = ResultSetUtil.getFields(databaseName, tableName, resultSets.get(0));\n if(fields.size() != MergeFactory.MAX_QUERY_FIELD_SIZE){\n throw new SqlParserException(\"the query fields max be equals \" + MergeFactory.MAX_QUERY_FIELD_SIZE);\n }\n return fields;\n } catch (SQLException e) {\n LOG.error(\"merge resultSet error\",e);\n throw new MergeException(\"merge resultSet error\" , e);\n }\n }", "@Override\n\tpublic List<Field> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}", "public ArrayList<String> getNames(){\r\n \t\tArrayList<String> names = new ArrayList<String>();\r\n \t\tfor (Enumeration<Tag> temp = tags.elements(); temp.hasMoreElements();) \r\n \t\t\tnames.add(temp.nextElement().getName());\r\n \t\treturn names;\r\n \t}", "public StringPair[] getSortedFields() {\n return m_classBuilder.getSortedFields();\n }", "public String[] listObjectNames();", "@Override\n\tpublic List<String> listSearchableFields() {\n\t\tList<String> listSearchableFields = new ArrayList<String>();\n\t\tlistSearchableFields.addAll(super.listSearchableFields());\n\n\t\tlistSearchableFields.add(\"comment\");\n\n\t\treturn listSearchableFields;\n\t}", "Field getFields(int index);", "public List<String> get_field_from_table(String table, String field, String order);", "@Override\n public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n return fields_;\n }", "public com.google.protobuf.ProtocolStringList\n getProbeFieldsList() {\n return probeFields_.getUnmodifiableView();\n }", "public static List<String> fieldsIn(Class<?> class1) {\n List<String> strings = new LinkedList<String>();\n for (Field f : class1.getDeclaredFields()) {\n try {\n strings.add(f.getName() + \" = \" + f.get(null));\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n return strings;\n }", "public List<String> getFieldVector (String field, KrillCollection collection) {\n collection.setIndex(this);\n \n List fieldValues = new ArrayList<String>();\n String fieldValue;\n\n // Do not return fieldValues for token fields\n if (field.equals(\"tokens\") || field.equals(\"base\")) {\n return fieldValues;\n };\n\n \n try {\n final Filter filter = collection.toFilter();\n\n // Get from filtered index\n if (filter != null) {\n \n // Iterate over all atomic readers and collect occurrences\n for (LeafReaderContext atomic : this.reader().leaves()) {\n\n LeafReader lreader = atomic.reader();\n\n DocIdSet docids = filter.getDocIdSet(atomic, null);\n \n DocIdSetIterator docs = (docids == null) ? null : docids.iterator();\n\n if (docs == null)\n continue;\n \n while (docs.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {\n fieldValue = lreader.document(docs.docID()).get(field);\n if (fieldValue != null && fieldValue != \"\")\n fieldValues.add(fieldValue);\n };\n \n }\n } else { // Get from unfiltered index\n\n // Iterate over all atomic readers and collect occurrences\n for (LeafReaderContext atomic : this.reader().leaves()) {\n\n LeafReader lreader = atomic.reader();\n Bits live = lreader.getLiveDocs();\n\n for (int i=0; i<lreader.maxDoc(); i++) {\n if (live != null && !live.get(i))\n continue;\n \n Document doc = lreader.document(i);\n fieldValue = doc.get(field);\n if (fieldValue != null && fieldValue != \"\")\n fieldValues.add(fieldValue);\n };\n };\n };\n }\n\n // Something went wrong\n catch (IOException e) {\n log.warn(e.getLocalizedMessage());\n\t\t}\n\n // E.g. reference corpus not found\n catch (QueryException e) {\n log.warn(e.getLocalizedMessage());\n };\n\n return fieldValues;\n }", "public List<MathVarDec> getFields() {\n return fields;\n }", "public java.lang.String[] getMappingFieldsArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(MAPPINGFIELDS$28, targetList);\n java.lang.String[] result = new java.lang.String[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();\n return result;\n }\n }", "public List<Field> iterateThroughAllFields() {\n\n List<Field> listOfFields = new ArrayList<Field>(fields.length * fields.length);\n // TODO: n**m complexity\n for (int i = 0; i < this.fields.length; i++) {\n for (int j = 0; j < this.fields.length; j++) {\n listOfFields.add(this.fields[i][j]);\n }\n }\n return listOfFields;\n }", "private String[] findTagDataFields () {\n List<String> fieldVals = Util.newList();\n for (Field f : getClass().getFields()) {\n if (f.getName().startsWith(\"TAG_\")) { // grab TAG field\n try {\n fieldVals.add((String)f.get(this));\n } catch (IllegalArgumentException e) { // ignore\n } catch (IllegalAccessException e) { // ignore\n }\n }\n }\n return fieldVals.toArray(new String[0]);\n }", "public static String[] getFieldNames(DBField flds[])\n {\n if (ListTools.isEmpty(flds)) {\n return new String[0];\n } else {\n String fldNames[] = new String[flds.length];\n for (int i = 0; i < flds.length; i++) {\n fldNames[i] = (flds[i] != null)? flds[i].getName() : \"\";\n }\n return fldNames;\n }\n }", "String getFieldName();", "public DBField[] getKeyFields()\n {\n return this.priKeys; // should never be null\n }", "public String getName(){\n return field.getName();\n }", "java.util.List<String> getRepeatedStringFieldList();", "public static Set<String> getCollectionNames(Connection c) throws SQLException {\r\n\t\tSet<String> collections = new HashSet<String>();\r\n\t\tif (tableExists(c, FC_TABLE_NAME)){\r\n\t\t\tStatement s = c.createStatement();\r\n\t\t\tResultSet rs = s.executeQuery(\"select \"+quote(FC_NAME_FIELD.name)+\" from \"+quote(FC_TABLE_NAME));\r\n\t\t\twhile(rs.next())\r\n\t\t\t\tcollections.add(rs.getString(FC_NAME_FIELD.name));\r\n\t\t\ts.close();\r\n\t\t}\r\n\t\t\r\n\t\treturn collections;\r\n\t}", "public ImmutableList<String> getVariableNames() {\n return members.stream().map(m -> m.getShortName()).collect(ImmutableList.toImmutableList());\n }", "public String[] getAllFilledAnnotationFields();", "public DBField[] getFields(Set<String> fieldNames)\n {\n if (ListTools.isEmpty(fieldNames)) {\n return this.getFields();\n } else {\n java.util.List<DBField> fldList = new Vector<DBField>();\n synchronized (this.fieldMap) {\n for (DBField dbf : this.fieldMap.values()) {\n String n = dbf.getName(); // this.getMappedFieldName(name); <== should this be used here?\n if (fieldNames.contains(n)) {\n fldList.add(dbf);\n }\n }\n } \n return fldList.toArray(new DBField[fldList.size()]);\n }\n }", "public List<FieldObject> getFieldObjects() {\n return _fieldObjects;\n }", "public ArrayList<String> getColumnNames();", "public Map<Field, String> getAuditableFields();", "public Set<Field> getFields() {\r\n \t\t// We will only consider private fields in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredFields(), source.getFields());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getFields());\r\n \t}", "public final static ArrayList<BasicKeyedField> getRecordTypes() {\n \tArrayList<BasicKeyedField> ret = new ArrayList<BasicKeyedField>();\n \tBasicKeyedField fld;\n\n \tfor (int i = 0; i < names.length && ! \"\".equals(names[i]); i++) {\n \t\t\tfld = new BasicKeyedField();\n\t\t\tfld.key = keys[i];\n\t\t\tfld.name = names[i];\n\t\t\tret.add(fld);\n \t}\n\n \treturn ret;\n }", "public Vector<Object> getFieldContents(String fieldname) {\r\n\t\treturn getFieldContents(fieldname, false);\r\n\t}", "public abstract List<String> requiredFields();" ]
[ "0.8045571", "0.7896012", "0.78136486", "0.7663972", "0.7532381", "0.7492775", "0.7369449", "0.7345632", "0.733289", "0.72494537", "0.72340214", "0.7086578", "0.7053476", "0.70257276", "0.6952192", "0.69404733", "0.685739", "0.6853742", "0.68361735", "0.6819713", "0.6803975", "0.6789233", "0.6715893", "0.67112285", "0.6671718", "0.6647228", "0.6644941", "0.66372526", "0.6616557", "0.66141", "0.6556122", "0.654318", "0.65219545", "0.65147257", "0.6507381", "0.6496827", "0.6458829", "0.6357693", "0.634944", "0.6347867", "0.6333344", "0.633047", "0.63214207", "0.6320851", "0.63030165", "0.62856567", "0.62836707", "0.6282058", "0.62725127", "0.626904", "0.62556446", "0.6232922", "0.62326926", "0.6232663", "0.623236", "0.6231277", "0.6220487", "0.6209885", "0.62098646", "0.61974996", "0.6193231", "0.61875707", "0.61681044", "0.6138872", "0.6110881", "0.609937", "0.60985845", "0.60871536", "0.6081414", "0.6080319", "0.6075964", "0.6070087", "0.60686857", "0.6056726", "0.60520095", "0.60491914", "0.604741", "0.6043337", "0.6038825", "0.60271776", "0.6015126", "0.60097045", "0.6003504", "0.59778786", "0.59750956", "0.59701794", "0.5968801", "0.5966248", "0.59554106", "0.59552264", "0.5931945", "0.591249", "0.59068453", "0.59012175", "0.5897199", "0.5889309", "0.58876693", "0.5884832", "0.58813566", "0.5875748" ]
0.7187188
11
Returns configuration object for specified collection, which includes configuration for whole collection and for each field inside it
HashMap<String,Object> getCollectionConfig(String collectionName) { if (!this.collections.containsKey(collectionName)) return null; return (HashMap<String,Object>)collections.get(collectionName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HashMap<String,Object> getCollectionFieldsConfig(String collectionName) {\n HashMap<String,Object> collection = getCollectionConfig(collectionName);\n if (collection == null || !collection.containsKey(\"fields\") ||\n !(collection.get(\"fields\") instanceof HashMap<?,?>)) return null;\n return (HashMap<String,Object>)collection.get(\"fields\");\n }", "HashMap<String,Object> getFieldConfig(String collectionName,String fieldName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n if (fields == null || !(fields instanceof HashMap<?,?>)|| !fields.containsKey(fieldName)) return null;\n return (HashMap<String,Object>)fields.get(fieldName);\n }", "public PageBeanFieldConfiguration getAllFieldConfigurations(Long startAt, Integer maxResults, List<Long> id, Boolean isDefault) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"isDefault\", isDefault));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfiguration> returnType = new ParameterizedTypeReference<PageBeanFieldConfiguration>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "Set<String> getCollectionFields(String collectionName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n Set<String> result = fields.keySet();\n // result.remove(getIdFieldName(collectionName));\n return result;\n }", "@Nullable\n public static CollectionConfig createCollection(\n DiagCollector diagCollector, CollectionConfigProto collectionConfigProto) {\n String namePattern = collectionConfigProto.getNamePattern();\n PathTemplate nameTemplate;\n try {\n nameTemplate = PathTemplate.create(namePattern);\n } catch (ValidationException e) {\n diagCollector.addDiag(Diag.error(SimpleLocation.TOPLEVEL, e.getMessage()));\n return null;\n }\n String entityName = collectionConfigProto.getEntityName();\n return new CollectionConfig(namePattern, nameTemplate, entityName);\n }", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "public ComplexConfigDTO() {\n \t\tlistProperties = new HashMap<String, ConfigListDTO>();\n \t\tsimpleProperties = new HashMap<String, ConfigSimpleValueDTO>();\n \t\tsetProperties = new HashMap<String, ConfigSetDTO>();\n \t\tmapProperties = new HashMap<String, ConfigMapDTO>();\n \t\tcomplexProperties = new HashMap<String, ComplexConfigDTO>();\n \t}", "public Collection<Configuration> findAll() {\n\t\treturn this.configurationRepository.findAll();\n\t}", "private Configuration getConfig() {\n final Configuration config = new Configuration();\n for (final Field field : getClass().getDeclaredFields()) {\n try {\n final Field configField = Configuration.class.getDeclaredField(field.getName());\n field.setAccessible(true);\n configField.setAccessible(true);\n\n final Object value = field.get(this);\n if (value != null) {\n configField.set(config, value);\n getLog().debug(\"using \" + field.getName() + \" = \" + value);\n }\n } catch (final NoSuchFieldException nsfe) {\n // ignored\n } catch (final Exception e) {\n getLog().warn(\"can't initialize attribute \" + field.getName());\n }\n\n }\n if (containerProperties != null) {\n final Properties props = new Properties();\n props.putAll(containerProperties);\n config.setProperties(props);\n }\n if (forceJspDevelopment) {\n if (config.getProperties() == null) {\n config.setProperties(new Properties());\n }\n config.getProperties().put(\"tomee.jsp-development\", \"true\");\n }\n return config;\n }", "public PageBeanFieldConfigurationItem getFieldConfigurationItems(Long id, Long startAt, Integer maxResults) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'id' is set\n if (id == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'id' when calling getFieldConfigurationItems\");\n }\n // create path and map variables\n final Map<String, Object> uriVariables = new HashMap<String, Object>();\n uriVariables.put(\"id\", id);\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration/{id}/fields\").buildAndExpand(uriVariables).toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "java.lang.String getCollection();", "String getCollection();", "public BusinessObjectFormatDdlCollectionResponse generateBusinessObjectFormatDdlCollection(\n BusinessObjectFormatDdlCollectionRequest businessObjectFormatDdlCollectionRequest);", "public Builder members(Supplier<? extends Collection> collection) {\n return members(collection.get());\n }", "public String getCollectionClass ();", "public List<ConfigurationInner> configurations() {\n return this.innerProperties() == null ? null : this.innerProperties().configurations();\n }", "@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}", "public java.lang.String getCollection() {\n return collection_;\n }", "Collection<String> readConfigs();", "protected T getConfigurationByCascading() {\n\t\t\n\t\tList<T> configurationObjectList = new ArrayList<T>();\n\t\t\n\t\t// Add the configuration objects in the order they should override \n\t\t// each other. Command line options override property file information\n\t\t// which in turn override any default configuration objects that may\n\t\t// have been given.\n\t\t//\n\t\tconfigurationObjectList.add (getConfigurationByCommandline());\n\t\tconfigurationObjectList.addAll (getConfigurationByProperties(this.propertyFile));\n\t\tconfigurationObjectList.addAll (configurationObjects);\n\t\t\n\t\tInvocationHandler handler = new ConfigurationByCascading<T>(configurationObjectList);\n\n\t\t@SuppressWarnings(\"unchecked\")\t\t\n\t\tT configuration = (T)\n\t\t\tjava.lang.reflect.Proxy.newProxyInstance(\n\t\t\t\tthis.configurationInterface.getClassLoader(),\n\t\t\t\tnew Class[] { this.configurationInterface },\n\t\t\t\thandler\n\t\t);\n\n\t\treturn configuration;\n\t}", "public List<Configuration> getAll();", "public ArrayList<Configuration> getConfigurations(){\n return configurations;\n }", "public static CollectionPOJODescriptor generateDescriptor (List<MongoElement> elements) {\n CollectionPOJODescriptorGenerator generator = new CollectionPOJODescriptorGenerator(elements);\n CollectionPOJODescriptor descriptor = new CollectionPOJODescriptor();\n\n elements.forEach(consumer -> {\n ++descriptor.totalPropertyCounter;\n // init the root properties\n if (consumer.parent.equals(\"root\")) {\n descriptor.rootElementNames.add(consumer);\n ++descriptor.rootPropertyCounter;\n }\n\n // init he the nested documents\n if (consumer.type == DocumentTypes.NESTED_DOCUMENT) {\n descriptor.nestedDocuments.put(consumer, generator.elementsUnder(consumer.parent+\".\"+consumer.name));\n } else if (consumer.type == DocumentTypes.DOC_ARRAY) {\n descriptor.nestedArrays.put(consumer, generator.arraysUnder(consumer.parent+\".\"+consumer.name));\n }\n\n\n });\n\n return descriptor;\n }", "private static List<IConfigElement> getConfigElements()\n {\n\n List<IConfigElement> configElements = new ArrayList<IConfigElement>();\n\n if (ConfigReference.getInstance().isLoaded())\n {\n\n IConfigElement generalConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(Configuration.CATEGORY_GENERAL));\n IConfigElement blockConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(ConfigReference.CATEGORY_BLOCKIDS));\n\n while (generalConfigs.getChildElements().iterator().hasNext())\n {\n Object config = generalConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n\n while (blockConfigs.getChildElements().iterator().hasNext())\n {\n Object config = blockConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n }\n else\n {\n LogHelper.error(\"Attempted to retrieve config information from an unloaded config file.\");\n }\n \n return configElements;\n }", "public void setCollectionName(String collectionName);", "public com.google.protobuf.ByteString\n getCollectionBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(collection_);\n }", "public Vector getConfigurations() {\n return getConfigurations(DEFAULT_DB_CONFIG_TABLE);\n }", "public java.lang.String getCollection() {\n return instance.getCollection();\n }", "public List<ATNConfig> elements() { return configs; }", "interface WithEncryptionSettingsCollection {\n /**\n * Specifies the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk\n * Encryption, can contain multiple encryption settings per disk or snapshot..\n *\n * @param encryptionSettingsCollection Encryption settings collection used be Azure Disk Encryption, can\n * contain multiple encryption settings per disk or snapshot.\n * @return the next definition stage.\n */\n Update withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);\n }", "Class<? extends CollectionPersister> getCollectionPersisterClass(Collection metadata);", "public String getConfigurationField() {\n return configField;\n }", "protected Collection createCollectionMatchingType(MappingContext mappingContext) {\n Class<?> collectionType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (collectionType.isAssignableFrom(ArrayList.class)) {\n return new ArrayList();\n } else if (collectionType.isAssignableFrom(LinkedHashSet.class)) {\n return new LinkedHashSet();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported collection type '\" + collectionType + \"'\");\n }\n }", "public abstract Configuration configuration();", "boolean isValidFieldConfig(String collectionName,String fieldName) {\n if (getFieldConfigValue(collectionName,fieldName,\"name\")==null) return false;\n if (getFieldConfigValue(collectionName,fieldName,\"type\")==null) return false;\n return true;\n }", "public CollectionType _mapAbstractCollectionType(JavaType type, DeserializationConfig config) {\n Class<?> collectionClass = (Class) _collectionFallbacks.get(type.getRawClass().getName());\n if (collectionClass == null) {\n return null;\n }\n return (CollectionType) config.constructSpecializedType(type, collectionClass);\n }", "ConfigurationEntity loadFullConfigurations() {\n\n\t\tConfigurationEntity config;\n\t\tconfig = getPartiallyLoadedConfigEntity();\n\t\tconfig.setCanvasLayout(getCanvasLayoutMatrix());\n\t\treturn config\n\t}", "public PageBeanFieldConfigurationScheme getAllFieldConfigurationSchemes(Long startAt, Integer maxResults, List<Long> id) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationScheme> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationScheme>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "interface WithEncryptionSettingsCollection {\n /**\n * Specifies the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk\n * Encryption, can contain multiple encryption settings per disk or snapshot..\n *\n * @param encryptionSettingsCollection Encryption settings collection used be Azure Disk Encryption, can\n * contain multiple encryption settings per disk or snapshot.\n * @return the next definition stage.\n */\n WithCreate withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);\n }", "private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }", "private ProjectionConfig getProjectionConfig() {\n return (ProjectionConfig) getProjection();\n }", "@SafeVarargs\n public static <T> PojoCodecProvider.Builder getProviderBuilder(Class<T> collectionType, Class<? extends T> defaultType, Class<? extends T>... additionalDiscriminatedTypes){\n PojoCodecProvider.Builder provider = PojoCodecProvider.builder()\n .conventions(CONVENTIONS)\n .register(buildClassInsteadOfDefault(defaultType,collectionType))\n .register(buildAsNullValueDiscriminatorConstructor(defaultType));\n for(Class<? extends T> clazz:additionalDiscriminatedTypes){\n provider.register(buildWithDiscriminator(clazz));\n }\n return provider;\n }", "private HarvestedCollectionRest parseHarvestedCollectionRest(Context context,\n HttpServletRequest request,\n Collection collection) throws SQLException {\n ObjectMapper mapper = new ObjectMapper();\n HarvestedCollectionRest harvestedCollectionRest;\n\n try {\n ServletInputStream input = request.getInputStream();\n harvestedCollectionRest = mapper.readValue(input, HarvestedCollectionRest.class);\n } catch (IOException e) {\n throw new UnprocessableEntityException(\"Error parsing request body: \" + e.toString(), e);\n }\n\n return harvestedCollectionRest;\n }", "List<Map<String,Object>> getConfigList(Request request, String configtype);", "private List<Object> serializeActualCollectionMembers(AbstractPersistentCollection collection)\r\n\t{\r\n\t\tList<Object> result = new ArrayList<Object>();\r\n\t\tif (!collection.wasInitialized())\r\n\t\t{\r\n\t\t\tcollection.forceInitialization();\r\n\t\t}\r\n\t\tIterator<Object> itr = collection.entries(null);\r\n\t\twhile (itr.hasNext())\r\n\t\t{\r\n\t\t\tObject next = itr.next();\r\n\t\t\tObject newObj = serialize(next);\r\n\t\t\tresult.add(newObj);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "EncryptionSettingsCollection encryptionSettingsCollection();", "Object getFieldConfigValue(String collectionName,String fieldName,String variable) {\n HashMap<String,Object> field = getFieldConfig(collectionName,fieldName);\n if (field == null) return null;\n return field.containsKey(variable) ? field.get(variable) : null;\n }", "RecordDataSchema getCollectionCustomMetadataSchema();", "public ConfigurationSet getGeneralConfiguration() {\r\n\t\treturn configuration;\r\n\t}", "public C getConfig()\n {\n return config;\n }", "public HarvestedCollectionRest update(Context context,\n HttpServletRequest request,\n Collection collection) throws SQLException {\n HarvestedCollectionRest harvestedCollectionRest = parseHarvestedCollectionRest(context, request, collection);\n HarvestedCollection harvestedCollection = harvestedCollectionService.find(context, collection);\n\n // Delete harvestedCollectionService object if harvest type is not set\n if (harvestedCollectionRest.getHarvestType() == HarvestTypeEnum.NONE.getValue()\n && harvestedCollection != null) {\n harvestedCollectionService.delete(context, harvestedCollection);\n return harvestedCollectionConverter.convert(null, utils.obtainProjection());\n\n } else if (harvestedCollectionRest.getHarvestType() != HarvestTypeEnum.NONE.getValue()) {\n List<String> errors = testHarvestSettings(harvestedCollectionRest);\n\n if (errors.size() == 0) {\n if (harvestedCollection == null) {\n harvestedCollection = harvestedCollectionService.create(context, collection);\n }\n\n updateCollectionHarvestSettings(context, harvestedCollection, harvestedCollectionRest);\n harvestedCollection = harvestedCollectionService.find(context, collection);\n List<Map<String,String>> configs = OAIHarvester.getAvailableMetadataFormats();\n\n return harvestedCollectionConverter.fromModel(harvestedCollection, collection, configs,\n utils.obtainProjection());\n } else {\n throw new UnprocessableEntityException(\n \"Incorrect harvest settings in request. The following errors were found: \" + errors.toString()\n );\n }\n }\n return null;\n }", "public interface CollectionRecord {\n\n\t/**\n\t * Gets the id attribute of the CollectionRecord object\n\t *\n\t * @return The id value\n\t */\n\tpublic String getId();\n\n\n\t/**\n\t * Gets the setSpec attribute of the CollectionRecord object\n\t *\n\t * @return The setSpec value\n\t */\n\tpublic String getSetSpec();\n\n\n\t/**\n\t * Gets the metadataHandle attribute of the CollectionRecord object\n\t *\n\t * @param collectionSetSpec setSpec (e.g., \"dcc\")\n\t * @return The metadataHandle value\n\t * @exception Exception if there is a webservice error\n\t */\n\tpublic String getMetadataHandle(String collectionSetSpec) throws Exception;\n\n\n\t/**\n\t * Gets the handleServiceBaseUrl attribute of the CollectionRecord object\n\t *\n\t * @return The handleServiceBaseUrl value\n\t */\n\tpublic String getHandleServiceBaseUrl();\n\n\t/* \tpublic String getNativeFormat();\n\tpublic DcsDataRecord getDcsDataRecord();\n\tpublic MetaDataFramework getMetaDataFramework();\n\tpublic Document getLocalizedDocument(); */\n}", "public Configuration getCfg() {\n return cfg;\n }", "public Configs getConfig() {\n boolean[] $jacocoInit = $jacocoInit();\n int defaultPerLineCount = Type.FOLLOW_STORE.getDefaultPerLineCount();\n Type type = Type.FOLLOW_STORE;\n $jacocoInit[1] = true;\n Configs configs = new Configs(this, defaultPerLineCount, type.isFixedPerLineCount());\n $jacocoInit[2] = true;\n return configs;\n }", "public java.util.List<Configuration> getConfigurations() {\n if (configurations == null) {\n configurations = new com.amazonaws.internal.ListWithAutoConstructFlag<Configuration>();\n configurations.setAutoConstruct(true);\n }\n return configurations;\n }", "Map<String, Object> exportConfiguration();", "StoreCollection getOrCreateCollection( String name);", "Class<? extends Collection> getCollectionClass();", "public PageBeanFieldConfigurationSchemeProjects getFieldConfigurationSchemeProjectMapping(List<Long> projectId, Long startAt, Integer maxResults) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'projectId' is set\n if (projectId == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'projectId' when calling getFieldConfigurationSchemeProjectMapping\");\n }\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme/project\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"projectId\", projectId));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationSchemeProjects> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationSchemeProjects>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public ComponentListConfig getConfig() {\n return CONFIG;\n }", "public Configuration c() {\n return configuration;\n }", "public void init(String collectionName) {\n\r\n }", "protected abstract Collection createCollection();", "public ComplexConfigDTO flatCopy() {\n \t\tfinal ComplexConfigDTO config = new ComplexConfigDTO();\n \t\tconfig.setPropertyType(getPropertyType());\n \t\tconfig.setPropertyName(getPropertyName());\n \t\tconfig.setDefiningScopePath(getDefiningScopePath());\n \t\tconfig.setPolymorph(isPolymorph());\n \t\tconfig.setVersion(getVersion());\n \t\tconfig.setParentVersion(getParentVersion());\n \t\tconfig.setParentScopeName(getParentScopeName());\n \t\tconfig.setClassVersion(getClassVersion());\n \t\tconfig.setNulled(isNulled());\n \t\treturn config;\n \t}", "public interface MongoRepositoryConfiguration\n extends\n SingleRepositoryConfigInformation<SimpleMongoRepositoryConfiguration> {\n\n String getMongoTemplateRef();\n \n String getMappingContextRef();\n }", "public CollectionMetadata metadata() {\n return metadata;\n }", "Map<String, List<String>> getElementBaseConfigurationOptions();", "public JsonDeserializer<?> _findCustomCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException {\n for (Deserializers d : this._factoryConfig.deserializers()) {\n JsonDeserializer<?> deser = d.findCollectionDeserializer(type, config, beanDesc, elementTypeDeserializer, elementDeserializer);\n if (deser != null) {\n return deser;\n }\n }\n return null;\n }", "public Collection getCollection() {\n return mCollection;\n }", "public interface MongoRepositoryConfiguration extends\n\t\t\tSingleRepositoryConfigInformation<SimpleMongoRepositoryConfiguration> {\n\n\t\tString getMongoTemplateRef();\n\n\t\tboolean getCreateQueryIndexes();\n\t}", "public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}", "GeneralConfiguration getGeneralConfiguration();", "public void createCollection(IndexBenchmark.Setup setup, String collectionName, String configsetName) throws Exception {\n\t try (HttpSolrClient hsc = createClient()) {\n\t\t Create create;\n\t\t if (setup.replicationFactor != null) {\n\t\t\t create = Create.createCollection(collectionName, configsetName, setup.shards, setup.replicationFactor);\n\t\t\t create.setMaxShardsPerNode(setup.shards*(setup.replicationFactor));\n\t\t } else {\n\t\t\t create = Create.createCollection(collectionName, configsetName, setup.shards,\n\t\t\t\t\t setup.nrtReplicas, setup.tlogReplicas, setup.pullReplicas);\n\t\t\t create.setMaxShardsPerNode(setup.shards\n\t\t\t\t\t * ((setup.pullReplicas==null? 0: setup.pullReplicas)\n\t\t\t\t\t + (setup.nrtReplicas==null? 0: setup.nrtReplicas)\n\t\t\t\t\t + (setup.tlogReplicas==null? 0: setup.tlogReplicas)));\n\t\t }\n\t\t CollectionAdminResponse resp;\n\t\t if (setup.collectionCreationParams != null && setup.collectionCreationParams.isEmpty()==false) {\n\t\t\t resp = new CreateWithAdditionalParameters(create, collectionName, setup.collectionCreationParams).process(hsc);\n\t\t } else {\n\t\t\t resp = create.process(hsc);\n\t\t }\n\t\t log.info(\"Collection created: \"+ resp.jsonStr());\n }\n\t colls.add(setup.collection);\n }", "Collect getColl();", "Collection<? extends Object> getCollectionName();", "EntityConfiguration getConfiguration();", "protected CompositeTypeImpl getCompositeCollection() {\n // Complex object retrieve\n CompositeTypeImpl toReturn = new CompositeTypeImpl(\"compositeNameSpace\", COMPOSITE_TYPE_NAME, null, true);\n CompositeTypeImpl phoneNumberCompositeCollection = getPhoneNumberComposite(true);\n\n CompositeTypeImpl detailsComposite = new CompositeTypeImpl(null, \"tDetails\", \"tDetails\");\n detailsComposite.addField(\"gender\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n detailsComposite.addField(\"weight\", new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null));\n\n SimpleTypeImpl nameSimple = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null);\n\n SimpleTypeImpl friendsSimpleCollection = new SimpleTypeImpl(null, SIMPLE_TYPE_NAME, null, true, null, null, null);\n\n toReturn.addField(\"friends\", friendsSimpleCollection);\n toReturn.addField(EXPANDABLE_PROPERTY_PHONENUMBERS, phoneNumberCompositeCollection);\n toReturn.addField(EXPANDABLE_PROPERTY_DETAILS, detailsComposite);\n toReturn.addField(\"name\", nameSimple);\n\n return toReturn;\n }", "public ListConfigurationForAllNamespaces fieldSelector(String fieldSelector) {\n put(\"fieldSelector\", fieldSelector);\n return this;\n }", "private DBCollection connectToEntry() {\n\t\tconf = new Properties();\n\t\tconf.setProperty(sHost, \"localhost\");\n\t\tconf.setProperty(sDB, \"blogentry\");\n\t\tconf.setProperty(sCollection, \"blogentry\");\n\t\ttry {\n\t\t\tif (collection1 != null && collection1.getName() != null) {\n\t\t\t\tSystem.out.println(\"Collection Name: \" + collection1);\n\t\t\t\treturn collection1;\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tcollection1 = null;\n\t\t}\n\n\t\ttry {\n\t\t\tm = new Mongo(conf.getProperty(sHost));\n\t\t\tDB db = m.getDB(conf.getProperty(sDB));\n\t\t\tSystem.out.println(\"db name:\" + conf.getProperty(sDB));\n\t\t\tSystem.out.println(\"db name:\" + db);\n\t\t\tcollection1 = db.getCollection(conf.getProperty(sCollection));\n\t\t\tif (collection1 == null)\n\t\t\t\tthrow new RuntimeException(\"Missing collection: \"\n\t\t\t\t\t\t+ conf.getProperty(sCollection));\n\n\t\t\treturn collection1;\n\t\t} catch (Exception ex) {\n\t\t\t// should never get here unless no directory is available\n\t\t\tthrow new RuntimeException(\"Unable to connect to mongodb on \"\n\t\t\t\t\t+ conf.getProperty(sHost));\n\t\t}\n\t}", "com.google.container.v1.ConfigConnectorConfig getConfigConnectorConfig();", "public CollectionInfo getCollectionInfo(String collectionId) {\r\n CollectionInfo toReturn = new CollectionInfo();\r\n if (null == collectionId || 0 == collectionId.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\"};\r\n SocketMessage request = new SocketMessage(\"admin\", \"coll_info\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\",\r\n paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0285\", \"couldn't get collection info: coll_id=\" + collectionId);\r\n } else {\r\n wrapError(\"APIL_0285\", \"couldn't get collection info: coll_id=\" + collectionId);\r\n }\r\n } else {\r\n boolean isTeColl = \"y\".equals(response.getValue(\"is_te_collection\"));\r\n boolean isRoasterColl = \"y\".equals(response.getValue(\"is_roaster_collection\"));\r\n long timeTeExtract = Tools.parseTime(response.getValue(\"time_te_extracted\"));\r\n long timeRoasterAnalysis = Tools.parseTime(response.getValue(\"time_roaster_analyzed\"));\r\n long timeStarted = Tools.parseTime(response.getValue(\"start_time\"));\r\n String statusString = response.getValue(\"collection_status\");\r\n boolean needsAnalysis = \"y\".equals(response.getValue(\"needs_analysis\"));\r\n\r\n String eCodeTe = response.getValue(\"te_error_code\");\r\n String eMessageTe = response.getValue(\"te_error_message\");\r\n String eCodeRoaster = response.getValue(\"roaster_error_code\");\r\n String eMessageRoaster = response.getValue(\"roaster_error_message\");\r\n String eCodeCustom = response.getValue(\"custom_error_code\");\r\n String eMessageCustom = response.getValue(\"custom_error_message\");\r\n\r\n String charset = response.getValue(\"charset\");\r\n String taskId = \"0\".equals(response.getValue(\"locker\")) ? \"\" : response.getValue(\"locker\");\r\n boolean isRealtime = \"y\".equals(response.getValue(\"realtime\"));\r\n\r\n toReturn = new CollectionInfo(collectionId, isTeColl, isRoasterColl, timeTeExtract, timeRoasterAnalysis, timeStarted,\r\n statusString, needsAnalysis);\r\n\r\n toReturn.setErrors(eCodeTe, eMessageTe, eCodeRoaster, eMessageRoaster, eCodeCustom, eMessageCustom);\r\n toReturn.setCharset(charset);\r\n toReturn.setTaskId(taskId);\r\n toReturn.setRealtime(isRealtime);\r\n }\r\n return toReturn;\r\n }", "public static Collection selectALLCurrencySplitConfig() {\n\t\t\treturn null;\r\n\t\t}", "CollectionParameter createCollectionParameter();", "public ConfigurationManagement getConfig() {\r\n\t\treturn config;\r\n\t}", "public String getCollectionName() {\n return collectionName;\n }", "public Set<ComplexConfigDTO> getComplexProperties() {\n \t\treturn new HashSet<ComplexConfigDTO>(complexProperties.values());\n \t}", "public static Map<String, Field> makeFieldMap(Collection fields)\n {\n Map<String, Field> fieldMap = new HashMap<String, Field>();\n Field field;\n for (Iterator itr = fields.iterator(); itr.hasNext(); )\n {\n field = (Field) itr.next();\n fieldMap.put(field.name(), field);\n }\n return fieldMap;\n }", "public static CodeBlock generateFromModelForCollection(Field field, GenerationPackageModel generationInfo) throws DefinitionException, InnerClassGenerationException {\n String typeName = field.getGenericType().getTypeName();\n\n if (typeName.matches(PATTERN_FOR_GENERIC_INNER_TYPES) ||\n typeName.equals(CLASS_LIST) ||\n typeName.equals(CLASS_SET) ||\n typeName.equals(CLASS_QUEUE))\n throw new DefinitionException(format(UNABLE_TO_DEFINE_GENERIC_TYPE,\n typeName,\n field.getName(),\n field.getDeclaringClass().getSimpleName(),\n FROM_MODEL + field.getDeclaringClass().getSimpleName()));\n\n String getField = GET + String.valueOf(field.getName().charAt(0)).toUpperCase() + field.getName().substring(1);\n\n if (typeName.contains(CLASS_STRING))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + STRING_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_INTEGER))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + INT_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_DOUBLE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + DOUBLE_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_LONG))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + LONG_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_BYTE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + BYTE_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_BOOLEAN))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + BOOL_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_FLOAT))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + FLOAT_COLLECTION_FIELD, field.getName(), getField)).build();\n\n ClassName newClassMapper = createMapperForInnerClassIfNeeded(getClassFromField(field), generationInfo);\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + ENTITY_COLLECTION_FIELD,\n field.getName(),\n getField,\n newClassMapper,\n FROM_MODEL + newClassMapper.simpleName().replace(MAPPER, EMPTY_STRING))).build();\n }", "WithCreate withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);", "public IConfiguration configToConvert() {\n\t\tString inputFiles = jTextFieldInputFiles.getText();\n\t\tString outputFile = jTextFieldOutputFile.getText();\n\t\tif (inputFiles.length() > 0)\n\t\t\tmodifications.insertPoolSource(inputFiles);\n\t\tif (outputFile.length() > 0)\n\t\t\tmodifications.insertPoolOutputModule(outputFile);\n\t\tif (asFragment()) {\n\t\t\tmodifications.filterAllEDSources(true);\n\t\t\tmodifications.filterAllOutputModules(true);\n\t\t}\n\t\tmodifier.modify(modifications);\n\t\treturn modifier;\n\t}", "public Config getConfig();", "public JsonDeserializer<?> _findCustomCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException {\n for (Deserializers d : this._factoryConfig.deserializers()) {\n JsonDeserializer<?> deser = d.findCollectionLikeDeserializer(type, config, beanDesc, elementTypeDeserializer, elementDeserializer);\n if (deser != null) {\n return deser;\n }\n }\n return null;\n }", "public static CollectionReference getCollection(){\n return FirebaseFirestore.getInstance().collection(COLLECTION_NAME) ;\n }", "JpaConfig getJpaConfig();", "public interface Config {\n\n /**\n * Converts the config into a Map\n *\n * @param deep If true, instead of putting Maps for subconfigs,\n * use the full path using the separator character to split\n * @return This config as a Map\n */\n Map<String, Object> getValues(boolean deep);\n\n /**\n * @param path The path to check\n * @return If the config contains an item at path\n */\n boolean contains(String path);\n\n /**\n * Load the values from the map into this config.\n *\n * @param values The map to load in.\n */\n default void setAll(Map<String, Object> values) {\n for (String path : values.keySet()) {\n set(path, values.get(path));\n }\n }\n\n /**\n * Sets the value at path to value\n *\n * @param path The path to put the value\n * @param value The value\n * @return The modified config object, to allow for chain calls\n */\n Config set(String path, Object value);\n\n default void setAll(Config values) {\n for (String path : values.getKeys(true)) {\n set(path, values.get(path));\n }\n }\n\n /**\n * @param deep Should full paths be returned for keys in subconfigs, separated by the separator character?\n * @return The keys that have values in this config\n */\n Set<String> getKeys(boolean deep);\n\n /**\n * Finds and retrieves the object at the given path. If the path is empty, returns this object.\n *\n * @param path The path of the object\n * @return The object at the given path, or null if not found\n */\n default Object get(String path) {\n return get(path, null);\n }\n\n /**\n * Gets the raw value this config contains at path, returning the placeholder def is nothing is found.\n *\n * @param path The path to get the value at\n * @param def The placeholder if no value is found at path, e.g. {@code null}\n * @return The raw object contained at path, or def if nothing is there.\n */\n Object get(String path, Object def);\n\n /**\n * @return The separator character.\n */\n char getSeparator();\n\n /**\n *\n * @return toString() of the object at the path, or null if there is none\n */\n default String getString(String path) {\n return getString(path, null);\n }\n\n /**\n *\n * @return toString() of the object at the path, or def if there is none\n */\n default String getString(String path, String def) {\n Object obj = get(path);\n\n if (obj != null) return obj.toString();\n else return def;\n }\n\n /**\n *\n * @return If there is a String stored at the given path\n */\n default boolean isString(String path) {\n return get(path) instanceof String;\n }\n\n /**\n *\n * @return The int value of the number stored at the path, or 0 if there is none\n */\n default int getInt(String path) {\n return getInt(path, 0);\n }\n\n /**\n * @return The int value of the number stored at the path, or def if there is none\n */\n default int getInt(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).intValue();\n else return def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Integer\n */\n default boolean isInt(String path) {\n return get(path) instanceof Integer;\n }\n\n /**\n *\n * @return The short value of the number stored at the path, or 0 if there is none\n */\n default short getShort(String path) {\n return getShort(path, 0);\n }\n\n /**\n * @return The short value of the number stored at the path, or def if there is none\n */\n default short getShort(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).shortValue();\n else return (short) def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Short\n */\n default boolean isShort(String path) {\n return get(path) instanceof Short;\n }\n\n /**\n *\n * @return True if the boolean true is stored at path, otherwise false\n */\n default boolean getBoolean(String path) {\n return getBoolean(path, false);\n }\n\n /**\n * @return The boolean value stored at path, or def is there is none\n */\n default boolean getBoolean(String path, boolean def) {\n Object obj = get(path);\n\n if (obj instanceof Boolean) return (Boolean) obj;\n else return def;\n }\n\n /**\n * @return If there is a boolean stored at path\n */\n default boolean isBoolean(String path) {\n return get(path) instanceof Boolean;\n }\n\n default boolean isNumber(String path) {\n return get(path) instanceof Number;\n }\n\n default double getDouble(String path) {\n return getDouble(path, 0.0d);\n }\n\n default double getDouble(String path, double def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).doubleValue();\n else return def;\n }\n\n default boolean isDouble(String path) {\n return get(path) instanceof Double;\n }\n\n default BigDecimal getBigDecimal(String path) {\n return getBigDecimal(path, BigDecimal.ZERO);\n }\n\n default BigDecimal getBigDecimal(String path, BigDecimal def) {\n Object obj = get(path);\n\n if (obj instanceof Number) {\n if (obj instanceof BigDecimal) {\n return (BigDecimal) obj;\n } else if (obj instanceof BigInteger) {\n return new BigDecimal((BigInteger) obj);\n } else {\n return BigDecimal.valueOf(((Number) obj).doubleValue());\n }\n } else return def;\n }\n\n default boolean isBigDecimal(String path) {\n return get(path) instanceof BigDecimal;\n }\n\n default long getLong(String path) {\n return getLong(path, 0L);\n }\n\n default long getLong(String path, long def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).longValue();\n else return def;\n }\n\n default boolean isLong(String path) {\n return get(path) instanceof Long;\n }\n\n default byte[] getByteArray(String path) {\n return getByteArray(path, new byte[0]);\n }\n\n default byte[] getByteArray(String path, byte[] def) {\n Object obj = get(path);\n\n if (obj instanceof byte[]) return (byte[]) obj;\n else return def;\n }\n\n default boolean isByteArray(String path) {\n return get(path) instanceof byte[];\n }\n\n default List<String> getStringList(String path) {\n return getList(path, String.class);\n }\n\n default <T> List<T> getList(String path, Class<T> clazz) {\n return getList(path, new ArrayList<>(), clazz);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> List<T> getList(String path, List<T> def, Class<T> clazz) {\n Object obj = get(path);\n\n if (!(obj instanceof Collection<?>)) return def;\n\n Collection<?> input = (Collection<?>) obj;\n List<T> result = new ArrayList<>();\n\n for (Object o : input) {\n if (!clazz.isInstance(o)) continue;\n\n result.add((T) o);\n }\n\n return result;\n }\n\n default List<Config> getConfigList(String path) {\n return getList(path, Config.class);\n }\n\n default boolean isList(String path) {\n return get(path) instanceof List<?>;\n }\n\n /**\n * @param path The path to check for a list\n * @param type The type that the list should contain\n * @return If there is a list at this path and it contains an object with the type {@code type}\n */\n default boolean isList(String path, Class<?> type) {\n if (!isList(path)) return false;\n\n List<?> list = getList(path, null, type);\n\n return list != null && !list.isEmpty();\n }\n\n default Config getConfigOrNull(String path) {\n Object obj = get(path);\n\n if (!(obj instanceof Config)) return null;\n else return (Config) obj;\n }\n\n Config getConfigOrEmpty(String path);\n\n default boolean isConfig(String path) {\n return get(path) instanceof Config;\n }\n\n /**\n * Modifies the fields of the object passed in to the values specified in this config.\n *\n * @param object The object to modify the fields of.\n * @param <T> The type of the object\n * @return The (now modified) object\n */\n default <T> T getAllFields(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())) continue;\n if (Modifier.isTransient(field.getModifiers())) continue;\n\n if (!contains(field.getName())) continue;\n\n try {\n if (field.getType().equals(double.class)) {\n if (!isNumber(field.getName())) continue;\n field.setDouble(object, getDouble(field.getName()));\n } else if (field.getType().equals(float.class)) {\n if (!isNumber(field.getName())) continue;\n field.setFloat(object, (float) getDouble(field.getName()));\n } else if (field.getType().equals(int.class)) {\n if (!isNumber(field.getName())) continue;\n field.setInt(object, getInt(field.getName()));\n } else if (field.getType().equals(boolean.class)) {\n if (!isBoolean(field.getName())) continue;\n field.setBoolean(object, getBoolean(field.getName()));\n } else if (field.getType().equals(long.class)) {\n if (!isNumber(field.getName())) continue;\n field.setLong(object, getLong(field.getName()));\n } else if (field.getType().equals(short.class)) {\n if (!isNumber(field.getName())) continue;\n field.setShort(object, (short) getInt(field.getName()));\n } else if (field.getType().equals(byte.class)) {\n if (!isNumber(field.getName())) continue;\n field.setByte(object, (byte) getInt(field.getName()));\n } else {\n Object newValue = getType(field.getName(), field.getType());\n if (newValue == null) continue;\n\n field.set(object, newValue);\n }\n\n } catch (IllegalAccessException e) {\n //This should not happen hopefully.\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n /**\n * Loads the fields of the object into this config.\n *\n * @param object The object itself\n * @param <T> The type of object\n * @return The object, again\n */\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 }\n\n default <T> T getType(String path, Class<T> type) {\n return getType(path, null, type);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> T getType(String path, T def, Class<T> type) {\n Object obj = get(path);\n\n if (!type.isInstance(obj)) return def;\n return (T) obj;\n }\n}", "DataCollectionInfo getInfo();", "@Nonnull\n @Override\n public FeatureType getCollectionFeatureType() {\n return collectionFeatureType;\n }", "public static DatabaseFieldConfig createFieldConfig(DatabaseType databaseType, Field field) throws SQLException {\n Annotation columnAnnotation = null;\n Annotation basicAnnotation = null;\n Annotation idAnnotation = null;\n Annotation generatedValueAnnotation = null;\n Annotation oneToOneAnnotation = null;\n Annotation manyToOneAnnotation = null;\n Annotation joinColumnAnnotation = null;\n Annotation enumeratedAnnotation = null;\n Annotation versionAnnotation = null;\n\n for (Annotation annotation : field.getAnnotations()) {\n Class<?> annotationClass = annotation.annotationType();\n if (annotationClass.getName().equals(\"javax.persistence.Column\")) {\n columnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Basic\")) {\n basicAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Id\")) {\n idAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.GeneratedValue\")) {\n generatedValueAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.OneToOne\")) {\n oneToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.ManyToOne\")) {\n manyToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.JoinColumn\")) {\n joinColumnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Enumerated\")) {\n enumeratedAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Version\")) {\n versionAnnotation = annotation;\n }\n }\n\n if (columnAnnotation == null && basicAnnotation == null && idAnnotation == null && oneToOneAnnotation == null\n && manyToOneAnnotation == null && enumeratedAnnotation == null && versionAnnotation == null) {\n return null;\n }\n\n DatabaseFieldConfig config = new DatabaseFieldConfig();\n String fieldName = field.getName();\n if (databaseType.isEntityNamesMustBeUpCase()) {\n fieldName = fieldName.toUpperCase();\n }\n config.setFieldName(fieldName);\n\n if (columnAnnotation != null) {\n try {\n Method method = columnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(columnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = columnAnnotation.getClass().getMethod(\"columnDefinition\");\n String columnDefinition = (String) method.invoke(columnAnnotation);\n if (columnDefinition != null && columnDefinition.length() > 0) {\n config.setColumnDefinition(columnDefinition);\n }\n method = columnAnnotation.getClass().getMethod(\"length\");\n config.setWidth((Integer) method.invoke(columnAnnotation));\n method = columnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(columnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = columnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(columnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @Column annotation for field \" + field, e);\n }\n }\n if (basicAnnotation != null) {\n try {\n Method method = basicAnnotation.getClass().getMethod(\"optional\");\n Boolean optional = (Boolean) method.invoke(basicAnnotation);\n if (optional == null) {\n config.setCanBeNull(true);\n } else {\n config.setCanBeNull(optional);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Basic annotation for field \" + field,\n e);\n }\n }\n if (idAnnotation != null) {\n if (generatedValueAnnotation == null) {\n config.setId(true);\n } else {\n // generatedValue only works if it is also an id according to {@link GeneratedValue)\n config.setGeneratedId(true);\n }\n }\n if (oneToOneAnnotation != null || manyToOneAnnotation != null) {\n // if we have a collection then make it a foreign collection\n if (Collection.class.isAssignableFrom(field.getType())\n || ForeignCollection.class.isAssignableFrom(field.getType())) {\n config.setForeignCollection(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setForeignCollectionColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"fetch\");\n Object fetchType = method.invoke(joinColumnAnnotation);\n if (fetchType != null && fetchType.toString().equals(\"EAGER\")) {\n config.setForeignCollectionEager(true);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n } else {\n // otherwise it is a foreign field\n config.setForeign(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(joinColumnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(joinColumnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n }\n }\n if (enumeratedAnnotation != null) {\n try {\n Method method = enumeratedAnnotation.getClass().getMethod(\"value\");\n Object typeValue = method.invoke(enumeratedAnnotation);\n if (typeValue != null && typeValue.toString().equals(\"STRING\")) {\n config.setDataType(DataType.ENUM_STRING);\n } else {\n config.setDataType(DataType.ENUM_INTEGER);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Enumerated annotation for field \"\n + field, e);\n }\n }\n if (versionAnnotation != null) {\n // just the presence of the version...\n config.setVersion(true);\n }\n if (config.getDataPersister() == null) {\n config.setDataPersister(DataPersisterManager.lookupForField(field));\n }\n config.setUseGetSet(DatabaseFieldConfig.findGetMethod(field, false) != null\n && DatabaseFieldConfig.findSetMethod(field, false) != null);\n return config;\n }", "protected IDAOConfigs getDaoGenConfig(URL argUrl) {\r\n\t\tIDAOConfigs daoGenConfig = null;\r\n\t\tList<IConfigObject> configs = getConfigs(argUrl);\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tdaoGenConfig = DAOConfigs.createInstance();\r\n\r\n\t\t\tfor (IConfigObject config : configs) {\r\n\t\t\t\tdaoGenConfig.setConfigObject(null, config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn daoGenConfig;\r\n\t}", "public String getSearchForConfigElements()\n {\n return searchForConfigElements;\n }" ]
[ "0.6840581", "0.62443113", "0.5916043", "0.56918573", "0.54398066", "0.53413546", "0.52297413", "0.5163558", "0.51477593", "0.51349235", "0.50925636", "0.50696355", "0.50635207", "0.5044737", "0.5031126", "0.5015993", "0.49601352", "0.48946175", "0.4894385", "0.4878065", "0.48689505", "0.48422775", "0.4835144", "0.48219988", "0.4805603", "0.47884053", "0.4783964", "0.4783432", "0.47788662", "0.47763672", "0.4759184", "0.4757767", "0.47540674", "0.4745905", "0.47350618", "0.4715847", "0.47043028", "0.47030538", "0.46952337", "0.46885404", "0.468765", "0.46860865", "0.4682916", "0.4682911", "0.4681983", "0.4678285", "0.4677466", "0.46690097", "0.46555611", "0.46520877", "0.46364707", "0.4632849", "0.46229085", "0.4612719", "0.46126527", "0.46038914", "0.46025276", "0.4601497", "0.46006763", "0.45936927", "0.45897007", "0.45862076", "0.4575815", "0.45729095", "0.45712295", "0.4565691", "0.45652387", "0.45408386", "0.45395643", "0.4528183", "0.45275393", "0.4518764", "0.45145616", "0.4512566", "0.45091066", "0.44996664", "0.4499195", "0.4491887", "0.44868505", "0.44766435", "0.4471325", "0.4462806", "0.44622615", "0.4461705", "0.44596046", "0.44566125", "0.44466314", "0.44441682", "0.44374076", "0.44364628", "0.4434412", "0.44253632", "0.44185668", "0.44122055", "0.44118822", "0.4410315", "0.4399266", "0.4394742", "0.4392226", "0.4388525" ]
0.63473254
1
Returns name of field, which specified collection uses as ID field (as specified in configuration file)
String getIdFieldName(String collectionName) { HashMap<String,Object> collection = getCollectionConfig(collectionName); if (collection == null || !collection.containsKey("idField")) return null; String indexField = collection.get("idField").toString(); if (!collection.containsKey("fields")) return null; HashMap<String,Object> fields = (HashMap<String,Object>)collection.get("fields"); if (!fields.containsKey(indexField)) return null; return indexField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getId() {\r\n\t\treturn option.getId() + \".\" + field.getName();\r\n\t}", "@AutoEscape\n\tpublic String getFieldId();", "@JsonValue\n\tpublic final String fieldId() {\n\t \treturn this.name().replace(\"_\", \".\");\n\t}", "@Override\r\n\tpublic String getIdFieldName() {\n\t\treturn null;\r\n\t}", "public final String getFieldId() {\n return fieldId;\n }", "public java.lang.String getFieldId() {\n return fieldId;\n }", "com.google.privacy.dlp.v2.FieldId getFieldId();", "public String getFieldId() {\n return this.fieldId;\n }", "String getFieldName();", "public String getFieldName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = entry.getNameAndTypeEntry().getNameEntry().getValue();\n if (name.length() == 0)\n return null;\n return name;\n }", "public String getFieldName();", "public String getIdPropertyName() {\n \t\treturn idPropertyName;\n \t}", "public String collectionId() {\n return collectionId;\n }", "public String getName(){\n return field.getName();\n }", "public String fieldIdToString() {\r\n\t\treturn new String(String.format(\"%02d\", getID()));\r\n\t}", "public String idName() {\n return entityType().getSimpleName().toLowerCase() + \"id\";\n }", "public static int getCollectionId(Connection c, String name) throws SQLException {\r\n\t\tPreparedStatement s = c.prepareStatement(\"select \"+quote(FC_ID_FIELD.name)+\" from \"+quote(FC_TABLE_NAME)+\" where \"+quote(FC_NAME_FIELD.name)+\"=\"+\"?\");\r\n\t\ts.setString(1, name);\r\n\t\tResultSet rs = s.executeQuery();\r\n\t\trs.next();\r\n\t\tint id = rs.getInt(1);\r\n\t\ts.close();\r\n\t\treturn id;\r\n\t}", "io.dstore.values.IntegerValue getFieldTypeId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public String getCurrentFieldName () {\n String currentField = getCurrentElement(ElementKind.FIELD);\n if (currentField == null) return \"\";\n else return currentField;\n //return getSelectedIdentifier ();\n }", "Set<String> getCollectionFields(String collectionName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName);\n Set<String> result = fields.keySet();\n // result.remove(getIdFieldName(collectionName));\n return result;\n }", "java.lang.String getField1335();", "public String getNamedId();", "@AutoEscape\n\tpublic String getCollectionName();", "public void setFieldId(String fieldId);", "@Override\n public String name() {\n return fieldName;\n }", "@Override\n\tpublic String getFieldName()\n\t{\n\t\treturn fieldName;\n\t}", "public String getFieldName() { return databaseFieldName; }", "public String getIDName();", "String getField();", "String getJavaFieldName();", "public Fw getExplicitIdField(List<Fw> fields) {\n\t\tfor (Fw fw : fields) {\n\t\t\tif (!fw.isSpecial() && AnnotationsHelper.hasAnnotation(fw, mda.annotation.jpa.Id.class)) {\n\t\t\t\treturn fw;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "private int getFieldId(VectorAccessible accessible, LogicalExpression expr) {\n return getFieldIds(accessible, expr)[0];\n }", "java.lang.String getField1337();", "public String field() {\n\t\treturn \"_\"+methodBase();\n\t}", "java.lang.String getField1334();", "public String getId() {\n String id = name.replaceAll(\" \", \"-\");\n id = id.replaceAll(\"_\", \"-\");\n return id.toLowerCase();\n }", "@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}", "public String getFieldName(Class<?> type, String fieldName);", "java.lang.String getField1610();", "String getDBQualifiedFieldName(String fieldName);", "public String getIdName(Class<?> aClass) {\n\t\tFw pkfld = this.getExplicitIdField(aClass);\n\t\tif (pkfld != null) {\n\t\t\treturn pkfld.name();\n\t\t}\n\n\t\treturn \"id\";\n\t}", "private static String getCollectionArgument(Map<String, Entity> entitiesMap, FieldType fieldType) {\r\n if (!fieldType.getTypeArguments().isEmpty()) {\r\n return fieldType.getTypeArguments()\r\n .stream()\r\n .map(FieldType::transformName)\r\n .filter(entitiesMap::containsKey)\r\n .findFirst()\r\n .orElse(fieldType.getTypeArguments().get(0));\r\n } else {\r\n return fieldType.getName();\r\n }\r\n }", "java.lang.String getField1336();", "public String getFieldName() {\n return fieldName;\n }", "public Object visitField(GoIRFieldNode node)\n\t{\n\t\treturn node.getType().getIdentifier();\n\t}", "public String getFieldName()\n\t{\n\t\treturn fieldName;\n\t}", "java.lang.String getField1525();", "java.lang.String getField1015();", "java.lang.String getField1325();", "public java.lang.String getFieldName() {\n return fieldName;\n }", "public String getUniqueField() {\n return uniqueField;\n }", "java.lang.String getField1425();", "java.lang.String getField1001();", "java.lang.String getField1005();", "protected Field getPrimaryKeyField() {\n Field returnField = null;\n Field[] fieds = MetaData.class.getDeclaredFields();\n for (Field field : fieds) {\n Id annotation = field.getAnnotation(Id.class);\n EmbeddedId annotationEmb = field.getAnnotation(EmbeddedId.class);\n if (annotation != null || annotationEmb != null) {\n return field;\n }\n }\n return returnField;\n }", "public String getFieldName() {\n return fieldName;\n }", "public String getFieldName() {\n return fieldName;\n }", "public String getFieldName() {\n return fieldName;\n }", "java.lang.String getField1533();", "java.lang.String getField1527();", "public String getFieldName() {\n return TF_Field_Name;\n }", "com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder();", "public String getFieldName() {\n return this.fieldName;\n }", "public String getFieldName() {\r\n return this.strFieldName;\r\n }", "java.lang.String getField1646();", "java.lang.String getField1033();", "java.lang.String getField1535();", "@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}", "public String getFieldName()\n {\n return m_strFieldName;\n }", "java.lang.String getField1538();", "java.lang.String getField1531();", "java.lang.String getField1124();", "java.lang.String getField1338();", "java.lang.String getField1843();", "java.lang.String getField1542();", "java.lang.String getField1125();", "java.lang.String getField1546();", "java.lang.String getField1135();", "public int getLBR_Collection_Default_ID();", "protected abstract String getFieldName(String parameter);", "java.lang.String getField1133();" ]
[ "0.70415413", "0.6985785", "0.68618923", "0.67769736", "0.6678286", "0.66716903", "0.6498007", "0.6393075", "0.6340716", "0.63231045", "0.61810213", "0.6150439", "0.60992587", "0.604358", "0.60239196", "0.59780675", "0.5951111", "0.5906589", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.5897352", "0.58839697", "0.587317", "0.58554906", "0.58544475", "0.5853792", "0.5802877", "0.5780795", "0.57774895", "0.5776838", "0.5774671", "0.5752417", "0.5745458", "0.5716327", "0.57005435", "0.5699713", "0.5697852", "0.56966656", "0.5694697", "0.5688421", "0.5684413", "0.567772", "0.566725", "0.56621224", "0.5655845", "0.5652999", "0.5650177", "0.56449693", "0.5628591", "0.5619964", "0.56112474", "0.5604215", "0.5602371", "0.56005734", "0.55970156", "0.55961615", "0.5591645", "0.55862147", "0.5584802", "0.5584802", "0.5584802", "0.5583815", "0.55780095", "0.55717117", "0.5569339", "0.55686694", "0.5567796", "0.55546623", "0.5551556", "0.5549717", "0.55488515", "0.5548279", "0.5547465", "0.55452454", "0.55325407", "0.55293816", "0.5524153", "0.55240417", "0.5519213", "0.5517372", "0.5516277", "0.55143833", "0.5513098", "0.5512702" ]
0.8346081
0
Formats value for specified field for UPDATE or INSERT query, depending on type of this field, defined in configuration file
Object formatFieldValue(String collectionName,String fieldName,Object value) { if (!isValidFieldConfig(collectionName,fieldName)) return null; if (value == null) return null; String type = getFieldConfigValue(collectionName,fieldName,"type").toString(); try { switch (type) { case "decimal": return Double.valueOf(value.toString()); case "integer": return Double.valueOf(value.toString()).intValue(); case "string": return value.toString(); } } catch (Exception e) { syslog.log(ISyslog.LogLevel.WARNING, "Could not format field value '"+value+"' of field '"+fieldName+"'"+ "in collection '"+collectionName+"'", this.getClass().getName(),"formatFieldValue"); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getValueFormatted();", "@Override\n\t\t protected String formatPropertyValue(Object rowId,\n\t\t Object colId, Property property) {\n\t\t if (property.getType() == Date.class && property.getValue() != null) {\n\t\t SimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t return df.format((Date)property.getValue());\n\t\t }\n\t\t \n//\t\t if (property.getType()==Boolean.class){\n\t//\t\t \tif ((Boolean) property.getValue()==true) {\n\t//\t\t \t\treturn \"Active\";\n\t//\t\t \t} else {\n\t//\t\t \t\treturn \"-\";\n\t//\t\t \t}\n//\t\t }\n\t\t return super.formatPropertyValue(rowId, colId, property);\n\t\t }", "@Override\n\tpublic String fieldConvert(String field) {\n\t\tif (!StringUtils.isEmpty(field)) {\n\t\t\tswitch (field) {\n\t\t\tcase \"code\":\n\t\t\t\treturn \"CODE\";\n\t\t\tcase \"name\":\n\t\t\t\treturn \"NAME\";\n\t\t\tcase \"createTime\":\n\t\t\t\treturn \"CREATE_TIME\";\n\t\t\tcase \"updateTime\":\n\t\t\t\treturn \"UPDATE_TIME\";\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "String getValueFormat();", "public String getUpdateValue(Object obj, Database db)\r\n throws ReflectiveOperationException, SQLException {\r\n return getFieldName() + \" = \" + getCreationValue(obj, db);\r\n }", "public void formatFields() {\r\n\t}", "protected String formatField() {\n \tif(!updated) return \"No record set.\";\n \t\n \tif(firstFieldP.getText() != null && lastFieldP.getText() != null) {\n\t \tfirstNameString = firstFieldP.getText();\n\t \tlastNameString = lastFieldP.getText();\n \t} else\t{\n \tfirstNameString = firstFieldC.getText();\n \tlastNameString = lastFieldC.getText();\n \ttribeString = tribeField.getText();\t\n \t}\n\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"<html><p align=center>\");\n \tsb.append(firstNameString);\n \tsb.append(\" \");\n \tsb.append(lastNameString);\n \tsb.append(\"<br>\");\n \tsb.append(tribeString);\n \tsb.append(\"</p></html>\");\n \t\n \treturn sb.toString(); \t\n }", "public static String formatField(String attr, Comparable<?> val){\r\n \t\treturn String.format(\" %30s: => %-4s\", attr, val) + \"\\n\";\r\n \t}", "protected String formatValue (Object value)\n {\n return String.valueOf(value);\n }", "@Override\r\n public Object formatValue(Object value) {\r\n return value;\r\n }", "private String updateQuery(String field1, String field2) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"update \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" set \" + field1 + \" =?\");\n\t\tsb.append(\" WHERE \" + field2 + \" =?\");\n\t\treturn sb.toString();\n\t}", "private static String mapStatementSetter(final FieldType.Type type) {\n switch (type) {\n case DATE:\n return \"setDate\";\n case INTEGER:\n return \"setInt\";\n case REAL:\n return \"setDouble\";\n case STRING:\n return \"setString\";\n default:\n return null;\n }\n }", "private void insertValue(String field, String value) {\n switch (mapFieldsTypes.get(field)) {\n case DBCreator.STRING_TYPE:\n insertStringValue(field, value);\n break;\n case DBCreator.INTEGER_TYPE:\n insertIntegerValue(field, Integer.valueOf(value));\n break;\n }\n }", "@Test\n public void fieldFormat() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Use a document builder to insert a field that displays a result with no format applied.\n Field field = builder.insertField(\"= 2 + 3\");\n\n Assert.assertEquals(\"= 2 + 3\", field.getFieldCode());\n Assert.assertEquals(\"5\", field.getResult());\n\n // We can apply a format to a field's result using the field's properties.\n // Below are three types of formats that we can apply to a field's result.\n // 1 - Numeric format:\n FieldFormat format = field.getFormat();\n format.setNumericFormat(\"$###.00\");\n field.update();\n\n Assert.assertEquals(\"= 2 + 3 \\\\# $###.00\", field.getFieldCode());\n Assert.assertEquals(\"$ 5.00\", field.getResult());\n\n // 2 - Date/time format:\n field = builder.insertField(\"DATE\");\n format = field.getFormat();\n format.setDateTimeFormat(\"dddd, MMMM dd, yyyy\");\n field.update();\n\n Assert.assertEquals(\"DATE \\\\@ \\\"dddd, MMMM dd, yyyy\\\"\", field.getFieldCode());\n System.out.println(\"Today's date, in {format.DateTimeFormat} format:\\n\\t{field.Result}\");\n\n // 3 - General format:\n field = builder.insertField(\"= 25 + 33\");\n format = field.getFormat();\n format.getGeneralFormats().add(GeneralFormat.LOWERCASE_ROMAN);\n format.getGeneralFormats().add(GeneralFormat.UPPER);\n field.update();\n\n int index = 0;\n Iterator<Integer> generalFormatEnumerator = format.getGeneralFormats().iterator();\n while (generalFormatEnumerator.hasNext()) {\n int value = generalFormatEnumerator.next();\n System.out.println(MessageFormat.format(\"General format index {0}: {1}\", index++, value));\n }\n\n\n Assert.assertEquals(\"= 25 + 33 \\\\* roman \\\\* Upper\", field.getFieldCode());\n Assert.assertEquals(\"LVIII\", field.getResult());\n Assert.assertEquals(2, format.getGeneralFormats().getCount());\n Assert.assertEquals(GeneralFormat.LOWERCASE_ROMAN, format.getGeneralFormats().get(0));\n\n // We can remove our formats to revert the field's result to its original form.\n format.getGeneralFormats().remove(GeneralFormat.LOWERCASE_ROMAN);\n format.getGeneralFormats().removeAt(0);\n Assert.assertEquals(0, format.getGeneralFormats().getCount());\n field.update();\n\n Assert.assertEquals(\"= 25 + 33 \", field.getFieldCode());\n Assert.assertEquals(\"58\", field.getResult());\n Assert.assertEquals(0, format.getGeneralFormats().getCount());\n //ExEnd\n }", "protected String attributeToString(PropertyDescriptor prop,\r\n Object value,\r\n Field fieldDef) throws DataLayerException {\r\n try {\r\n // Statement param indexes start with 1, not 0.\r\n if (logCore.isDebugEnabled()) {\r\n logCore.debug(\"Property:\");\r\n logCore.debug(\" Property Name: \" + prop.getDisplayName());\r\n logCore.debug(\" prop.getPropertyType(): \" + prop.getPropertyType().getName());\r\n logCore.debug(\" Value: \" + value.toString());\r\n logCore.debug(\" value.getClass(): \" + value.getClass().getName());\r\n logCore.debug(\" FieldDef Name: \" + fieldDef.getName());\r\n logCore.debug(\" FieldDef Type: \" + fieldDef.getType());\r\n logCore.debug(\" FieldDef Format: \" + fieldDef.getFormat());\r\n }\r\n\r\n String fieldName = prop.getName().toLowerCase();\r\n String fieldType = fieldDef.getType();\r\n String result = null;\r\n\r\n if (fieldType.equals(\"key\") && value == null)\r\n return \"\";\r\n\r\n if (fieldType.equals(\"string\")) {\r\n // value is a String.\r\n result = \"'\" + FormatUtils.parseString(value.toString(), fieldDef) + \"'\";\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + result);\r\n return result;\r\n } else if (fieldType.equals(\"key\")) {\r\n // value is a primary key.\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + value.toString());\r\n return value.toString();\r\n } else if (fieldType.equals(\"date\")) {\r\n if (value != null) {\r\n java.util.Date date = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n date = FormatUtils.parseDate(value.toString(), fieldDef);\r\n else if (java.util.Date.class.isAssignableFrom(prop.getPropertyType()))\r\n date = (java.util.Date) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Date or String.\");\r\n String out = DateUtils.dateToString(date, \"yyyy-MM-dd HH:mm:ss\");\r\n\r\n result = \"TO_DATE('\" + out + \"', 'YYYY-MM-DD HH24:MI:SS')\";\r\n } else\r\n result = \"''\";\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + result);\r\n return result;\r\n } else if (fieldType.equals(\"long\")) {\r\n Long num = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n num = FormatUtils.parseLong(value.toString());\r\n else if (Long.class.isAssignableFrom(prop.getPropertyType()))\r\n num = (Long) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Long or String.\");\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + num.toString());\r\n return num.toString();\r\n } else if (fieldType.equals(\"int\")) {\r\n Integer num = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n num = FormatUtils.parseInteger(value.toString());\r\n else if (value instanceof Integer)\r\n num = (Integer) value;\r\n else {\r\n log.debug(\"value.getClass(): \" + value.getClass().getName());\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Integer or String.\");\r\n }\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + num.toString());\r\n return num.toString();\r\n } else if (fieldType.equals(\"boolean\")) {\r\n Boolean item = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n item = FormatUtils.parseBoolean(value.toString(), fieldDef);\r\n else if (value instanceof Boolean)\r\n item = (Boolean) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Boolean or String.\");\r\n\r\n if (item.booleanValue())\r\n result = \"'Y'\";\r\n else\r\n result = \"'N'\";\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + result);\r\n return result;\r\n } else if (fieldType.equals(\"double\") || fieldType.equals(\"float\")) {\r\n BigDecimal item = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n item = FormatUtils.parseBigDecimal(value.toString(), fieldDef);\r\n else if (BigDecimal.class.isAssignableFrom(prop.getPropertyType()))\r\n item = (BigDecimal) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be BigDecimal or String.\");\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> '\" + item.toString() + \"'\");\r\n return item.toString();\r\n } else {\r\n throw new DataLayerException(\r\n \"Error converting attribute to string. Unrecognized data type (\"\r\n + value.getClass() + \").\");\r\n }\r\n } catch (DataLayerException e) {\r\n throw e;\r\n } catch (java.lang.Exception e) {\r\n throw new DataLayerException(\"Error converting attribute to string.\", e);\r\n }\r\n }", "public void setFormat(String value) {\n/* 198 */ setValue(\"format\", value);\n/* */ }", "public String format(Object value);", "public String reformatDBObject(DBObject record);", "public String get_another_field(String table, String source_field, String source_value, String destination_field);", "public abstract String valueAsText();", "public static StringBuffer writeXML_DBField(StringBuffer sb, int indent, DBField fld, boolean inclInfo, String value, boolean soapXML)\n {\n // -- <Field name=\"NAME\" primaryKey=\"true\" alternateKeys=\"A,B,C\" type=\"DATATYPE\", title=\"TITLE\">VALUE</FIELD>\n\n /* begin Field tag */\n sb.append(XMLTools.PREFIX(soapXML,indent)); \n sb.append(XMLTools.startTAG(soapXML,TAG_Field,\n XMLTools.ATTR(ATTR_name,fld.getName()) +\n (fld.isPrimaryKey()? XMLTools.ATTR(ATTR_primaryKey,\"true\") : \"\") + \n (fld.isAlternateKey()? XMLTools.ATTR(ATTR_alternateKeys,StringTools.join(fld.getAlternateIndexes(),',')) : \"\") + \n (inclInfo? (XMLTools.ATTR(ATTR_type,fld.getDataType()) + XMLTools.ATTR(ATTR_title,fld.getTitle(null))) : \"\"),\n (value == null), (value == null)));\n\n /* valid */\n if (value != null) {\n\n /* value */\n if (fld.isBoolean()) {\n // \"true\" / \"false\"\n sb.append(StringTools.parseBoolean(value,false));\n } else\n if (fld.isNumeric()) {\n // numeric value\n sb.append(value);\n } else\n if (fld.isBinary()) {\n // displayed in hex\n sb.append(value);\n } else { \n // String\n if (!StringTools.isBlank(value)) {\n sb.append(XMLTools.CDATA(soapXML,value));\n }\n }\n \n /* end Field tag */\n sb.append(XMLTools.endTAG(soapXML,TAG_Field,true));\n \n }\n \n /* field xml */\n //Print.logInfo(\"==> \" + sb.toString());\n return sb;\n\n }", "abstract public String getDisplayValue(String fieldname);", "public QbUpdate set(QbField field, String placeholder);", "@Override\n\tpublic String update(Set<String> filterField) {\n\t\treturn null;\n\t}", "java.lang.String getField1064();", "private String getSQLText (CTextField f)\n \t{\n \t\tString s = f.getText().toUpperCase();\n \t\tif (!s.endsWith(\"%\"))\n \t\t\ts += \"%\";\n \t\tlog.fine( \"String=\" + s);\n \t\treturn s;\n \t}", "@Override\n protected String formatValue(Object value) {\n String formatted = \"float\".equals(format) ? formatWithDigits(value, this.digits) : String.valueOf(value);\n return formatted + \" \" + this.unitText;\n }", "public static JSON._KeyValue writeJSON_DBField(DBField fld, int inclMask, Object value)\n {\n // -- \"name\" : {\n // - \"primaryKey\" : true,\n // - \"alternateKeys\" : [ \"a\", \"b\", \"c\" ],\n // - \"type\" : \"DATATYPE\",\n // - \"title\" : \"TITLE\",\n // - \"value\" : VALUE\n // - }\n\n /* what to include */\n boolean inclType = ((inclMask & DBFactory.INCL_TYPE ) != 0);\n boolean inclTitle = ((inclMask & DBFactory.INCL_TITLE) != 0);\n boolean inclKey = ((inclMask & DBFactory.INCL_KEY ) != 0);\n\n /* JSON field headers */\n JSON._Object obj = null;\n if (inclKey && fld.isPrimaryKey()) {\n if (obj == null) { obj = new JSON._Object(); }\n obj.addKeyValue(ATTR_primaryKey, true);\n }\n if (inclKey && fld.isAlternateKey()) {\n if (obj == null) { obj = new JSON._Object(); }\n String ak[] = fld.getAlternateIndexes();\n obj.addKeyValue(ATTR_alternateKeys, new JSON._Array(ak));\n }\n if (inclType) {\n if (obj == null) { obj = new JSON._Object(); }\n obj.addKeyValue(ATTR_type, fld.getDataType());\n }\n if (inclTitle) {\n if (obj == null) { obj = new JSON._Object(); }\n obj.addKeyValue(ATTR_title, fld.getTitle(null));\n }\n\n /* JSON field value */\n Object val;\n if (value == null) {\n val = null;\n } else\n if (fld.isBoolean()) {\n // -- Boolean\n val = (value instanceof Boolean)? value : new Boolean(StringTools.parseBoolean(value,false));\n } else\n if (fld.isDecimal()) {\n // -- Double, Float\n val = (value instanceof Double)? value : new Double(StringTools.parseDouble(value,0.0));\n } else\n if (fld.isNumeric()) {\n // -- Integer, Long, Short\n val = (value instanceof Long)? value : new Long(StringTools.parseLong(value,0L));\n } else\n if (fld.isBinary()) {\n // -- Binary\n if (value instanceof String) {\n // -- contents is already hex binary representation?\n byte b[] = StringTools.parseHex((String)value, null);\n if (!ListTools.isEmpty(b)) {\n val = \"0x\" + StringTools.toHexString(b);\n } else {\n val = \"\";\n }\n } else\n if (value instanceof byte[]) {\n // -- byte array\n byte b[] = (byte[])value;\n if (!ListTools.isEmpty(b)) {\n val = \"0x\" + StringTools.toHexString(b);\n } else {\n val = \"\";\n }\n } else {\n // -- not supported\n val = \"\";\n }\n } else\n if (fld.isString()) {\n // -- String\n if (value instanceof String) {\n val = (String)value;\n } else {\n val = StringTools.toString(value);\n }\n } else { \n // -- unknown\n val = StringTools.toString(value);\n }\n\n /* return JSON._KeyValue */\n if (obj != null) {\n obj.addKeyValue(ATTR_value, val);\n return new JSON._KeyValue(fld.getName(), obj);\n } else {\n return new JSON._KeyValue(fld.getName(), val);\n }\n\n }", "public void formatValue(ElementFormatter elemFormatter, Row row, String ordinalValue, CallingContext cc) throws ODKDatastoreException;", "abstract public String getValue(String fieldname);", "void setValue4Po(String poFieldName, Object val);", "public static synchronized String getSetterForPreparedStatement(Class<?> cls) {\r\n\r\n String typ = cls.getCanonicalName();\r\n\r\n StringBuilder sb = new StringBuilder();\r\n\r\n sb.append(\"set\");\r\n\r\n if (null != typ) {\r\n switch (typ) {\r\n case \"java.lang.Integer\":\r\n sb.append(\"Int\");\r\n break;\r\n case \"java.util.Date\":\r\n case \"java.sql.Date\":\r\n //toto nieje potreba, ale budiz.\r\n sb.append(\"String\");\r\n break;\r\n case \"byte[]\":\r\n case \"java.lang.Byte[]\":\r\n case \"java.io.InputStream\":\r\n sb.append(\"Bytes\");\r\n\r\n break;\r\n case \"sk.stefan.enums.VoteResult\":\r\n case \"sk.stefan.enums.VoteAction\":\r\n case \"sk.stefan.enums.Stability\":\r\n case \"sk.stefan.enums.UserType\":\r\n case \"sk.stefan.enums.PublicUsefulness\":\r\n case \"sk.stefan.enums.FilterType\":\r\n case \"sk.stefan.enums.NonEditableFields\":\r\n case \"sk.stefan.enums.PublicRoleType\":\r\n\r\n sb.append(\"Int\");\r\n break;\r\n\r\n default:\r\n String fields[] = typ.split(\"\\\\.\");\r\n sb.append(fields[fields.length - 1]);\r\n break;\r\n }\r\n }\r\n\r\n String s = sb.toString();\r\n //System.out.println(\"SKACU: \" + s);\r\n // ResultSet#getTimestamp() you need java.sql.Timestamp\r\n return s;\r\n }", "private void insertStringValue(String field, String value) {\n mapFieldsStrings.put(field, value);\n }", "R format(O value);", "public String get_Value_In_Correct_Format(String tableName, int fieldIndex,\n\t\t\tString Value) {\n\t\tDatabaseTable dbT = annotatedTableSchema.get(tableName);\n\t\tDataField dF = dbT.get_Data_Field(fieldIndex);\n\t\treturn dF.get_Value_In_Correct_Format(Value);\n\t}", "public void setField(String fieldName, String value, Class type) {\n Field field;\n try {\n field = this.getClass().getField(fieldName);\n } catch (NoSuchFieldException e) {\n log.error(String.format(\"Data record does not have field - %s. Error: %s\", fieldName, e.getMessage()));\n return;\n }\n\n final String typeString = type.toString();\n\n if (typeString.equals(Double.class.toString())) {\n setDouble(field, value);\n } else if (typeString.equals(String.class.toString())) {\n setString(field, value);\n }\n }", "@Override\n public String getPlaceholderValueString(Column col) {\n return super.getPlaceholderValueString(col) + \" AS \"\n + getTypeName(col);\n }", "public String format()\n {\n StringBuilder sb = new StringBuilder(64);\n sb.append(expression).append(\" = \");\n\n if (detailExpression != null && !detailExpression.equals(value.toString()))\n {\n sb.append(\"(\").append(detailExpression).append(\") = \");\n }\n\n sb.append(value);\n if (description != null)\n {\n sb.append(\" // \").append(description);\n }\n\n return sb.toString();\n }", "protected String createUpdate(T t) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"UPDATE \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" SET \");\n\t\treturn sb.toString();\n\t}", "io.envoyproxy.envoy.config.core.v3.SubstitutionFormatString getBodyFormatOverride();", "public static StringBuffer writeXML_DBField(StringBuffer sb, int indent, DBField fld, boolean inclInfo, String value)\n {\n return DBFactory.writeXML_DBField(sb, indent, fld, inclInfo, value, false/*soapXML*/);\n }", "private static String getLockedValue(CatalogServiceFieldRestRep field) {\n if (Boolean.TRUE.equals(field.getOverride()) && StringUtils.isNotBlank(field.getValue())) {\n return field.getValue();\n }\n else {\n return null;\n }\n }", "@NotNull\n protected String format(@NotNull final Object value) {\n return value != null\n ? value.toString()\n : \"\";\n }", "java.lang.String getField1216();", "java.lang.String getField1201();", "java.lang.String getField1032();", "java.lang.String getField1005();", "java.lang.String getField1202();", "public void setPropertyWithAutoTypeCast(Object obj, Object value) {\n if(value==null) {\n setProperty(obj, value);\n return;\n }\n Class<?> propType = getPropertyType();\n if(propType.isAssignableFrom(value.getClass())) {\n setProperty(obj, value);\n return;\n }\n if(value instanceof Long && propType.equals(Integer.class)) {\n setProperty(obj, Integer.valueOf(value.toString()));\n return;\n }\n if(value instanceof Double || value instanceof Float || value instanceof BigDecimal) {\n if(propType.isAssignableFrom(Double.class)) {\n setProperty(obj, Double.valueOf(value.toString()));\n return;\n } else if(propType.isAssignableFrom(Float.class)) {\n setProperty(obj, Float.valueOf(value.toString()));\n return;\n } else if(propType.isAssignableFrom(BigDecimal.class)) {\n setProperty(obj, BigDecimal.valueOf(Double.valueOf(value.toString())));\n return;\n } else {\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }\n }\n if(value instanceof java.util.Date) {\n if(propType.isAssignableFrom(java.sql.Timestamp.class)) {\n setProperty(obj, new java.sql.Timestamp(((java.util.Date) value).getTime()));\n return;\n } else if(propType.isAssignableFrom(java.sql.Date.class)) {\n setProperty(obj, new java.sql.Date(((java.util.Date) value).getTime()));\n return;\n } else {\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }\n }\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }", "String format(T value);", "@SuppressWarnings(\"unused\")\n\t\tprivate String querySingleValue(String query, String field){\n\t\t\treturn field;\n\n\t\t/*\tJdbcTemplate jdt = new JdbcTemplate(getDataSource());\n\t \tList queryList;\n\t \tString result = \"\";\n\n\t \t queryList = jdt.queryForList(query);\n\t \t Iterator i = queryList.iterator();\n\t \t i = queryList.iterator();\n\t \t if (i.hasNext()) {\n\t\t\t\t ListOrderedMap data = (ListOrderedMap) i.next();\n\t\t\t\t if (data.get(field) == null){\n\t\t\t\t } else {\n\t\t\t\t\t result = data.get(field).toString();\n\t\t\t\t }\n\t \t }\n\t \t return result;*/\n\t\t}", "public interface ISqlFormater {\n /**\n * Get the name of SQL data type\n * @param dataType SQL data type id\n * @param scale Scale of data\n * @param precision Precision of data\n * @return Formated data type expression\n */\n String FormatDataType(int dataType, int scale, int precision);\n \n}", "@Override\n public void setField (String fieldToModify, String value, Double duration) {\n\n }", "private static String format(String value) {\n String result = value;\n if (result.contains(\"\\\"\")) {\n result = result.replace(\"\\\"\", \"\\\"\\\"\");\n }\n return result;\n\n }", "public void setValue(Object value) {\n\t\tEntityManager em = Config.getEntityManager();\n\n\t\t// check for unnecessary update\n\t\tif (value == null && this.value == null) return;\n\t\tif (value != null && this.value != null) {\n\t\t\t// check if values are the same\n\t\t\tif (value.equals(this.value)) return;\n\t\t}\n\t\tthis.value = value;\n\t\tEntityTransaction t = em.getTransaction();\n\t\tboolean localTransaction = false;\n\t\ttry {\n\t\t\tif (!t.isActive()) {\n\t\t\t\tlocalTransaction = true;\n\t\t\t\tt.begin();\n\t\t\t}\n\n\t\t\t// update existing row\n\t\t\tif (row != null) {\n\t\t\t\tString updateSql = update1 + fieldName + update2 + fieldName\n\t\t\t\t\t\t+ valueExtension + update3;\n\t\t\t\tQuery updateQuery = em.createNativeQuery(updateSql);\n\t\t\t\tupdateQuery.setParameter(1, value);\n\t\t\t\tupdateQuery.setParameter(2, entityId);\n\t\t\t\tint result = updateQuery.executeUpdate();\n\t\t\t\tif (result != 1) {\n\t\t\t\t\t// no update?\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// create new row\n\t\t\t// check for existing FieldDataConfig\n\t\t\tFieldConfigInstance configInstance = FieldConfigInstance\n\t\t\t\t\t.findByNameBundle(fieldName, bundle);\n\t\t\tif (configInstance == null) {\n\t\t\t\t// must create new config instance\n\t\t\t\tFieldConfig config = FieldConfig.findByName(fieldName);\n\t\t\t\tif (config == null) {\n\t\t\t\t\t// TODO create new config\n\t\t\t\t\tconfig = new FieldConfig(fieldName, type);\n\t\t\t\t\t// can't do it\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconfigInstance = new FieldConfigInstance(config, bundle);\n\t\t\t\tem.persist(configInstance);\n\t\t\t\tem.flush();\n\t\t\t}\n\t\t\t// insert row\n\t\t\tString insertSql = insert1 + fieldName + insert2 + fieldName\n\t\t\t\t\t+ valueExtension + insert3;\n\t\t\tQuery insertQuery = em.createNativeQuery(insertSql);\n\t\t\tinsertQuery.setParameter(1, Config.BUNDLE_PREFIX + bundle);// bundle\n\t\t\tinsertQuery.setParameter(2, entityId);// entity_id\n\t\t\tinsertQuery.setParameter(3, 0);// delta\n\t\t\tinsertQuery.setParameter(4, value);// value\n\t\t\tint result = insertQuery.executeUpdate();\n\t\t\tif (result != 1) {\n\t\t\t\t// no insert?\n\t\t\t}\n\n\t\t\tif (localTransaction) t.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (localTransaction) t.rollback();\n\t\t}\n\t}", "@Override\n public void changeField (String fieldToModify, String value, Double duration) {\n\n }", "java.lang.String getField1015();", "public String getSQLTimestampFormat();", "public void /*IFieldUpdatingCallback.*/fieldUpdating(Field field) {\n if (field.getType() == FieldType.FIELD_AUTHOR)\n {\n FieldAuthor fieldAuthor = (FieldAuthor) field;\n try {\n fieldAuthor.setAuthorName(\"Updating John Doe\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "java.lang.String getField1712();", "@Override\n public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {\n int number = ((Number) obj).intValue();\n return new StringBuffer(\"$\" + number);\n }", "public String getValueColumn() {\n if (!isDate()) {\n return \"sort_text_value\";\n } else {\n return \"text_value\";\n }\n }", "private Object convertDBToField(Object value, Field field) {\n if(value == null)\n return null;\n \n Class<?> clazz = field.getType();\n \n if(Enum.class.isAssignableFrom(clazz))\n return Enum.valueOf((Class<Enum>)clazz, value.toString());\n \n if(Base.class.isAssignableFrom(clazz))\n return createInstance((Class<? extends Base>)clazz, (DBObject) value);\n \n if(value instanceof BasicDBList) {\n BasicDBList list = (BasicDBList)value;\n\n if(Collection.class.isAssignableFrom(clazz))\n return convertDBToCollectionField(list, field);\n \n if(clazz.isArray())\n return convertDBToArrayField(list, clazz);\n \n return value;\n }\n \n if(value instanceof BasicDBObject) {\n BasicDBObject map = (BasicDBObject)value;\n\n if(Map.class.isAssignableFrom(clazz))\n return convertDBToMapField(map, field);\n \n return value; \n }\n \n return clazz.isPrimitive() ? convertPrimitiveType(value, clazz) : value;\n }", "@Override\n\t\t\tprotected String formatValue(String text) {\n\t\t\t\treturn text.substring(0, text.lastIndexOf('.'));\n\t\t\t}", "java.lang.String getField1362();", "java.lang.String getField1048();", "private String formatSql(String sql) {\n\t\tString sqlStr = formator.format(sql + \";\");\n\t\tif (sqlStr == null) {\n\t\t\tLOGGER.error(\"The formator.format(sql) is a null.\");\n\t\t\treturn null;\n\t\t}\n\n\t\tString trimmedSql = sqlStr.trim();\n\t\tif (!trimmedSql.endsWith(\";\")) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tString formattedSql = trimmedSql.substring(0, trimmedSql.length() - 1);\n\t\treturn formattedSql;\n\t}", "protected abstract String format();", "protected boolean acceptToStringField(Field f)\n\t{\n\t\treturn true;\n\t}", "protected String buildFieldExp(Field field) {\n final StringBuilder sb = new StringBuilder();\n sb.append(field.getDeclaringClass().getSimpleName());\n final Type genericType = field.getGenericType();\n final String typeExp = genericType != null ? genericType.getTypeName() : field.getType().getSimpleName();\n sb.append(\"@\").append(field.getName()).append(\": \").append(typeExp);\n final Class<?> genericBeanType = getFieldGenericType(field);\n sb.append(genericBeanType != null ? \"<\" + genericBeanType.getSimpleName() + \">\" : \"\");\n return sb.toString();\n }", "private String getSQLValueFor(ADemoEntity e, Attribute<? extends IValue> a) {\n\t\t\n\t\tIValue v = e.getValueForAttribute(a);\n\t\t\n\t\tswitch (a.getValueSpace().getType()) {\n\t\t\tcase Continue:\n\t\t\tcase Integer:\n\t\t\t\treturn v.getStringValue();\n\t\t\tcase Nominal:\n\t\t\tcase Order:\n\t\t\tcase Range:\n\t\t\t\treturn \"'\"+v.getStringValue()+\"'\";\n\t\t\tcase Boolean:\n\t\t\t\treturn ((BooleanValue)v).getActualValue()?\"TRUE\":\"FALSE\";\n\t\t\tdefault:\n\t\t\t\tthrow new RuntimeException(\"unknown value type \"+a.getValueSpace().getType());\n\t\t}\n\t\n\t}", "int updateByPrimaryKey(FormatOriginRecord record);", "java.lang.String getField1406();", "String getFormattedString(IRenamable f);", "@Override\n public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc,\n boolean add_fieldname, boolean add_cr ) {\n String retval = \"\";\n\n String fieldname = v.getName();\n int length = v.getLength();\n int precision = v.getPrecision();\n\n if ( add_fieldname ) {\n retval += fieldname + \" \";\n }\n\n int type = v.getType();\n switch ( type ) {\n case ValueMetaInterface.TYPE_DATE:\n retval += \"TIMESTAMP\";\n break;\n case ValueMetaInterface.TYPE_BOOLEAN:\n if ( supportsBooleanDataType() ) {\n retval += \"BOOLEAN\";\n } else {\n retval += \"CHAR(1)\";\n }\n break;\n case ValueMetaInterface.TYPE_NUMBER:\n case ValueMetaInterface.TYPE_INTEGER:\n case ValueMetaInterface.TYPE_BIGNUMBER:\n if ( fieldname.equalsIgnoreCase( tk ) || // Technical key\n fieldname.equalsIgnoreCase( pk ) // Primary key\n ) {\n retval += \"BIGSERIAL\";\n } else {\n if ( length > 0 ) {\n if ( precision > 0 || length > 18 ) {\n // Numeric(Precision, Scale): Precision = total length; Scale = decimal places\n retval += \"NUMERIC(\" + ( length + precision ) + \", \" + precision + \")\";\n } else {\n if ( length > 9 ) {\n retval += \"BIGINT\";\n } else {\n if ( length < 5 ) {\n retval += \"SMALLINT\";\n } else {\n retval += \"INTEGER\";\n }\n }\n }\n\n } else {\n retval += \"DOUBLE PRECISION\";\n }\n }\n break;\n case ValueMetaInterface.TYPE_STRING:\n if ( length < 1 || length >= DatabaseMeta.CLOB_LENGTH ) {\n retval += \"TEXT\";\n } else {\n retval += \"VARCHAR(\" + length + \")\";\n }\n break;\n default:\n retval += \" UNKNOWN\";\n break;\n }\n\n if ( add_cr ) {\n retval += Const.CR;\n }\n\n return retval;\n }", "private static String mapResultSetGetter(final FieldType.Type type) {\n switch (type) {\n case DATE:\n return \"getDate\";\n case INTEGER:\n return \"getInt\";\n case REAL:\n return \"getDouble\";\n case STRING:\n return \"getString\";\n default:\n return null;\n }\n }", "@Override\n public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n return \"\";\n }", "java.lang.String getField1056();", "public String getFormatString() {\n\t\treturn formatString;\n\t}", "public String format(Object obj) throws JDBFException {\r\n if (type == 'N' || type == 'F') {\r\n if (obj == null) {\r\n obj = new Double(0.0D);\r\n }\r\n if (obj instanceof Number) {\r\n Number number = (Number) obj;\r\n StringBuffer stringbuffer = new StringBuffer(getLength());\r\n for (int i = 0; i < getLength(); i++) {\r\n stringbuffer.append(\"#\");\r\n }\r\n\r\n if (getDecimalCount() > 0) {\r\n stringbuffer.setCharAt(getLength() - getDecimalCount() - 1, '.');\r\n }\r\n DecimalFormat decimalformat = new DecimalFormat(stringbuffer.toString(), DFS);\r\n String s1 = decimalformat.format(number);\r\n int k = getLength() - s1.length();\r\n if (k < 0) {\r\n throw new JDBFException(\"Value \" + number + \" cannot fit in pattern: '\" + stringbuffer + \"'.\");\r\n }\r\n StringBuffer stringbuffer2 = new StringBuffer(k);\r\n for (int l = 0; l < k; l++) {\r\n stringbuffer2.append(\" \");\r\n }\r\n\r\n return stringbuffer2 + s1;\r\n } else {\r\n throw new JDBFException(\"Expected a Number, got \" + obj.getClass() + \".\");\r\n }\r\n }\r\n if (type == 'C') {\r\n if (obj == null) {\r\n obj = \"\";\r\n }\r\n if (obj instanceof String) {\r\n String s = (String) obj;\r\n if (s.length() > getLength()) {\r\n throw new JDBFException(\"'\" + obj + \"' is longer than \" + getLength() + \" characters.\");\r\n }\r\n StringBuffer stringbuffer1 = new StringBuffer(getLength() - s.length());\r\n for (int j = 0; j < getLength() - s.length(); j++) {\r\n stringbuffer1.append(' ');\r\n }\r\n\r\n return s + stringbuffer1;\r\n } else {\r\n throw new JDBFException(\"Expected a String, got \" + obj.getClass() + \".\");\r\n }\r\n }\r\n if (type == 'L') {\r\n if (obj == null) {\r\n obj = new Boolean(false);\r\n }\r\n if (obj instanceof Boolean) {\r\n Boolean boolean1 = (Boolean) obj;\r\n return boolean1.booleanValue() ? \"Y\" : \"N\";\r\n } else {\r\n throw new JDBFException(\"Expected a Boolean, got \" + obj.getClass() + \".\");\r\n }\r\n }\r\n if (type == 'D') {\r\n if (obj == null) {\r\n obj = new Date();\r\n }\r\n if (obj instanceof Date) {\r\n Date date = (Date) obj;\r\n SimpleDateFormat simpledateformat = new SimpleDateFormat(\"yyyyMMdd\");\r\n return simpledateformat.format(date);\r\n } else {\r\n throw new JDBFException(\"Expected a Date, got \" + obj.getClass() + \".\");\r\n }\r\n } else {\r\n throw new JDBFException(\"Unrecognized JDBFField type: \" + type);\r\n }\r\n }", "public static String convertColumn2String(Column column) {\n char type = '\\0';\n String result = \"\";\n\n switch (column.type) {\n case STRING:\n type = 's';\n result = (column.value == null? \"\" : column.value.toString());\n break;\n case INT:\n type = 'i';\n int value;\n if (column.value == null)\n value = INT_OFFSET; // we don't really distinguish between zero and null\n else\n value = ((Integer)column.value).intValue() + INT_OFFSET;\n result = String.format(INT_FORMAT_STRING, value);\n break;\n case DOUBLE:\n type = 'd';\n double value2;\n if (column.value == null)\n value2 = INT_OFFSET;\n else\n value2 = ((Double)column.value).doubleValue() + INT_OFFSET;\n result = String.format(DOUBLE_FORMAT_STRING, value2);\n break;\n }\n\n return type + result;\n }", "java.lang.String getField1710();", "String objectOut (JField jf, Object value, MarshalContext context) {\n\t\tString result = value.toString ();\n\t\tif (jf.isDate ()) {\n\t\t\tSimpleDateFormat sdf = context.getDateFormat ();\n\t\t\tif (sdf == null) // the usuals seconds ..\n\t\t\t\tresult = ((java.sql.Timestamp)value).getTime() + \"\";\n\t\t\telse\n\t\t\t\tresult = sdf.format ((java.sql.Timestamp)value);\n\t\t}\n\t\telse if (jf.getObjectType ().equals (\"char\") && result.charAt (0) == (char)0)\n\t\t\tresult = \"\";\n\t\telse if (jf.getObjectType ().equals (\"double\") && result.equals (\"NaN\"))\n\t\t\tresult = \"\";\n\t\treturn result;\n }", "java.lang.String getField1833();", "@SuppressWarnings(value=\"unchecked\")\n public void put(int field$, java.lang.Object value) {\n if (field$ >= 0 && field$ < 8) {\n setDirty(field$) ;\n }\n switch (field$) {\n case 0: defaultLong1 = (java.lang.Long)(value); break;\n case 1: defaultStringEmpty = (java.lang.CharSequence)(value); break;\n case 2: columnLong = (java.lang.Long)(value); break;\n case 3: unionRecursive = (org.apache.gora.cascading.test.storage.TestRow)(value); break;\n case 4: unionString = (java.lang.CharSequence)(value); break;\n case 5: unionLong = (java.lang.Long)(value); break;\n case 6: unionDefNull = (java.lang.Long)(value); break;\n case 7: family2 = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "java.lang.String getField1003();", "static final String typeToString(int type) {\n switch (type) {\n case (UNKNOWN): return \"UNKNOWN\";\n case (STRING_FIELD): return \"STRING_FIELD\";\n case (NUMERIC_FIELD): return \"NUMERIC_FIELD\";\n case (DATE_FIELD): return \"DATE_FIELD\";\n case (TIME_FIELD): return \"TIME_FIELD\";\n case (DATE_TIME_FIELD): return \"DATE_TIME_FIELD\";\n case (TIMESTAMP_FIELD): return \"TIMESTAMP_FIELD\";\n default: return \"NOT_DEFINED\";\n }\n }", "@Field(0) \n\tpublic int format() {\n\t\treturn this.io.getIntField(this, 0);\n\t}", "public String getCreationValue(Object obj, Database db)\r\n throws ReflectiveOperationException {\r\n if (fieldAccess.isConstantGetValue()) {\r\n return (String) getValue(obj);\r\n }\r\n else if (obj != null) {\r\n return db.formatValue(getValue(obj), databaseSetMethod.getParameterTypes()[1], false);\r\n }\r\n else {\r\n return \"?\";\r\n }\r\n }", "private void updateFieldRows(Connection con,\n IdentifiedRecordTemplate template, GenericDataRecord record)\n throws SQLException, FormException, CryptoException {\n PreparedStatement update = null;\n PreparedStatement insert = null;\n \n try {\n update = con.prepareStatement(UPDATE_FIELD);\n int recordId = record.getInternalId();\n String[] fieldNames = record.getFieldNames();\n Map<String, String> rows = new HashMap<String, String>();\n for (String fieldName : fieldNames) {\n Field field = record.getField(fieldName);\n String fieldValue = field.getStringValue();\n \n SilverTrace.debug(\"form\", \"GenericRecordSetManager.updateFieldRows\",\n \"root.MSG_GEN_PARAM_VALUE\", \"fieldName = \" + fieldName\n + \", fieldValue = \" + fieldValue\n + \", recordId = \" + recordId);\n \n rows.put(fieldName, fieldValue);\n }\n \n if (template.isEncrypted()) {\n rows = getEncryptionService().encryptContent(rows);\n }\n \n for (String fieldName : rows.keySet()) {\n String fieldValue = rows.get(fieldName);\n update.setString(1, fieldValue);\n update.setInt(2, recordId);\n update.setString(3, fieldName);\n \n int nbRowsCount = update.executeUpdate();\n if (nbRowsCount == 0) {\n // no row has been updated because the field fieldName doesn't exist in database.\n // The form has changed since the last modification of the record.\n // So we must insert this new field.\n insert = con.prepareStatement(INSERT_FIELD);\n insert.setInt(1, recordId);\n insert.setString(2, fieldName);\n insert.setString(3, fieldValue);\n \n insert.execute();\n }\n }\n } finally {\n DBUtil.close(update);\n DBUtil.close(insert);\n }\n }", "java.lang.String getField1016();", "java.lang.String getField1031();", "@Override\r\n public String getAsText() {\r\n Date value = (Date) getValue();\r\n DateFormat dateFormat = this.dateFormat;\r\n if(dateFormat == null) {\r\n dateFormat = new SimpleDateFormat(TIME_FORMAT);\r\n }\r\n return (value != null ? dateFormat.format(value) : \"\");\r\n }", "public void setField(DatabaseField field) {\n this.field = field;\n }", "@ResponseBody\n @ExceptionHandler(InvalidFieldFormatException.class)\n @ResponseStatus(HttpStatus.BAD_REQUEST)\n String wrongFieldFormatHandler(InvalidFieldFormatException ex) {\n return ex.getMessage();\n }", "java.lang.String getField1702();", "@JsonIgnore\n\tpublic String getJsonUpdateString() {\n\t\ttry {\n\t\t\treturn mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\treturn (\"Failed to serialize statement update to JSON: \" + e.toString());\n\t\t}\n\t}", "private static String formatEntry(Object entry){\n return QUOTE + entry.toString() + QUOTE + DELIM;\n }", "java.lang.String getField1843();", "@Override\r\n public @Nullable String getFormattedText(RenderContext ctx)\r\n {\n String oorPrefix = getOORPrefix(ctx);\r\n String formattedValue = \"\";\r\n Object value = getDisplayValue(ctx);\r\n if (null != value)\r\n {\r\n formattedValue = super.getFormattedText(ctx);\r\n if (null == formattedValue)\r\n formattedValue = ConvertUtils.convert(value);\r\n }\r\n assert null != formattedValue;\r\n return oorPrefix + formattedValue;\r\n }" ]
[ "0.60425717", "0.6009626", "0.59584796", "0.5845358", "0.577254", "0.56785786", "0.56125474", "0.55996585", "0.5588621", "0.54886264", "0.5437965", "0.5421555", "0.53825593", "0.5376186", "0.5367059", "0.52983075", "0.52895206", "0.52513385", "0.52373874", "0.5226786", "0.5222711", "0.5211645", "0.5193224", "0.51788455", "0.51553303", "0.51514775", "0.51419276", "0.51383644", "0.5136896", "0.513004", "0.5114786", "0.51062196", "0.50778556", "0.507465", "0.50736564", "0.50668496", "0.5063445", "0.5039455", "0.50342274", "0.5005565", "0.50021005", "0.49910036", "0.4985332", "0.49662963", "0.49409845", "0.49256167", "0.49088255", "0.4906125", "0.49036413", "0.49015442", "0.48940027", "0.48802534", "0.48778817", "0.48696935", "0.48607838", "0.4851573", "0.48495752", "0.4849509", "0.48491463", "0.4829867", "0.4822221", "0.48220697", "0.48193425", "0.48119006", "0.48084003", "0.47984523", "0.47958094", "0.47921905", "0.4791947", "0.4787822", "0.47841313", "0.47809103", "0.47776693", "0.47732753", "0.47697863", "0.4768614", "0.4768035", "0.47665367", "0.4766353", "0.4766146", "0.4762471", "0.4759161", "0.47526148", "0.4752184", "0.4750726", "0.47487062", "0.47456783", "0.47399676", "0.47370213", "0.4732643", "0.47325298", "0.4731086", "0.4724292", "0.47224748", "0.4719765", "0.47155106", "0.47142094", "0.47123513", "0.4712185", "0.4712102" ]
0.61133635
0
Returns unique name of adapter
public String getName() { return "Database_adapter-"+this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String adapterId() {\n return this.adapterId;\n }", "public String networkAdapterName() {\n return this.networkAdapterName;\n }", "public static String getDeviceName(){\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r\n if (bluetoothAdapter == null){\r\n return \"\";\r\n }else{\r\n String deviceName = bluetoothAdapter.getName();\r\n return deviceName;\r\n }\r\n }", "public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }", "public String getAdapter() {\n return adapter;\n }", "private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }", "public String getName() {\n\t return this.device.getName() + \".\" + this.getType() + \".\"\n\t + this.getId();\n\t}", "private ObjectName getSnmpAdaptorName() throws javax.management.MalformedObjectNameException {\n return new ObjectName(\"Adaptors:protocol=SNMP\");\n }", "public String getName() {\n return (NAME_PREFIX + _applicationId + DELIM + _endpointId);\n }", "public final String getInternalName(){\n return peripheralFriendlyName;\n }", "public String getDeviceName() {\r\n return name_;\r\n }", "public String getName() {\n\t\treturn \"Device\";\r\n\t}", "String getDeviceName();", "public String resolveDriverNameBinding() {\n Optional<String> driverTypeName = cache.values().stream()\n .map(objectCreationExpr -> objectCreationExpr.getType().getNameAsString())\n .findFirst();\n\n return driverTypeName.orElse(null);\n }", "protected String getDriverName() {\n\t\treturn driver.getName();\n\t}", "public String getName() {\n return Utility.getInstance().getPackageName();\n }", "java.lang.String getInstanceName();", "private static String getItemDisplayName(\n ProtocolProviderService provider)\n {\n if(ConfigurationUtils.isAutoAnswerDisableSubmenu())\n return GuiActivator.getResources()\n .getI18NString(\"service.gui.AUTO_ANSWER\")\n + \" - \" + provider.getAccountID().getDisplayName();\n else\n return provider.getAccountID().getDisplayName();\n }", "java.lang.String getConnectionId();", "java.lang.String getConnectionId();", "java.lang.String getConnectionId();", "public String getFriendlyName() {\n return this.bluetoothStack.getLocalDeviceName();\n }", "String getSdkName();", "public abstract String getPeripheralStaticName();", "UUID getConnectorId();", "public CommonAdapter findAdapterByName(final String name) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Find adapter : \" + name);\n }\n return ADAPTERS.get(name);\n }", "protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}", "private String getUserConfiguredDeviceName() {\n\t\tString nameFromSystemDevice = Settings.Secure.getString(getContentResolver(), \"device_name\");\n\t\tif (!isEmpty(nameFromSystemDevice)) return nameFromSystemDevice;\n\t\treturn null;\n\t}", "public Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "public String getImplementationName();", "@Override\n default ManagerPrx ice_adapterId(String newAdapterId)\n {\n return (ManagerPrx)_ice_adapterId(newAdapterId);\n }", "public String GetVersion() {\n\t\tString adapter_version = \"version: \" + adapter_version_;\n\t\treturn adapter_version;\n\t}", "public synchronized String getIdentifier(String adaptorFullPath_p, String owBootstrapName_p)\r\n {\r\n String result = null;\r\n FileInputStream propStream = null;\r\n try\r\n {\r\n Properties currentProperties = adapter2PropsMap.get(adaptorFullPath_p);\r\n if (currentProperties == null)\r\n {\r\n currentProperties = new Properties();\r\n File propFile = new File(getPropertiesFullPath(adaptorFullPath_p));\r\n if (propFile.exists())\r\n {\r\n propStream = new FileInputStream(propFile);\r\n currentProperties.load(propStream);\r\n }\r\n }\r\n result = currentProperties.getProperty(owBootstrapName_p);\r\n }\r\n catch (Exception e)\r\n {\r\n LOG.error(\"Cannot read the mappings!\", e);\r\n }\r\n finally\r\n {\r\n if (propStream != null)\r\n {\r\n try\r\n {\r\n propStream.close();\r\n }\r\n catch (IOException e)\r\n {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n return result;\r\n }", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return this.mName;\n }", "@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }", "String getConnectionAlias();", "String getConnectionAlias();", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\n\t}", "String getPdpName();", "String getCassandraName();", "public String getInternalName();", "@Override\n public String provideCustomerConnectionId( )\n {\n return _signaleur.getGuid( );\n }", "public String getSigAlgName()\n {\n Provider prov = Security.getProvider(BouncyCastleProvider.PROVIDER_NAME);\n\n if (prov != null)\n {\n String algName = prov.getProperty(\"Alg.Alias.Signature.\" + this.getSigAlgOID());\n\n if (algName != null)\n {\n return algName;\n }\n }\n\n Provider[] provs = Security.getProviders();\n\n //\n // search every provider looking for a real algorithm\n //\n for (int i = 0; i != provs.length; i++)\n {\n String algName = provs[i].getProperty(\"Alg.Alias.Signature.\" + this.getSigAlgOID());\n if (algName != null)\n {\n return algName;\n }\n }\n\n return this.getSigAlgOID();\n }", "String getBaseQueueManagerName();", "public static String getNetworkManagerName() {\n \t\treturn getNetworkManagerClass().getSimpleName();\n \t}", "public abstract String getConnectionId();", "public String getInstanceIdentifier();", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }", "public String getFullName() {\n return getAndroidPackage() + \"/\" + getInstrumentationClass();\n }", "public String getIdTypeName() {\n\t\treturn this.getIdType(this.currentClass()).getSimpleName();\n\t}", "public String getMyDeviceName() {\n return bluetoothName;\n }", "public String getProtocolDisplayName()\n {\n String displayName = getAccountID().getAccountPropertyString(ProtocolProviderFactory.PROTOCOL);\n return (displayName == null) ? getProtocolName() : displayName;\n }", "public String getIdentifier() {\n\t\treturn config.getUIName()+\"[\"+getIndex()+\"]\";\n\t}", "public String tagname()\n\t{\n\t\treturn mClient.toString();\n\t}", "protected abstract String getDriverClassName();", "public String getName () {\n return impl.getName ();\n }", "public String getGatewayIdentifier()\n {\n String identifier = null;\n\n switch (this.gatewayProtocol)\n {\n case TCP:\n {\n identifier = \"tcp://\" + this.gatewayIPAddress.getHostAddress()\n + \":\" + this.gatewayPort;\n break;\n }\n case RTU:\n {\n identifier = \"rtu://\" + this.serialParameters.getPortName();\n break;\n }\n case RTU_TCP:\n {\n identifier = \"rtu_tcp://\"\n + this.gatewayIPAddress.getHostAddress() + \":\"\n + this.gatewayPort;\n break;\n }\n case RTU_UDP:\n {\n identifier = \"rtu_udp://\"\n + this.gatewayIPAddress.getHostAddress() + \":\"\n + this.gatewayPort;\n break;\n }\n default:\n {\n // null\n identifier = null;\n break;\n }\n }\n\n return identifier;\n }", "@Override\n public String getConnectionAlias() {\n Object ref = connectionAlias_;\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 connectionAlias_ = s;\n return s;\n }\n }", "@Override\n public String getConnectionAlias() {\n Object ref = connectionAlias_;\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 connectionAlias_ = s;\n return s;\n }\n }", "public String name() {\n return aliases.get(0);\n }", "public String getProviderName(){\n\t\treturn proxy.getName();\n\t}", "String clientTypeName(final int index);", "public String deviceName() {\n\t\t String manufacturer = Build.MANUFACTURER;\n\t\t String model = Build.MODEL;\n\t\t if (model.startsWith(manufacturer)) {\n\t\t return capitalize(model);\n\t\t } else {\n\t\t return capitalize(manufacturer) + \" \" + model;\n\t\t }\n\t\t}", "String getIntegApplicationName();", "public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public final String getFriendlyName(){\n return peripheralFriendlyName;\n }", "public final String mo30096b() {\n try {\n return this.f24822a.getMediationAdapterClassName();\n } catch (RemoteException e) {\n zzbad.m26360d(\"#007 Could not call remote method.\", e);\n return \"\";\n }\n }", "public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}", "public static String getDeviceName() {\n\t\t\tString manufacturer = Build.MANUFACTURER;\n\t\t\tString model = Build.MODEL;\n\t\t\tif (model.startsWith(manufacturer)) {\n\t\t\t\treturn capitalize(model);\n\t\t\t}\n\t\t\treturn capitalize(manufacturer) + \" \" + model;\n\t\t}", "@Override\n default IServerPrx ice_adapterId(String newAdapterId)\n {\n return (IServerPrx)_ice_adapterId(newAdapterId);\n }", "public String getConnectionAlias() {\n Object ref = connectionAlias_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n connectionAlias_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getConnectionAlias() {\n Object ref = connectionAlias_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n connectionAlias_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@Override\n\tpublic String getDeviceName() {\n\t\treturn null;\n\t}", "public String getDriverName() {\n return driverName;\n }", "public abstract String getUsageName();", "String getUuid();", "public String getDeviceName() {\n return mUsbDevice.getDeviceName();\n }", "java.lang.String getDeviceId();", "org.hl7.fhir.String getDeviceIdentifier();", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "protected String getObjectName()\n\t{\n\t\treturn (\"Ext.TabPanelItem\") ;\n\t}", "public String getName() {\r\n \treturn this.getClass().getName();\r\n }", "@Override\n public String getDeviceName() {\n return null;\n }", "@Override\n default UserpostPrx ice_adapterId(String newAdapterId)\n {\n return (UserpostPrx)_ice_adapterId(newAdapterId);\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n }\n return capitalize(manufacturer) + \" \" + model;\n }", "String getDeviceName() {\n return deviceName;\n }", "protected abstract String getDatasourceName();", "public static String getName(){\n return \"VoIP\";\n }", "private String getWifiCarrierName() {\n WifiManager wifiManager =\n (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n if (wifiInfo != null) {\n return wifiInfo.getSSID();\n }\n return null;\n }", "public String getDeviceName(){\n\t return deviceName;\n }", "@Override\n\t\tpublic <T> T getAdapter(Class<T> adapter) {\n\t\t\treturn null;\n\t\t}", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "public String getDeviceName(){\n\t\treturn deviceName;\n\t}", "public String getName(){\n\t\treturn arr.getClass().getSimpleName();\n\t}", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "public String getNameKey() {\n return getName();\n }" ]
[ "0.70668066", "0.67893183", "0.67445993", "0.6498644", "0.6453069", "0.6313172", "0.6178478", "0.60431105", "0.6035273", "0.59999275", "0.59154844", "0.5912238", "0.5910917", "0.5875842", "0.5869303", "0.5865641", "0.58351", "0.5799074", "0.57934064", "0.57934064", "0.57934064", "0.57825536", "0.5777963", "0.5759026", "0.57432866", "0.57430524", "0.5725916", "0.56819594", "0.565546", "0.56275475", "0.5624752", "0.5622437", "0.5611179", "0.5601805", "0.55906576", "0.55861616", "0.55861616", "0.55856854", "0.55856854", "0.5571239", "0.5558605", "0.5556502", "0.5552037", "0.55443096", "0.55383617", "0.5518203", "0.5514577", "0.5509399", "0.5499665", "0.54969347", "0.549276", "0.5486052", "0.5478625", "0.5477744", "0.54739106", "0.54708225", "0.5468483", "0.54666835", "0.5451751", "0.54511577", "0.54511577", "0.54469097", "0.54393363", "0.5435349", "0.54305273", "0.54240817", "0.54172426", "0.54123825", "0.5399695", "0.5399531", "0.5394473", "0.53913975", "0.5387308", "0.5387308", "0.53866374", "0.5386543", "0.53846484", "0.5382477", "0.5379151", "0.53766364", "0.537566", "0.5375086", "0.5373436", "0.5366318", "0.53608567", "0.53546107", "0.5352773", "0.5352655", "0.53526527", "0.5350799", "0.5345805", "0.5345468", "0.5344661", "0.533461", "0.533461", "0.533101", "0.5330776", "0.532556", "0.53237575", "0.5312034" ]
0.7595347
0
Returns path which System logger uses to write messages, related to this adapter
public String getSyslogPath() { return LoggerApplication.getInstance().getLogPath()+"/db/"+this.getName()+"/"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getApplicationDirectory() {\n return Comm.getAppHost().getAppLogDirPath();\n }", "public String getLogCollectionPath();", "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "Path getLogFilePath();", "private StringBuffer getLogDirectory() {\n final StringBuffer directory = new StringBuffer();\n directory.append(directoryProvider.get());\n if (directory.charAt(directory.length() - 1) != File.separatorChar) {\n directory.append(File.separatorChar);\n }\n return directory;\n }", "protected String getLogFile(final ChannelInfo channel) {\n final StringBuffer directory = getLogDirectory();\n final StringBuffer file = new StringBuffer();\n if (channel.getParser() != null) {\n addNetworkDir(directory, file, channel.getParser().getNetworkName());\n }\n file.append(sanitise(channel.getName().toLowerCase()));\n return getPath(directory, file, channel.getName());\n }", "public String getCallLogsDatabasePath();", "public String getLog4jFilePath(){\r\n\t\t return rb.getProperty(\"log4jFilepath\");\r\n\t}", "public String getLogDestination() {\n return this.logDestination;\n }", "public File getLogDir() {\n return logDir;\n }", "public String getTimeStampedLogPath() {\n\t\treturn m_timeStampedLogPath;\n\t}", "@Override\n\tpublic String getLogFileName() {\n\t\treturn model.getLogFileName();\n\t}", "abstract protected String getLogFileName();", "public String genLogFilePath() {\n\n\t\tString logFileName = generateFileName();\n\t\tString logFilePath = FileIoUtils.getLogFilePathPrefix(logFileName)\n\t\t\t\t+ \"/\" + logFileName;\n\t\treturn logFilePath;\n\n\t}", "public static File getLogDirectory() {\n\t\treturn LOG_DIRECTORY;\n\t}", "public String getLogfileLocation() {\n return logfileLocation;\n }", "protected String getLogFile(final ClientInfo client) {\n final StringBuffer directory = getLogDirectory();\n final StringBuffer file = new StringBuffer();\n if (client.getParser() != null) {\n addNetworkDir(directory, file, client.getParser().getNetworkName());\n }\n file.append(sanitise(client.getNickname().toLowerCase()));\n return getPath(directory, file, client.getNickname());\n }", "protected String getLogFile(@Nullable final String descriptor) {\n final StringBuffer directory = getLogDirectory();\n final StringBuffer file = new StringBuffer();\n final String md5String;\n if (descriptor == null) {\n file.append(\"null.log\");\n md5String = \"\";\n } else {\n file.append(sanitise(descriptor.toLowerCase()));\n md5String = descriptor;\n }\n return getPath(directory, file, md5String);\n }", "final public static LogDestination getLogDestination() {\n\t\treturn logger.getLogDestinationImpl();\n\t}", "public static String getPropertyPath(){\n\t\tString path = System.getProperty(\"user.dir\") + FILE_SEP + propertyName;\r\n\t\tLOGGER.info(\"properties path: \" + path);\r\n\t\treturn path;\r\n\t}", "String getApplicationContextPath();", "public String getLogFile() {\n return logFile;\n }", "public String getLogFile() {\n return agentConfig.getLogFile();\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public String getOutputLogFilename() {\n return outputLogFilename;\n }", "public String getPath() {\n switch(this) {\n case USER: return \"users\";\n case GROUP: return \"groups\";\n case CLIENT: return \"clients\";\n case IDP: return \"identity-provider-settings\";\n case REALM_ROLE: return \"realms\";\n case CLIENT_ROLE: return \"clients\";\n default: return \"\";\n }\n }", "protected String path() {\n return path(getName());\n }", "@Override\n public String getSystemDir() {\n return null;\n }", "public IPath getLogLocation() throws IllegalStateException {\n \t\t//make sure the log location is initialized if the instance location is known\n \t\tif (isInstanceLocationSet())\n \t\t\tassertLocationInitialized();\n \t\tFrameworkLog log = Activator.getDefault().getFrameworkLog();\n \t\tif (log != null) {\n \t\t\tjava.io.File file = log.getFile();\n \t\t\tif (file != null)\n \t\t\t\treturn new Path(file.getAbsolutePath());\n \t\t}\n \t\tif (location == null)\n \t\t\tthrow new IllegalStateException(CommonMessages.meta_instanceDataUnspecified);\n \t\treturn location.append(F_META_AREA).append(F_LOG);\n \t}", "public String getSystemPath() throws PropertyDoesNotExistException {\r\n\t\tif (this.settings.containsKey(\"systemPath\")) {\r\n\t\t\treturn this.settings.getProperty(\"systemPath\");\r\n\t\t}\r\n\t\tthrow new PropertyDoesNotExistException(\"Can't find property 'systemPath'\");\r\n\t}", "@Override\n\tpublic File getDefaultLogFile() {\n\t\tif (SystemUtils.IS_OS_WINDOWS) {\n\t\t\tfinal File[] foundFiles = getLogDirInternal().listFiles(new FilenameFilter() {\n\t\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\t\treturn name.startsWith(\"catalina.\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tArrays.sort(foundFiles, NameFileComparator.NAME_COMPARATOR);\n\t\t\tif (foundFiles.length > 0) {\n\t\t\t\treturn foundFiles[foundFiles.length - 1];\n\t\t\t}\n\t\t}\n\t\treturn super.getDefaultLogFile();\n\t}", "@Override\r\n\tpublic Logger getLogger() {\r\n\t\t\r\n\t\treturn LogFileGenerator.getLogger();\r\n\t\t\r\n\t}", "private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}", "@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }", "private static String computeLoggerPrefix(String contextPath) {\n return contextPath.length() > 0 \n ? contextPath.substring(1).replace('/', '_').concat(\".\") // NOI18N\n : \"ROOT.\"; // NOI18N\n }", "public String getPathFileOut() {\r\n\t\treturn pathFileOut;\r\n\t}", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "@Override\r\n\tpublic String getErrorPath() {\n\t\treturn PATH;\r\n\t}", "Object getRelativeToChangelogFile();", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }", "public String toString() {\r\n return fileSystem.getCurrentDirectory().toString();\r\n }", "public String getPathName() {\n if (pathName == null) {\n if (isWindows()) {\n for (String key : getEnv().keySet()) {\n if (key.toLowerCase(Locale.getDefault()).equals(\"path\")) { // NOI18N\n pathName = key.substring(0, 4);\n return pathName;\n }\n }\n }\n pathName = \"PATH\"; // NOI18N\n }\n return pathName;\n }", "public static String getLogTarget()\n {\n return BaseBoot.getInstance().getGlobalConfig().getConfigProperty\n (LOGTARGET, LOGTARGET_DEFAULT);\n }", "public String getLog();", "String getDirectoryPath();", "@Override\n public String getErrorPath() {\n return ERROR_PATH;\n }", "public List<String> logDirectories() {\n return this.logDirectories;\n }", "private static String getDirectoryPath() {\n // Replace the path here with your own\n File file = new File(Environment.getExternalStorageDirectory(),\n \"/GenericAndroidSoundboard/Audio/\");\n // Create the directory if it doesn't exist\n if (!file.exists()) {\n file.mkdirs();\n }\n\n // Get the path to the newly created directory\n return Environment.getExternalStorageDirectory()\n .getAbsolutePath() + \"/GenericAndroidSoundboard/Audio/\";\n }", "private void logInfo(){\n var f = new java.io.File(\".\");\n try {\n logger.info(\".=\" + f.getCanonicalPath());\n } catch (IOException e) {\n logger.error(\"Cannot get canonical path of .\");\n }\n logger.info(\"user.dir=\" + System.getProperty(\"user.dir\"));\n logger.info(\"isMacOSX = \"+ String.valueOf(isMacOSX()));\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "public String getReportPath();", "public String getOutputPath () \n\t{\n\t\treturn outputPathTextField.getText();\n\t}", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getPath(Context ctx)\n {\n return Environment.getExternalStorageDirectory() + \"/\" + ctx.getApplicationInfo().packageName.replaceAll(\"\\\\.\", \"\") + \"/\";\n }", "@Override\n public String getTempDir() {\n return Comm.getAppHost().getTempDirPath();\n }", "String getContextPath();", "String getContextPath();", "String getContextPath();", "public String path() {\n return filesystem().pathString(path);\n }", "protected String getPath ()\n\t{\n\t\treturn path;\n\t}", "public static Logger get() {\n\t\treturn LoggerFactory.getLogger(WALKER.getCallerClass());\n\t}", "String getApplicationContextPhyPath()\n {\n return configfile.application_context_phy_path;\n }", "public String getAppPathname();", "public void setCallLogsDatabasePath(String path);", "private String getAndroidResourcePathFromSystemProperty() {\n String resourcePath = System.getProperty(\"android.sdk.path\");\n if (resourcePath != null) {\n return new File(resourcePath, getAndroidResourceSubPath()).toString();\n }\n return null;\n }", "public String toPathString() {\n return path();\n }", "private String getPathToMetricsResults() {\n\t\treturn pathToMetricsResults.getText();\n\t}", "public static String getUserNotificationsRootPath(int userId) {\n return String.format(\"%s.notifications\", getUserPath(userId));\n }", "public void setLogCollectionPath(String path);", "@Override\n\tpublic String toString() {\n\t\treturn getFullPath();\n\t}", "@DISPID(19)\r\n\t// = 0x13. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.lang.String logFilename();", "public String getInputLogFilename() {\n return inputLogFilename;\n }", "public String getConsistencyFilePath()\n {\n String consistency_file_path = getPreferenceStore().getString(CONSISTENCY_FILE_PATH);\n return consistency_file_path;\n }", "abstract public String getRingResourcesDir();", "public String getPath(){\r\n\t\treturn path;\r\n\t}", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "private Logger configureLogging() {\r\n\t Logger rootLogger = Logger.getLogger(\"\");\r\n\t rootLogger.setLevel(Level.FINEST);\r\n\r\n\t // By default there is one handler: the console\r\n\t Handler[] defaultHandlers = Logger.getLogger(\"\").getHandlers();\r\n\t defaultHandlers[0].setLevel(Level.CONFIG);\r\n\r\n\t // Add our logger\r\n\t Logger ourLogger = Logger.getLogger(serviceLocator.getAPP_NAME());\r\n\t ourLogger.setLevel(Level.FINEST);\r\n\t \r\n\t // Add a file handler, putting the rotating files in the tmp directory \r\n\t // \"%u\" a unique number to resolve conflicts, \"%g\" the generation number to distinguish rotated logs \r\n\t try {\r\n\t Handler logHandler = new FileHandler(\"/%h\"+serviceLocator.getAPP_NAME() + \"_%u\" + \"_%g\" + \".log\",\r\n\t 1000000, 3);\r\n\t logHandler.setLevel(Level.FINEST);\r\n\t ourLogger.addHandler(logHandler);\r\n\t logHandler.setFormatter(new Formatter() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String format(LogRecord record) {\r\n\t\t\t\t\t\tString result=\"\";\r\n\t\t\t\t\t\tif(record.getLevel().intValue() >= Level.WARNING.intValue()){\r\n\t\t\t\t\t\t\tresult += \"ATTENTION!: \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MMM-yyyy HH:mm:ss\");\r\n\t\t\t\t\t\tDate d = new Date(record.getMillis());\r\n\t\t\t\t\t\tresult += df.format(d)+\" \";\r\n\t\t\t\t\t\tresult += \"[\"+record.getLevel()+\"] \";\r\n\t\t\t\t\t\tresult += this.formatMessage(record);\r\n\t\t\t\t\t\tresult += \"\\r\\n\";\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t } catch (Exception e) { // If we are unable to create log files\r\n\t throw new RuntimeException(\"Unable to initialize log files: \"\r\n\t + e.toString());\r\n\t }\r\n\r\n\t return ourLogger;\r\n\t }", "Path getWritePath()\n {\n return writePath;\n }", "public final String getPath()\n {\n return path;\n }", "public String getOutputPath()\n {\n return __m_OutputPath;\n }", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n\t\t\treturn path;\r\n\t\t}", "public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }", "public String getPath();", "public String getPath();", "public String getPath();", "public String getLoggerName()\n\t{\n\t\treturn this.loggerName;\n\t}", "public String getAppendedPath() {\n return appendedPath;\n }" ]
[ "0.6548512", "0.65028036", "0.6477337", "0.63009095", "0.6248265", "0.6167091", "0.6153711", "0.6133123", "0.61052823", "0.5875629", "0.5856919", "0.58427244", "0.5816785", "0.57964", "0.573773", "0.56886613", "0.5683397", "0.56565416", "0.56146675", "0.5607605", "0.5593923", "0.5584409", "0.5572571", "0.55451995", "0.5536116", "0.55358577", "0.5484614", "0.54720235", "0.5437931", "0.5437372", "0.5426738", "0.5422196", "0.54065555", "0.5371022", "0.536229", "0.53565717", "0.53438437", "0.5328884", "0.5320124", "0.53195965", "0.5308151", "0.5305972", "0.53043574", "0.5297063", "0.5297063", "0.5297063", "0.5297063", "0.5292207", "0.5291627", "0.528993", "0.528837", "0.5284029", "0.5268555", "0.5261196", "0.52567", "0.52433246", "0.52425826", "0.5239512", "0.52386326", "0.5232445", "0.52305645", "0.52172935", "0.5190672", "0.5180126", "0.5180126", "0.5180126", "0.5179579", "0.51793563", "0.51643026", "0.5161652", "0.51511014", "0.51507455", "0.51496047", "0.5120491", "0.51181275", "0.5111082", "0.51033473", "0.5101562", "0.50996226", "0.5098518", "0.5097221", "0.5093988", "0.50833774", "0.507838", "0.50781214", "0.5078023", "0.5076104", "0.5072913", "0.5066141", "0.5058412", "0.5050094", "0.5044289", "0.5044289", "0.50396866", "0.50389516", "0.50370985", "0.50370985", "0.50370985", "0.50262475", "0.5022483" ]
0.72239476
0
Method used to manually assing System logger object to this adapter
public void setSyslog(ISyslog syslog) { this.syslog = syslog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private native void initialiseLoggerReference(Logger logger);", "private native void initialiseLoggerReference(Logger logger);", "public SystemLog () {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void initLogger() {\n\t\t\n\t}", "public static void initLogger(Logger l_) {\n l = l_;\n }", "private void internalInitializeLogger( final Logger logger ) {\n \n java.security.AccessController.doPrivileged(\n new java.security.PrivilegedAction<Object>() {\n public Object run() {\n // Explicitly remove all handlers.\n for (Handler h : logger.getHandlers()) {\n logger.removeHandler(h);\n }\n\n logger.setUseParentHandlers(false);\n for (Handler handler : handlers) {\n logger.addHandler(handler); \n }\n\n Level logLevel = getConfiguredLogLevel(logger.getName());\n if( logLevel != null ) {\n logger.setLevel( logLevel );\n }\n postInitializeLogger( logger );\n return null;\n }\n }\n );\n }", "protected synchronized void initializeLogger(Logger logger) {\n\n if( config==null) {\n _unInitializedLoggers.add( logger );\n } else {\n internalInitializeLogger( logger ); \n }\n }", "private void initLogger(BundleContext bc) {\n\t\tBasicConfigurator.configure();\r\n\t\tlogger = Logger.getLogger(Activator.class);\r\n\t\tLogger.getLogger(\"org.directwebremoting\").setLevel(Level.WARN);\r\n\t}", "private void init() {\r\n this.log = this.getLog(LOGGER_MAIN);\r\n\r\n if (!(this.log instanceof org.apache.commons.logging.impl.Log4JLogger)) {\r\n throw new IllegalStateException(\r\n \"LogUtil : apache Log4J library or log4j.xml file are not present in classpath !\");\r\n }\r\n\r\n // TODO : check if logger has an appender (use parent hierarchy if needed)\r\n if (this.log.isWarnEnabled()) {\r\n this.log.warn(\"LogUtil : logging enabled now.\");\r\n }\r\n\r\n this.logBase = this.getLog(LOGGER_BASE);\r\n this.logDev = this.getLog(LOGGER_DEV);\r\n }", "public FlywayLog4j2Adapter( Class<?> clazz ) {\n this.logger = LogManager.getLogger( clazz );\n }", "public MyLoggingFacade(Logger logger) {\n this.logger = logger;\n }", "public void configLogger() {\n Logger.addLogAdapter(new AndroidLogAdapter());\n }", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void initLogger() {\n initLogger(\"DEBUG\");\n }", "public DoSometime logger(APSLogger logger) {\n this.logger = logger;\n return this;\n }", "public StandardPirolPlugIn(PersonalLogger logger) {\r\n super();\r\n this.logger = logger;\r\n }", "private void initLoggers() {\n _logger = LoggerFactory.getInstance().createLogger();\n _build_logger = LoggerFactory.getInstance().createAntLogger();\n }", "private void setupLogging() {\n\t\t// Ensure all JDK log messages are deferred until a target is registered\n\t\tLogger rootLogger = Logger.getLogger(\"\");\n\t\tHandlerUtils.wrapWithDeferredLogHandler(rootLogger, Level.SEVERE);\n\n\t\t// Set a suitable priority level on Spring Framework log messages\n\t\tLogger sfwLogger = Logger.getLogger(\"org.springframework\");\n\t\tsfwLogger.setLevel(Level.WARNING);\n\n\t\t// Set a suitable priority level on Roo log messages\n\t\t// (see ROO-539 and HandlerUtils.getLogger(Class))\n\t\tLogger rooLogger = Logger.getLogger(\"org.springframework.shell\");\n\t\trooLogger.setLevel(Level.FINE);\n\t}", "public void setLogger(Logger logger)\n {\n this.logger = logger;\n }", "private void initCemsLogger() {\n if (logger == null) {\n final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n final Formatter formatter = new Formatter() {\n @Override\n public String format(LogRecord record) {\n final StringBuilder sb = new StringBuilder();\n sb.append(dateFormat.format(new Date(record.getMillis())));\n sb.append(\" - \");\n sb.append(record.getLevel().getName());\n sb.append(\": \");\n sb.append(record.getMessage());\n sb.append(\"\\n\");\n @SuppressWarnings(\"ThrowableResultOfMethodCallIgnored\")\n final Throwable thrown = record.getThrown();\n if (thrown != null) {\n sb.append(thrown.toString());\n sb.append(\"\\n\");\n }\n return sb.toString();\n }\n };\n\n final ConsoleHandler handler = new ConsoleHandler();\n handler.setFormatter(formatter);\n handler.setLevel(Level.ALL);\n\n logger = Logger.getLogger(\"ga.cems\");\n final Handler[] handlers = logger.getHandlers();\n for (Handler h : handlers) {\n logger.removeHandler(h);\n }\n\n logger.setUseParentHandlers(false);\n logger.addHandler(handler);\n }\n// logger.setLevel(Level.INFO);\n logger.setLevel(logLevel);\n }", "public Log(Logger logger) {\n this.logger = logger;\n }", "private void initLog() {\n _logsList = (ListView) findViewById(R.id.lv_log);\n setupLogger();\n }", "public XLogger(Logger logger) {\n // If class B extends A, assuming B does not override method x(), the caller\n // of new B().x() is A and not B, see also\n // http://jira.qos.ch/browse/SLF4J-105\n super(logger, LoggerWrapper.class.getName());\n }", "public LoggerProxy(org.jboss.logging.Logger logger)\n/* */ {\n/* 23 */ this.logger = logger;\n/* */ }", "@Override\n\tprotected void initial() throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}", "void initializeLogging();", "@Override\n public MagicLogger getLogger() {\n return logger;\n }", "private ExtentLogger() {}", "protected void changeLogger(org.jboss.logging.Logger theLogger)\n/* */ {\n/* 187 */ this.logger = theLogger;\n/* */ }", "@Override\n protected Logger getLogger() {\n return LOGGER;\n }", "public void setLogger(Logger logger) {\n this.logger = logger;\n }", "private void initLoggers()\n {\n Logger.getSharedInstance();\n\n for (Logger logger : Logger.getAllLoggers())\n {\n String key = \"Loggers/\" + logger.getNamespace();\n Level desired;\n\n if (!SmartDashboard.containsKey(key))\n {\n // First time this logger has been sent to SmartDashboard\n SmartDashboard.putString(key, logger.getLogLevel().name());\n desired = Level.DEBUG;\n }\n else\n {\n String choice = SmartDashboard.getString(key, \"DEBUG\");\n Level parsed = Level.valueOf(choice);\n if (parsed == null)\n {\n m_logger.error(\"The choice '\" + choice + \"' for logger \" + logger.getNamespace() + \" isn't a valid value.\");\n desired = Level.DEBUG;\n }\n else\n {\n desired = parsed;\n }\n }\n logger.setLogLevel(desired);\n }\n }", "private static void systemlog(LogType t, String msg) {\n if (syslog != null) {\n switch (t) {\n case TRACE:\n syslog.trace(msg);\n break;\n case DEBUG:\n syslog.debug(msg);\n break;\n case INFO:\n syslog.info(msg);\n break;\n case WARN:\n syslog.warn(msg);\n break;\n case ERROR:\n syslog.error(msg);\n }\n return;\n }\n logHold.add(new LogMsg(t, msg));\n }", "Object createLogger(String name);", "private void initJulLogger() {\n SLF4JBridgeHandler.removeHandlersForRootLogger();\n SLF4JBridgeHandler.install();\n }", "abstract void initiateLog();", "private void initLogger() {\n\t\ttry {\n\t\t\tjava.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger(\"\");\n\t\t\trootLogger.setUseParentHandlers(false);\n\t\t\tHandler csvFileHandler = new FileHandler(\"logger/log.csv\", 100000, 1, true);\n\t\t\tlogformater = new LogFormatter();\n\t\t\trootLogger.addHandler(csvFileHandler);\n\t\t\tcsvFileHandler.setFormatter(logformater);\n\t\t\tlogger.setLevel(Level.ALL);\n\t\t} catch (IOException ie) {\n\t\t\tSystem.out.println(\"Logger initialization failed\");\n\t\t\tie.printStackTrace();\n\t\t}\n\t}", "@Inject\n private void setLogger(Logger log) {\n logger = log;\n }", "ExtendedCommonLogger() {\n this.msgbuf = new byte[128];\n }", "public void customLogger() {\n KOOM.getInstance().setLogger(new KLog.KLogger() {\n @Override\n public void i(String TAG, String msg) {\n //get the log of info level\n }\n\n @Override\n public void d(String TAG, String msg) {\n //get the log of debug level\n }\n\n @Override\n public void e(String TAG, String msg) {\n //get the log of error level\n }\n });\n }", "public void setLogObject(Log logObject_) {\n\t\tlogObject = logObject_;\n\t\tlog( \"deviceId \" + deviceId, Log.Level.Information );\n\t\tlog( \"location \" + location, Log.Level.Information );\n\t}", "private synchronized ILogger _getAlertLogger()\n {\n if( alertlogger == null )\n alertlogger = ClearLogFactory.getLogger( ClearLogFactory.ALERT_LOG,\n this.getClass() );\n return alertlogger;\n }", "private static void prepareLoggingSystemEnviroment() {\n\t\t// property configuration relies on this parameter\n\t\tSystem.setProperty(\"log.directory\", getLogFolder());\n\t\t//create the log directory if not yet existing:\n\t\t//removed code as log4j is now capable of doing that automatically\n\t}", "public void setLogger(PersonalLogger logger) {\r\n this.logger = logger;\r\n }", "private static Log getLog() {\n if (log == null) {\n log = new SystemStreamLog();\n }\n\n return log;\n }", "private Log() {\r\n\t}", "public void setLogUtilities(LogUtilities log) { this.log = log; }", "@Override\n\tprotected Logger getLogger() {\n\t\treturn HMetis.logger;\n\t}", "public LogKitLogger(String name)\n/* */ {\n/* 64 */ this.name = name;\n/* 65 */ this.logger = getLogger();\n/* */ }", "protected Logger getLogger() {\n return (logger);\n }", "public void enableLogging(Logger logger) {\n m_logger = logger;\n }", "protected AbstractLogger() {\n \n }", "private static synchronized Logger initializeLogger(String path) {\r\n\t\tLogger logger = Logger.getLogger(\"Logging\");\r\n\t\tlogger.removeAllAppenders();\r\n\t\tLogger.getRootLogger().removeAllAppenders();\r\n\t\tFileAppender logAppender = null;\r\n\t\tLayout layout = new PatternLayout(\"%d [%M]: %m%n\");\r\n\t\ttry {\r\n\t\t\tlogAppender = new FileAppender(layout, path);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Problems creating log file...\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tlogger.addAppender(logAppender);\r\n\t\tConsoleAppender consoleAppender = new ConsoleAppender(layout);\r\n\t\tlogger.addAppender(consoleAppender);\r\n\t\tlogger.setLevel(DEBUG);\r\n\t\treturn logger;\r\n\t}", "private JavaUtilLogHandlers() { }", "private static void setupLogger() {\n\t\tLogManager.getLogManager().reset();\n\t\t// set the level of logging.\n\t\tlogger.setLevel(Level.ALL);\n\t\t// Create a new Handler for console.\n\t\tConsoleHandler consHandler = new ConsoleHandler();\n\t\tconsHandler.setLevel(Level.SEVERE);\n\t\tlogger.addHandler(consHandler);\n\n\t\ttry {\n\t\t\t// Create a new Handler for file.\n\t\t\tFileHandler fHandler = new FileHandler(\"HQlogger.log\");\n\t\t\tfHandler.setFormatter(new SimpleFormatter());\n\t\t\t// set level of logging\n\t\t\tfHandler.setLevel(Level.FINEST);\n\t\t\tlogger.addHandler(fHandler);\n\t\t}catch(IOException e) {\n\t\t\tlogger.log(Level.SEVERE, \"File logger not working! \", e);\n\t\t}\n\t}", "public ModularConfiguration(Logger logger) {\n this.logger = logger;\n }", "protected abstract ILogger getLogger();", "public void setLog (Logger log) {\n this.log = log;\n }", "public SystemLogMessage() {\n\t\tthis.setVersion(Constants.VERSION);\t\t\t\t\t\t\t\t//version is universal for all log messages\n\t\tthis.setCertifiedDatatype(Constants.SYSTEM_LOG_OID);\t\t\t//certifiedDataType is the OID, for all transaction logs it is the same\n\t\t\n\t\t//algorithm parameter has to be set using the LogMessage setAlgorithm method.\n\t\t//the ERSSpecificModule has to set the algorithm\n\t\t//serial number has to be set by someone who has access to it \n\t}", "private void postInitializeLogger( final Logger logger ) {\n final Handler customHandler = getCustomHandler( );\n final Filter customFilter = getCustomFilter( );\n if( ( customHandler == null)\n &&( customFilter == null ) ) {\n return;\n }\n java.security.AccessController.doPrivileged(\n new java.security.PrivilegedAction<Object>() {\n public Object run() {\n if( customHandler != null ) {\n logger.addHandler( customHandler );\n }\n if( customFilter != null ) {\n logger.setFilter( customFilter );\n }\n return null;\n }\n }\n );\n }", "public Logger getLogger()\n/* */ {\n/* 77 */ if (this.logger == null) {\n/* 78 */ this.logger = Hierarchy.getDefaultHierarchy().getLoggerFor(this.name);\n/* */ }\n/* 80 */ return this.logger;\n/* */ }", "public abstract WriteResult writeSystemLog(Log log);", "@Override\n public void initializeLogging() {\n // Wraps Android's native log framework.\n LogWrapper logWrapper = new LogWrapper();\n // Using Log, front-end to the logging chain, emulates android.util.log method signatures.\n Log.setLogNode(logWrapper);\n\n // Filter strips out everything except the message text.\n MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();\n logWrapper.setNext(msgFilter);\n\n // On screen logging via a fragment with a TextView.\n //LogFragment logFragment = (LogFragment) getSupportFragmentManager()\n // .findFragmentById(R.id.log_fragment);\n //msgFilter.setNext(logFragment.getLogView());\n\n mLogFragment = (LogFragment) getSupportFragmentManager()\n .findFragmentById(R.id.log_fragment);\n msgFilter.setNext(mLogFragment.getLogView());\n\n Log.i(TAG, \"Ready\");\n }", "abstract public LoggingService getLoggingService();", "public Logger logger()\n\t{\n\t\tif (logger == null)\n\t\t{\n\t\t\tlogger = new Logger(PluginRegionBlacklist.this.getClass().getCanonicalName(), null)\n\t\t\t{\n\t\t\t\tpublic void log(LogRecord logRecord)\n\t\t\t\t{\n\n\t\t\t\t\tlogRecord.setMessage(loggerPrefix + logRecord.getMessage());\n\t\t\t\t\tsuper.log(logRecord);\n\t\t\t\t}\n\t\t\t};\n\t\t\tlogger.setParent(getLogger());\n\t\t}\n\t\treturn logger;\n\t}", "private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }", "public static final void onInit() {\r\n if (FORCE_APACHE_COMMONS_LOGGING_DIAGNOSTICS) {\r\n /**\r\n * The name (<code>org.apache.commons.logging.diagnostics.dest</code>) of the property used to\r\n * enable internal commons-logging diagnostic output, in order to get information on what\r\n * logging implementations are being discovered, what classloaders they are loaded through,\r\n * etc.\r\n * <p>\r\n * If a system property of this name is set then the value is assumed to be the name of a\r\n * file. The special strings STDOUT or STDERR (case-sensitive) indicate output to System out\r\n * and System err respectively.\r\n * <p>\r\n * Diagnostic logging should be used only to debug problematic configurations and should not\r\n * be set in normal production use.\r\n */\r\n System.setProperty(\"org.apache.commons.logging.diagnostics.dest\", \"STDOUT\");\r\n }\r\n }", "public static void initialize(){\n Logger logger = Logger.getLogger(\"\");\n\n //from: http://stackoverflow.com/questions/6029454/disabling-awt-swing-debug-fine-log-messages\n Logger.getLogger(\"java.awt\").setLevel(Level.OFF);\n Logger.getLogger(\"sun.awt\").setLevel(Level.OFF);\n Logger.getLogger(\"sun.lwawt\").setLevel(Level.OFF);\n Logger.getLogger(\"javax.swing\").setLevel(Level.OFF);\n\n if (uiLoggerFormatter==null){\n uiLoggerFormatter = new SimpleFormatter();\n }\n\n if (consoleLoggerFormatter==null){\n consoleLoggerFormatter = new SimpleFormatter();\n }\n Handler[] handlers = logger.getHandlers();\n // suppress the logging output to the console\n if (!enableConsoleLogger){\n if (handlers[0] instanceof ConsoleHandler) {\n logger.removeHandler(handlers[0]);\n }\n }\n else{\n if (handlers[0] instanceof ConsoleHandler) {\n handlers[0].setFormatter(consoleLoggerFormatter);\n }\n }\n\n setLevel(lvl);\n\n if(fileHandler!=null){\n if (fileLoggerFormatter==null){\n fileLoggerFormatter = new SimpleFormatter();\n }\n fileHandler.setFormatter(fileLoggerFormatter);\n logger.addHandler(fileHandler);\n }\n\n if(enableUILogger){\n txtAreaHandler = new EZUIHandler(uiLoggerSizeLimit);\n txtAreaHandler.setFormatter(uiLoggerFormatter);\n logger.addHandler(txtAreaHandler);\n }\n \n initialized = true;\n }", "MPulseLogger(String mClassName) {\n this.mClassName = mClassName;\n boolean androidLog;\n try {\n Class.forName(\"android.util.Log\");\n androidLog = true;\n } catch (ClassNotFoundException e) {\n // android logger not available, probably a test environment.\n androidLog = false;\n }\n this.mLoggable = sIsDebug && androidLog;\n }", "@Override\n public void init() throws Exception {\n // allocate a new logger\n Logger logger = Logger.getLogger(\"processinfo\");\n\n // add some extra output channels, using mask bit 6\n try {\n outputStream = new FileOutputStream(filename);\n logger.addOutput(new PrintWriter(outputStream), new BitMask(MASK.APP));\n } catch (Exception e) {\n LoggerFactory.getLogger(TcpdumpReporter.class).error(e.getMessage());\n }\n\n }", "protected abstract Logger getLogger();", "public void enableLogging( final Logger logger )\n {\n m_logger = logger;\n }", "private static void initLog() {\n LogManager.mCallback = null;\n if (SettingsManager.getDefaultState().debugToasts) {\n Toast.makeText(mContext, mContext.getClass().getCanonicalName(), Toast.LENGTH_SHORT).show();\n }\n if (SettingsManager.getDefaultState().debugLevel >= LogManager.LEVEL_ERRORS) {\n new TopExceptionHandler(SettingsManager.getDefaultState().debugMail);\n }\n //Si hubo un crash grave se guardo el reporte en el sharedpreferences, por lo que al inicio\n //levanto los posibles crashes y, si el envio por mail está activado , lo envio\n String possibleCrash = StoreManager.pullString(\"crash\");\n if (!possibleCrash.equals(\"\")) {\n OtherAppsConnectionManager.sendMail(\"Stack\", possibleCrash, SettingsManager.getDefaultState().debugMailAddress);\n StoreManager.removeObject(\"crash\");\n }\n }", "@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\",\n justification = \"Return value for file delete is not important here.\")\n private void initLogWriter() throws org.apache.geode.admin.AdminException {\n loggingSession.createSession(this);\n\n final LogConfig logConfig = agentConfig.createLogConfig();\n\n // LOG: create logWriterAppender here\n loggingSession.startSession();\n\n // LOG: look in AgentConfigImpl for existing LogWriter to use\n InternalLogWriter existingLogWriter = agentConfig.getInternalLogWriter();\n if (existingLogWriter != null) {\n logWriter = existingLogWriter;\n } else {\n // LOG: create LogWriterLogger\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n // Set this log writer in AgentConfigImpl\n agentConfig.setInternalLogWriter(logWriter);\n }\n\n // LOG: create logWriter here\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n\n // Set this log writer in AgentConfig\n agentConfig.setInternalLogWriter(logWriter);\n\n // LOG:CONFIG: changed next three statements from config to info\n logger.info(LogMarker.CONFIG_MARKER,\n String.format(\"Agent config property file name: %s\",\n AgentConfigImpl.retrievePropertyFile()));\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.getPropertyFileDescription());\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.toPropertiesAsString());\n }", "public Slf4jLogService() {\n this(System.getProperties());\n }", "public MyLogger () {}", "protected Log getLogger() {\n return LOGGER;\n }", "static void init(LoggerManager manager) {\n setLogDir(manager.getLogDirFullPath());\n setLogLevel(manager.getLevel());\n sLogcatEnabled = manager.enableLogcat();\n logGenerator = manager.logExecutor;\n\n if (logWriterThread != null) {\n logWriterThread.quit();\n }\n\n logWriterThread = new LogWriterThread(manager);\n logWriterThread.start();\n\n android.util.Log.i(TAG, \"initialized... level=\" + sLogLvlName + \",lvl=\"\n + sLogLvl + \",Logcat Enabled=\" + sLogcatEnabled + \",dir=\" + manager\n .getLogDirFullPath());\n }", "public interface LoggerUtil {\n\t/**\n\t * Set the logger for the controller\n\t * \n\t * @param logName\n\t * @param filePath\n\t * @param logLevel\n\t * @return\n\t */\n\tLogger loggerArrangement(String logName, String filePath, LogeLevel logLevel);\n}", "private synchronized ILogger _getAuditLogger()\n {\n if( auditlogger == null )\n auditlogger = ClearLogFactory.getLogger( ClearLogFactory.AUDIT_LOG,\n this.getClass() );\n return auditlogger;\n }", "@BeforeAll\n public static void configureLogger() {\n new SuperStructure(null, null, null, null, null);\n\n Logger.configure(null);\n Logger.start();\n }", "private LogUtil() {\r\n /* no-op */\r\n }", "private synchronized ILogger getLogger()\n {\n if( _logger == null )\n _logger = ClearLogFactory.getLogger( ClearLogFactory.PERSIST_LOG,\n this.getClass() );\n return _logger;\n }", "public void initALog() {\n ALog.Config config = ALog.init(this)\n .setLogSwitch(BuildConfig.DEBUG)// 设置log总开关,包括输出到控制台和文件,默认开\n .setConsoleSwitch(BuildConfig.DEBUG)// 设置是否输出到控制台开关,默认开\n .setGlobalTag(null)// 设置log全局标签,默认为空\n // 当全局标签不为空时,我们输出的log全部为该tag,\n // 为空时,如果传入的tag为空那就显示类名,否则显示tag\n .setLogHeadSwitch(false)// 设置log头信息开关,默认为开\n .setLog2FileSwitch(false)// 打印log时是否存到文件的开关,默认关\n .setDir(\"\")// 当自定义路径为空时,写入应用的/cache/log/目录中\n .setFilePrefix(\"\")// 当文件前缀为空时,默认为\"alog\",即写入文件为\"alog-MM-dd.txt\"\n .setBorderSwitch(true)// 输出日志是否带边框开关,默认开\n .setSingleTagSwitch(true)// 一条日志仅输出一条,默认开,为美化 AS 3.1.0 的 Logcat\n .setConsoleFilter(ALog.V)// log的控制台过滤器,和logcat过滤器同理,默认Verbose\n .setFileFilter(ALog.V)// log文件过滤器,和logcat过滤器同理,默认Verbose\n .setStackDeep(1)// log 栈深度,默认为 1\n .setStackOffset(0)// 设置栈偏移,比如二次封装的话就需要设置,默认为 0\n .setSaveDays(3)// 设置日志可保留天数,默认为 -1 表示无限时长\n // 新增 ArrayList 格式化器,默认已支持 Array, Throwable, Bundle, Intent 的格式化输出\n .addFormatter(new ALog.IFormatter<ArrayList>() {\n @Override\n public String format(ArrayList list) {\n return \"ALog Formatter ArrayList { \" + list.toString() + \" }\";\n }\n });\n ALog.d(config.toString());\n }", "public AstractLogger getDefaultLogger()\n {\n return new DefaultLogger();\n }", "private Log()\n {\n //Hides implicit constructor.\n }", "protected void sinkImpl(String msg) {\n opensimCommonJNI.LogSink_sinkImpl(swigCPtr, this, msg);\n }", "private EventLogger initEventLogger(Review review) {\n\t\t//reduce coupling\n\t\tEventLogger eventLogger = loggerMap.get(getRating(review).toString());\n\t\tif (eventLogger==null){\n\t\t\teventLogger = loggerMap.get(DEFAULT);\n\t\t}\n\t\treturn eventLogger;\n\t}", "public static void setupLoggers() {\n SLF4JBridgeHandler.removeHandlersForRootLogger();\n\n // add SLF4JBridgeHandler to j.u.l's root logger\n SLF4JBridgeHandler.install();\n }", "protected void initialize() { \tthePrintSystem.printWithTimestamp(getClass().getName()); \r\n }", "public SystemLog (\r\n\t\t Long in_logId\r\n ) {\r\n\t\tthis.setLogId(in_logId);\r\n }", "protected abstract Logger newInstance(String name);", "public MyLogs() {\n }", "public void init(String pName) {\n logger = Logger.getLogger(pName);\n mConsoleHandler = new ConsoleHandler();\n mNameLogger = pName;\n File mLogDir = new File(\"./messagesLog\");\n if (!mLogDir.exists()) {\n mLogDir.mkdir();\n }\n LogManager.getLogManager().reset();\n }", "static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }", "private Logger() {\n\n }", "public LoggingMessageReport(Logger logger) {\n this.logger = logger;\n }", "public static Log getLoggerBase() {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLogBase();\r\n }\r\n return l;\r\n }", "@Override\n\t\tpublic ConnectorLogger getLogFactory() {\n\t\t\treturn new MockConnectorLogger();\n\t\t}", "public final void setLogger(final Logger logger) {\r\n this.logger = logger;\r\n }", "@Override\n protected Logger newLogger(String name) {\n return new JettyLogger(name);\n }" ]
[ "0.6543853", "0.6543853", "0.6303322", "0.62332094", "0.61941695", "0.60347235", "0.60243356", "0.6013855", "0.59858876", "0.5904955", "0.5870437", "0.5850323", "0.583321", "0.58270746", "0.58089334", "0.57879144", "0.57869", "0.57858384", "0.57846683", "0.5768295", "0.57611156", "0.5756902", "0.5735877", "0.57255185", "0.5724415", "0.5714567", "0.56883454", "0.5679253", "0.5654112", "0.56290525", "0.5613595", "0.5611688", "0.5610603", "0.56094086", "0.5588669", "0.5577834", "0.5567801", "0.55602074", "0.5539672", "0.5514044", "0.54936874", "0.54718685", "0.5458852", "0.54516727", "0.5447446", "0.54427254", "0.54407996", "0.5437692", "0.54352564", "0.54288965", "0.5423786", "0.5416207", "0.5412307", "0.5410282", "0.54040045", "0.54007035", "0.53950393", "0.5392742", "0.5389395", "0.53854805", "0.5379121", "0.5378925", "0.53754735", "0.53679854", "0.53616536", "0.53596115", "0.53532624", "0.5346145", "0.53411806", "0.5336143", "0.53297323", "0.53286463", "0.53269607", "0.53226364", "0.5316733", "0.530483", "0.52974516", "0.5275883", "0.5271497", "0.52658814", "0.5265446", "0.5265324", "0.5261881", "0.5218491", "0.521655", "0.5209786", "0.5209419", "0.5201587", "0.51970214", "0.5196306", "0.5189983", "0.51812035", "0.5179693", "0.5174136", "0.51727253", "0.5161944", "0.5154557", "0.515275", "0.5148194", "0.51481926", "0.5146616" ]
0.0
-1
TODO Autogenerated method stub
@Override public void windowLostFocus(final WindowEvent windowevent) { }
{ "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
Creates taxes and shipping rates for US and EU customers
public interface IOrderFactory{ /** * Creates a collection of taxes for US and EU customers * * @return the sales tax */ public ISalesTax getTaxObject(); /** * Creates the shipping cost for US and EU customers * * @return shipping cost */ public IShippingRate getRateObject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }", "abstract protected BigDecimal getBasicTaxRate();", "double applyTax(double price);", "private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }", "@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }", "TaxCalculationResult calculateTaxes(\n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost,\n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems,\n\t\t\tfinal Money preTaxDiscount);", "public abstract double calculateTax();", "@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }", "void newSale(double totalWithTaxes);", "public float calculateTax(String state, Integer flatRate);", "BigDecimal getTax();", "@Override\r\n public double computeTax(PurchasedItems items, Date receiptDate) {\r\n\r\n if (taxHoliday(receiptDate) == true) {\r\n return 0.0;\r\n } else {\r\n return items.getTotalCost() * this.salesTax;\r\n }\r\n }", "Object getTaxes(Address shippingAddress, String itemReferenceId, int quantity, Float price,\n String userId, Boolean submitTax);", "void setTax(BigDecimal tax);", "public interface TaxCalculationService extends EpService {\n\t\n\t/**\n\t * Calculates the applicable taxes on a list of items, depending on the address to which they are being billed or shipped.\n\t * NOTICE: Only enabled is store tax jurisdictions should be used for calculating tax.\n\t * \n\t *\n\t * @param storeCode guid of the store that will be used to retrieve tax jurisdictions\n\t * @param address the address to use for tax calculations\n\t * @param currency the currency to use for tax calculations\n\t * @param shippingCost the cost of shipping, so that shipping taxes can be factored in\n\t * @param shoppingItems list of items that must be taxed\n\t * @param preTaxDiscount the total pre-tax discount to be applied on items, before taxes are calculated\n\t * @return the result of the tax calculations\n\t */\n\tTaxCalculationResult calculateTaxes(\n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost,\n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems,\n\t\t\tfinal Money preTaxDiscount);\n\t\n\t/**\n\t * Calculates the applicable taxes on a list of items, depending on the address to which they are being billed or shipped.\n\t * NOTICE: Only enabled is store tax jurisdictions should be used for calculating tax.\n\t *\n\t *\n\t * @param taxCalculationResult the tax calculation result to be used to add up the taxes to\n\t * @param storeCode guid of the store that will be used to retrieve tax jurisdictions\n\t * @param address the address to use for tax calculations. If null, no calculations will be performed.\n\t * @param currency the currency to use for tax calculations, must be non-null\n\t * @param shippingCost the cost of shipping, so that shipping taxes can be factored in, must be non-null\n\t * @param shoppingItems list of items that must be taxed, must be non-null\n\t * @param preTaxDiscount the total pre-tax discount to be applied on items, before taxes are calculated, must be non-null\n\t * @return the result of the tax calculations\n\t */\n\tTaxCalculationResult calculateTaxesAndAddToResult(\n\t\t\tfinal TaxCalculationResult taxCalculationResult, \n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost, \n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems, \n\t\t\tfinal Money preTaxDiscount);\n\n\t\n\t/**\n\t * Checks if that address is in a tax jurisdiction where tax inclusive method is used.\n\t * NOTICE: Only tax jurisdictions that is enabled is store will be considered.\n\t *\n\t * @param storeCode guid of the store that will be used to retrieve tax jurisdictions.\n\t * @param address the address to be checked\n\t * @return true if inclusive tax method is used\n\t */\n\tboolean isInclusiveTaxCalculationInUse(String storeCode, Address address);\n}", "public void setTaxRate(BigDecimal taxRate) {\n this.taxRate = taxRate;\n }", "public double computeCustomsTax(String originCountry, double tobacoValue, double regularValue) {\n\t\tTaxComputer pece = getTaxComputer(originCountry);\n\t\treturn pece.compute(tobacoValue, regularValue);\n\t}", "public void setPriceStdWTax (BigDecimal PriceStdWTax);", "@Test\n public void testRegistrarTax() throws Exception {\n Line line = new Line(LineItemType.Tax, \"\", \"\", \"Amazon Registrar\", \"\", \"\", \"Tax for product code AmazonRegistrar\", PricingTerm.none, \"2021-04-19T23:59:59Z\", \"2022-04-19T00:00:00Z\", \"1\", \"5.25\", \"\");\n line.setTaxFields(\"VAT\", \"AWS EMEA SARL\");\n ProcessTest test = new ProcessTest(line, Result.hourly, 31);\n Datum[] expected = {\n new Datum(CostType.tax, a2, Region.GLOBAL, null, registrar, Operation.getOperation(\"Tax - VAT\"), \"Tax - AWS EMEA SARL\", 5.25, 1),\n };\n test.run(\"2021-03-01T00:00:00Z\", expected);\n }", "public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n }", "public abstract double getTaxValue(String country);", "public abstract void calcuteTax(Transfer aTransfer);", "ShipmentCostEstimate createShipmentCostEstimate();", "public void setTax(Double tax);", "@RequestMapping(path = \"/dataStore\", method = RequestMethod.POST)\n\tpublic ResponseEntity<Void> calculateTaxes() {\n\t\tResponseEntity<Void> response;\n\t\ttaxationService.populate();\n\t\tresponse = new ResponseEntity<>(HttpStatus.OK);\n\t\treturn response;\n\t}", "private int addTax(Iterable<TransactionItem> items) {\r\n\t\tint tax = 0;\r\n\r\n\t\tfor (TransactionItem item : items) {\r\n\t\t\tint newTax = (int) Math.round(item.getPriceInCents()\r\n\t\t\t\t\t* (this.tax.getPercentage() / 100.0));\r\n\t\t\ttax += newTax;\r\n\t\t}\r\n\t\treturn tax;\r\n\t}", "public double payTax(double[] taxPayers) {\n\n double taxToBePaid = 0.0;\n\n // Add every amount in a single variable\n for (int i = 0; i < taxPayers.length; i++) {\n taxToBePaid += taxPayers[i];\n }\n\n // check if the sum of every tax payer which bracket tax they fall into\n if (taxToBePaid < 15000) {\n return taxToBePaid * 0;\n } else if (taxToBePaid >= 15000 && taxToBePaid < 20000) {\n return taxToBePaid * 0.1;\n } else if (taxToBePaid >= 20000 && taxToBePaid < 30000) {\n return taxToBePaid * 0.2;\n } else {\n return taxToBePaid * 0.3;\n }\n\n }", "double getTax();", "double getTaxAmount();", "public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }", "@Override\n protected void chooseTax(){\n // Lets impose a tax rate that is inversely proportional to the number of subordinates I have:\n // That is, the more subordinates I have, the lower the tax rate.\n if(myTerritory.getSubordinates().isEmpty()){\n tax = 0;\n }\n else tax = 0.5;\n\n // Of course, if there are tax rates higher than .5, the system will set it to zero, so you should check on that\n }", "public String createTax() throws Exception {\n taxsJpaController.create(tax);\n return null;\n }", "double defaultTaxOnProduct(){\n\t\treturn 12.5;\n\t}", "@Override\n protected double calcTotalCost() {\n \n double totalCost, templateBasicRate = DEFAULT_BASIC_RATE;\n double extraBedrooms = 0, extraBathrooms = 0;\n\n // if there are extra beds/baths\n if (this.getNumBedrooms() > DEFAULT_NUM_BEDROOMS)\n extraBedrooms = this.getNumBedrooms() - DEFAULT_NUM_BEDROOMS;\n\n if (this.getNumBathrooms() > DEFAULT_NUM_BATHROOMS)\n extraBathrooms = this.getNumBathrooms() - DEFAULT_NUM_BATHROOMS;\n\n // multiply basic rate by 1.5 if the total area is >= 3,000 sq ft\n if (this.getTotalArea() >= 3000)\n templateBasicRate *= 1.5;\n\n // calculate total cost\n totalCost = (templateBasicRate + ((800 * extraBedrooms) + (500 * extraBathrooms)));\n\n // add tax\n totalCost += (TAX * totalCost);\n\n return totalCost;\n }", "public void setTaxRate(double taxRate) {\n this.taxRate = taxRate;\n }", "TaxCalculationResult calculateTaxesAndAddToResult(\n\t\t\tfinal TaxCalculationResult taxCalculationResult, \n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost, \n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems, \n\t\t\tfinal Money preTaxDiscount);", "public BigDecimal getPriceStdWTax();", "public double calcTax() {\n\t\treturn 0.2 * calcGrossWage() ;\n\t}", "public double calculateTax(double amount){\n return (amount*TAX_4_1000)/1000;\n }", "public void setTaxAmtPriceStd (BigDecimal TaxAmtPriceStd);", "public double taxRate () {\n return taxRate;\n }", "public static void main(String[] args) {\n TaxOffice tallinnOffice = new TaxOffice();\n System.out.println(tallinnOffice.getTaxRate());\n \n // we have to limit access to taxRate\n // defined taxRate as private\n // provided getter method for reading its value\n \n tallinnOffice.setTaxRate(0.204);\n System.out.println(tallinnOffice.getTaxRate());\n \n \n }", "private void prepareRates() {\n // set the Currency as GBP (symbol) which is applicable in all rates\n Currency gbp = Currency.getInstance(\"GBP\");\n rates.add(new Rate(\"Morning\", gbp, 15d, LocalTime.of(5, 0), LocalTime.of(10, 0)));\n rates.add(new Rate(\"Evening\", gbp, 18d, LocalTime.of(16, 30), LocalTime.of(20, 0)));\n rates.add(new Rate(\"Night\", gbp, 20d, LocalTime.of(20, 0), LocalTime.of(23, 0)));\n rates.add(new Rate(\"Default\", gbp, 10d, null, null));\n }", "public Double getTax();", "private static void updateTotals()\r\n\t{\r\n\t\ttaxAmount = Math.round(subtotalAmount * salesTax / 100.0);\r\n\t\ttotalAmount = subtotalAmount + taxAmount;\r\n\t}", "public void setTax(BigDecimal tax) {\n this.tax = tax;\n }", "public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }", "private void CalculateTotalAmount()\n {\n double dSubTotal = 0,dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0;\n float dTaxPercent = 0, dSerTaxPercent = 0;\n double dTotalBillAmount_for_reverseTax =0;\n double dIGSTAmt =0, dcessAmt =0;\n // Item wise tax calculation ----------------------------\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++)\n {\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\n if (RowItem.getChildAt(0) != null)\n {\n TextView ColQuantity = (TextView) RowItem.getChildAt(3);\n TextView ColRate = (TextView) RowItem.getChildAt(4);\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\n TextView ColTax = (TextView) RowItem.getChildAt(7);\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\n TextView ColTaxValue = (TextView) RowItem.getChildAt(28);\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\n dcessAmt += Double.parseDouble(ColcessAmount.getText().toString());\n if (crsrSettings!=null && crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\n }\n else // reverse tax\n {\n double qty = ColQuantity.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColQuantity.getText().toString());\n double baseRate = ColRate.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColRate.getText().toString());\n dSubTotal += (qty*baseRate);\n dTotalBillAmount_for_reverseTax += Double.parseDouble(ColAmount.getText().toString());\n }\n\n }\n }\n // ------------------------------------------\n // Bill wise tax Calculation -------------------------------\n Cursor crsrtax = db.getTaxConfigs(1);\n if (crsrtax.moveToFirst()) {\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\n }\n Cursor crsrtax1 = db.getTaxConfigs(2);\n if (crsrtax1.moveToFirst()) {\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\n }\n // -------------------------------------------------\n\n dOtherCharges = Double.valueOf(textViewOtherCharges.getText().toString());\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\n if (crsrSettings.moveToFirst()) {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\"))\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\n }\n else\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\n }\n }\n else // reverse tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) // item wise\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n\n }\n else\n {\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n }\n }\n }\n }", "public BigDecimal getTaxRate() {\n return taxRate;\n }", "ResponseEntity<String> saveTouRates(TOURates touRates);", "public double calculateTax(double planFee, double overageCost) {\n double tax = (planFee + overageCost) * 0.15;\n return tax;\n }", "private static void addTaxesToResponseItinerariesTotal(JSONObject reqJson, JSONObject resJson, JSONObject taxEngResJson) {\n\t\tMap<String, Map<String, JSONArray>> taxBySuppDestMap = getTaxesBySupplierAndDestination(taxEngResJson);\n\t\t\n\t\t// The order of vehicleAvail in service response JSON is not the same as it is in tax engine response JSON. \n\t\t// Therefore, we need to keep track of each supplier/destination occurrence of vehicleAvail. This may be an \n\t\t// overkill in context of reprice service from where this class is called but does not hurt. \n\t\tMap<String, Integer> suppDestIndexMap = new HashMap<String, Integer>();\n\t\tJSONObject resBodyJson = resJson.getJSONObject(JSON_PROP_RESBODY);\n\t\tJSONArray carRentalJsonArr = resBodyJson.getJSONArray(JSON_PROP_CARRENTALARR);\n\t\tfor (int i=0; i < carRentalJsonArr.length(); i++) {\n\t\t\t\n\t\t\tJSONArray vehicleAvailArr = carRentalJsonArr.getJSONObject(i).getJSONArray(JSON_PROP_VEHICLEAVAIL);\n\t\t\tfor(int j =0; j< vehicleAvailArr.length(); j++) {\n\t\t\t\tJSONObject vehicleAvailJson = vehicleAvailArr.getJSONObject(j);\n\t\t\t\t\n\t\t\t\tString suppID = vehicleAvailJson.getString(JSON_PROP_SUPPREF);\n\t\t\t\tString cityCode = RentalSearchProcessor.deduceDropOffCity(vehicleAvailJson);\n\t\t\t\tif (cityCode == null || cityCode.isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMap<String,Object> cityInfo = RedisCityData.getCityCodeInfo(cityCode);\n\t\t\t\tMap<String, JSONArray> travelDtlsMap = taxBySuppDestMap.get(suppID);\n\t\t\t\t//TODO: Uncomment later.\n\t\t\t\tString travelDtlsMapKey = String.format(\"%s|%s|%s\", cityInfo.getOrDefault(JSON_PROP_VALUE, \"\"), cityInfo.getOrDefault(JSON_PROP_STATE, \"\"), cityInfo.getOrDefault(JSON_PROP_COUNTRY, \"\"));\n//\t\t\t\tString travelDtlsMapKey = String.format(\"%s|%s|%s\", \"Mumbai\", \"Maharashtra\", \"India\");\n\t\t\t\tJSONArray fareDtlsJsonArr = travelDtlsMap.get(travelDtlsMapKey);\n\t\t\t\t\n\t\t\t\tString suppDestIndexMapKey = String.format(\"%s|%s\", suppID, travelDtlsMapKey);\n\t\t\t\tint idx = (suppDestIndexMap.containsKey(suppDestIndexMapKey)) ? (suppDestIndexMap.get(suppDestIndexMapKey) + 1) : 0;\n\t\t\t\tsuppDestIndexMap.put(suppDestIndexMapKey, idx);\n\t\t\t\t\n\t\t\t\tif (idx < fareDtlsJsonArr.length()) {\n\t\t\t\t\tJSONObject totalPriceInfoJson = vehicleAvailJson.getJSONObject(JSON_PROP_TOTALPRICEINFO);\n\t\t\t\t\tJSONObject totalFareJson = totalPriceInfoJson.getJSONObject(JSON_PROP_TOTALFARE);\n\t\t\t\t\tBigDecimal totalFareAmt = totalFareJson.getBigDecimal(JSON_PROP_AMOUNT);\n\t\t\t\t\tString totalFareCcy = totalFareJson.getString(JSON_PROP_CCYCODE);\n\t\t\t\t\t\n\t\t\t\t\tBigDecimal companyTaxTotalAmt = BigDecimal.ZERO;\n\t\t\t\t\tJSONObject fareDtlsJson = fareDtlsJsonArr.getJSONObject(idx);\n\t\t\t\t\tJSONArray companyTaxJsonArr = new JSONArray();\n\t\t\t\t\tJSONArray appliedTaxesJsonArr = fareDtlsJson.optJSONArray(JSON_PROP_APPLIEDTAXDTLS);\n\t\t\t\t\tif (appliedTaxesJsonArr == null) {\n\t\t\t\t\t\tlogger.warn(\"No service taxes applied on car-rental\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tfor (int k=0; k < appliedTaxesJsonArr.length(); k++) {\n\t\t\t\t\t\tJSONObject appliedTaxesJson = appliedTaxesJsonArr.getJSONObject(k);\n\t\t\t\t\t\tJSONObject companyTaxJson = new JSONObject();\n\t\t\t\t\t\tBigDecimal taxAmt = appliedTaxesJson.optBigDecimal(JSON_PROP_TAXVALUE, BigDecimal.ZERO);\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_TAXCODE, appliedTaxesJson.optString(JSON_PROP_TAXNAME, \"\"));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_TAXPCT, appliedTaxesJson.optBigDecimal(JSON_PROP_TAXPERCENTAGE, BigDecimal.ZERO));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_AMOUNT, taxAmt);\n\t\t\t\t\t\t//TaxComponent added on finance demand\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_TAXCOMP, appliedTaxesJson.optString(JSON_PROP_TAXCOMP));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_CCYCODE, totalFareCcy);\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_HSNCODE, appliedTaxesJson.optString(JSON_PROP_HSNCODE));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_SACCODE, appliedTaxesJson.optString(JSON_PROP_SACCODE));\n\t\t\t\t\t\tcompanyTaxJsonArr.put(companyTaxJson);\n\t\t\t\t\t\tcompanyTaxTotalAmt = companyTaxTotalAmt.add(taxAmt);\n\t\t\t\t\t\ttotalFareAmt = totalFareAmt.add(taxAmt);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Append the taxes retrieved from tax engine response in itineraryTotalFare element of pricedItinerary JSON\n\t\t\t\t\tJSONObject companyTaxesJson = new JSONObject();\n\t\t\t\t\tcompanyTaxesJson.put(JSON_PROP_AMOUNT, companyTaxTotalAmt);\n\t\t\t\t\tcompanyTaxesJson.put(JSON_PROP_CCYCODE, totalFareCcy);\n\t\t\t\t\tcompanyTaxesJson.put(JSON_PROP_COMPANYTAX, companyTaxJsonArr);\n\t\t\t\t\ttotalFareJson.put(JSON_PROP_COMPANYTAXES, companyTaxesJson);\n\t\t\t\t\ttotalFareJson.put(JSON_PROP_AMOUNT, totalFareAmt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public double calculateTax() {\n taxSubtotal = (saleAmount * SALESTAXRATE);\n\n return taxSubtotal;\n }", "public void setPriceListWTax (BigDecimal PriceListWTax);", "public double taxCharged (){\n return discountedPrice() * taxRate;\n }", "public Checkout(double taxRate) {\n this.taxRate = taxRate;\n dessertList = new ArrayList<>();\n }", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "double taxReturn() {\n\t\tdouble ddv = 0;\n\t\tif (d == 'A') {\n\t\t\tddv = 18;\n\t\t} else if (d == 'B') {\n\t\t\tddv = 5;\n\t\t}\n\t\t\n\t\tif (ddv = 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tdouble percent = price / 100.0;\n\t\tdouble tax = ddv * percent;\n\t\treturn tax / 100.0 * 15.0;\n\t}", "public void changeTaxRate (double value) {\n this.taxRate = value;\n }", "public void tpsTax() {\n TextView tpsView = findViewById(R.id.checkoutPage_TPStaxValue);\n tpsTaxTotal = beforeTaxTotal * 0.05;\n tpsView.setText(String.format(\"$%.2f\", tpsTaxTotal));\n }", "private void fillTaxInfo(Invoice invoice) {\r\n\t\ttry {\r\n\t\t\tIManagerBean companyBean = BeanManager.getManagerBean(Company.class);\r\n\t\t\tIterator iter = companyBean.getList(null).iterator();\r\n\t\t\tboolean surcharge = false;\r\n\t\t\tboolean taxFree = false;\r\n\t\t\tif(iter.hasNext()){\r\n\t\t\t\tCompany company = (Company)iter.next();\r\n\t\t\t\tsurcharge = company.isSurcharge();\r\n\t\t\t\ttaxFree = company.isTaxFree();\r\n\t\t\t}\r\n\t\t\tinvoice.setTaxFree(taxFree);\r\n\t\t\tinvoice.setSurcharge(surcharge);\r\n\t\t} catch (ManagerBeanException e) {\r\n\t\t\tLOGGER.log(Level.SEVERE, \"error obtaining company\", e);\r\n\t\t}\r\n\t}", "public void setTaxAmount(double value) {\n this.taxAmount = value;\n }", "public BigDecimal getTax() {\n return tax;\n }", "public BigDecimal getTaxAmtPriceStd();", "public JSONObject getAdvanceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountAdv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n if (reqParams.optBoolean(\"at\")) {\n /**\n * Get Advance for which invoice not linked yet\n */\n\n reqParams.put(\"at\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = (advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount)) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n } else {\n /**\n * Get Advance for which invoice isLinked\n */\n reqParams.put(\"atadj\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.adjustedamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = advanceobj.optDouble(GSTRConstants.adjustedamount) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvDataLinked = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvDataLinked) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n }\n\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountAdv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountAdv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n return jSONObject;\n }", "public double useTax() {\n \n return super.useTax() + getValue()\n * PER_AXLE_TAX_RATE * getAxles();\n }", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "public interface ITaxHandler\n{\n Object getTaxes(Long cartId, Boolean submitTax);\n\n Object getOrderTaxes(Order order, Long userId, Boolean submitTax);\n\n //Simple single-item tax request\n Object getTaxes(Address shippingAddress, String itemReferenceId, int quantity, Float price,\n String userId, Boolean submitTax);\n}", "public ArmCurrency getGsthstTaxAmt() throws Exception {\n\t\t\n\t\tArmCurrency gstHstTaxAmt = new ArmCurrency(0.0);\n\t\tDouble offlineGstHstTax;\n \tDouble value = 0.0d;\n \tDouble netAMt = 0.0d;\n \tDouble belowThreshTaxAmt = 0.0d;\n \tDouble taxAmt = 0.0d;\n \tDouble valueExc = 0.0d;\n\t ArmCurrency itemGstHstTax = new ArmCurrency(0.0) ;\n\t\tCMSStore cmsStore = ((CMSStore)compositePOSTransaction.getStore());\n\t\t\n\t\tif(cmsStore.getCountry().equals(\"CAN\")){\n\t\tif(compositePOSTransaction.getTransactionType().contains(\"RETN\")){\n\t\t\tPOSLineItem[] lineitem = compositePOSTransaction.getLineItemsArray();\n\t\t\tCMSCompositePOSTransaction OrgSaleTxn = null;\n\t\t\t\n\t\t\tfor(int i =0 ; i<lineitem.length ;i++){\n\t\t\t if(lineitem[i] instanceof CMSReturnLineItem ){\n\t\t\t CMSReturnLineItem rtnLnItm = (CMSReturnLineItem) lineitem[i];\n\t\t\t CMSReturnLineItemDetail rtnLnItmDtl = (CMSReturnLineItemDetail) rtnLnItm.getLineItemDetailsArray()[0];\n\t\t\t CMSSaleLineItemDetail saleLnItmDtl = (CMSSaleLineItemDetail) rtnLnItmDtl.getSaleLineItemDetail();\n\t\t\t\t if(saleLnItmDtl!=null){\n\t\t\t\t CompositePOSTransaction txnObject = saleLnItmDtl.getLineItem().getTransaction().getCompositeTransaction();\n\t\t\t\t OrgSaleTxn = ((CMSCompositePOSTransaction) txnObject);\n\t\t\t\t \t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif(OrgSaleTxn == null){\n\t\t\t\tPOSLineItem[] itms = compositePOSTransaction.getLineItemsArray();\n\t\t\t\tfor(POSLineItem itm : itms){\n\t\t\t\t\tif(itm.getGsthstTaxAmt()!=null){\n\t\t\t\t\t\tif(itm instanceof CMSReturnLineItem)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(itm.getGsthstTaxAmt().absoluteValue())).absoluteValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgstHstTaxAmt = gstHstTaxAmt.add(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t\n\t\t\t\tPOSLineItem[] itms = OrgSaleTxn.getLineItemsArray();\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<lineitem.length;i++){\n\t\t\t\t\tfor(POSLineItem itm : itms){\n\t\t\t\t\t\tif((itm.getItem().getId() == lineitem[i].getItem().getId()) && (itm.getTaxAmount().equals(lineitem[i].getTaxAmount().absoluteValue()))){\t\n\t\t\t\t\t\t\tif(itm.getGsthstTaxAmt() != null){\n\t\t\t\t\t\t\t\tgstHstTaxAmt = gstHstTaxAmt.add(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t\t\t\t\t\tlineitem[i].setGsthstTaxAmt(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(!(itm.getItem().getId() == lineitem[i].getItem().getId())){\t\n\t\t\t\t\t\t\tif(lineitem[i].getGsthstTaxAmt() == null){\n\t\t\t\t\t\t\t\tif(cmsStore.getGst_hstTAX() != null){\n\t\t\t\t\t\t\t\t\titemGstHstTax = lineitem[i].getNetAmount().multiply(cmsStore.getGst_hstTAX()).absoluteValue();\n\t\t\t\t\t\t\t\t\tlineitem[i].setGsthstTaxAmt(itemGstHstTax);\n\t\t\t\t\t\t\t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(itemGstHstTax)).absoluteValue();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(lineitem[i].getGsthstTaxAmt()!=null){\t\n\t\t\t\t\t\t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(lineitem[i].getGsthstTaxAmt())).absoluteValue();\t\n\n\t\t\t\t\t\t\t}\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(\"gstHstTaxAmt return, sale/return even exchange>>>>>>>>>>>>> \" + gstHstTaxAmt);\n\t\t\treturn gstHstTaxAmt.absoluteValue();\n\t\t}\t\n\t\telse if(compositePOSTransaction.getTaxableLineItemDetailsArray().length == 0)\n\t\t{\n\t\t\tPOSLineItem[] itms = compositePOSTransaction.getLineItemsArray();\n\t\t\tfor(POSLineItem itm : itms){\n\t\t\t\tif(itm.getGsthstTaxAmt()!=null)\n\t\t\t\tgstHstTaxAmt = gstHstTaxAmt.add(itm.getGsthstTaxAmt().absoluteValue());\n\t\t\t}\n\t\t\treturn gstHstTaxAmt.absoluteValue();\n\t\t}\n\t\telse {\t\t \n\t\t if (isVatEnabled())\n\t\t return null;\n\t\t \n\t\t POSLineItemDetail [] posLineItemDetails = compositePOSTransaction.getTaxableLineItemDetailsArray();\n\n\t\t POSLineItem itm = null;\n\t\t \n\t\t int lineItemLength = compositePOSTransaction.getTaxableLineItemDetailsArray().length;\n\t\t for(int i =0 ; i<lineItemLength ; i++){\n\t\t \ttry {\n\t\t \t\titm = posLineItemDetails[i].getLineItem();\n\t\t \t\tif((posLineItemDetails[i].getLineItem() instanceof SaleLineItem) && ((CMSSaleLineItem)posLineItemDetails[i].getLineItem()).getShippingRequest()!=null){\n\t\t \t\t\tofflineGstHstTax = ((CMSShippingRequest) (((CMSSaleLineItem)posLineItemDetails[i].getLineItem()).getShippingRequest())).getOfflineHstTax();\n\t\t \t\t\tif(offlineGstHstTax == null){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvalue = getTaxMapValue(\"HST\");\n\t\t\t \titm.setGsthstTaxAmt(itm.getNetAmount().multiply(value));\t\t\t \t\n\t\t\t \tDouble thresAmt = compositePOSTransaction.getThreshAmt()!=null ? compositePOSTransaction.getThreshAmt().doubleValue():0.0d;\n\t\t\t \tvalueExc = getTaxExecMapValue(\"HST\");\n\t\t\t \tif(compositePOSTransaction.getThrehRule()!=null && compositePOSTransaction.getThrehRule().equalsIgnoreCase(\"P\")){\n\t\t\t \t\tif(posLineItemDetails[i].getLineItem().getNetAmount().greaterThan(new ArmCurrency(thresAmt))){\t\t\t \t\t \n\t\t\t \t\t\tbelowThreshTaxAmt = thresAmt*valueExc;\n\t\t\t \t\t\tnetAMt = (posLineItemDetails[i].getLineItem().getNetAmount().doubleValue()) - thresAmt ;\n\t\t\t \t\t}\n\t\t\t \t\ttaxAmt = belowThreshTaxAmt + (netAMt*value);\n\t\t\t \t\titm.setGsthstTaxAmt(new ArmCurrency(taxAmt));\n\t\t\t \t} else {\n\t\t\t \t\titm.setGsthstTaxAmt(itm.getNetAmount().multiply(value)); \n\t\t\t \t}\t\t\t \t\n\t\t\t\t\t\t}else if(offlineGstHstTax!=null){\n\t\t \titm.setGsthstTaxAmt(itm.getNetAmount().multiply(offlineGstHstTax.doubleValue()));\n\t\t }\n\t\t \t\t\t\n\t\t \t\t\tgstHstTaxAmt = (gstHstTaxAmt.subtract(itm.getGsthstTaxAmt())).absoluteValue();\t\n\t\t \t\t\t\n\t\t \t\t} else {\n\t\t \t\t\t\n\t\t\t\t\t\titm = posLineItemDetails[i].getLineItem();\n\t\t\t\t\t\t\tif(itm.getGsthstTaxAmt()==null){\n\t\t\t\t\t\t\t\tif(cmsStore.getGst_hstTAX()!=null){\n\t\t\t\t\t\t\t\t\titemGstHstTax = itm.getNetAmount().multiply(cmsStore.getGst_hstTAX());\n\t\t\t\t\t\t\t\t\titm.setGsthstTaxAmt(itemGstHstTax);\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} catch (CurrencyException 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 }\n\t\t try {\n\t\t \tfor(POSLineItemDetail line : posLineItemDetails){\n\t\t \t\tif(line.getLineItem().getGsthstTaxAmt()!=null) {\n\t\t \t\t\tgstHstTaxAmt = gstHstTaxAmt.add(line.getLineItem().getGsthstTaxAmt());\n\t\t \t\t}\n\t\t \t}\n\t\t \t\n\t\t\t\t//System.out.println(\"gstHstTaxAmt >>>>>>SALE>>>>>>>\"+gstHstTaxAmt);\n\t\t\t} catch (CurrencyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t return gstHstTaxAmt.absoluteValue();\n\t\t\t}\n\t\t\t} // end country check.\n\t\t\treturn gstHstTaxAmt;\n\t\t }", "@Scheduled(fixedRate = 8 * 1000 * 60 * 60)\n private void getRatesTask() {\n try {\n RestTemplate restTemplate = new RestTemplate();\n CurrencyDTO forObject = restTemplate.getForObject(fixerIoApiKey, CurrencyDTO.class);\n forObject.getRates().forEach((key, value) -> {\n Currency currency = new Currency(key, value);\n this.currencyRepository.save(currency);\n });\n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n }\n }", "public com.vodafone.global.er.decoupling.binding.request.TaxType createTaxType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TaxTypeImpl();\n }", "static double tax( double salary ){\n\n return salary*10/100;\n\n }", "private void CalculateTotalAmount() {\r\n\r\n double dSubTotal = 0, dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0, dIGSTAmt=0, dcessAmt=0, dblDiscount = 0;\r\n float dTaxPercent = 0, dSerTaxPercent = 0;\r\n\r\n // Item wise tax calculation ----------------------------\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (RowItem.getChildAt(0) != null) {\r\n\r\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\r\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\r\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\r\n TextView ColTax = (TextView) RowItem.getChildAt(7);\r\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\r\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\r\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\r\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\r\n TextView ColAdditionalCessAmt = (TextView) RowItem.getChildAt(29);\r\n TextView ColTotalCessAmount = (TextView) RowItem.getChildAt(30);\r\n dblDiscount += Double.parseDouble(ColDisc.getText().toString());\r\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\r\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\r\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\r\n// dcessAmt += Double.parseDouble(ColcessAmount.getText().toString()) + Double.parseDouble(ColAdditionalCessAmt.getText().toString());\r\n dcessAmt += Double.parseDouble(ColTotalCessAmount.getText().toString());\r\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\r\n\r\n }\r\n }\r\n // ------------------------------------------\r\n\r\n // Bill wise tax Calculation -------------------------------\r\n Cursor crsrtax = dbBillScreen.getTaxConfig(1);\r\n if (crsrtax.moveToFirst()) {\r\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\r\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\r\n }\r\n Cursor crsrtax1 = dbBillScreen.getTaxConfig(2);\r\n if (crsrtax1.moveToFirst()) {\r\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\r\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\r\n }\r\n // -------------------------------------------------\r\n\r\n dOtherCharges = Double.valueOf(tvOthercharges.getText().toString());\r\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\r\n if (crsrSettings.moveToFirst()) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\r\n } else {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\r\n }\r\n } else {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n\r\n } else {\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n }\r\n }\r\n tvDiscountAmount.setText(String.format(\"%.2f\", dblDiscount));\r\n }\r\n }", "public double getMarketValueTaxRate(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).MarketValueTax();\r\n }", "public double getTaxes(){\n\t\treturn this.getExciseTax() + this.getFlightSegmentTax() + this.get911SecurityFee() + this.getPassengerFacilityFee();\n\t}", "public double getTaxRate() {\n return taxRate;\n }", "public double taxCalc(int income1, int income2, int income3, int income4, int income5) {\n int[] arr = {income1, income2, income3, income4, income5};\n double taxTotal = 0.0;\n for (int i = 0; i < arr.length; i++) {\n taxTotal += (double) (arr[i] * 7 / 100);\n }\n return taxTotal;\n }", "public void setTaxAmtPriceList (BigDecimal TaxAmtPriceList);", "public BigDecimal getPriceListWTax();", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tSystem.out.println(\"enter the ctc inbetween 0 and 10,00,000\");\n\t\tint ctc=s.nextInt();\n\t\t\n\t\tTaxAmount tej= new TaxAmount();\n\t\tSystem.out.println(\"the total tax amount is :\"+tej.calculateTaxAmount(ctc));\n\t\ts.close();\n\n\t}", "ResponseEntity<String> saveTieredRates(TieredRates tieredRates);", "public BigDecimal getTaxRate() {\n\n\t\tBigDecimal totalTaxRate = getBasicTaxRate().add(getImportTaxRate());\n\n\t\treturn totalTaxRate;\n\t}", "public Object creditEarningsAndPayTaxes()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setInitialCash : \" + \"Agent\");\r\n/* 144 */ \tgetPriceFromWorld();\r\n/* 145 */ \tgetDividendFromWorld();\r\n/* */ \r\n/* */ \r\n/* 148 */ \tthis.cash -= (this.price * this.intrate - this.dividend) * this.position;\r\n/* 149 */ \tif (this.cash < this.mincash) {\r\n/* 150 */ \tthis.cash = this.mincash;\r\n/* */ }\t\r\n/* */ \r\n/* 153 */ \tthis.wealth = (this.cash + this.price * this.position);\r\n/* */ \r\n/* 155 */ \treturn this;\r\n/* */ }", "@Scheduled(fixedRate = 5 * 1000 * 60 * 60)\n public void save(){\n // delete old currencies amounts\n repository.deleteAllInBatch();\n\n FxRates rates = currencyTableService.getCurrencies();\n List<CurrencyTable> currencyTables = transform(rates);\n // add euro in currency list\n CurrencyTable euro = new CurrencyTable();\n euro.setCurrency(\"EUR\");\n euro.setExchangeRate(BigDecimal.ONE);\n\n repository.save(euro);\n repository.saveAll(currencyTables);\n }", "public void addRoundOffTaxHead(String tenantId, List<DemandDetail> demandDetails) {\n\t\tBigDecimal totalTax = BigDecimal.ZERO;\n\t\t\n\t\tBigDecimal previousRoundOff = BigDecimal.ZERO;\n\t\t/*\n\t\t * Sum all taxHeads except RoundOff as new roundOff will be calculated\n\t\t */\n\t\tfor (DemandDetail demandDetail : demandDetails) {\n\t\t\tif (!demandDetail.getTaxHeadMasterCode().equalsIgnoreCase(SWCalculationConstant.MDMS_ROUNDOFF_TAXHEAD))\n\t\t\t\ttotalTax = totalTax.add(demandDetail.getTaxAmount());\n\t\t\telse\n\t\t\t\tpreviousRoundOff = previousRoundOff.add(demandDetail.getTaxAmount());\n\t\t}\n\n\t\tBigDecimal decimalValue = totalTax.remainder(BigDecimal.ONE);\n\t\tBigDecimal midVal = BigDecimal.valueOf(0.5);\n\t\tBigDecimal roundOff = BigDecimal.ZERO;\n\n\t\t/*\n\t\t * If the decimal amount is greater than 0.5 we subtract it from 1 and\n\t\t * put it as roundOff taxHead so as to nullify the decimal eg: If the\n\t\t * tax is 12.64 we will add extra tax roundOff taxHead of 0.36 so that\n\t\t * the total becomes 13\n\t\t */\n\t\tif (decimalValue.compareTo(midVal) >= 0)\n\t\t\troundOff = BigDecimal.ONE.subtract(decimalValue);\n\n\t\t/*\n\t\t * If the decimal amount is less than 0.5 we put negative of it as\n\t\t * roundOff taxHead so as to nullify the decimal eg: If the tax is 12.36\n\t\t * we will add extra tax roundOff taxHead of -0.36 so that the total\n\t\t * becomes 12\n\t\t */\n\t\tif (decimalValue.compareTo(midVal) < 0)\n\t\t\troundOff = decimalValue.negate();\n\n\t\t/*\n\t\t * If roundOff already exists in previous demand create a new roundOff\n\t\t * taxHead with roundOff amount equal to difference between them so that\n\t\t * it will be balanced when bill is generated. eg: If the previous\n\t\t * roundOff amount was of -0.36 and the new roundOff excluding the\n\t\t * previous roundOff is 0.2 then the new roundOff will be created with\n\t\t * 0.2 so that the net roundOff will be 0.2 -(-0.36)\n\t\t */\n\t\tif (previousRoundOff.compareTo(BigDecimal.ZERO) != 0) {\n\t\t\troundOff = roundOff.subtract(previousRoundOff);\n\t\t}\n\n\t\tif (roundOff.compareTo(BigDecimal.ZERO) != 0) {\n\t\t\tdemandDetails.add(DemandDetail.builder().taxAmount(roundOff)\n\t\t\t\t\t.taxHeadMasterCode(SWCalculationConstant.MDMS_ROUNDOFF_TAXHEAD).tenantId(tenantId)\n\t\t\t\t\t.collectionAmount(BigDecimal.ZERO).build());\n\t\t}\n\t}", "public Builder setTax(double value) {\n \n tax_ = value;\n onChanged();\n return this;\n }", "public static void setTaxRate(double taxRateIn) {\n taxRate = taxRateIn;\n }", "public interface ExternalTaxesService\n{\n\t/**\n\t * Calculate the taxes for order via an external service\n\t * @param abstractOrder A Hybris cart or order\n\t * @return True if calculation was successful and false otherwise\n\t */\n\tboolean calculateExternalTaxes(final AbstractOrderModel abstractOrder);\n\n\t/**\n\t * Removes tax document from session if present\n\t */\n\tvoid clearSessionTaxDocument();\n}", "public static Tax[] getTaxes() {\n Tax[] taxes = new Tax[DeclarationFiller.getDeclaration().size()];\n int count = 0;\n if (taxes != null ) {\n for (Map.Entry<String, Integer> incomePoint : DeclarationFiller.getDeclaration().entrySet()) {\n String taxName = \"Tax of \" + incomePoint.getKey();\n int incomValue = incomePoint.getValue();\n taxes[count] = new Tax(count+1001 ,taxName, incomValue, 0.18);\n count++;\n }\n }\n return taxes;\n }", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double calculateTax(double sal, double inv) {\n\t\tdouble tax;\n\t\tdouble taxIncom = sal-inv;\n\t\tif(taxIncom<500000) {\n\t\t\ttax = taxIncom*0.10;\n\t\t}else if(taxIncom<2000000){\n\t\t\ttax = 500000*0.10;\n\t\t\ttax += (taxIncom-500000)*0.20;\n\t\t}else{\n\t\t\ttax = 500000*0.10;\n\t\t\ttax += 1500000*0.20;\n\t\t\ttax += (taxIncom-2000000)*0.30;\n\t\t}\n\t\t\n\t\treturn tax;\n\t}", "public void tvqTax() {\n TextView tvqView = findViewById(R.id.checkoutPage_TVQtaxValue);\n tvqTaxTotal = beforeTaxTotal * 0.09975;\n tvqView.setText(String.format(\"$%.2f\", tvqTaxTotal));\n }", "public static CartSetShippingMethodTaxRateActionBuilder builder() {\n return CartSetShippingMethodTaxRateActionBuilder.of();\n }", "public void setPriceLimitWTax (BigDecimal PriceLimitWTax);", "public void setCustomerPurchase(double purchase) { this.customerPurchase = purchase; }", "public BigDecimal getLBR_ICMSST_TaxRate();", "public void setBillingTaxrate(int billingTaxrate) {\n this.billingTaxrate = Float.valueOf(billingTaxrate);\n }", "public double getTax(){\n\n return this.tax;\n }", "public BigDecimal getTaxRateForDate(LocalDate date) {\n\t\tIterator<TaxRate> it= taxRates.iterator();\n\t\t\n\t\t\n\t\tBigDecimal bg = null;\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tTaxRate taxRate= it.next();\n\t\t\tif(taxRate.isEffective(date))\n\t\t\t\tbg=taxRate.getTaxRate();\n\t\t}\n\t\treturn bg.setScale(2, RoundingMode.HALF_UP);\n\t}", "public void weeklyCharges() {\n System.out.println(this.customerName);\n System.out.println(this.customerAddress);\n System.out.println(this.customerPhone);\n System.out.println(this.squareFootage);\n System.out.println(this.propertyName);\n\n /**\n * format the cost to look pretty\n */\n\n NumberFormat nf = NumberFormat.getCurrencyInstance();\n nf.setGroupingUsed(true);\n nf.setMaximumFractionDigits(2);\n nf.setMinimumFractionDigits(2);\n if (multiProperty) {\n double cost = ((this.squareFootage/1000) * COMMERCIAL_RATE) * .9;\n System.out.println(\"Your weekly charge with discount is: \" + nf.format(cost));\n\n } else {\n double cost = ((this.squareFootage/1000) * COMMERCIAL_RATE);\n System.out.println(\"Your weekly charge is: \" + nf.format(cost));\n }\n\n }" ]
[ "0.6381021", "0.60605067", "0.5982427", "0.59302884", "0.5889059", "0.5785746", "0.57847154", "0.57784563", "0.5745025", "0.5733781", "0.5670314", "0.56680596", "0.564718", "0.56236047", "0.5612866", "0.5598089", "0.5557857", "0.55575484", "0.5532443", "0.55061734", "0.55050355", "0.54994565", "0.5471393", "0.5471138", "0.5470313", "0.5446305", "0.5440846", "0.5435777", "0.5435155", "0.54022795", "0.540155", "0.5374365", "0.5360423", "0.53428054", "0.53388107", "0.5320193", "0.5308327", "0.5306894", "0.52991235", "0.5288543", "0.52835953", "0.5270858", "0.5244421", "0.5240398", "0.5237763", "0.52336925", "0.52229273", "0.5221745", "0.5207467", "0.5169765", "0.5165008", "0.515793", "0.51417553", "0.51390857", "0.51210505", "0.5106438", "0.51053685", "0.51047575", "0.5098308", "0.5097706", "0.5094069", "0.50911194", "0.5086896", "0.5079218", "0.5068931", "0.5057903", "0.50561655", "0.50412476", "0.5036518", "0.50357556", "0.50250864", "0.5011978", "0.50110674", "0.50075173", "0.5004249", "0.49906328", "0.49885648", "0.49766928", "0.49737307", "0.49696955", "0.49686423", "0.4957135", "0.493393", "0.49270615", "0.4923858", "0.49231425", "0.48994574", "0.48802325", "0.4864176", "0.48406905", "0.48320642", "0.48310816", "0.48302862", "0.48298573", "0.48149338", "0.48148814", "0.4814872", "0.4811915", "0.48109898", "0.48093104" ]
0.50410116
68
Creates a collection of taxes for US and EU customers
public ISalesTax getTaxObject();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Tax[] getTaxes() {\n Tax[] taxes = new Tax[DeclarationFiller.getDeclaration().size()];\n int count = 0;\n if (taxes != null ) {\n for (Map.Entry<String, Integer> incomePoint : DeclarationFiller.getDeclaration().entrySet()) {\n String taxName = \"Tax of \" + incomePoint.getKey();\n int incomValue = incomePoint.getValue();\n taxes[count] = new Tax(count+1001 ,taxName, incomValue, 0.18);\n count++;\n }\n }\n return taxes;\n }", "Object getTaxes(Address shippingAddress, String itemReferenceId, int quantity, Float price,\n String userId, Boolean submitTax);", "public TaxCategory() {\n\t\ttaxRates=new TreeSet<TaxRate>();\n\t\t\n\t}", "public AbstractTaxon() {\n // Setter arrays\n querySetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n insertSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n preSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n postSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n readObjectSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n \n // Add the many-to-many collection setters for the loci property.\n querySetters.add(new QueryLociSetter());\n readObjectSetters.add(new ReadLociSetter());\n }", "void newSale(double totalWithTaxes);", "@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }", "private int addTax(Iterable<TransactionItem> items) {\r\n\t\tint tax = 0;\r\n\r\n\t\tfor (TransactionItem item : items) {\r\n\t\t\tint newTax = (int) Math.round(item.getPriceInCents()\r\n\t\t\t\t\t* (this.tax.getPercentage() / 100.0));\r\n\t\t\ttax += newTax;\r\n\t\t}\r\n\t\treturn tax;\r\n\t}", "TaxCalculationResult calculateTaxes(\n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost,\n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems,\n\t\t\tfinal Money preTaxDiscount);", "@Test\n public void testRegistrarTax() throws Exception {\n Line line = new Line(LineItemType.Tax, \"\", \"\", \"Amazon Registrar\", \"\", \"\", \"Tax for product code AmazonRegistrar\", PricingTerm.none, \"2021-04-19T23:59:59Z\", \"2022-04-19T00:00:00Z\", \"1\", \"5.25\", \"\");\n line.setTaxFields(\"VAT\", \"AWS EMEA SARL\");\n ProcessTest test = new ProcessTest(line, Result.hourly, 31);\n Datum[] expected = {\n new Datum(CostType.tax, a2, Region.GLOBAL, null, registrar, Operation.getOperation(\"Tax - VAT\"), \"Tax - AWS EMEA SARL\", 5.25, 1),\n };\n test.run(\"2021-03-01T00:00:00Z\", expected);\n }", "private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }", "private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }", "BigDecimal getTax();", "void setTax(BigDecimal tax);", "@Override\n protected void chooseTax(){\n // Lets impose a tax rate that is inversely proportional to the number of subordinates I have:\n // That is, the more subordinates I have, the lower the tax rate.\n if(myTerritory.getSubordinates().isEmpty()){\n tax = 0;\n }\n else tax = 0.5;\n\n // Of course, if there are tax rates higher than .5, the system will set it to zero, so you should check on that\n }", "@RequestMapping(path = \"/dataStore\", method = RequestMethod.POST)\n\tpublic ResponseEntity<Void> calculateTaxes() {\n\t\tResponseEntity<Void> response;\n\t\ttaxationService.populate();\n\t\tresponse = new ResponseEntity<>(HttpStatus.OK);\n\t\treturn response;\n\t}", "public String createTax() throws Exception {\n taxsJpaController.create(tax);\n return null;\n }", "public com.vodafone.global.er.decoupling.binding.request.TaxType createTaxType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TaxTypeImpl();\n }", "public EasytaxTaxations() {\n this(\"easytax_taxations\", null);\n }", "protected List<TaxValue> createTaxValues(final double productPrice, final List<TaxInformation> taxInfos)\n\t{\n\t\tfinal List<TaxValue> taxes = new ArrayList<>();\n\t\tfor (final TaxInformation taxInfo : taxInfos)\n\t\t{\n\t\t\tdouble taxAmount;\n\t\t\tif (taxInfo.getTaxValue().isAbsolute())\n\t\t\t{\n\t\t\t\ttaxAmount = taxInfo.getTaxValue().getValue();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfinal double relativeTotalTaxRate = taxInfo.getTaxValue().getValue() / 100.0;\n\t\t\t\ttaxAmount = productPrice * relativeTotalTaxRate;\n\t\t\t}\n\t\t\tfinal TaxValue taxData = new TaxValue(taxInfo.getTaxValue().getCode(), taxAmount, taxInfo.getTaxValue().isAbsolute(),\n\t\t\t\t\ttaxInfo.getTaxValue().getCurrencyIsoCode());\n\t\t\ttaxes.add(taxData);\n\t\t}\n\t\treturn taxes;\n\t}", "public void setTaxAmtPriceList (BigDecimal TaxAmtPriceList);", "public void setTax(Double tax);", "public Checkout(double taxRate) {\n this.taxRate = taxRate;\n dessertList = new ArrayList<>();\n }", "double applyTax(double price);", "public void setPriceListWTax (BigDecimal PriceListWTax);", "public BigDecimal getPriceListWTax();", "double getTax();", "public void setTax(BigDecimal tax) {\n this.tax = tax;\n }", "public Double getTax();", "public BigDecimal getTaxAmtPriceList();", "public interface TaxCalculationService extends EpService {\n\t\n\t/**\n\t * Calculates the applicable taxes on a list of items, depending on the address to which they are being billed or shipped.\n\t * NOTICE: Only enabled is store tax jurisdictions should be used for calculating tax.\n\t * \n\t *\n\t * @param storeCode guid of the store that will be used to retrieve tax jurisdictions\n\t * @param address the address to use for tax calculations\n\t * @param currency the currency to use for tax calculations\n\t * @param shippingCost the cost of shipping, so that shipping taxes can be factored in\n\t * @param shoppingItems list of items that must be taxed\n\t * @param preTaxDiscount the total pre-tax discount to be applied on items, before taxes are calculated\n\t * @return the result of the tax calculations\n\t */\n\tTaxCalculationResult calculateTaxes(\n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost,\n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems,\n\t\t\tfinal Money preTaxDiscount);\n\t\n\t/**\n\t * Calculates the applicable taxes on a list of items, depending on the address to which they are being billed or shipped.\n\t * NOTICE: Only enabled is store tax jurisdictions should be used for calculating tax.\n\t *\n\t *\n\t * @param taxCalculationResult the tax calculation result to be used to add up the taxes to\n\t * @param storeCode guid of the store that will be used to retrieve tax jurisdictions\n\t * @param address the address to use for tax calculations. If null, no calculations will be performed.\n\t * @param currency the currency to use for tax calculations, must be non-null\n\t * @param shippingCost the cost of shipping, so that shipping taxes can be factored in, must be non-null\n\t * @param shoppingItems list of items that must be taxed, must be non-null\n\t * @param preTaxDiscount the total pre-tax discount to be applied on items, before taxes are calculated, must be non-null\n\t * @return the result of the tax calculations\n\t */\n\tTaxCalculationResult calculateTaxesAndAddToResult(\n\t\t\tfinal TaxCalculationResult taxCalculationResult, \n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost, \n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems, \n\t\t\tfinal Money preTaxDiscount);\n\n\t\n\t/**\n\t * Checks if that address is in a tax jurisdiction where tax inclusive method is used.\n\t * NOTICE: Only tax jurisdictions that is enabled is store will be considered.\n\t *\n\t * @param storeCode guid of the store that will be used to retrieve tax jurisdictions.\n\t * @param address the address to be checked\n\t * @return true if inclusive tax method is used\n\t */\n\tboolean isInclusiveTaxCalculationInUse(String storeCode, Address address);\n}", "public double getTaxes(){\n\t\treturn this.getExciseTax() + this.getFlightSegmentTax() + this.get911SecurityFee() + this.getPassengerFacilityFee();\n\t}", "public void setPriceStdWTax (BigDecimal PriceStdWTax);", "private Taxi storeTaxi(Taxi taxi){\n taxiRestService.createTaxi(taxi);\n return taxi;\n }", "public BigDecimal getTax() {\n return tax;\n }", "private void fillTaxInfo(Invoice invoice) {\r\n\t\ttry {\r\n\t\t\tIManagerBean companyBean = BeanManager.getManagerBean(Company.class);\r\n\t\t\tIterator iter = companyBean.getList(null).iterator();\r\n\t\t\tboolean surcharge = false;\r\n\t\t\tboolean taxFree = false;\r\n\t\t\tif(iter.hasNext()){\r\n\t\t\t\tCompany company = (Company)iter.next();\r\n\t\t\t\tsurcharge = company.isSurcharge();\r\n\t\t\t\ttaxFree = company.isTaxFree();\r\n\t\t\t}\r\n\t\t\tinvoice.setTaxFree(taxFree);\r\n\t\t\tinvoice.setSurcharge(surcharge);\r\n\t\t} catch (ManagerBeanException e) {\r\n\t\t\tLOGGER.log(Level.SEVERE, \"error obtaining company\", e);\r\n\t\t}\r\n\t}", "@Secured({ \"IS_AUTHENTICATED_ANONYMOUSLY\", \"ACL_SECURABLE_READ\" })\n Taxon getTaxon( BioAssaySet bioAssaySet );", "public abstract double calculateTax();", "public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"[email protected]\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"[email protected]\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"[email protected]\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"[email protected]\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }", "void createCustomers() {\r\n\t\tSystem.out.println(\"\\nCreating 5 customers:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tCustomer2 c2 = new Customer2(\"Serap\", \"Atik\");\r\n\t\tCustomer2 c3 = new Customer2(\"Kemal\", \"Tanir\");\r\n\t\tCustomer2 c4 = new Customer2(\"Betul\", \"Kara\");\r\n\t\tCustomer2 c5 = new Customer2(\"Selman\", \"Saki\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tem.persist(c2);\r\n\t\tem.persist(c3);\r\n\t\tem.persist(c4);\r\n\t\tem.persist(c5);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "TaxCalculationResult calculateTaxesAndAddToResult(\n\t\t\tfinal TaxCalculationResult taxCalculationResult, \n\t\t\tfinal String storeCode,\n\t\t\tfinal Address address, \n\t\t\tfinal Currency currency, \n\t\t\tfinal Money shippingCost, \n\t\t\tfinal Collection< ? extends ShoppingItem> shoppingItems, \n\t\t\tfinal Money preTaxDiscount);", "public double payTax(double[] taxPayers) {\n\n double taxToBePaid = 0.0;\n\n // Add every amount in a single variable\n for (int i = 0; i < taxPayers.length; i++) {\n taxToBePaid += taxPayers[i];\n }\n\n // check if the sum of every tax payer which bracket tax they fall into\n if (taxToBePaid < 15000) {\n return taxToBePaid * 0;\n } else if (taxToBePaid >= 15000 && taxToBePaid < 20000) {\n return taxToBePaid * 0.1;\n } else if (taxToBePaid >= 20000 && taxToBePaid < 30000) {\n return taxToBePaid * 0.2;\n } else {\n return taxToBePaid * 0.3;\n }\n\n }", "abstract protected BigDecimal getBasicTaxRate();", "@Override\r\n public double computeTax(PurchasedItems items, Date receiptDate) {\r\n\r\n if (taxHoliday(receiptDate) == true) {\r\n return 0.0;\r\n } else {\r\n return items.getTotalCost() * this.salesTax;\r\n }\r\n }", "public static Map<Integer, TaxCategory> novaScotia() {\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(8.79, 0, 29590.00); //Tax Category 1 for NS\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.95, 29590.01, 59180.00); //Tax Category 2 for NS\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.67, 59180.01, 93000.00); //Tax Category 3 for NS\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.50, 93000.01, 150000.00); //Tax Category 4 for NS\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(21.00, 150000.01, 10000000); //Tax Category 15for NS\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 void setTaxids(List<Integer> taxids) {\n this.taxids = taxids;\n }", "double getTaxAmount();", "@Override\n\tpublic void setTaxList(List<Tax> data) {\n\t\t\n\t}", "public Builder setTax(double value) {\n \n tax_ = value;\n onChanged();\n return this;\n }", "public double computeCustomsTax(String originCountry, double tobacoValue, double regularValue) {\n\t\tTaxComputer pece = getTaxComputer(originCountry);\n\t\treturn pece.compute(tobacoValue, regularValue);\n\t}", "public abstract void calcuteTax(Transfer aTransfer);", "public BigDecimal getPriceStdWTax();", "public static void addTaxi(Taxi taxi) {\n\t\tallTaxies.add(taxi);\n\t}", "static void serveFirstcustomer(Taxes taxes) {\n String input1[] = DummyData.getInput1();\n Driver customer1 = new Driver();\n //Computing output recipt\n String outputRecipt1[] = customer1.drive(input1, taxes);\n //Printing this output recipt;\n for (String entry : outputRecipt1) {\n System.out.println(entry);\n }\n }", "public void setTaxAmtPriceStd (BigDecimal TaxAmtPriceStd);", "public void setTaxRate(BigDecimal taxRate) {\n this.taxRate = taxRate;\n }", "private static void addTaxesToResponseItinerariesTotal(JSONObject reqJson, JSONObject resJson, JSONObject taxEngResJson) {\n\t\tMap<String, Map<String, JSONArray>> taxBySuppDestMap = getTaxesBySupplierAndDestination(taxEngResJson);\n\t\t\n\t\t// The order of vehicleAvail in service response JSON is not the same as it is in tax engine response JSON. \n\t\t// Therefore, we need to keep track of each supplier/destination occurrence of vehicleAvail. This may be an \n\t\t// overkill in context of reprice service from where this class is called but does not hurt. \n\t\tMap<String, Integer> suppDestIndexMap = new HashMap<String, Integer>();\n\t\tJSONObject resBodyJson = resJson.getJSONObject(JSON_PROP_RESBODY);\n\t\tJSONArray carRentalJsonArr = resBodyJson.getJSONArray(JSON_PROP_CARRENTALARR);\n\t\tfor (int i=0; i < carRentalJsonArr.length(); i++) {\n\t\t\t\n\t\t\tJSONArray vehicleAvailArr = carRentalJsonArr.getJSONObject(i).getJSONArray(JSON_PROP_VEHICLEAVAIL);\n\t\t\tfor(int j =0; j< vehicleAvailArr.length(); j++) {\n\t\t\t\tJSONObject vehicleAvailJson = vehicleAvailArr.getJSONObject(j);\n\t\t\t\t\n\t\t\t\tString suppID = vehicleAvailJson.getString(JSON_PROP_SUPPREF);\n\t\t\t\tString cityCode = RentalSearchProcessor.deduceDropOffCity(vehicleAvailJson);\n\t\t\t\tif (cityCode == null || cityCode.isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMap<String,Object> cityInfo = RedisCityData.getCityCodeInfo(cityCode);\n\t\t\t\tMap<String, JSONArray> travelDtlsMap = taxBySuppDestMap.get(suppID);\n\t\t\t\t//TODO: Uncomment later.\n\t\t\t\tString travelDtlsMapKey = String.format(\"%s|%s|%s\", cityInfo.getOrDefault(JSON_PROP_VALUE, \"\"), cityInfo.getOrDefault(JSON_PROP_STATE, \"\"), cityInfo.getOrDefault(JSON_PROP_COUNTRY, \"\"));\n//\t\t\t\tString travelDtlsMapKey = String.format(\"%s|%s|%s\", \"Mumbai\", \"Maharashtra\", \"India\");\n\t\t\t\tJSONArray fareDtlsJsonArr = travelDtlsMap.get(travelDtlsMapKey);\n\t\t\t\t\n\t\t\t\tString suppDestIndexMapKey = String.format(\"%s|%s\", suppID, travelDtlsMapKey);\n\t\t\t\tint idx = (suppDestIndexMap.containsKey(suppDestIndexMapKey)) ? (suppDestIndexMap.get(suppDestIndexMapKey) + 1) : 0;\n\t\t\t\tsuppDestIndexMap.put(suppDestIndexMapKey, idx);\n\t\t\t\t\n\t\t\t\tif (idx < fareDtlsJsonArr.length()) {\n\t\t\t\t\tJSONObject totalPriceInfoJson = vehicleAvailJson.getJSONObject(JSON_PROP_TOTALPRICEINFO);\n\t\t\t\t\tJSONObject totalFareJson = totalPriceInfoJson.getJSONObject(JSON_PROP_TOTALFARE);\n\t\t\t\t\tBigDecimal totalFareAmt = totalFareJson.getBigDecimal(JSON_PROP_AMOUNT);\n\t\t\t\t\tString totalFareCcy = totalFareJson.getString(JSON_PROP_CCYCODE);\n\t\t\t\t\t\n\t\t\t\t\tBigDecimal companyTaxTotalAmt = BigDecimal.ZERO;\n\t\t\t\t\tJSONObject fareDtlsJson = fareDtlsJsonArr.getJSONObject(idx);\n\t\t\t\t\tJSONArray companyTaxJsonArr = new JSONArray();\n\t\t\t\t\tJSONArray appliedTaxesJsonArr = fareDtlsJson.optJSONArray(JSON_PROP_APPLIEDTAXDTLS);\n\t\t\t\t\tif (appliedTaxesJsonArr == null) {\n\t\t\t\t\t\tlogger.warn(\"No service taxes applied on car-rental\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tfor (int k=0; k < appliedTaxesJsonArr.length(); k++) {\n\t\t\t\t\t\tJSONObject appliedTaxesJson = appliedTaxesJsonArr.getJSONObject(k);\n\t\t\t\t\t\tJSONObject companyTaxJson = new JSONObject();\n\t\t\t\t\t\tBigDecimal taxAmt = appliedTaxesJson.optBigDecimal(JSON_PROP_TAXVALUE, BigDecimal.ZERO);\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_TAXCODE, appliedTaxesJson.optString(JSON_PROP_TAXNAME, \"\"));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_TAXPCT, appliedTaxesJson.optBigDecimal(JSON_PROP_TAXPERCENTAGE, BigDecimal.ZERO));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_AMOUNT, taxAmt);\n\t\t\t\t\t\t//TaxComponent added on finance demand\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_TAXCOMP, appliedTaxesJson.optString(JSON_PROP_TAXCOMP));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_CCYCODE, totalFareCcy);\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_HSNCODE, appliedTaxesJson.optString(JSON_PROP_HSNCODE));\n\t\t\t\t\t\tcompanyTaxJson.put(JSON_PROP_SACCODE, appliedTaxesJson.optString(JSON_PROP_SACCODE));\n\t\t\t\t\t\tcompanyTaxJsonArr.put(companyTaxJson);\n\t\t\t\t\t\tcompanyTaxTotalAmt = companyTaxTotalAmt.add(taxAmt);\n\t\t\t\t\t\ttotalFareAmt = totalFareAmt.add(taxAmt);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Append the taxes retrieved from tax engine response in itineraryTotalFare element of pricedItinerary JSON\n\t\t\t\t\tJSONObject companyTaxesJson = new JSONObject();\n\t\t\t\t\tcompanyTaxesJson.put(JSON_PROP_AMOUNT, companyTaxTotalAmt);\n\t\t\t\t\tcompanyTaxesJson.put(JSON_PROP_CCYCODE, totalFareCcy);\n\t\t\t\t\tcompanyTaxesJson.put(JSON_PROP_COMPANYTAX, companyTaxJsonArr);\n\t\t\t\t\ttotalFareJson.put(JSON_PROP_COMPANYTAXES, companyTaxesJson);\n\t\t\t\t\ttotalFareJson.put(JSON_PROP_AMOUNT, totalFareAmt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public interface ITaxHandler\n{\n Object getTaxes(Long cartId, Boolean submitTax);\n\n Object getOrderTaxes(Order order, Long userId, Boolean submitTax);\n\n //Simple single-item tax request\n Object getTaxes(Address shippingAddress, String itemReferenceId, int quantity, Float price,\n String userId, Boolean submitTax);\n}", "@BeforeEach\n public void setUp() {\n incomeDataRepository.save( new IncomeData( null, TAXPAYER_ID, LocalDateTime.of( 2020, 1, 22, 12, 34 ), new BigDecimal( 826 ) ) );\n incomeDataRepository.save( new IncomeData( null, TAXPAYER_ID, LocalDateTime.of( 2020, 2, 10, 13, 48 ), new BigDecimal( 684 ) ) );\n\n // Tax layers:\n // 0-600: 10%\n // 601-1200: 15%\n // 1201-1600: 20%\n // 1601+: 30%\n TaxType type = new TaxType( null, \"Test type\", \"Test Description\" );\n taxTypeRepository.save( type );\n\n // Total paid already for year 2020: 167.85\n taxDataRepository.save( new TaxData( null, TAXPAYER_ID, type, LocalDateTime.of( 2020, 1, 22, 11, 21 ), new BigDecimal( \"67.85\" ) ) );\n taxDataRepository.save( new TaxData( null, TAXPAYER_ID, type, LocalDateTime.of( 2020, 2, 22, 12, 22 ), new BigDecimal( 100 ) ) );\n\n final LocalDateTime validFrom = LocalDateTime.now().minusYears( 1 );\n final LocalDateTime validTo = LocalDateTime.now().plusYears( 1 );\n\n taxLayerRepository.save( new TaxLayer( null, type, new BigDecimal( 10 ), BigDecimal.ZERO, new BigDecimal( 600 ), validFrom, validTo ) );\n taxLayerRepository.save( new TaxLayer( null, type, new BigDecimal( 15 ), new BigDecimal( \"600.01\" ), new BigDecimal( 1200 ), validFrom, validTo ) );\n taxLayerRepository.save( new TaxLayer( null, type, new BigDecimal( 20 ), new BigDecimal( \"1200.01\" ), new BigDecimal( 1600 ), validFrom, validTo ) );\n taxLayerRepository.save( new TaxLayer( null, type, new BigDecimal( 30 ), new BigDecimal( \"1600.01\" ), BigDecimal.valueOf( Integer.MAX_VALUE ), validFrom, validTo ) );\n }", "public double getTaxes() {\n return getArea() * TAX_RATE_PER_M2;\n }", "Customers createCustomers();", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "public List<PurchaseOrderLine> findByTax(Tax tax);", "public double getTax(){\n\n return this.tax;\n }", "public double taxCalc(int income1, int income2, int income3, int income4, int income5) {\n int[] arr = {income1, income2, income3, income4, income5};\n double taxTotal = 0.0;\n for (int i = 0; i < arr.length; i++) {\n taxTotal += (double) (arr[i] * 7 / 100);\n }\n return taxTotal;\n }", "public void addRoundOffTaxHead(String tenantId, List<DemandDetail> demandDetails) {\n\t\tBigDecimal totalTax = BigDecimal.ZERO;\n\t\t\n\t\tBigDecimal previousRoundOff = BigDecimal.ZERO;\n\t\t/*\n\t\t * Sum all taxHeads except RoundOff as new roundOff will be calculated\n\t\t */\n\t\tfor (DemandDetail demandDetail : demandDetails) {\n\t\t\tif (!demandDetail.getTaxHeadMasterCode().equalsIgnoreCase(SWCalculationConstant.MDMS_ROUNDOFF_TAXHEAD))\n\t\t\t\ttotalTax = totalTax.add(demandDetail.getTaxAmount());\n\t\t\telse\n\t\t\t\tpreviousRoundOff = previousRoundOff.add(demandDetail.getTaxAmount());\n\t\t}\n\n\t\tBigDecimal decimalValue = totalTax.remainder(BigDecimal.ONE);\n\t\tBigDecimal midVal = BigDecimal.valueOf(0.5);\n\t\tBigDecimal roundOff = BigDecimal.ZERO;\n\n\t\t/*\n\t\t * If the decimal amount is greater than 0.5 we subtract it from 1 and\n\t\t * put it as roundOff taxHead so as to nullify the decimal eg: If the\n\t\t * tax is 12.64 we will add extra tax roundOff taxHead of 0.36 so that\n\t\t * the total becomes 13\n\t\t */\n\t\tif (decimalValue.compareTo(midVal) >= 0)\n\t\t\troundOff = BigDecimal.ONE.subtract(decimalValue);\n\n\t\t/*\n\t\t * If the decimal amount is less than 0.5 we put negative of it as\n\t\t * roundOff taxHead so as to nullify the decimal eg: If the tax is 12.36\n\t\t * we will add extra tax roundOff taxHead of -0.36 so that the total\n\t\t * becomes 12\n\t\t */\n\t\tif (decimalValue.compareTo(midVal) < 0)\n\t\t\troundOff = decimalValue.negate();\n\n\t\t/*\n\t\t * If roundOff already exists in previous demand create a new roundOff\n\t\t * taxHead with roundOff amount equal to difference between them so that\n\t\t * it will be balanced when bill is generated. eg: If the previous\n\t\t * roundOff amount was of -0.36 and the new roundOff excluding the\n\t\t * previous roundOff is 0.2 then the new roundOff will be created with\n\t\t * 0.2 so that the net roundOff will be 0.2 -(-0.36)\n\t\t */\n\t\tif (previousRoundOff.compareTo(BigDecimal.ZERO) != 0) {\n\t\t\troundOff = roundOff.subtract(previousRoundOff);\n\t\t}\n\n\t\tif (roundOff.compareTo(BigDecimal.ZERO) != 0) {\n\t\t\tdemandDetails.add(DemandDetail.builder().taxAmount(roundOff)\n\t\t\t\t\t.taxHeadMasterCode(SWCalculationConstant.MDMS_ROUNDOFF_TAXHEAD).tenantId(tenantId)\n\t\t\t\t\t.collectionAmount(BigDecimal.ZERO).build());\n\t\t}\n\t}", "public StateTaxes()\n {\n this.stateAbbr = \"\";\n }", "public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }", "public BigDecimal getTaxAmtPriceStd();", "public float calculateTax(String state, Integer flatRate);", "public static void main(String[] args) {\n\t\tList<Good> goodList = new ArrayList<Good>();\n\t\tgoodList.add(new Good(\"paracetamol\", \"medical\", 120.65));\n\t\tgoodList.add(new Good(\"notebook\", \"stationary\", 35));\n\t\tgoodList.add(new Good(\"pizza\", \"food\", 350));\n\t\tgoodList.add(new Good(\"old monk\", \"alchohol\", 1000));\n\n\t\tList<Tax> taxList = new ArrayList<Tax>();\n\t\ttaxList.add(new Tax(\"basic tax\", 5.5, Arrays.asList(\"medical\")));\n\t\ttaxList.add(new Tax(\"import tax\", 10, Arrays.asList(\"medical\", \"food\")));\n\n\t\tdouble totalTax = new TaxCalculator().calculateTotalTax(goodList,\n\t\t\t\ttaxList);\n\t\tSystem.out.println(\"toal tax is:\" + totalTax);\n\t}", "public abstract double getTaxValue(String country);", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "public Tax getTax() {\n if (tax == null) {\n tax = new Tax();\n }\n return tax;\n }", "void generate(List<Customer> customers);", "public interface IOrderFactory{\n\t\n\t/**\n\t * Creates a collection of taxes for US and EU customers\n\t * \n\t * @return the sales tax\n\t */\n\tpublic ISalesTax getTaxObject();\n\t\n\t/**\n\t * Creates the shipping cost for US and EU customers\n\t * \n\t * @return shipping cost\n\t */\n\tpublic IShippingRate getRateObject();\n}", "public interface ExternalTaxesService\n{\n\t/**\n\t * Calculate the taxes for order via an external service\n\t * @param abstractOrder A Hybris cart or order\n\t * @return True if calculation was successful and false otherwise\n\t */\n\tboolean calculateExternalTaxes(final AbstractOrderModel abstractOrder);\n\n\t/**\n\t * Removes tax document from session if present\n\t */\n\tvoid clearSessionTaxDocument();\n}", "public double getTax() {\n return tax_;\n }", "public static void main(String[] args) {\n TaxOffice tallinnOffice = new TaxOffice();\n System.out.println(tallinnOffice.getTaxRate());\n \n // we have to limit access to taxRate\n // defined taxRate as private\n // provided getter method for reading its value\n \n tallinnOffice.setTaxRate(0.204);\n System.out.println(tallinnOffice.getTaxRate());\n \n \n }", "private static void createInvoiceTerms(Delegator delegator, LocalDispatcher dispatcher, String invoiceId, List<GenericValue> terms,\n GenericValue userLogin, Locale locale) {\n if (terms != null) {\n for (GenericValue term : terms) {\n\n Map<String, Object> createInvoiceTermContext = new HashMap<>();\n createInvoiceTermContext.put(\"invoiceId\", invoiceId);\n createInvoiceTermContext.put(\"invoiceItemSeqId\", \"_NA_\");\n createInvoiceTermContext.put(\"termTypeId\", term.get(\"termTypeId\"));\n createInvoiceTermContext.put(\"termValue\", term.get(\"termValue\"));\n createInvoiceTermContext.put(\"termDays\", term.get(\"termDays\"));\n if (!\"BillingAccountTerm\".equals(term.getEntityName())) {\n createInvoiceTermContext.put(\"textValue\", term.get(\"textValue\"));\n createInvoiceTermContext.put(\"description\", term.get(\"description\"));\n }\n createInvoiceTermContext.put(\"uomId\", term.get(\"uomId\"));\n createInvoiceTermContext.put(\"userLogin\", userLogin);\n\n Map<String, Object> createInvoiceTermResult = null;\n try {\n createInvoiceTermResult = dispatcher.runSync(\"createInvoiceTerm\", createInvoiceTermContext);\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Service/other problem creating InvoiceItem from order header adjustment\", MODULE);\n }\n if (ServiceUtil.isError(createInvoiceTermResult)) {\n Debug.logError(\"Service/other problem creating InvoiceItem from order header adjustment\", MODULE);\n }\n }\n }\n }", "public List<PurchaseOrderLine> findByTaxId(String taxId);", "double defaultTaxOnProduct(){\n\t\treturn 12.5;\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tSystem.out.println(\"enter the ctc inbetween 0 and 10,00,000\");\n\t\tint ctc=s.nextInt();\n\t\t\n\t\tTaxAmount tej= new TaxAmount();\n\t\tSystem.out.println(\"the total tax amount is :\"+tej.calculateTaxAmount(ctc));\n\t\ts.close();\n\n\t}", "ResponseEntity<List<TOURates>> getTouRates();", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "public Collection<TaxValueDTO> getTotalTaxValues()\n\t{\n\t\treturn totalTaxValues;\n\t}", "public RetailStore addAccountSet(RetailscmUserContext userContext, String retailStoreId, String name, String yearSet, Date effectiveDate, String accountingSystem, String domesticCurrencyCode, String domesticCurrencyName, String openingBank, String accountNumber, String countryCenterId, String goodsSupplierId , String [] tokensExpr) throws Exception;", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "public double getSalesTax() {\r\n return salesTax;\r\n }", "public double getTax() {\n return tax_;\n }", "public void setTaxAmtPriceLimit (BigDecimal TaxAmtPriceLimit);", "@Test\n public void testReadProductAndTaxDaoCorrectly() throws Exception {\n service.loadFiles(); \n\n Order newOrder = new Order();\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.calculateNewOrderDataInput(newOrder);\n\n Assert.assertEquals(newOrder.getTaxRate(), (new BigDecimal(\"6.25\")));\n Assert.assertEquals(newOrder.getCostPerSquareFoot(), (new BigDecimal(\"5.15\")));\n Assert.assertEquals(newOrder.getLaborCostPerSquareFoot(), (new BigDecimal(\"4.75\")));\n\n }", "void createOrder(List<Product> products, Customer customer);", "public void createCountries() {\n\t\t\n\t\tcountryArray = new Country[Constants.NUM_COUNTRIES];\n\t\t\n\t\tfor(int i=0; i<Constants.NUM_COUNTRIES; i++) {\n\t\t\tcountryArray[i] = (new Country(i));\n\t\t}\n\t}", "public void setTaxRate(double taxRate) {\n this.taxRate = taxRate;\n }", "public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }", "public XxupPerPsInstCountriesTrEOImpl() {\n }", "public void setTaxAmount(double value) {\n this.taxAmount = value;\n }", "public ProductTaxCodesDTO()\n\t{\n\t\tsuper();\n\t}", "public void setSalesTax(double salesTax) {\r\n this.salesTax = salesTax;\r\n }", "public JSONObject getAdvanceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountAdv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n if (reqParams.optBoolean(\"at\")) {\n /**\n * Get Advance for which invoice not linked yet\n */\n\n reqParams.put(\"at\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = (advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount)) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n } else {\n /**\n * Get Advance for which invoice isLinked\n */\n reqParams.put(\"atadj\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.adjustedamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = advanceobj.optDouble(GSTRConstants.adjustedamount) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvDataLinked = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvDataLinked) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n }\n\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountAdv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountAdv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n return jSONObject;\n }" ]
[ "0.61922824", "0.6126563", "0.5744419", "0.5741213", "0.5737817", "0.5689521", "0.56596875", "0.5652845", "0.5619456", "0.5571173", "0.55452734", "0.5528012", "0.5491031", "0.54793066", "0.5463414", "0.5462034", "0.54266155", "0.5409322", "0.5389064", "0.5383513", "0.5379069", "0.53672606", "0.5364023", "0.53401864", "0.52981734", "0.5286563", "0.5268781", "0.52666265", "0.5260091", "0.52496105", "0.5207602", "0.52068716", "0.52042454", "0.51819175", "0.5165738", "0.51589215", "0.5151562", "0.5150513", "0.51368934", "0.5136424", "0.5130266", "0.51146764", "0.5111574", "0.5108311", "0.51045936", "0.507959", "0.50656337", "0.5062123", "0.5061341", "0.5060411", "0.5046844", "0.50466555", "0.504146", "0.50161755", "0.50158066", "0.49942827", "0.49831924", "0.49748063", "0.4973936", "0.496384", "0.4947435", "0.493707", "0.49270463", "0.4918695", "0.4914484", "0.48998272", "0.48960143", "0.4893445", "0.48804572", "0.4879769", "0.48781896", "0.48731822", "0.4870089", "0.4856553", "0.48554215", "0.4852625", "0.48455355", "0.48402807", "0.48320246", "0.48272234", "0.48235473", "0.48019797", "0.47973672", "0.4797291", "0.47829476", "0.47824037", "0.47705063", "0.47601426", "0.475883", "0.47584978", "0.4752102", "0.47514528", "0.4751325", "0.47494423", "0.4741942", "0.4719907", "0.47189698", "0.47093737", "0.47067356", "0.47047144" ]
0.51987267
33
Creates the shipping cost for US and EU customers
public IShippingRate getRateObject();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ShipmentCostEstimate createShipmentCostEstimate();", "public void setshippingcost() {\r\n\t\tshippingcost = getweight() * 3;\r\n\t}", "double calculateDeliveryCost(Cart cart);", "public double calculateShipping() {\n shipAmount = (SHIPPINGCOST);\n\n return shipAmount;\n }", "public double getshippingcost() {\r\n\t\treturn shippingcost;\r\n\t}", "@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }", "BigDecimal getShipping();", "public void setShippingCost(double shippingCost) {\n\t\tthis.shippingCost = shippingCost;\n\t}", "public double calculateCost(Purchase purchase);", "public double getShippingCost() {\n\t\treturn shippingCost;\n\t}", "@Override\n protected double calcTotalCost() {\n \n double totalCost, templateBasicRate = DEFAULT_BASIC_RATE;\n double extraBedrooms = 0, extraBathrooms = 0;\n\n // if there are extra beds/baths\n if (this.getNumBedrooms() > DEFAULT_NUM_BEDROOMS)\n extraBedrooms = this.getNumBedrooms() - DEFAULT_NUM_BEDROOMS;\n\n if (this.getNumBathrooms() > DEFAULT_NUM_BATHROOMS)\n extraBathrooms = this.getNumBathrooms() - DEFAULT_NUM_BATHROOMS;\n\n // multiply basic rate by 1.5 if the total area is >= 3,000 sq ft\n if (this.getTotalArea() >= 3000)\n templateBasicRate *= 1.5;\n\n // calculate total cost\n totalCost = (templateBasicRate + ((800 * extraBedrooms) + (500 * extraBathrooms)));\n\n // add tax\n totalCost += (TAX * totalCost);\n\n return totalCost;\n }", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }", "public void calculateCost(Order currentOrder) {\n\n BigDecimal area = currentOrder.getArea();\n BigDecimal materialCost = (area.multiply(currentOrder.getProduct().getCostPerSqFt())).setScale(2);\n BigDecimal laborCost = (area.multiply(currentOrder.getProduct().getLaborCostPerSqFt()));\n BigDecimal tax = laborCost.add(materialCost).multiply(currentOrder.getState().getTaxRate().movePointLeft(2));\n BigDecimal total = materialCost.add(laborCost).add(tax);\n\n //using half_up for rounding to get the (nearest neighbor)\n //Setting each price to the object\n currentOrder.setMaterialCost(materialCost.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setLaborCost(laborCost.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setTax(tax.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setTotal(total.setScale(2, RoundingMode.HALF_UP));\n }", "@Override\n public double calcSalesFee() {\n return getCost() + getSalesPurchase();\n }", "float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}", "public PaymentRequest setShipping(ShippingType type, String country, String state, String city, String district,\r\n String postalCode, String street, String number, String complement, BigDecimal cost) {\r\n\r\n setShipping(type, country, state, city, district, postalCode, street, number, complement);\r\n shipping.setCost(cost);\r\n\r\n return this;\r\n\r\n }", "void setShipping(BigDecimal shipping);", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }", "public PaymentRequest setShippingCost(BigDecimal cost) {\r\n if (shipping == null) {\r\n shipping = new Shipping();\r\n }\r\n shipping.setCost(cost);\r\n return this;\r\n }", "public void setCost(BigDecimal cost) {\r\n this.cost = cost;\r\n }", "@Test\n public void defineShippingmethod()\n {\n library.agreeCheckbox();\n library.isAlertPresent1();\n library.enterCountryToCheckout(country);\n //Verify product added to shopping cart successfully\n library.verifyBillingAddressWindow();\n library.definingTheAddress(country,city,address1,postalCode,phone);\n library.shippingAddressSelect();\n library.verifyShippingMethodWindow();\n\n\n }", "double getCost();", "double getCost();", "double ComputeCost(double order, double tipPercent, double serviceRating, double foodRating)\r\n {\r\n // kazda gwiazdka to 2 procent od sumy zamówienia\r\n return order + order * (tipPercent/100) + (serviceRating * 0.02) * order + (foodRating * 0.02) * order;\r\n }", "public static void main (String [] args)\n {\n DecimalFormat mine = new DecimalFormat(\"$#,##0.00\");\n String name = \"\" ;\n String product = \" \";\n char choice = ' ';\n char prod;\n int qty = 0;\n int count = 0;\n double cost_of_product=0.0;\n double cost_of_shipment = 0.0;\n char deliveryType;\n double total_cost_of_product = 0.0;\n int total_Gizmo = 0;\n int total_Widget = 0;\n double total_Cost = 0;\n double total_Gizmo_Cost = 0;\n double total_Widget_Cost = 0; // list of variables\n\n System.out.print(\"Please enter your name: \");\n name = GetInput.readLine(); //customer enters name\n\n do {\n System.out.print(\"What product would you like to order (W/G): \");\n product =GetInput.readLine();\n prod = Character.toUpperCase(product.charAt(0));\n prod = validateProduct(prod); //validate W or G\n if(prod == 'W')\n {\n System.out.print(\"What quantity of Widgets do you want to order?: \");\n qty = GetInput.readLineInt();\n qty = widgetQty(qty);\n\n }\n else\n {\n System.out.print(\"What quantity of Gizmos do you want to order?: \");\n qty = GetInput.readLineInt();\n qty = gizmoQty(qty);\n } //qty of widgets/gizmos\n\n cost_of_product = Orders.productCost(qty, prod); //connecting TestOrders and Orders\n\n System.out.print(\"What shipping method would you like (F/U)?: \");\n deliveryType = Character.toUpperCase(GetInput.readLineNonwhiteChar());\n deliveryType = validateShipping(deliveryType); //selecting F or U shipping\n\n cost_of_shipment = Orders.shippingCost(qty, prod, deliveryType);\n //connecting TestOrders and Orders\n\n System.out.println(\"\\nCustomer: \" + name );//Detail report\n System.out.println(\"Ordered \" + qty +\" \"\n +(prod == 'W' ? \"Widgets \":\"Gizmos \") + \"costing \" + mine.format(cost_of_product) + \".\");\n System.out.println(\"Shipped via \"+ (deliveryType =='F' ? \"Fred \":\"USPS \")\n + \"costing \" + mine.format(cost_of_shipment) + \".\");\n\n total_cost_of_product = Orders.totalCost(cost_of_product, cost_of_shipment);\n //connecting TestOrders and Orders\n\n System.out.println(\"Total order cost is \" + mine.format(total_cost_of_product));\n\n count = count + 1; // order counter\n\n if(prod =='G')\n {\n total_Gizmo = total_Gizmo + qty;\n total_Gizmo_Cost = total_Gizmo_Cost + total_cost_of_product;\n }\n else\n {\n total_Widget = total_Widget + qty;\n total_Widget_Cost = total_Widget_Cost + total_cost_of_product;\n }\n\n total_Cost = total_Cost + total_cost_of_product;\n\n System.out.println(\"\\nDo you wish to make another order?: \");\n choice = GetInput.readLineNonwhiteChar(); //user enters Y/N to continue\n }while ((choice == 'Y') || (choice == 'y')); // end of do/while loop\n\n System.out.println(\"\\nSummary Report\"); //summary report\n System.out.println(count + \" Total Orders\");\n System.out.print(\"Total quantity of Gizmos ordered: \" + total_Gizmo\n + \" at a cost of \" + mine.format(total_Gizmo_Cost) );\n System.out.print(\"\\nTotal quantity of Widgets ordered: \" + total_Widget\n + \" at a cost of \" + mine.format(total_Widget_Cost));\n System.out.println(\"\\nTotal sales amount: \" + mine.format(total_Cost));\n }", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "@Override\n\tpublic double getSumOfCost() {\n\t String sql=\"SELECT SUM(cost) FROM supplier_product\";\n\t double total=this.getJdbcTemplate().queryForObject(sql, double.class);\n\t\treturn total;\n\t}", "public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }", "public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }", "public double calculatingCostO(int quantity)\n { \n cost = 750 + (0.25 * quantity);\n return cost;\n \n }", "private void calculateCosts() {\r\n lb_CubicSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Volume)) + \" €\");\r\n lb_MaterialCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Price)) + \" €\");\r\n lb_CuttingTimeSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingHours)) + \" €\");\r\n lb_CuttingCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice)) + \" €\");\r\n lb_TotalCosts.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice) + getColmunSum(tc_Price)) + \" €\");\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n }", "public void setCost(double value) {\n this.cost = value;\n }", "@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }", "private void initializeShippingPoints() {\n shipping_points = new ShippingPoint[num_shipping_points];\n \n int x_size = 8;\n int y_size = 8;\n int[][] grid = new int[x_size][y_size]; //keeps track of which locations are taken\n //so no two ShippingPoints have the same location\n \n int x = 0;\n int y = 0;\n \n for(int i = 0; i < num_shipping_points; i++)\n {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n while(grid[x][y] != 0) {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n }\n grid[x][y] = 1;\n if(i % 4 == 0) { //be careful -- probably won't work in the general case\n Supplier supplier = new Supplier(x, y, i);\n shipping_points[i] = supplier;\n }\n else {\n Customer customer = new Customer(x, y, i);\n shipping_points[i] = customer;\n }\n }\n \n if(eight_shipping_points) {\n //for 8 shipping points\n shipping_points[0].setPosition(4, 0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(8, 4);\n shipping_points[3].setPosition(8, 8);\n shipping_points[4].setPosition(4, 8);\n shipping_points[5].setPosition(0, 8);\n shipping_points[6].setPosition(0, 4);\n shipping_points[7].setPosition(0, 0);\n }\n \n else {\n //for 20 shipping points\n /**/shipping_points[0].setPosition(4,0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(12, 0);\n shipping_points[3].setPosition(16, 0);\n shipping_points[4].setPosition(20, 0);\n shipping_points[5].setPosition(20, 4);\n shipping_points[6].setPosition(20, 8);\n shipping_points[7].setPosition(20, 12);\n shipping_points[8].setPosition(20, 16);\n shipping_points[9].setPosition(20, 20);\n shipping_points[10].setPosition(16, 20);\n shipping_points[11].setPosition(12, 20);\n shipping_points[12].setPosition(8, 20);\n shipping_points[13].setPosition(4, 20);\n shipping_points[14].setPosition(0, 20);\n shipping_points[15].setPosition(0, 16);\n shipping_points[16].setPosition(0, 12);\n shipping_points[17].setPosition(0, 8);\n shipping_points[18].setPosition(0, 4);\n shipping_points[19].setPosition(0, 0);/**/\n }\n \n displayShippingPoints();\n }", "private CostHelper() {}", "private void generateReceipt(){\n ArrayList<Product> productList = cart.getProductList();\n ArrayList<Float> costsList = cart.getCostsList();\n for (int i=0; i<productList.size(); i++){\n String quantity = \"\"+productList.get(i).getQuantity();\n String name = \"\"+productList.get(i).getName();\n String cost = \"\"+Math.round(costsList.get(i) * 100.0) / 100.0;\n //String cost = \"\"+costsList.get(i);\n \n reciept.addLine(quantity+\" \"+name+\": \"+cost);\n }\n \n reciept.addLine(\"Total Taxes: \"+Math.round(cart.getTotalTax() * 100.0) / 100.0);\n reciept.addLine(\"Total: \"+ Math.round((cart.getTotalTax()+cart.getTotalCost()) * 100.0) / 100.0);\n // print reciept\n }", "public abstract double getCost();", "public BigDecimal getCost() {\r\n return cost;\r\n }", "List<ResourceSkuCosts> costs();", "public void setCost(double cost){\n this.cost = cost;\n }", "public CP getProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }", "@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "Shipment createShipment();", "public void createCostGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woCostTemp; \n\t\tdouble strCostTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle;\n\n\t\tint noOfRows = itemset0.countRows(); \n\t\tGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woCost = new double[noOfRows];\n\t\tdouble[] structureCost = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\twoCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOSTSINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOST\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\tif (woCost[i]>0 || structureCost[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOCOSTTITLE: Work Order Cost\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\tGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woCost,structureCost);\n\t}", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public double calcCost(){\n double cost = 0;\n cost += pMap.get(size);\n cost += cMap.get(crust);\n //Toppings are priced at 3.00 for 3-4 topppings, and 4.0 for 5+ toppings\n \n if(toppings !=null)\n {\n if((toppings.length == 3) || (toppings.length == 4)){\n cost += 3.0;\n }\n if (toppings.length > 4){\n cost += 4.0;\n }\n }\n \n return cost;\n }", "protected abstract double getDefaultCost();", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "public double getCost() {\n return quantity*ppu;\n\n }", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "public BigDecimal getCost() {\n return this.cost;\n }", "public BigDecimal getCost() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"Cost\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "@Pure\n\tdouble getCost();", "public String getCost() {\n // Formats the cost amount into money format.\n NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US);\n String s = n.format(Double.parseDouble(_cost));\n return s;\n }", "double getTotalCost();", "public CostInfo getCostInfo();", "@NotNull\n public BigDecimal getCost() {\n return cost;\n }", "@Override\r\n\tprotected void processCost() {\n\r\n\t}", "@When(\"^I enter Same Day Delivery shipping address on guest shipping page$\")\n public void I_enter_shipping_address_on_guest_shipping_page() {\n HashMap<String, String> opts = new HashMap<>();\n pausePageHangWatchDog();\n opts.put(\"sdd_eligible\", \"true\");\n if (macys()) {\n new Checkout(opts, false).fillShippingData(false);\n } else {\n new CheckoutPageBcom(opts, false).fillGuestShippingData(false);\n }\n resumePageHangWatchDog();\n }", "public void setCost(double cost) {\n this.cost = cost;\n }", "public Cost(float bc, float sc, float wc) {\r\n costs.put(Transports.BUS, bc);\r\n costs.put(Transports.SUBWAY, sc);\r\n costs.put(Transports.WALK, wc);\r\n\r\n }", "int getCost();", "int getCost();", "int getCost();", "Update withReturnShipping(ReturnShipping returnShipping);", "double setCost(double cost);", "public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n break;\n case \"large\":\n cost += 14;\n break;\n default:\n }\n return cost;\n }", "@Override\n public double getCost() {\n\t return 13;\n }", "public void setCost(double cost) {\r\n this.cost = cost;\r\n }", "public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}", "public void setShippingAddressInCart(Address addr);", "public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }", "String getTotalCost() {\n return Double.toString(totalCost);\n }", "public void setpurchaseCost(double systemPurchaseCost)\n\t{\n\t\tpurchaseCost = systemPurchaseCost;\n\t}", "public Cost getBuildShipCost() {\n\t\treturn new Cost(buildShipCost);\n\t}", "public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }", "void setCost(double cost);", "@Transactional\n @Override\n public StringBuffer addSalesOrder(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID, String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n\t\t} \n \n StringBuffer ordersList = new StringBuffer();\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = supplierFreightMap.get(string);\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(memo);\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t if(!paymentType.equals(\"3\")){\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t genarateShoppingCartOrder(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t\t}\n return ordersList;\n }", "public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public void calculateItemCost(CartItem cartItem) {\n cartItem.setCost((cartItem.getProduct().getPrice() * cartItem.getQuantity()) + cartItem.getTax());\n }", "@Override\r\n\tprotected void processCost() throws SGSException {\n\r\n\t}", "@Override\n public double getCost() {\n return cost;\n }", "@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}", "public static double calculations(int quantity, double cost) {\r\n\tdouble price = 0;\r\n\tprice = quantity*cost;\r\n\treturn price = price+calculateTax(price);\r\n\t}", "public CP getPsl13_ProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }", "public String approximateOrderCosts(String userAuthToken, String body) {\n return sendRequest(postResponseType, userAuthToken, body, deliveryOrderCostsPath, allResult, statusCode200);\n }", "ShipmentGatewayFedex createShipmentGatewayFedex();", "public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}", "double[] getBestSolAddressCost();", "@Override\r\n\tpublic Money calculateFee(TransferCommand command) {\r\n\t\treturn new Money(\"SGD\", 1d);\r\n\t}", "public abstract int getCost();", "public abstract int getCost();", "public abstract int getCost();", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "ShipmentItemBilling createShipmentItemBilling();" ]
[ "0.6784431", "0.6644519", "0.65329033", "0.61737305", "0.6164038", "0.611718", "0.60908544", "0.60333854", "0.59730583", "0.59190744", "0.58977395", "0.5840618", "0.5761093", "0.57484233", "0.5669704", "0.56367695", "0.56294507", "0.5627683", "0.5627396", "0.56121665", "0.56082845", "0.5552058", "0.5536685", "0.5524365", "0.5524365", "0.5507749", "0.5496105", "0.54755276", "0.547265", "0.546676", "0.54465485", "0.5427393", "0.5412862", "0.5411387", "0.5403726", "0.5394039", "0.5389754", "0.53873765", "0.5369976", "0.5369391", "0.53491515", "0.5310314", "0.53098965", "0.5307861", "0.5273227", "0.52673435", "0.5259341", "0.5257772", "0.5254056", "0.52485037", "0.52454805", "0.52409333", "0.5235301", "0.52343255", "0.523334", "0.52287906", "0.5223703", "0.5217238", "0.52152014", "0.5211305", "0.5200653", "0.51986027", "0.5197234", "0.51868033", "0.51818025", "0.51818025", "0.51818025", "0.51705074", "0.5169312", "0.5167643", "0.51585734", "0.5152278", "0.5152131", "0.5143605", "0.5140667", "0.51388276", "0.51383567", "0.51375115", "0.5135342", "0.5125636", "0.5117705", "0.51072526", "0.51013094", "0.5098935", "0.50893027", "0.50854194", "0.5077938", "0.50771517", "0.5072911", "0.50716394", "0.50697803", "0.5067925", "0.5062537", "0.5062021", "0.5060832", "0.50600934", "0.50600934", "0.50600934", "0.505984", "0.5059659", "0.5055577" ]
0.0
-1
Draws on lines to show a door or show a wall
private void drawWalls(Graphics g) { for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ if(grid[i][j].getNorth()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine(j*widthBlock+padding+doorX, i*heightBlock+padding, j*widthBlock+padding+doorWidth, i*heightBlock+padding); }else { g.setColor(Color.BLACK); g.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding+widthBlock, i*heightBlock+padding); } if(grid[i][j].getEast()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding+doorX, (j+1)*widthBlock+padding, i*heightBlock+padding+doorWidth); }else { g.setColor(Color.BLACK); g.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding); } if(grid[i][j].getSouth()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine(j*widthBlock+padding+doorX, (i+1)*heightBlock+padding, j*widthBlock+padding+doorWidth, (i+1)*heightBlock+padding); }else { g.setColor(Color.BLACK); g.drawLine(j*widthBlock+padding, (i+1)*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding); } if(grid[i][j].getWest()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine(j*widthBlock+padding, i*heightBlock+padding+doorX, j*widthBlock+padding, i*heightBlock+padding+doorWidth); }else { g.setColor(Color.BLACK); g.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding, (i+1)*heightBlock+padding); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void drawOn(DrawSurface d) {\n d.setColor(getColor());\n for (int i = 0; i < thick / 2; i++) {\n d.drawLine((int) p1.getX() + i, (int) p1.getY() + i,\n (int) p2.getX() + i, (int) p2.getY() + i);\n d.drawLine((int) p1.getX() - i, (int) p1.getY() - i,\n (int) p2.getX() - i, (int) p2.getY() - i);\n }\n }", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "@Override\r\n public void drawOn(DrawSurface d) {\r\n d.setColor(Color.decode(\"#298A1C\"));\r\n d.fillRectangle(0, 0, d.getWidth(), d.getHeight());\r\n\r\n // draw building:\r\n d.setColor(Color.decode(\"#414142\"));\r\n d.fillRectangle(100, 200, 10, 200);\r\n d.setColor(Color.decode(\"#171017\"));\r\n d.fillRectangle(90, 400, 30, 200);\r\n d.setColor(Color.decode(\"#170F12\"));\r\n d.fillRectangle(55, 450, 100, 200);\r\n d.setColor(Color.decode(\"#FFD149\"));\r\n d.fillCircle(105, 200, 11);\r\n d.setColor(Color.decode(\"#B86731\"));\r\n d.fillCircle(105, 200, 7);\r\n d.setColor(Color.WHITE);\r\n d.fillCircle(105, 200, 3);\r\n\r\n // draw windows:\r\n int width = 10;\r\n int height = 25;\r\n int space = 8;\r\n int rowHeight = 460;\r\n drawWindows(rowHeight, d);\r\n drawWindows(rowHeight + height + space, d);\r\n drawWindows(rowHeight + height * 2 + space * 2, d);\r\n drawWindows(rowHeight + height * 3 + space * 3, d);\r\n drawWindows(rowHeight + height * 4 + space * 4, d);\r\n drawWindows(rowHeight + height * 5 + space * 5, d);\r\n }", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public static void mainDraw(Graphics graphics) {\n int x1 = 50;\r\n int x2 = 180;\r\n int y1 = 180;\r\n int y2 = 50;\r\n Color[] colors = {Color.blue, Color.cyan, Color.green, Color.magenta};\r\n graphics.setColor(colors[1]);\r\n graphics.drawLine(x1, y2, x2, y2);\r\n graphics.setColor(colors[2]);\r\n graphics.drawLine(x2, y2, x2, y1);\r\n graphics.setColor(colors[3]);\r\n graphics.drawLine(x2, y1, x1, y1);\r\n graphics.setColor(colors[0]);\r\n graphics.drawLine(x1, y1, x1, y2);\r\n }", "public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }", "public void drawOn(DrawSurface d) {\r\n d.setColor(Color.decode(\"#00B5DC\"));\r\n d.fillRectangle(0, 0, d.getWidth(), d.getHeight());\r\n\r\n d.setColor(Color.white);\r\n for (int i = 0; i < 10; i++) {\r\n d.drawLine(160 + i * 10, 390, 130 + i * 10, d.getHeight());\r\n }\r\n for (int i = 0; i < 10; i++) {\r\n d.drawLine(560 + i * 10, 440, 520 + i * 10, d.getHeight());\r\n }\r\n d.setColor(Color.decode(\"#B8BDBC\"));\r\n d.fillCircle(150, 390, 25);\r\n d.setColor(Color.decode(\"#B3B8B7\"));\r\n d.fillCircle(170, 420, 30);\r\n d.setColor(Color.decode(\"#ACB1B0\"));\r\n d.fillCircle(200, 390, 30);\r\n d.setColor(Color.decode(\"#A4A9A8\"));\r\n d.fillCircle(210, 420, 25);\r\n d.setColor(Color.decode(\"#9BA09F\"));\r\n d.fillCircle(240, 405, 30);\r\n\r\n d.setColor(Color.decode(\"#B8BDBC\"));\r\n d.fillCircle(550, 440, 25);\r\n d.setColor(Color.decode(\"#B3B8B7\"));\r\n d.fillCircle(570, 470, 30);\r\n d.setColor(Color.decode(\"#ACB1B0\"));\r\n d.fillCircle(600, 440, 30);\r\n d.setColor(Color.decode(\"#A4A9A8\"));\r\n d.fillCircle(610, 470, 25);\r\n d.setColor(Color.decode(\"#9BA09F\"));\r\n d.fillCircle(640, 455, 30);\r\n }", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "private void drawCurve(){\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Line);\n for (int i = 0; i<dragonCurve1.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve1[i], dragonCurve1[i+1], dragonCurve1[i+2], dragonCurve1[i+3]);\n }\n for (int i = 0; i<dragonCurve2.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve2[i], dragonCurve2[i+1], dragonCurve2[i+2], dragonCurve2[i+3]);\n }\n for (int i = 0; i<dragonCurve3.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve3[i], dragonCurve3[i+1], dragonCurve3[i+2], dragonCurve3[i+3]);\n }\n for (int i = 0; i<dragonCurve4.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve4[i], dragonCurve4[i+1], dragonCurve4[i+2], dragonCurve4[i+3]);\n }\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.RED);\n renderer.end();\n if(MyCamera.renderSystems){ //Put red dots on the systems that are close enough to a certain point while zoomed in\n systems = GameScreen.database.getSystems(\"SELECT SystemX, SystemY, id FROM 'Systems' WHERE ABS(SystemX-\"+MyCamera.closeupCamera.position.x+\")<25\");\n for(int i = 0; i<systems.size(); i++){\n String[] parts = systems.get(i).split(\" \");\n float x = Float.parseFloat(parts[0]);\n float y = Float.parseFloat(parts[1]);\n String id = String.valueOf(Float.parseFloat(parts[2]));\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.circle(x, y, 0.5f);\n renderer.end();\n }\n }\n }", "public void drawDebug(){\n debugRenderer.setProjectionMatrix(cam.combined);\n debugRenderer.begin(ShapeRenderer.ShapeType.Line);\n\n for (Object e : world.getEnemies()) {\n Enemy enemy = (Enemy)e;\n Rectangle rect = enemy.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n\n for(Bullet b : world.getPlayer().getWeapon().getBullets()) {\n Rectangle rect = b.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n\n for(Enemy e : world.getEnemies()) {\n for(Bullet b : e.getWeapon().getBullets()){\n Rectangle rect = b.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n }\n\n Player player = world.getPlayer();\n Rectangle rect = player.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(0, 1, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n debugRenderer.end();\n }", "public void draw() {\t\n \t\t// Draw the centre of the maze\n \t\tPoint2D.Double centrePoint = GetCentrePoint();\n \t\t// if size is a factor of 10, this will be a multiple of 2\n \t\tint centreSize = getCentreSize();\n \t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n \t\tStdDraw.filledSquare(centrePoint.getX(), centrePoint.getY(), (centreSize / 2)-0.05);\n \t\t//Draw all the power switches\n \t\tdrawPowerSwitch(switches[0].x, switches[0].y);\n \t\tdrawPowerSwitch(switches[1].x, switches[1].y);\n \t\tdrawPowerSwitch(switches[2].x, switches[2].y);\n \t\tdrawPowerSwitch(switches[3].x, switches[3].y);\n \t\t\n \t\t\n \t\t// Get the data from the maze\n \t\tboolean south[][] = getSouth();\n \t\tboolean north[][] = getNorth();\n \t\tboolean east[][] = getEast();\n \t\tboolean west[][] = getWest();\n \t\tboolean sensor[][] = ms.getMotionSensors();\n \n \t\t//Draw the maze and motion sensors\n \t\tfor (int x = 1; x <= size; x++) {\n \t\t\tfor (int y = 1; y <= size; y++) {\n \t\t\t\tStdDraw.setPenColor(StdDraw.BLACK);\n \t\t\t\tif (south[x][y]) {\n \t\t\t\t\tStdDraw.line(x, y, x + 1, y);\n \t\t\t\t}\n \t\t\t\tif (north[x][y]) {\n \t\t\t\t\tStdDraw.line(x, y + 1, x + 1, y + 1);\n \t\t\t\t}\n \t\t\t\tif (west[x][y]) {\n \t\t\t\t\tStdDraw.line(x, y, x, y + 1);\n \t\t\t\t}\n \t\t\t\tif (east[x][y]) {\n \t\t\t\t\tStdDraw.line(x + 1, y, x + 1, y + 1);\n \t\t\t\t}\n \t\t\t\tif (sensor[x][y]) {\n \t\t\t\t\tStdDraw.setPenColor(StdDraw.MAGENTA);\n \t\t\t\t\tStdDraw.filledTriangle(x + 0.5, y + 0.4, 0.5);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "@Override\n public void draw(GameCanvas canvas) {\n drawWall(canvas, true, opacity);\n drawWall(canvas, false, opacity);\n }", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "public final void draw2D()\n {\n if ( GameLevel.current() != null )\n {\n //draw player's wearpon or gadget\n GameLevel.currentPlayer().drawWearponOrGadget();\n }\n\n //draw avatar message ( if active )\n AvatarMessage.drawMessage();\n\n //draw all hud messages\n HUDMessage.drawAllMessages();\n\n //draw fullscreen hud effects\n HUDFx.drawHUDEffects();\n\n //draw frames per second last\n Fps.draw();\n\n //draw ammo if the wearpon uses ammo\n if ( GameLevel.currentPlayer().showAmmoInHUD() )\n {\n drawAmmo();\n }\n\n //draw health\n drawHealth();\n\n //draw debug logs\n //Level.currentPlayer().drawDebugLog( g );\n }", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Triangle was drawing.\");\r\n\t\tSystem.out.println(\"new line\");\r\n\t\tSystem.out.println(\"second line \");\r\n\t\t//add comments\r\n\t\t// add more comments \r\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }", "void drawWall(Graphics g, Wall wall) {\n int x = wall.x;\n int y = wall.y;\n if(wall.horz) {\n g.drawLine(BORDER + x*SIZE, BORDER + y*SIZE, BORDER + (x+1)*SIZE, BORDER + y*SIZE);\n } else {\n g.drawLine(BORDER + x*SIZE, BORDER + y*SIZE, BORDER + x*SIZE, BORDER + (y+1)*SIZE);\n }\n }", "public void draw(float delta) {\n\t\tcanvas.clear();\n\t\tcanvas.begin();\n\t\tcw = canvas.getWidth();\n\t\tch = canvas.getHeight();\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(getBackground(dayTime), Color.WHITE, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\tif(dayTime == 0 || dayTime == 1){\n\t\t\t\t\tcanvas.draw(getBackground(dayTime + 1), levelAlpha, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcanvas.end();\n\t\tif (walls.size() > 0){ \n\t\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t}\n\t\tcanvas.begin();\n\t\t//\t\tcanvas.draw(background, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t//canvas.draw(rocks, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t\n\t\t\n//\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.draw(canvas);\n\t\t}\n\t\t\n\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(overlay, referenceC, cw*i, ch*j, cw, ch);\n\t\t\t}\n\t\t}\n\n\t\tcanvas.end();\n\n\t\tif (debug) {\n\t\t\tcanvas.beginDebug();\n\t\t\tfor(Obstacle obj : objects) {\n\t\t\t\tobj.drawDebug(canvas);\n\t\t\t}\n\t\t\tcanvas.endDebug();\n\t\t}\n\n\n\n//\t\t// Final message\n//\t\tif (complete && !failed) {\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"VICTORY!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t} else if (failed) {\n//\t\t\tdisplayFont.setColor(Color.RED);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"FAILURE!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t}\n\t}", "public void drawRoad(int player, int location, Graphics g){\n\t}", "public void makeGraphic() {\n\t\tStdDraw.clear();\n\n\t\tfor (int i = 0; i < p.showArray.size(); i++) {\n\t\t\tStdDraw.setPenColor(0, 255, 255);\n\n\t\t\tStdDraw.circle(p.showArray.get(i).acquirePosition().x, p.showArray.get(i).acquirePosition().y,\n\t\t\t\t\tp.showArray.get(i).acquireSizeOfBody());\n\t\t\tStdDraw.setPenColor(StdDraw.GRAY);\n\n\t\t\tStdDraw.filledCircle(p.showArray.get(i).acquirePosition().x, p.showArray.get(i).acquirePosition().y,\n\t\t\t\t\tp.showArray.get(i).acquireSizeOfBody());\n\n\t\t}\n\t\tStdDraw.show();\n\t}", "public void display()\n\t{\n\t\tfor(Character characher : characterAdded)\n\t\t{\t\n\t\t\tif(!characher.getIsDragging())\n\t\t\t{ \n\t\t\t\t//when dragging, the mouse has the exclusive right of control\n\t\t\t\tcharacher.x = (float)(circleX + Math.cos(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t\tcharacher.y = (float)(circleY + Math.sin(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint lineWeight = 0;\n\t\t//draw the line between the characters on the circle\n\t\tif(characterAdded.size() > 0)\n\t\t{\n\t\t\tfor(Character characher : characterAdded)\n\t\t\t{\n\t\t\t\tfor(Character ch : characher.getTargets())\n\t\t\t\t{\n\t\t\t\t\tif(ch.net_index != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int i = 0; i < links.size(); i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJSONObject tem = links.getJSONObject(i);\n\t\t\t\t\t\t\tif((tem.getInt(\"source\") == characher.index) && \n\t\t\t\t\t\t\t\t\t\t\t\t(tem.getInt(\"target\") == ch.index))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlineWeight = tem.getInt(\"value\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tparent.strokeWeight(lineWeight/4 + 1);\t\t\n\t\t\t\t\t\tparent.noFill();\n\t\t\t\t\t\tparent.stroke(0);\n\t\t\t\t\t\tparent.line(characher.x, characher.y, ch.x, ch.y);\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}", "private void showDraw() {\n StdDraw.show(0);\n // reset the pen radius\n StdDraw.setPenRadius();\n }", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "private void addWalls() {\n wallList.add(new RectF(0, 0, wallSize, screenHeight / 2 - doorSize));\n wallList.add(new RectF(0, screenHeight / 2 + doorSize, wallSize, screenHeight));\n wallList.add(new RectF(0, 0, screenWidth / 2 - doorSize, wallSize));\n wallList.add(new RectF(screenWidth / 2 + doorSize, 0, screenWidth, wallSize));\n wallList.add(new RectF(screenWidth - wallSize, 0, screenWidth, screenHeight / 2 - doorSize));\n wallList.add(new RectF(screenWidth - wallSize, screenHeight / 2 + doorSize, screenWidth, screenHeight));\n wallList.add(new RectF(0, screenHeight - wallSize, screenWidth / 2 - doorSize, screenHeight));\n wallList.add(new RectF(screenWidth / 2 + doorSize, screenHeight - wallSize, screenWidth, screenHeight));\n }", "public void draw()\n\t{\n\t\tdrawWalls();\n\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.draw();\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.draw();\n\t\t}\n\n\t\tdp.repaintAndSleep(rate);\n\t}", "private void drawFlights(){\n if(counter%180 == 0){ //To not execute the SQL request every frame.\n internCounter = 0;\n origins.clear();\n destinations.clear();\n internCounter = 0 ;\n ArrayList<String> answer = GameScreen.database.readDatas(\"SELECT Origin, Destination FROM Flights\");\n for(String s : answer){\n internCounter++;\n String[] parts = s.split(\" \");\n String xyOrigin, xyDestination;\n try{\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[0]+\"' ;\").get(0);\n } catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[0]+\"' ;\");\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n origins.add(new Vector2(Float.parseFloat(xyOrigin.split(\" \")[0]), Float.parseFloat(xyOrigin.split(\" \")[1])));\n\n try{\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[1]+\"' ;\").get(0);\n }catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[1]+\"' ;\");\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n destinations.add(new Vector2(Float.parseFloat(xyDestination.split(\" \")[0]), Float.parseFloat(xyDestination.split(\" \")[1])));\n }\n }\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.WHITE);\n renderer.circle(600, 380, 4);\n for(int i = 0; i<internCounter; i++){\n renderer.line(origins.get(i), destinations.get(i));\n renderer.setColor(Color.RED);\n renderer.circle(origins.get(i).x, origins.get(i).y, 3);\n renderer.setColor(Color.GREEN);\n renderer.circle(destinations.get(i).x, destinations.get(i).y, 3);\n }\n renderer.end();\n }", "public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void drawBorder(boolean blue)\n\t{\n\t\t// copied most of the following from http://forums.inside3d.com/viewtopic.php?t=1326\n\t\tif (blue)\n\t\t\tglColor3f(0, 0, 1); // blue\n\t\telse\n\t\t\tglColor3f(1, 0, 0); // red\n\n\t\tglLineWidth(2); // Set line width to 2\n\t\tglLineStipple(1, (short) 0xf0f0); // Repeat count, repeat pattern\n\t\tglEnable(GL_LINE_STIPPLE); // Turn stipple on\n\n\t\tglBegin(GL_LINE_LOOP);\n\t\tglVertex2d(x - BORDER, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y + BORDER + height);\n\t\tglVertex2d(x - BORDER, y + BORDER + height);\n\t\tglEnd();\n\t\tif (action == 3)\n\t\t{\n\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\tdouble endPoint = endPos;\n\t\t\tif (!downRight)\n\t\t\t\tendPoint = startPos;\n\t\t\t//System.out.println(\"StartPos, EndPos, endPoint: \" + startPos + \", \" + endPos + \", \" + endPoint);\n\t\t\tif (upDown)\n\t\t\t{\n\t\t\t\tglVertex2d(x - BORDER, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint + BORDER + height);\n\t\t\t\tglVertex2d(x - BORDER, endPoint + BORDER + height);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglVertex2d(endPoint - BORDER, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y + BORDER + height);\n\t\t\t\tglVertex2d(endPoint - BORDER, y + BORDER + height);\n\t\t\t}\n\t\t\tglEnd();\n\t\t}\n\n\t\tglDisable(GL_LINE_LOOP); // Turn it back off\n\t\tglDisable(GL_LINE_STIPPLE); // Turn it back off\n\t\tglEnd();\n\t}", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "public void drawHills() {Please try to remember how this retarded way of drawing hills works!\n //\n batch.draw(hill, hill1.getX(), hill1.getY(), hill1.getWidth(), hill1.getHeight());\n batch.draw(hill, hill2.getX(), hill2.getY(), hill2.getWidth(), hill2.getHeight());\n batch.draw(hill, hill3.getX(), hill3.getY(), hill3.getWidth(), hill3.getHeight());\n batch.draw(hill, hill4.getX(), hill4.getY(), hill4.getWidth(), hill4.getHeight());\n }", "public void draw() {\n draw(clientController.getUser().getShows());\n }", "@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}", "public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }", "private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }", "private void drawLinesAndMiddle(Line[] lines, DrawSurface d) {\n for (Line line : lines) {\n d.setColor(Color.black);\n d.drawLine((int) line.start().getX(), (int) line.start().getY(),\n (int) line.end().getX(), (int) line.end().getY());\n int r = 3;\n Point middle = line.middle();\n d.setColor(Color.BLUE);\n d.fillCircle((int) middle.getX(), (int) middle.getY(), r);\n }\n }", "private void drawEdge(Graphics2D g2d,Point p0, Point p1) {\n int x0 = (int)p0.x + FRAME_WIDTH/2;\n int y0 = FRAME_HEIGHT/2 - (int)p0.y ;\n int x1 = (int)p1.x + FRAME_WIDTH/2;\n int y1 = FRAME_HEIGHT/2 - (int)p1.y;\n if(DEBUG) System.out.println(\"In drawEdge: \" + x0 + \" \" + y0 + \" \"\n + x1 + \" \" + y1);\n g2d.drawLine(x0, y0, x1, y1);\n \n }", "private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }", "@Override\n protected void buildGraphics() {\n GArc rightWing = new GArc(100, 100, -60, 120);\n rightWing.setColor(Color.magenta);\n rightWing.setFilled(true);\n rightWing.setFillColor(Color.magenta);\n // position in format (cx - r, cy - r) for arc\n getGraphics().add(rightWing, (-15 - 50), (0 - 50));\n\n GArc leftWing = new GArc(100, 100, 120, 120);\n leftWing.setColor(Color.magenta);\n leftWing.setFilled(true);\n leftWing.setFillColor(Color.magenta);\n getGraphics().add(leftWing, (-15 - 50), (0 - 50));\n\n GOval rightWingDot = new GOval(-3, -15, 30, 30);\n rightWingDot.setColor(Color.blue);\n rightWingDot.setFilled(true);\n rightWingDot.setFillColor(Color.blue);\n getGraphics().add(rightWingDot);\n\n GOval rightWingDot2 = new GOval(7, -5, 10, 10);\n rightWingDot2.setColor(Color.cyan);\n rightWingDot2.setFilled(true);\n rightWingDot2.setFillColor(Color.cyan);\n getGraphics().add(rightWingDot2);\n\n GLine rightWingLine = new GLine(-15, 0, 35, 0);\n rightWingLine.setColor(Color.green);\n getGraphics().add(rightWingLine);\n\n GOval leftWingDot = new GOval(-57, -15, 30, 30);\n leftWingDot.setColor(Color.blue);\n leftWingDot.setFilled(true);\n leftWingDot.setFillColor(Color.blue);\n getGraphics().add(leftWingDot);\n\n GOval leftWingDot2 = new GOval(-47, -5, 10, 10);\n leftWingDot2.setColor(Color.cyan);\n leftWingDot2.setFilled(true);\n leftWingDot2.setFillColor(Color.cyan);\n getGraphics().add(leftWingDot2);\n\n GLine leftWingLine = new GLine(-15, 0, -65, 0);\n leftWingLine.setColor(Color.green);\n getGraphics().add(leftWingLine);\n\n GOval body = new GOval(-20, -30, 10, 60);\n body.setColor(Color.black);\n body.setFilled(true);\n body.setFillColor(Color.black);\n getGraphics().add(body);\n\n GOval head = new GOval(-23, -43, 16, 16);\n head.setColor(Color.black);\n head.setFilled(true);\n head.setFillColor(Color.black);\n getGraphics().add(head);\n }", "@Override\n public void draw(Graphics g, Dimension drawArea) {\n int widthUnit = drawArea.width / 6;\n int heightUnit = drawArea.height / 6;\n\n // Makes the lines thicker\n Graphics2D g2d = (Graphics2D)g;\n g2d.setStroke(new BasicStroke(3));\n\n // draws a circle and two lines\n g2d.drawOval(widthUnit, heightUnit, widthUnit * 4, heightUnit * 4);\n g2d.drawLine(widthUnit, heightUnit, 5 * widthUnit, 5 * heightUnit);\n g2d.drawLine(5 * widthUnit, heightUnit, widthUnit, 5 * heightUnit);\n }", "@Override\n public void draw(GraphicsContext gc, int sides){}", "public void draw() {\n \n // TODO\n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }", "public void drawOn(Graphics g){\r\n\t\tif (ignoreStrokes > 0){\r\n\t\t\tg.setColor(Color.cyan); \t//to show the player that they are frozen\r\n\t\t} else {\r\n\t\t\tg.setColor(Color.white);\r\n\t\t}\r\n\t\tmySnake.drawOn(g);\r\n\t\tfor (Mushroom m : shrooms){\r\n\t\t\tm.drawOn(g);\r\n\t\t}\r\n\t}", "public void draw(Graphics g) {\n\t\tif (isRoom()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t\telse if (isDoorway()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t\tif (direction == DoorDirection.UP) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, SMALL_RECT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.RIGHT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH + CELL_WIDTH - SMALL_RECT, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.DOWN) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT + CELL_HEIGHT - SMALL_RECT, CELL_WIDTH, 5);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.LEFT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tg.setFont(new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.drawString(roomName, column * CELL_WIDTH, row * CELL_HEIGHT);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t}", "public void drawDragon(Graphics g)\n {\n g.setColor(c); // Watermelon Dragon.\n g.fillRect(x, y , size * 25, size * 25); //Draw Head\n g.fillRect(bodyX, bodyY, bodyWidth, bodyHeight); //Draw Body\n g.fillRect(x+size * 25, (y + size*25) + size * 50, size * 10, size * 50); //Draw Leg #1\n g.fillRect(x+size * 25+ size*60-size*10, (y + size*25) + size * 50, size * 10, size * 50); //Draw Leg #2//Draw Health bar\n /*if(health > 30)\n {\n g.setColor(Color.YELLOW);\n g.fillRect(x, y - 50, size * 60, size*50/6);\n }*/\n \n }", "public void draw(Graphics window)\r\n {\r\n window.setColor(color);\r\n window.fillRect(xPos, yPos, width, height);\r\n window.setColor(Color.green);\r\n window .fillOval(xPos-15, yPos-15, width-20, height-20);\r\n window .fillOval(xPos+35, yPos-15, width-20, height-20);\r\n\r\n }", "@Override\n public void paintComponent(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setStroke(new BasicStroke(WALL));\n int[] xs = {BORDER + WALL, BORDER, BORDER, BORDER + (width-1)*SIZE + WALL};\n int[] ys = {BORDER, BORDER, BORDER + height*SIZE, BORDER + height*SIZE};\n g2.drawPolyline(xs, ys, 4);\n int[] xs2 = {BORDER + SIZE - WALL, BORDER + width*SIZE, BORDER + width*SIZE, BORDER + width*SIZE - WALL};\n g2.drawPolyline(xs2, ys, 4);\n // code that was used to create the intermediate images\n// g2.setColor(Color.LIGHT_GRAY);\n// for(int i = 1; i < height; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(BORDER + WALL, where, BORDER + width * SIZE - WALL, where);\n// }\n// for(int i = 1; i < width; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(where, BORDER + WALL, where, BORDER + height * SIZE - WALL);\n// }\n g2.setColor(Color.blue);\n for(Wall wall : walls) {\n drawWall(g2, wall);\n }\n }", "void render() {\n\t\tif (!dragLock)\n\t\t\tfucusLocks();\n\n\t\t// display help information\n\t\tString selected = isSelected ? \" [selected]\" : \"\";\n\t\tmyParent.text(id + selected, anchor.x + 10, anchor.y);\n\n\t\t// display points and lines with their colourings\n\t\tfor (int i = 0; i < amount; i++) {\n\n\t\t\tpoint[i].render();\n\n\t\t\tif (state == State.DRAG_AREA)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\n\t\t\tline[i].draw();\n\n\t\t}\n\n\t\t// display rotation ellipse in anchor position\n\t\tif (state == State.ROTATE && isSelected) {\n\t\t\tmyParent.noFill();\n\t\t\tif (!dragLock)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\t\t\telse\n\t\t\t\tmyParent.stroke(0, 255, 0);\n\t\t\tmyParent.ellipse(anchor.x, anchor.y, 15, 15);\n\t\t}\n\n\t\t// display drag area rectangle in anchor position\n\t\tif (state == State.DRAG_AREA) {\n\t\t\tmyParent.noFill();\n\t\t\tif (!dragLock)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\t\t\telse\n\t\t\t\tmyParent.stroke(0, 255, 0);\n\t\t\tmyParent.rect(anchor.x, anchor.y, 15, 15);\n\t\t}\n\n\t\t// display anchor point\n\t\tmyParent.rect(anchor.x, anchor.y, 5, 5);\n\n\t\t// display line centres\n\t\tmyParent.noFill();\n\t\tmyParent.stroke(150);\n\t\tmyParent.rectMode(PConstants.CENTER);\n\t\tmyParent.rect(X.x, X.y, 5, 5);\n\t\tmyParent.rect(Y.x, Y.y, 5, 5);\n\t\tmyParent.rect(Z.x, Z.y, 5, 5);\n\t\tmyParent.rect(Q.x, Q.y, 5, 5);\n\t}", "public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }", "public void draw(Graphics2D g2) {\r\n\tif (!bustedWall) {\r\n\t\tg2.setColor(new Color(0, 0, 0)); \r\n\t\tSystem.out.println(\"black\"); // for testing purposes\r\n\t}else {\r\n\t\tg2.setColor(new Color(255,255,255)); \r\n\t\tSystem.out.println(\"white\"); // for testing purposes\r\n\t}\r\n\tg2.drawLine(x1, y1, x2, y2); \r\n\t// print the untranslated coordinates for testing purposes\r\n\tSystem.out.println(String.format(\"%d,%d,%d,%d\",x1 - TRANSLATION ,y1 - TRANSLATION,x2 - TRANSLATION,y2 - TRANSLATION));\r\n}", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }", "public void draw(Graphics2D g2, int xPos, int yPos, int width, int height){\r\n int eyeD = width/10;\r\n if (this.isLeft){\r\n eye = new Arc2D.Double(xPos+width/4 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width/4-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n else{\r\n eye = new Arc2D.Double(xPos+width*5/8 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width*5/8-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n g2.setColor(color);\r\n g2.fill(eye);\r\n g2.setColor(Color.BLACK);\r\n g2.setStroke(new BasicStroke(2.0f));\r\n g2.draw(eye);\r\n g2.draw(eyeC);\r\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif(directY != 0){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\tif(lastDirectX == 1){\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t\t}else{\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(isMove){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 1) * 150, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 4)* 150, 150, 150, 150);\n\t\t\t}\n\t\t}else{\n\t\t\tif(lastDirectX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),0, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 150, 150, 150);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgc.drawImage(hanzoBody, x-55, y-50);\n\t\tgc.drawImage(hanzoLeg, x-55, y-50);\n\t\t//gc.drawImage(hanzoFX, x-55, y-50);\n\t\t\n\t}", "public void draw(Graphics g) {\n int x = super.getX();\n int y = super.getY();\n int d = (int)radius*2; //d = diameter\n g.setColor(Color.BLACK);\n g.drawOval(265/2,235,265,265);\n g.drawLine(265, 115, 265, 500);\n\n int [ ] x2 = {27, 500, 265}; //lets work on that line?\n int [ ] y2 = {500, 500, 115};\n g.setColor(Color.black);\n g.drawPolygon(x2, y2, 3);\n\n }", "public void paint(Graphics g)\n {\n int X_x;\n int X_y;\n int Y_x;\n int Y_y;\n int Z_x;\n int Z_y;\n\n X_x = 0;\n X_y = 0;\n Y_x = 500;\n Y_y = 0;\n Z_x = 250;\n Z_y = 500;\n\n int currentX = X_x;\n int currentY = X_y;\n int targetX, targetY;\n int midwayX, midwayY;\n Random r = new Random();\n\n for(int i = 0; i < 10000; i++)\n {\n int random = r.nextInt(3);\n if(random == 0)\n {\n targetX = X_x;\n targetY = X_y;\n }\n else if(random == 1)\n {\n targetX = Y_x;\n targetY = Y_y;\n }\n else\n {\n targetX = Z_x;\n targetY = Z_y;\n }\n\n //halfway between\n currentX = (targetX + currentX) / 2;\n currentY = (targetY + currentY) / 2;\n g.drawLine(currentX, currentY, currentX, currentY);\n }\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tGraphics2D g2d= (Graphics2D)g;//Cast the Graphics received in the paint method to Graphics2D\r\n\t\tg2d.setColor(Color.RED);//Set the color to red\r\n\t\tg2d.setStroke(new BasicStroke(5));//Set the width of the line to 5px \r\n\t\t//g2d.drawLine(0, 0, 500, 500);//Draw a line starting at point (0,0) and ending at point (500,500)\r\n\t\t//g2d.drawRect(100, 100, 300, 300);//Draw a rectangle with upper left corner at (100,100) and with width and height of 300px\r\n\t\tg2d.setColor(Color.GREEN);//Set the color to green\r\n\t\t//g2d.fillRect(100, 100, 300, 300);//Fill the rectangle\r\n\t\t\r\n\t\t//If we will draw the line first and then the rectangle, the rectangle will be on top of the line and hide part of it\r\n\t\t//g2d.drawOval(100, 100, 300, 300);//Draw circle\r\n\t\t//g2d.fillOval(100, 100, 300, 300);//Fill the circle\r\n\t\t\r\n\t\t//g2d.drawArc(100,100,200,200,0,180);//Draw half circle\r\n\t\r\n\t\t//g2d.drawArc(100,100,200,200,180,180);//Flip it\r\n\t\t//g2d.drawArc(100,100,200,200,0,270);//Draw 3/4 of a circle\r\n\t\t\r\n\t\t//int[] xPoints= {150,250,350};\r\n\t\t//int[] yPoints= {300,150,300};\r\n\t\t//g2d.drawPolygon(xPoints,yPoints,3);//Draw rectangle using polygon, specify x points and y points of the corners and number of corners,\r\n\t\t\t\t\t\t\t\t\t\t //we can specify more than 3 corners and create different shapes.\r\n\t\t\t\t\r\n\t\t//g2d.fillPolygon(xPoints,yPoints,3);//Fill the rectangle using polygon\r\n\t\tg2d.setColor(Color.BLACK);//Set the color to black\r\n\t\tg2d.setFont(new Font(\"Ink Free\", Font.BOLD,40));\r\n\t\tg2d.drawString(\"Hello world\", 100, 100);\r\n\t}", "public void drawOn(Graphics g);", "public void draw(Graphics g) {\r\n g.drawLine(line.get(0).getX() + 4, line.get(0).getY() + 4, line.get(4).getX() + 4, line.get(4).getY() + 4);\r\n }", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "@Override\n\tpublic void draw(Graphics2D graphics) {\n\t\tdrawRays(graphics);\n\t\t\n\t\t//Debug Info\n\t\tif(r_debug) {\n\t\t\tgraphics.setColor(Color.RED);\n\t\t\tgraphics.drawString(posxString + eye.position.getX(), 10, 20);\n\t\t\tgraphics.drawString(posyString + eye.position.getY(), 10, 35);\n\t\t\tgraphics.drawString(angleString + eye.angle, 10, 50);\n\t\t}\n\t\t\n\t\t//Let's increment our frame-count.\n\t\tframeCount++;\n\t}", "public void paint( Graphics g ){\n g.drawOval(-4, -4, 8, 8);\n g.drawLine(-2, 2, 2,-2);\n g.drawLine(-2,-2, 2, 2);\n }", "void drawPlayer(float x, float y, float w)\n\t{\n\t\tline(x, y, x + 50, y);\n\t\tline(x, y, x, y - 50);\n\t\tline(x + 50, y, x + 50, y - 50);\n\t\tline(x, y - 50, x + 50, y - 50);\n\t\tstroke(255,0,0);\n\t}", "@Override\r\n public final void draw(final Diamond d, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(d.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(d.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(d.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(d.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(d.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(d.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(d.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(d.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(d.getBorderColor().getBlue());\r\n } \r\n String color = \"#\" + red + green + blue;\r\n draw(new Line((String.valueOf(d.getX())),\r\n String.valueOf(d.getY() - (d.getDiagVerticala() / 2)),\r\n String.valueOf(d.getX() - (d.getDiagOrizontala() / 2)), String.valueOf(d.getY()),\r\n color, String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX() - (d.getDiagOrizontala() / 2))),\r\n String.valueOf(d.getY()), String.valueOf(d.getX()),\r\n String.valueOf(d.getY() + (d.getDiagVerticala() / 2)), color,\r\n String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX())),\r\n String.valueOf(d.getY() + (d.getDiagVerticala() / 2)),\r\n String.valueOf(d.getX() + (d.getDiagOrizontala() / 2)), String.valueOf(d.getY()),\r\n color, String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX() + (d.getDiagOrizontala() / 2))),\r\n String.valueOf(d.getY()), String.valueOf(d.getX()),\r\n String.valueOf(d.getY() - (d.getDiagVerticala() / 2)), color,\r\n String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n floodFill(d.getX(), d.getY(), d.getFillColor(), d.getBorderColor(), paper);\r\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void render(Screen screen) {\n double open = openness * 0.47;\n List<Sprite> doorSprites = ((Door) sprites).doorSprites;\n if (level.getTile(x, y - 1).isWall() && level.getTile(x, y + 1).isWall()) {\n sprites.rotate(0, true);\n for (int i = 0; i < doorSprites.size(); i++) {\n Sprite sprite = doorSprites.get(i);\n if (sprite.z < 0.45) {\n sprite.z -= open;\n } else {\n sprite.z += open;\n }\n }\n } else {\n sprites.rotate(Math.PI * 2 * 0.25, true);\n for (int i = 0; i < doorSprites.size(); i++) {\n Sprite sprite = doorSprites.get(i);\n if (sprite.x < 0.45) {\n sprite.x -= open;\n } else {\n sprite.x += open;\n }\n }\n }\n super.render(screen);\n }", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public void drawMainWindow(){\n\n p.pushMatrix();\n p.translate(0,0);// translate whole window if necessary\n\n // window stuff\n // show name and draw\n p.stroke(0);\n p.strokeWeight(2);\n p.textSize(30);\n p.fill(0);\n p.text(\"Work space\",15,35);\n p.rectMode(CORNER);\n p.fill(219, 216, 206);\n p.rect(-285,40,1000,700);\n p.rectMode(CENTER);\n\n // show \"pause\" text\n if(pause) {\n p.fill(0);\n p.textSize(20);\n p.text(\"PAUSE\", 20, 60);\n p.textSize(12);\n }\n\n // draw coordinates lines\n drawCoordinateSystem();\n showRouteAsked();\n calculatePointer();\n\n // main mainManipulator\n manipulator.showManipulator(false);\n manipulator.route(true);\n\n if(routeAsked.size()>0) {\n if(!pause) manipulator.moveManally(routeAsked.get(0).copy());\n\n if (manipulator.segment_2_end.dist(routeAsked.get(0)) < 1) {\n routeAsked.remove(0);\n }\n\n // if you want to make it work with nn:\n\n// p.circle(routeAsked.get(0).x,routeAsked.get(0).y,15);\n// manipulator.setTarget(routeAsked.get(0));\n// manipulator.route(true);\n// if (!pause) manipulator.update();\n// manipulator.showManipulator(true);\n//\n// if (manipulator.targetDistFromAgent < 10) {\n// routeAsked.remove(0);\n// }\n }\n\n\n // pointer\n // show pointer and line to the pointer\n p.stroke(2);\n p.stroke(133, 168, 13,100);\n p.line(BASE_POS.x,BASE_POS.y,p.cos(pointerAngle)*pointerDist+BASE_POS.x,p.sin(pointerAngle)*pointerDist+BASE_POS.y);\n p.fill(207, 95, 43);\n p.noStroke();\n p.ellipse(pointerPos.x,pointerPos.y,15,15);\n\n p.popMatrix();\n }", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}", "public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }", "public void draw(Graphics2D g)\n {\n //g.setColor(Color.black);\n //g.drawString(statusMsg,20,20);\n\n /* only draw when game is not running */\n if(GAME_RUNNING == false && selectedWidget != null)\n {\n if(SELECT_MODE == SelectMode.SELECTED || SELECT_MODE == SelectMode.DRAGGING)\n {\n /* draw boundary of selected widget */\n g.setColor(Color.orange);\n\n Vector2f[] points = selectedWidget.getBoundary();\n for(int i = 0; i <= 3; i++)\n \t\t{\n \n \t\t\tg.drawLine(\n (int)points[i].getX(),\n (int)points[i].getY(),\n (int)points[(i+1)%4].getX(),\n (int)points[(i+1)%4].getY());\n \t\t}\n }\n\n if(SELECT_MODE == SelectMode.DRAGGING || SELECT_MODE == SelectMode.ADDING)\n {\n /* draw boundary of dragged widget */\n if (timWorld.testPlacement(selectedWidget, mouseX + clickOffsetX, mouseY + clickOffsetY))\n {\n /* placement position is safe, draw green boundary */\n g.setColor(Color.green);\n }\n else\n {\n /* placement position unsafe, draw red boundary */\n g.setColor(Color.red);\n }\n \n Vector2f[] points = selectedWidget.getBoundary();\n for(int i = 0; i <= 3; i++)\n \t\t{\n \n if(SELECT_MODE == SelectMode.ADDING)\n {\n \t\t\tg.drawLine(\n (int)(points[i].getX() + mouseX),\n (int)(points[i].getY() + mouseY),\n (int)(points[(i+1)%4].getX() + mouseX),\n (int)(points[(i+1)%4].getY() + mouseY));\n }\n else\n {\n \t\t\t g.drawLine(\n (int)(points[i].getX() + (mouseX - pressX)),\n (int)(points[i].getY() + (mouseY - pressY)),\n (int)(points[(i+1)%4].getX() + (mouseX - pressX)),\n (int)(points[(i+1)%4].getY() + (mouseY - pressY)));\n }\n \t\t}\n }\n }\n }", "public void moveAndDraw(Graphics window)\r\n {\n Color temp = getColor();\r\n\t\tdraw(window, Color.WHITE);\r\n\t\tsetPos(getXSpeed()+xSpeed, getYSpeed()+ySpeed);\r\n\t\tdraw(window, temp);\r\n\t\t//setY\r\n\r\n\t\t//draw the ball at its new location\r\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public DrawHouse(){\r\n\t\tcanvas = new SketchPad(1000, 1000);\r\n\t\tpen = new DrawingTool(canvas);\r\n\t}", "public static void drawLines(Pane pane) {\n\n for (int i = 0; i < 4; i++) {\n Line lineH = new Line(0, i * 150, 450, i * 150);\n lineH.setStroke(Color.DARKGRAY);\n lineH.setStrokeWidth(3);\n pane.getChildren().add(lineH);\n\n Line lineV = new Line(i * 150, 0, i * 150, 450);\n lineV.setStroke(Color.DARKGRAY);\n lineV.setStrokeWidth(3);\n pane.getChildren().add(lineV);\n }\n }", "public void draw() {\n easyFade();\n\n if(showSettings) \n { \n // updates the kinect raw depth + pixels\n kinecter.updateKinectDepth(true);\n \n // display instructions for adjusting kinect depth image\n instructionScreen();\n\n // want to see the optical flow after depth image drawn.\n flowfield.update();\n }\n else\n {\n // updates the kinect raw depth\n kinecter.updateKinectDepth(false);\n \n // updates the optical flow vectors from the kinecter depth image (want to update optical flow before particles)\n flowfield.update();\n particleManager.updateAndRenderGL();\n }\n}", "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 }", "public void draw() {\n\t\tapplyColors();\n\n\t\tfloat halfHeight = height / 2,\n\t\t\t\tdiameter = 2 * radius;\n\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\t\t// Draw top of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, -height);\n\t\t// Draw bottom of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\n\t\tRobotRun.getInstance().beginShape(RobotRun.TRIANGLE_STRIP);\n\t\t// Draw a string of triangles around the circumference of the Cylinders top and bottom.\n\t\tfor (int degree = 0; degree <= 360; ++degree) {\n\t\t\tfloat pos_x = RobotRun.cos(RobotRun.DEG_TO_RAD * degree) * radius,\n\t\t\t\t\tpos_y = RobotRun.sin(RobotRun.DEG_TO_RAD * degree) * radius;\n\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, halfHeight);\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, -halfHeight);\n\t\t}\n\n\t\tRobotRun.getInstance().endShape();\n\t}", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "public void drawWall(GameCanvas canvas, boolean front, Color opacity) {\n if(texture == null) {\n System.out.println(\"draw() called on wall with null texture\");\n return;\n }\n\n // Draw nothing if this wall isn't the kind that should be drawn\n if(isFrontWall() != front) {\n return;\n }\n\n // Draw the primary frame\n wallStrip.setFrame(primaryFrame);\n wallNightStrip.setFrame(primaryFrame);\n\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n\n // Draw the left side\n if(leftFrame != NO_SIDE) {\n wallStrip.setFrame(leftFrame);\n wallNightStrip.setFrame(leftFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n\n // Draw the right side\n if(rightFrame != NO_SIDE) {\n wallStrip.setFrame(rightFrame);\n wallNightStrip.setFrame(rightFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n\n // Draw the front edge\n if(frontEdgeFrame != NO_SIDE) {\n wallStrip.setFrame(frontEdgeFrame);\n wallNightStrip.setFrame(frontEdgeFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n\n // Draw the corners\n if(lowerLeftCornerFrame != NO_SIDE) {\n wallStrip.setFrame(lowerLeftCornerFrame);\n wallNightStrip.setFrame(lowerLeftCornerFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n if(lowerRightCornerFrame != NO_SIDE) {\n wallStrip.setFrame(lowerRightCornerFrame);\n wallNightStrip.setFrame(lowerRightCornerFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "private void drawPowerSwitch(int x, int y) {\n \t\tStdDraw.setPenColor(StdDraw.WHITE);\n \t\tStdDraw.filledSquare(x + 0.5, y + 0.5, 0.5);\n \t\tStdDraw.setPenColor(StdDraw.RED);\n \t\tStdDraw.setPenRadius(.007);\n \t\tStdDraw.arc(x + 0.5, y + 0.5, 0.45, 120, 60);\n \t\tStdDraw.line(x + 0.5, y + 0.5, x + 0.5, y + 0.95);\n \t\tStdDraw.setPenRadius();\n \t}", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}" ]
[ "0.6810639", "0.6754445", "0.66724634", "0.66517174", "0.6571702", "0.65346634", "0.64818966", "0.6413934", "0.6392304", "0.6389408", "0.6371788", "0.6343297", "0.6332603", "0.6317734", "0.6307784", "0.6270617", "0.6268392", "0.6233398", "0.6232217", "0.62169063", "0.6206677", "0.62056744", "0.62040913", "0.6195352", "0.6185813", "0.6184417", "0.61703944", "0.61681825", "0.6154374", "0.6153314", "0.6100938", "0.6089748", "0.6072192", "0.6067015", "0.60650337", "0.6060172", "0.60546404", "0.60380757", "0.6032401", "0.60313255", "0.60224956", "0.59852046", "0.59800357", "0.5978624", "0.5974393", "0.5970644", "0.5968694", "0.5966965", "0.59460485", "0.5945226", "0.5931547", "0.5917873", "0.59086365", "0.5907796", "0.5906268", "0.5904626", "0.5902678", "0.58994925", "0.58889025", "0.5886971", "0.58834714", "0.58833766", "0.5882111", "0.58783615", "0.5875238", "0.58748305", "0.5864642", "0.5850573", "0.584776", "0.5847503", "0.5838958", "0.58349097", "0.58283854", "0.5823659", "0.58201927", "0.58196735", "0.58194333", "0.58176297", "0.58121085", "0.58121085", "0.58121085", "0.58121085", "0.5811989", "0.5811737", "0.58109474", "0.5808305", "0.58058363", "0.58033395", "0.57974553", "0.5795052", "0.5793225", "0.5791906", "0.5789594", "0.5788657", "0.57795113", "0.57773554", "0.5776041", "0.57752156", "0.5769381", "0.5766799" ]
0.62464136
17
draws the players on the map
private void drawPlayers(Graphics g){ g.setColor(Color.BLACK); for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ for(GameMatter itm: grid[i][j].getItems()){ if(itm instanceof Bandit){ if(itm.equals(player)) g.setColor(Color.MAGENTA); g.fillRect(j*widthBlock+padding, i*heightBlock+padding, bandit, bandit); break; } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGHTGRAY);\n canvas.setLineWidth(1);\n for (int i = 0; i < mapWidth; i++) {\n drawLine(canvas, getPixel(new Point(i - mapWidth / 2, -mapHeight / 2)), getPixel(new Point(i - mapWidth / 2, mapHeight / 2)));\n drawLine(canvas, getPixel(new Point(-mapWidth / 2, i - mapHeight / 2)), getPixel(new Point(mapWidth / 2, i - mapHeight / 2)));\n }\n }\n\n // Draw each player onto the canvas\n int height = 0;\n for (Player p : playerTracking) {\n canvas.setStroke(p.getColor());\n\n drawName(canvas, p.getName(), height, p.getColor());\n height += 30;\n\n canvas.setLineWidth(7);\n\n // Draw each position\n Point last = null;\n int direction = 0;\n for (Point point : p.getPoints()) {\n if (last != null) {\n drawLine(canvas, getPixel(last), getPixel(point));\n\n Point dir = point.substract(last);\n if (dir.X > dir.Y && dir.X > 0) {\n direction = 1;\n } else if (dir.X < dir.Y && dir.X < 0) {\n direction = 3;\n } else if (dir.Y > dir.X && dir.Y > 0) {\n direction = 2;\n } else if (dir.Y < dir.X && dir.Y < 0) {\n direction = 0;\n }\n }\n last = point;\n }\n\n drawSlug(canvas, p.getId() - 1, getPixel(last), direction);\n }\n }", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "private void drawPlayers(Graphics g){\r\n\t\t// Comprobamos que existen jugadores\r\n\t\tint x = 40, y = 60;\r\n\t\tint spanLeft = 0, spanRight = 0;\r\n\t\tif(players != null){\r\n\t\t\t//Recorremos los jugadores\r\n\t\t\tListIterator<Player> it = players.listIterator();\r\n\t\t\twhile(it.hasNext()){\r\n\t\t\t\tif(it.nextIndex()<4){ // los cuatro primeros jugadores van a la izquierda\r\n\t\t\t\t\tit.next().draw(g, x, y+spanLeft, deck);\r\n\t\t\t\t\tspanLeft += 150;\r\n\t\t\t\t}else{ // los cuatro siguientes a la derecha\r\n\t\t\t\t\tit.next().draw(g, x+500, y+spanRight, deck);\r\n\t\t\t\t\tspanRight += 150;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tg.setColor(Color.black);\r\n\t\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n\t\t\tg.setColor(Color.white);\r\n\t\t\tg.setFont(new Font(\"Arial\", Font.PLAIN, 70));\r\n\t\t\tg.drawString(\"¡Bienvenido a Siete y Media!\", 50, 150);\r\n\t\t\tg.setFont(new Font(\"Arial\", Font.PLAIN, 18));\r\n\t\t\tg.drawString(\"Configura tu partida.\", 50, 200);\r\n\t\t}\r\n\r\n\t}", "public void Draw (Graphics graphics, MainJPanel JPanel){ // draw the player game pieces\n for(Piece piece : pieces.values())\n piece.Draw(graphics,JPanel);\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void update_map(Player player) \n\t{\n\t\tfor (int i = 0; i < this.map.length; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.map[i].length;j++) \n\t\t\t{\n\t\t\t\tswitch (map[i][j]) \n\t\t\t\t{\n\t\t\t\tcase GRASS:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PATH:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase CROSS_ROADS:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase TA:\n\t\t\t\t\tthis.gc.drawImage(TA_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase RESEARCHER:\n\t\t\t\t\tthis.gc.drawImage(RESEARCHER_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase FIRST_YEAR:\n\t\t\t\t\tthis.gc.drawImage(FIRST_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SECOND_YEAR:\n\t\t\t\t\tthis.gc.drawImage(SECOND_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SCORE_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont titleFont = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(titleFont);\n\t\t\t\t\tString text = \"GPA: \" + player.getGPA();\n\t\t\t\t\tthis.gc.fillText(text, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(text, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TUITION_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont title = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(title);\n\t\t\t\t\tString Tuition = \"Tuition: \" + (player.getTuition());\n\t\t\t\t\tthis.gc.fillText(Tuition, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(Tuition, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void drawPlayer(){\n Player player = world.getPlayer();\n if(player.isGod()) {\n spriteBatch.draw(fadedPlayerTexture,player.getPosition().x * ppuX, player.getPosition().y * ppuY,\n player.WIDTH * ppuX, player.HEIGHT * ppuY);\n } else {\n spriteBatch.draw(playerTexture, player.getPosition().x * ppuX, player.getPosition().y * ppuY,\n player.WIDTH * ppuX, player.HEIGHT * ppuY);\n }\n }", "private void draw()\n {\n if(surfaceHolder.getSurface().isValid())\n {\n // Locks the surface. Can't be accessed or changed before it is unlocked again\n canvas = surfaceHolder.lockCanvas();\n\n // Background color\n canvas.drawColor(Color.BLACK);\n\n\n // ===================== DRAW SPRITES ======================= //\n // Draw Pacman\n canvas.drawBitmap(pacman.getBitmap(), pacman.getX(), pacman.getY(), paint);\n\n // Draw all Monsters\n for(Monster monster : monsterList)\n {\n canvas.drawBitmap(monster.getBitmap(), monster.getX(), monster.getY(), paint);\n }\n\n // Draw Cherries\n for(Cherry cherry : cherryList)\n {\n canvas.drawBitmap(cherry.getBitmap(), cherry.getX(), cherry.getY(), paint);\n }\n\n // Draw Key\n canvas.drawBitmap(key.getBitmap(), key.getX(), key.getY(), paint);\n\n // Draw Stars\n paint.setColor(Color.WHITE);\n for(Star star : starList)\n {\n paint.setStrokeWidth(star.getStarWidth());\n canvas.drawPoint(star.getX(), star.getY(), paint);\n }\n\n // ======================================================= //\n\n\n if(!gameEnded)\n {\n // Draw user HUD\n paint.setTextAlign(Paint.Align.LEFT);\n paint.setColor(Color.WHITE);\n paint.setTextSize(40);\n paint.setTypeface(Typeface.MONOSPACE);\n canvas.drawText(\"Level: \" + level, 10, 50, paint);\n canvas.drawText(\"Hi Score: \" + hiScore, (screenMax_X /4) * 3, 50 , paint);\n canvas.drawText(\"Score: \" + score, screenMax_X / 3, 50 , paint);\n canvas.drawText(\"New level in: \" + distanceRemaining + \"km\", screenMax_X / 3, screenMax_Y - 20, paint);\n canvas.drawText(\"Lives: \" + pacman.getLifes(), 10, screenMax_Y - 20, paint);\n canvas.drawText(\"Speed \" + pacman.getSpeed() * 100 + \" Km/h\", (screenMax_X /4) * 3, screenMax_Y - 20, paint);\n\n } else {\n\n // Draw 'Game Over' Screen\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setTypeface(Typeface.MONOSPACE);\n paint.setFakeBoldText(true);\n paint.setTextSize(150);\n canvas.drawText(\"Game Over\", screenMax_X / 2, 350, paint);\n paint.setTextSize(50);\n paint.setTypeface(Typeface.DEFAULT);\n paint.setFakeBoldText(false);\n canvas.drawText(\"Hi Score: \" + hiScore, screenMax_X / 2, 480, paint);\n canvas.drawText(\"Your Score: \" + score, screenMax_X / 2, 550, paint);\n paint.setTextSize(80);\n canvas.drawText(\"Tap to replay!\", screenMax_X / 2, 700, paint);\n }\n\n if(levelSwitched)\n {\n // Notify the user whenever level is switched\n paint.setTextSize(100);\n paint.setTypeface(Typeface.MONOSPACE);\n paint.setFakeBoldText(true);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(\"Level \" + level + \"!\", screenMax_X / 2, 350, paint);\n }\n\n // Unlcock canvas and draw it the scene\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "private void drawObjects(Graphics g) {\n\n g.setColor(Color.white);\n g.fillRect(0,0,WIDTH,HEIGHT);\n\n Player player = physics.getPlayer();\n\n\n\n ArrayList<Sprite> sprites = physics.getSprites();\n for( Sprite p: sprites){\n if (p.isVisible()) {\n g.drawImage(p.getImage(), p.getX() - scroll, p.getY(),\n this);\n }\n }\n\n if (player.isVisible()) {\n g.drawImage(player.getImage(), player.getX() - scroll, player.getY(),\n this);\n }\n Font font = new Font(\"Helvetica\", Font.BOLD, 30);\n FontMetrics fm = getFontMetrics(font);\n\n g.setColor(Color.black);\n g.setFont(font);\n g.drawString(Integer.toString(physics.playerScore),5, 25);\n }", "void drawPlayer(float x, float y, float w)\n\t{\n\t\tline(x, y, x + 50, y);\n\t\tline(x, y, x, y - 50);\n\t\tline(x + 50, y, x + 50, y - 50);\n\t\tline(x, y - 50, x + 50, y - 50);\n\t\tstroke(255,0,0);\n\t}", "public synchronized void draw()\n\t{\n\t\t// First update the lighting of the world\n\t\t//int x = avatar.getX();\n\t\t//int y = avatar.getY();\t\t\n\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].draw(x, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = monsters.size() - 1; i >=0; i--)\n\t\t{\n\t\t\tMonster monster = monsters.get(i);\n\t\t\tint x = monster.getX();\n\t\t\tint y = monster.getY();\n\t\t\t\n\t\t\t// Check if the monster has been killed\n\t\t\tif (monster.getHitPoints() <= 0)\n\t\t\t{\n\t\t\t\tmonsters.remove(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (tiles[x][y].getLit())\n\t\t\t\t\tmonster.draw();\n\t\t\t}\n\t\t}\t\t\n\t\tavatar.draw();\n\t}", "public void draw(Graphics w) {\n\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].draw(w);\n\t\t\t}\n\t\t}\n\t\tif (lost) {\n\t\t\tw.drawString(\"YOU LOST\", 100, 200);\n\t\t\tw.drawString(\"Press R key to start again!\", 100, 400);\n\t\t} else if (isFinished) {\n\t\t\tw.drawString(\"YOU WIN.\", 100, 200);\n\t\t}\n\n\t}", "public void draw() {\n mGameBoard.draw();\n }", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "@Override public void render(final MapView map, final MapCanvas canvas, final Player player) {\r\n if (!renderers.containsKey(this)) {\r\n renderers.put(this, player.getName());\r\n }\r\n /* Wait for the player ping */\r\n --renderDelay;\r\n if (renderDelay <= 0) {\r\n renderDelay = MapEdit.renderDelay;\r\n /* Renders player cursors on the map */\r\n final MapCursorCollection canvasCursors = canvas.getCursors();\r\n canvas.setCursors(canvasCursors);\r\n /* Removes cursors left over from the plugin restart */\r\n if (clearedCanvas == false) {\r\n for (int n = 0; n < canvasCursors.size(); n++) {\r\n MapCursor mc = canvasCursors.getCursor(n);\r\n canvasCursors.removeCursor(mc);\r\n }\r\n clearedCanvas = true;\r\n }\r\n /* REMOVAL OF OLD CHANGES */\r\n /* Removes placed cursors from the last render cycle */\r\n if (!mapCursors.isEmpty()) {\r\n for (MapCursor mc : mapCursors) {\r\n canvasCursors.removeCursor(mc);\r\n mapCursors.remove(mc);\r\n }\r\n }\r\n /* Find all players in the game */\r\n for (Entity renderEntity : renderEntities.keySet()) {\r\n if (renderEntity.isDead() && !(renderEntity instanceof Player)) {\r\n renderEntities.remove(renderEntity);\r\n return;\r\n }\r\n byte cursorcolor = renderEntities.get(renderEntity).getByte();\r\n /* PERMISSIONS AND COLORS */\r\n if (cursorcolor != 0xFFFFFFFF && (renderEntity != player && MapEdit.socialMode)) {\r\n /* Changes the cursor color based on player permissions and config */\r\n short mapId = -1;\r\n if (renderEntity instanceof Player) {\r\n /* Make sure the 2 players don't share a mapview, before placing a cursor */\r\n Player other = (Player) renderEntity;\r\n ItemStack it = other.getItemInHand();\r\n if (it.getType() == Material.MAP) {\r\n mapId = it.getDurability();\r\n }\r\n }\r\n if (Bukkit.getServer().getMap(mapId) != map) {\r\n /* ADDITION OF CURSORS */\r\n /* Get the center of the map */\r\n int centerX = map.getCenterX();\r\n int centerZ = map.getCenterZ();\r\n /* Get the scale of the map, and keep it between 0 and 4 */\r\n int scale = map.getScale().getValue();\r\n if (scale < 0) {\r\n scale = 0;\r\n }\r\n if (scale > 4) {\r\n scale = 4;\r\n }\r\n /* Find the edges of the map\r\n * \r\n * Now start the equations you will not understand... */\r\n float f = (float) (renderEntity.getLocation().getX() - centerX) / (1 << scale);\r\n float f1 = (float) (renderEntity.getLocation().getZ() - centerZ) / (1 << scale);\r\n byte b0 = 64;\r\n byte b1 = 64;\r\n /* If the cursor is on the map... */\r\n if (f >= (-b0) && f1 >= (-b1) && f <= b0 && f1 <= b1) {\r\n byte b2 = cursorcolor;\r\n /* Get the x and y of the player on the map */\r\n byte b3 = (byte) ((int) ((f * 2.0F) + 0.5D));\r\n byte b4 = (byte) ((int) ((f1 * 2.0F) + 0.5D));\r\n /* Get the player yaw, and convert it to an int 0 - 15\r\n * \r\n * UNKNOWN BUG\r\n * When rotating at a certain angle, a blue cursor turns green,\r\n * however, a print says it is still blue.\r\n * This must be a Bukkit/Minecraft bug */\r\n double dir = renderEntity.getLocation().getYaw() * 16.0D / 360.0D;\r\n /* If b5 is less than 0, change it to the positive of the same location\r\n * NORTH = 8 */\r\n byte direction = (byte) ((int) dir & 0xF);\r\n /* Add the cursor */\r\n MapCursor mc = new MapCursor(b3, b4, (byte) direction, b2, true);\r\n canvasCursors.addCursor(mc);\r\n mapCursors.add(mc);\r\n }\r\n }\r\n }\r\n }\r\n ++MapEdit.renderCount;\r\n }\r\n }", "public void drawRoad(int player, int location, Graphics g){\n\t}", "private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }", "public void drawMap(ArrayList<Entity> entities){\n\t\t//draw map\n\t\tmap.draw(graphics, entities);\n\t}", "private void drawCharacter(Canvas canvas, Player player) {\n\n //Retrieve Player-specific information about what to draw, and where to draw it.\n setInformationToDraw(player);\n\n //Take all that information and draw it!\n for (int i = 0; i < playerPieceList.size(); i++) {\n FacePiece piece = playerPieceList.get(i);\n Bitmap pic = piece.getPic();\n //pieceX and pieceY take user and opponent's start location and set each of their FacePiece objects relative to that.\n int pieceX = x + piece.getPicLocation()[0];\n int pieceY = y + piece.getPicLocation()[1];\n\n drawPiece = true;\n\n //conditions for when to NOT drawPiece (so we can have flashing damaged pieces)\n //This has multiple layers of logic,\n //because when a damaged FacePiece is \"flashing,\" it must still be drawn for some of the iterations.\n //(Otherwise it's not flashing... it would just be invisible).\n if (flashDamagedPiece)\n {\n if (piece == damagedAntagonistPiece || piece == damagedHeroPiece)\n {\n drawPiece = false;\n\n if (flashDamagedPieceSwitch < 6) {\n drawPiece = true;\n }\n }\n }\n\n //This is the most important part of the method: where we draw the actual FacePiece on the canvas.\n if (drawPiece)\n {\n canvas.drawBitmap(pic, pieceX, pieceY, paint);\n }\n }\n\n drawCharacterConditionals(canvas);\n }", "public void draw(Graphics g) {\n for(Entity e : ents) {\n if(!(e instanceof Game.Entities.Dynamic.PlayerEntity)) // Don't draw player yet because it will be drawn later\n e.draw(g);\n }\n for(Particle p : particles) {\n p.draw(g);\n }\n // Draw Player on top of everything else\n if(player != null) player.draw(g);\n }", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "public abstract void Draw(int playerIdx);", "public synchronized void draw(Graphics2D g) {\n\t\t\n\t\tfor(Car car : world.carList){\n\t\t\tcar.pointMap.draw(g);\n\t\t}\n\t\t\n\t\tworld.map.draw(g);\n\t\t\n\t}", "public void draw (Graphics g){\n \t\tif (!world.isPaused()) {\n \t\t\tworld.draw(g);\n \t\t\tc.draw(g);\n \t\t\tp1.draw(g); //Drawing Player\n \t\t}\n //\t\tif(mob1!=null)\n //\t\tmob1.draw(g);\n \t\tif (world.isPaused()) {\n \t\t\tSystem.out.println(\"Zeige Shop\");\n \t\t\tg.drawImage(shop.paint(),0,0,mainWindow.getWidth(),mainWindow.getHeight(),null);\n \t\t\t\n \t\t}\n \t\t\n \t}", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "@Override\n public void draw(float delta) {\n for (int i = 0; i < cameras.length; i++) {\n FrameBuffer fbo = fbos[i];\n OrthographicCamera cam = cameras[i];\n\n fbo.begin();\n\n Gdx.gl.glClearColor(30,30,30, 1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n mapRenderer.setView(cam);\n mapRenderer.render();\n\n sb.setProjectionMatrix(cam.combined);\n sb.begin();\n for (Entity e : entities) {\n e.draw(sb, delta);\n }\n sb.end();\n\n debugRenderer.render(world, cam.combined);\n fbo.end();\n }\n\n // render each frame buffer as a split-screen\n sb.setProjectionMatrix(identity);\n sb.begin();\n for (int i = 0; i < fbos.length; i++) {\n // TODO(slandow) make size variable to support different # of players\n sb.draw(\n fbos[i].getColorBufferTexture(),\n -1 + i, 1f, 2, -2\n );\n }\n sb.end();\n\n }", "private void draw() {\n if (surfaceHolder.getSurface().isValid()) {\n //lock the canvas\n canvas = surfaceHolder.lockCanvas();\n //set background colour\n canvas.drawColor(Color.BLACK);\n //draw stars\n paint.setColor(Color.WHITE);\n starManager.draw(this.canvas, this.paint);\n //draw player\n player.draw(this.canvas, this.paint);\n //draw enemies\n enemyManager.draw(this.canvas, this.paint);\n //draw asteroids\n asteroidManager.draw(this.canvas, this.paint);\n\n //draw the score as well\n paint.setTextSize(100);\n paint.setColor(Color.WHITE);\n canvas.drawText(\"\" + Constants.SCORE, 50, paint.descent() - paint.ascent(), paint);\n\n //if game is over\n if (Constants.GAME_OVER) {\n paint.setTextSize(100);\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setColor(Color.WHITE);\n\n //tell the player\n int yPos = (int) ((canvas.getHeight() / 2) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Game over\", canvas.getWidth() / 2, yPos, paint);\n\n paint.setTextSize(50);\n yPos = (int) ((canvas.getHeight() - 2 * paint.descent()) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Tap anywhere to return to main menu...\", canvas.getWidth() / 2, yPos, paint);\n }\n //unlock canvas\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }", "public void drawPlayerNames(Graphics g) {\n\t}", "public void draw() {\n if (!myTurn()) {\n return;\n }\n draw(4 - handPile.size());\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "@Override\r\n \tpublic void render(GameContainer gc, Graphics g) throws SlickException \r\n \t{\r\n \t\ttry \r\n \t\t{\r\n \t\t\tThread.sleep(10);\r\n \t\t} \r\n \t\tcatch (InterruptedException e) \r\n \t\t{\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t\t\r\n \t\t// map rendering\r\n \t\ttheMap.render(0 + (int)camera.getX(), 0 + (int)camera.getY());\r\n \t\t\r\n \t\t// player rendering\r\n \t\tunitOne.getMovement().draw(unitOne.getX() + camera.getX(), unitOne.getY() + camera.getY());\r\n \t\tunitTwo.getMovement().draw(unitTwo.getX() + camera.getX(), unitTwo.getY() + camera.getY());\r\n \t\t\r\n \t\t// some indicators\r\n \t\tg.drawString(\"playerX = \" + (unitOne.getX() + camera.getX()), 600, 20);\r\n \t\tg.drawString(\"playerY = \" + (unitOne.getY() + camera.getY()), 600, 40);\r\n \t\tg.drawString(\"mouseX = \" + Mouse.getX(), 600, 60);\r\n \t\tg.drawString(\"mouseY = \" + (600 - Mouse.getY()), 600, 80);\r\n \t\tg.drawString(\"mouseTileX = \" + (int)Mouse.getX()/tileSize, 600, 100);\r\n \t\tg.drawString(\"mouseTileY = \" + (int)(600 - Mouse.getY())/tileSize, 600, 120);\r\n \t\tif (path != null) { g.drawString(\"Path length = \" + path.getLength(), 600, 160);}\r\n \t}", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw()\n\t{\n\t\tdrawWalls();\n\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.draw();\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.draw();\n\t\t}\n\n\t\tdp.repaintAndSleep(rate);\n\t}", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n if (gameOver) {\n // end game - loss\n gameOverDialog();\n } else if (gameWon) {\n // end game - win\n gameWonDialog();\n }\n\n //Convert dp to pixels by multiplying times density.\n canvas.scale(density, density);\n\n // draw horizon\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n canvas.drawRect(0, horizon, getWidth() / density, getHeight() / density, paint);\n\n // draw cities\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.FILL);\n textPaint.setColor(Color.WHITE);\n textPaint.setTextSize(10);\n\n for (int i = 0; i < cityCount; ++i) {\n canvas.drawRect(cityLocations[i].x - citySize, cityLocations[i].y - citySize, cityLocations[i].x + citySize, cityLocations[i].y + citySize, paint);\n canvas.drawText(cityNames[i], cityLocations[i].x - (citySize / 2) - 5, cityLocations[i].y - (citySize / 2) + 10, textPaint);\n }\n\n // draw rocks\n for (RockView rock : rockList) {\n PointF center = rock.getCenter();\n String color = rock.getColor();\n\n paint.setColor(Color.parseColor(color));\n\n paint.setStyle(Paint.Style.FILL);\n //Log.d(\"center.x\", center.x + \"\");\n //Log.d(\"center.y\", center.y + \"\");\n canvas.drawCircle(center.x, center.y, rockRadius, paint);\n }\n\n // draw MagnaBeam circle\n if (touchActive) {\n canvas.drawCircle(touchPoint.x, touchPoint.y, touchWidth, touchPaint);\n }\n }", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "public void render(GameContainer gc, Graphics g) throws SlickException {\n \tg.translate(512-viewport.getX(), 300-viewport.getY());\r\n \t//Draw world from tmx file.\r\n \tmap1.render(0, 0);\r\n \t\r\n \t//\"CLIP\" an area of 1280x720 to improve performance. This will cause it to only render what's visible on my screen.\r\n \tg.setClip(0, 0, 1280, 720);\r\n \t\r\n \t//Draw animations for our 2 players.\r\n \tg.drawAnimation(player1.getAnimation(player1.direction()), player1.getX()*8, player1.getY()*8);\r\n \tg.drawAnimation(player2.getAnimation(player2.direction()), player2.getX()*8, player2.getY()*8);\r\n \t\r\n \t//Draw all the bullets.\r\n\t for(Bullet b : bulletList) {\r\n\t \tb.getImg().draw(b.x*8, b.y*8);\r\n\t }\r\n\t \r\n\t \r\n\t //DEPRECATED\r\n \t//world.drawDebugData();\r\n\t \r\n\t //Draw a status & chat string.\r\n\t g.setColor(Color.white);\r\n\t g.drawString(status, viewport.getX()+300, viewport.getY()+250);\r\n\t if(chatUp) {\r\n\t \tg.setColor(Color.white);\r\n\t \tg.drawString(\"> \"+chatMessage+\"_\", viewport.getX()-500, viewport.getY()+250);\r\n\t }\r\n\t //Draw chatmessages if there are any, for a short period of time only.\r\n\t if(myPlayer.getTimer()<2000) {\r\n\t \tmyPlayer.getImg().draw(myPlayer.getX()*8-75, myPlayer.getY()*8-60);\r\n\t \tg.setColor(Color.black);\r\n\t \tg.drawString(myPlayer.getChatMessage(), myPlayer.getX()*8-67, myPlayer.getY()*8-50);\r\n\t }\r\n\t if(hisPlayer.getTimer()<2000) {\r\n\t \thisPlayer.getImg().draw(hisPlayer.getX()*8-75, hisPlayer.getY()*8-60);\r\n\t \tg.setColor(Color.black);\r\n\t \tg.drawString(hisPlayer.getChatMessage(), hisPlayer.getX()*8-67, hisPlayer.getY()*8-50);\r\n\t }\r\n \t\r\n\t //Draw hp bar\r\n\t g.setColor(new Color(0, 195, 0));\r\n\t Rectangle hpb = new Rectangle(viewport.getX()-436, viewport.getY()-289, 198*myPlayer.getHealth(), 26);\r\n\t g.fill(hpb);\r\n\t //Hpbar background img.\r\n\t g.drawImage(hpbar, viewport.getX()-450, viewport.getY()-295);\r\n \r\n }", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }", "public void draw(Canvas canvas) {\n // Draw the game\n for (int i = 0; i < width + 2; i++) {\n for (int j = 0; j < height + 2; j++) {\n canvas.setPoint(i, j, '.');\n }\n }\n\n for (int i = 0; i < width + 2; i++) {\n canvas.setPoint(i, 0, '-');\n canvas.setPoint(i, height + 1, '-');\n }\n\n for (int i = 0; i < height + 2; i++) {\n canvas.setPoint(0, i, '|');\n canvas.setPoint(width + 1, i, '|');\n }\n\n for (BaseObject object : getAllItems()) {\n object.draw(canvas);\n }\n }", "public void execute() throws IOException\n\t{\n\t\tfor(String currentMap : maps) {\n\t\t\tfor(int game = 1; game <= gamesNumber; game++) {\n\t\t\t\tinitMap();\n\t\t\t\tloadMap(currentMap);\n\n\t\t\t\tPlayer winner = playOneGame();\n\t\t\t\tif(winner == null)\twinners.add(\"Draw\");\n\t\t\t\telse\twinners.add(winner.getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tnew WinnerView(winners, gamesNumber, maps.size());\n\t}", "public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "public void paint(Map map, Graphics graphics, Camera camera, GraphicsManager graphicsManager)\r\n\t{\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), 0, 0, GameConfiguration.WINDOW_WIDTH, GameConfiguration.WINDOW_HEIGHT, null);\r\n\t\tint tileSize = GameConfiguration.TILE_SIZE;\r\n\t\t\r\n\t\tTile[][] tiles = map.getTiles();\r\n\t\tint width = GameConfiguration.WINDOW_WIDTH;\r\n\t\tint height = GameConfiguration.WINDOW_HEIGHT;\r\n\t\tif(GameConfiguration.launchInFullScreen) {\r\n\t\t\twidth = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n\t\t\theight = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n\t\t}\r\n\t\t//draw map\r\n\t\tfor (int lineIndex = 0; lineIndex < map.getLineCount(); lineIndex++) \r\n\t\t{\r\n\t\t\tfor (int columnIndex = 0; columnIndex < map.getColumnCount(); columnIndex++) \r\n\t\t\t{\r\n\t\t\t\tTile tile = tiles[lineIndex][columnIndex];\r\n//tilePos.x + tilePos.w >= 0 && tilePos.y + tilePos.h >= 0 && tilePos.x <= GAME_WIDTH && tilePos.y <= GAME_HEIGHT\r\n\t\t\t\tif(tile.getColumn() * tileSize - camera.getX() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getLine() * tileSize - camera.getY() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getColumn() * tileSize - camera.getX() <= width && tile.getLine() * tileSize - camera.getY() <= height) {\r\n\t\t\t\t\tAnimation animation = tile.getAnimation();\r\n\t\t\t\t\tgraphics.drawImage(graphicsManager.getGrassTile(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\tgraphics.drawImage(animation.getFrame(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\t/*graphics.setColor(Color.white);\r\n\t\t\t\t\tgraphics.drawRect(tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize);*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void paint(Graphics g)\n\t\t{\n\t\t\t\n\t\t\tif (!gameStarted)\n\t\t\t\ttown.show (g); //when the game first starts draws the map\n//\t\t\ttown.show(g);\n//\t\t\ttestPlayer.show(g);\n//\t\t\thouse1.show (g);\n//\t\t\thome.show (g);\n//\t\t\thouse2.show (g);\n//\t\t\tpokecentre.show (g);\n//\t\t\toakLab.show(g);\n\t\t}", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }", "public void paintComponent( Graphics page )\n {\n super.paintComponent( page );//I'll tell you later.\n player.draw( page );//calls the draw method in the Player class\n circle.draw( page );\n if (projectileInitW)\n projectileW.draw( page );\n if (projectileInitA)\n projectileA.draw( page );\n if (projectileInitS)\n projectileS.draw( page );\n if (projectileInitD)\n projectileD.draw( page );\n }", "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }", "public void Render(){\n //player rect\n glPushMatrix();\n glTranslatef(px, py, 0.0f);\n glBegin(GL_TRIANGLES);\n glColor3f(1.0f, 1.0f, 1.0f);\n glVertex2f(-sx, sy);\n glVertex2f(-sx, -sy);\n glVertex2f(sx, sy);\n glVertex2f(sx, sy);\n glVertex2f(-sx, -sy);\n glVertex2f(sx, -sy);\n glEnd();\n glPopMatrix();\n \n if(debug){\n glPushMatrix();\n glBegin(GL_LINES);\n glColor3f(0f, 1f, 0f);\n glVertex2f(px-sx, py+sy/2);\n glVertex2f(px+sx, py+sy/2);\n glColor3f(0f, 1f, 0f);\n glVertex2f(px-sx, py-sy/2);\n glVertex2f(px+sx, py-sy/2);\n glEnd();\n glPopMatrix();\n }\n \n }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "public void draw() {\n for (Point2D i : pointsSet)\n i.draw();\n }", "private void renderPlayers() {\n\t\tfor (Player player : this.game.players()) {\n\t\t\t/* So, logically convluted crap ahead.\n\t\t\t * Player position is tracked via a 1-based coordinate system.\n\t\t\t * Our output array is 0-based.\n\t\t\t * Our output array contains an additional row/column on each side for the wall.\n\t\t\t *\n\t\t\t * Hence, when mapping the player's position to an\n\t\t\t * index in the output array, we have to subtract one\n\t\t\t * to switch from 1-basedness to 0-basedness, then add\n\t\t\t * 1 to accomodate for the wall column/row. Which\n\t\t\t * leaves us with a difference of 0. */\n\t\t\tthis.output[player.position().y][player.position().x] = player.sign();\n\t\t}\n\t}", "public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }", "public void draw() {\n \n // TODO\n }", "public void paintComponent(Graphics g){\n super.paintComponent(g);\n g.setColor(Color.BLACK);\n g.fillRect(0,0,width*scale,height*scale);\n if(game.getWindowNum() == 2){\n for(int x = 0; x < world.length*scale; x+=scale){\n for(int y = 0; y < world[0].length*scale; y+= scale){\n if(game.getDiscoverdWorld()[x/scale][y/scale] == 1){\n if(world[x/scale][y/scale] == 0){\n g.setColor(Color.CYAN);\n }\n else if(world[x/scale][y/scale] == 1){\n g.setColor(Color.GREEN);\n }\n else if(world[x/scale][y/scale] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(world[x/scale][y/scale] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect(x,y,scale,scale);\n }\n }\n }\n g.setColor(Color.RED);\n g.fillRect((int)(game.getPlayerCords()[0]*(double)scale),(int)(game.getPlayerCords()[1]*(double)scale),scale*game.getPlayerDimentions()[0],scale*game.getPlayerDimentions()[1]);\n g.setColor(Color.BLACK);\n g.drawRect((int)(game.getViewBoxCords()[0]*scale),(int)(game.getViewBoxCords()[1]*scale),(int)(game.getPlayerView().length*scale),(int)(game.getPlayerView()[0].length*scale));\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n }\n else if(game.getWindowNum() == 1){\n int[][] viewPlane = game.getPlayerView();\n double playerViewScale = game.getPlayerViewScale();\n double[] viewBoxCords = game.getViewBoxCords();\n g.setColor(Color.CYAN);\n for(int x = 0; x < viewPlane.length;x++){\n for(int y = 0; y < viewPlane[0].length;y++){\n if(viewPlane[x][y] != 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.drawImage(textures.get(viewPlane[x][y]-1),(int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),this);\n /*\n if(viewPlane[x][y] == 1){\n g.setColor(Color.GREEN);\n }\n else if(viewPlane[x][y] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(viewPlane[x][y] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+0.5),(int)(playerViewScale+0.5));\n */\n }\n else if(viewPlane[x][y] == 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+1),(int)(playerViewScale+1));\n }\n }\n }\n if(recentlyHit != null){\n g.setColor(new Color(50,50,50,(int)(255*(1-recentlyHit.getHealthPercent()))));\n g.fillRect((int)(recentlyHit.getX()*playerViewScale)-(int)(viewBoxCords[0]%1*playerViewScale)+1,(int)(recentlyHit.getY()*playerViewScale)-(int)(viewBoxCords[1]%1*playerViewScale)+1,(int)playerViewScale,(int)playerViewScale);\n }\n //g.setColor(Color.RED);\n //g.fillRect((int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),(int)playerViewScale*game.getPlayerDimentions()[0],(int)playerViewScale*game.getPlayerDimentions()[1]);\n if(game.isFacingRight()){\n g.drawImage(textures.get(3),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n else{\n g.drawImage(textures.get(4),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n g.setColor(Color.BLACK);\n g.setFont(font2);\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n g.drawString(\"View Box Cords: X:\"+viewBoxCords[0]+\" Y: \"+viewBoxCords[1],20,100);\n int a = 0;\n for(Item i: game.getPlayerInventory()){\n if(i != null){\n g.drawString(i.getName()+\" Count: \"+i.getCount(),20,120+a*20);\n a++;\n }\n } \n g.setColor(new Color(100,100,100,95));\n g.fillRect((int)(0.09*viewPlane.length*playerViewScale),(int)(0.8*viewPlane[0].length*playerViewScale),(int)(0.82*viewPlane.length*playerViewScale),(int)(0.12*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n for(int i = 0; i < game.getPlayerHotbar().length;i++){\n if(i == game.getPlayer().getHotbarItemSelected()){\n g.setColor(Color.BLACK);\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n }\n else{\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n }\n if(game.getPlayer().getHotbar()[i] != null){\n g.drawImage(textures.get(game.getPlayer().getHotbar()[i].getTextureNum()),(int)(0.125*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.83*viewPlane[0].length*playerViewScale),this);\n }\n }\n if(game.isInvenVisible()){\n int rowLength = 10;\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*screenWidth),(int)(0.06*screenHeight),(int)(0.9*screenWidth),(int)(0.7*screenHeight));\n g.setColor(Color.WHITE);\n int count = 0; \n for(Item i: game.getPlayerInventory()){\n if(i!=null){\n g.drawImage(textures.get(i.getTextureNum()),(int)(0.08*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.085*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight),this);\n g.drawString(\"x\"+i.getCount(),(int)(0.11*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.096*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight));\n count++;\n }\n }\n }\n else if(game.isCraftingVisible()){\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*viewPlane.length*playerViewScale),(int)(0.05*viewPlane[0].length*playerViewScale),(int)(0.9*viewPlane.length*playerViewScale),(int)(0.7*viewPlane[0].length*playerViewScale));\n }\n g.setColor(Color.BLACK);\n g.drawRect((int)(screenWidth*0.8),(int)(screenHeight*.03),(int)(screenWidth*.18),(int)(screenHeight*0.04));\n g.setColor(new Color((int)(255*(1-game.getPlayerHealthPercent())),(int)(255*game.getPlayerHealthPercent()),0));\n g.fillRect((int)(screenWidth*0.8)+1,(int)(screenHeight*.03)+1,(int)(screenWidth*.18*game.getPlayerHealthPercent())-1,(int)(screenHeight*0.04)-1);\n g.setColor(new Color(50,50,50,200));\n g.setFont(font1);\n g.drawString(game.getPlayerHealthPercent()*100+\"%\",(int)(screenWidth*.88),(int)(screenHeight*0.06));\n }\n }", "@Override\n public void render() {\n if (!gameOver && !youWin) this.update();\n\n //Dibujamos\n this.draw();\n }", "private void setInformationToDraw(Player player)\n {\n playerPieceList = player.getPieces();\n\n if (player == antagonistPlayer) {\n x = antagonistLocation[0];\n y = antagonistLocation[1];\n damageToAnnounce = antagonistDamage;\n healthBenefitToAnnounce = antagonistHealthBenefit;\n } else if (player == heroPlayer) {\n x = heroLocation[0];\n y = heroLocation[1];\n damageToAnnounce = heroDamage;\n healthBenefitToAnnounce = heroHealthBenefit;\n } else {\n x = 0;\n y = 0;\n }\n }", "private void displayPlayers() {\n\t\tfor (Player p: game.getPlayers()) {\n\t\t\tview.updateDisplay(p.getId(), p.getDeck().getNumberOfCards());\n\t\t}\n\t}", "private void initializeMarkersAndCirclesForPlayers(List<Player> players) {\r\n Log.i(TAG, \"made it to initialized markers\");\r\n for(Player player: players) {\r\n Marker marker = mMap.addMarker(new MarkerOptions()\r\n .position(player.getLastLocation())\r\n .title(player.getUsername()));\r\n Circle circle = mMap.addCircle(new CircleOptions()\r\n .center(player.getLastLocation())\r\n .radius(tagDistance)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(3));\r\n\r\n // change color of marker depending on if player is it or not\r\n if (player.isIt()) {\r\n marker.setIcon(zombiepin);\r\n circle.setStrokeColor(itColor);\r\n } else {\r\n marker.setIcon(playerpin);\r\n circle.setStrokeColor(notItColor);\r\n }\r\n\r\n player.setCircle(circle);\r\n player.setMarker(marker);\r\n\r\n }\r\n // Add a marker in center of game camera and move the camera\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(16));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(startingPoint));\r\n Circle gameBounds = mMap.addCircle(new CircleOptions()\r\n .center(startingPoint)\r\n .radius(currentSession.radius())\r\n .strokeColor(Color.BLUE)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(5));\r\n }", "private void drawPlayer(Graphics g, Image playerImage){\n \n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Arial\", Font.PLAIN, 20)); \n g.drawString(\"\"+player.getScore(),25,23);\n \n for(int i= 0; i<player.getLives(); i++){\n g.drawImage(lifeImage,600-i*30,5,this);\n }\n \n g.drawImage(playerImage, player.getX(), player.getY(), this); \n \n //Limit the players movement within the bound. Add score when moving\n \n if (key_down && player.getY()<620) {\n player.addY();\n player.addScore();\n }\n \n if (key_up && player.getY()>40) {\n player.subY();\n player.addScore();\n } \n \n if (key_right && player.getX()<650) {\n player.addX();\n player.addScore();\n }\n \n if (key_left && player.getX()>10) {\n player.subX();\n player.addScore();\n }\n \n moveCount++;\n repaint();\n \n }", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void draw() {\n draw(clientController.getUser().getShows());\n }", "public void playTheGame() {\n\t\tint column;\n\t\ttry {\n\t\t\tboolean gameIsOver = false;\n\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\taConnect4Field.toString());\n\n\t\t\tdo {\n\t\t\t\tfor (int index = 0; index < thePlayers.length; index++) {\n\t\t\t\t\t// thePlayers[index].getView().showOutput(aConnect4Field.toString());\n\t\t\t\t\tif (aConnect4Field.isItaDraw()) {\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\"Draw\");\n\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\tthePlayers[index].getName()\n\t\t\t\t\t\t\t\t\t\t+ \" it's Your Turn! play your move\");\n\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\twhile (!aConnect4Field\n\t\t\t\t\t\t\t\t.checkIfPiecedCanBeDroppedIn(column)) {\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\"Invalid Turn Try again\");\n\t\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taConnect4Field.dropPieces(column,\n\t\t\t\t\t\t\t\tthePlayers[index].getGamePiece());\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.toString());\n\t\t\t\t\t\tif (aConnect4Field.error != \"\") {\n\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (aConnect4Field.didLastMoveWin()) {\n\t\t\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t\t\t\t// all player get to know\n\t\t\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\t\t\"The winner is: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ thePlayers[index]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} while (!gameIsOver);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void paint(Graphics g) {\n\t\tif(isOsprey){\n\t\t\tif(legnum==1){\n\t\t\t\tg.drawImage(AmericaMap1, 0, 0, frameWidth, frameHeight, this);\n\t\t\t}\n\t\t\telse if(legnum==2){\n\t\t\t\tg.drawImage(AmericaMap2, 0, 0, frameWidth, frameHeight, this);\n\t\t\t}\n\t\t\telse if (legnum==3){\n\t\t\t\tg.drawImage(AmericaMap3, 0, 0, frameWidth, frameHeight, this);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tg.drawImage(OspreyEnd,0,0,frameWidth,frameHeight,this);\n\t\t\t\tg.drawImage(Win,frameWidth/2,frameHeight/2,frameWidth/4,frameHeight/4,this);\n\t\t\t\tg.setFont(new Font(\"Times New Roman\", Font.BOLD, 48));\n\t\t\t\tg.drawString(\"Score: \" + Model.player.getPoints(), (frameWidth/2)-frameWidth*30/100, (frameHeight/2));\t\t\t\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(legnum==1){\n\t\t\t\tg.drawImage(DelawareMap1, 0, 0, frameWidth, frameHeight, this);\n\t\t\t}\n\t\t\telse if(legnum==2){\n\t\t\t\tg.drawImage(DelawareMap2, 0, 0, frameWidth, frameHeight, this);\n\t\t\t}\n\t\t\telse if (legnum==3){\n\t\t\t\tg.drawImage(DelawareMap3, 0, 0, frameWidth, frameHeight, this);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tg.drawImage(NHEnd,0,0,frameWidth,frameHeight,this);\n\t\t\t\tg.drawImage(Win,frameWidth/2,frameHeight/2,frameWidth/4,frameHeight/4,this);\n\t\t\t\tg.setFont(new Font(\"Times New Roman\", Font.BOLD, 48));\n\t\t\t\tg.drawString(\"Score: \" + Model.player.getPoints(), (frameWidth/2)-frameWidth*15/100, frameWidth/2);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}", "public static void drawPlayerBoard()\n {\n char rowLetter=' '; //Letra de las filas.\n \n System.out.println(\" 1 2 3 4 \" ); //Imprime la parte superior del tablero.\n System.out.println(\" +-------+-------+\");\n \n \n for (int i = 0; i< BOARD_HEIGHT; i++) //Controla los saltos de fila.\n {\n switch(i)\n {\n case 0: rowLetter='A';\n break;\n case 1: rowLetter='B';\n break;\n case 2: rowLetter='C';\n break;\n case 3: rowLetter='D';\n break;\n }\n \n System.out.print(rowLetter);\n \n for (int j = 0; j < BOARD_WIDTH; j++ ) //Dibuja las filas.\n {\n if (playerBoardPos[i][j]==0)\n {\n System.out.print(\"| · \");\n }\n else\n {\n System.out.print(\"| \" + playerBoardPos[i][j] + \" \");\n }\n }\n System.out.println(\"|\");\n \n if (i==((BOARD_HEIGHT/2)-1)) //Si se ha dibujado la mitad del tablero.\n {\n System.out.println(\" +-------+-------+\"); //Dibuja una separación en medio del tablero.\n }\n }\n \n System.out.println(\" +-------+-------+\"); //Dibuja linea de fin del tablero.\n }", "public void paint()\n {\n try { Thread.sleep(SPEED); } \n catch (Exception e) { }\n \n this.printMap();\n }", "private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }", "public void drawOn(Graphics g){\r\n\t\tif (ignoreStrokes > 0){\r\n\t\t\tg.setColor(Color.cyan); \t//to show the player that they are frozen\r\n\t\t} else {\r\n\t\t\tg.setColor(Color.white);\r\n\t\t}\r\n\t\tmySnake.drawOn(g);\r\n\t\tfor (Mushroom m : shrooms){\r\n\t\t\tm.drawOn(g);\r\n\t\t}\r\n\t}", "public void draw(WorldLocation coord){\n \n }", "public void draw(Graphics g){\n g.setPaint(Color.green);\n g.fillRect(318, 0, 4, 480);\n \n // draw the paddles.\n g.fillRect(this.player1X, this.player1Y, 20, 100); // player1\n g.fillRect(this.player2X, this.player2Y, 20, 100); // player 2\n \n // draw the ball.\n g.setPaint(Color.white);\n g.fillRect(this.ballX, this.ballY, 16, 16);\n \n // draw the scores\n g.setPaint(Color.blue);\n g.setFont(new Font(\"monospace\", Font.PLAIN, 20));\n g.drawString(\"Player 1: \" + this.player1Score, 20, 16);\n g.drawString(\"Player 2: \" + this.player2Score, 580, 16);\n }", "public void draw(Graphics g, int w, int h){\n\t\tdouble scale = getScale(w, h); double xOffset = getXOffset(w, h); double yOffset = getYOffset(w, h);\n\n\t\t// place player turn indicators on screen\n\t\t// TODO: this is all ad-hoc and really disgusting at the moment; maybe rewrite this so it can take in some arbitrary font size somehow\n\t\tFont UIFont = new Font(\"Arial\", Font.BOLD, (int)(20*scale)); g.setFont(UIFont); \n\t\tg.setColor(getPlayerColor(0)); g.drawString(\"P1\", (int)(-19*scale + xOffset), (int)(-25*scale + yOffset));\n\t\tg.setColor(getPlayerColor(1)); g.drawString(\"P2\", (int)((this.w-5)*scale+xOffset), (int)(-25*scale + yOffset));\n\n\t\ttable.fillPolygon(g, scale, xOffset, yOffset, new Color(155, 126, 70), new int[]{0, 1, 2, 3, 4, 5, 0, 6, 7, 8, 9, 10}); // wooden frame\n\t\ttable.fillPolygon(g, scale, xOffset, yOffset, new Color(1, 162, 76), new int[]{0, 1, 2, 3, 4, 5}); // felt playing field\n\n\t\ttable.drawObjects(g, scale, xOffset, yOffset);\n\t}", "public void render() {\r\n\t\t //Draw all of the sprites in the game\r\n\t background.draw(0,backgroudY1);\r\n\t\tbackground.draw(0,backgroudY2);\r\n\t\tbackground.draw(0,backgroudY3);\r\n\t\tbackground.draw(WIDTH/2,backgroudY1);\r\n\t\tbackground.draw(WIDTH/2,backgroudY2);\r\n\t background.draw(WIDTH/2,backgroudY3);\r\n\t \r\n\t // call this method from Player class, to draw the plane.\r\n\t player.render();\r\n\t \r\n\t \r\n\t // loop through every enemy, draw enemy if it's not killed\r\n\t for(int i=0; i<enemy.length; i++) {\r\n\t \t\r\n \tif(enemy[i] != null && enemyKilled[i] == true) {\r\n \t\t\r\n\t \t\t\r\n\t enemy[i].render();\r\n\t \r\n\t \t}\r\n\t \r\n\t }\r\n\t // loop through every laser, if it has not made contact with any enemy,\r\n\t // call its render method to draw it\r\n\t for (int i = 0; i < arr_size; i++) {\r\n\t \tif (lasers[i] != null && laserUsed[i] == true) {\r\n\t lasers[i].render();\r\n \t}\r\n\t \t\r\n\t }\r\n\t \r\n\t}", "@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 }", "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(Graphics g) {\t\n\t\tg.drawImage(Images.player, (int)x, (int)y, null);\n\t}", "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 }", "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 }", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "public void printMap(GameMap map);", "public void draw(ArrayList<RoadTick> ticks, Player player, ArrayList<Obstacle> obstacles) {\n\t\tdrawBackground();\n\t\t\n\t\tdrawTicks(ticks);\n\t\t\n\t\tdrawPlayer(player);\n\t\t\n\t\tdrawObstacles(obstacles);\n\t\t\n\t\trepaint();\n\t}", "public void draw(Canvas canvas){\n for(AttackObject attack : attacks){\n attack.draw(canvas);\n }\n }", "public void paint()\n {\n try { Thread.sleep(SPEED); } \n catch (Exception e) { }\n \n this.printMap();\n }", "public void draw() {\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tif (particles[i] != null) {\r\n\t\t\t\tglBegin(GL_QUADS);\r\n\t\t\t\t{\r\n\t\t\t\t\tparticles[i].draw();\r\n\t\t\t\t}\r\n\t\t\t\tglEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\tglColor3f(1, 1, 1);\r\n\t}", "@Override\n\tpublic void draw(Graphics2D g) {\n\n\t\t\n\t\tg.setColor(new Color(36, 36, 36));\n\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\n\t\tg.setColor(new Color(87, 87, 87));\n\t\tSceneManager.sm.currSector.drawBasicGrid(g, 1000000, (int) (100 * (1 / Math.sqrt((Camera.scale)))), 2);\n\n\t\tif (target != null) {\n\t\t\tg.setPaint(new Color(255, 0, 0, 200));\n\t\t\tg.setStroke(new BasicStroke((int) (3 * Camera.scale)));\n\t\t\tCamera.toScreen(target.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tSceneManager.sm.currSector.draw(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.drawImage(ui, 0, 0, 1920, 1010, null);\n\n\t\t// draw player scrap amt\n\t\tg.setFont(Misc.arialBig);\n\t\tg.setColor(Color.white);\n\t\tg.drawString(\"\" + Driver.playerScrap, 1733, 72);\n\n\t\t// draw speed\n\t\tg.setColor(new Color(0, 119, 166));\n\t\tg.fillRect(1872, (int) (113 + 564 - 564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))), 33,\n\t\t\t\t(int) (564 * ((p.vel.getMagnitude() * 20)\n\t\t\t\t\t\t/ (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))));\n\t\tg.setFont(Misc.font);\n\t\tg.setColor(Color.LIGHT_GRAY);\n\t\tg.drawString((int) (p.vel.getMagnitude() * 20) + \" mph\", 1760, 564 - (int) (564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag))))\n\t\t\t\t+ 120);\n\n\t\t// show selected ship\n\t\tif (selected != null && !selected.destroyed) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tCamera.toScreen(selected.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tfor (Part p : s.parts) {\n\t\t\t\tif (p.health < p.baseHealth && Camera.scale > .5) {\n\t\t\t\t\tg.rotate(s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t\tdrawPartHealth(g, p,\n\t\t\t\t\t\t\tCamera.toScreen(new Point(s.pos.x + p.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\t\t\ts.pos.y + p.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t\t\t(int) (40 * Camera.scale), (int) (15 * Camera.scale), p.health, p.baseHealth);\n\t\t\t\t\tg.rotate(-s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (partTarget != null) {\n\t\t\tg.rotate(target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t\tg.setColor(Color.red);\n\t\t\toutlinePart(g,\n\t\t\t\t\tCamera.toScreen(new Point(target.pos.x + partTarget.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\ttarget.pos.y + partTarget.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t(int) (partTarget.width * Part.SQUARE_WIDTH * Camera.scale),\n\t\t\t\t\t(int) (partTarget.height * Part.SQUARE_WIDTH * Camera.scale));\n\t\t\tg.rotate(-target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t}\n\n\t\t// shipYard.draw(g);\n\t\t// starMap.draw(g);\n\n\t\tif (target != null) {\n\t\t\tPoint avg = Camera.toScreen(target.cm.avg(p.cm));\n\t\t\tPoint mapAvg = target.cm.avg(p.cm);\n\t\t\teyeLoc.setXY(mapAvg.x, mapAvg.y);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, eyeFocused ? .1f : .3f));\n\t\t\tg.drawImage(eye, (int)(avg.x - eye.getWidth() * Camera.scale / 2), (int)(avg.y - eye.getHeight() * Camera.scale / 2),\n\t\t\t\t\t(int)(eye.getWidth() * Camera.scale), (int)(eye.getHeight() * Camera.scale), null);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));\n\t\t\t\n\t\t}\n\n\t\tminimap.mc.focus(Camera.toMap(Driver.screenWidth / 2, Driver.screenHeight / 2));\n\t\tminimap.draw(g, SceneManager.sm.currSector.ships);\n\n\t\tif (!running) {\n\t\t\tg.setPaint(new Color(0, 0, 0, 128));\n\t\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(Misc.arialSmall);\n\t\t\tg.drawString(\"Paused - [p] to resume\", 900, 50);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.drawString(\n\t\t\t\t\t\"Protect your reactor, destroy enemies to collect scrap, build up your ship, and make your way to the end of the galaxy!\",\n\t\t\t\t\tDriver.screenWidth / 2 - 920, Driver.screenHeight / 2 - 400);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.drawString(\"CONTROL BASICS:\", Driver.screenWidth / 2 - 940, Driver.screenHeight / 2 - 350);\n\t\t\t\n\t\t\tg.drawString(\"MOVEMENT: Rotation = Q and E, Translation = WASD\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 300);\n\t\t\tg.drawString(\"COMBAT: Right Click on enemy = set as a target: lasers will shoot target when in range\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 250);\n\t\t\tg.drawString(\"CAMERA: Middle Mouse Click on ship = set the camera to that ship\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 200);\n\t\t\tg.drawString(\"Scroll Wheel = zoom\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 150);\n\t\t\tg.drawString(\"Arrow Keys = pan\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 100);\n\t\t\t\n\t\t\tg.drawString(\"GAMEPLAY + STRATEGY:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - 0);\n\t\t\tg.setColor(new Color(217, 52, 52));\n\t\t\tg.drawString(\"If you just started, your ship is weak! Upgrade it before entering combat!\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -50);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"Cannot jump to the next sector if current sector is not clear\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -100);\n\t\t\tg.drawString(\"Enemies will attack you when in range & can't edit ship if in enemy range\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -150);\n\t\t\t\n\t\t\t\n\t\t\t//advanced\n\t\t\tg.drawString(\"ADVANCED:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - -200);\n\t\t\tg.drawImage(eye, Driver.screenWidth / 2 - 340, Driver.screenHeight / 2 + 225, eye.getWidth()/4, eye.getHeight()/4, null);\n\t\t\tg.drawString(\"Middle Click the icon: set the camera to focus on the center of battle\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -250);\n\t\t\tg.drawString(\"Spacebar = recenter camera on player\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -300);\n\t\t}\n\n\t}", "@Override\n public void render(GUIContext container, Graphics g) throws SlickException {\n for (int x = 0 ; x < GameManager.getInstance().getPlayers().size(); x++){\n if (UsableActorContainer.PICKER_DRAWN_HORIZONTAL[x])\n {\n this.horizontalPicker.draw(UsableActorContainer.PICKER_START_PIXELS_X[x], UsableActorContainer.PICKER_START_PIXELS_Y[x], UsableActorContainer.HORIZONTAL_PICKER_WIDTH, UsableActorContainer.HORIZONTAL_PICKER_HEIGHT);\n }\n else{\n this.verticalPicker.draw(UsableActorContainer.PICKER_START_PIXELS_X[x], UsableActorContainer.PICKER_START_PIXELS_Y[x], UsableActorContainer.VERTICAL_PICKER_WIDTH, UsableActorContainer.VERTICAL_PICKER_HEIGHT);\n }\n }\n \n \n //Draw the objects inside the pickers\n for( Whistle whistle : this.whistles )\n {\n whistle.render( g );\n }\n for(Cookie cookie : this.cookies){\n cookie.render(g);\n }\n \n }", "@Override\n\tpublic void onDraw(Canvas canvas) {\n\t\t//black canvas \n\t\tcanvas.drawRGB(15, 74, 0);\n\n\t\tif( _game.getStatus() != Game.Status.RUNNING) \n\t\t\treturn;\n\t\t\n\t\t//this draws the grid on which the player has to match words\n\t\tshowGrid(canvas);\n\t\t//highlight the final word\n\t\thighlight(canvas);\n\t\t//draw letters in board\n\t\tdrawStrings(canvas);\n\t\t//this shows how much time the player has left\n\t\tshowTimer(canvas);\n\t\t//this shows the number of dictionary words the player has found until\n\t\t//current time\n\t\tshowWordCount(canvas);\n\t\t//draw the score also\n\t\tshowScore(canvas);\n\t\t\n\t}", "public void render() {\n stroke(color(50, 50, 50));\n fill(color(50, 50, 50));\n rect(0, 0, getWidth(), getTopHeight());\n int tempX = this.x;\n int fontSize = 150 / (this.players.size() * 2);\n\n this.messages = new ArrayList();\n int count = 0;\n for (Player player : this.players) {\n\n StringBuilder bar = new StringBuilder();\n // max lives = 3\n bar.append(player.name() + \" \");\n for (int i=0; i<3; i++) {\n if (i < player.lives()) {\n bar.append('\\u25AE'); // http://jrgraphix.net/r/Unicode/?range=25A0-25FF\n } else {\n bar.append('\\u25AF');\n }\n }\n\n String message = bar.toString();\n messages.add(message);\n\n textAlign(LEFT);\n textFont(f, fontSize);\n fill(player.getColor());\n text(message, tempX, this.y);\n\n int newX = (int) textWidth(message) + 10;\n tempX += newX;\n count++;\n }\n }", "public void draw()\r\n\t{\r\n\t\tfor(int i=1;i<accountValue.length;i++)\r\n\t\t{\r\n\t\t\taccountValue[i]+=playerBet[i];\r\n\t\t}\r\n\t\tendRund();\r\n\t}", "@Override\n public void draw(Canvas canvas){\n\n final float scaleX = getWidth()/(width*1.f);\n final float scaleY = getHeight()/(height*1.f);\n\n if (canvas!=null) {\n final int savedState = canvas.save();\n canvas.scale(scaleX, scaleY);\n background.draw(canvas);\n if(!disappear){\n newPlayer.draw(canvas);\n }\n\n //Top border\n for (TopBorder tp : topborder){\n tp.draw(canvas);\n }\n\n //Draws bottom border\n for (BotBorder bp : botborder){\n bp.draw(canvas);\n }\n\n //Draws effects\n for (Effects sp : effect){\n sp.draw(canvas);\n }\n\n //Draws first enemy\n for (Enemy sp : enemy){\n sp.draw(canvas);\n }\n\n //Draws second enemy\n for (secondaryEnemy se : newEnemy){\n se.draw(canvas);\n }\n\n //Draws third enemy\n for (thirdShip ls : thirdEnemy){\n ls.draw(canvas);\n }\n\n //draws death animation\n if(started){\n death.draw(canvas);\n }\n\n //Draws screen text\n screenText(canvas);\n canvas.restoreToCount(savedState);\n }\n }", "private void draw() {\n frames++;\n MainFrame.singleton().draw();\n }", "private void draw() {\n gsm.draw(g);\n }", "private void render() {\n\t\t// clear the screen and depth buffer\n\t\tglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\t\t\n\t\t// draws the background\n\t\tdrawScreen(sprite.get(\"background\"));\n\t\t\n\t\t// drawing player\n\t\tif (!stopDrawingPlayer)\n\t\t\tdrawEntity(player);\n\t\t// drawing bullets\n\t\tdrawListEntity(bullet);\n\t\t// drawing enemy bullets\n\t\tdrawListEntity(enemy_bullet);\n\t\t// drawing enemies\n\t\tdrawListEntity(enemy);\n\t\t// drawing powerups\n\t\tdrawListEntity(powerup);\n\t\t// drawing explosions\n\t\tdrawListEntity(explosion);\n\t\t\n\t\t// draw health\n\t\tdefaultFont.drawString(10, 10, \"Health: \" + player.getHP() + \"/1000\");\n\t\t// draw cash\n\t\tdefaultFont.drawString(10, 40, \"Cash: $\" + cash);\n\t\t// draw shop prompt\n\t\tdefaultFont.drawString(displayWidth - 280, displayHeight - 40, \"Press F to enter shop\");\n\t\t\n\t\tif (stopDrawingPlayer) {\n\t\t\t// draw Game Over\n\t\t\tgameOverFont.drawString(displayWidth / 2 - gameOverFont.getWidth(\"Game Over!\") / 2, displayHeight\n\t\t\t\t\t/ 2 - gameOverFont.getHeight(\"Game Over!\") / 2 - 50, \"Game Over!\");\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}", "public void draw()\r\n\t\t{\r\n\t\tfor(PanelStationMeteo graph: graphList)\r\n\t\t\t{\r\n\t\t\tgraph.repaint();\r\n\t\t\t}\r\n\t\t}", "protected BufferedImage drawBoard(BufferedImage img) {\n myGame.initTiles();\n Graphics2D g2d = img.createGraphics();\n \n //player one\n g2d.setColor(Color.RED);\n int posx1 = myGame.posX(myGame.playerPos(1));\n int posy1 = myGame.posY(myGame.playerPos(1));\n g2d.fill(new Rectangle(posx1, posy1, 20, 20));\n \n //player two\n g2d.setColor(Color.BLUE);\n int posx2 = myGame.posX(myGame.playerPos(2)) + 20;\n int posy2 = myGame.posY(myGame.playerPos(2)) + 20;\n g2d.fill(new Rectangle(posx2, posy2, 20, 20));\n \n g2d.dispose();\n return img;\n }", "public void draw(Graphics g) {\n g.drawImage(playerImage, currentPos.getX() * 32, currentPos.getY() * 32,\n playerImage.getWidth(null),\n playerImage.getHeight(null),\n null);\n }", "public void drawFromDeck(MapBoard board){\n\t\tdiscardUsedCards();\n\t\tint temp1=5-playerCards.size();\n\t\tfor (int i = 0; i < temp1; i++) {\n\t\t\tif(Helper.playerCardSet.size()>0)\n\t\t\t{\n\t\t\t\tPlayerCardActions temp=Helper.getRandomPlayerCard();\n\t\t\t\ttemp.p=this; \n\t\t\t\ttemp.board=board;\n\t\t\t\tplayerCards.add(temp);\n\t\t\t\tif (temp.playerCardName.equals(\"Gaspode\")||temp.playerCardName.equals(\"FreshStartClub\")||temp.playerCardName.equals(\"Wallace Sonky\")) {\n\t\t\t\t\tinterruptCollection.add(temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.78781533", "0.77044207", "0.68870103", "0.68864965", "0.67888045", "0.6769833", "0.67662877", "0.6709445", "0.6700317", "0.666774", "0.66251", "0.65768623", "0.65723884", "0.6567312", "0.6546484", "0.65450144", "0.64983606", "0.6497253", "0.6434914", "0.6414678", "0.63893235", "0.63835865", "0.6369824", "0.6362698", "0.634465", "0.6331349", "0.6313409", "0.63073874", "0.6307009", "0.62963897", "0.6263301", "0.6248469", "0.6246543", "0.62407357", "0.62394196", "0.62329876", "0.62282836", "0.62207544", "0.620835", "0.6196085", "0.6188109", "0.6182601", "0.6177286", "0.61698496", "0.61666286", "0.6162914", "0.6160042", "0.61566526", "0.6135898", "0.61328787", "0.61320525", "0.61223114", "0.61179423", "0.6115206", "0.611453", "0.6091785", "0.60850114", "0.6073547", "0.606788", "0.6056847", "0.6039379", "0.6034896", "0.6018345", "0.60151625", "0.60121065", "0.6011204", "0.5994022", "0.59922606", "0.5991611", "0.59802467", "0.5969876", "0.5965284", "0.5965204", "0.59570473", "0.5948343", "0.5942827", "0.5938735", "0.5925492", "0.5923925", "0.5913464", "0.59089535", "0.59084755", "0.5904943", "0.5901581", "0.58999", "0.5897858", "0.589342", "0.5889131", "0.5887871", "0.58836824", "0.58819574", "0.58810425", "0.58752984", "0.58746177", "0.5872324", "0.58705866", "0.586999", "0.5864238", "0.5859099", "0.5852017" ]
0.6789573
4
Draws a textual map in the console to show the layout of the rooms
public void drawTextualMap(){ for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ if(grid[i][j] instanceof Room){ if(((Room)grid[i][j]).getItems().size()>0) System.out.print(" I "); else System.out.print(" R "); }else{ System.out.print(" = "); } } System.out.println(); } System.out.println("rows = "+grid.length+" cols = "+grid[0].length); System.out.println("I = Room has Item, R = Room has no Item, '=' = Is a Hallway"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length - 1) { // if the last row\r\n \t\tbot = new StringBuilder(); // bot row of room\r\n \t}\r\n \t\r\n for (Room room : row)\r\n {\r\n \tString roomStr = room.toString();\r\n top.append(roomStr.substring(0, 3)); // 0-3 top, 3-6, mid, 6-9 bot\r\n mid.append(roomStr.substring(3, 6)); \r\n if (x == row.length - 1) { //if the last row\r\n \tbot.append(roomStr.substring(6, 9)); //append the bot row\r\n }\r\n }\r\n // add new lines\r\n top.append('\\n');\r\n mid.append('\\n');\r\n \r\n System.out.print(top);\r\n System.out.print(mid);\r\n \r\n if (x == row.length - 1) {\r\n \tbot.append('\\n');\r\n \tSystem.out.print(bot);\r\n }\r\n x++;\r\n }\r\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public static void map(int location)\n\t{\n\t\tswitch(location)\n\t\t{\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * X # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 8:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 11:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 12:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # X # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\");\n\t\t}//end switch(location)\n\t\t\n\t}", "public void printMap(){\n\n for (Tile [] tile_row : this.layout)\n {\n for (Tile tile : tile_row)\n {\n if (tile.isShelf()){\n System.out.print(\" R \");\n }\n else if (tile.isDP()){\n System.out.print(\" D \");\n }\n\n else {\n System.out.print(\" * \");\n }\n\n }\n System.out.println();\n }\n\n }", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "static void printTheSpecifiedMap(MapLM mapToPrint){\n List<List<List<Ansi>>> mapAnsi = mapLMToAnsi(mapToPrint.getMap());\n for(int mapRow = 0; mapRow < GeneralInfo.ROWS_MAP; mapRow++){\n /*mapAnsi.get(mapRow).get(0) is the first square of the current mapRow,\n assuming the other squares on the same mapRow have the same\n number of rows (in other words, the same .size())\n */\n for(int squareRow=0; squareRow < mapAnsi.get(mapRow).get(0).size() ; squareRow++){\n //for each square on the specified mapRow(mapRow is a list of squares)\n for(List<Ansi> square: mapAnsi.get(mapRow)){\n AnsiConsole.out.print(square.get(squareRow));\n /*after the last character of the second line of the last square of\n each row of the map, print the corresponding vertical coordinate\n */\n if((/*last square of the foreach*/ square.equals(mapAnsi.get(mapRow).get(mapAnsi.get(mapRow).size()-1)))\n && squareRow == 1){\n //print vertical coordinate coordinate\n System.out.print(\" \" + verticalCoordinateForUser(mapRow));\n }\n }\n /*after printing the whole specified line of the map (the specified line of all\n the squares on the specified row of squares of the map), start a new line\n */\n System.out.print(\"\\n\");\n }\n }\n //print horizontal coordinates\n System.out.print(\"\\n\");\n for(int i=0; i < GeneralInfo.COLUMNS_MAP; i++){\n System.out.print(\" \" + horizontalCoordinateForUser(i) + \" \");\n }\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "public void printMap(GameMap map);", "public void printMap() {\n String s = \"\";\n Stack st = new Stack();\n st.addAll(map.entrySet());\n while (!st.isEmpty()) {\n s += st.pop().toString() + \"\\n\";\n }\n window.getDHTText().setText(s);\n }", "public static void main(String[] args){\n\t\t/* \n\t\t * Retrieve the variables for width and height of the dungeon\n\t\t */\n\t\tint width;\n\t\tint height;\n\t\ttry{\n\t\t\twidth = Integer.parseInt(args[0]);\n\t\t\theight = Integer.parseInt(args[1]);\n\t\t} catch(NumberFormatException e) { \n\t\t\tSystem.out.println(\"Invalid width and/or height\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\tchar[][] map = genMap(width, height, 3, 10);\n\t\t\n\t\tfor(int i=0; i<height; i++){\n String line = \"\";\n for(int j=0; j<width; j++){\n line += map[i][j];\n }\n System.out.println(line);\n }\n\t}", "public GameField() { //generation of maze size and more\n for (int i = 0; i < 18; i++) {\n for (int j = 0; j < 18; j++) {\n System.out.print(\" \" + Map[i][j] + \" \");\n }\n System.out.println();\n }\n width = height = 40;\n }", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "public void mapToString() {\r\n for (Square[] x : map) {\r\n for (Square y : x) {\r\n System.out.print(y.getVisual() + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "public static void printRoom(char[][] cinemaFloor) {\n int rows = cinemaFloor.length;\n int numSeats = cinemaFloor[0].length;\n\n println(\"Cinema:\");\n for(int i = 1; i <= numSeats; i++) {\n if(i == 1) {\n System.out.print(\" \");\n }\n System.out.print(\" \" + i);\n }\n\n println(\"\");\n \n for(int row = 0; row < rows; row++) {\n System.out.print((row + 1) + \" \");\n for(int col = 0; col < cinemaFloor[row].length; col++) {\n if(cinemaFloor[row][col] == '\\u0000') {\n System.out.print(\"S \");\n } else {\n System.out.print(cinemaFloor[row][col] + \" \");\n }\n }\n println(\"\");\n }\n }", "void display(String w[][]){\r\n System.out.println(\"\\nGambaran dari area (world) yang di buat\\n\");\r\n for (int i = 1; i <= 4; i++) {\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.print(\"|\\t\");\r\n for (int j = 1; j <= 4; j++) {\r\n System.out.print(w[i][j]+ \"\\t|\\t\");\r\n }\r\n }\r\n\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n }", "public void print(){\n for (int i = 0; i < rows; i++)\n {\n for (int j = 0; j < cols; j++)\n {\n if (start.getCol()==j&&start.getRow()==i)\n System.out.print('S');\n else if (end.getCol()==j&&end.getRow()==i)\n System.out.print('E');\n else if (maze[i][j]==1)\n System.out.print('\\u2588');\n else if (maze[i][j]==0)\n System.out.print('\\u2591');\n if (j!=cols-1){\n System.out.print(\" \");\n }\n }\n System.out.println();\n }\n //System.out.println(\"-------\");\n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void print(){\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ~ THREE ROOM DUNGEON GAME ~ \");\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tSystem.out.print(\":( \");\n\t\t\t\t}\n\t\t\t\telse if(this.Ari[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" ? \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\n\t}", "public void displayBoard() {\n System.out.printf(\"%20s\",\"\"); // to add spacing\n for(int i = 0; i < space[0].length; i++) //Put labels for number axis\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println();\n for(int row = 0; row < this.space.length; row++) { //Put letter labels and appropriate coordinate values\n System.out.print(\" \"+ (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) //coordinate values\n System.out.print(emblem + \" \");\n System.out.println();\n }\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "private void drawDB(Graphics g) {\n\t\tfor (Vertex v:db.getVerticesOfClass(\"Location\")) {\n\t\t\t// if the location is a door draw it in RED\n\t\t\tIterable <Vertex> vIt = v.getVertices(Direction.OUT, \"IS_A\");\n\t\t\tfor (Vertex vv: vIt) {\n\t\t\t\tif (vv.getProperty(\"@class\").equals(\"LocationConcept\"))\n\t\t\t\t\tif (vv.getProperty(\"Name\").equals(\"door\")) {\n\t\t\t\t\t\tg.setColor(Color.RED);\n\t\t\t\t\t\t((Graphics2D) g).setStroke(new BasicStroke (4f));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tIterable <Vertex> corners = v.getProperty(\"Shape\");\n\t\t\tPolygon locationShape = new Polygon();\n\t\t\tint x = 0, y = 0, i = 0, xSum = 0, ySum = 0;\n\t\t\tif (corners != null) {\n\t\t\t\tfor (Vertex corner: corners) {\n\t\t\t\t\tx = ScaleToPlotX(corner.getProperty(\"x\"));\n\t\t\t\t\ty = ScaleToPlotY(corner.getProperty(\"y\"));\n\t\t\t\t\tlocationShape.addPoint(x, y);\n\t\t\t\t\txSum = xSum + x;\n\t\t\t\t\tySum = ySum + y;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tg.drawPolygon(locationShape);\n\t\t\t\tg.drawString((String) v.getProperty(\"Name\"), xSum/i - 10, ySum/i + 10); // draw the name in the middle of the room\n\t\t\t}\n\t\t\tg.setColor(Color.BLACK); // switch back to BLACK color for the next room\n\t\t\t((Graphics2D) g).setStroke(new BasicStroke (1f));\n\t\t}\n\t\t\n\t\t// draw all positions inside of a location as little RED circles\n\t\tg.setColor(Color.RED);\n\t\tfor (Edge e: db.getEdgesOfClass(\"IS_CONNECTED_TO\")) {\n\t\t\tVertex p1 = e.getVertex(Direction.IN);\n\t\t\tVertex p2 = e.getVertex(Direction.OUT);\n\t\t\tString p1Class = p1.getProperty(\"@class\");\n\t\t\tString p2Class = p1.getProperty(\"@class\");\t\n\n\t\t\tif (p1Class.equals(\"Position\") && p2Class.equals(\"Position\")) {\n\t\t\t\tg.fillOval(ScaleToPlotX(p1.getProperty(\"x\")), ScaleToPlotY(p1.getProperty(\"y\")),10,10);\n\t\t\t\tg.fillOval(ScaleToPlotX(p2.getProperty(\"x\")), ScaleToPlotY(p2.getProperty(\"y\")),10,10);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tg.setColor(Color.BLUE);\n\t\tif (pos != null) {\n\t\t\tg.fillOval(ScaleToPlotX(pos.getProperty(\"x\")), ScaleToPlotY(pos.getProperty(\"y\")),10,10);\n\t\t}\n\t}", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void showOpponentMap(Admiral admiral) {\r\n\t\tint[] mapGrid = returnOpponent(admiral).getMapGrid();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The map of admiral: \"\r\n\t\t\t\t+ returnOpponent(admiral).getAdmiralName());\r\n\t\tSystem.out.print(\" \");\r\n\t\tfor (int i = 0; i < Constants.COLUMNS_TITLES.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + Constants.COLUMNS_TITLES[i]);\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tfor (int j = 0; j < Constants.ROW_LENGTH; j++) {\r\n\t\t\tif (j < 9) {\r\n\t\t\t\tSystem.out.print(j + 1 + \" \");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(j + 1);\r\n\t\t\t}\r\n\t\t\tfor (int k = 0; k < Constants.ROW_LENGTH; k++) {\r\n\t\t\t\tString cell = null;\r\n\t\t\t\tif (mapGrid[j * Constants.ROW_LENGTH + k] == 0\r\n\t\t\t\t\t\t|| mapGrid[j * Constants.ROW_LENGTH + k] == 1) {\r\n\t\t\t\t\tcell = \" \" + \"0\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == -1) {\r\n\t\t\t\t\tcell = \" \" + \"*\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == 2) {\r\n\t\t\t\t\tcell = \" \" + \"X\";\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(cell);\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\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 }", "public static void displayWorld() {\n\t//First row\n\t\tSystem.out.print(\"+\");\n\t\tfor (int i = 0; i < Params.world_width; i++) {\n\t\t\tSystem.out.print(\"-\");\n\t\t}\n\t\tSystem.out.println(\"+\");\n\t//Grid\n\t\tfor (int row = 0; row < Params.world_height; row++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tList<Critter> crittersInRow = new java.util.ArrayList<Critter>();\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif (c.y_coord == row) {\n\t\t\t\t\tcrittersInRow.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int col = 0; col < Params.world_width; col++) {\n\t\t\t\tboolean critterExists = false;\t\t\t//Becomes true if we find critter in the location\n\t\t\t\tfor (Critter c2: crittersInRow) {\n\t\t\t\t\tif (c2.x_coord == col) {\n\t\t\t\t\t\tif (!critterExists) {\t\t\t//Solves problem of more than 1 critter in location after adding but before stepping\n\t\t\t\t\t\t\tSystem.out.print(c2.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcritterExists = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!critterExists) {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t//Last row\n\t\tSystem.out.print(\"+\");\n\t\tfor (int i = 0; i < Params.world_width; i++) {\n\t\t\tSystem.out.print(\"-\");\n\t\t}\n\t\tSystem.out.println(\"+\");\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "private void drawMap(final Graphics2D theGraphics) {\n for (int y = 0; y < myGrid.length; y++) {\n final int topy = y * SQUARE_SIZE;\n\n for (int x = 0; x < myGrid[y].length; x++) {\n final int leftx = x * SQUARE_SIZE;\n\n switch (myGrid[y][x]) {\n case STREET:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n drawStreetLines(theGraphics, x, y);\n break;\n\n case WALL:\n theGraphics.setPaint(Color.BLACK);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case TRAIL:\n theGraphics.setPaint(Color.YELLOW.darker().darker());\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case LIGHT:\n // draw a circle of appropriate color\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n \n case CROSSWALK:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n \n drawCrossWalkLines(theGraphics, x, y);\n \n // draw a small circle of appropriate color centered in the square\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n topy + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n SQUARE_SIZE / 2, SQUARE_SIZE / 2);\n break;\n\n default:\n }\n\n drawDebugInfo(theGraphics, x, y);\n }\n }\n }", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "public void printWalls(){\n\t\tSystem.out.printf(\"Cell [%d][%d] -- (%d, %d, %d, %d)\\n\",position[0],\n\t\t\t\t\t\tposition[1],eastWall, northWall, westWall, southWall);\n\t}", "private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}", "public void drawInfoWindow(){\n\n p.pushMatrix();\n p.translate(0,0); // translate whole window if necessary\n\n // display name and show\n p.stroke(0);\n p.strokeWeight(2);\n p.textSize(30);\n p.fill(0);\n p.text(\"Info\",735,35);\n p.rectMode(CORNER);\n p.fill(219, 216, 206);\n p.rect(730,40,550,700);\n p.rectMode(CENTER);\n\n p.fill(0);\n p.pushMatrix();{\n p.translate(740,80);\n p.textSize(15);\n p.text(\"General\",0,-20);\n p.line(-3,-15,150,-15);\n p.text(\"Speed: \" + manipulator.maxSpeed,0,0);\n p.text(\"Angle of rotation for segment_1: \" + p.degrees(manipulator.segment_1_rot),0,20);\n p.text(\"Angle of rotation for segment_2: \" + p.degrees(manipulator.segment_2_rot),0,40);\n\n\n }p.popMatrix();\n\n p.popMatrix();\n\n }", "public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }", "public void draw()\n\t{\n\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t\n\t\tfor (int i = 0; i < board_size; i++)\n\t\t{\n\t\t\tSystem.out.print(board_size - i + \" |\");\n\t\t\t\n\t\t\tfor (int j = 0; j < board_size; j++)\n\t\t\t{\n\t\t\t\tif (getPiece(i,j) == null) {System.out.print(\" |\");}\n\t\t\t\telse {System.out.print(\" \" + getPiece(i,j).getSymbol().toChar() + \" |\");}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" A B C D E F G H \\n\");\n\t}", "public String displayRoom() {\n String roomDisplayString = \"\";\n roomDisplayArray = new String[roomHeight][roomWidth];\n initalizeRoomDisplayArray();\n addDoorsToRoomDisplayArray();\n addContentsToRoomDisplayArray();\n roomDisplayString = convertDisplayArrayToString(roomDisplayString);\n return (roomDisplayString);\n }", "private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }", "public void printBoard() {\n System.out.println(\"---+---+---\");\n for (int x = 0; x < boardLength; x++) {\n for (int y = 0; y < boardWidth; y++) {\n char currentPlace = getFromCoordinates(x, y);\n System.out.print(String.format(\" %s \", currentPlace));\n\n if (y != 2) {\n System.out.print(\"|\");\n }\n }\n System.out.println();\n System.out.println(\"---+---+---\");\n }\n }", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void print(){\n for(int i=0; i<maze.length;i+=1) {\n for (int j = 0; j < maze[0].length; j += 1){\n if(i == start.getRowIndex() && j == start.getColumnIndex())\n System.out.print('S');\n else if(i == goal.getRowIndex() && j == goal.getColumnIndex())\n System.out.print('E');\n else if(maze[i][j]==1)\n System.out.print(\"█\");\n else if(maze[i][j]==0)\n System.out.print(\" \");\n\n\n }\n System.out.println();\n }\n }", "public void printMiniMap() { }", "public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }", "private void draw (String printable, StringBuffer canvas) {\r\n \t\t\tcanvas.append(\"| \");\r\n \t\t\t\r\n \t\t\tcanvas.append(printable);\r\n \t\t\tfor (int i=printable.length(); i<width-4; i++) //Fill in the spaces.\r\n \t\t\t{\r\n \t\t\t\tcanvas.append(' ');\r\n \t\t\t}\r\n \t\t\tcanvas.append(\" |\\n\");\r\n \t\t}", "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}", "private static void printRoom(Room currentRoom) {\n\t\t\n\t}", "public String printGrid() {\n String s = \"KEY: \\n- (sea) = no boat not shot\"\n + \"\\nM (miss) = no boat SHOT \"\n +\" \\nB (boat) = boat not shot\"\n + \"\\nH (hit) = boat SHOT\"\n + \"\\n***********************************************************\\n\";\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n s += decideLetter(grid[i][j]) + \"\\t\";\n }\n s += \"\\n\";\n }\n return s;\n }", "public String display(PlayMap aPlayMap) {\r\n String tmpOutput = \"\";\r\n Field tmpField;\r\n \r\n tmpOutput = \"<div class=\\\"map\\\" id=\\\"map\\\" style=\\\"width:\" + aPlayMap.getXDimension() * 34.75 + \"px; \";\r\n tmpOutput += \"height:\" + aPlayMap.getYDimension() * 34.75 + \"px;\\\">\\n\";\r\n // loop for row\r\n for (int i = 0; i < aPlayMap.getYDimension(); i++) {\r\n // loop for column\r\n for (int j = 0; j < aPlayMap.getXDimension(); j++) {\r\n tmpField = aPlayMap.getField(j, i);\r\n tmpOutput += \"<div id=\\\"\" + j + \"/\" + i + \"\\\" \";\r\n try {\r\n tmpOutput += \"class=\\\"field \" + Ground.getGroundLabeling(tmpField.getGround()) + \"\\\" \";\r\n } catch (UnknownFieldGroundException e) {\r\n e.printStackTrace();\r\n }\r\n Placeable tmpSetter = tmpField.getSetter();\r\n String tmpColor = new String (\"#000000\");\r\n String tmpPlacable = new String (\"item\");\r\n if (tmpSetter != null) {\r\n if (tmpSetter instanceof Figure) {\r\n tmpColor = new String();\r\n switch (tmpField.getSetter().getId()) {\r\n case 'A':\r\n tmpColor = \"#ff0000\";\r\n break;\r\n case 'B':\r\n tmpColor = \"#0000ff\";\r\n break;\r\n }\r\n tmpPlacable = \"figure\";\r\n }\r\n tmpOutput += \"onClick=\\\"checkUserAction(this);\\\" \";\r\n tmpOutput += \"onMouseOver=\\\"hoverOn(this);\\\" onMouseOut=\\\"hoverOff(this);\\\" status=\\\"placed\\\" filled=\\\"\" + tmpPlacable + \"\\\" placablecolor=\\\"\" + tmpColor + \"\\\" >\";\r\n String tmpImage = tmpSetter.getImage();\r\n tmpOutput += \"<img src=\\\"resources/pictures/\" + tmpImage + \"\\\">\";\r\n } else {\r\n tmpOutput += \"onClick=\\\"checkUserAction(this);\\\" \";\r\n tmpOutput += \"onMouseOver=\\\"hoverOn(this);\\\" onMouseOut=\\\"hoverOff(this);\\\" status=\\\"empty\\\" filled=\\\"no\\\" placablecolor=\\\"#000000\\\" >\";\r\n }\r\n tmpOutput += \"</div>\\n\";\r\n }\r\n }\r\n tmpOutput += \"</div>\\n\";\r\n\r\n return tmpOutput;\r\n }", "public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }", "public void print_maze () {\n \n System.out.println();\n\n for (int row=0; row < grid.length; row++) {\n for (int column=0; column < grid[row].length; column++)\n System.out.print (grid[row][column]);\n System.out.println();\n }\n\n System.out.println();\n \n }", "public void displaymap(AircraftData data);", "private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }", "public static void draw() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\" \" + board[0][0] + \" | \" + board[0][1] + \" | \"\n\t\t\t\t+ board[0][2]);\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\"---+---+---\");\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\" \" + board[1][0] + \" | \" + board[1][1] + \" | \"\n\t\t\t\t+ board[1][2]);\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\"---+---+---\");\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println(\" \" + board[2][0] + \" | \" + board[2][1] + \" | \"\n\t\t\t\t+ board[2][2]);\n\t\tSystem.out.println(\" | | \");\n\t\tSystem.out.println();\n\t}", "public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }", "public void drawOnMap (char[][] roadMap) {\n int deltaX = 0;\n int deltaY = 0;\n int startX = 0;\n int startY = 0;\n /*\n * If there's no turn, pick an end and calculate the delta. To\n * avoid overwriting the intersections, reduce the delta by 1 and,\n * at the equality end (the initial i value in the loop) shift the\n * start by one for the same reason.\n */\n if (xTurn == -1) {\n startX = xOne;\n startY = yOne;\n deltaX = xTwo - xOne;\n deltaY = yTwo - yOne;\n if (deltaY == 0) {\n if (deltaX < 0) {\n deltaX += 1;\n } else {\n startX++;\n deltaX -= 1;\n }\n } else {\n if (deltaY < 0) {\n deltaY += 1;\n } else {\n startY++;\n deltaY -= 1;\n }\n }\n }\n /*\n * There's a turn. Our starting point will be the turn\n * coordinates. Calculate deltaX and deltaY. Here, we want to\n * overwrite the turn (offset of zero in the loops) and reduce\n * delta to avoid overwriting the intersections at each end.\n */\n else {\n startX = xTurn;\n startY = yTurn;\n if (startX == xOne) {\n deltaX = xTwo - startX;\n deltaY = yOne - startY;\n } else {\n deltaX = xOne - startX;\n deltaY = yTwo - startY;\n }\n if (deltaX < 0) {\n deltaX++;\n }\n if (deltaY < 0) {\n deltaY++;\n }\n }\n /*\n * Now we can run two loops to fill in the necessary chars.\n */\n if (deltaX != 0) {\n for (int i = Math.min(deltaX,0) ; i < Math.max(deltaX,0) ; i++) {\n roadMap[startY][startX + i] = '*';\n }\n }\n if (deltaY != 0) {\n for (int i = Math.min(deltaY,0) ; i < Math.max(deltaY,0) ; i++) {\n roadMap[startY + i][startX] = '*';\n }\n }\n /*\n * Blind spot: in the case where both deltaX and deltaY are\n * counting back toward the turn, an offset of zero, and not quite\n * getting there.\n */\n if (deltaX < 0 && deltaY < 0) roadMap[startY][startX] = '*';\n }", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\tString s = new String(\"\");\r\n\t\tfor (int i = 0; i < maze.length; i++) {\r\n\t\t\ts+= \"\\n\";\r\n\t\t\ts+= \"Floor #\";\r\n\t\t\ts+= (i+1);\r\n\t\t\ts+= \":\";\r\n\t\t\ts+= \"\\n\";\r\n\t\t\tfor (int j = 0; j < maze[0].length; j++) {\r\n\t\t\t\ts+= \"\\n\";\r\n\t\t\t\tfor (int j2 = 0; j2 < maze[0][0].length; j2++) {\r\n\t\t\t\t\ts += this.maze[i][j][j2];\r\n\t\t\t\t\ts += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts+= \"\\n\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public String drawBoard() {\n fillBoard();\n return \"\\n\" +\n \" \" + boardArray[0][0] + \" | \" + boardArray[0][1] + \" | \" + boardArray[0][2] + \" \\n\" +\n \"------------\\n\" +\n \" \" + boardArray[1][0] + \" | \" + boardArray[1][1] + \" | \" + boardArray[1][2] + \" \\n\" +\n \"------------\\n\" +\n \" \" + boardArray[2][0] + \" | \" + boardArray[2][1] + \" | \" + boardArray[2][2] + \" \\n\";\n }", "String printMaze(boolean showBarriers);", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "private void drawStrings(Graphics g, int wid, int hei) {\n Font f = new Font(\"Font.PLAIN\", Font.BOLD, hei / 20);\n g.setFont(f);\n g.setColor(Color.white);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20 - 2, hei / 10 - 2);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 5, hei / 10 * 3 - 2);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20 - 2, hei / 2 - 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63 - 2, hei / 2 + hei / 20 + 3);\n g.setColor(Color.black);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20 + 2, hei / 10 + 2);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 9, hei / 10 * 3 + 2);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20 + 2, hei / 2 + 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63 + 2, hei / 2 + hei / 20 + 7);\n g.setColor(Color.red);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20, hei / 10);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 7, hei / 10 * 3);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20, hei / 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63, hei / 2 + hei / 20 + 5);\n }", "@Test\n\tpublic void testRooms() {\n\t\tMap<Character, String> legend = board.getLegend();\n\t\tassertEquals(LEGEND_SIZE, legend.size());\n\t\t//test first \n\t\tassertEquals(\"Conservatory\", legend.get('C'));\n\t\tassertEquals(\"Library\", legend.get('L'));\n\t\tassertEquals(\"Study\", legend.get('S'));\n\t\tassertEquals(\"Lounge\", legend.get('O'));\n\t\t//test last\n\t\tassertEquals(\"Walkway\", legend.get('W'));\n\t}", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "public String toString()\n {\n return super.toString() + \":\\n\" + getMap();\n }", "public void Print(int visibility) {\n System.out.println(\"We are at location \" + row + \",\" + col + \" in terrain \" + map[row][col]);\n for(int j = row-visibility; j <= row + visibility; j++) {\n for(int i = col-visibility; i <= col + visibility; i++) {\n if(i >= 0 && i <= (maxC -1) && j >= 0 && j <= (maxR -1))\n System.out.print(map[j][i]);\n else\n System.out.print(\"X\");\n }\n System.out.println(\"\");\n }\n }", "public void printMap(int[][] map) {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+map[i][j]+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "public static void drawBoard(){\n\t\tSystem.out.println(\"\\n\\t A B C\");\r\n\t\tSystem.out.println(\"\\t .-----------.\");\r\n\t\tSystem.out.println(\"\\t1 |_\"+TicTac.place[0]+\"_|_\"+TicTac.place[1]+\"_|_\"+TicTac.place[2]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t2 |_\"+TicTac.place[3]+\"_|_\"+TicTac.place[4]+\"_|_\"+TicTac.place[5]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t3 |_\"+TicTac.place[6]+\"_|_\"+TicTac.place[7]+\"_|_\"+TicTac.place[8]+\"_|\");\r\n\t\tSystem.out.println(\"\\t '-----------'\");\r\n\t}", "public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "public void Display_Boards(){\r\n\t\tfor(int i=0; i<13; i++){\r\n\t\t\tdisplay.putStaticLine(myBoard.Display(i)+\" \"+hisBoard.Display(i));\r\n\t\t}\r\n\t}", "public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }", "public String toString() {\n //arena info\n String locations = \"The arena is \" + xSize + \" x \" + ySize;\n //pieces info\n for (Pieces d : drones) {\n locations += \"\\n\";\n locations += d.toString();\n }\n\n return locations;\n }", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\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 }", "public void printG(){\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tSystem.out.print(\":( \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\t}", "public void drawScreen(int par1, int par2, float par3)\n {\n \tStringTranslate var1 = StringTranslate.getInstance();\n this.drawDefaultBackground();\n this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);\n int var4 = this.func_73907_g();\n int var5 = 0;\n\n while (var5 < this.options.keyBindings.length)\n {\n boolean var6 = false;\n int var7 = 0;\n\n while (true)\n {\n if (var7 < this.options.keyBindings.length) // checking for collisions in the minimap's bindings, and the game's bindings from 0 to the size of the minimap's bindings\n {\n if (this.options.keyBindings[var5].keyCode == Keyboard.KEY_NONE || (var7 == var5 || this.options.keyBindings[var5].keyCode != this.options.keyBindings[var7].keyCode) && (this.options.keyBindings[var5].keyCode != this.options.game.gameSettings.keyBindings[var7].keyCode))\n {\n ++var7;\n continue;\n }\n\n var6 = true; // collision\n }\n \n if (var7 < this.options.game.gameSettings.keyBindings.length) // continue checking for collisions only among the standard game's keybindings - an array larger than that of the minimap.\n {\n if (this.options.keyBindings[var5].keyCode == Keyboard.KEY_NONE || this.options.keyBindings[var5].keyCode != this.options.game.gameSettings.keyBindings[var7].keyCode)\n {\n ++var7;\n continue;\n }\n\n var6 = true; // collision\n }\n\n if (this.buttonId == var5) // buttonId is currently being edited button. Draw > ??? <\n {\n ((GuiButton)this.controlList.get(var5)).displayString = \"\\u00a7f> \\u00a7e??? \\u00a7f<\";\n }\n else if (var6) // key collision, draw red\n {\n ((GuiButton)this.controlList.get(var5)).displayString = \"\\u00a7c\" + this.options.getOptionDisplayString(var5);\n }\n else // just show current binding\n {\n ((GuiButton)this.controlList.get(var5)).displayString = this.options.getOptionDisplayString(var5);\n }\n\n this.drawString(this.fontRenderer, this.options.getKeyBindingDescription(var5), var4 + var5 % 2 * 160 + 70 + 6, this.height / 6 + 24 * (var5 >> 1) + 7, -1);\n ++var5;\n break;\n }\n }\n \n this.drawCenteredString(this.fontRenderer, var1.translateKey(\"controls.minimap.unbind1\"), this.width / 2, this.height / 6 + 115, 16777215);\n this.drawCenteredString(this.fontRenderer, var1.translateKey(\"controls.minimap.unbind2\"), this.width / 2, this.height / 6 + 129, 16777215);\n\n\n super.drawScreen(par1, par2, par3);\n }", "public void printCoordinates ()\n\t{\n\t\tfor (int a = 0; a < object.size(); a++)\n\t\t{\n\t\t\tSystem.out.println(\"Polygon \" + (a+1) + \":\");\n\t\t\tobject.get(a).detailedPrint();\n\t\t\tSystem.out.println(\"**********\");\n\t\t}\n\t}", "public void draw(Graphics g) {\n\t\tif (isRoom()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t\telse if (isDoorway()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t\tif (direction == DoorDirection.UP) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, SMALL_RECT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.RIGHT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH + CELL_WIDTH - SMALL_RECT, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.DOWN) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT + CELL_HEIGHT - SMALL_RECT, CELL_WIDTH, 5);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.LEFT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tg.setFont(new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.drawString(roomName, column * CELL_WIDTH, row * CELL_HEIGHT);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t}", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "public void writeReport() {\n\t\tint gridSize = 55; // Total character spaces between the borders\n\t\tprint(\"+-------------------------------------------------------+\");\n\t\tprint(String.format(\"|%s|\", centerName(gridSize)));\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t/*\n\t\t * Loops through each room in the hotel and prints out the relevant\n\t\t * information on a new line And draws southern, eastern and western\n\t\t * borders to allow it to connect up to the main table.\n\t\t */\n\t\tfor (int i = 0; i < myHotel.getSize(); i++) {\n\t\t\tprint(formatRooms(i).toUpperCase());\n\t\t\tprint(formatAmount(i).toUpperCase());\n\t\t\tprint(formatSleepAmount(i).toUpperCase());\n\t\t\tprint(formatOccupied(i).toUpperCase());\n\t\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t}\n\t\t/*\n\t\t * After every hotel room's information has been displayed The overall\n\t\t * hotel information is displayed such as total occupancy, if there is a\n\t\t * vacancy. And if there is a vacancy, the total amount of free rooms\n\t\t * and beds.\n\t\t */\n\t\tprint(String.format(\"| Hotel\\t\\t|\\tTotal Occupancy:\\t%s\\t|\", getHotel().getTotalOccupancy()).toUpperCase());\n\t\tprint(String.format(\"| information:\\t|\\tHas Vacancies:\\t\\t%s\\t|\", convertBoolean(getHotel().getVacancies()))\n\t\t\t\t.toUpperCase());\n\t\tif (getHotel().getVacancies()) {\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Rooms:\\t\\t%s\\t|\", getHotel().getEmptyRooms()).toUpperCase());\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Beds:\\t\\t%s\\t|\", getHotel().getTotalVacancy()).toUpperCase());\n\t\t}\n\t\t/*\n\t\t * Draws a final southern border to close the table\n\t\t */\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t}", "private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT * 2 / 3, \"CS61B The Game\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 + 2, \"New Game (N)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Load Game (L)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 - 2 , \"Quit (Q)\");\n StdDraw.show();\n }", "void toConsole(IMap map);", "static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "public void drawBoard() {\n String[][] strBoard= new String[4][4];\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n if(board[x][y]==0) {\n strBoard[x][y]= \".\";\n }\n else {\n // set color\n if(board[x][y]%3==2) {\n }\n strBoard[x][y]= \"\"+board[x][y];\n }\n }\n }\n \n String line= \"---------------------------------\";\n System.out.println(line);\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n System.out.print(\"|\"+strBoard[x][y]+\"\\t\");\n }\n System.out.println(\"|\");\n }\n System.out.println(line);\n }", "public static void printBoard() {\n int separatorLen = 67;\n StringBuilder boardString = new StringBuilder();\n boardString.append(new String(new char [separatorLen]).replace(\"\\0\",\"*\"));\n boardString.append(\"\\n\");\n for(int y = Y_UPPER_BOUND - 1; y >= 0; y--)\n {\n boardString.append(y + 1).append(\" \");\n boardString.append(\"*\");\n for (int x = 0; x < X_UPPER_BOUND; x++)\n {\n Piece p = Board.board[x + y * X_UPPER_BOUND];\n if(p != null)\n {\n boardString.append(\" \").append(p).append(p.getColor()? \"-B\":\"-W\").append(\" \").append((p.toString().length() == 1? \" \":\"\"));\n }\n else\n {\n boardString.append(\" \");\n }\n boardString.append(\"*\");\n }\n boardString.append(\"\\n\").append((new String(new char [separatorLen]).replace(\"\\0\",\"*\"))).append(\"\\n\");\n }\n boardString.append(\" \");\n for(char c = 'A'; c <= 'H';c++ )\n {\n boardString.append(\"* \").append(c).append(\" \");\n }\n boardString.append(\"*\\n\");\n System.out.println(boardString);\n }", "public static void createMap()\n\t\t\t{\n\t\t\tmap = new Vector<Location>(4);\n\t\n\t\t\tLocation location1 = new Location(\"the southwest room.\",\"You see doors to the north and east.\");\n\t\t\tLocation location2 = new Location(\"the southeast room.\",\"You see doors to the north and west.\");\n\t\t\tLocation location3 = new Location(\"the northwest room.\",\"You see doors to the south and east.\");\n\t\t\tLocation location4 = new Location(\"the northeast room.\",\"You see doors to the south and west.\");\n\n\t\t\tmap.addElement(location1);\n\t\t\tmap.addElement(location2);\n\t\t\tmap.addElement(location3);\n\t\t\tmap.addElement(location4);\n\t\t\t\n\t\t\t// This section defines the exits found in each location and the \n\t\t\t// locations to which they lead.\n\t\t\tlocation1.addExit(new Exit(Exit.north, location3));\n\t\t\tlocation1.addExit(new Exit(Exit.east, location2));\n\t\t\tlocation2.addExit(new Exit(Exit.north, location4));\n\t\t\tlocation2.addExit(new Exit(Exit.west, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.south, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.east, location4));\n\t\t\tlocation4.addExit(new Exit(Exit.west, location3));\n\t\t\tlocation4.addExit(new Exit(Exit.south, location2));\n\t\t\t\n\t\t\tcurrentLocation = location1;\t\t\t\t\n\t\t\t}", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "public void drawMap(Graphics g) {\r\n\t\tfor (UIElement field : fields.values())\r\n\t\t\tfield.draw(g);\r\n\r\n\t\tfor (UIElement stargate : stargates.values())\r\n\t\t\tstargate.draw(g);\r\n\t}", "public void drawRoad(int player, int location, Graphics g){\n\t}", "public static void printMap(mapNode[][] nodes){\n\t\tint sizeOfMap = nodes.length;\r\n\t\tfor (int i = 0; i < sizeOfMap; i++) {\r\n\t\t\tfor (int j = 0; j < sizeOfMap; j++) {\r\n\t\t\t\tif (j == 9) {\r\n\t\t\t\t\tif(nodes[j][i].getOwnElevation() == 999999999){\r\n\t\t\t\t\t\tSystem.out.println(\"X\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(nodes[j][i].getOwnElevation() == -1){\r\n\t\t\t\t\t\tSystem.out.println(\"*\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tSystem.out.println(nodes[j][i].getOwnElevation());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(nodes[j][i].getOwnElevation() == 999999999){\r\n\t\t\t\t\t\tSystem.out.print(\"X \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(nodes[j][i].getOwnElevation() == -1){\r\n\t\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tSystem.out.print(nodes[j][i].getOwnElevation()+\" \");\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}", "private void renderTypeString() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Typed the seed and end with letter S\");\n StdDraw.show();\n }", "private void renderBoard() {\n Cell[][] cells = gameBoard.getCells();\n StringBuilder battleField = new StringBuilder(\"\\tA B C D E F G H I J \\n\");\n\n for (int i = 0; i < cells.length; i++) {\n battleField.append(i+1).append(\"\\t\");\n for (int j = 0; j < cells[i].length; j++) {\n if (cells[i][j].getContent().equals(Content.deck)) {\n battleField.append(\"O \");\n } else {\n battleField.append(\"~ \");\n }\n }\n battleField.append(\"\\n\");\n }\n\n System.out.println(battleField.toString());\n }", "@Override\n\tpublic String drawForConsole() {\n\t\tString[][] output = new String[this.getWidth()][this.getHeight()];\n\t\tString image = \"\";\n\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\t\tif (x == 0 || x == this.getWidth() - 1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (y == 0 || y == this.getHeight() -1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (this.isFilledIn()) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else {\n\t\t\t\t\toutput[x][y] = \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\t\timage += output[x][y];\n\t\t\t\tif (x == this.getWidth() - 1) {\n\t\t\t\t\timage += \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn image;\n\t}", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "void drawBuilding() {\r\n\t\tgc.setFill(Color.BEIGE);\r\n\t\tgc.fillRect(0, 0, theBuilding.getXSize(), theBuilding.getYSize()); // clear the canvas\r\n\t\ttheBuilding.showBuilding(this); // draw all items\r\n\r\n\t\tString s = theBuilding.toString();\r\n\t\trtPane.getChildren().clear(); // clear rtpane\r\n\t\tLabel l = new Label(s); // turn string to label\r\n\t\trtPane.getChildren().add(l); // add label\r\n\r\n\t}" ]
[ "0.7809612", "0.7169309", "0.71593994", "0.7153362", "0.70436317", "0.6836345", "0.6835923", "0.67051035", "0.67002577", "0.66054064", "0.65865725", "0.65654296", "0.65089214", "0.648082", "0.647691", "0.64131546", "0.6405101", "0.63885397", "0.6383444", "0.6349047", "0.6323417", "0.63156563", "0.62861246", "0.62454456", "0.62353003", "0.6227364", "0.6220504", "0.6196497", "0.61783385", "0.6129086", "0.61282593", "0.6107522", "0.61025804", "0.60955113", "0.60558146", "0.60553426", "0.60517967", "0.60421777", "0.60384226", "0.6010221", "0.6007835", "0.6006468", "0.599559", "0.5991805", "0.5973611", "0.5972784", "0.59717727", "0.5966077", "0.59515375", "0.5935399", "0.5933502", "0.5927493", "0.59118354", "0.5906435", "0.590511", "0.58845234", "0.58823746", "0.58796793", "0.5874772", "0.5871408", "0.5867421", "0.58660144", "0.5860581", "0.5859647", "0.58581895", "0.584716", "0.5847115", "0.5843489", "0.5833407", "0.5813854", "0.58109087", "0.57991195", "0.5795695", "0.57902896", "0.57884836", "0.578582", "0.57839495", "0.57833225", "0.5772941", "0.57705855", "0.57669926", "0.57640004", "0.5763247", "0.57594085", "0.5754699", "0.57495564", "0.5742646", "0.57402414", "0.5736337", "0.57315344", "0.57311237", "0.5730003", "0.57254845", "0.5715291", "0.571409", "0.5712962", "0.5710461", "0.5709881", "0.5704329", "0.5702223" ]
0.7947027
0
/Had to use validate functions this way because if we put them directly in if condition they get validated in one by one and if one validate doesn't pass second one is not checked
public void login(ActionEvent e) { boolean passwordCheck = jf_password.validate(); boolean emailCheck = jf_email.validate(); if (passwordCheck && emailCheck) { new LoginRequest(jf_email.getText(), jf_password.getText()) { @Override protected void success(JSONObject response) { Platform.runLater(fxMain::switchToDashboard); } @Override protected void fail(String error) { Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK); alert.showAndWait(); } }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "private boolean validateInputs(){\n if(jrTakeTest.isSelected()==false && jrViewScores.isSelected()==false && jrChangePassword.isSelected()==false)\n return false;\n return true;\n}", "private boolean validate() {\n if(edtMobileNumber.getText().toString().length() <= 0){\n edtMobileNumber.setFocusable(true);\n edtMobileNumber.setError(Constants.ERR_MSG_MOBILE);\n return false;\n }else if(edtFirstName.getText().toString().length() <= 0){\n edtFirstName.setFocusable(true);\n edtFirstName.setError(Constants.ERR_MSG_FIRST_NAME);\n return false;\n }else if(edtLastName.getText().toString().length() <= 0){\n edtLastName.setFocusable(true);\n edtLastName.setError(Constants.ERR_MSG_LAST_NAME);\n return false;\n }else if(edtDateOfBirth.getText().toString().length() <= 0){\n edtDateOfBirth.setFocusable(true);\n edtDateOfBirth.setError(Constants.ERR_MSG_DATE_OF_BIRTH);\n return false;\n }else if(edtEnterPin.getText().toString().length() <= 0){\n edtEnterPin.setFocusable(true);\n edtEnterPin.setError(Constants.ERR_MSG_PIN);\n return false;\n }else if(edtConfirmPin.getText().toString().length() <= 0){\n edtConfirmPin.setFocusable(true);\n edtConfirmPin.setError(Constants.ERR_MSG_CONFIRM_PIN);\n return false;\n }else if(spnStatus.getSelectedItemPosition() == 0){\n Toast.makeText(context, Constants.ERR_MSG_STATUS, Toast.LENGTH_SHORT).show();\n return false;\n }else if(spnBloodGroup.getSelectedItemPosition() == 0){\n Toast.makeText(context, Constants.ERR_MSG_BLOOD_GROUP, Toast.LENGTH_SHORT).show();\n return false;\n }else if(rgGender.getCheckedRadioButtonId() == -1){\n Toast.makeText(context,Constants.ERR_MSG_GENDER,Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private boolean validateFields(){ \n ImplLogger.enterMethod(); \n StringBuffer validationMessage = new StringBuffer();\n boolean isValidationPassed = true;\n if(!ImplValidationUtils.isAlphaSpace(pharmaNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_NAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n pharmaNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n } \n if(!ImplValidationUtils.isAlphabetOnly(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplCommonUtil.isUserNameExist(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME_EXIST);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(contactTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_CONTACT);\n validationMessage.append(ImplConst.NEXT_LINE);\n contactTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(zipCodeTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_ZIPCODE);\n validationMessage.append(ImplConst.NEXT_LINE);\n zipCodeTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(passwordField.getText())){\n validationMessage.append(ImplConst.VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n passwordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n confirmPasswordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if (!ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText()) && !confirmPasswordField.getText().equals(passwordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n isValidationPassed = false; \n }\n if(!isValidationPassed){\n JOptionPane.showMessageDialog(null,validationMessage);\n } \n ImplLogger.exitMethod();\n return isValidationPassed;\n }", "protected abstract boolean isValidate();", "private boolean checkValidations() {\n if (TextUtils.isEmpty(etFirstName.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_name_war));\n return false;\n } else if (etPhoneNo.getText().length() > 0 && etPhoneNo.getText().toString().trim().length() < 7) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.valid_mo_no_war));\n return false;\n }\n /*else if (TextUtils.isEmpty(etAdress.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_address_war));\n return false;\n } else if (countryId==null || countryId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.country_war));\n return false;\n } else if (stateId==null || stateId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.state_war));\n return false;\n }*/ /*else if (cityId==null || cityId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.city_war));\n return false;\n }*/\n else\n return true;\n }", "public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }", "public void validate() {}", "private void check2(){\n \n // All methods past the first rule check to see\n // if errorCode is still 0 or not; if not skips respective method\n if(errorCode == 0){\n \n if (!(fourthDigit == fifthDigit + 1)){\n valid = false;\n errorCode = 2;\n }\n }\n\t}", "private boolean validateInputs() {\n if (KEY_EMPTY.equals(tenchuxe)) {\n etTenChuXe.setError(\"Vui lòng điền Tên chủ xe\");\n etTenChuXe.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(sdt)) {\n etSDT.setError(\"Vui lòng điền Số điện thoại\");\n etSDT.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(mota)) {\n edMoTa.setError(\"Vui lòng điền Mô tả xe\");\n edMoTa.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(biensoxe)) {\n etBienSoXe.setError(\"Vui lòng điền Biển số xe\");\n etBienSoXe.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(passwordtx)) {\n etPasswordtx.setError(\"Vui lòng điền Mật khẩu\");\n etPasswordtx.requestFocus();\n return false;\n }\n\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Vui lòng điền Xác nhận mật khẩu\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!passwordtx.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Xác nhận mật khẩu sai !\");\n etConfirmPassword.requestFocus();\n return false;\n }\n\n return true;\n }", "protected void validate() {\n // no op\n }", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "private void validateData() {\n }", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "public boolean Validate() {\n String[] testArr = {titleTxf.getText(), fNameTxf.getText(), sNameTxf.getText(),\n initialTxf.getText(), hNumTxf.getText(), cNumTxf.getText(), emailTxf.getText(), idNumTxf.getText(),\n (String) maritalCbx.getSelectedItem(), \n resTxf1.getText() + \"\" + resTxf2.getText(), zipResTxf.getText(),postTxf1.getText() + \"\" + postTxf2.getText(),\n zipPostTxf.getText() };\n\n // verify user has entered data into required fields\n String inputTest = \"\";\n\n for (int i = 0; i < testArr.length; i++) {\n if (testArr[i].equals(inputTest)) {\n\n JOptionPane.showMessageDialog(rootPane, \"please fill in all required fields\", \"ERROR\", ERROR_MESSAGE);\n \n return false;\n \n\n }\n \n \n }\n //verify Home number\n if(hNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Home number\", \"ERROR\", ERROR_MESSAGE);\n errHNum.setText(\"!\");\n \n return false;\n }\n else{\n errHNum.setText(\"\");\n }\n //verify CellNo\n if(cNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Cellphone number\", \"ERROR\", ERROR_MESSAGE);\n errCNum.setText(\"!\");\n \n return false;\n \n }\n else{\n errCNum.setText(\"\");\n }\n //verify email\n String email =emailTxf.getText(); \n if(!email.contains(\"@\")|| !email.contains(\".\")){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild email address\", \"ERROR\", ERROR_MESSAGE);\n errEmail.setText(\"!\");\n return false;\n }\n else{\n errEmail.setText(\"\");\n }\n \n //verify ID No. (Local)\n String ID = idNumTxf.getText();\n if(ID.length()!=13){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild ID number\", \"ERROR\", ERROR_MESSAGE);\n errID.setText(\"!\");\n return false;\n }\n else{\n errID.setText(\"\");\n }\n \n if(zipResTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipRes.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipRes.setText(\"\");\n }\n if(zipPostTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipPost.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipPost.setText(\"\");\n }\n \n \n return true;\n\n }", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "public abstract boolean validate();", "private boolean checkValidations() {\n double originalPrice = 0.0, newPrice = 0.0;\n try {\n originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n newPrice = Double.parseDouble(tvNewPrice.getText().toString());\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n if (TextUtils.isEmpty(etTitle.getText().toString().trim())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_title_war));\n return false;\n } else if (TextUtils.isEmpty(etDescription.getText().toString().trim())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_description_war));\n return false;\n } else if (TextUtils.isEmpty(etTotalItems.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_total_items));\n return false;\n } else if (Integer.parseInt(etTotalItems.getText().toString()) < 1) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_total_items));\n return false;\n } else if (TextUtils.isEmpty(etOriginalPrice.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_original_price));\n return false;\n } else if (Double.parseDouble(etOriginalPrice.getText().toString().trim()) < 1) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.zero_original_price));\n return false;\n } else if (TextUtils.isEmpty(tvNewPrice.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_new_price));\n return false;\n } else if (originalPrice < newPrice) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.new_price_cant_greater));\n return false;\n } else if (TextUtils.isEmpty(etBeginTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_begin_time));\n return false;\n } else if (TextUtils.isEmpty(etEndTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_end_time));\n return false;\n } else if (appUtils.isBeforeCurrentTime(etBeginTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.start_time_cant_be_less));\n return false;\n } else if (!checktimings(etBeginTime.getText().toString(), etEndTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.end_time_cant_less));\n return false;\n } else\n return true;\n }", "private void batchValidate() {\n lblIdError.setText(CustomValidator.validateLong(fieldId));\n lblNameError.setText(CustomValidator.validateString(fieldName));\n lblAgeError.setText(CustomValidator.validateInt(fieldAge));\n lblWageError.setText(CustomValidator.validateDouble(fieldWage));\n lblActiveError.setText(CustomValidator.validateBoolean(fieldActive));\n }", "private boolean isValidate() {\n name = edt_name.getText().toString();\n phone = edt_phone.getText().toString();\n landMark = edt_landmark.getText().toString();\n address = edt_address.getText().toString();\n city = edt_city.getText().toString();\n state = edt_state.getText().toString();\n if (name.length() == 0) {\n edt_name.setError(\"Please Enter Name \");\n requestFocus(edt_name);\n return false;\n } else if (phone.isEmpty()) {\n edt_phone.setError(\"Please Enter Phone Number \");\n requestFocus(edt_phone);\n return false;\n } else if (phone.length() != 10) {\n edt_phone.setError(\"Please Enter Valid Phone Number \");\n requestFocus(edt_phone);\n return false;\n } else if (address.length() == 0) {\n edt_address.setError(\"Please Enter Address\");\n requestFocus(edt_address);\n return false;\n } else if (city.length() == 0) {\n edt_city.setError(\"Please Enter City Name\");\n requestFocus(edt_city);\n return false;\n } else if (state.length() == 0) {\n edt_state.setError(\"Please Enter State Name\");\n requestFocus(edt_state);\n return false;\n }\n return true;\n }", "private boolean validate(){\n return EditorUtils.editTextValidator(generalnformation,etGeneralnformation,\"Type in information\") &&\n EditorUtils.editTextValidator(symptoms,etSymptoms, \"Type in symptoms\") &&\n EditorUtils.editTextValidator(management,etManagement, \"Type in management\");\n }", "private boolean validFormInputs() {\n String email = etEmail.getText().toString();\n String password = etPassword.getText().toString();\n String institutionName = etInstitutionName.getText().toString();\n String addressFirst = etInstitutionAddressFirst.getText().toString();\n String addressSecond = etInstitutionAddressSecond.getText().toString();\n String CIF = etCIF.getText().toString();\n\n String[] allInputs = {email, password, institutionName, addressFirst, addressSecond, CIF};\n for (String currentInput : allInputs) {\n if (currentInput.matches(\"/s+\")) // Regex pt cazul cand stringul e gol sau contine doar spatii\n return false; // formular invalid - toate inputurile trebuie sa fie completate\n }\n String[] stringsAddressFirst = addressFirst.split(\",\");\n String[] stringsAddressSecond = addressSecond.split(\",\");\n if (stringsAddressFirst.length != 4 ||\n stringsAddressSecond.length != 3)\n return false;\n\n //<editor-fold desc=\"Checking if NUMBER and APARTMENT are numbers\">\n try {\n Integer.parseInt(stringsAddressSecond[0]);\n Integer.parseInt(stringsAddressSecond[2]);\n return true; // parsed successfully without throwing any parsing exception from string to int\n }catch (Exception e) {\n Log.v(LOG_TAG, \"Error on converting input to number : \" + e);\n return false; // parsed unsuccessfully - given strings can not be converted to int\n }\n //</editor-fold>\n }", "public boolean validate() {\n boolean valid = true;\n //Is mName ET not empty and fit mName requirements\n if (mValidation.isInputEditTextFilled(mNameText, getString(R.string.name_empty))) {\n if (!mValidation.isInputEditTextName(mNameText, getString(R.string.name_empty))) {\n valid = false;\n }\n } else {\n valid = false;\n }\n //Is mEmail ET not empty and fit mEmail requirements\n if (mValidation.isInputEditTextFilled(mEmailText, getString(R.string.email_empty))) {\n if (!mValidation.isInputEditTextEmail(mEmailText, getString(R.string.enter_valid_email))) {\n valid = false;\n }\n } else {\n valid = false;\n }\n //Is mPassword ET not empty and fit mPassword requirements\n if (mValidation.isInputEditTextFilled(mPasswordText, getString(R.string.password_empty))) {\n if (!mValidation.isInputEditTextPassword(mPasswordText, getString(R.string.password_requirements))) {\n valid = false;\n }\n } else {\n valid = false;\n }\n //Is confirmPassword ET not empty and fit confirmPassword requirements\n if (mValidation.isInputEditTextFilled(mConfirmPasswordText, getString(R.string.password_confirmation_empty))) {\n if (!mValidation.isInputEditTextMatches(mPasswordText, mConfirmPasswordText, getString(R.string.password_doesnt_match))) {\n valid = false;\n }\n } else {\n valid = false;\n }\n return valid;\n }", "private void validateInputParameters(){\n\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "public void validateInput(String fName, String lName, String zipCode, String employID){\n boolean firstname = firstNameTwoCharactersLong(fName);\n //boolean firstFilled = firstNameFilled\n boolean firstFilled = firstNameFilled(fName);\n //boolean lastname = lastNameTwoCharactersLong\n boolean lastname = lastNameTwoCharactersLong(lName);\n //boolean lastFilled = lastNameFilled\n boolean lastFilled = lastNameFilled(lName);\n //boolean the rest\n boolean employeeID = employeeIDValid(employID);\n boolean zCode = zipCodeValid(zipCode);\n\n //if all of them are valid=true then error prints \"there are no errors found\n if (firstname && firstFilled && lastname && lastFilled && employeeID && zCode){\n errorMessage = \"There were no errors found\";\n }\n //Display error message\n System.out.println(errorMessage);\n\n }", "protected boolean validateInputs() {\n if (KEY_EMPTY.equals(firstName)) {\n etFirstName.setError(\"First Name cannot be empty\");\n etFirstName.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(lastName)) {\n etLastName.setError(\"Last Name cannot be empty\");\n etLastName.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(username)) {\n etUsername.setError(\"Username cannot be empty\");\n etUsername.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(email)) {\n etEmail.setError(\"Email cannot be empty\");\n etEmail.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(password)) {\n etPassword.setError(\"Password cannot be empty\");\n etPassword.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Confirm Password cannot be empty\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!password.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Password and Confirm Password does not match\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(major)) {\n etMajor.setError(\"Major cannot be empty\");\n etMajor.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(university)) {\n etUniversity.setError(\"university cannot be empty\");\n etUniversity.requestFocus();\n return false;\n }\n\n\n\n if(!isStudent && !isTutor){\n //Show a toast or some kind of error\n Toast toast = Toast.makeText(this, \"message\", Toast.LENGTH_SHORT);\n toast.setText(\"please check the account type\");\n toast.setGravity(Gravity.CENTER, 0, 0);\n //other setters\n toast.show();\n return false;\n }\n\n\n return true;\n }", "ValidationResponse validate();", "private boolean validate() {\n\n EditText fnameET = findViewById(R.id.fnameET);\n EditText lnameET = findViewById(R.id.lnameET);\n EditText perNoET = findViewById(R.id.perNoET);\n EditText lecEmailET = findViewById(R.id.lecEmailET);\n EditText adminCodeET = findViewById(R.id.adminCodeET);\n EditText passwET = findViewById(R.id.passwET);\n EditText cpasswET = findViewById(R.id.cpasswET);\n\n String fname = fnameET.getText().toString().trim();\n String lname = lnameET.getText().toString().trim();\n String personNo = perNoET.getText().toString().trim();\n String lectEmail = lecEmailET.getText().toString().trim();\n String adminCode = adminCodeET.getText().toString().trim();\n String password = passwET.getText().toString().trim();\n String cpassword = cpasswET.getText().toString().trim();\n\n //boolean flag;\n\n if(fname.isEmpty()) {\n fnameET.setError(\"Field can't be empty!\");\n fnameET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(lname.isEmpty()) {\n lnameET.setError(\"Field can't be empty!\");\n lnameET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(personNo.isEmpty()) {\n perNoET.setError(\"Field can't be empty!\");\n perNoET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(lectEmail.isEmpty()) {\n lecEmailET.setError(\"Field can't be empty!\");\n lecEmailET.requestFocus();\n return false;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(lectEmail).matches()) {\n lecEmailET.setError(\"check that your email is entered correctly!\");\n lecEmailET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(adminCode.isEmpty()) {\n adminCodeET.setError(\"Field can't be empty!\");\n adminCodeET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(password.isEmpty()) {\n passwET.setError(\"Field can't be empty!\");\n passwET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n if(cpassword.isEmpty()) {\n cpasswET.setError(\"Field can't be empty!\");\n cpasswET.requestFocus();\n return false;\n } else if (!cpassword.equals(password)) {\n cpasswET.setError(\"password doesn't match the above entered password!\");\n cpasswET.requestFocus();\n return false;\n } /*else {\n flag = false;\n }*/\n\n return true;\n }", "private void checkValidation() {\n // Get email id and password\n MainActivity.EmailAddress = emailid.getText().toString();\n finalPassword = password.getText().toString();\n\n // Check patter for email id\n Pattern p = Pattern.compile(Utils.regEx);\n\n Matcher m = p.matcher(MainActivity.EmailAddress);\n\n // Check for both field is empty or not\n if (MainActivity.EmailAddress.equals(\"\") || MainActivity.EmailAddress.length() == 0\n || finalPassword.equals(\"\") || finalPassword.length() == 0) {\n loginLayout.startAnimation(shakeAnimation);\n new CustomToast().Show_Toast(getActivity(), view,\n \"Enter both credentials.\");\n\n }\n // Check if email id is valid or not\n else if (!m.find())\n new CustomToast().Show_Toast(getActivity(), view,\n \"Your Email Id is Invalid.\");\n // Else do login and do your stuff\n else\n tryLoginUser();\n\n }", "private boolean formValidated() {\n boolean flag = true;\n name_error.setVisibility(View.GONE);\n family_error.setVisibility(View.GONE);\n address_region_error.setVisibility(View.GONE);\n address_city_error.setVisibility(View.GONE);\n address_error.setVisibility(View.GONE);\n gender_error.setVisibility(View.GONE);\n cellphone_error.setVisibility(View.GONE);\n address_postal_code_error.setVisibility(View.GONE);\n if (address_spinner.getSelectedItem() == null || address_spinner.getSelectedItem().equals(getString(R.string.address_province_placeholder))) {\n address_region_error.setVisibility(View.VISIBLE);\n address_region_error.setText(R.string.error_isrequired);\n flag = false;\n }\n if (city_spinner.getVisibility() == View.VISIBLE && (city_spinner.getSelectedItem() == null || city_spinner.getSelectedItem().equals(getString(R.string.address_city_placeholder)))) {\n address_city_error.setVisibility(View.VISIBLE);\n address_city_error.setText(R.string.error_isrequired);\n flag = false;\n }\n if (postal_spinner.getVisibility() == View.VISIBLE && (postal_spinner.getSelectedItem() == null || postal_spinner.getSelectedItem().equals(getString(R.string.delivery_neighbourhood)))) {\n address_postal_region_error.setVisibility(View.VISIBLE);\n address_postal_region_error.setText(R.string.error_isrequired);\n flag = true;\n }\n if (BamiloApplication.CUSTOMER.getGender().isEmpty()) {\n if (gender_spinner.getSelectedItem() == null || gender_spinner.getSelectedItem().equals(getString(R.string.gender))) {\n gender_error.setVisibility(View.VISIBLE);\n gender_error.setText(R.string.error_isrequired);\n flag = false;\n }\n }\n if (name.getText().length() >= 0) {\n /* */\n if (name.getText().length() < 2) {\n name_error.setVisibility(View.VISIBLE);\n name_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n }\n if (family.getText().length() >= 0) {\n /* */\n if (family.getText().length() < 2) {\n family_error.setVisibility(View.VISIBLE);\n family_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n }\n if (address.getText().length() >= 0) {\n /* */\n if (address.getText().length() < 2) {\n address_error.setVisibility(View.VISIBLE);\n address_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n }\n Pattern pattern = Pattern.compile(getString(R.string.cellphone_regex), Pattern.CASE_INSENSITIVE);\n\n Matcher matcher = pattern.matcher(cellphone.getText());\n boolean result = matcher.matches();\n if (!result) {\n cellphone.setVisibility(View.VISIBLE);\n cellphone_error.setVisibility(View.VISIBLE);\n cellphone_error.setText(R.string.address_phone_number_invalidity_error);\n flag = false;\n }\n if (cellphone.getText().length() == 0) {\n cellphone.setVisibility(View.VISIBLE);\n cellphone_error.setVisibility(View.VISIBLE);\n cellphone_error.setText(R.string.error_isrequired);\n flag = false;\n }\n\n\n if (postal_code.getText().length() != 0 && postal_code.getText().length() != 10) {\n address_postal_code_error.setVisibility(View.VISIBLE);\n flag = false;\n }\n\n if (gender_lable.length() == 0) {\n gender_error.setVisibility(View.VISIBLE);\n flag = false;\n }\n return flag;\n }", "public static void validation() {\n\t\tif ((!textFieldName.getText().isEmpty()) && (!textField_FirstName.getText().isEmpty())\n\t\t\t\t&& (!textField_Town.getText().isEmpty()) && (!textField_Town.getText().isEmpty())) {\n\n\t\t\tif ((isValidEmailAddress(textField_Email.getText()) == true)) {\n\t\t\t\ttextField_Email.setBackground(Color.white);\n\t\t\t\tif ((force(textField_Mtp.getText()) > 82)) {\n\t\t\t\t\ttextField_Mtp.setBackground(Color.white);\n\t\t\t\t\tactionGiveServeur();\n\n\t\t\t\t} else {\n\t\t\t\t\tshowMessageDialog(null, \"Votre mot de passe est trop faible\");\n\t\t\t\t\ttextField_Mtp.setText(\"Mot de passe trop simple : changer le \");\n\t\t\t\t\ttextField_Mtp.setBackground(Color.RED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextField_Email.setText(\"Email invalide\");\n\t\t\t\ttextField_Email.setBackground(Color.RED);\n\t\t\t\tshowMessageDialog(null, \"Email est invalide\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tshowMessageDialog(null, \"Certain champs sont vide !\");\n\t\t}\n\t}", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "private boolean validateInputs(String iStart, String iEnd, String country, String type) {\n \thideErrors();\n \tint validStart;\n \tint validEnd;\n boolean valid = true;\n// \t//will not occur due to UI interface\n// if (isComboBoxEmpty(type)) {\n// \tvalid = false;\n// \tT3_type_error_Text.setVisible(true);\n// }\n if (isComboBoxEmpty(country)) {\n \tvalid = false;\n \tT3_country_error_Text.setVisible(true);\n }\n \t//checking if start year and end year are set\n if (isComboBoxEmpty(iStart)){\n //start is empty\n T3_start_year_error_Text.setVisible(true);\n valid = false;\n }\n if (isComboBoxEmpty(iEnd)){\n //end is empty\n T3_end_year_error_Text.setVisible(true);\n valid = false;\n }\n \tif (valid){\n //if years are not empty and valid perform further testing\n \t\t//fetch valid data range\n \tPair<String,String> validRange = DatasetHandler.getValidRange(type, country);\n \tvalidStart = Integer.parseInt(validRange.getKey());\n \tvalidEnd = Integer.parseInt(validRange.getValue());\n //check year range validity\n \t\tint start = Integer.parseInt(iStart);\n \t\tint end = Integer.parseInt(iEnd);\n \tif (start>=end) {\n \t\tT3_range_error_Text.setText(\"Start year should be < end year\");\n \t\tT3_range_error_Text.setVisible(true);\n \t\tvalid=false;\n \t}\n// \t//will not occur due to UI interface\n// \telse if (start<validStart) {\n// \t\tT3_range_error_Text.setText(\"Start year should be >= \" + Integer.toString(validStart));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}else if (end>validEnd) {\n// \t\tT3_range_error_Text.setText(\"End year should be <= \" + Integer.toString(validEnd));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}\n \t}\n// \t//will not occur due to UI interface\n// \tif(isComboBoxEmpty(type)) {\n// \t\t//if type is not set\n// T3_type_error_Text.setVisible(true);\n// \t}\n \t\n if(isComboBoxEmpty(country)) {\n //if country is not set\n T3_country_error_Text.setVisible(true);\n }\n \treturn valid;\n }", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean validation(){\n String Venuename= venuename.getText().toString();\n String Address= address.getText().toString();\n String Details= details.getText().toString();\n String Venueimage= venueimage.getText().toString();\n if(Venuename.isEmpty()){\n venuename.setError(\"Please enter the item name\");\n venuename.requestFocus();\n return false;\n }\n if(Address.isEmpty()){\n address.setError(\"Please enter the item name\");\n address.requestFocus();\n return false;\n }\n if(Details.isEmpty()){\n details.setError(\"Please enter the item name\");\n details.requestFocus();\n return false;\n }\n if(Venueimage.isEmpty()){\n venueimage.setError(\"Please Select the image first\");\n return false;\n }\n\n\n return true;\n }", "private boolean getValidation() {\n strLoginMail = inputLoginMail.getText().toString().trim();\n strLoginPass = inputLoginPass.getText().toString().trim();\n\n if (strLoginMail.isEmpty()) { // Check Email Address\n inputLoginMail.setError(getString(dk.eatmore.demo.R.string.email_blank));\n inputLoginMail.requestFocus();\n return false;\n } else if (!isValidEmail(strLoginMail)) {\n inputLoginMail.setError(getString(dk.eatmore.demo.R.string.invalid_email));\n inputLoginMail.requestFocus();\n return false;\n } else if (strLoginPass.isEmpty()) { // Check Password\n inputLoginPass.setError(getString(dk.eatmore.demo.R.string.password_empty));\n inputLoginPass.requestFocus();\n return false;\n }\n\n return true;\n }", "private boolean isValid(){\n if(txtFirstname.getText().trim().isEmpty() || txtLastname.getText().trim().isEmpty() ||\n txtEmailAddress.getText().trim().isEmpty() || dobPicker.getValue()==null\n || txtPNum.getText().trim().isEmpty()\n || txtDefUsername.getText().trim().isEmpty()\n || curPassword.getText().trim().isEmpty()){\n \n return false; // return false if one/more fields are not filled\n }else{\n if(!newPassword.getText().trim().isEmpty()){\n if(!confirmPassword.getText().trim().isEmpty()){\n return true;\n }else{\n return false;\n }\n }\n return true; // return true if all fields are filled\n }\n }", "private boolean validateInputs() {\n question = txtQuestion.getText().trim();\n option1 = txtOption1.getText().trim();\n option2 = txtOption2.getText().trim();\n option3 = txtOption3.getText().trim();\n option4 = txtOption4.getText().trim();\n correctOption = jcCorrectAns.getSelectedItem().toString();\n //System.out.println(correctOption);\n if(question.isEmpty() || option1.isEmpty() || option2.isEmpty() || \n option3.isEmpty() || option4.isEmpty() || correctOption.isEmpty()){\n return false;\n }\n return true;\n }", "private boolean validateInput(){\n Window owner=root.getScene().getWindow();\n inputFileds.addAll(txtfn,txtln,txtsurname,txtDOB,txtResidence,txtMobile,txtID,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().isEmpty()){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n inputFileds.removeAll(txtDOB,txtMobile,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().length()>30){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Sorry the text you entered can not be greater that 30 characters\",\"Text too Long\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n if(username.getText().length()>20 || username.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Username has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid input\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n if(pass.getText().isEmpty()){\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n if(pass.getText().length()>20 || pass.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Password has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat yearFormat = new SimpleDateFormat(\"yyyy\");\n try {\n date = dateFormat.parse(txtDOB.getText());\n Calendar cal=Calendar.getInstance();\n int year=Integer.parseInt(yearFormat.format(date));\n if (year <= 1900 || year>cal.get(Calendar.YEAR)) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n String initialEntry=txtDOB.getText();\n String parsedValue=dateFormat.format(date);\n if(!initialEntry.equals(parsedValue)){\n Dialog.showMessageDialog(owner, \"Note your Date of Birth has been corrected\", \"Date Corrected\",DialogIcon.INFORMATION);\n }\n txtDOB.setText(dateFormat.format(date));\n } catch (ParseException ex) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n try {\n int mobile=Integer.parseInt(txtMobile.getText());\n } catch (NumberFormatException e) {\n Dialog.showMessageDialog(owner, \"Invalid Mobile Number\", \"Invalid data\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n if(txtMobile.getText().length() != 10){\n Dialog.showMessageDialog(owner, \"Sorry your Mobile Number is invalid\", \"Invalid input\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n String sql=\"select Username,Password from users where Username=?\";\n try(PreparedStatement prstmt=con.prepareStatement(sql)) {\n prstmt.setString(1, username.getText());\n ResultSet rs=prstmt.executeQuery();\n if(rs.next()){\n Dialog.showMessageDialog(owner, \"Sorry Username already exists\\n Please change to different Username\", \"Username Exists\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n rs.close();\n } catch (SQLException e) {\n System.err.println(e);\n }\n return true;\n }", "public boolean validate() {\n double ab = lengthSide(a, b);\n double ac = lengthSide(a, c);\n double bc = lengthSide(b, c);\n\n return ((ab < ac + bc)\n && (ac < ab + bc)\n && (bc < ab + ac));\n }", "private boolean validateFields() {\r\n\t\tif (txUsuario.getText().equals(\"\") || txPassword.getText().equals(\"\")\r\n\t\t\t\t|| checkAdmin.isIndeterminate()|| checkTPV.isIndeterminate())\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "protected abstract boolean isInputValid();", "private boolean validateInput(){\n boolean result = false;\n\n if(!us.setUsername(userField.getText())){\n errorLabel.setText(\"Nombre de usuario invalido\");\n } else if(!us.setPassword(passField.getText())){ //Valido 1 por uno los campos que ingreso el usuario\n errorLabel.setText(\"Contraseña invalida\");\n } else if(!us.setName(nameField.getText())){\n errorLabel.setText(\"Nombre Invalido\");\n } else if(!us.setSurname(surnameField.getText())){\n errorLabel.setText(\"Apellido Invalido\");\n } else if(!us.setDni(dniField.getText())){\n errorLabel.setText(\"Dni invalido\");\n } else if(!ageField.getText().matches(\"\\\\d{2}\")){\n errorLabel.setText(\"Edad invalida\");\n }\n else{\n us.setAge(Integer.parseInt(ageField.getText()));\n result = true;\n }\n return result;\n }", "boolean validateInput() {\n if (etFullname.getText().toString().equals(\"\")) {\n etFullname.setError(\"Please Enter Full Name\");\n return false;\n }\n if (etId.getText().toString().equals(\"\")) {\n etId.setError(\"Please Enter ID\");\n return false;\n }\n if (etEmail.getText().toString().equals(\"\")) {\n etEmail.setError(\"Please Enter Email\");\n return false;\n }\n if (etHall.getText().toString().equals(\"\")) {\n etHall.setError(\"Please Enter Hall Name\");\n return false;\n }\n if (etAge.getText().toString().equals(\"\")) {\n etAge.setError(\"Please Enter Age\");\n return false;\n }\n if (etPhone.getText().toString().equals(\"\")) {\n etPhone.setError(\"Please Enter Contact Number\");\n return false;\n }\n if (etPassword.getText().toString().equals(\"\")) {\n etPassword.setError(\"Please Enter Password\");\n return false;\n }\n\n // checking the proper email format\n if (!isEmailValid(etEmail.getText().toString())) {\n etEmail.setError(\"Please Enter Valid Email\");\n return false;\n }\n\n // checking minimum password Length\n if (etPassword.getText().length() < MIN_PASSWORD_LENGTH) {\n etPassword.setError(\"Password Length must be more than \" + MIN_PASSWORD_LENGTH + \"characters\");\n return false;\n }\n\n\n return true;\n }", "public boolean validate() {\n String sDayCheck = sDayView.getText().toString();\n String eDayCheck = eDayView.getText().toString();\n String sTimeCheck = sTimeView.getText().toString();\n String eTimeCheck = eTimeView.getText().toString();\n\n if ((titleView.getText().toString().matches(\"\")) || (roomView.getText().toString().matches(\"\"))) {\n Toast.makeText(getApplicationContext(),\"Please fill in all fields.\",Toast.LENGTH_SHORT).show();\n return false;\n }\n\n if ((sDayCheck.length() != 10) ||\n (eDayCheck.length() != 10) ||\n (sTimeCheck.length() != 5) ||\n (eTimeCheck.length() != 5)) {\n Toast.makeText(getApplicationContext(),\"Please check your Date and Time fields.\",Toast.LENGTH_SHORT).show();\n return false;\n } else if ((sDayCheck.charAt(2) != '/') || (sDayCheck.charAt(5) != '/') ||\n (eDayCheck.charAt(2) != '/') || (eDayCheck.charAt(5) != '/')) {\n Toast.makeText(getApplicationContext(), \"Please check your Date fields.\", Toast.LENGTH_SHORT).show();\n return false;\n } else if ((sTimeCheck.charAt(2) != ':') || (eTimeCheck.charAt(2) != ':')) {\n Toast.makeText(getApplicationContext(), \"Please check your Time fields.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n if (!endDateAfter(sDayCheck, eDayCheck)) {\n Toast.makeText(getApplicationContext(), \"End date must be on or after the Start date.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n if (!endTimeAfter(sTimeCheck, eTimeCheck)) {\n Toast.makeText(getApplicationContext(), \"End time must be on or after the Start time.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n if (isOutOfDate(eDayCheck)) {\n Toast.makeText(getApplicationContext(), \"End date must be on or after Today's Date.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "void validate();", "void validate();", "void checkValid();", "public static void main(String[] args){\n\tValidateUser first =(String Fname) -> {\n\t\tif(Pattern.matches(\"[A-Z]{1}[a-z]{2,}\",Fname))\n\t\t\tSystem.out.println(\"First Name Validate\");\n\t\t\telse \n\t\t\tSystem.out.println(\"Invalid Name, Try again\");\n\t}; \n\t//Lambda expression for Validate User Last Name\n\tValidateUser last =(String Lname) -> {\n\t\tif(Pattern.matches(\"[A-Z]{1}[a-z]{2,}\",Lname))\n\t\t\tSystem.out.println(\"Last Name Validate\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Invalid Last Name, Try again\");\n\t};\n\t//Lambda expression for Validate User Email\n\tValidateUser Email =(String email) -> {\n\t\tif(Pattern.matches(\"^[\\\\w-\\\\+]+(\\\\.[\\\\w]+)*@[\\\\w-]+(\\\\.[\\\\w]+)*(\\\\.[a-z]{2,})$\",email))\n\t\t\tSystem.out.println(\"email Validate\");\n\t\telse\n\t\t\tSystem.out.println(\"Invalid Email, Try again\");\n\t};\n\t//Lambda expression for Validate User Phone Number\n\tValidateUser Num =(String Number) -> {\n\t\tif(Pattern.matches(\"^[0-9]{2}[\\\\s][0-9]{10}\",Number))\n\t\t\tSystem.out.println(\"Phone Number Validate\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Invalid Number, Try Again\");\n\t};\n\t//Lambda expression for Validate User Password\n\tValidateUser Password =(String pass) -> {\n\t\tif(Pattern.matches(\"(?=.*[$#@!%^&*])(?=.*[0-9])(?=.*[A-Z]).{8,20}$\",pass))\n\t\t\tSystem.out.println(\"Password Validate\");\n\t\t\telse\n\t\t\tSystem.out.println(\"Invalid Password Try Again\");\n\t};\n\t\n\tfirst.CheckUser(\"Raghav\");\n\tlast.CheckUser(\"Shettay\");\n\tEmail.CheckUser(\"[email protected]\");\n\tNum.CheckUser(\"91 8998564522\");\n\tPassword.CheckUser(\"Abcd@321\");\n\t\n\t\n\t\n\t//Checking all Email's Sample Separately\n\tArrayList<String> emails = new ArrayList<String>();\n\t//Valid Email's\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\temails.add(\"[email protected]\");\n\t\n\t//Invalid Email's\n\temails.add(\"[email protected]\");\n\temails.add(\"abc123@%*.com\");\n\t\n\tString regex=\"^[\\\\w-\\\\+]+(\\\\.[\\\\w]+)*@[\\\\w-]+(\\\\.[\\\\w]+)*(\\\\.[a-z]{2,})$\";\n\t\n\tPattern pattern = Pattern.compile(regex);\n\t\n\tfor(String mail : emails) {\n\t\tMatcher matcher = pattern.matcher(mail);\n\t System.out.println(mail +\" : \"+ matcher.matches());\n\t}\n \n}", "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.heightValue, \" Рост: \", b) ||\n !CalendarHelper.isFieldValid(startProgramDateValue, \" Старт программы: \", b) ||\n !new ComboBoxFieldHelper<Client>().isFieldValid(clientFIOValue, \" Клиент: \", b))\n {\n result = false;\n }\n\n return result;\n }", "public abstract void validate(List<String> validationMessages);", "private boolean validateForm() {\r\n\t\tResources res = getResources();\r\n\t\tif (this.textViewPrivateKey.getText().toString().equalsIgnoreCase(\"\") ||\r\n\t\t\t\tthis.editTextPassword1.getText().toString().equalsIgnoreCase(\"\") ||\r\n\t\t\t\tthis.editTextPassword2.getText().toString().equalsIgnoreCase(\"\")) {\r\n\t\t\tToast.makeText(this.getApplicationContext(), R.string.all_fields_required, Toast.LENGTH_SHORT).show();\r\n\t\t\treturn false;\r\n\t\t} else if (!(this.editTextPassword1.getText().toString().equals(this.editTextPassword2.getText().toString()))) {\r\n\t\t\tToast.makeText(this.getApplicationContext(), R.string.passwords_not_the_same, Toast.LENGTH_SHORT).show();\r\n\t\t\treturn false;\r\n\t\t} else if (!(this.editTextPassword1.getText().length() >= MIN_PASSWORD_LENGTH)) {\r\n\t\t\tToast.makeText(this.getApplicationContext(), R.string.password_too_short + MIN_PASSWORD_LENGTH + \".\", Toast.LENGTH_SHORT).show();\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "private boolean checkFields() {\n boolean test = true;\n if (fname.isEmpty()) {\n test = false;\n }\n if (lname.isEmpty()) {\n test = false;\n }\n if (cin.isEmpty()) {\n test = false;\n }\n if (typeCompte.equals(\"Bancaire\")) {\n if (decouvertNF.isEmpty())\n test = false;\n } else if (typeCompte.equals(\"Epargne\")) {\n if (tauxInteretNF.isEmpty())\n test = false;\n }\n if (s_datePK.getValue() == null) {\n s_datePK.setStyle(\"-fx-border-color:red;-fx-border-radius:3px;-fx-border-size: 1px;\");\n test = false;\n }\n\n return test;\n }", "private boolean isAllInputValid() {\n for (Map.Entry<EditText, Validator> e : mValidators.entrySet()) {\n if (e.getKey().isEnabled()) {\n if (!e.getValue().test(e.getKey().getText().toString()))\n return false;\n }\n }\n return true;\n }", "boolean areErrorsLegal(List<ValidatorError> errors);", "private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }", "private boolean validateFields(String pickupLocation, String destination, Date time, int noPassengers, ArrayList<String> notes){\n int errors = 0;\n\n if(!Validation.isValidNoPassengers(noPassengers)){\n errors++;\n noPassengersInputContainer.setError(getString(R.string.no_passengers_error));\n }\n\n if(pickupLocation.length() < 3 || pickupLocation.trim().length() == 0){\n errors++;\n pickupLocationInputContainer.setError(getString(R.string.pickup_location_error));\n }\n\n if(destination.length() < 3 || pickupLocation.trim().length() == 0){\n errors++;\n destinationInputContainer.setError(getString(R.string.destination_error));\n }\n\n if(!Validation.isValidBookingTime(time)){\n errors++;\n timeInputContainer.setError(getString(R.string.booking_time_error));\n }\n\n\n return errors == 0;\n }", "private boolean validateFields() {\n\t\tList<String> errorMsg = new ArrayList<>();\n\n\t\tif (aliasField.getText().equals(\"\"))\n\t\t\terrorMsg.add(\"Alias cannot be left empty.\\n\");\n\n\t\tif (carComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A car should be assigned to the trip.\\n\");\n\n\t\tif (routeComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A route should be assigned to the trip.\\n\");\n\n\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\tif (stopPoint.getTime() == null || stopPoint.getTime().equals(\"\"))\n\t\t\t\terrorMsg.add(\"You need to set an arriving time for '\" + stopPoint.toString() + \"'.\\n\");\n\t\t}\n\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null)\n\t\t{\n\t\t\tif (startDatePicker.getValue().isBefore(LocalDate.now())) {\n\t\t\t\terrorMsg.add(\"Trip start date should be after current date.\\n\");\n\t\t\t} else if (endDatePicker.getValue().isBefore(startDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(\"Trip end date should be after start date.\\n\");\n\t\t\t} else {\n\t\t\t\tSet<DayOfWeek> recurrence = RecurrenceUtility.parseBitmaskToSet(getRecurrence());\n\t\t\t\tboolean isValidRecurrence = false;\n\t\t\t\tfor (LocalDate now = startDatePicker.getValue(); !now.isAfter(endDatePicker.getValue()); now = now.plusDays(1)) {\n\t\t\t\t\tif (recurrence.contains(now.getDayOfWeek()))\n\t\t\t\t\t\tisValidRecurrence = true;\n\t\t\t\t}\n\t\t\t\tif (!isValidRecurrence) {\n\t\t\t\t\terrorMsg.add(\"No recurrent day exists between trip start date and end date.\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terrorMsg.add(\"Trip starts date or/and end date is invalid.\\n\");\n\t\t}\n\n\t\t// consistency check\n\t\t// WOF & registration cannot be expired before the end date of recurring trip\n\t\tCar car = carComboBox.getValue();\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null && car != null) {\n\t\t\tif (LocalDate.parse(car.getWof()).isBefore(endDatePicker.getValue()) ||\n\t\t\tLocalDate.parse(car.getRegistration()).isBefore(endDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(String.format(\"The expiration date of a recurring trip cannot occur after the expiry date of car's WOF and registration.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\" +\n\t\t\t\t\t\t\t\t\"Details for car [%s]:\\n\" +\n\t\t\t\t\t\t\t\t\" a. WOF expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\" b. Registration expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\",\n\t\t\t\t\t\tcar.getPlate(), car.getWof(), car.getRegistration()));\n\t\t\t}\n\t\t}\n\n\t\t// handle and show error message in dialog\n\t\tif (errorMsg.size() != 0) {\n\t\t\tStringBuilder errorString = new StringBuilder(\"Operation failed is caused by: \\n\");\n\t\t\tfor (Integer i = 1; i <= errorMsg.size(); i++) {\n\t\t\t\terrorString.append(i.toString());\n\t\t\t\terrorString.append(\". \");\n\t\t\t\terrorString.append(errorMsg.get(i - 1));\n\t\t\t}\n\t\t\tString headMsg = mode == Mode.ADD_MODE ? \"Failed to add the trip.\" : \"Failed to update the trip.\";\n\t\t\trss.showErrorDialog(headMsg, errorString.toString());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private int doValidateCheck()\n {\n if (Math.min(txtArtifactID.getText().trim().length(),\n txtGroupID.getText().trim().length()) == 0)\n {\n return 1;\n }\n if (txtPackage.getText().trim().length() > 0)\n {\n boolean matches = txtPackage.getText().matches(\"[a-zA-Z0-9\\\\.]*\"); //NOI18N\n if (!matches) {\n return 2;\n } else {\n if (txtPackage.getText().startsWith(\".\") || txtPackage.getText().endsWith(\".\"))\n {\n return 2;\n }\n }\n }\n return 0;\n }", "public void printValidateInformation() {\n\n if(!validateFirstName()){\n System.out.println(\"The first name must be filled in\");\n }\n if(!validateFirstNameLength()){\n System.out.println(\"The first name must be at least 2 characters long.\");\n }\n if(!validateLastName()){\n System.out.println(\"The last name must be filled in\");\n }\n if(!validateLastNameLength()){\n System.out.println(\"The last name must be at least 2 characters long.\");\n }\n if(!validateZipcode()){\n System.out.println(\"The zipcode must be a 5 digit number.\");\n }\n if (!validateEmployeeID()){\n System.out.println(\"The employee ID must be in the format of AA-1234.\");\n }\n\n if(validateFirstName() && validateFirstNameLength() && validateLastName() && validateLastNameLength()\n && validateZipcode() && validateEmployeeID()){\n System.out.println(\"There were no errors found.\");\n }\n }", "private boolean isInfoValidate(){\n if(mEmailAddress.getText() == null || mEmailAddress.getText().toString().equals(\"\")){\n errorText = getString(R.string.register_warning_input_email_address);\n return false;\n }\n\n if(!mEmailAddress.getText().toString().contains(\"@\")){\n errorText = getString(R.string.register_warning_valid_email_address);\n return false;\n }\n\n// if(mRegionSpinner.getSelectedItemPosition() == Constant.NON_SELECT){\n// errorText = getString(R.string.register_warning_select_region);\n// return false;\n// }\n\n// if( (mRegionSpinner.getSelectedItemPosition() == Constant.HONG_KONG)\n// &&\n// (mEmailAddress.getText().toString().length() != Constant.HONGKONG_PHONE_LENGTH) ){\n//\n// errorText = getString(R.string.register_warning_valid_phone_num);\n// return false;\n// }\n//\n// if( (mRegionSpinner.getSelectedItemPosition() == Constant.CHINA)\n// &&\n// (mEmailAddress.getText().toString().length() != Constant.CHINA_PHONE_LENGTH) ){\n//\n// errorText = getString(R.string.register_warning_valid_phone_num);\n// return false;\n// }\n\n if(mPassword.getText() == null || mPassword.getText().toString().equals(\"\")){\n errorText = getString(R.string.register_warning_input_password);\n return false;\n }\n\n if(mRetypePassword.getText() == null || mRetypePassword.getText().toString().equals(\"\")){\n errorText = getString(R.string.register_warning_retype_password);\n return false;\n }\n\n if(!mPassword.getText().toString().equals(mRetypePassword.getText().toString())){\n errorText = getString(R.string.register_warning_not_the_same);\n return false;\n }\n\n if(!Utility.judgeContainsStr( mPassword.getText().toString())){\n errorText = getString(R.string.register_warning_contains_character);\n return false;\n }\n\n// if(!mPolicyCheckBox.isChecked()){\n// errorText = getString(R.string.register_warning_check_agreement);\n// return false;\n// }\n\n return true;\n }", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "public int ValidateAndGetSupplierFields()\n {\n int error = 0;\n \n if(txtSuplId.getText() == null || txtSuplId.getText().equals(\"\")) \n {\n saveSupl.setSupplId(Integer.valueOf(\"0\"));\n }else\n {\n saveSupl.setSupplId(Integer.valueOf(txtSuplId.getText())); //pk - not expected to be null!\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplCode.getText())) \n {\n error++;\n txtSuplCode.requestFocus();\n txtSuplCode.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_CODE);\n return error;\n }else\n {\n txtSuplCode.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSupplCode(txtSuplCode.getText()); //Save the value to supplier object\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplContact.getText())) \n {\n error++;\n txtSuplContact.requestFocus();\n txtSuplContact.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_CONTACT);\n return error;\n }else\n {\n txtSuplContact.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplContact(txtSuplContact.getText()); //Save the value to supplier object\n }\n \n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplTel.getText())) \n {\n error++;\n txtSuplTel.requestFocus();\n txtSuplTel.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_TEL);\n return error;\n }else\n {\n txtSuplTel.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplTel(txtSuplTel.getText()); //save the value\n }\n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplCell.getText())) \n {\n error++;\n txtSuplCell.requestFocus();\n txtSuplCell.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_TEL);\n return error;\n }else\n {\n txtSuplCell.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplCell(txtSuplCell.getText()); //save the value\n }\n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplFax.getText())) \n {\n error++;\n txtSuplFax.requestFocus();\n txtSuplFax.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_FAX);\n return error;\n }else\n {\n txtSuplFax.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplFax(txtSuplFax.getText()); //save the value\n }\n \n if(!ValidateFields.validateEmailTextField(txtSuplEmail.getText())) \n {\n error++;\n txtSuplEmail.requestFocus();\n txtSuplEmail.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_EMAIL);\n return error;\n }else\n {\n txtSuplEmail.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplEmail(txtSuplEmail.getText()); //save the value\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplBank.getText())) \n {\n error++;\n txtSuplBank.requestFocus();\n txtSuplBank.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_BANK);\n return error;\n }else\n {\n txtSuplBank.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplBank(txtSuplBank.getText()); //save the value\n }\n \n if(!ValidateFields.validateIntegerNumberTextField(txtSuplBranchCode.getText())) \n {\n error++;\n txtSuplBranchCode.requestFocus();\n txtSuplBranchCode.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_BRANCH_CODE);\n return error;\n }else\n {\n txtSuplBranchCode.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplBranchCode(Integer.valueOf(txtSuplBranchCode.getText())); //save the value\n }\n \n if(!ValidateFields.validateIntegerNumberTextField(txtSuplAccNum.getText())) \n {\n error++;\n txtSuplAccNum.requestFocus();\n txtSuplAccNum.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_ACC);\n return error;\n }else\n {\n txtSuplAccNum.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplAccNum(Integer.valueOf(txtSuplAccNum.getText())); //Save the value to supplier object\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplAccType.getText())) \n {\n error++;\n txtSuplAccType.requestFocus();\n txtSuplAccType.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_ACC_TYPE);\n return error;\n }else\n {\n txtSuplAccType.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplAccType(txtSuplAccType.getText()); //save the value\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplComments.getText())) \n {\n error++;\n txtSuplComments.requestFocus();\n txtSuplComments.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLEMENT_DESC);\n return error;\n }else\n {\n txtSuplComments.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplComments(txtSuplComments.getText()); //save the value\n }\n \n return error;\n }", "public boolean validations() {\n boolean result = false;\n String nameString = mItemNameEditText.getText().toString().trim();\n String locationString = mItemLocationEditText.getText().toString().trim();\n\n if (nameString.isEmpty() || nameString == null || locationString.isEmpty() || locationString == null || isImageNotPresent()) {\n displayToastMessage(getString(R.string.fields_mandatory_msg));\n return result;\n } else {\n result = true;\n return result;\n }\n }", "private void checkFields() {\n if (month.getText().toString().isEmpty()) {\n month.setError(\"enter a month\");\n month.requestFocus();\n return;\n }\n if (day.getText().toString().isEmpty()) {\n day.setError(\"enter a day\");\n day.requestFocus();\n return;\n }\n if (year.getText().toString().isEmpty()) {\n year.setError(\"enter a year\");\n year.requestFocus();\n return;\n }\n if (hour.getText().toString().isEmpty()) {\n hour.setError(\"enter an hour\");\n hour.requestFocus();\n return;\n }\n if (minute.getText().toString().isEmpty()) {\n minute.setError(\"enter the minute\");\n minute.requestFocus();\n return;\n }\n if (AMorPM.getText().toString().isEmpty()) {\n AMorPM.setError(\"enter AM or PM\");\n AMorPM.requestFocus();\n return;\n }\n if (place.getText().toString().isEmpty()) {\n place.setError(\"enter the place\");\n place.requestFocus();\n return;\n }\n }", "public boolean validateuser(){\n if(fname.getText().toString().isEmpty()){\n fname.setError(\"Enter your first name\");\n fname.requestFocus();\n return false;\n }\n if(lname.getText().toString().isEmpty()){\n lname.setError(\"Enter your last name\");\n lname.requestFocus();\n return false;\n }\n if(username.getText().toString().isEmpty()){\n username.setError(\"Enter your last name\");\n username.requestFocus();\n return false;\n }\n if(password.getText().toString().isEmpty()||password.getText().toString().length()<6){\n password.setError(\"Enter your password with digit more than 6\");\n password.requestFocus();\n return false;\n }\n return true;\n }", "private void onValidation() {\n SharedPreferences settings = getSharedPreferences(Constants.PREFS_NAME, 0);\n if (!passEdit.getText().toString().trim().equals(\"\")) {\n if (userEdit.getText().toString().toUpperCase().trim()\n .equalsIgnoreCase(userName)\n && passEdit.getText().toString().trim()\n .equals(pwd)) {\n\n\n //TODO check user is locked or not\n if (!settings.getBoolean(Constants.isUserIsLocked, false)) {\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(Constants.isPasswordSaved, savePass.isChecked());\n editor.commit();\n mIntMaxLimit = 0;\n if (UtilConstants.isNetworkAvailable(getApplicationContext())) {\n onMainMenuLogin();\n } else {\n Toast toast = (Toast) Toast.makeText(getApplicationContext(),\n R.string.validation_offline_login_no_internet,\n Toast.LENGTH_LONG);\n toast.show();\n onMainMenuLogin();\n }\n } else {\n alertForgetPwdMsg();\n }\n\n\n } else {\n\n\n if (mIntMaxLimit == 3) {\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(Constants.isUserIsLocked, true);\n editor.commit();\n alertForgetPwdMsg();\n } else {\n mIntMaxLimit++;\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyTheme);\n builder.setMessage(R.string.validation_plz_enter_username_pwd)\n .setCancelable(false)\n .setPositiveButton(R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n dialog.cancel();\n }\n });\n builder.show();\n }\n\n }\n } else {\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyTheme);\n builder.setMessage(R.string.validation_plz_fill_all_mandatory_flds)\n .setCancelable(false)\n .setPositiveButton(R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n dialog.cancel();\n }\n });\n builder.show();\n }\n\n }", "private void checkRegistationValidation() {\r\n\t\tUtility.hideKeyBoard(this);\r\n\t\tif (firstName.getText().toString().length() == 0\r\n\t\t\t\t&& lastName.getText().toString().length() == 0\r\n\t\t\t\t&& emailAddress.getText().toString().length() == 0\r\n\t\t\t\t&& password.getText().toString().length() == 0\r\n\t\t\t\t&& confirmPassword.getText().toString().length() == 0) {\r\n\t\t\tshowToastMessage(\"All fields are mendatory\");\r\n\t\t} else if (emailAddress.getText().toString().length() == 0) {\r\n\r\n\t\t\temailAddress.setError(Constant.emailFieldValidation);\r\n\t\t\temailAddress.setText(\"\");\r\n\t\t\temailAddress.requestFocus();\r\n\t\t} else if (firstName.getText().toString().length() == 0) {\r\n\t\t\tfirstName.setError(\"Enter first name\");\r\n\t\t\tfirstName.setText(\"\");\r\n\t\t\tfirstName.requestFocus();\r\n\t\t} else if (lastName.getText().toString().length() == 0) {\r\n\t\t\tlastName.setError(\"Enter first name\");\r\n\t\t\tlastName.setText(\"\");\r\n\t\t\tlastName.requestFocus();\r\n\t\t} else if (password.getText().toString().length() == 0) {\r\n\t\t\tpassword.setError(Constant.passwordFieldValidation);\r\n\t\t\t;\r\n\t\t\tpassword.setText(\"\");\r\n\t\t\tpassword.requestFocus();\r\n\t\t} else if (!Utility.validateEmail(emailAddress.getText().toString())) {\r\n\t\t\temailAddress.setError(Constant.emailFormatValidation);\r\n\t\t\temailAddress.setText(\"\");\r\n\t\t\temailAddress.requestFocus();\r\n\r\n\t\t} else if (!password.getText().toString()\r\n\t\t\t\t.equals(confirmPassword.getText().toString())) {\r\n\t\t\tconfirmPassword.setError(\"Confirm password not same as password\");\r\n\t\t\tconfirmPassword.setText(\"\");\r\n\t\t\tconfirmPassword.requestFocus();\r\n\t\t} else {\r\n\t\t\tif (isConnectedToInternet()) {\r\n\t\t\t\tloadingProgress.setVisibility(View.VISIBLE);\r\n\t\t\t\tsendRegistrationRequestToServer();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnew Utility().showCustomDialog(\"Ok\", \"Internet Connection\",\r\n\t\t\t\t\t\t\"no internet access\", false, RegistrationActivity.this,\r\n\t\t\t\t\t\tnull, null);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void checkValidation() {\n String getInstituteName = NameofInstitute.getText().toString();\n String getDegreename = SpinnerDegree.getSelectedItem().toString();\n\n\n // Check if all strings are null or not\n if (getInstituteName.equals(\"\") || getInstituteName.length() == 0 || getDegreename.equals(\"\") || getDegreename.length() == 0)\n new CustomToast().Show_Toast(getActivity(), getView(),\"All fields are required.\");\n // Else do signup or do your stuff\n else {\n //Toast.makeText(getActivity(), \"All Ok till Now\", Toast.LENGTH_SHORT).show();\n AddQualifications(getDegreename,getInstituteName);\n }\n\n }", "@Override\n\t@FXML\n\tpublic boolean validate() {\n\t\t\n\t\tboolean isDataEntered = true;\n\t\tLocalDate startDate = Database.getInstance().getStartingDate();\n\t\tSystem.out.println();\n\t\tif(amountField.getText() == null || amountField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the amount field empty.\");\n\t\telse if(!(Validation.validateAmount(amountField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please enter a valid amount\");\n\t\telse if(creditTextField.getText() == null || creditTextField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the credit text field empty.\");\n\t\telse if(!(Validation.validateChars(creditTextField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please only enter valid characters\");\n\t\telse if(dateField.getValue() == null) {\n\t\t\tisDataEntered = setErrorTxt(\"You left the date field empty.\");\t\t\t\n\t\t}\n\t\telse if(dateField.getValue().isBefore(startDate))\n\t\t\tisDataEntered = setErrorTxt(\"Sorry, the date you entered is before the starting date.\");\n\t\treturn isDataEntered;\n\t}", "public List<ValidationError> validate() {\n\n List<ValidationError> errors = new ArrayList<>();\n\n // isActive\n if (this.isActive != null && !this.isActive.equals(\"\") && this.getIsActiveAsBoolean() == null) {\n errors.add(new ValidationError(\"isActive\", \"isActive is not correctly formated, should be a true or false\"));\n }\n\n // actorTypeRefId\n if (this.actorTypeRefId != null && !this.actorTypeRefId.equals(\"\") && this.getActorType() == null) {\n errors.add(new ValidationError(\"actorTypeRefId\", String.format(\"ActorType %s does not exist\", this.actorTypeRefId)));\n }\n\n // login\n if (this.login != null && !this.login.equals(\"\")) {\n Actor testActor = ActorDao.getActorByUid(this.login);\n if (testActor != null) {\n Actor actor = ActorDao.getActorByRefId(this.refId);\n if (actor != null) { // edit\n if (!testActor.id.equals(actor.id)) {\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n } else { // create\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n }\n }\n\n return errors.isEmpty() ? null : errors;\n }", "boolean checkValidity();", "public boolean isValid() {\r\n/* */ try {\r\n/* 326 */ validate();\r\n/* 327 */ } catch (ValidationException vex) {\r\n/* 328 */ return false;\r\n/* */ } \r\n/* 330 */ return true;\r\n/* */ }", "public boolean validate()\n {\n EditText walletName = findViewById(R.id.walletName);\n String walletNameString = walletName.getText().toString();\n\n EditText walletBalance = findViewById(R.id.walletBalance);\n String walletBalanceString = walletBalance.getText().toString();\n\n if (TextUtils.isEmpty(walletNameString))\n {\n walletName.setError(\"This field cannot be empty\");\n\n return false;\n }\n else if (TextUtils.isEmpty(walletBalanceString))\n {\n walletBalance.setError(\"This field cannot be empty\");\n\n return false;\n }\n else\n {\n return true;\n }\n }", "@Test\n public void testValidateShouldNotThrowExceptionWhenNeitherOfTheValidatorsThrowException() throws MapValidationException {\n underTest.validate(MAP_VO);\n\n // then\n verify(validator1).validate(MAP_VO);\n verify(validator2).validate(MAP_VO);\n }", "private boolean validateInput() {\n String username = editUsername.getText().toString().trim();\n String email = editEmail.getText().toString().trim();\n String password = editPassword.getText().toString().trim();\n String repeatPassword = editRepeatPassword.getText().toString().trim();\n if (!password.equals(repeatPassword)) {\n ShowMessageUtil.tosatSlow(\"Enter passwords differ\", EmailRegisterActivity.this);\n return false;\n } else if (username.equals(\"\") || email.equals(\"\") || password.equals(\"\")) {\n ShowMessageUtil.tosatSlow(\"every item can not be empty!\", EmailRegisterActivity.this);\n return false;\n }\n if (username.length()>10){\n ShowMessageUtil.tosatSlow(\"the character length of the username can't be over than 10\", EmailRegisterActivity.this);\n return false;\n }\n return true;\n }", "private boolean checkInputFields(){\r\n\t\tString allertMsg = \"Invalid input: \" + System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MCSTf.getText());\r\n\t\t\tif(testValue < 0 || testValue > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a MCS score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for relevance score weight and coherence score weight text fields\r\n\t\ttry{\r\n\t\t\tFloat relScoreW = Float.parseFloat(m_RelScoreTf.getText());\r\n\t\t\tFloat cohScoreW = Float.parseFloat(m_CohScoreTf.getText());\r\n\t\t\tif(relScoreW < 0 || relScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif(cohScoreW < 0 || cohScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif((relScoreW + cohScoreW) != 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a weight for relevance and coherence score.\" + System.getProperty(\"line.separator\");\r\n\t\t\tallertMsg += \"Sum of the weights for relevance and coherence score must be 1.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_KeyTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as multiplier for keyword concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for category confidence weight\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_CatConfTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for the weight of the category confidence of concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for weight of repeated concepts\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_RepeatTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for repeated concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for number of output categories\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MaxCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the maximum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MinCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the minimum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MinCatScoreTf.getText());\r\n\t\t\tif(testValue < 0.0f || testValue > 1.0f)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number between 0 and 1 as minimum category score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\tif(allertMsg.length() > 18){\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setContentText(allertMsg);\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (ServiceName.getText() == null || ServiceName.getText().length() == 0) {\n errorMessage += \"No valid name!\\n\";\n }\n if (Serviceemail.getText() == null || Serviceemail.getText().length() == 0) {\n Pattern p = Pattern.compile(\"[_A-Za-z0-9][A-Za-z0-9._]*?@[_A-Za-z0-9]+([.][_A-Za-z]+)+\");\n Matcher m = p.matcher(Serviceemail.getText());\n if (m.find() && m.group().equals(Serviceemail.getText())) {\n errorMessage += \"No valid Mail Forment!\\n\";\n }\n }\n if (servicedescrip.getText() == null || servicedescrip.getText().length() == 0) {\n errorMessage += \"No valid description !\\n\";\n }\n if (f == null && s.getImage() == null) {\n errorMessage += \"No valid photo ( please upload a photo !)\\n\";\n }\n if (Serviceprice.getText() == null || Serviceprice.getText().length() == 0) {\n errorMessage += \"No valid prix !\\n\";\n } else {\n // try to parse the postal code into an int.\n try {\n Float.parseFloat(Serviceprice.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid prix (must be a Float)!\\n\";\n }\n }\n if ( !Weekly.isSelected() && !Daily.isSelected() && !Monthly.isSelected()) {\n errorMessage += \"No valid Etat ( select an item !)\\n\";\n }\n if (Servicesatet.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid etat ( select an item !)\\n\";\n }\n if (ServiceCity.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid City ( select an item !)\\n\";\n }\n if (servicetype.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid Type ( select an item !)\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n alert.showAndWait();\n return false;\n }\n }", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "private boolean validate() {\n if (category.equals(\"n/a\")) {\n AppUtils.displayToast(mContext, \"Please select category!!!\");\n return false;\n } else if (category.equals(AppUtils.CREATE_CATEGORY) && mCustomCategory.getText().toString().length() == 0) {\n AppUtils.displayToast(mContext, \"Please enter custom category name!!!\");\n return false;\n } else if (mTaskTile.getText().toString().length() == 0) {\n AppUtils.displayToast(mContext, \"Please enter task Title!!!\");\n return false;\n } else if (dueDate == 0) {\n AppUtils.displayToast(mContext, \"Please enter due date!!\");\n return false;\n } else if (mTaskContent.getText().toString().length() == 0) {\n AppUtils.displayToast(mContext, \"Please enter task content!!!\");\n return false;\n } else\n return true;\n\n\n }", "public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}", "public boolean validate() throws edu.mit.coeus.exception.CoeusUIException {\r\n boolean validate = true;\r\n if( !instRateClassTypesController.validate() || \r\n !instituteRatesController.validate() ){\r\n validate = false;\r\n }\r\n return validate;\r\n }", "private void checkEditTexts() {\n\n if (!validateEmail(Objects.requireNonNull(edInputEmail.getText()).toString().trim())) {\n Toasty.error(Objects.requireNonNull(getActivity()), getString(R.string.error_invalid_email), Toasty.LENGTH_SHORT, true).show();\n } else {\n\n if (Objects.requireNonNull(edInputPass.getText()).toString().trim().equalsIgnoreCase(\"\")) {\n\n Toasty.error(Objects.requireNonNull(getActivity()), getString(R.string.error_empty_password), Toasty.LENGTH_SHORT, true).show();\n\n } else {\n sendLoginRequest(edInputEmail.getText().toString(), edInputPass.getText().toString());\n CustomProgressBar.showProgress(loadingLayout);\n }\n }\n }", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "private boolean checkValidity() {\n if(txtSupplierCode.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Code!!\", \"EMPTY SUPPLIER CODE\", JOptionPane.ERROR_MESSAGE);\n txtSupplierCode.setBackground(Color.RED);\n return false;\n }\n if(txtSupplierName.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Name!!\", \"EMPTY SUPPLIER NAME\", JOptionPane.ERROR_MESSAGE);\n txtSupplierName.setBackground(Color.RED);\n return false;\n }\n return true;\n }", "public boolean isValidPart() {\n boolean result = false;\n boolean isComplete = !partPrice.getText().equals(\"\")\n && !partName.getText().equals(\"\")\n && !inventoryCount.getText().equals(\"\")\n && !partId.getText().equals(\"\")\n && !maximumInventory.getText().equals(\"\")\n && !minimumInventory.getText().equals(\"\")\n && !variableTextField.getText().equals(\"\");\n boolean isValidPrice = isDoubleValid(partPrice);\n boolean isValidName = isCSVTextValid(partName);\n boolean isValidId = isIntegerValid(partId);\n boolean isValidMax = isIntegerValid(maximumInventory);\n boolean isValidMin = isIntegerValid(minimumInventory);\n boolean isMinLessThanMax = false;\n if (isComplete)\n isMinLessThanMax = Integer.parseInt(maximumInventory.getText()) > Integer.parseInt(minimumInventory.getText());\n\n if (!isComplete) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Missing Information\");\n errorMessage.setHeaderText(\"You didn't enter required information!\");\n errorMessage.setContentText(\"All fields are required! Your part has not been saved. Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isMinLessThanMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Entry\");\n errorMessage.setHeaderText(\"Min must be less than Max!\");\n errorMessage.setContentText(\"Re-enter your data! Your part has not been saved.Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isValidPrice) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Price is not valid\");\n errorMessage.setHeaderText(\"The value you entered for price is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered does\" +\n \" not include more than one decimal point (.), does not contain any letters, and does not \" +\n \"have more than two digits after the decimal. \");\n errorMessage.show();\n } else if (!isValidName) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Name\");\n errorMessage.setHeaderText(\"The value you entered for name is not valid.\");\n errorMessage.setContentText(\"Please ensure that the text you enter does not\" +\n \" include any quotation marks,\" +\n \"(\\\"), or commas (,).\");\n errorMessage.show();\n } else if (!isValidId) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect ID\");\n errorMessage.setHeaderText(\"The value you entered for ID is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Max Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Max is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMin) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Min Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Min is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else {\n result = true;\n }\n\n return result;\n }", "boolean checkValidity(int side1, int side2, int side3);", "private boolean validateInput(){\n boolean operationOK = true;\n //perform input validation on the double values in the form\n String integrationTime = this.integrationTimeText.getText();\n String integrationFrequency = this.integrationFrequencyText.getText();\n \n if(!integrationTime.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationTime);\n integrationTimeText.setBackground(Color.WHITE);\n integrationTimeText.setToolTipText(\"Time in seconds (s)\");\n } catch (NumberFormatException ex) {\n integrationTimeText.setBackground(Color.RED);\n operationOK=false;\n integrationTimeText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(!integrationFrequency.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationFrequency);\n integrationFrequencyText.setBackground(Color.WHITE);\n integrationFrequencyText.setToolTipText(\"Frequency in Hertz (Hz)\");\n \n } catch (NumberFormatException ex) {\n operationOK=false;\n integrationFrequencyText.setBackground(Color.RED);\n integrationFrequencyText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(currentStepOperationsPanel!=null){\n operationOK = this.currentStepOperationsPanel.validateInput();\n \n }\n return operationOK;\n }", "private boolean isFormValid(AdminAddEditUserDTO dto)\r\n\t{\n\t\tSOWError error;\r\n\t\tList<IError> errors = new ArrayList<IError>();\t\t\r\n\t\t\r\n\t\t// First Name\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getFirstName()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_First_Name\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_First_Name_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\r\n\t\t}\r\n\t\t// Last Name\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getLastName()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_Last_Name\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Last_Name_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\r\n\t\t}\r\n\t\t\r\n\t\t// User Name\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getUsername()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_User_Name\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_User_Name_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\r\n\t\t\t//User Name Length Check\r\n\t\t\tif((dto.getUsername().length() < 8) || (dto.getUsername().length() >30)){\r\n\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_User_Name\"),getTheResourceBundle().getString(\"Admin_User_Name_Length_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\t\terrors.add(error);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString jobRole = getParameter(\"jobRole\");\r\n\t\tif(\"-1\".equals(jobRole))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_Job_Role\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Job_Role_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Handle Primary Email\r\n\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isNullOrEmpty(dto.getEmail()))\r\n\t\t{\r\n\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_Email\"),\r\n\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Email_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(com.newco.marketplace.web.utils.SLStringUtils.isEmailValid(dto.getEmail()) == false)\r\n\t\t\t{\r\n\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_PrimaryEmail\"),\r\n\t\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Email_Pattern_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(dto.getEmail().equals(dto.getEmailConfirm()) == false)\r\n\t\t\t{\r\n\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_PrimaryEmail\"),\r\n\t\t\t\t\t\tgetTheResourceBundle().getString(\"Admin_Email_Confirm_Validation_Msg\"), OrderConstants.FM_ERROR);\r\n\t\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check for existing username, only in Add mode\r\n\t\tString mode = (String)getSession().getAttribute(\"addEditUserMode\");\r\n\t\tif(mode != null)\r\n\t\t{\r\n\t\t\tif(mode.equals(\"add\"))\r\n\t\t\t{\r\n\t\t\t\tif(manageUsersDelegate.getAdminUser(dto.getUsername()) != null || manageUsersDelegate.getBuyerUser(dto.getUsername()) != null)\r\n\t\t\t\t{\r\n\t\t\t\t\terror = new SOWError(getTheResourceBundle().getString(\"Admin_User_Name\"), getTheResourceBundle().getString(\"Admin_Existing_User_Validation_Msg1\")+\" \" + dto.getUsername() +\" \" +getTheResourceBundle().getString(\"Admin_Existing_User_Validation_Msg2\"), OrderConstants.FM_ERROR);\r\n\t\t\t\t\terrors.add(error);\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// If we have errors, put them in request.\r\n\t\tif(errors.size() > 0)\r\n\t\t{\r\n\t\t\tsetAttribute(\"errors\", errors);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgetSession().removeAttribute(\"addEditUserMode\");\r\n\t\t\tgetSession().removeAttribute(\"originalUsername\");\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "public boolean validateData(){\n boolean dataOk=true;\n if (etName.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Name field is void.\");\n dataOk=false;\n }\n if (etSurname.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Surname field is void.\");\n dataOk=false;\n }\n if (etDescription.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Description field is void.\");\n dataOk=false;\n }\n return dataOk;\n }", "private boolean checkValidation() {\n boolean result = true;\n\n if(!Validate.isEmailAddress(editTextLogin, true)){\n result = false;\n }\n if(!Validate.isPassword(editTextPassword, true)) {\n result = false;\n }\n\n return result;\n }", "private boolean isInputValid() {\n return true;\n }", "public boolean validateInput(boolean showMessage) {\n\n boolean valid = true;\n\n valid = GuiUtilities.validateIntegerInput(this, peptideLengthLabel, minPepLengthTxt, \"minimum peptide length\", \"Peptide Length Error\", true, showMessage, valid);\n valid = GuiUtilities.validateIntegerInput(this, peptideLengthLabel, maxPepLengthTxt, \"minimum peptide length\", \"Peptide Length Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, precursorMassLabel, minPrecursorMassTxt, \"minimum precursor mass\", \"Precursor Mass Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, precursorMassLabel, maxPrecursorMassTxt, \"maximum precursor mass\", \"Precursor Mass Error\", true, showMessage, valid);\n\n if (!minPtmsPerPeptideTxt.getText().trim().isEmpty()) {\n valid = GuiUtilities.validateIntegerInput(this, variablePtmsPerPeptideLabel, minPtmsPerPeptideTxt, \"minimum number of variable PTMs\", \"Variable PTMs Error\", true, showMessage, valid);\n }\n \n if (!maxPtmsPerPeptideTxt.getText().trim().isEmpty()) {\n valid = GuiUtilities.validateIntegerInput(this, variablePtmsPerPeptideLabel, maxPtmsPerPeptideTxt, \"maximum number of variable PTMs\", \"Variable PTMs Error\", true, showMessage, valid);\n }\n\n valid = GuiUtilities.validateIntegerInput(this, maxVariablePtmsPerTypeLabel, maxVariablePtmsPerTypeTxt, \"maximum number of variable PTMs per type\", \"Variable PTMs Error\", true, showMessage, valid);\n valid = GuiUtilities.validateIntegerInput(this, decoySeedLabel, decoySeedTxt, \"decoy seed\", \"Decoy Seed Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, spectrumMzLabel, minSpectrumMzTxt, \"minimum spectrum mz\", \"Spectrum Mz Error\", true, showMessage, valid);\n if (!maxSpectrumMzTxt.getText().trim().isEmpty()) {\n valid = GuiUtilities.validateDoubleInput(this, spectrumMzLabel, maxSpectrumMzTxt, \"maximum spectrum mz\", \"Spectrum Mz Error\", true, showMessage, valid);\n }\n valid = GuiUtilities.validateIntegerInput(this, minPeaksLbl, minPeaksTxt, \"minimum number of peaks\", \"Spectrum Peaks Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, removePrecursorPeakLabel, removePrecursorPeakToleranceTxt, \"remove precursor peak tolerance\", \"Precursor Peak Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, mzBinWidthLabel, mzBinWidthTxt, \"mz bin width\", \"Mz Bin Width Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, mzBinOffsetLabel, mzBinOffsetTxt, \"mz bin offset\", \"Mz Bin Offset Error\", true, showMessage, valid);\n valid = GuiUtilities.validateIntegerInput(this, numberMatchesLabel, numberMatchesTxt, \"number of spectrum matches\", \"Number of Spectrum Matches Error\", true, showMessage, valid);\n\n // peptide length: the low value should be lower than the high value\n try {\n double lowValue = Double.parseDouble(minPepLengthTxt.getText().trim());\n double highValue = Double.parseDouble(maxPepLengthTxt.getText().trim());\n\n if (lowValue > highValue) {\n if (showMessage && valid) {\n JOptionPane.showMessageDialog(this, \"The lower range value has to be smaller than the upper range value.\",\n \"Peptide Length Error\", JOptionPane.WARNING_MESSAGE);\n }\n valid = false;\n peptideLengthLabel.setForeground(Color.RED);\n peptideLengthLabel.setToolTipText(\"Please select a valid range (upper <= higher)\");\n }\n } catch (NumberFormatException e) {\n // ignore, handled above\n }\n\n // precursor mass range: the low value should be lower than the high value\n try {\n double lowValue = Double.parseDouble(minPrecursorMassTxt.getText().trim());\n double highValue = Double.parseDouble(maxPrecursorMassTxt.getText().trim());\n\n if (lowValue > highValue) {\n if (showMessage && valid) {\n JOptionPane.showMessageDialog(this, \"The lower range value has to be smaller than the upper range value.\",\n \"Precursor Mass Range Error\", JOptionPane.WARNING_MESSAGE);\n }\n valid = false;\n precursorMassLabel.setForeground(Color.RED);\n precursorMassLabel.setToolTipText(\"Please select a valid range (upper <= higher)\");\n }\n } catch (NumberFormatException e) {\n // ignore, handled above\n }\n\n // spectrum mz range: the low value should be lower than the high value\n try {\n double lowValue = Double.parseDouble(minSpectrumMzTxt.getText().trim());\n double highValue = Double.parseDouble(maxSpectrumMzTxt.getText().trim());\n\n if (lowValue > highValue) {\n if (showMessage && valid) {\n JOptionPane.showMessageDialog(this, \"The lower range value has to be smaller than the upper range value.\",\n \"Spectrum Mz Range Error\", JOptionPane.WARNING_MESSAGE);\n }\n valid = false;\n spectrumMzLabel.setForeground(Color.RED);\n spectrumMzLabel.setToolTipText(\"Please select a valid range (upper <= higher)\");\n }\n } catch (NumberFormatException e) {\n // ignore, handled above\n }\n\n okButton.setEnabled(valid);\n return valid;\n }", "public void validateMailAlerts() {\n System.out.println(\"Validating Mail Alerts\");\n boolean mailPasstoCheck = false, mailPassccCheck = false, mailFailtoCheck = false, mailFailccCheck = false;\n\n if (!mailpassto.getText().isEmpty()) {\n\n String[] emailAdd = mailpassto.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailPasstoCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n\n } else {\n execptionData.append((++exceptionCount) + \". To Email address for passed test cases should not be empty.\\n\");\n\n }\n if (!mailpasscc.getText().isEmpty()) {\n String[] emailAdd = mailpasscc.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailPassccCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n\n } else {\n execptionData.append((++exceptionCount) + \". CC Email address for passed test cases should not be empty.\\n\");\n\n }\n if (!mailfailto.getText().isEmpty()) {\n String[] emailAdd = mailfailto.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailFailtoCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n\n } else {\n execptionData.append((++exceptionCount) + \". To Email address for failed test cases should not be empty.\\n\");\n\n }\n if (!mailfailcc.getText().isEmpty()) {\n String[] emailAdd = mailfailcc.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailFailccCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n } else {\n execptionData.append((++exceptionCount) + \".CC Email address for failed test cases should not be empty.\\n\");\n\n }\n\n if (mailPasstoCheck == true && mailPassccCheck == true && mailFailccCheck == true && mailFailtoCheck == true) {\n /*try {\n Properties connectionProperties = new Properties();\n String socketFactory_class = \"javax.net.ssl.SSLSocketFactory\"; //SSL Factory Class\n String mail_smtp_auth = \"true\";\n connectionProperties.put(\"mail.smtp.port\", port);\n connectionProperties.put(\"mail.smtp.socketFactory.port\", socketProperty);\n connectionProperties.put(\"mail.smtp.host\", hostSmtp.getText());\n connectionProperties.put(\"mail.smtp.socketFactory.class\", socketFactory_class);\n connectionProperties.put(\"mail.smtp.auth\", mail_smtp_auth);\n connectionProperties.put(\"mail.smtp.socketFactory.fallback\", \"false\");\n connectionProperties.put(\"mail.smtp.starttls.enable\", \"true\");\n Mail mail = new Mail(\"\");\n mail.createSession(fromMail.getText(), password.getText(), connectionProperties);\n mail.sendEmail(fromMail.getText(), mailpassto.getText(), mailpasscc.getText(), \"Test Mail from FACT\", \"Hi, This is the Test Mail for the FACT Tool\", \"\");\n mail.sendEmail(fromMail.getText(), mailfailto.getText(), mailfailcc.getText(), \"Test Mail from FACT\", \"Hi, This is the Test Mail for the FACT Tool\", \"\");*/\n mailAlertsCheck = true;\n /* } catch (IOException ex) {\n Logger.getLogger(ConfigFile.class.getName()).log(Level.SEVERE, null, ex);\n mailAlertsCheck = false;\n new ExceptionUI(ex);\n } catch (MessagingException ex) {\n Logger.getLogger(ConfigFile.class.getName()).log(Level.SEVERE, null, ex);\n mailAlertsCheck = false;\n new ExceptionUI(ex);\n }*/\n } else {\n mailAlertsCheck = false;\n mailPasstoCheck = false;\n mailPassccCheck = false;\n mailFailtoCheck = false;\n mailFailccCheck = false;\n }\n\n }", "@Test\n public void testAndConjunctionInvalidValidations() {\n final String anotherMessage = \"This is also invalid\";\n Validation<Pv> anotherInvalid = (pv) -> Result.failure(anotherMessage);\n\n Validation<Pv> conjunction = anotherInvalid.and(invalidResult);\n Result<Pv, String> result = conjunction.validate(new Pv());\n\n assertThat(result.isFailure(), is(true));\n assertThat(result.failure().get(), is(anotherMessage));\n }", "public boolean inputIsValid() {\n return nameIsValid() &&\n descriptionIsValid() &&\n priceIsValid() &&\n streetIsValid() &&\n zipcodeIsValid() &&\n cityIsValid() &&\n imageIsSelected();\n }", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }" ]
[ "0.6850894", "0.67595834", "0.6730557", "0.6675574", "0.66226524", "0.65737927", "0.65683496", "0.6507772", "0.6436", "0.6417745", "0.64097553", "0.6389561", "0.6336553", "0.6317164", "0.6313198", "0.6301962", "0.6298249", "0.62804896", "0.6270512", "0.6257546", "0.6254563", "0.6236868", "0.62360716", "0.62349296", "0.62227315", "0.62046576", "0.61990047", "0.6184196", "0.61830044", "0.618143", "0.6180358", "0.6178062", "0.61710167", "0.61647433", "0.6156089", "0.6154055", "0.61510426", "0.61430043", "0.6127474", "0.6123644", "0.6123169", "0.6110202", "0.6094175", "0.60827875", "0.6066687", "0.60658324", "0.60583824", "0.604658", "0.6043641", "0.6043641", "0.60387266", "0.60277605", "0.6023375", "0.60204345", "0.60191214", "0.60030764", "0.59929496", "0.59848017", "0.5980176", "0.5977572", "0.59768665", "0.5976674", "0.5965878", "0.59608614", "0.59605587", "0.5953042", "0.59376436", "0.5933981", "0.5928635", "0.59272856", "0.59268963", "0.5926793", "0.5914663", "0.5908848", "0.5902459", "0.59006834", "0.5899308", "0.5896614", "0.5895504", "0.5893438", "0.58816683", "0.5878979", "0.5877878", "0.58734125", "0.58718854", "0.5871085", "0.5869044", "0.5850041", "0.58498627", "0.58476406", "0.58449763", "0.5842677", "0.58414316", "0.5837602", "0.5837312", "0.5834102", "0.5824485", "0.58244807", "0.58232343", "0.5814157", "0.58083177" ]
0.0
-1
To change body of implemented methods use File | Settings | File Templates.
@Override public void handle(KeyEvent keyEvent) { if(keyEvent.getCode() == KeyCode.ENTER){ ChatPane2 chatPanel=mainMenuGUI.getChatPane(); Message mess=new Message(mainMenuGUI.getFacade().getClientAccount(), null,chatPanel.getChatMessage()); mess.setStatus(MessageStatus.broadcast); chatPanel.addChatMessage(mainMenuGUI.getFacade().getUsername(),chatPanel.getChatMessage()); com.write(mess); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void doYouWantTo() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void dosomething2() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "public Methods() {\n // what is this doing? -PMC\n }", "public void myPublicMethod() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\r\n\tpublic void method1() {\n\t}", "@Override\n\tpublic void alterar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void method() {\n\t\tSystem.out.println(\"这是第三个实现\");\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo97908d() {\n }", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "public void mo21825b() {\n }", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "@Override\n\tpublic void yürü() {\n\n\t}", "public void method_202() {}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "@Override\r\n public void salir() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo21793R() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public void mo55254a() {\n }", "public void foo() {\r\n\t}", "@Override\n\tpublic void e() {\n\n\t}", "public void method(){}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void update() {\n }", "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void modify() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\n\tpublic void name1() {\n\t\t\n\t}", "@Override\n public void feedingHerb() {\n\n }", "public void mo4359a() {\n }", "@Override\n public void author()\n {\n }", "public void m23075a() {\n }", "public void mo21779D() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public void mo21792Q() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }" ]
[ "0.7433265", "0.73881614", "0.737956", "0.73416275", "0.73358285", "0.7327191", "0.73041445", "0.73041445", "0.728817", "0.72624195", "0.72232515", "0.72232515", "0.71848667", "0.7173255", "0.7117004", "0.71078736", "0.70787567", "0.7042354", "0.700999", "0.69963306", "0.69877833", "0.69736576", "0.6932906", "0.69079113", "0.68874717", "0.6872777", "0.68619764", "0.68604213", "0.6849729", "0.68436456", "0.6834805", "0.68060255", "0.68050987", "0.679693", "0.6795846", "0.6789561", "0.6782894", "0.67426443", "0.6709693", "0.6704689", "0.66905916", "0.66721267", "0.6666629", "0.664351", "0.6639996", "0.6635252", "0.66341203", "0.66311187", "0.66284466", "0.6623385", "0.66177875", "0.66170686", "0.66089123", "0.66089123", "0.6608807", "0.6602176", "0.6589286", "0.6589286", "0.65871245", "0.6585296", "0.65824217", "0.6580671", "0.6580191", "0.6571605", "0.6551241", "0.6551228", "0.6547592", "0.6546435", "0.65424585", "0.6531856", "0.65275514", "0.65261924", "0.65261924", "0.65261924", "0.6523683", "0.6516309", "0.6514345", "0.6512395", "0.6512246", "0.65120393", "0.6511224", "0.6509905", "0.65078866", "0.65015584", "0.6497149", "0.6494468", "0.6493289", "0.6492382", "0.6488524", "0.64859843", "0.6484986", "0.6478336", "0.6473847", "0.6473692", "0.64628464", "0.64602673", "0.6455774", "0.6453419", "0.6453419", "0.6453419", "0.6453419" ]
0.0
-1
return DataBindingUtil.inflate(inflater, R.layout.fragment_wallet, container, false).getRoot();
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_asset_history, container, false); ButterKnife.bind(this, view); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater, R.layout.fragment_add_address, container, false);\n root = binding.getRoot();\n\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n fragmentBnfBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_bnf, container, false);\n //return inflater.inflate(R.layout.fragment_bnf, container, false);\n return fragmentBnfBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater, R.layout.fragment_table_my_cart, container, false);\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater,R.layout.fragment_goods, container, false);\n id = (String)getActivity().getIntent().getExtras().get(\"id\");\n initView();\n initData();\n\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n fragmentUpdateAppBottomBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_update_app_bottom, container, false);\n return fragmentUpdateAppBottomBinding.getRoot(); }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentUserPaymentBinding.inflate(getLayoutInflater());\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater,R.layout.fragment_home,container,false);\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n myBinding = FragmentResetBinding.inflate(inflater);\n return myBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater,R.layout.fragment_translate,container,false);\n rootView = binding.getRoot();\n rootContext = binding.getRoot().getContext();\n bindingValue();\n initView();\n initValue();\n return rootView;\n }", "public WalletFragment(){}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater, R.layout.fragment_add_prescription, container, false);\n context = container.getContext();\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootview =inflater.inflate(R.layout.fragment_my_account, container, false);\n personImg = (ImageView)rootview. findViewById(R.id.person_img);\n persontxt = (TextView) rootview.findViewById(R.id.personName);\n personNum = (TextView) rootview.findViewById(R.id.telephoneNum);\n personEmail = (TextView) rootview.findViewById(R.id.emailtxt);\n accountEdit = (Button) rootview.findViewById(R.id.accountedit);\n changeLang = (Button) rootview.findViewById(R.id.changelang);\n signout = (Button) rootview.findViewById(R.id.signout);\n getData();\n\n return rootview;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater, R.layout.fragment_selectde_file, container, false);\n\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = FragmentEditBookBinding.inflate(inflater, container, false);\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater,\n R.layout.fragment_register_step_one,\n container,\n false);\n this.bindData().bindView().bindEvent();\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentRegisterBinding.inflate(inflater, container, false);\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_account, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_transactions, container, false);\n ButterKnife.bind(this,view);\n userPreferences = new UserPreferences(getContext());\n init();\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return (binding = FragmentMiCuentaEmailBinding.inflate(inflater, container, false)).getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n DashboardFragBinding binding = DataBindingUtil.inflate(inflater, R.layout.dashboard_frag, container, false);\n\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_transaction, container, false);\n\n rv_trans = v.findViewById(R.id.frag_trans);\n list = new ArrayList<>();\n dashboardTransAdapter = new DashboardTransAdapter(list);\n rv_trans.setLayoutManager(new LinearLayoutManager(getContext()));\n rv_trans.setAdapter(dashboardTransAdapter);\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater,\n R.layout.fragment_register_step_five,\n container,\n false);\n this.bindData().bindView().bindEvent();\n return mBinding.getRoot();\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_my_account, container, false);\r\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container , savedInstanceState);\n View rootView = inflater.inflate(R.layout.fragment_info_, container, false);\n //return inflater.inflate(R.layout.fragment_info_, container, false);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_data_visible, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n viewDataBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_content,container,false);\n httpUtils = HttpUtils.getHttpUtils();\n myAdapter = new MyAdapter(ctx);\n viewDataBinding.setAdapter(myAdapter);\n\n return viewDataBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_link_bluetooth_device, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_registration, container, false);\n unbinder = ButterKnife.bind(this, view);\n sb=new StringBuilder();\n btnNext.setOnClickListener(this);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bit, container, false);\n ButterKnife.bind(this, view);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_employee_adress_detail, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_account, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_market, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_add_student_records, container, false);\n ButterKnife.bind(this, v);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mRootView = inflater.inflate(R.layout.fragment_plans, container, false);\n ButterKnife.bind(this, mRootView);\n return mRootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View RootView = inflater.inflate(R.layout.fragment_vendor_bank_detail, container, false);\n\n bank_NameTxt = RootView.findViewById(R.id.bank_NameTxt);\n bank_accountNumTxt = RootView.findViewById(R.id.bank_accountNumTxt);\n bank_IfscTxt = RootView.findViewById(R.id.bank_IfscTxt);\n bank_Submit = RootView.findViewById(R.id.bank_Submit);\n\n bank_NameTxt.setText(bankName);\n bank_accountNumTxt.setText(accountNum);\n bank_IfscTxt.setText(ifsc);\n\n bank_Submit.setOnClickListener(this);\n\n return RootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_wallet, null, false);\n provider = new PreferenceProvider(getActivity());\n alertDialog = CommonAlertDialog.CreateDialog(getActivity(), getString(R.string.please_wait));\n\n other = v.findViewById(R.id.other);\n other.setOnClickListener(this);\n addMoneyTv = v.findViewById(R.id.addMoneyTv);\n addMoneyTv.setOnClickListener(this);\n rs_100 = v.findViewById(R.id.rs_100);\n rs_100.setOnClickListener(this);\n rs_200 = v.findViewById(R.id.rs_200);\n rs_200.setOnClickListener(this);\n rs_500 = v.findViewById(R.id.rs_500);\n rs_500.setOnClickListener(this);\n rs_1000 = v.findViewById(R.id.rs_1000);\n rs_1000.setOnClickListener(this);\n CurrentBalance = v.findViewById(R.id.CurrentBalance);\n rs_100.setText(String.format(getString(R.string.rs100), 100));\n rs_200.setText(String.format(getString(R.string.rs100), 200));\n rs_500.setText(String.format(getString(R.string.rs100), 500));\n rs_1000.setText(String.format(getString(R.string.rs100), 1000));\n\n int currentBalance = Integer.parseInt(\"122\");\n CurrentBalance.setText(String.format(getString(R.string.rs100),currentBalance));\n\n return v;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n intialFragment();\n // return inflater.inflate(R.layout.fragment_old_ordered, container, false);\n oldOrderedBinding = DataBindingUtil.inflate(\n inflater, R.layout.fragment_orederd_recycler, container, false);\n View view = oldOrderedBinding.getRoot();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_personal_infomation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_buy, container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_zestmoney, container, false);\n setUpUI(view);\n mPaymentParams = getArguments().getParcelable(PayuConstants.KEY);\n payuConfig = getArguments().getParcelable(PayuConstants.PAYU_CONFIG);\n salt = getArguments().getString(PayuConstants.SALT);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n daftarJadwalDokterBinding = FragmentDaftarJadwalDokterBinding.inflate(inflater, container, false);\n View v = daftarJadwalDokterBinding.getRoot();\n daftarJadwalDokterBinding.btnDaftarDokter.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n daftarDokter();\n }\n });\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bank_detail, container, false);\n unbinder = ButterKnife.bind(this,view);\n DaoSession daoSession = ((PasswordKeeper) getActivity().getApplication()).getDaoSession();\n bankDetailsDao = daoSession.getBankDetailsDao();\n QueryBuilder<BankDetails> bankDetailsQueryBuilder = bankDetailsDao.queryBuilder()\n .where(BankDetailsDao.Properties.Id.eq(bankId));\n bankDetails = bankDetailsQueryBuilder.unique();\n if(bankDetails.getTitle()!=null && bankDetails.getTitle().length()>0){\n bankTitle.setTitle(bankDetails.getTitle());\n }\n else{\n bankTitle.setTitle(\"NO TITLE\");\n }\n accountNo.setText(bankDetails.getAccountNo());\n bankName.setText(bankDetails.getBankName());\n ifscName.setText(\"IFSC : \"+bankDetails.getIfsc());\n branchName.setText(bankDetails.getBankBranch());\n if(bankDetails.getOnlineUsername()!=null && bankDetails.getOnlineUsername().length()>0){\n\n onlineLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1,R.layout.online_detail);\n showOnlineDetails(bankDetails.getOnlineUsername(),bankDetails.getOnlinePassword());\n }\n if(bankDetails.getCards()!=null && bankDetails.getCards().size()>0) {\n for (CardDetails cardDetails : bankDetails.getCards()) {\n if (viewStubCompat1.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat1, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat2.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat2, R.layout.cc_dc_detail);\n break;\n }\n } else if (viewStubCompat3.getLayoutResource() == 0) {\n switch (cardDetails.getCardType()) {\n case DEBIT:\n dcLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n case CREDIT:\n ccLayout = (LinearLayout) Utility.inflateViewtoStub(viewStubCompat3, R.layout.cc_dc_detail);\n break;\n }\n }\n showCCDCDetails(cardDetails);\n }\n }\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentAdsBinding.inflate(inflater);\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_address, container, false);\n ButterKnife.bind(this, view);\n adapter = new AddressAdapter(getActivity());\n list.setAdapter(adapter);\n update();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentComposeBinding.inflate(getLayoutInflater());\n View view = binding.getRoot();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n doctorProfileBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_doctor_profile, container, false);\n doctorsProfileViewModels = new CreateReservationsViewModels();\n doctorProfileBinding.setReserveViewModel(doctorsProfileViewModels);\n bundle = this.getArguments();\n if (bundle != null) {\n passingObject = bundle.getString(Params.BUNDLE);\n doctorsProfileViewModels.setPassingObject(new Gson().fromJson(passingObject, PassingObject.class));\n }\n liveDataListeners();\n checkConnection();\n return doctorProfileBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(@NotNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_markup_free_hand_polygon_edit, container, false);\n mMapView = container.getRootView().findViewById(R.id.map_container);\n resetListener();\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_product_warehouse, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_bluetooth_temperature, container, false);\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n\r\n View v = inflater.inflate(R.layout.fragment_donor_dash, container, false);\r\n\r\n\r\n\r\n return v;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_coin_info, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n final View netBankingFragment = inflater.inflate(R.layout.fragment_net_banking, container, false);\n\n pb = (ProgressBar) netBankingFragment.findViewById(R.id.pb);\n\n netBankingFragment.findViewById(R.id.nbPayButton).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final HashMap<String, Object> data = new HashMap<String, Object>();\n try {\n\n data.put(\"bankcode\", bankCode);\n data.put(\"key\", ((HomeActivity) getActivity()).getBankObject().getJSONObject(\"paymentOption\").getString(\"publicKey\").replaceAll(\"\\\\r\", \"\"));\n\n pb.setVisibility(View.VISIBLE);\n mCallback.goToPayment(\"NB\", data);\n // Session.getInstance(getActivity()).sendToPayUWithWallet(((HomeActivity)getActivity()).getBankObject(),\"NB\",data,getArguments().getDouble(\"cashback_amt\"),getArguments().getDouble(\"wallet\"));\n } catch (JSONException e) {\n pb.setVisibility(View.GONE);\n Toast.makeText(getActivity(), \"Something went wrong\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n }\n });\n /* netBankingFragment.findViewById(R.id.useNewCardButton).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n getActivity().getFragmentManager().popBackStack();\n }\n });*/\n\n return netBankingFragment;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ViewModelWithNavigation viewModelWithNavigation = new ViewModelProvider(requireActivity()).get(ViewModelWithNavigation.class);\n FragmentAddNumBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_add_num, container, false);\n binding.setMydata(viewModelWithNavigation);\n binding.setLifecycleOwner(requireActivity());\n\n binding.button17.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n NavController navController = Navigation.findNavController(view);\n navController.navigate(R.id.action_addNumFragment_to_deleteNumFragment);\n }\n });\n\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_librarian_account_manager, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n binding = ActivityEmployeeProfileBinding.inflate(getLayoutInflater(), container, false);\n\n View view = binding.getRoot();\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_bank_current_offers, container, false);\n recyclerView = (RecyclerView) view.findViewById(R.id.currentbankoffer_recycler_view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentMoreBinding.inflate(inflater, container, false);\n return binding.getRoot();\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater,R.layout.home_fragment,container,false);\n setEvents();\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_add_account, container, false);\n initView(inflate);\n return inflate;\n }", "protected LayoutInflater getInflater(){\n return getActivity().getLayoutInflater();\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_home, container, false);\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_restablecer_password, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mFragmentBasicSettingsBinding = FragmentBasicSettingsBinding.inflate(inflater,container,false);\n return mFragmentBasicSettingsBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_unidades, container, false);\n txtCoordinador = (TextView) rootView.findViewById(R.id.unidades_fragment_txtCoordinador);\n txtNombre1 = (TextView) rootView.findViewById(R.id.unidades_fragment_txtNombreCurso1);\n txtNombre2 = (TextView) rootView.findViewById(R.id.unidades_fragment_txtNombreCurso2);\n fab = (FloatingActionButton) rootView.findViewById(R.id.unidades_fragment_fab);\n recyclerView = (RecyclerView) rootView.findViewById(R.id.unidades_fragment_recycler);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_edit_day, container, false);\n ButterKnife.bind(this, view);\n\n if (mBinding == null) {\n mBinding = FragmentEditDayBinding.bind(view);\n }\n\n mViewModel = EditActivity.obtainViewModel(getActivity());\n mBinding.setViewmodel(mViewModel);\n\n setRetainInstance(false);\n\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentPinEditBinding.inflate(inflater, container, false);\n return binding.getRoot();\n }", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rent, container, false);\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_account, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_network, container, false);\n\n btnInsertar = (Button) rootView.findViewById(R.id.btnRegistrar);\n btnConsultar = (Button) rootView.findViewById(R.id.btnConsultar);\n edtName = (EditText) rootView.findViewById(R.id.edName);\n btnInsertar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String name=edtName.getText().toString().trim();\n insertDatabase(name);\n }\n });\n btnConsultar.setOnClickListener(this);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_sqlite, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_sign_in, container, false);\n mBinding.button3.setOnClickListener(this);\n mBinding.setUserVM(userViewModel);\n mBinding.getUserVM().setOnUserListener(this);\n mBinding.getUserVM().restoreUser();\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_password, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater, R.layout.fragment_favorite, container, false);\n return binding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_map_second, container, false);\n unbinder = ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = FragmentPinListBinding.inflate(inflater, container, false);\n return binding.getRoot();\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_amount, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\r\n\t\tView view = inflater.inflate(R.layout.frag_main_pak, container, false);\r\n\r\n\t\tinit(view);\r\n\t\t\r\n\t\t\r\n\t\treturn view;\r\n\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return root = inflater.inflate(R.layout.fragment_edit_employee, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n fragmentOrdreDetailBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_ordre_detail, container, false);\n detailViewModels = new OrderDetailViewModels();\n fragmentOrdreDetailBinding.setOrderViewModels(detailViewModels);\n mapFragment = (MapFragment) getActivity().getFragmentManager().findFragmentById(R.id.orderDetailmapFragment);\n client = LocationServices.getFusedLocationProviderClient(getActivity());\n mapFragment.getMapAsync(this);\n liveDataListeners();\n bundle = this.getArguments();\n return fragmentOrdreDetailBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_register_customer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ItemDetailBinding binding = DataBindingUtil.inflate(inflater,\n R.layout.fragment_entry_detail,\n container,\n false);\n TensionEntryVM tvm = new TensionEntryVM(new TensionEntryEntity(),\n ((App) getActivity().getApplication()).getDaoSession());\n binding.setVm(tvm);\n View view = binding.getRoot();\n ButterKnife.bind(this, view);\n return view;\n }", "public T getViewDataBinding() {\n return mViewDataBinding;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_buy, container, false);\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n username = SPUtils.getString(Const.USERNAME, \"\");\r\n View view = inflater.inflate(R.layout.fragment_me2, container, false);\r\n unbinder = ButterKnife.bind(this, view);\r\n return view;\r\n\r\n\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n context = getActivity().getApplicationContext();\n View inflaterview = inflater.inflate(R.layout.fragment_order_detail, container, false);\n collectName = (TextView)inflaterview.findViewById(R.id.txtResName);\n collectAddress = (TextView)inflaterview.findViewById(R.id.txtResAddress);\n collectPhone = (TextView)inflaterview.findViewById(R.id.txtResPhone);\n deliverAddress = (TextView)inflaterview.findViewById(R.id.txtDeliverAddress);\n deliverPhone = (TextView)inflaterview.findViewById(R.id.txtDeliverPhone);\n layItem = (LinearLayout)inflaterview.findViewById(R.id.layoutItem);\n btnRequest = (Button)inflaterview.findViewById(R.id.btnRequest);\n btnMap = (Button)inflaterview.findViewById(R.id.btnMap);\n txtordercode = (TextView)inflaterview.findViewById(R.id.txtOrderCode);\n txtdelicharge = (TextView)inflaterview.findViewById(R.id.txtDelivcharge);\n txttotalamount = (TextView)inflaterview.findViewById(R.id.txtTotalAmount);\n return inflaterview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t// TODO Auto-generated method stub\n\t\tTAG = \"MainAVirtualKeyFragment\";\n\t\tLog.d(TAG, \"onCreateView\");\n\t\tmRoot = inflater.inflate(R.layout.lower_main_a_virtualkey, null);\n\t\tInitResource();\n\t\tInitValuables();\n\t\tInitButtonListener();\n\n\t\treturn mRoot;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n fragmentAccountBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account, container, false);\n\n appPreference = AppPreference.getInstance(getContext());\n signInToken = appPreference.getString(SIGNIN_TOKEN);\n\n // if user is login\n if (signInToken.isEmpty()) {\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Login\");\n fragmentAccountBinding.tvUserName.setText(\"Login / Create account\");\n\n intent = new Intent(getContext(), RegistrationActivity.class);\n\n Glide.with(AppConstants.mContext)\n .load(R.drawable.placeholder_products)\n .into(fragmentAccountBinding.ivDisplayPicture);\n\n } else {\n\n userName = appPreference.getString(USER_NAME);\n userAvatar = appPreference.getString(USER_AVATAR);\n\n intent = new Intent(getContext(), OrderListingActivity.class);\n\n fragmentAccountBinding.tvUserName.setText(userName);\n String avatarImagePath = USER_STORAGE_BASE_URL.concat(userAvatar);\n\n fragmentAccountBinding.tvLoginLogout.setText(\"Logout\");\n\n Glide.with(AppConstants.mContext)\n .load(avatarImagePath)\n .placeholder(R.drawable.placeholder_products)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n .skipMemoryCache(true)\n .into(fragmentAccountBinding.ivDisplayPicture);\n }\n\n initListeners();\n\n return fragmentAccountBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_details_person, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_provinsi, container, false);\n }" ]
[ "0.67088574", "0.6649209", "0.65375334", "0.64892936", "0.648045", "0.64689153", "0.6395284", "0.63702065", "0.6333364", "0.63268083", "0.63214314", "0.63111657", "0.63037294", "0.6270131", "0.6266732", "0.6188344", "0.616828", "0.6163571", "0.6121994", "0.6118452", "0.6100148", "0.6100053", "0.6099793", "0.60802805", "0.6079628", "0.6043971", "0.6037514", "0.60181415", "0.6016311", "0.6014067", "0.59980965", "0.5976043", "0.5962822", "0.5953374", "0.5943698", "0.59422094", "0.59420174", "0.59399676", "0.59280413", "0.5926143", "0.5923289", "0.59202176", "0.591034", "0.5897459", "0.58947974", "0.588963", "0.58858705", "0.58819366", "0.58761656", "0.5863418", "0.5861327", "0.5853895", "0.58532286", "0.5840224", "0.5839963", "0.58296263", "0.5829441", "0.5827297", "0.5819061", "0.5818421", "0.5815843", "0.5814691", "0.58143383", "0.58119", "0.58077675", "0.58043236", "0.5803565", "0.58027893", "0.57992876", "0.5798702", "0.5797845", "0.57955855", "0.57897323", "0.57868963", "0.57851464", "0.5784128", "0.5780755", "0.57806486", "0.5772904", "0.57715183", "0.57630014", "0.57622874", "0.576183", "0.5756934", "0.57562864", "0.57532614", "0.5744094", "0.5743301", "0.5739886", "0.5739592", "0.57356733", "0.57262295", "0.5723911", "0.5721387", "0.5720002", "0.5718138", "0.57165253", "0.57157916", "0.571577", "0.57156444", "0.57146734" ]
0.0
-1
A helper method that changes letters to numbers
private char enumerate(char input, int t) { boolean charfound = false; char output = 0; char[] n1 = {'1','2','3','4','5','6'}; //first set of numbers char[] n2 = {'3','4','5','6','1','2'}; //second set, if previous value was number char[] c = {'A','E','I','O','U','Y'}; for (int i=0;i<c.length;i++) { // go through c and see if match is made, and then change to value in n1 and n2 if (charfound==false) { if (t==1 && input==c[i]) { charfound = true; output = n1[i]; } if (t==2 &&input==c[i]) { charfound = true; output = n2[i]; } } } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void convertAlphaToNumeric(StringBuffer buf)\n {\n byte byteLetter = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the index value of 1 to 26 of the letter and then take the modulo of 10\n byteLetter = (byte) (buf.charAt(letter) - 96);\n byteLetter = (byte) (byteLetter % 10);\n buf.setCharAt(letter, (char) (byteLetter + 48));\n }\n }", "private static int letterToNumber(String str) {\n return (\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".indexOf(str))%26+1;\n }", "char caseconverter(int k,int k1)\n{\nif(k>=65 && k<=90)\n{\nk1=k1+32;\n}\nelse\nif(k>=97 && k<=122)\n{\nk1=k1-32;\n}\nreturn((char)k1);\n}", "private int convert(int keyCode) {\n\t\tif (keyCode >= 96 && keyCode <= 105) {\n\t\t\treturn keyCode - 48;\n\t\t} else if (keyCode == 81) { // qwertyuiop -> 0-9\n\t\t\tkeyCode = 49;\n\t\t} else if (keyCode == 87) {\n\t\t\tkeyCode = 50;\n\t\t} else if (keyCode == 69) {\n\t\t\tkeyCode = 51;\n\t\t} else if (keyCode == 82) {\n\t\t\tkeyCode = 52;\n\t\t} else if (keyCode == 84) {\n\t\t\tkeyCode = 53;\n\t\t} else if (keyCode == 89) {\n\t\t\tkeyCode = 54;\n\t\t} else if (keyCode == 85) {\n\t\t\tkeyCode = 55;\n\t\t} else if (keyCode == 37) {\n\t\t\tkeyCode = 56;\n\t\t} else if (keyCode == 79) {\n\t\t\tkeyCode = 57;\n\t\t} else if (keyCode == 80) {\n\t\t\tkeyCode = 48;\n\t\t}\n\t\treturn keyCode;\n\t}", "private static long convertNumber(String text, int base)\r\n\t{\r\n\t\tlong result = 0;\r\n\t\ttext = text.toLowerCase();\r\n\t\tfor (int i = 2; i < text.length(); i++)\r\n\t\t{\r\n\t\t\tint d;\r\n\t\t\tchar c = text.charAt(i);\r\n\t\t\tif (c > '9')\r\n\t\t\t\td = (int) (c - 'a') + 10;\r\n\t\t\telse\r\n\t\t\t\td = (int) (c - '0');\r\n\t\t\tresult = (result * base) + d;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Test\n public void basicNumberSerializerTest() {\n int[] input = {0, 1, 2, 3};\n\n // Want to map 0 -> \"d\", 1 -> \"c\", 2 -> \"b\", 3 -> \"a\"\n char[] alphabet = {'d', 'c', 'b', 'a'};\n\n String expectedOutput = \"dcba\";\n assertEquals(expectedOutput,\n DigitsToStringConverter.convertDigitsToString(\n input, 4, alphabet));\n }", "private void convertDigit(int i)\n {\n if(tempString.charAt(i) == '0' && i == 0)//Checks to see if the digit is equal to '0' and the first character.\n {\n tempString.replace(i, i+1, \"Zero\"); //Converts to capitalized version.\n }\n else if(tempString.charAt(i) == '0' && i != 0) //If it's equal to '0' and not the first, then not capital.\n tempString.replace(i, i+1, \"zero\"); //Converts to non-capitalized version.\n //The rest are very similar to the one above for numbers 1-9.\n if(tempString.charAt(i) == '1' && i == 0)\n {\n tempString.replace(i, i+1, \"One\");\n }\n else if(tempString.charAt(i) == '1' && i != 0)\n tempString.replace(i, i+1, \"one\");\n \n if(tempString.charAt(i) == '2' && i == 0)\n {\n tempString.replace(i, i+1, \"Two\");\n }\n else if(tempString.charAt(i) == '2' && i != 0)\n tempString.replace(i, i+1, \"two\");\n \n if(tempString.charAt(i) == '3' && i == 0)\n {\n tempString.replace(i, i+1, \"Three\");\n }\n else if(tempString.charAt(i) == '3' && i != 0)\n tempString.replace(i, i+1, \"three\");\n \n if(tempString.charAt(i) == '4' && i == 0)\n {\n tempString.replace(i, i+1, \"Four\");\n }\n else if(tempString.charAt(i) == '4' && i != 0)\n tempString.replace(i, i+1, \"four\");\n \n if(tempString.charAt(i) == '5' && i == 0)\n {\n tempString.replace(i, i+1, \"Five\");\n }\n else if(tempString.charAt(i) == '5' && i != 0)\n tempString.replace(i, i+1, \"five\");\n \n if(tempString.charAt(i) == '6' && i == 0)\n {\n tempString.replace(i, i+1, \"Six\");\n }\n else if(tempString.charAt(i) == '6' && i != 0)\n tempString.replace(i, i+1, \"six\");\n \n if(tempString.charAt(i) == '7' && i == 0)\n {\n tempString.replace(i, i+1, \"Seven\");\n }\n else if(tempString.charAt(i) == '7' && i != 0)\n tempString.replace(i, i+1, \"seven\");\n \n if(tempString.charAt(i) == '8' && i == 0)\n {\n tempString.replace(i, i+1, \"Eight\");\n }\n else if(tempString.charAt(i) == '8' && i != 0)\n tempString.replace(i, i+1, \"eight\");\n \n if(tempString.charAt(i) == '9' && i == 0)\n {\n tempString.replace(i, i+1, \"Nine\");\n }\n else if(tempString.charAt(i) == '9' && i != 0)\n tempString.replace(i, i+1, \"nine\");\n }", "public void handleNumbers() {\n // TODO handle \"one\", \"two\", \"three\", etc.\n }", "private int convertCharNumtoNum(char charIn){\n\t\tint number = -1;\n\t\tint convertedNum = Character.getNumericValue(charIn);\n\t\t\n\t\tfor(int i: Seats.SEAT_NUMS){\n\t\t\tif(i == convertedNum){\n\t\t\t\tnumber = convertedNum; \n\t\t\t}\n\t\t}\n\t\treturn number;\n\t}", "abstract String convertEnglishNumber(String number);", "static int charToInt(char c) {\n if (c >= 'A' && c <= 'Z') return c - 'A';\n else if (c >= 'a' && c <= 'z') return c - 'a' + 26;\n else return -1;\n }", "@Test\n public void longerNumberSerializerTest(){\n int[] input3 = {0,1,2,3,4,5,6};\n \n // Want to map 0 -> \"z\", 1 -> \"e\", 2 -> \"d\", 3 -> \"r\",\n // 4 -> \"o\", 5 -> \"a\", 6 -> \"t\"\n char[] alphabet3 = {'z', 'e', 'd', 'r','o','a','t'};\n \n String expectedOutput3 = \"zedroat\";\n assertEquals(expectedOutput3,\n DigitsToStringConverter.convertDigitsToString(\n input3, 7, alphabet3));\n }", "private int getCharNumber(Character letter) {\n\t\tint integerA = Character.getNumericValue('a');\n\t\tint integerZ = Character.getNumericValue('z');\n\t\tint integerLetter = Character.getNumericValue(letter);\n\t\tif (integerLetter >= integerA && integerLetter <= integerZ) {\n\t\t\treturn integerLetter - integerA; //a -> 0, b -> 1, c -> 2, etc\n\t\t}\n\t\treturn -1;\n\t}", "public static int titleToNumber(String s) {\n char [] charArray = s.toCharArray();\n int num = 0;\n int j = 0;\n for(int i = charArray.length-1; i >=0; i--) {\n num += (int) ((charArray[i] - 'A' + 1) * Math.pow(26, j++)); \n }\n \n return num;\n }", "int toInt(String a){\n\t\tint name=0;\r\n\t\tfor(int i=0;i<a.length();i++){\r\n\t\t\tname+=(int)a.charAt(i);\r\n\t\t}\r\n\t\treturn name;\r\n\t}", "private static String wordToNumber(String word) {\n final StringBuilder number = new StringBuilder(word.length());\n for (int i = 0; i < word.length(); i++) {\n number.append(getNumber(word.charAt(i)));\n }\n return number.toString();\n }", "private static void convertNumericToRandomAlpha(StringBuffer buf)\n {\n byte byteLetter = 0;\n byte randomByte = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the byte value of the number\n byteLetter = (byte) (buf.charAt(letter) - 48);\n if (byteLetter == 0)\n {\n byteLetter = 10;\n\n // generate a random number between 1 and 3 such that the number multiplied\n // by the byteLetter does not exceed 26. byteLetter of 0 is treated as 10.\n }\n randomByte = (byte) ((Math.round(Math.random() * 100)\n % ((byteLetter > 6) ? 2 : 3)));\n byteLetter = (byte) (byteLetter + (randomByte * 10));\n buf.setCharAt(letter, (char) (byteLetter + 96));\n }\n }", "public int titleToNumber(String s) {\n int val = 0;\n //go thru string\n for (int i = 0; i < s.length(); i++){\n \t//26 letts of alph add the int val of that character \n val = val * 26 + (int) s.charAt(i) - (int) 'A' + 1;\n }\n return val;\n }", "public static int convert(char c) {\n switch (c) {\n case 'A': return 0;\n case 'T': return 1;\n case 'G': return 2;\n case 'C': return 3;\n default: return 4;\n }\n }", "private int char2Int(char _char){\n \tswitch(_char){\r\n \tcase 'A': case 'a': return 0; \r\n \tcase 'R': case 'r': return 1;\r\n \tcase 'N': case 'n': return 2; \t\r\n \tcase 'D': case 'd': return 3;\r\n \tcase 'C': case 'c': return 4;\r\n \tcase 'Q': case 'q': return 5;\r\n \tcase 'E': case 'e': return 6;\r\n \tcase 'G': case 'g': return 7;\r\n \tcase 'H': case 'h': return 8;\r\n \tcase 'I': case 'i': return 9;\r\n \tcase 'L': case 'l': return 10;\r\n \tcase 'K': case 'k': return 11;\r\n \tcase 'M': case 'm': return 12;\r\n \tcase 'F': case 'f': return 13;\r\n \tcase 'P': case 'p': return 14;\r\n \tcase 'S': case 's': return 15;\r\n \tcase 'T': case 't': return 16;\r\n \tcase 'W': case 'w': return 17;\r\n \tcase 'Y': case 'y': return 18;\r\n \tcase 'V': case 'v': return 19;\r\n \tcase 'B': case 'b': return 20;\r\n \tcase 'Z': case 'z': return 21;\r\n \tcase 'X': case 'x': return 22; \t\r\n \tdefault: return 23;\r\n \t}\r\n \t//\"A R N D C Q E G H I L K M F P S T W Y V B Z X *\"\r\n }", "private static int convertCharToInt(char charAt) {\n\t\tif(charAt == 48) {\t\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn 1;\n\t\t}\n\t}", "private static String toNumber(String in) {\n in = in.toLowerCase();\n for (int i = 0; i < MONTHS.length; i++)\n if (MONTHS[i].equals(in))\n return Integer.toString(i + 1);\n for (int i = 0; i < DAYS.length; i++)\n if (DAYS[i].equals(in))\n return Integer.toString(i);\n try {\n Integer.parseInt(in);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"'\" + in + \"' is not a number!\");\n }\n return in;\n }", "int toInt(char ch) {\n return _letters.indexOf(ch);\n }", "public String digit(String digit);", "public static String posLettersToNumber(String pos)\n\t{\n\t\tassert pos != null && !pos.isEmpty() : \"Error in WordNetUtilities.posLettersToNumber(): empty string\";\n\t\tif (pos.equalsIgnoreCase(\"NN\"))\n\t\t\treturn \"1\";\n\t\tif (pos.equalsIgnoreCase(\"VB\"))\n\t\t\treturn \"2\";\n\t\tif (pos.equalsIgnoreCase(\"JJ\"))\n\t\t\treturn \"3\";\n\t\tif (pos.equalsIgnoreCase(\"RB\"))\n\t\t\treturn \"4\";\n\t\tassert false : \"Error in WordNetUtilities.posLettersToNumber(): bad letters: \" + pos;\n\t\treturn \"1\";\n\t}", "public char convertToCharacter(int letterThatIsNumber)\n\t{\n\t\treturn characters[letterThatIsNumber];\n\t}", "private static int getNumber(char uppercaseLetter) {\n\t\tint res=0;\n\t\tString a=\"\";\n\t\t\n\t\tif (uppercaseLetter =='A' ||uppercaseLetter =='B' ||uppercaseLetter =='C') {\n\t\t\ta=\"2\";\n\t\t}\n\t\telse if (uppercaseLetter =='D' ||uppercaseLetter =='E' ||uppercaseLetter =='F') {\n\t\t\ta=\"3\";\n\t\t}\n\t\telse if (uppercaseLetter =='G' ||uppercaseLetter =='H' ||uppercaseLetter =='I' ) {\n\t\t\ta=\"4\";\n\t\t}\n\t\telse if(uppercaseLetter =='J' ||uppercaseLetter =='K' ||uppercaseLetter =='L' ) {\n\t\t\ta=\"5\";\n\t\t}\n\t\telse if(uppercaseLetter =='M' ||uppercaseLetter =='N' ||uppercaseLetter =='O' ) {\n\t\t\ta=\"6\";\n\t\t}\n\t\telse if (uppercaseLetter =='P' ||uppercaseLetter =='Q' ||uppercaseLetter =='R'|| uppercaseLetter=='S') {\n\t\t\ta=\"7\";\n\t\t}\n\t\telse if (uppercaseLetter =='T' ||uppercaseLetter =='U' ||uppercaseLetter =='V' ) {\n\t\t\ta=\"8\";\n\t\t}\n\t\telse if(uppercaseLetter =='W' ||uppercaseLetter =='X' ||uppercaseLetter =='Y' ||uppercaseLetter=='Z') {\n\t\t\ta=\"9\";\n\t\t}\n\t\telse \n\t\t\tSystem.out.print(\"Invalid input\");\n\t\t\n\t\treturn res;\n\t}", "private String number() {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return Integer.toString(getValue());\n }\n }", "private int c2i(char c) {\n if (c >= 'A' && c <= 'Z')\n return c - 'A';\n else\n throw new BadCharException(c);\n }", "public int convertToInteger(char letterToEncode)\n\t{\n\t\tfor (int i = 0; i<characters.length; i++)\n\t\t{\n\t\t\tif(letterToEncode == characters[i])\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t}", "public static char posLetterToNumber(char POS)\n\t{\n\t\tswitch (POS)\n\t\t{\n\t\t\tcase 'n':\n\t\t\t\treturn '1';\n\t\t\tcase 'v':\n\t\t\t\treturn '2';\n\t\t\tcase 'a':\n\t\t\t\treturn '3';\n\t\t\tcase 'r':\n\t\t\t\treturn '4';\n\t\t\tcase 's':\n\t\t\t\treturn '5';\n\t\t}\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posLetterToNumber(): bad letter: \" + POS);\n\t\treturn '1';\n\t}", "static void asciiToSentence(String str, int len) \n { \n int num = 0; \n for (int i = 0; i < len; i++) { \n \n // Append the current digit \n num = num * 10 + (str.charAt(i) - '0'); \n \n // If num is within the required range \n if (num >= 32 && num <= 122) { \n \n // Convert num to char \n char ch = (char)num; \n System.out.print(ch); \n \n // Reset num to 0 \n num = 0; \n } \n } \n }", "@Test\n\tpublic void checkUpcaseNumbersCast() {\n\t\tString input = \"I want FIVE or at least tHREE dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want 5 or at least 3 dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}", "public int translateNum(int num) {\n String s = String.valueOf(num);\n int a=1,b=1;\n for(int i=s.length()-2; i>-1; i--){\n String tmp = s.substring(i, i+2);\n int c= tmp.compareTo(\"10\") >= 0 && tmp.compareTo(\"25\") <= 0 ? a+b:a;\n b=a;\n a=c;\n }\n return a;\n }", "private static int characterToIntegerDigit(char c) {\n\t\t// since all characters are integers in UTF-16\n\t\tif (c >= 48 && c <= 57) {\n\t\t\treturn (c - 48);\n\t\t}\n\t\treturn -1;\n\t}", "private void prepNumberKeys() {\r\n int numDigits = 10;\r\n for (int i = 0; i < numDigits; i++) {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke((char) ('0' + i)), \"key\" + i);\r\n MAIN_PANEL.getActionMap()\r\n .put(\"key\" + i, new KeyAction(String.valueOf(i)));\r\n } \r\n }", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "public static int convertLetterGradeToNumber(char letter) {\n int value = -1;\n\n if (letter >= 'A' && letter <= 'D') {\n // Subtract 1 from F because there is no grade 'E'\n value = ('F' - 1) - letter;\n } else if (letter == 'F') {\n value = 0;\n }\n\n return value;\n }", "public static int convert26to10(String s) {\n if (null != s && !\"\".equals(s)) {\n int n = 0;\n char[] tmp = s.toCharArray();\n for (int i = tmp.length - 1, j = 1; i >= 0; i--, j *= 26) {\n char c = Character.toUpperCase(tmp[i]);\n if (c < 'A' || c > 'Z') return 0;\n n += ((int) c - 64) * j;\n }\n return n;\n }\n return 0;\n }", "private static int fromDigit(char ch) {\n if (ch >= '0' && ch <= '9')\n return ch - '0';\n if (ch >= 'A' && ch <= 'F')\n return ch - 'A' + 10;\n if (ch >= 'a' && ch <= 'f')\n return ch - 'a' + 10;\n throw new IllegalArgumentException(\"invalid hex digit '\" + ch + \"'\");\n }", "void increaseSortLetter();", "@Test\n\tpublic void castNumbersFollowedByMultipleDifferentNonAlphapeticalCharacters() {\n\t\tString input = \"I have one~!@##$%^^&*( new test\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I have 1~!@##$%^^&*( new test\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}", "@Test\n public void testConvertDigitsToLettersForTwoDigitNumber() {\n Integer[] argArray = new Integer[]{99,10};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"ww wx wy wz xw xx xy xz yw yx yy yz zw zx zy zz\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }", "private String filterForNumbers(String s ){\n return s.chars()\n .filter(ch -> Character.isDigit(ch))\n .collect(StringBuilder::new, StringBuilder::appendCodePoint,\n StringBuilder::append)\n .toString();\n }", "@Override\r\n\tpublic void changeNumber(String name, String newNumber) {\n\t\tfor (Entry e : array[name.toUpperCase().charAt(0) - 'A']) {\r\n\t\t\tif (e.name == name) {\r\n\t\t\t\te.setNumber(newNumber);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private char computeCheckDigit(final String taxId) {\n final int lettersInAlphabet = 26;\n final int maxOdd = 13, maxEven = 14;\n final int[] setdisp = { 1, 0, 5, 7, 9, 13, 15, 17, 19, 21, 2, 4, 18, 20, 11, 3, 6, 8, 12,\n 14,\n 16, 10, 22, 25, 24, 23 };\n int charWeight = 0, aChar;\n for (int i = 1; i <= maxOdd; i += 2) {\n aChar = taxId.charAt(i);\n if (aChar >= '0' && aChar <= '9') {\n charWeight = charWeight + aChar - '0';\n } else {\n charWeight = charWeight + aChar - 'A';\n }\n }\n for (int i = 0; i <= maxEven; i += 2) {\n aChar = taxId.charAt(i);\n if (aChar >= '0' && aChar <= '9') {\n aChar = aChar - '0' + 'A';\n }\n charWeight = charWeight + setdisp[aChar - 'A'];\n }\n return (char) (charWeight % lettersInAlphabet + 'A');\n }", "@Override\n\tpublic void teclaNumericaDigitada(String numTecla) {\n\t\t\n\t}", "@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=s.length()-1; i>=0; i--) {\n\t\t\tif(s.charAt(i)>=48 && s.charAt(i)<=57) {\n\t\t\t\treturn Integer.parseInt(\"\"+s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int titleToNumber(String s) {\n if(s == null || s.length() == 0){\n return 0;\n }\n \n int result = 0;\n for(int i = 0; i < s.length(); i++){\n result = result * 26 + s.charAt(i) - 'A' + 1;\n }\n return result;\n }", "static char intToBase(int val)\n\t{\n\t\tif(val == 0)\n\t\t{\n\t\t\treturn 'A';\n\t\t}\n\t\tif(val == 1)\n\t\t{\n\t\t\treturn 'C';\n\t\t}\n\t\tif(val == 2)\n\t\t{\n\t\t\treturn 'G';\n\t\t}\n\t\treturn 'T';\n\t}", "int toInt(char ch) {\n if (!contains(ch)) {\n throw new EnigmaException(\"Alpha.toInt: Char not in Alpha.\" + ch);\n }\n return _chars.indexOf(ch);\n }", "private String compactNumbers(String inWord)\n {\n StringBuffer rtn = new StringBuffer().append(\"^\");\n boolean last_digit = false;\n\n for(int i = 0; i < inWord.length(); i++)\n {\n char ch = inWord.charAt(i);\n if(Character.isDigit(ch))\n {\n if(!last_digit)\n {\n last_digit = true;\n rtn.append('1');\n } // fi\n } // fi\n\n else\n {\n last_digit = false;\n rtn.append(ch);\n } // else\n } // for\n \n rtn.append(\"_\");\n\n return(rtn.toString());\n }", "public static int toIntValue(char ch, int defaultValue) {\n/* 240 */ if (!isAsciiNumeric(ch)) {\n/* 241 */ return defaultValue;\n/* */ }\n/* 243 */ return ch - 48;\n/* */ }", "@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=0; i<=s.length()-1; i++) {\n\t\t\tif(s.charAt(i)>=48 && s.charAt(i)<=57) {\n\t\t\t\treturn Integer.parseInt(\"\"+s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int asInt(char c) {\n int temp = 0;\n switch (c) {\n case '2':\n temp = 2;\n break;\n case '3':\n temp = 3;\n break;\n case '4':\n temp = 4;\n break;\n case '5':\n temp = 5;\n break;\n case '6':\n temp = 6;\n break;\n case '7':\n temp = 7;\n break;\n case '8':\n temp = 8;\n break;\n case '9':\n temp = 9;\n break;\n case 'T':\n temp = 10;\n break;\n case 'J':\n temp = 11;\n break;\n case 'Q':\n temp = 12;\n break;\n case 'K':\n temp = 13;\n break;\n case 'A':\n temp = 14;\n break;\n\n default:\n throw new AssertionFailedError(\n \"Invalid Character \" + c + \" in card number column: Expected 1-9,J,Q,K,A\");\n\n }\n return temp;\n }", "public static void main(String[] args) \n\t{\n\t\tString str = \"647mahesh\";\n\t\tint size = str.length();\n\t\tint i;\n\t\tfor (i = 0; i < size ; i++)\n\t\t{\n\t\t\tchar split = str.charAt(i);\n\t\t\tif ('0'<=split && split<='8')\n\t\t\tbreak;\n\t\t}\n\t\tString numeric = str.substring(0,i);\n\t\tString alphabets = str.substring(i);\n\t\tSystem.out.println(numeric);\n\t\tSystem.out.println(alphabets);\n\t}", "static int stringToNumber(String value)throws IllegalArgumentException{\r\n\t\tif (!isNumber(value))\r\n\t\t\tthrow new IllegalArgumentException(\"This is not a number!\");\r\n\t\tint number = 0;\r\n\t\tfor (int i = 0; i < value.length(); i++)\r\n\t\t\tnumber += (value.charAt(i)-48)* Math.pow(10, value.length()-1-i);\r\n\t\treturn number;\r\n\t}", "public static void main(String[] args) {\n\t\tScanner input= new Scanner(System.in);\n\t\tSystem.out.print(\"\tEnter a letter :\");\n\t\t\n\t\tString letter = input.nextLine();\n\t\t\n\t\t\n\t\tfor (int i=0;i<=letter.length()-1;i++) {\n\t\t\tchar le = Character.toUpperCase(letter.charAt(i));\n\t\t\t\n\t\tSystem.out.print(getNumber(le));\n\t\t}\n\t\t\n\n\t}", "java.lang.String getNum2();", "private char convert(char Char) {\n int num = (int) Char;\n\n num = (num - '0' + 7) % 10; // Subtracts '0' to get the integer value and the\n // rest is as instructed\n Char = (char) (num + '0'); // Translates it back to ASCII value by adding '0'\n\n return Char;\n\n }", "private void processNumeric() {\n\n Token token = tokens.get(currentTokenPointer);\n\n String tokenString = string(token);\n\n pushIt(new ReplacementTransformer(tokenString));\n\n }", "private static Symbol number(String text, int base)\r\n\t{\r\n\t\tint linepos = line_;\r\n\t\tint charpos = char_;\r\n\t\tint colpos = col_;\r\n\t\tscan(text);\r\n\t\tToken token = new Token(fname, text, linepos, charpos, colpos);\r\n\t\ttoken.number = convertNumber(text, base);\r\n\t\treturn new Symbol(sym.NUMBER, linepos, colpos, token);\r\n\t}", "private String replaceSpecialCharactersFromNumber(String number) {\n\t\tnumber = number.replaceAll(\"[^a-zA-Z0-9]\", \"\");\n\t\treturn number;\n\t}", "static StringBuffer convert(String conv_Number){\r\n StringBuffer obj = new StringBuffer(conv_Number);\r\n for (int i=0 ; i<obj.length();i++){\r\n if(obj.charAt(i)<48 || obj.charAt(i)>57){\r\n obj.deleteCharAt(i);\r\n }}\r\n return obj;\r\n//* aurther=====================================================================@Wajaht Masood_003_assign\r\n }", "public static int toIntValue(char ch) {\n/* 218 */ if (!isAsciiNumeric(ch)) {\n/* 219 */ throw new IllegalArgumentException(\"The character \" + ch + \" is not in the range '0' - '9'\");\n/* */ }\n/* 221 */ return ch - 48;\n/* */ }", "private String convertNumericToLetter (float grade) {\r\n\r\n // letter grades are indexed by grade point\r\n // the letter grade is added (+1) to the gradeCount array\r\n if(grade >= 93 && grade <= 100) { gradeCount[13] += 1; return grades[13]; } // [13] is A+\r\n if(grade >= 86 && grade < 93) { gradeCount[12] += 1; return grades[12]; } // [12] is A\r\n if(grade >= 80 && grade < 86) { gradeCount[11] += 1; return grades[11]; } // .\r\n if(grade >= 77 && grade < 80) { gradeCount[10] += 1; return grades[10]; } // .\r\n if(grade >= 73 && grade < 77) { gradeCount[9] += 1; return grades[9]; } // .\r\n if(grade >= 70 && grade < 73) { gradeCount[8] += 1; return grades[8]; } // .\r\n if(grade >= 67 && grade < 70) { gradeCount[7] += 1; return grades[7]; } // .\r\n if(grade >= 63 && grade < 67) { gradeCount[6] += 1; return grades[6]; } // .\r\n if(grade >= 60 && grade < 63) { gradeCount[5] += 1; return grades[5]; } // .\r\n if(grade >= 57 && grade < 60) { gradeCount[4] += 1; return grades[4]; } // .\r\n if(grade >= 53 && grade < 57) { gradeCount[3] += 1; return grades[3]; } // .\r\n if(grade >= 50 && grade < 53) { gradeCount[2] += 1; return grades[2]; } // .\r\n if(grade >= 35 && grade < 50) { gradeCount[1] += 1; return grades[1]; } // [1] is F\r\n else { gradeCount[0] += 1; return grades[0]; } // [0] is F-\r\n }", "private int getNumberFromString(String text){\n\t\t\n\t\tint result = 0;\n\t\t\n\t\tfor(int i=text.length() - 1, j=0; i >= 0 ; i--, j++){\n\t\t\t\n\t\t\tresult += (Character.getNumericValue(text.charAt(i))) * Math.pow(10, j);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public int letter2index(char c) { \t\n \treturn (int)(c - 'A')%26 ;\n }", "public int letterToInt(char letter){\n\t\t\treturn letters_to_num.get(letter);\n\t\t}", "public int titleToNumber(String s) {\n\t int sum = 0;\n\t // for (int i= s.length()-1; i >= 0; i--) {\n\t // sum = sum + (int) Math.pow(26, s.length()-1-i)*(s.charAt(i) - 'A' + 1);\n\t // }\n\t for (int i=0; i<s.length(); i++) {\n\t sum = sum*26 + (s.charAt(i) - 'A' + 1);\n\t }\n\t return sum;\n\t }", "private void transNumberToJustDigits(String number) {\n String[] justDigits = number.split(\"-\");\n\n for (String justDigit : justDigits) {\n numberWithoutDashes += justDigit;\n }\n\n }", "@Test\n public void testDigramaToNum() throws Exception {\n System.out.println(\"digramaToNum\");\n String digrama = \"\";\n int expResult = 0;\n int result = utilsHill.digramaToNum(digrama);\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 boolean isAlphaNumeric(char toCheck) {\n return isAlpha(toCheck) || isDigit(toCheck);\n }", "public char intToLetter(int val){\n\t\t\t// val is assumed to be an integer < MAXUINT so its unsigned value is the same\n\t\t\t// as the signed representation so we don't need to do any conversion.\n\t\t\treturn ALPHABET[val];\n\t\t}", "public void Converter(String lines, StringBuilder cLines)\r\n {\r\n if(Character.isDigit(cLines.charAt(0)))//seperate if for the character at the 0 position\r\n {\r\n switch(cLines.charAt(0))\r\n {\r\n case '0': cLines.replace(0,1,\"Zero\"); //sets the first character to the correct string and uppercases the first letter\r\n break;\r\n case '1': cLines.replace(0,1,\"One\");\r\n break;\r\n case '2': cLines.replace(0,1,\"Two\");\r\n break;\r\n case '3': cLines.replace(0,1,\"Three\");\r\n break;\r\n case '4': cLines.replace(0,1,\"Four\");\r\n break;\r\n case '5': cLines.replace(0,1,\"Five\");\r\n break;\r\n case '6': cLines.replace(0,1,\"Six\");\r\n break;\r\n case '7': cLines.replace(0,1,\"Seven\");\r\n break;\r\n case '8': cLines.replace(0,1,\"Eight\");\r\n break;\r\n case '9': cLines.replace(0,1,\"Nine\");\r\n break;\r\n \r\n \r\n }\r\n \r\n \r\n }\r\n \r\n for(int i = 1 ; i < lines.length() ; i++)// this for is used to check the remaining characters after the first character\r\n {\r\n if(Character.isDigit(cLines.charAt(i)))\r\n { \r\n if(Character.isSpaceChar(cLines.charAt(i+1))&& Character.isSpaceChar(cLines.charAt(i-1)))//if statement to make sure its not a double digit\r\n {\r\n switch(cLines.charAt(i))\r\n {\r\n case '0': cLines.replace(i,i+1,\"zero\");//statements for switch to change digits to strings lowercase\r\n break;\r\n case '1': cLines.replace(i,i+1,\"one\");\r\n break;\r\n case '2': cLines.replace(i,i+1,\"two\");\r\n break;\r\n case '3': cLines.replace(i,i+1,\"three\");\r\n break;\r\n case '4': cLines.replace(i,i+1,\"four\");\r\n break;\r\n case '5': cLines.replace(i,i+1,\"five\");\r\n break;\r\n case '6': cLines.replace(i,i+1,\"six\");\r\n break;\r\n case '7': cLines.replace(i,i+1,\"seven\");\r\n break;\r\n case '8': cLines.replace(i,i+1,\"eight\");\r\n break;\r\n case '9': cLines.replace(i,i+1,\"nine\");\r\n break;\r\n \r\n \r\n }\r\n }\r\n }\r\n } \r\n \r\n stbrLines = cLines;\r\n stringLines = lines;\r\n }", "private int getCharNumber(char c) {\n int myReturn = -1;\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n if (a <= val && val <= z) {\n myReturn = val - a;\n }\n return myReturn;\n }", "public static String posNumberToLetters(String pos)\n\t{\n\t\tif (pos.equalsIgnoreCase(\"1\"))\n\t\t\treturn \"NN\";\n\t\tif (pos.equalsIgnoreCase(\"2\"))\n\t\t\treturn \"VB\";\n\t\tif (pos.equalsIgnoreCase(\"3\"))\n\t\t\treturn \"JJ\";\n\t\tif (pos.equalsIgnoreCase(\"4\"))\n\t\t\treturn \"RB\";\n\t\tif (pos.equalsIgnoreCase(\"5\"))\n\t\t\treturn \"JJ\";\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posNumberToLetters(): bad number: \" + pos);\n\t\treturn \"NN\";\n\t}", "public static String calculateLetter(int dniNumber) {\n String letras = \"TRWAGMYFPDXBNJZSQVHLCKEU\";\n int indice = dniNumber % 23;\n return letras.substring(indice, indice + 1);\n }", "public int[] convert(){\r\n int[] arreglo = new int[cedula.length()];\r\n for(int i=0; i<cedula.length(); i++){\r\n // convierte los char en int\r\n arreglo[i] = Character.getNumericValue(cedula.charAt(i));\r\n }\r\n return arreglo;\r\n }", "public static String dtrmn(int number) {\n\t\t\n\t\tString letter = \"\";\n\t\t\n\t\tint cl = number / 100;\n\t\tif (cl != 9 && cl != 4) {\n\t\t\t\n\t\t\tif (cl < 4) {\n\t\t\t\t\n\t\t\t\tfor(int i = 1; i <= cl; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if (cl < 9 && cl > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"D\";\n\t\t\t\tfor (int i = 1; i <= cl - 5; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if(cl == 10) { \n\t\t\t\t\n\t\t\t\tletter = letter + \"M\";\n\t\t\t}\n\t\t} else if (cl == 4) {\n\t\t\t\n\t\t\tletter = letter + \"CD\";\n\t\t\t\n\t\t} else if (cl == 9) {\n\t\t\t\n\t\t\tletter = letter + \"CM\";\n\t\t}\n\t\t\n\t\tint cl1 = (number % 100)/10;\n\t\tif (cl1 != 9 && cl1 != 4) {\n\t\t\t\n\t\t\tif (cl1 < 4) {\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t} else if (cl1 < 9 && cl1 > 4) {\n\t\t\t\tletter = letter + \"L\";\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1 -5; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else if (cl1 == 4) {\n\t\t\tletter = letter + \"XL\";\n\t\t} else if (cl1 == 9) {\n\t\t\tletter = letter + \"XC\";\n\t\t}\n\t\t\n\t\tint cl2 = (number % 100)%10;\n\t\t\n\t\tif (cl2 != 9 && cl2 != 4) {\n\t\t\t\n\t\t\tif (cl2 < 4) {\n\t\t\t\tfor (int i = 1; i <= cl2; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t} else if (cl2 < 9 && cl2 > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"V\";\n\t\t\t\tfor (int i = 1; i <= cl2-5; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else if (cl2 == 4) {\n\t\t\tletter = letter +\"IV\";\n\t\t} else if (cl2 == 9) {\n\t\t\tletter = letter + \"IX\";\n\t\t}\n\t\treturn letter;\n\t}", "public static String intToNumeral(int number)\n\t{\n\t\tString numeral = \"\";\n\t\twhile(number > 0)\n\t\t{\n\t\t\tif(number >= 1000)\n\t\t\t{\n\t\t\t\tnumber -= 1000;\n\t\t\t\tnumeral = numeral + \"M\";\n\t\t\t}\n\t\t\telse if(number >= 900)\n\t\t\t{\n\t\t\t\tnumber -= 900;\n\t\t\t\tnumeral = numeral + \"CM\";\n\t\t\t}\n\t\t\telse if(number >= 500)\n\t\t\t{\n\t\t\t\tnumber -= 500;\n\t\t\t\tnumeral = numeral + \"D\";\n\t\t\t}\n\t\t\telse if(number >= 400)\n\t\t\t{\n\t\t\t\tnumber -= 400;\n\t\t\t\tnumeral = numeral + \"DC\";\n\t\t\t}\n\t\t\telse if(number >= 100)\n\t\t\t{\n\t\t\t\tnumber -= 100;\n\t\t\t\tnumeral = numeral + \"C\";\n\t\t\t}\n\t\t\telse if(number >= 90)\n\t\t\t{\n\t\t\t\tnumber -= 90;\n\t\t\t\tnumeral = numeral + \"XC\";\n\t\t\t}\n\t\t\telse if(number >= 50)\n\t\t\t{\n\t\t\t\tnumber -= 50;\n\t\t\t\tnumeral = numeral + \"L\";\n\t\t\t}\n\t\t\telse if(number >= 40)\n\t\t\t{\n\t\t\t\tnumber -= 40;\n\t\t\t\tnumeral = numeral + \"XL\";\n\t\t\t}\n\t\t\telse if(number >= 10)\n\t\t\t{\n\t\t\t\tnumber -= 10;\n\t\t\t\tnumeral = numeral + \"X\";\n\t\t\t}\n\t\t\telse if(number >= 9)\n\t\t\t{\n\t\t\t\tnumber -= 9;\n\t\t\t\tnumeral = numeral + \"IX\";\n\t\t\t}\n\t\t\telse if(number >= 5)\n\t\t\t{\n\t\t\t\tnumber -= 5;\n\t\t\t\tnumeral = numeral + \"V\";\n\t\t\t}\n\t\t\telse if(number >= 4)\n\t\t\t{\n\t\t\t\tnumber -= 4;\n\t\t\t\tnumeral = numeral + \"IV\";\n\t\t\t}\n\t\t\telse if(number >= 1)\n\t\t\t{\n\t\t\t\tnumber -= 1;\n\t\t\t\tnumeral = numeral + \"I\";\n\t\t\t}\n\t\t\tif(number < 0) return \"ERROR\";\n\t\t}\n\t\treturn numeral;\n\t}", "public static void main(String[] args) {\n\n String str=\"a1b2c3\";\n char[] arr=str.toCharArray(); // every single character from the char\n\n System.out.println(Arrays.toString(arr)); // [a, 1, b, 2, c, 3]\n int sum=0; // i need to add sum all number // will contain sum of digits\n for(char each:arr){\n boolean isDigit=each>=48 && each <=57; // if craccter is digit\n\n if(isDigit){ // or if(each>=48 && each<=57) boolean yerine\n sum+= Integer.parseInt(\"\"+each); // first '0' stringe cevirmeliyiz\n }\n }\n System.out.println(sum);\n\n\n// second solution with Character.isDigit();\n /*\n if(Character.isDigit(each)) == if(each>=48 && each<=57)\n is digit() : identifies if the given character is digit\n sum+= Integer.parseInt(\"\"+each); Bu sekilde de yapabilirsin\n\n*/\n // boolean a=Character.isAlphabetic('A'); identifies if the cracter is alphabet\n\n\n }", "public char encodeLetter(char letterToEncode)\n\t{\n\t\tint charAsInt;\n\t\tchar intAsChar;\n\t\t\n\t\tletterToEncode = plugboard.substitute(letterToEncode);\n\t\tcharAsInt = convertToInteger(letterToEncode);\n\t\t\n\t\t//loops through each of the 3 rotors assigning them substitute() mehtod\n\t\tfor(int slot = 0; slot < rotors.length; slot++)\n\t\t{\n\t\t\tcharAsInt = rotors[slot].substitute(charAsInt);\n\t\t}\n\t\t\n\t\tcharAsInt = reflector.substitute(charAsInt);\n\t\t\n\t\t//loops once again through each of the three rotors assigning them substituteBack method\n\t\tfor(int slot = rotors.length-1; slot >= 0; slot--)\n\t\t{\n\t\t\tcharAsInt = rotors[slot].substituteBack(charAsInt);\n\t\t}\n\t\t\n\t\tintAsChar = convertToCharacter(charAsInt);\n\t\tintAsChar = plugboard.substitute(intAsChar);\n\t\trotors[0].rotate();\n\t\t\n\t\treturn intAsChar;\n\t}", "@Test\n public void testToChar() {\n Object[][] datas = new Object[][]{\n {1, '1'},\n {5, '5'},\n {10, 'A'},\n {11, 'B'},\n {12, 'C'},\n {13, 'D'},\n {14, 'E'},\n {15, 'F'}\n };\n for (Object[] data : datas) {\n char result = Tools.toChar((Integer) data[0]);\n char expResult = (Character) data[1];\n assertEquals(result, expResult);\n System.out.println(\"testToChar()\");\n }\n }", "public static int charToGroup(char a){\n int group=0;\n if(a<112){\n group= ((a-'a')/3) +2;\n }\n else if(a<116){\n group = 7;\n }\n else{\n group= (a < 'w') ? 8 : 9;\n }\n return group;\n }", "public String originalText(String cipher_text, String key)\n{\n String orig_text=\"\";\n \n for (int i = 0 ; i < cipher_text.length() && \n i < key.length(); i++)\n {\n if(cipher_text.charAt(i) == ' ' || cipher_text.charAt(i) == '\\n')\n orig_text+=cipher_text.charAt(i);\n else{\n // converting in range 0-25\n int x = (cipher_text.charAt(i) - \n key.charAt(i) + 26) %26; \n // convert into alphabets(ASCII)\n x += 'A';\n orig_text+=(char)(x);\n }\n }\n return orig_text;\n}", "private int extractDigits(String courseCode) {\n CharMatcher matcher = CharMatcher.javaLetter();\n String digitOnly = matcher.removeFrom(courseCode);\n int digits = Integer.parseInt(digitOnly);\n return digits;\n }", "static int baseToInt(char c)\n\t{\n\t\tif(c == 'a' || c == 'A')\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tif(c == 'c' || c == 'C')\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\tif(c == 'g' || c == 'G')\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t\treturn 3;\n\t}", "public static int char_to_int(char c){\n\t\tswitch(c){\n\t\t\tcase '1':\n\t\t\t\treturn 1;\n\t\t\tcase '2':\n\t\t\t\treturn 2;\n\t\t\tcase '3':\n\t\t\t\treturn 3;\n\t\t\tcase '4':\n\t\t\t\treturn 4;\n\t\t\tcase '5':\n\t\t\t\treturn 5;\n\t\t\tcase '6':\n\t\t\t\treturn 6;\n\t\t\tcase '7':\n\t\t\t\treturn 7;\n\t\t\tcase '8':\n\t\t\t\treturn 8;\n\t\t\tcase '9':\n\t\t\t\treturn 9;\n\t\t\tcase '0':\n\t\t\t\treturn 0;\n\t\t\tcase 'a':\n\t\t\t\treturn 10;\n\t\t\tcase 'b':\n\t\t\t\treturn 11;\n\t\t\tcase 'c':\n\t\t\t\treturn 12;\n\t\t\tcase 'd':\n\t\t\t\treturn 13;\n\t\t\tcase 'e':\n\t\t\t\treturn 14;\n\t\t\tcase 'f':\n\t\t\t\treturn 15;\n\t\t}\n\t\treturn 0;\n\t}", "Rule Digit() {\n // No effect on value stack\n return CharRange('0', '9');\n }", "public static char getDigitCharacter(){\n\t\treturn getRandomCharacter('0','9');\n\t}", "public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }", "public void encodeChars() {\n encodedChars = new int[uniqueChars.size()];\n Iterator<Character> mover = uniqueChars.iterator();\n Iterator<Character> moverTwo = uniqueChars.iterator();\n System.out.print(\"\\nEncoding characters to its ASCII integer value:\");\n for(int a = 0; a < uniqueChars.size(); a++) {\n encodedChars[a] = (int)mover.next();\n encodedChars[a] = encodedChars[a] / encodedChars[a] + a - 1;\n System.out.print(moverTwo.next() + \" : \" + encodedChars[a] + \", \");\n }\n System.out.println(\"\\n\");\n }", "public static int charToNybbl(char c) {\n int val;\n switch (c) {\n case '0':\n val = 0;\n break;\n case '1':\n val = 1;\n break;\n case '2':\n val = 2;\n break;\n case '3':\n val = 3;\n break;\n case '4':\n val = 4;\n break;\n case '5':\n val = 5;\n break;\n case '6':\n val = 6;\n break;\n case '7':\n val = 7;\n break;\n case '8':\n val = 8;\n break;\n case '9':\n val = 9;\n break;\n case 'A':\n case 'a':\n val = 10;\n break;\n case 'B':\n case 'b':\n val = 11;\n break;\n case 'C':\n case 'c':\n val = 12;\n break;\n case 'D':\n case 'd':\n val = 13;\n break;\n case 'E':\n case 'e':\n val = 14;\n break;\n case 'F':\n case 'f':\n val = 15;\n break;\n default:\n throw new NumberFormatException(\"Invalid character '\" + c\n + \"' is not hex\");\n }\n return val;\n }", "public static void main(String[] args) {\n\t\tString Input = \"1. It is Work from Home Not Work for Home\";\r\n\t\tint digit=0, upper=0, lower=0, space=0;\r\n\t\tchar[] c = Input.toCharArray();\r\n\t\tfor (char ch : c) {\r\n\t\tswitch(Character.getType(ch)) {\r\n\t\tcase 9:\r\n\t\t\tdigit++;\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tspace++;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tupper++;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tlower++;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"Numbers : \"+digit);\r\n\t\tSystem.out.println(\"Uppercase : \"+upper);\r\n\t\tSystem.out.println(\"Lowercase : \"+lower);\r\n\t\tSystem.out.println(\"Space : \"+space);\t\t\t\r\n\t}", "private String formato(String cadena){\n cadena = cadena.replaceAll(\" \",\"0\");\n return cadena;\n }", "public static String getLettersOrDigits(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return s;\r\n \r\n // Removes spaces and dashes\r\n StringBuffer buf = new StringBuffer();\r\n int len = s.length();\r\n for (int n = 0; n < len; n++)\r\n {\r\n char c = s.charAt(n);\r\n if (Character.isLetterOrDigit(c))\r\n buf.append(c);\r\n }\r\n return buf.toString();\r\n }", "public int convertToInt(String i) {\n\t\tswitch (i) {\n\t\t\tcase \".\": return 0;\n\t\t\tcase \"1\": return 1;\n\t\t\tcase \"2\": return 2;\n\t\t\tcase \"3\": return 3;\n\t\t\tcase \"4\": return 4;\n\t\t\tcase \"5\": return 5;\n\t\t\tcase \"6\": return 6;\n\t\t\tcase \"7\": return 7;\n\t\t\tcase \"8\": return 8;\n\t\t\tcase \"9\": return 9;\n\t\t\tcase \"A\": return 10;\n\t\t\tcase \"B\": return 11;\n\t\t\tcase \"C\": return 12;\n\t\t\tcase \"D\": return 13;\n\t\t\tcase \"E\": return 14;\n\t\t\tcase \"F\": return 15;\n\t\t\tcase \"G\": return 16;\n\t\t\tcase \"H\": return 17;\n\t\t\tcase \"I\": return 18;\n\t\t\tcase \"J\": return 19;\n\t\t\tcase \"K\": return 20;\n\t\t\tcase \"L\": return 21;\n\t\t\tcase \"M\": return 22;\n\t\t\tcase \"N\": return 23;\n\t\t\tcase \"O\": return 24;\n\t\t\tcase \"P\": return 25;\n\t\t\tcase \"Q\": return 26;\n\t\t\tcase \"R\": return 27;\n\t\t\tcase \"S\": return 28;\n\t\t\tcase \"T\": return 29;\n\t\t\tcase \"U\": return 30;\n\t\t\tcase \"V\": return 31;\n\t\t\tcase \"W\": return 32;\n\t\t\tcase \"X\": return 33;\n\t\t\tcase \"Y\": return 34;\n\t\t\tcase \"Z\": return 35;\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t\t return 9000;\n\t\t}\n }", "public String covertToAscii(int num){\n\t\t\n\t\tString result=\"\";\n\t\t//int i=result.length -1;\n\t\tint rem;\n\t\tif(num==0){\n\t\t\treturn \"0\";\n\t\t}\n\t\tboolean negative=(num<0);\n\t\tif(negative){\n\t\t\tnum=0-num;\n\t\t}\n\t\t//works for integers with base 10\n\t\twhile(num>0){\n\t\t\trem=num%10;\n\t\t\tnum=num/10;\n\t\t\tresult=(char)(rem+'0')+result;\n\t\t}\n\t\tif(negative){\n\t\t\tresult=\"-\"+result;\n\t\t}\n\t\treturn result;\n\t}", "@Test\n public void testConvertDigitsToLettersForMultipleDigits() {\n\n Integer[] argArray = new Integer[]{3, 4,5};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"dgj dgk dgl dhj dhk dhl dij dik dil egj egk egl ehj ehk ehl eij eik eil fgj fgk fgl fhj fhk fhl fij fik fil\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }" ]
[ "0.7197731", "0.705439", "0.64388764", "0.64312375", "0.6343665", "0.63364995", "0.6320339", "0.62846726", "0.6259618", "0.62552947", "0.6245194", "0.6228943", "0.6223217", "0.62167746", "0.61787033", "0.61425084", "0.6141035", "0.6107778", "0.6062665", "0.60607356", "0.6053319", "0.60092384", "0.59842217", "0.5981157", "0.59500915", "0.5933595", "0.59077406", "0.5905769", "0.58842295", "0.58586", "0.5856381", "0.58497334", "0.5834381", "0.58330023", "0.58097696", "0.5809182", "0.5793116", "0.5781106", "0.5779771", "0.5773675", "0.5760603", "0.57562965", "0.57472956", "0.57418394", "0.5722928", "0.57222855", "0.5714454", "0.57074326", "0.57072973", "0.5704587", "0.5703391", "0.56885815", "0.56748337", "0.5673126", "0.5672387", "0.5666523", "0.5666518", "0.56631744", "0.56617016", "0.5640854", "0.5634736", "0.56228536", "0.5617467", "0.561247", "0.5587589", "0.55854577", "0.55825526", "0.55701226", "0.55630386", "0.5558769", "0.5555323", "0.55483043", "0.5542608", "0.5538789", "0.55381334", "0.5524001", "0.5522265", "0.5520319", "0.55002356", "0.54979336", "0.5469403", "0.54570884", "0.54512465", "0.54507273", "0.544051", "0.5439412", "0.54300565", "0.5426838", "0.54240084", "0.5416285", "0.5414657", "0.5413127", "0.54017884", "0.5398968", "0.53953403", "0.53820807", "0.5378442", "0.5377485", "0.5372493", "0.5371451", "0.5369326" ]
0.0
-1
A helper method that changes numbers to letters
private char denumerate(char input, int t) { boolean charfound = false; char output = 0; char[] n1 = {'1','2','3','4','5','6'};//first set of numbers char[] n2 = {'3','4','5','6','1','2'};//second set, if previous value was number char[] c = {'A','E','I','O','U','Y'}; for (int i=0;i<c.length;i++) { // go through n1 or n2 and see if match is made, and then change to value in c if (charfound==false) { if (t==1 && input==n1[i]) { charfound = true; output = c[i]; } if (t==2 &&input==n2[i]) { charfound = true; output = c[i]; } } } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "char caseconverter(int k,int k1)\n{\nif(k>=65 && k<=90)\n{\nk1=k1+32;\n}\nelse\nif(k>=97 && k<=122)\n{\nk1=k1-32;\n}\nreturn((char)k1);\n}", "public char intToLetter(int val){\n\t\t\t// val is assumed to be an integer < MAXUINT so its unsigned value is the same\n\t\t\t// as the signed representation so we don't need to do any conversion.\n\t\t\treturn ALPHABET[val];\n\t\t}", "@Test\n public void testConvertDigitsToLettersForTwoDigitNumber() {\n Integer[] argArray = new Integer[]{99,10};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"ww wx wy wz xw xx xy xz yw yx yy yz zw zx zy zz\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }", "public String indexToLetter(int index) {\r\n\t\tif (index == 0)\r\n\t\t\treturn \"a\";\r\n\t\telse if (index == 1)\r\n\t\t\treturn \"b\";\r\n\t\telse if (index == 2)\r\n\t\t\treturn \"c\";\r\n\t\telse if (index == 3)\r\n\t\t\treturn \"d\";\r\n\t\telse if (index == 4)\r\n\t\t\treturn \"e\";\r\n\t\telse if (index == 5)\r\n\t\t\treturn \"f\";\r\n\t\telse if (index == 6)\r\n\t\t\treturn \"g\";\r\n\t\telse if (index == 7)\r\n\t\t\treturn \"h\";\r\n\t\telse if (index == 8)\r\n\t\t\treturn \"i\";\r\n\t\telse if (index == 9)\r\n\t\t\treturn \"j\";\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "private static void convertAlphaToNumeric(StringBuffer buf)\n {\n byte byteLetter = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the index value of 1 to 26 of the letter and then take the modulo of 10\n byteLetter = (byte) (buf.charAt(letter) - 96);\n byteLetter = (byte) (byteLetter % 10);\n buf.setCharAt(letter, (char) (byteLetter + 48));\n }\n }", "private static void convertNumericToRandomAlpha(StringBuffer buf)\n {\n byte byteLetter = 0;\n byte randomByte = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the byte value of the number\n byteLetter = (byte) (buf.charAt(letter) - 48);\n if (byteLetter == 0)\n {\n byteLetter = 10;\n\n // generate a random number between 1 and 3 such that the number multiplied\n // by the byteLetter does not exceed 26. byteLetter of 0 is treated as 10.\n }\n randomByte = (byte) ((Math.round(Math.random() * 100)\n % ((byteLetter > 6) ? 2 : 3)));\n byteLetter = (byte) (byteLetter + (randomByte * 10));\n buf.setCharAt(letter, (char) (byteLetter + 96));\n }\n }", "public static String convertToTitle(int n) {\n// int chu = n;\n String res = \"\";\n while(n != 0){\n \tif(n % 26 != 0){\n \tres = (char)(n % 26 + (int)'A' -1) +res;\n \tn = n /26;\n \t}else{\n \t\tres = 'Z' + res;\n \t\tn = n / 26 - 1;\n \t\tif(n == 0) break;\n \t}\n }\n return res;\n }", "static String convertToTitle(int n) {\n char a = 'A';\n StringBuilder sb = new StringBuilder();\n while (n / 26 > 0 && n != 26) {\n int temp = n % 26;\n if (n % 26 == 0) {\n sb.append((char) (a + 25));\n n = n/26-1;\n } else {\n sb.append((char) (a + temp-1));\n n /= 26;\n }\n\n }\n sb.append((char) (a + n - 1));\n return sb.reverse().toString();\n }", "static char intToBase(int val)\n\t{\n\t\tif(val == 0)\n\t\t{\n\t\t\treturn 'A';\n\t\t}\n\t\tif(val == 1)\n\t\t{\n\t\t\treturn 'C';\n\t\t}\n\t\tif(val == 2)\n\t\t{\n\t\t\treturn 'G';\n\t\t}\n\t\treturn 'T';\n\t}", "public String covertToAscii(int num){\n\t\t\n\t\tString result=\"\";\n\t\t//int i=result.length -1;\n\t\tint rem;\n\t\tif(num==0){\n\t\t\treturn \"0\";\n\t\t}\n\t\tboolean negative=(num<0);\n\t\tif(negative){\n\t\t\tnum=0-num;\n\t\t}\n\t\t//works for integers with base 10\n\t\twhile(num>0){\n\t\t\trem=num%10;\n\t\t\tnum=num/10;\n\t\t\tresult=(char)(rem+'0')+result;\n\t\t}\n\t\tif(negative){\n\t\t\tresult=\"-\"+result;\n\t\t}\n\t\treturn result;\n\t}", "private void convertDigit(int i)\n {\n if(tempString.charAt(i) == '0' && i == 0)//Checks to see if the digit is equal to '0' and the first character.\n {\n tempString.replace(i, i+1, \"Zero\"); //Converts to capitalized version.\n }\n else if(tempString.charAt(i) == '0' && i != 0) //If it's equal to '0' and not the first, then not capital.\n tempString.replace(i, i+1, \"zero\"); //Converts to non-capitalized version.\n //The rest are very similar to the one above for numbers 1-9.\n if(tempString.charAt(i) == '1' && i == 0)\n {\n tempString.replace(i, i+1, \"One\");\n }\n else if(tempString.charAt(i) == '1' && i != 0)\n tempString.replace(i, i+1, \"one\");\n \n if(tempString.charAt(i) == '2' && i == 0)\n {\n tempString.replace(i, i+1, \"Two\");\n }\n else if(tempString.charAt(i) == '2' && i != 0)\n tempString.replace(i, i+1, \"two\");\n \n if(tempString.charAt(i) == '3' && i == 0)\n {\n tempString.replace(i, i+1, \"Three\");\n }\n else if(tempString.charAt(i) == '3' && i != 0)\n tempString.replace(i, i+1, \"three\");\n \n if(tempString.charAt(i) == '4' && i == 0)\n {\n tempString.replace(i, i+1, \"Four\");\n }\n else if(tempString.charAt(i) == '4' && i != 0)\n tempString.replace(i, i+1, \"four\");\n \n if(tempString.charAt(i) == '5' && i == 0)\n {\n tempString.replace(i, i+1, \"Five\");\n }\n else if(tempString.charAt(i) == '5' && i != 0)\n tempString.replace(i, i+1, \"five\");\n \n if(tempString.charAt(i) == '6' && i == 0)\n {\n tempString.replace(i, i+1, \"Six\");\n }\n else if(tempString.charAt(i) == '6' && i != 0)\n tempString.replace(i, i+1, \"six\");\n \n if(tempString.charAt(i) == '7' && i == 0)\n {\n tempString.replace(i, i+1, \"Seven\");\n }\n else if(tempString.charAt(i) == '7' && i != 0)\n tempString.replace(i, i+1, \"seven\");\n \n if(tempString.charAt(i) == '8' && i == 0)\n {\n tempString.replace(i, i+1, \"Eight\");\n }\n else if(tempString.charAt(i) == '8' && i != 0)\n tempString.replace(i, i+1, \"eight\");\n \n if(tempString.charAt(i) == '9' && i == 0)\n {\n tempString.replace(i, i+1, \"Nine\");\n }\n else if(tempString.charAt(i) == '9' && i != 0)\n tempString.replace(i, i+1, \"nine\");\n }", "@Test\n public void testConvertDigitsToLettersForMultipleDigits() {\n\n Integer[] argArray = new Integer[]{3, 4,5};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"dgj dgk dgl dhj dhk dhl dij dik dil egj egk egl ehj ehk ehl eij eik eil fgj fgk fgl fhj fhk fhl fij fik fil\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }", "static void asciiToSentence(String str, int len) \n { \n int num = 0; \n for (int i = 0; i < len; i++) { \n \n // Append the current digit \n num = num * 10 + (str.charAt(i) - '0'); \n \n // If num is within the required range \n if (num >= 32 && num <= 122) { \n \n // Convert num to char \n char ch = (char)num; \n System.out.print(ch); \n \n // Reset num to 0 \n num = 0; \n } \n } \n }", "public static String dtrmn(int number) {\n\t\t\n\t\tString letter = \"\";\n\t\t\n\t\tint cl = number / 100;\n\t\tif (cl != 9 && cl != 4) {\n\t\t\t\n\t\t\tif (cl < 4) {\n\t\t\t\t\n\t\t\t\tfor(int i = 1; i <= cl; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if (cl < 9 && cl > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"D\";\n\t\t\t\tfor (int i = 1; i <= cl - 5; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if(cl == 10) { \n\t\t\t\t\n\t\t\t\tletter = letter + \"M\";\n\t\t\t}\n\t\t} else if (cl == 4) {\n\t\t\t\n\t\t\tletter = letter + \"CD\";\n\t\t\t\n\t\t} else if (cl == 9) {\n\t\t\t\n\t\t\tletter = letter + \"CM\";\n\t\t}\n\t\t\n\t\tint cl1 = (number % 100)/10;\n\t\tif (cl1 != 9 && cl1 != 4) {\n\t\t\t\n\t\t\tif (cl1 < 4) {\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t} else if (cl1 < 9 && cl1 > 4) {\n\t\t\t\tletter = letter + \"L\";\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1 -5; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else if (cl1 == 4) {\n\t\t\tletter = letter + \"XL\";\n\t\t} else if (cl1 == 9) {\n\t\t\tletter = letter + \"XC\";\n\t\t}\n\t\t\n\t\tint cl2 = (number % 100)%10;\n\t\t\n\t\tif (cl2 != 9 && cl2 != 4) {\n\t\t\t\n\t\t\tif (cl2 < 4) {\n\t\t\t\tfor (int i = 1; i <= cl2; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t} else if (cl2 < 9 && cl2 > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"V\";\n\t\t\t\tfor (int i = 1; i <= cl2-5; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else if (cl2 == 4) {\n\t\t\tletter = letter +\"IV\";\n\t\t} else if (cl2 == 9) {\n\t\t\tletter = letter + \"IX\";\n\t\t}\n\t\treturn letter;\n\t}", "abstract String convertEnglishNumber(String number);", "public char convertToCharacter(int letterThatIsNumber)\n\t{\n\t\treturn characters[letterThatIsNumber];\n\t}", "static String converToTitle2(int n) {\n StringBuilder result = new StringBuilder();\n\n while(n>0){\n n--;\n result.append((char)('A' + n % 26));\n n /= 26;\n }\n\n return result.reverse().toString();\n }", "@Test\n public void basicNumberSerializerTest() {\n int[] input = {0, 1, 2, 3};\n\n // Want to map 0 -> \"d\", 1 -> \"c\", 2 -> \"b\", 3 -> \"a\"\n char[] alphabet = {'d', 'c', 'b', 'a'};\n\n String expectedOutput = \"dcba\";\n assertEquals(expectedOutput,\n DigitsToStringConverter.convertDigitsToString(\n input, 4, alphabet));\n }", "public static String calculateLetter(int dniNumber) {\n String letras = \"TRWAGMYFPDXBNJZSQVHLCKEU\";\n int indice = dniNumber % 23;\n return letras.substring(indice, indice + 1);\n }", "public char index2letter(int i) { \t\n \treturn (char) (i + 'A');\n }", "public String convertToTitle(int n) {\n StringBuilder res = new StringBuilder();\n while (n > 0){\n n--;\n res.insert(0,(char) (n % 26 + 'A'));\n n /= 26;\n }\n return res.toString();\n }", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private String number() {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return Integer.toString(getValue());\n }\n }", "public char encodeLetter(char letterToEncode)\n\t{\n\t\tint charAsInt;\n\t\tchar intAsChar;\n\t\t\n\t\tletterToEncode = plugboard.substitute(letterToEncode);\n\t\tcharAsInt = convertToInteger(letterToEncode);\n\t\t\n\t\t//loops through each of the 3 rotors assigning them substitute() mehtod\n\t\tfor(int slot = 0; slot < rotors.length; slot++)\n\t\t{\n\t\t\tcharAsInt = rotors[slot].substitute(charAsInt);\n\t\t}\n\t\t\n\t\tcharAsInt = reflector.substitute(charAsInt);\n\t\t\n\t\t//loops once again through each of the three rotors assigning them substituteBack method\n\t\tfor(int slot = rotors.length-1; slot >= 0; slot--)\n\t\t{\n\t\t\tcharAsInt = rotors[slot].substituteBack(charAsInt);\n\t\t}\n\t\t\n\t\tintAsChar = convertToCharacter(charAsInt);\n\t\tintAsChar = plugboard.substitute(intAsChar);\n\t\trotors[0].rotate();\n\t\t\n\t\treturn intAsChar;\n\t}", "public static char Ascii(int numero) {\n\n char valorAcsii = (char) numero; //convercion a letra # - numero (char)\n\n return valorAcsii;\n }", "@Test\n public void testConvertDigitsToLettersForSingleDigits() {\n\n Integer[] argArray = new Integer[]{2};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"a b c\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }", "@Test\n public void longerNumberSerializerTest(){\n int[] input3 = {0,1,2,3,4,5,6};\n \n // Want to map 0 -> \"z\", 1 -> \"e\", 2 -> \"d\", 3 -> \"r\",\n // 4 -> \"o\", 5 -> \"a\", 6 -> \"t\"\n char[] alphabet3 = {'z', 'e', 'd', 'r','o','a','t'};\n \n String expectedOutput3 = \"zedroat\";\n assertEquals(expectedOutput3,\n DigitsToStringConverter.convertDigitsToString(\n input3, 7, alphabet3));\n }", "void increaseSortLetter();", "public static char letterGrade(Integer average)\n {\n switch (average / 10)\n {\n case 10: case 9:\n return 'A';\n case 8:\n return 'B';\n case 7:\n return 'C';\n case 6:\n return 'D';\n default:\n return 'F';\n }\n }", "@Test\n public void testConvertDigitsToLettersForCludingZero() {\n\n Integer[] argArray = new Integer[]{2,0};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"a b c\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }", "@Test\n public void testConvertDigitsToLettersForParamZeroAndOneDigits() {\n Integer[] argArray = new Integer[]{0,1};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n try {\n String s = DigitsToLettersUtils.convertDigitsToLetters(argArray);\n System.out.println(\"output: \" + s);\n Assert.assertEquals(\"\", s);\n } catch (Exception e) {\n Assert.fail();\n }\n }", "public static String posNumberToLetters(String pos)\n\t{\n\t\tif (pos.equalsIgnoreCase(\"1\"))\n\t\t\treturn \"NN\";\n\t\tif (pos.equalsIgnoreCase(\"2\"))\n\t\t\treturn \"VB\";\n\t\tif (pos.equalsIgnoreCase(\"3\"))\n\t\t\treturn \"JJ\";\n\t\tif (pos.equalsIgnoreCase(\"4\"))\n\t\t\treturn \"RB\";\n\t\tif (pos.equalsIgnoreCase(\"5\"))\n\t\t\treturn \"JJ\";\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posNumberToLetters(): bad number: \" + pos);\n\t\treturn \"NN\";\n\t}", "public static String randAlnum(){\n int n;\n String result = null;\n switch (CAPS){\n case 0:\n n = rand.nextInt(62);\n if (n>51){\n result = String.valueOf(n-52);\n }else {\n result = randChar(); //both\n }\n break;\n case 1:\n n = rand.nextInt(36);\n if (n>25){\n result = String.valueOf(n-26);\n }else {\n result = randLower(); //lower\n }\n break;\n case 2:\n n = rand.nextInt(36);\n if (n>25){\n result = String.valueOf(n-26);\n }else {\n result = randUpper(); //upper\n }\n break;\n }\n return result;\n }", "private String convertNumericToLetter (float grade) {\r\n\r\n // letter grades are indexed by grade point\r\n // the letter grade is added (+1) to the gradeCount array\r\n if(grade >= 93 && grade <= 100) { gradeCount[13] += 1; return grades[13]; } // [13] is A+\r\n if(grade >= 86 && grade < 93) { gradeCount[12] += 1; return grades[12]; } // [12] is A\r\n if(grade >= 80 && grade < 86) { gradeCount[11] += 1; return grades[11]; } // .\r\n if(grade >= 77 && grade < 80) { gradeCount[10] += 1; return grades[10]; } // .\r\n if(grade >= 73 && grade < 77) { gradeCount[9] += 1; return grades[9]; } // .\r\n if(grade >= 70 && grade < 73) { gradeCount[8] += 1; return grades[8]; } // .\r\n if(grade >= 67 && grade < 70) { gradeCount[7] += 1; return grades[7]; } // .\r\n if(grade >= 63 && grade < 67) { gradeCount[6] += 1; return grades[6]; } // .\r\n if(grade >= 60 && grade < 63) { gradeCount[5] += 1; return grades[5]; } // .\r\n if(grade >= 57 && grade < 60) { gradeCount[4] += 1; return grades[4]; } // .\r\n if(grade >= 53 && grade < 57) { gradeCount[3] += 1; return grades[3]; } // .\r\n if(grade >= 50 && grade < 53) { gradeCount[2] += 1; return grades[2]; } // .\r\n if(grade >= 35 && grade < 50) { gradeCount[1] += 1; return grades[1]; } // [1] is F\r\n else { gradeCount[0] += 1; return grades[0]; } // [0] is F-\r\n }", "private static int letterToNumber(String str) {\n return (\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".indexOf(str))%26+1;\n }", "private char resolveIntToChar(int i) {\n switch (i) {\n case 1:\n return 'a';\n case 2:\n return 'b';\n case 3:\n return 'c';\n case 4:\n return 'd';\n case 5:\n return 'e';\n case 6:\n return 'f';\n case 7:\n return 'g';\n case 8:\n return 'h';\n default:\n return 'x';\n }\n }", "public static String getLettersOrDigits(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return s;\r\n \r\n // Removes spaces and dashes\r\n StringBuffer buf = new StringBuffer();\r\n int len = s.length();\r\n for (int n = 0; n < len; n++)\r\n {\r\n char c = s.charAt(n);\r\n if (Character.isLetterOrDigit(c))\r\n buf.append(c);\r\n }\r\n return buf.toString();\r\n }", "private String shiftAlphabet(int key) {\n return ALPHABET.substring(key) + ALPHABET.substring(0, key);\n }", "private int convert(int keyCode) {\n\t\tif (keyCode >= 96 && keyCode <= 105) {\n\t\t\treturn keyCode - 48;\n\t\t} else if (keyCode == 81) { // qwertyuiop -> 0-9\n\t\t\tkeyCode = 49;\n\t\t} else if (keyCode == 87) {\n\t\t\tkeyCode = 50;\n\t\t} else if (keyCode == 69) {\n\t\t\tkeyCode = 51;\n\t\t} else if (keyCode == 82) {\n\t\t\tkeyCode = 52;\n\t\t} else if (keyCode == 84) {\n\t\t\tkeyCode = 53;\n\t\t} else if (keyCode == 89) {\n\t\t\tkeyCode = 54;\n\t\t} else if (keyCode == 85) {\n\t\t\tkeyCode = 55;\n\t\t} else if (keyCode == 37) {\n\t\t\tkeyCode = 56;\n\t\t} else if (keyCode == 79) {\n\t\t\tkeyCode = 57;\n\t\t} else if (keyCode == 80) {\n\t\t\tkeyCode = 48;\n\t\t}\n\t\treturn keyCode;\n\t}", "private String getLetterGrade(double score) {\n int i = (int) score;\n switch (i) {\n case 100:\n case 90:\n return \"A\";\n case 80:\n return \"B\";\n case 70:\n return \"C\";\n case 60:\n return \"D\";\n default:\n return \"F\";\n }\n }", "public String cipherText(String str, String key)\n{\n String cipher_text=\"\";\n \n for (int i = 0; i < str.length(); i++)\n {\n // converting in range 0-25\n if(str.charAt(i) == ' ' || str.charAt(i) == '\\n')\n cipher_text+= str.charAt(i);\n else{ \n int x = (str.charAt(i) + key.charAt(i)) %26;\n // convert into alphabets(ASCII)\n x += 'A';\n \n cipher_text+=(char)(x);}\n }\n return cipher_text;\n}", "public static String alphaKey(int value) {\n if (value < 1) {\n return \"a\";\n }\n if (value < 10) {\n return \"b\" + value;\n }\n if (value < 100) {\n return \"c\" + value;\n }\n if (value < 1000) {\n return \"d\" + value;\n }\n if (value < 10000) {\n return \"e\" + value;\n }\n if (value < 100000) {\n return \"f\" + value;\n }\n if (value < 1000000) {\n return \"g\" + value;\n }\n if (value < 10000000) {\n return \"h\" + value;\n }\n if (value < 100000000) {\n return \"i\" + value;\n }\n if (value < 1000000000) {\n return \"j\" + value;\n }\n return \"k\" + value;\n }", "public static String caesarify(String text, int key) {\r\n String newText = \"\";\r\n String alpha = shiftAlphabet(0);\r\n String newAlpha = shiftAlphabet(key);\r\n\r\n for (int i = 0; i < text.length(); i++) {\r\n String currentLetter = String.valueOf(text.charAt(i));\r\n int indexOfLetter = alpha.indexOf(currentLetter);\r\n String letterReplacement = String.valueOf(newAlpha.charAt(indexOfLetter));\r\n\r\n newText += letterReplacement;\r\n\r\n }\r\n return newText;\r\n }", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "private static char toHexChar(final int number) {\n\t\tif (number >= 0x00 && number <= 0x09) {\n\t\t\t// ASCII codes from 0 to 9\n\t\t\treturn (char) (0x30 + number);\n\t\t} else if (number >= 0x0a && number <= 0x0f) {\n\t\t\t// ASCII codes from 'a' to 'f'\n\t\t\treturn (char) (0x57 + number);\n\t\t}\n\t\treturn 0;\n\t}", "char getContactLetter(ContactSortOrder sortOrder);", "char toChar(int index) {\n return _letters.charAt(index);\n }", "public String originalText(String cipher_text, String key)\n{\n String orig_text=\"\";\n \n for (int i = 0 ; i < cipher_text.length() && \n i < key.length(); i++)\n {\n if(cipher_text.charAt(i) == ' ' || cipher_text.charAt(i) == '\\n')\n orig_text+=cipher_text.charAt(i);\n else{\n // converting in range 0-25\n int x = (cipher_text.charAt(i) - \n key.charAt(i) + 26) %26; \n // convert into alphabets(ASCII)\n x += 'A';\n orig_text+=(char)(x);\n }\n }\n return orig_text;\n}", "public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}", "@Test\n public void testToChar() {\n Object[][] datas = new Object[][]{\n {1, '1'},\n {5, '5'},\n {10, 'A'},\n {11, 'B'},\n {12, 'C'},\n {13, 'D'},\n {14, 'E'},\n {15, 'F'}\n };\n for (Object[] data : datas) {\n char result = Tools.toChar((Integer) data[0]);\n char expResult = (Character) data[1];\n assertEquals(result, expResult);\n System.out.println(\"testToChar()\");\n }\n }", "private static String intToWord(int n) {\n if(n < 0 || n > 9)\n throw new IllegalArgumentException(\"Number should be between 0-9\");\n\n switch(n) {\n case 0: return \"\";\n case 1: return \"one\";\n case 2: return \"two\";\n case 3: return \"three\";\n case 4: return \"four\";\n case 5: return \"five\";\n case 6: return \"six\";\n case 7: return \"seven\";\n case 8: return \"eight\";\n case 9: return \"nine\";\n default: return null;\n }\n }", "public void conversionTest(){\n String test = \"ABCDEFabcdef123!#\";\n for(int k=0; k < test.length(); k++){\n char ch = test.charAt(k);\n char uch = Character.toUpperCase(ch);\n char lch = Character.toLowerCase(ch);\n System.out.println(ch+\" \"+uch+\" \"+lch);\n }\n }", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public String digit(String digit);", "protected String int2singlealphaCount(long val, CharArrayWrapper table)\n {\n\n int radix = table.getLength();\n\n // TODO: throw error on out of range input\n if (val > radix)\n {\n return getZeroString();\n }\n else\n return (new Character(table.getChar((int)val - 1))).toString(); // index into table is off one, starts at 0\n }", "private char convert(char Char) {\n int num = (int) Char;\n\n num = (num - '0' + 7) % 10; // Subtracts '0' to get the integer value and the\n // rest is as instructed\n Char = (char) (num + '0'); // Translates it back to ASCII value by adding '0'\n\n return Char;\n\n }", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }", "public String convertToString(int i) {\n\t\tswitch (i) {\n\t\t\tcase 0: return \"\";\n\t\t\tcase 1: return \"1\";\n\t\t\tcase 2: return \"2\";\n\t\t\tcase 3: return \"3\";\n\t\t\tcase 4: return \"4\";\n\t\t\tcase 5: return \"5\";\n\t\t\tcase 6: return \"6\";\n\t\t\tcase 7: return \"7\";\n\t\t\tcase 8: return \"8\";\n\t\t\tcase 9: return \"9\";\n\t\t\tcase 10: return \"A\";\n\t\t\tcase 11: return \"B\";\n\t\t\tcase 12: return \"C\";\n\t\t\tcase 13: return \"D\";\n\t\t\tcase 14: return \"E\";\n\t\t\tcase 15: return \"F\";\n\t\t\tcase 16: return \"G\";\n\t\t\tcase 17: return \"H\";\n\t\t\tcase 18: return \"I\";\n\t\t\tcase 19: return \"J\";\n\t\t\tcase 20: return \"K\";\n\t\t\tcase 21: return \"L\";\n\t\t\tcase 22: return \"M\";\n\t\t\tcase 23: return \"N\";\n\t\t\tcase 24: return \"O\";\n\t\t\tcase 25: return \"P\";\n\t\t\tcase 26: return \"Q\";\n\t\t\tcase 27: return \"R\";\n\t\t\tcase 28: return \"S\";\n\t\t\tcase 29: return \"T\";\n\t\t\tcase 30: return \"U\";\n\t\t\tcase 31: return \"V\";\n\t\t\tcase 32: return \"W\";\n\t\t\tcase 33: return \"X\";\n\t\t\tcase 34: return \"Y\";\n\t\t\tcase 35: return \"Z\";\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t return \"0\";\n\t\t}\n }", "private void transNumberToJustDigits(String number) {\n String[] justDigits = number.split(\"-\");\n\n for (String justDigit : justDigits) {\n numberWithoutDashes += justDigit;\n }\n\n }", "public static String Caesarify(String Normal, int InputNo) {\n Scanner input = new Scanner(System.in);\r\n int TotalChar = Normal.length(); //total length\r\n String NewNormal = Normal;\r\n String Empty =\"\";\r\n //calculation to get the letters after shift\r\n StringBuffer rtnString = new StringBuffer();\r\n\r\n for (int n = 0; n < TotalChar; n++) {\r\n /*while (InputNo >=27) {\r\n System.out.println(\"Please input your number\");\r\n InputNo = input.nextInt();\r\n }*/\r\n String fixChar = Normal.substring(n, n + 1);\r\n int AlphaNo = shiftAlphabet(0).indexOf(fixChar);\r\n String AlphaChar = shiftAlphabet(InputNo).substring(AlphaNo, AlphaNo + 1);\r\n //rtnString.append(AlphaChar);\r\n for(int j=0;j<AlphaChar.length();j++) {\r\n char vowel = (AlphaChar).charAt(j);\r\n if (vowel == 'A' || vowel == 'E' || vowel == 'I' || vowel == 'O' || vowel == 'U' || vowel == 'Y') {\r\n rtnString.append(\"OB\");\r\n }\r\n rtnString.append(AlphaChar.charAt(j));\r\n }\r\n }\r\n System.out.println(rtnString);\r\n return String.valueOf(rtnString);\r\n }", "private String convert99(int num) {\r\n\t\t\r\n\t\t//check if number is within 20\r\n\t\tif(num<TWENTY) {\r\n\t\t\treturn lowNames[num];\r\n\t\t}\r\n\t\t\r\n\t\t// fetch the appropriate value from tenNames array\r\n\t\tStringBuilder str=new StringBuilder(tenNames[num / TEN - TWO]);\r\n\t\t\r\n\t\t//check if number is divisible by 10 and remainder is zero\r\n\t\tif(num % TEN == ZERO) {\r\n\t\t\treturn str.toString();\r\n\t\t}\r\n\t\t\r\n\t\t//number is neither below 20 nor divisible by 10 and remainder is zero\r\n\t\tstr.append(SPACE);\r\n\t\treturn str.append(lowNames[num % TEN]).toString();\r\n\t}", "static StringBuffer convert(String conv_Number){\r\n StringBuffer obj = new StringBuffer(conv_Number);\r\n for (int i=0 ; i<obj.length();i++){\r\n if(obj.charAt(i)<48 || obj.charAt(i)>57){\r\n obj.deleteCharAt(i);\r\n }}\r\n return obj;\r\n//* aurther=====================================================================@Wajaht Masood_003_assign\r\n }", "public static String convertToTitle(int columnNumber) {\n StringBuilder result = new StringBuilder();\n while (columnNumber > 0) {\n columnNumber--;\n int rest = columnNumber % 26;\n result.insert(0, (char) ('A' + rest));\n columnNumber /= 26;\n }\n return result.toString();\n }", "public static String intToNumeral(int number)\n\t{\n\t\tString numeral = \"\";\n\t\twhile(number > 0)\n\t\t{\n\t\t\tif(number >= 1000)\n\t\t\t{\n\t\t\t\tnumber -= 1000;\n\t\t\t\tnumeral = numeral + \"M\";\n\t\t\t}\n\t\t\telse if(number >= 900)\n\t\t\t{\n\t\t\t\tnumber -= 900;\n\t\t\t\tnumeral = numeral + \"CM\";\n\t\t\t}\n\t\t\telse if(number >= 500)\n\t\t\t{\n\t\t\t\tnumber -= 500;\n\t\t\t\tnumeral = numeral + \"D\";\n\t\t\t}\n\t\t\telse if(number >= 400)\n\t\t\t{\n\t\t\t\tnumber -= 400;\n\t\t\t\tnumeral = numeral + \"DC\";\n\t\t\t}\n\t\t\telse if(number >= 100)\n\t\t\t{\n\t\t\t\tnumber -= 100;\n\t\t\t\tnumeral = numeral + \"C\";\n\t\t\t}\n\t\t\telse if(number >= 90)\n\t\t\t{\n\t\t\t\tnumber -= 90;\n\t\t\t\tnumeral = numeral + \"XC\";\n\t\t\t}\n\t\t\telse if(number >= 50)\n\t\t\t{\n\t\t\t\tnumber -= 50;\n\t\t\t\tnumeral = numeral + \"L\";\n\t\t\t}\n\t\t\telse if(number >= 40)\n\t\t\t{\n\t\t\t\tnumber -= 40;\n\t\t\t\tnumeral = numeral + \"XL\";\n\t\t\t}\n\t\t\telse if(number >= 10)\n\t\t\t{\n\t\t\t\tnumber -= 10;\n\t\t\t\tnumeral = numeral + \"X\";\n\t\t\t}\n\t\t\telse if(number >= 9)\n\t\t\t{\n\t\t\t\tnumber -= 9;\n\t\t\t\tnumeral = numeral + \"IX\";\n\t\t\t}\n\t\t\telse if(number >= 5)\n\t\t\t{\n\t\t\t\tnumber -= 5;\n\t\t\t\tnumeral = numeral + \"V\";\n\t\t\t}\n\t\t\telse if(number >= 4)\n\t\t\t{\n\t\t\t\tnumber -= 4;\n\t\t\t\tnumeral = numeral + \"IV\";\n\t\t\t}\n\t\t\telse if(number >= 1)\n\t\t\t{\n\t\t\t\tnumber -= 1;\n\t\t\t\tnumeral = numeral + \"I\";\n\t\t\t}\n\t\t\tif(number < 0) return \"ERROR\";\n\t\t}\n\t\treturn numeral;\n\t}", "public static void printAtoZ(){\n\n for (char i = 'A'; i <= 'Z'; i++) {\n\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "public static void printLowerCase()\n {\n for(char i = 'a'; i <= 'z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "private String getStringBase(int n1){\n return Integer.toString(n1, base).toUpperCase();\n }", "public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }", "@Test\n public void testConvertDigitsToLettersForGreaterThanUsing() {\n Integer[] argArray = new Integer[]{100};\n System.out.println(\"input: arr[] = {\" + StringUtils.join(argArray,\",\")+\"}\");\n try {\n DigitsToLettersUtils.convertDigitsToLetters(argArray);\n Assert.fail();\n } catch (Exception e) {\n System.out.println(\"output: \" + e.getMessage());\n Assert.assertEquals(\"error:The input parameter is null or the value is greater than 99\",e.getMessage());\n }\n }", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "public static String toAscii(String s){\r\n StringBuilder sb = new StringBuilder();\r\n long asciiInt;\r\n // loop through all values in the string, including blanks\r\n for (int i = 0; i < s.length(); i++){\r\n //getting Ascii value of character and adding it to the string.\r\n char c = s.charAt(i);\r\n asciiInt = (int)c; \r\n sb.append(asciiInt);\r\n }\r\n return String.valueOf(sb);\r\n }", "private static long convertNumber(String text, int base)\r\n\t{\r\n\t\tlong result = 0;\r\n\t\ttext = text.toLowerCase();\r\n\t\tfor (int i = 2; i < text.length(); i++)\r\n\t\t{\r\n\t\t\tint d;\r\n\t\t\tchar c = text.charAt(i);\r\n\t\t\tif (c > '9')\r\n\t\t\t\td = (int) (c - 'a') + 10;\r\n\t\t\telse\r\n\t\t\t\td = (int) (c - '0');\r\n\t\t\tresult = (result * base) + d;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "char cipher(int charToCipher);", "int lower();", "static int charToInt(char c) {\n if (c >= 'A' && c <= 'Z') return c - 'A';\n else if (c >= 'a' && c <= 'z') return c - 'a' + 26;\n else return -1;\n }", "private boolean isAlphaNumeric(char toCheck) {\n return isAlpha(toCheck) || isDigit(toCheck);\n }", "private String decideLetter(Cell c) {\n String s = \"\";\n if (!c.getHasBoat() && !c.getShotAt()) {\n s = \"-\";\n } else if (!c.getHasBoat() && c.getShotAt()) {\n s = \"M\";\n } else if (c.getHasBoat() && !c.getShotAt()) {\n s = \"B\";\n } else {\n s = \"H\";\n }\n return s;\n }", "public String getAlphaNumericString(int n) \n\t {\n\t String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\t + \"0123456789\"\n\t + \"abcdefghijklmnopqrstuvxyz\"; \n\t \n\t // create StringBuffer size of AlphaNumericString \n\t StringBuilder sb = new StringBuilder(n); \n\t \n\t for (int i = 0; i < n; i++) { \n\t \n\t // generate a random number between \n\t // 0 to AlphaNumericString variable length \n\t int index \n\t = (int)(AlphaNumericString.length() \n\t * Math.random()); \n\t \n\t // add Character one by one in end of sb \n\t sb.append(AlphaNumericString \n\t .charAt(index)); \n\t } \n\t \n\t return sb.toString(); \n\t }", "public String covertIng(int num) {\n\t\tchar[] digits = new char[10];\r\n\t\t\r\n\t\tboolean sign = num >= 0 ? true : false;\r\n\t\tint idx = 0;\r\n\t\t\r\n\t\twhile(idx <digits.length){\r\n\t\t\tdigits[idx] = toChar(num % 10);\r\n\t\t\tnum = num /10;\r\n\t\t\tif(num== 0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tidx++;\r\n\t\t}\r\n\t\t\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif(!sign)\r\n\t\t\tsb.append('-');\r\n\t\t\r\n\t\twhile(idx>=0){\r\n\t\t\tsb.append(digits[idx--]);\r\n\t\t}\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t\t\r\n\t}", "private String replaceSpecialCharactersFromNumber(String number) {\n\t\tnumber = number.replaceAll(\"[^a-zA-Z0-9]\", \"\");\n\t\treturn number;\n\t}", "private char computeCheckDigit(final String taxId) {\n final int lettersInAlphabet = 26;\n final int maxOdd = 13, maxEven = 14;\n final int[] setdisp = { 1, 0, 5, 7, 9, 13, 15, 17, 19, 21, 2, 4, 18, 20, 11, 3, 6, 8, 12,\n 14,\n 16, 10, 22, 25, 24, 23 };\n int charWeight = 0, aChar;\n for (int i = 1; i <= maxOdd; i += 2) {\n aChar = taxId.charAt(i);\n if (aChar >= '0' && aChar <= '9') {\n charWeight = charWeight + aChar - '0';\n } else {\n charWeight = charWeight + aChar - 'A';\n }\n }\n for (int i = 0; i <= maxEven; i += 2) {\n aChar = taxId.charAt(i);\n if (aChar >= '0' && aChar <= '9') {\n aChar = aChar - '0' + 'A';\n }\n charWeight = charWeight + setdisp[aChar - 'A'];\n }\n return (char) (charWeight % lettersInAlphabet + 'A');\n }", "static String m33125a(String name) {\n StringBuilder fieldNameBuilder = new StringBuilder();\n int index = 0;\n char firstCharacter = name.charAt(0);\n int length = name.length();\n while (index < length - 1 && !Character.isLetter(firstCharacter)) {\n fieldNameBuilder.append(firstCharacter);\n index++;\n firstCharacter = name.charAt(index);\n }\n if (Character.isUpperCase(firstCharacter)) {\n return name;\n }\n fieldNameBuilder.append(m33124a(Character.toUpperCase(firstCharacter), name, index + 1));\n return fieldNameBuilder.toString();\n }", "void decreaseSortLetter();", "void circulardecode()\n{\nfor(i=0;i<s.length();i++)\n{\nc=s.charAt(i);\nk=(int)c;\nif(k==90)\nk1=65;\nelse\nif(k==122)\nk1=97;\nelse\nk1=k+1;\nc1=caseconverter(k,k1);\nSystem.out.print(c1);\n}\n}", "static String getAlphaNumericString(int n) \n {\n byte[] array = new byte[256]; \n new Random().nextBytes(array); \n \n String randomString \n = new String(array, Charset.forName(\"UTF-8\")); \n \n // Create a StringBuffer to store the result \n StringBuffer r = new StringBuffer(); \n \n // Append first 20 alphanumeric characters \n // from the generated random String into the result \n for (int k = 0; k < randomString.length(); k++) { \n \n char ch = randomString.charAt(k); \n \n if (((ch >= 'a' && ch <= 'z') \n || (ch >= 'A' && ch <= 'Z') \n || (ch >= '0' && ch <= '9')) \n && (n > 0)) { \n \n r.append(ch); \n n--; \n } \n } \n \n // return the resultant string \n return r.toString(); \n }", "public static void main(String[] args) {\n\t\tScanner input= new Scanner(System.in);\n\t\tSystem.out.print(\"\tEnter a letter :\");\n\t\t\n\t\tString letter = input.nextLine();\n\t\t\n\t\t\n\t\tfor (int i=0;i<=letter.length()-1;i++) {\n\t\t\tchar le = Character.toUpperCase(letter.charAt(i));\n\t\t\t\n\t\tSystem.out.print(getNumber(le));\n\t\t}\n\t\t\n\n\t}", "public String getName(){\n if(number == 1) return \"ace\";\n if(number == 13) return \"king\";\n if(number == 12) return \"queen\";\n if(number == 11) return \"jack\";\n else return \"\" + number;\n }", "public static String Converterback(String z)\n\t{\n\n\t\t\n\t\tswitch(z)\n\t\t{\n\t\tcase \"10\":\n\t\t\treturn \"A\";\n\t\tcase \"11\":\n\t\t\treturn \"B\";\n\t\tcase \"12\":\n\t\t\treturn \"C\";\n\t\tcase \"13\":\n\t\t\treturn \"D\";\n\t\tcase \"14\":\n\t\t\treturn \"E\";\n\t\tcase \"15\":\n\t\t\treturn \"F\";\n\t\t}\n\t\treturn z;\n\t}", "public static void main(String[] args) \n\t{\n\t\tString str = \"647mahesh\";\n\t\tint size = str.length();\n\t\tint i;\n\t\tfor (i = 0; i < size ; i++)\n\t\t{\n\t\t\tchar split = str.charAt(i);\n\t\t\tif ('0'<=split && split<='8')\n\t\t\tbreak;\n\t\t}\n\t\tString numeric = str.substring(0,i);\n\t\tString alphabets = str.substring(i);\n\t\tSystem.out.println(numeric);\n\t\tSystem.out.println(alphabets);\n\t}", "public int translateNum(int num) {\n String s = String.valueOf(num);\n int a=1,b=1;\n for(int i=s.length()-2; i>-1; i--){\n String tmp = s.substring(i, i+2);\n int c= tmp.compareTo(\"10\") >= 0 && tmp.compareTo(\"25\") <= 0 ? a+b:a;\n b=a;\n a=c;\n }\n return a;\n }", "public static int convert(char c) {\n switch (c) {\n case 'A': return 0;\n case 'T': return 1;\n case 'G': return 2;\n case 'C': return 3;\n default: return 4;\n }\n }", "public void Converter(String lines, StringBuilder cLines)\r\n {\r\n if(Character.isDigit(cLines.charAt(0)))//seperate if for the character at the 0 position\r\n {\r\n switch(cLines.charAt(0))\r\n {\r\n case '0': cLines.replace(0,1,\"Zero\"); //sets the first character to the correct string and uppercases the first letter\r\n break;\r\n case '1': cLines.replace(0,1,\"One\");\r\n break;\r\n case '2': cLines.replace(0,1,\"Two\");\r\n break;\r\n case '3': cLines.replace(0,1,\"Three\");\r\n break;\r\n case '4': cLines.replace(0,1,\"Four\");\r\n break;\r\n case '5': cLines.replace(0,1,\"Five\");\r\n break;\r\n case '6': cLines.replace(0,1,\"Six\");\r\n break;\r\n case '7': cLines.replace(0,1,\"Seven\");\r\n break;\r\n case '8': cLines.replace(0,1,\"Eight\");\r\n break;\r\n case '9': cLines.replace(0,1,\"Nine\");\r\n break;\r\n \r\n \r\n }\r\n \r\n \r\n }\r\n \r\n for(int i = 1 ; i < lines.length() ; i++)// this for is used to check the remaining characters after the first character\r\n {\r\n if(Character.isDigit(cLines.charAt(i)))\r\n { \r\n if(Character.isSpaceChar(cLines.charAt(i+1))&& Character.isSpaceChar(cLines.charAt(i-1)))//if statement to make sure its not a double digit\r\n {\r\n switch(cLines.charAt(i))\r\n {\r\n case '0': cLines.replace(i,i+1,\"zero\");//statements for switch to change digits to strings lowercase\r\n break;\r\n case '1': cLines.replace(i,i+1,\"one\");\r\n break;\r\n case '2': cLines.replace(i,i+1,\"two\");\r\n break;\r\n case '3': cLines.replace(i,i+1,\"three\");\r\n break;\r\n case '4': cLines.replace(i,i+1,\"four\");\r\n break;\r\n case '5': cLines.replace(i,i+1,\"five\");\r\n break;\r\n case '6': cLines.replace(i,i+1,\"six\");\r\n break;\r\n case '7': cLines.replace(i,i+1,\"seven\");\r\n break;\r\n case '8': cLines.replace(i,i+1,\"eight\");\r\n break;\r\n case '9': cLines.replace(i,i+1,\"nine\");\r\n break;\r\n \r\n \r\n }\r\n }\r\n }\r\n } \r\n \r\n stbrLines = cLines;\r\n stringLines = lines;\r\n }", "public String nextTurn() {\n\t\tString turn = \"\";\n\t\tnum ++;\n\t\tif (num==100 && letter!='Z') {\n\t\t\tletter += 1;\n\t\t\tnum = 0;\n\t\t\tturn = letter+\"0\"+String.valueOf(num);\n\t\t}\n\t\telse if (num==100 && letter=='Z') {\n\t\t\tletter = 'A';\n\t\t\tnum = 0;\n\t\t\tturn = letter+\"0\"+String.valueOf(num);\n\t\t}\n\t\telse if (num>10) {\n\t\t\tturn = letter+String.valueOf(num);\n\t\t}\n\t\telse {\n\t\t\tturn = letter+\"0\"+String.valueOf(num);\n\t\t}\n\t\treturn turn;\n\t}", "public static char getRandomLowerCaseLetter(){\n\t\treturn getRandomCharacter('a','z');\n\t}", "public static char getDigitCharacter(){\n\t\treturn getRandomCharacter('0','9');\n\t}", "public static String getAlphaNumericString(int n) \n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\";\n \n // create StringBuffer size of AlphaNumericString \n StringBuilder sb = new StringBuilder(n); \n \n for (int i = 0; i < n; i++) { \n \n // generate a random number between \n // 0 to AlphaNumericString variable length \n int index \n = (int)(AlphaNumericString.length() \n * Math.random()); \n \n // add Character one by one in end of sb \n sb.append(AlphaNumericString \n .charAt(index)); \n } \n \n return sb.toString(); \n }", "public char getGradeLetter() {\n\t\t\n\t\t// get the current overall grade\n\t\tdouble overallAverage = averages[OVERALL];\n\t\t\n\t\t// check its value and return the correct letter\n\t\tif (overallAverage < 60) \n\t\t\treturn 'F';\n\t\telse if (overallAverage < 70) \n\t\t\treturn 'D';\n\t\telse if (overallAverage < 80) \n\t\t\treturn 'C';\n\t\telse if (overallAverage < 90) \n\t\t\treturn 'B';\n\t\telse\n\t\t\treturn 'A';\n\t}", "private void prepNumberKeys() {\r\n int numDigits = 10;\r\n for (int i = 0; i < numDigits; i++) {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke((char) ('0' + i)), \"key\" + i);\r\n MAIN_PANEL.getActionMap()\r\n .put(\"key\" + i, new KeyAction(String.valueOf(i)));\r\n } \r\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}", "public static char toSymbol(int value) {\n char symbol;\n if (value < 10 && value > 1) {\n symbol = (char)(value + '0');\n } else if (value == 10) {\n symbol = 'T';\n } else if (value == 11) {\n symbol = 'J';\n } else if (value == 12) {\n symbol = 'Q';\n } else if (value == 13) {\n symbol = 'K';\n } else if (value == 14) {\n symbol = 'A';\n } else {\n System.err.println(\"Error: invalid value\");\n symbol = 'X';\n }\n \n return symbol;\n }" ]
[ "0.7217341", "0.7020619", "0.6691838", "0.66614133", "0.6645744", "0.66420245", "0.66068304", "0.64737016", "0.64688015", "0.64538914", "0.64128906", "0.63809305", "0.63472664", "0.63319474", "0.6319784", "0.63075995", "0.6256813", "0.6253343", "0.624578", "0.6240863", "0.6218897", "0.6205655", "0.61591285", "0.6132838", "0.6129951", "0.6122126", "0.6120399", "0.61150056", "0.61070776", "0.6104039", "0.6066547", "0.60408103", "0.6022058", "0.601756", "0.5996655", "0.59600186", "0.59345794", "0.5921863", "0.59145653", "0.59014606", "0.58972204", "0.5896595", "0.588734", "0.5836297", "0.58264947", "0.58167374", "0.5814668", "0.5802753", "0.5791796", "0.57892376", "0.5773876", "0.57710385", "0.57669973", "0.57645154", "0.5757874", "0.5745639", "0.57076603", "0.570759", "0.5689345", "0.5676712", "0.56640756", "0.56478846", "0.5637793", "0.5628606", "0.56281024", "0.5624202", "0.5621877", "0.56154907", "0.56150377", "0.56124103", "0.55962884", "0.5594279", "0.5591794", "0.55902964", "0.5579232", "0.5571703", "0.5560151", "0.55577093", "0.5553657", "0.55514693", "0.5551021", "0.55494964", "0.5540182", "0.5539637", "0.55340666", "0.5518734", "0.5511164", "0.5505642", "0.54943347", "0.5490628", "0.5488359", "0.54834133", "0.5482598", "0.547937", "0.5471714", "0.54674804", "0.54574025", "0.5456915", "0.544525", "0.54445773", "0.5436932" ]
0.0
-1
A method that encodes a block of text
public String encode(String input) { String encoded = ""; char[] message = input.toCharArray(); for (int j = 0; j < message.length; j++) { //takes input into a array of chars encodingQueue.enqueue(message[j]); } char lastvalue =0; boolean islastvaluenum= false; for(int i=0; i<message.length;i++) { char character = encodingQueue.dequeue(); if(character != ' ') { //if not a space String alphabet = "abcdefghijklmnopqrstuvwxyz"; if(islastvaluenum ==false) { //if last value was not a num, then proceed normally with first set of numbers char encodedvalue=enumerate(character,1); if(encodedvalue !=0) { islastvaluenum = true; lastvalue = encodedvalue; encoded = encoded +encodedvalue; } else { islastvaluenum = false; int shiftvalue = 5+(2*i); boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) { // look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue)% chararray.length]; charfound = true; } } } character = output; lastvalue = character; encoded = encoded+ character; } } else { char encodedvalue=enumerate(character,2);//if last value was a num, then proceed with second set of numbers if(encodedvalue !=0) { islastvaluenum = true; lastvalue = encodedvalue; encoded = encoded +encodedvalue; } else { islastvaluenum = false; int shiftvalue = (5+(2*i))+((lastvalue-'0')*(-2)); boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue)% chararray.length]; charfound = true; } } } character = output; lastvalue = character; encoded = encoded+ character; } } } else{ encoded = encoded + ' '; } } return encoded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void encoding(String plainText)\n\t{\n\t\ttextLength = plainText.length();\n\t\thalfTextLength = textLength / TWO;\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\n\t\t\tif(textLength % TWO != ZERO)\n\t\t\t{\n\t\t\t\tencodingOneHalf = plainText.substring(ZERO, (halfTextLength + ONE));\n\t\t\t\tencodingTwoHalf = plainText.substring(halfTextLength + ONE, textLength);\n\t\t\t} // Ending bracket of if statement\n\t\t\telse\n\t\t\t{\n\t\t\t\tencodingOneHalf = plainText.substring(ZERO, (halfTextLength));\n\t\t\t\tencodingTwoHalf = plainText.substring(halfTextLength, textLength);\n\t\t\t} // Ending bracket of else statement\n\n\t\t\tchar currentLetterOneHalf[] = encodingOneHalf.toCharArray();\n\t\t\tchar currentLetterTwoHalf[] = encodingTwoHalf.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < halfTextLength; i++)\n\t\t\t{\n\t\t\t\tsb.append(currentLetterOneHalf[i]);\n\t\t\t\tsb.append(currentLetterTwoHalf[i]);\n\t\t\t} // Ending bracket of for loop\n\t\t\tif(encodingOneHalf.length() != encodingTwoHalf.length())\n\t\t\t{\n\t\t\t\tsb.append(currentLetterOneHalf[currentLetterOneHalf.length - ONE]);\n\t\t\t} // Ending bracket of if statement\n\n\t\t\tencodedText = sb.toString();\n\t\t\tplainText = encodedText;\n\t\t\tloopIntEncode++;\n\n\t\t} // Ending bracket of do while statement\n\t\twhile(loopIntEncode < shiftAmount);\n\t}", "public String encode(String text) {\n\t\t// TODO fill this in.\n\n\t\tString encodedText = \"\";\n\t\tSystem.out.println(\"text.length(): \" + text.length());\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tString characterCode = encodingTable.get(text.charAt(i));\n\t\t\tSystem.out.println(text.charAt(i));\n\t\t\tencodedText = encodedText.concat(characterCode);\n\t\t}\n\t\tSystem.out.println(\"THISHERE: \\n\" + encodedText + \"\\nTHISEND\");\n\n\t\treturn encodedText;\n\t}", "public String encode(String text) {\n\t\t// TODO fill this in.\n\t\tString binaryCode = \"\";\n\n\t\tchar[] array = text.toCharArray();\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tString code = findPath(c, root, \"\");\n\t\t\tcodeMap.put(c, code);\n\t\t\tSystem.out.println(c + \" \" + code);\t\t\t\t\t\t\t// print char codes\n\t\t}\n\n\t\tfor(char t : array){\n\t\t\tString charCode = codeMap.get(t);\n\t\t\tbinaryCode = binaryCode + charCode;\n\t\t}\n\n\t\treturn binaryCode;\n\t}", "public abstract int encodeUtf8(CharSequence charSequence, byte[] bArr, int i, int i2);", "public String encrypt(String geheimtext);", "public abstract void encodeUtf8Direct(CharSequence charSequence, ByteBuffer byteBuffer);", "public String encode(String text) {\n\t\t// TODO fill this in.\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tsb.append(encodingTable.get(text.charAt(i)));\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }", "private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }", "public static void encode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n char c = BinaryStdIn.readChar();\r\n BinaryStdOut.write((char)index[c]);\r\n for (int i = index[c] - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = c;\r\n index[c] = 0;\r\n }\r\n BinaryStdOut.close();\r\n }", "public String encode(String theInput) {\r\n\t\tif (theInput == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tmyBuffer = new StringBuilder(theInput.length() + 20);\r\n\t\tboolean myAtStartOfLine = true;\r\n\t\tmyInCenter = false;\r\n\t\tboolean myWordWrap = true;\r\n\t\tint myCurrentLineOffset = 0;\r\n\t\tint myTemporaryIndent = 0;\r\n\t\tint myIndent = 0;\r\n\t\tboolean myNeedBreakBeforeNextText = false;\r\n\t\tboolean myInDiv = false;\r\n\t\tmyInBold = 0;\r\n\r\n\t\tfor (int i = 0; i < theInput.length(); i++) {\r\n\r\n\t\t\tchar nextChar = theInput.charAt(i);\r\n\t\t\tboolean handled = true;\r\n\r\n\t\t\tif (nextChar == '\\\\') {\r\n\t\t\t\tint theStart = i + 1;\r\n\t\t\t\tint numericArgument = Integer.MIN_VALUE;\r\n\t\t\t\tint offsetIncludingNumericArgument = 0;\r\n\t\t\t\tString nextFourChars = theInput.substring(theStart, Math.min(theInput.length(), theStart + 4)).toLowerCase();\r\n\t\t\t\tif (theInput.length() >= theStart + 5) {\r\n\t\t\t\t\tchar sep = theInput.charAt(i + 4);\r\n\t\t\t\t\tif (theInput.charAt(i + 1) == '.' && (sep == ' ' || sep == '-' || sep == '+')) {\r\n\t\t\t\t\t\tString nextThirtyChars = theInput.substring(theStart + 3, Math.min(theInput.length(), theStart + 30));\r\n\t\t\t\t\t\tMatcher m = Pattern.compile(\"^([ +-]?[0-9]+)\\\\\\\\\").matcher(nextThirtyChars);\r\n\t\t\t\t\t\tif (m.find()) {\r\n\t\t\t\t\t\t\tString group = m.group(1);\r\n\t\t\t\t\t\t\toffsetIncludingNumericArgument = group.length() + 4;\r\n\t\t\t\t\t\t\tgroup = group.replace('+', ' ').trim();\r\n\t\t\t\t\t\t\tnumericArgument = Integer.parseInt(group);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (nextFourChars.equals(\".br\\\\\")) {\r\n\r\n\t\t\t\t\tcloseCenterIfNeeded();\r\n\t\t\t\t\tif (myNeedBreakBeforeNextText) {\r\n\t\t\t\t\t\taddBreak();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmyNeedBreakBeforeNextText = true;\r\n\t\t\t\t\ti += 4;\r\n\t\t\t\t\tmyAtStartOfLine = true;\r\n\t\t\t\t\tmyInCenter = false;\r\n\t\t\t\t\tmyCurrentLineOffset = 0;\r\n\r\n\t\t\t\t} else if (nextFourChars.startsWith(\"h\\\\\")) {\r\n\r\n\t\t\t\t\tstartBold();\r\n\t\t\t\t\ti += 2;\r\n\r\n\t\t\t\t} else if (nextFourChars.startsWith(\"n\\\\\")) {\r\n\r\n\t\t\t\t\tendBold();\r\n\t\t\t\t\ti += 2;\r\n\r\n\t\t\t\t} else if (nextFourChars.startsWith(\".in\") && myAtStartOfLine && numericArgument != Integer.MIN_VALUE) {\r\n\r\n\t\t\t\t\tmyIndent = numericArgument;\r\n\t\t\t\t\tmyTemporaryIndent = 0;\r\n\t\t\t\t\ti += offsetIncludingNumericArgument;\r\n\r\n\t\t\t\t} else if (nextFourChars.startsWith(\".ti\") && myAtStartOfLine && numericArgument != Integer.MIN_VALUE) {\r\n\r\n\t\t\t\t\tmyTemporaryIndent = numericArgument;\r\n\t\t\t\t\ti += offsetIncludingNumericArgument;\r\n\r\n\t\t\t\t} else if (nextFourChars.equals(\".ce\\\\\")) {\r\n\r\n\t\t\t\t\tcloseCenterIfNeeded();\r\n\t\t\t\t\tif (!myAtStartOfLine) {\r\n\t\t\t\t\t\taddBreak();\r\n\t\t\t\t\t}\r\n\t\t\t\t\taddStartCenter();\r\n\t\t\t\t\ti += 4;\r\n\t\t\t\t\tmyAtStartOfLine = false;\r\n\t\t\t\t\tmyInCenter = true;\r\n\r\n\t\t\t\t} else if (nextFourChars.equals(\".fi\\\\\")) {\r\n\r\n\t\t\t\t\tif (!myWordWrap) {\r\n\t\t\t\t\t\taddEndNoBreak();\r\n\t\t\t\t\t\tmyWordWrap = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti += 4;\r\n\r\n\t\t\t\t} else if (nextFourChars.equals(\".nf\\\\\")) {\r\n\r\n\t\t\t\t\tif (myWordWrap) {\r\n\t\t\t\t\t\taddStartNoBreak();\r\n\t\t\t\t\t\tmyWordWrap = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti += 4;\r\n\r\n\t\t\t\t} else if (nextFourChars.startsWith(\".sp\")) {\r\n\r\n\t\t\t\t\tif (nextFourChars.equals(\".sp\\\\\")) {\r\n\t\t\t\t\t\tnumericArgument = 1;\r\n\t\t\t\t\t\ti += 4;\r\n\t\t\t\t\t} else if (numericArgument != -1) {\r\n\t\t\t\t\t\ti += offsetIncludingNumericArgument;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (numericArgument > 0) {\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < numericArgument; j++) {\r\n\t\t\t\t\t\t\taddBreak();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (int j = 0; j < myCurrentLineOffset; j++) {\r\n\t\t\t\t\t\t\taddSpace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else if (numericArgument == Integer.MIN_VALUE) {\r\n\r\n\t\t\t\t\t\thandled = false;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (nextFourChars.equals(\".sk \") && numericArgument >= 0) {\r\n\r\n\t\t\t\t\tfor (int j = 0; j < numericArgument; j++) {\r\n\t\t\t\t\t\taddSpace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti += offsetIncludingNumericArgument;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\thandled = false;\r\n\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\thandled = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (!handled) {\r\n\r\n\t\t\t\tif (myAtStartOfLine) {\r\n\r\n\t\t\t\t\tint thisLineIndent = Math.max(0, myIndent + myTemporaryIndent);\r\n\t\t\t\t\tif (myNeedBreakBeforeNextText) {\r\n\r\n\t\t\t\t\t\tif (myInDiv) {\r\n\t\t\t\t\t\t\tmyBuffer.append(\"</div>\");\r\n\t\t\t\t\t\t} else if (thisLineIndent == 0) {\r\n\t\t\t\t\t\t\taddBreak();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (thisLineIndent > 0) {\r\n\t\t\t\t\t\tmyBuffer.append(\"<div style=\\\"margin-left: \");\r\n\t\t\t\t\t\tmyBuffer.append(thisLineIndent);\r\n\t\t\t\t\t\tmyBuffer.append(\"em;\\\">\");\r\n\t\t\t\t\t\tmyInDiv = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tswitch (nextChar) {\r\n\t\t\t\tcase '&':\r\n\t\t\t\t\taddAmpersand();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '<':\r\n\t\t\t\t\taddLt();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '>':\r\n\t\t\t\t\taddGt();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif (nextChar >= 160) {\r\n\t\t\t\t\t\taddHighAscii(nextChar);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmyBuffer.append(nextChar);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmyAtStartOfLine = false;\r\n\t\t\t\tmyNeedBreakBeforeNextText = false;\r\n\t\t\t\tmyCurrentLineOffset++;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tendBold();\r\n\r\n\t\tif (!myWordWrap) {\r\n\t\t\taddEndNoBreak();\r\n\t\t}\r\n\t\tcloseCenterIfNeeded();\r\n\r\n\t\tif (myInDiv) {\r\n\t\t\tmyBuffer.append(\"</div>\");\r\n\t\t}\r\n\r\n\t\treturn myBuffer.toString();\r\n\t}", "public static String encode(String inString, String type, String Key) throws Exception{\r\n\t\tStringBuilder encodedString = new StringBuilder();\r\n\t\tString thisString;\r\n\t\tencodedString.append(\"<encrypted type=\" + type + \" key=\");\r\n\t\tif(type==\"Caesar\"){\r\n\t\t\tencodedString.append(Integer.toHexString(Integer.parseInt(Key)) + \"> \");\r\n\t\t\tchar[] alphabet ={'a','b','c','d','e','f','g','h','i','j','k','l','m',\r\n\t\t\t\t\t'n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö','A','B',\r\n\t\t\t\t\t'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U',\r\n\t\t\t\t\t'V','W','X','Y','Z','Å','Ä','Ö','0','1','2','3','4','5','6','7','8','9',\r\n\t\t\t\t\t'!','?',')','(','=','>','<','/','&','%','#','@','$','[',']'};\r\n\t\t\tfor(int i = 0; i < inString.length(); i++){\r\n\t\t\t\tchar a = inString.charAt(i);\r\n\t\t\t\tint used = 0;\r\n\t\t\t\tfor(char b: alphabet){\r\n\t\t\t\t\tif(b==a){\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tthisString = String.format(\"%02x\",(int)alphabet[(indexOf(alphabet,b)\r\n\t\t\t\t\t\t\t\t\t+Integer.parseInt(Key))%alphabet.length]);\r\n\t\t\t\t\t\t\tencodedString.append(thisString);\r\n\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\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(used==0){\r\n\t\t\t\t\tthisString = String.format(\"%02x\", (int)a);\r\n\t\t\t\t\tencodedString.append(thisString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(type==\"AES\"){\r\n\t\t\tfor(int i = 0; i<Key.length();i++){\r\n\t\t\t\tencodedString.append(String.format(\"%02x\", (int)Key.charAt(i)));\r\n\t\t\t}\r\n\t\t\tencodedString.append(\">\");\r\n\t\t\tencodedString.append(\" \");\r\n\t\t\tbyte[] keyContent = Base64.getDecoder().decode(Key);\r\n\t\t\tSecretKeySpec AESkey = new SecretKeySpec(keyContent,0,keyContent.length, \"AES\");\r\n\t\t\tSystem.out.println(keyContent);\r\n\t\t\t\r\n\t\t\tCipher AEScipher = Cipher.getInstance(\"AES\");\r\n\t\t\tAEScipher.init(Cipher.ENCRYPT_MODE, AESkey);\r\n\t\t\tbyte[] cipherData = AEScipher.doFinal(inString.getBytes());\r\n\t\t\tfor(byte b: cipherData){\r\n\t\t\t\tencodedString.append(String.format(\"%02x\", b));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Unknown encryption\");\r\n\t\t}\r\n\t\tencodedString.append(\" </encrypted> \");\r\n\t\treturn encodedString.toString();\r\n\t\t\r\n\t}", "public static void encode()\n {\n String s = BinaryStdIn.readString();\n CircularSuffixArray myCsa = new CircularSuffixArray(s);\n int first = 0;\n while (first < myCsa.length() && myCsa.index(first) != 0) {\n first++;\n }\n BinaryStdOut.write(first);\n int i = 0;\n while (i < myCsa.length()) {\n BinaryStdOut.write(s.charAt((myCsa.index(i) + s.length() - 1) % s.length()));\n i++;\n }\n BinaryStdOut.close();\n }", "public static void encode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n char c = BinaryStdIn.readChar();\n char t = seq[0];\n int i;\n for (i = 0; i < R - 1; i++) {\n char tmp;\n if (t == c) break;\n tmp = t;\n t = seq[i + 1];\n seq[i + 1] = tmp;\n }\n seq[0] = t;\n BinaryStdOut.write((char) i);\n }\n BinaryStdOut.close();\n }", "private void encodeMessage() {\n encodedMessage = \"\";\n try(BufferedReader inputBuffer = Files.newBufferedReader(inputPath)) {\n String inputLine;\n while((inputLine = inputBuffer.readLine()) != null) {\n //walks the input message and builds the encode message\n for(int i = 0; i < inputLine.length(); i++) {\n encodedMessage = encodedMessage + codeTable[inputLine.charAt(i)];\n }\n encodedMessage = encodedMessage + codeTable[10];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //writes to the output file\n try(BufferedWriter outputBuffer = Files.newBufferedWriter(outputPath)) {\n outputBuffer.write(encodedMessage, 0, encodedMessage.length());\n outputBuffer.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private static void encodeString(String in){\n\n\t\tString officalEncodedTxt = officallyEncrypt(in);\n\t\tSystem.out.println(\"Encoded message: \" + officalEncodedTxt);\n\t}", "public static String encode(byte[] data) {\t\t\n\t\tif (data == null || data.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tStringBuilder resultBuffer = new StringBuilder();\n\t\t//mod\n\t\tint m = data.length % 3;\n\t\t//amount of data group with 3 byte\n\t\tint g = (m == 0) ? (data.length / 3) : (data.length / 3 + 1);\n\t\tfinal byte[] _clear_buff = {0, 0, 0};\n\t\tbyte[] dataBuffer = new byte[3];\n\t\tchar[] codeBuffer = new char[4];\n\t\tint offset = 0;\n\t\tfor (int i = 0; i < g; ++i) {\n\t\t\t//clear buffer\n\t\t\tSystem.arraycopy(_clear_buff, 0, dataBuffer, 0, 3);\n\t\t\t//copy data for handling\n\t\t\tint copySize = (m != 0 && i == g - 1) ? m : 3;\n\t\t\tSystem.arraycopy(data, offset, dataBuffer, 0, copySize);\n\t\t\t//concatenate the byte data buffer as an integer\n\t\t\tint tmp = 0x00000000;\n\t\t\tfor (int j = 0, z = 2; j < 3; ++j, --z) {\n\t\t\t\tint tt = ((dataBuffer[j] & 0xff) << (z * 8));\n\t\t\t\ttmp ^= tt;\n\t\t\t}\n\t\t\t//encode current data buffer with base64\n\t\t\tfor (int k = 0; k < 4; ++k) {\n\t\t\t\tint p = (tmp >> (k * 6)) & 0x0000003F;\n\t\t\t\tcodeBuffer[3 - k] = _dict_[p];\n\t\t\t}\n\t\t\t\n\t\t\tif (copySize != 3) {\n\t\t\t\tfor (int e = 0; e < 3 - copySize; ++e) {\n\t\t\t\t\tcodeBuffer[3 - e] = '=';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresultBuffer.append(codeBuffer);\n\t\t\toffset += 3;\n\t\t}\n\t\t\n\t\tString encodeText = resultBuffer.toString();\n\t\tresultBuffer.delete(0, resultBuffer.length());\n\t\treturn encodeText;\n\t}", "public abstract byte[] encode () throws IOException;", "public String encode(byte[] bin, int str, int len) {\n int ol; // output length\n StringBuffer sb; // string buffer for output(must be local for recursion\n // to work).\n int lp; // line position(must be local for recursion to work).\n int el; // even multiple of 3 length\n int ll; // leftover length\n\n // CREATE OUTPUT BUFFER\n ol = (len + 2) / 3 * 4;\n if (lineLength != 0) {\n int lines = (ol + lineLength - 1) / lineLength - 1;\n if (lines > 0) {\n ol += lines * lineSeparator.length();\n }\n }\n sb = new StringBuffer(ol);\n lp = 0;\n\n // EVEN MULTIPLES OF 3\n el = len / 3 * 3;\n ll = len - el;\n for (int xa = 0; xa < el; xa += 3) {\n int cv;\n int c0, c1, c2, c3;\n\n if (lineLength != 0) {\n lp += 4;\n if (lp > lineLength) {\n sb.append(lineSeparator);\n lp = 4;\n }\n }\n\n // get next three bytes in unsigned form lined up, in big-endian\n // order\n cv = bin[xa + str + 0] & 0xFF;\n cv <<= 8;\n cv |= bin[xa + str + 1] & 0xFF;\n cv <<= 8;\n cv |= bin[xa + str + 2] & 0xFF;\n\n // break those 24 bits into a 4 groups of 6 bits, working LSB to\n // MSB.\n c3 = cv & 0x3F;\n cv >>>= 6;\n c2 = cv & 0x3F;\n cv >>>= 6;\n c1 = cv & 0x3F;\n cv >>>= 6;\n c0 = cv & 0x3F;\n\n // Translate into the equivalent alpha character emitting them in\n // big-endian order.\n sb.append(ENCODE[c0]);\n sb.append(ENCODE[c1]);\n sb.append(ENCODE[c2]);\n sb.append(ENCODE[c3]);\n }\n\n // LEFTOVERS\n if (lineLength != 0 && ll > 0) {\n lp += 4;\n if (lp > lineLength) {\n sb.append(lineSeparator);\n lp = 4;\n }\n }\n if (ll == 1) {\n sb.append(\n encode(new byte[] { bin[el + str], 0, 0 }).substring(0, 2))\n .append(\"==\"); // Use recursion so escaping logic is not\n // repeated, replacing last 2 chars with\n // \"==\".\n }\n else if (ll == 2) {\n sb.append(\n encode(new byte[] { bin[el + str], bin[el + str + 1], 0 })\n .substring(0, 3)).append(\"=\"); // Use recursion so\n // escaping logic is\n // not repeated,\n // replacing last\n // char and \"=\".\n }\n if (ol != sb.length()) {\n throw new RuntimeException(\n \"Error in Base64 encoding method: Calculated output length of \"\n + ol + \" did not match actual length of \"\n + sb.length());\n }\n return sb.toString();\n }", "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "@Override\n\tpublic void encode(Crate object, IoBuffer buf) {\n\t}", "String encryption(Long key, String encryptionContent);", "@Override\n\tpublic void encode() {\n\t\tbyte[] messageData = encodeStarsMessage(message);\n\t\t\n\t\t// Allocate\n byte[] res = new byte[10 + messageData.length];\n\n // Write members\n Util.write16(res, 0, unknownWord0);\n Util.write16(res, 2, unknownWord2);\n Util.write16(res, 4, senderId);\n Util.write16(res, 6, receiverId);\n Util.write16(res, 8, unknownWord8);\n \n // Copy in message data\n System.arraycopy(messageData, 0, res, 10, messageData.length);\n \n // Save as decrypted data\n setDecryptedData(res, res.length);\n\t}", "public static String encode(byte[] binaryData) {\n \n if (binaryData == null)\n return null;\n \n int lengthDataBits = binaryData.length*EIGHTBIT;\n if (lengthDataBits == 0) {\n return \"\";\n }\n \n int fewerThan24bits = lengthDataBits%TWENTYFOURBITGROUP;\n int numberTriplets = lengthDataBits/TWENTYFOURBITGROUP;\n int numberQuartet = fewerThan24bits != 0 ? numberTriplets+1 : numberTriplets;\n int numberLines = (numberQuartet-1)/19+1;\n char encodedData[] = null;\n \n encodedData = new char[numberQuartet*4+numberLines];\n \n byte k=0, l=0, b1=0,b2=0,b3=0;\n \n int encodedIndex = 0;\n int dataIndex = 0;\n int i = 0;\n if (fDebug) {\n System.out.println(\"number of triplets = \" + numberTriplets );\n }\n \n for (int line = 0; line < numberLines-1; line++) {\n for (int quartet = 0; quartet < 19; quartet++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n \n if (fDebug) {\n System.out.println( \"b1= \" + b1 +\", b2= \" + b2 + \", b3= \" + b3 );\n }\n \n l = (byte)(b2 & 0x0f);\n k = (byte)(b1 & 0x03);\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n \n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);\n \n if (fDebug) {\n System.out.println( \"val2 = \" + val2 );\n System.out.println( \"k4 = \" + (k<<4));\n System.out.println( \"vak = \" + (val2 | (k<<4)));\n }\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];\n \n i++;\n }\n encodedData[encodedIndex++] = 0xa;\n }\n \n for (; i<numberTriplets; i++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n \n if (fDebug) {\n System.out.println( \"b1= \" + b1 +\", b2= \" + b2 + \", b3= \" + b3 );\n }\n \n l = (byte)(b2 & 0x0f);\n k = (byte)(b1 & 0x03);\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n \n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);\n \n if (fDebug) {\n System.out.println( \"val2 = \" + val2 );\n System.out.println( \"k4 = \" + (k<<4));\n System.out.println( \"vak = \" + (val2 | (k<<4)));\n }\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];\n }\n \n // form integral number of 6-bit groups\n if (fewerThan24bits == EIGHTBIT) {\n b1 = binaryData[dataIndex];\n k = (byte) ( b1 &0x03 );\n if (fDebug) {\n System.out.println(\"b1=\" + b1);\n System.out.println(\"b1<<2 = \" + (b1>>2) );\n }\n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ k<<4 ];\n encodedData[encodedIndex++] = PAD;\n encodedData[encodedIndex++] = PAD;\n } else if (fewerThan24bits == SIXTEENBIT) {\n b1 = binaryData[dataIndex];\n b2 = binaryData[dataIndex +1 ];\n l = ( byte ) ( b2 &0x0f );\n k = ( byte ) ( b1 &0x03 );\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ l<<2 ];\n encodedData[encodedIndex++] = PAD;\n }\n \n //encodedData[encodedIndex] = 0xa;\n \n return new String(encodedData);\n }", "void encode(ByteBuffer buffer, Message message);", "public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }", "private byte[] encode(byte[] data) {\n int lc = (data==null ? 0 : data.length);\n int L = 0;\n\n // decide whether short or extended encoding is to be used\n boolean useShort = (lc<256)&&(le<256);\n\n // compute total length of body\n L += lc; // length due to data bytes\n\n if (lc>0) // need to code Lc\n L = (useShort ? L+1 : L+3); // coding Lc as 1 or 3 bytes\n\n if (le>=0) // need to code Le\n L = (useShort ? L+1 : L+2); // coding Le as 1 or 2 bytes\n\n if (L==0) \n return null;\n\n // perform encoding\n byte[] body = new byte[L];\n int l=0;\n\n if (lc>0) { // need to code Lc\n\n if (useShort) // Lc fits in a single byte\n body[l++]=(byte)(lc&0xFF);\n else { // Lc requires 3 bytes\n body[l] =(byte)0x00; // marker indicating extended encoding\n body[l+1]=(byte)((lc>>8)&0xFF);\n body[l+2]=(byte)(lc&0xFF);\n l+=3;\n }\n\n // code data\n System.arraycopy(data, 0, body, l, lc);\n l += lc;\n } // if (lc > 0)\n\n if (le>=0) { // need to code Le\n\n if (useShort) // Le fits in a single byte\n body[l++]=(byte) (le&0xFF); // handle coding of 256\n else { // Le fits in two bytes\n body[l] =(byte)((le>>8)&0xFF);\n body[l+1]=(byte)(le&0xFF);\n }\n\n } // if (le >= 0)\n return body;\n }", "public String encode(String plainText)\n\t{\n\t\tthis.encoding(plainText);\n\t\treturn this.encodedText;\n\t}", "private String encodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n SubstCipher encodingText = new SubstCipher(this.shiftAlea);\n encodingText.buildShiftedTextFor(text);\n String encoding = encodingText.getLastShiftedText();\n return encodageMot(encoding);\n }", "public static void encode(ArrayList<Token> tokens) {\n String header = \"<!DOCTYPE html>\\n<html>\\n\\t<style>body { background-color: black; } </style>\\n\";\n String comment = \"\\t<!--\\n\\t\";\n String body = \"\\n\\t<body>\\n\\t\\t<p>\\n\"; \n String type = \"\";\n int count = 1;\n\n for (Token t : tokens) {\n type = t.getType();\n\n if (!(type.equals(\"NEWLINE\") || type.equals(\"TAB\") || type.equals(\"SPACE\"))) {\n comment = comment + t.getTokenString() + \" \";\n\n if (count % 8 == 0) {\n comment += \"\\n\\t\";\n }\n\n count++;\n }\n }\n\n comment += \"\\n\\t-->\";\n\n for (Token t : tokens) {\n body = body + setColour(t);\n }\n \n body = body + \"\\t\\t</p>\\n\\t</body>\\n</html>\";\n System.out.print(header + comment + body);\n }", "public String encode() {\n\t\tString coded = \"\";\n\t\tfor (Character c: this.input.toCharArray()) {\n\t\t\tcoded += this.mapping.get(c);\n\t\t}\n\t\treturn coded;\n\t}", "public String encrypt(String plainText);", "@Override\n public void finalEncrypt(byte[] text, int n) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n text[n] = (byte)0x80;\n for( int i = n+1; i < blockSize(); ++i){\n text[i] = (byte)0x00;\n }\n encrypt(text);\n }", "public TextBlock() {\n writer = new StringMaker();\n writer.openForOutput();\n // blockOut = new StringBuilder();\n labels = new ArrayList();\n // writer.close();\n }", "private String UTF8Encode(String s) {\n\n\n s = s.replace(\"\\r\\n\", \"\\n\");\n int[] utftext = new int[s.length() * 3];\n int utftextlen = 0;\n for (int n = 0; n < s.length(); n++) {\n int c = s.charAt(n);\n if (c < 128) {\n utftext[utftextlen++] = c;\n Log.e(\"utf\", n + \" try:\" + c);\n } else if ((c > 127) && (c < 2048)) {\n utftext[utftextlen++] = (c >> 6) | 192;\n utftext[utftextlen++] = (c & 63) | 128;\n Log.e(\"utf\", n + \" try:\" + ((c >> 6) | 192));\n Log.e(\"utf\", n + \" try:\" + ((c & 63) | 128));\n } else {\n utftext[utftextlen++] = (c >> 12) | 224;\n utftext[utftextlen++] = ((c >> 6) & 63) | 128;\n utftext[utftextlen++] = (c & 63) | 128;\n Log.e(\"utf\", n + \" try:\" + ((c >> 12) | 224));\n Log.e(\"utf\", n + \" try:\" + (((c >> 6) & 63) | 128));\n Log.e(\"utf\", n + \" try:\" + ((c & 63) | 128));\n }\n\n }\n int i = 0;\n char chr1, chr2, chr3;\n int enc1, enc2, enc3, enc4;\n StringBuilder string = new StringBuilder();\n while (i < utftextlen) {\n chr1 = (char) utftext[i++];\n chr2 = (char) utftext[i++];\n chr3 = (char) utftext[i++];\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n string.append(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n }\n string.append(\"\");\n return string.toString();\n }", "java.lang.String getEncoded();", "private byte[] encode_text(byte[] image, byte[] addition, int offset) {\n // check that the data + offset will fit in the image\n if (addition.length + offset > image.length) {\n throw new IllegalArgumentException(\"File not long enough!\");\n }\n // loop through each addition byte\n for (int i = 0; i < addition.length; ++i) {\n // loop through the 8 bits of each byte\n int add = addition[i];\n for (int bit = 7; bit >= 0; --bit, ++offset) // ensure the new\n // offset value carries\n // on through both\n // loops\n {\n // assign an integer to b, shifted by bit spaces AND 1\n // a single bit of the current byte\n int b = (add >>> bit) & 1;\n // assign the bit by taking: [(previous byte value) AND 0xfe] OR\n // bit to add\n // changes the last bit of the byte in the image to be the bit\n // of addition\n image[offset] = (byte) ((image[offset] & 0xFE) | b);\n }\n }\n return image;\n }", "public String encrypt(String text) {\n return content.encrypt(text);\n }", "public abstract void encode(ByteBuffer buffer, int offset, int value);", "private static byte[] encode(RawTransaction rawTransaction, Sign.SignatureData signatureData) {\n\t\tList<RlpType> values = asRlpValues(rawTransaction, signatureData);\n\t\tRlpList rlpList = new RlpList(values);\n\t\treturn RlpEncoder.encode(rlpList);\n\t}", "protected String encode(AsciiValueEncoder enc)\n {\n // note: nothing in buffer, can't flush (thus no need to call to check)\n int last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n if (enc.isCompleted()) { // fitted in completely?\n return new String(mBuffer, 0, last);\n }\n // !!! TODO: with Java 5, use StringBuilder instead\n StringBuffer sb = new StringBuffer(mBuffer.length << 1);\n sb.append(mBuffer, 0, last);\n do {\n last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n sb.append(mBuffer, 0, last);\n } while (!enc.isCompleted());\n return sb.toString();\n }", "private void encode(StringBuilder builder, String component) {\n int length = component.length();\n for (int i = 0; i < length; i++) {\n char currentChar = component.charAt(i);\n if (currentChar == SEPARATOR_CHAR) {\n builder.append(SEPARATOR_CHAR);\n }\n builder.append(currentChar);\n }\n }", "void write(String text);", "public void writeRaw(String text)\n/* */ throws IOException\n/* */ {\n/* 442 */ int len = text.length();\n/* 443 */ int room = this._outputEnd - this._outputTail;\n/* */ \n/* 445 */ if (room == 0) {\n/* 446 */ _flushBuffer();\n/* 447 */ room = this._outputEnd - this._outputTail;\n/* */ }\n/* */ \n/* 450 */ if (room >= len) {\n/* 451 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 452 */ this._outputTail += len;\n/* */ } else {\n/* 454 */ writeRawLong(text);\n/* */ }\n/* */ }", "void encode(StreamingContent content, OutputStream out) throws IOException;", "@Override\r\n\t\tpublic String encode(String str) {\r\n\t\t\t// str to char[]\r\n\t\t\tchar content[] = str.toCharArray();\r\n\t\t\t\r\n\t\t\t// per char\r\n\t\t\tStringBuilder result = new StringBuilder(content.length);\r\n\t\t\tfor (int i = 0; i < content.length; i++) {\r\n\t\t\t\tswitch (content[i]) {\r\n\t\t\t\tcase '<':\r\n\t\t\t\t\tresult.append(\"&lt;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '>':\r\n\t\t\t\t\tresult.append(\"&gt;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '&':\r\n\t\t\t\t\tresult.append(\"&amp;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '\"':\r\n\t\t\t\t\tresult.append(\"&quot;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '\\'':\r\n\t\t\t\t\tresult.append(\"&apos;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult.append(content[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn (result.toString());\r\n\t\t}", "public void encodeMessage() {\n for (int i = message.length() - 1; i >= 0; i--) {\n message.insert(i, String.valueOf(message.charAt(i)).repeat(2));\n }\n }", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "public byte[] encode(byte[] pArray) {\n return encodeQuotedPrintable(PRINTABLE_CHARS, pArray);\n }", "@Override // com.google.protobuf.Utf8.Processor\n public void encodeUtf8Direct(CharSequence in, ByteBuffer out) {\n char c;\n long j;\n long outIx;\n long outLimit;\n long outIx2;\n char c2;\n long address = addressOffset(out);\n long outIx3 = ((long) out.position()) + address;\n long outLimit2 = ((long) out.limit()) + address;\n int inLimit = in.length();\n if (((long) inLimit) <= outLimit2 - outIx3) {\n int inIx = 0;\n while (true) {\n c = 128;\n j = 1;\n if (inIx < inLimit) {\n char c3 = in.charAt(inIx);\n if (c3 >= 128) {\n break;\n }\n UNSAFE.putByte(outIx3, (byte) c3);\n inIx++;\n outIx3 = 1 + outIx3;\n } else {\n break;\n }\n }\n if (inIx == inLimit) {\n out.position((int) (outIx3 - address));\n return;\n }\n while (inIx < inLimit) {\n char c4 = in.charAt(inIx);\n if (c4 < c && outIx3 < outLimit2) {\n UNSAFE.putByte(outIx3, (byte) c4);\n outLimit = outLimit2;\n outIx3 += j;\n c2 = 128;\n outIx = 1;\n outIx2 = address;\n } else if (c4 >= 2048 || outIx3 > outLimit2 - 2) {\n outIx2 = address;\n if ((c4 < 55296 || 57343 < c4) && outIx3 <= outLimit2 - 3) {\n long outIx4 = outIx3 + 1;\n UNSAFE.putByte(outIx3, (byte) ((c4 >>> '\\f') | 480));\n long outIx5 = outIx4 + 1;\n UNSAFE.putByte(outIx4, (byte) (((c4 >>> 6) & 63) | 128));\n UNSAFE.putByte(outIx5, (byte) ((c4 & '?') | 128));\n outLimit = outLimit2;\n outIx3 = outIx5 + 1;\n c2 = 128;\n outIx = 1;\n } else if (outIx3 <= outLimit2 - 4) {\n if (inIx + 1 != inLimit) {\n inIx++;\n char low = in.charAt(inIx);\n if (Character.isSurrogatePair(c4, low)) {\n int codePoint = Character.toCodePoint(c4, low);\n outLimit = outLimit2;\n long outIx6 = outIx3 + 1;\n UNSAFE.putByte(outIx3, (byte) ((codePoint >>> 18) | PageId.FINGERPRINT_ENROLLING_VALUE));\n long outIx7 = outIx6 + 1;\n UNSAFE.putByte(outIx6, (byte) (((codePoint >>> 12) & 63) | 128));\n long outIx8 = outIx7 + 1;\n c2 = 128;\n UNSAFE.putByte(outIx7, (byte) (((codePoint >>> 6) & 63) | 128));\n outIx = 1;\n outIx3 = outIx8 + 1;\n UNSAFE.putByte(outIx8, (byte) ((codePoint & 63) | 128));\n }\n }\n throw new UnpairedSurrogateException(inIx - 1, inLimit);\n } else if (55296 > c4 || c4 > 57343 || (inIx + 1 != inLimit && Character.isSurrogatePair(c4, in.charAt(inIx + 1)))) {\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + c4 + \" at index \" + outIx3);\n } else {\n throw new UnpairedSurrogateException(inIx, inLimit);\n }\n } else {\n outIx2 = address;\n long outIx9 = outIx3 + 1;\n UNSAFE.putByte(outIx3, (byte) ((c4 >>> 6) | 960));\n outIx3 = outIx9 + 1;\n UNSAFE.putByte(outIx9, (byte) ((c4 & '?') | 128));\n outLimit = outLimit2;\n c2 = 128;\n outIx = 1;\n }\n inIx++;\n c = c2;\n address = outIx2;\n outLimit2 = outLimit;\n j = outIx;\n }\n out.position((int) (outIx3 - address));\n return;\n }\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + in.charAt(inLimit - 1) + \" at index \" + out.limit());\n }", "ByteString encode(T object) throws Exception;", "public String toText() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (!description.isEmpty()) {\n\t\t\tsb.append(description.toText());\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\tif (!blockTags.isEmpty()) {\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\tblockTags.forEach(bt -> {\n\t\t\tsb.append(bt.toText());\n\t\t\tsb.append(\"\\n\");\n\t\t});\n\t\treturn sb.toString();\n\t}", "@Override\r\n\t\tpublic String encode(String str) {\r\n\t\t\t// str to char[]\r\n\t\t\tchar content[] = str.toCharArray();\r\n\r\n\t\t\t// per char\r\n\t\t\tStringBuilder result = new StringBuilder(content.length);\r\n\t\t\tfor (int i = 0; i < content.length; i++) {\r\n\t\t\t\tswitch (content[i]) {\r\n\t\t\t\t\tcase '<':\r\n\t\t\t\t\t\tresult.append(\"&#60;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '>':\r\n\t\t\t\t\t\tresult.append(\"&#62;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '&':\r\n\t\t\t\t\t\tresult.append(\"&#38;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '\"':\r\n\t\t\t\t\t\tresult.append(\"&#34;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '\\'':\r\n\t\t\t\t\t\tresult.append(\"&#39;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tresult.append(content[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn (result.toString());\r\n\t\t}", "private void make_string(ArrayList node_block , TObj parrentNode, String prefix) {\n\t\tint seq = 0;\n\t\tint end_seq = 0;\n\t\tint prev_seq = 0;\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor(int j =0 ; j < node_block.size() ; j ++) {\n\t\t\tnode_line_data text = (node_line_data)node_block.get(j);\n\t\t\tif (j == 0) {\n\t\t\t\tseq = text.seq;\n\t\t\t\tprev_seq = text.seq; // 2014.09.16\n\t\t\t}\n\t\t\tif(j == node_block.size()-1)\n\t\t\t\tend_seq = text.seq;\n\t\t\t//sb.append(text.line_data.trim()).append(\"\\n\");\n\t\t\t// 2014.5.21\n\n\t\t\tif(prev_seq != text.seq) { // 2014.09.16\n\t\t\t\tprev_seq = text.seq;\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t}\n\t\t\tsb.append(text.line_data.trim());\n\n/*\t\t\tif(j < node_block.size() -1 ) {\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t}*/\n\n\n\n\n\t\t\tlocallog.trace(\" TEXT ::: \" , text.line_data);\n\t\t}\n\t\t// 2014.01.08\n\t\tif(sb.toString().trim().length() > 0) {\n\t\t\tTObj newnodedata = new TObj(_TEXT_TYPE, make_path(prefix, \"text\"), sb.toString(), 100, new TLocation(seq+1, end_seq+1, 0,0, \"\") );\n\t\t\tparrentNode.add(newnodedata);\n\t\t}\n\t\tnode_block.clear();\n\t}", "byte[] encrypt(String plaintext);", "@Override // com.google.protobuf.Utf8.Processor\n public int encodeUtf8(CharSequence in, byte[] out, int offset, int length) {\n char c;\n int utf16Length = in.length();\n int i = 0;\n int limit = offset + length;\n while (i < utf16Length && i + offset < limit && (c = in.charAt(i)) < 128) {\n out[offset + i] = (byte) c;\n i++;\n }\n if (i == utf16Length) {\n return offset + utf16Length;\n }\n int j = offset + i;\n while (i < utf16Length) {\n char c2 = in.charAt(i);\n if (c2 < 128 && j < limit) {\n out[j] = (byte) c2;\n j++;\n } else if (c2 < 2048 && j <= limit - 2) {\n int j2 = j + 1;\n out[j] = (byte) ((c2 >>> 6) | 960);\n j = j2 + 1;\n out[j2] = (byte) ((c2 & '?') | 128);\n } else if ((c2 < 55296 || 57343 < c2) && j <= limit - 3) {\n int j3 = j + 1;\n out[j] = (byte) ((c2 >>> '\\f') | 480);\n int j4 = j3 + 1;\n out[j3] = (byte) (((c2 >>> 6) & 63) | 128);\n out[j4] = (byte) ((c2 & '?') | 128);\n j = j4 + 1;\n } else if (j <= limit - 4) {\n if (i + 1 != in.length()) {\n i++;\n char low = in.charAt(i);\n if (Character.isSurrogatePair(c2, low)) {\n int codePoint = Character.toCodePoint(c2, low);\n int j5 = j + 1;\n out[j] = (byte) ((codePoint >>> 18) | PageId.FINGERPRINT_ENROLLING_VALUE);\n int j6 = j5 + 1;\n out[j5] = (byte) (((codePoint >>> 12) & 63) | 128);\n int j7 = j6 + 1;\n out[j6] = (byte) (((codePoint >>> 6) & 63) | 128);\n j = j7 + 1;\n out[j7] = (byte) ((codePoint & 63) | 128);\n }\n }\n throw new UnpairedSurrogateException(i - 1, utf16Length);\n } else if (55296 > c2 || c2 > 57343 || (i + 1 != in.length() && Character.isSurrogatePair(c2, in.charAt(i + 1)))) {\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + c2 + \" at index \" + j);\n } else {\n throw new UnpairedSurrogateException(i, utf16Length);\n }\n i++;\n }\n return j;\n }", "protected void verbatimContent(String text) {\n write(escapeHTML(text));\n }", "@Override // com.google.protobuf.Utf8.Processor\n public int encodeUtf8(CharSequence in, byte[] out, int offset, int length) {\n char c;\n long j;\n long j2;\n long outLimit;\n String str;\n String str2;\n char c2;\n long outIx = (long) (ARRAY_BASE_OFFSET + offset);\n long outLimit2 = ((long) length) + outIx;\n int inLimit = in.length();\n String str3 = \" at index \";\n String str4 = \"Failed writing \";\n if (inLimit > length || out.length - length < offset) {\n throw new ArrayIndexOutOfBoundsException(str4 + in.charAt(inLimit - 1) + str3 + (offset + length));\n }\n int inIx = 0;\n while (true) {\n c = 128;\n j = 1;\n if (inIx < inLimit) {\n char c3 = in.charAt(inIx);\n if (c3 >= 128) {\n break;\n }\n UNSAFE.putByte(out, outIx, (byte) c3);\n inIx++;\n outIx = 1 + outIx;\n } else {\n break;\n }\n }\n if (inIx == inLimit) {\n return (int) (outIx - ((long) ARRAY_BASE_OFFSET));\n }\n while (inIx < inLimit) {\n char c4 = in.charAt(inIx);\n if (c4 < c && outIx < outLimit2) {\n UNSAFE.putByte(out, outIx, (byte) c4);\n str2 = str3;\n outIx += j;\n j2 = 1;\n outLimit = outLimit2;\n str = str4;\n c2 = 128;\n } else if (c4 >= 2048 || outIx > outLimit2 - 2) {\n if (c4 >= 55296 && 57343 >= c4) {\n str2 = str3;\n str = str4;\n } else if (outIx <= outLimit2 - 3) {\n str2 = str3;\n str = str4;\n long outIx2 = outIx + 1;\n UNSAFE.putByte(out, outIx, (byte) ((c4 >>> '\\f') | 480));\n long outIx3 = outIx2 + 1;\n UNSAFE.putByte(out, outIx2, (byte) (((c4 >>> 6) & 63) | 128));\n UNSAFE.putByte(out, outIx3, (byte) ((c4 & '?') | 128));\n outLimit = outLimit2;\n outIx = outIx3 + 1;\n c2 = 128;\n j2 = 1;\n } else {\n str2 = str3;\n str = str4;\n }\n if (outIx <= outLimit2 - 4) {\n if (inIx + 1 != inLimit) {\n inIx++;\n char low = in.charAt(inIx);\n if (Character.isSurrogatePair(c4, low)) {\n int codePoint = Character.toCodePoint(c4, low);\n outLimit = outLimit2;\n long outIx4 = outIx + 1;\n UNSAFE.putByte(out, outIx, (byte) ((codePoint >>> 18) | PageId.FINGERPRINT_ENROLLING_VALUE));\n long outIx5 = outIx4 + 1;\n UNSAFE.putByte(out, outIx4, (byte) (((codePoint >>> 12) & 63) | 128));\n long outIx6 = outIx5 + 1;\n c2 = 128;\n UNSAFE.putByte(out, outIx5, (byte) (((codePoint >>> 6) & 63) | 128));\n j2 = 1;\n UNSAFE.putByte(out, outIx6, (byte) ((codePoint & 63) | 128));\n outIx = outIx6 + 1;\n }\n }\n throw new UnpairedSurrogateException(inIx - 1, inLimit);\n } else if (55296 > c4 || c4 > 57343 || (inIx + 1 != inLimit && Character.isSurrogatePair(c4, in.charAt(inIx + 1)))) {\n throw new ArrayIndexOutOfBoundsException(str + c4 + str2 + outIx);\n } else {\n throw new UnpairedSurrogateException(inIx, inLimit);\n }\n } else {\n long outIx7 = outIx + 1;\n UNSAFE.putByte(out, outIx, (byte) ((c4 >>> 6) | 960));\n UNSAFE.putByte(out, outIx7, (byte) ((c4 & '?') | 128));\n str2 = str3;\n outIx = outIx7 + 1;\n j2 = 1;\n outLimit = outLimit2;\n str = str4;\n c2 = 128;\n }\n inIx++;\n c = c2;\n str3 = str2;\n str4 = str;\n outLimit2 = outLimit;\n j = j2;\n }\n return (int) (outIx - ((long) ARRAY_BASE_OFFSET));\n }", "static void writeBlock(PrintWriter w) throws Exception {\n for (int i = 0; i < 16; i++) {\n int n = 0;\n for (int j = 0; j < 8; j++) {\n n = n | (block[8 * i + j] << (7 - j));\n }\n w.printf(\"%3d\\n\", n);\n }\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.831 -0500\", hash_original_method = \"E7A2FB4AC135D29D78CE09D5448C290F\", hash_generated_method = \"74B066602ECC20A74FD97E770D65E8BD\")\n \npublic String encodeBody() {\n return encodeBody(new StringBuffer()).toString();\n }", "@Override\n public void encrypt(byte[] text) throws IllegalArgumentException {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n ciper.setKey(key);\n xor_nonce(text);\n ciper.encrypt(text);\n System.arraycopy(text, 0, nonce, 0, blockSize());\n }", "public int[] encode(String text, String textPair, Kwargs kwargs) {\n\t\tkwargs.putIfAbsent(\"add_special_tokens\", true,\n\t\t\t\"padding_strategy\", PaddingStrategy.DO_NOT_PAD,\n\t\t\t\"truncation_strategy\", TruncationStrategy.DO_NOT_TRUNCATE,\n\t\t\t\"stride\", 0);\n\t\tSingleEncoding encodedInputs = encodePlus(text, textPair, kwargs);\n\t\treturn encodedInputs.get(INPUT_IDS_KEY);\n\t}", "public static byte[] encode(byte[] bytes, boolean lineBreaks){\n\t\tByteArrayInputStream in = new ByteArrayInputStream(bytes);\n\t\t// calculate the length of the resulting output.\n\t\t// in general it will be 4/3 the size of the input\n\t\t// but the input length must be divisible by three.\n\t\t// If it isn't the next largest size that is divisible\n\t\t// by three is used.\n\t\tint mod;\n\t\tint length = bytes.length;\n\t\tif ((mod = length % 3) != 0){\n\t\t\tlength += 3 - mod;\n\t\t}\n\t\tlength = length * 4 / 3;\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream(length);\n\t\ttry {\n\t\t\tencode(in, out, lineBreaks);\n\t\t} catch (IOException x){\n\t\t\t// This can't happen.\n\t\t\t// The input and output streams were constructed\n\t\t\t// on memory structures that don't actually use IO.\n\t\t\tthrow new RuntimeException(x);\n\t\t}\n\t\treturn out.toByteArray();\n\t}", "public static String encryptBellaso(String plainText, String bellasoStr) {\r\n\t\tString encryptedText = \"\";\r\n\t\t\r\n\t\tchar [] enText = new char[plainText.length()];\r\n\t\t\r\n\t\t\r\n\t mappingKeyToMessage(bellasoStr,plainText);\r\n\t \r\n\t char [] plText = plainText.toCharArray();\r\n\t\tchar [] blText = bellasoStr.toCharArray();\r\n\t\t\r\n\t\tint i=0;\r\n\t\tint sum = 0;\r\n\t\t\r\n\t\tsum = sum + plText[i];\r\n\t\tsum = sum + blText[1];\r\n\t\tsum -= RANGE;\r\n\t\tSystem.out.print(sum);\r\n\t\tdo {\r\n\t\t\tfor(char m: plText) {\r\n\t\t\t\r\n\t\t\t\tif (sum >95) {\r\n\t\t\t\t\tsum -= RANGE;\r\n\t\t\t\t\tm += sum;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tm +=sum;\r\n\t\t\t\t\tenText[i] = m;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tencryptedText = String.valueOf(enText);\r\n\t\t\r\n\t \r\n\t return encryptedText; \r\n\t}", "public BigInteger Encryption(String text){\n \tcypherText = BigInteger.valueOf(0);\n \tint bposition = 0;\n \t/*\n \t * Cursor move from 128 to 1 each time. Do & operation between chvalue\n \t * and cursor, if not 0, means in bit format this position is 1, add\n \t * the corresponding BigInteger in the b list to cypherText.\n \t */\n \tfor(byte ch: text.getBytes()){\n \t\tint cursor = 128;\n \t\tint chvalue = ch;\n \t\tfor(int i = 0;i < 8;i++){\n \t\t\tif((chvalue & cursor) != 0){\n \t\t\t\tcypherText = cypherText.add(b[bposition]);\n \t\t\t}\n \t\t\tcursor >>= 1;\n \t\t bposition ++;\n \t\t}\n \t}\n \treturn cypherText;\n }", "public static void encode () {\n // read the input\n s = BinaryStdIn.readString();\n char[] input = s.toCharArray();\n\n int[] indices = new int[input.length];\n for (int i = 0; i < indices.length; i++) {\n indices[i] = i;\n }\n \n Quick.sort(indices, s);\n \n // create t[] and find where original ended up\n char[] t = new char[input.length]; // last column in suffix sorted list\n int inputPos = 0; // row number where original String ended up\n \n for (int i = 0; i < indices.length; i++) {\n int index = indices[i];\n \n // finds row number where original String ended up\n if (index == 0)\n inputPos = i;\n \n if (index > 0)\n t[i] = s.charAt(index-1);\n else\n t[i] = s.charAt(indices.length-1);\n }\n \n \n // write t[] preceded by the row number where orginal String ended up\n BinaryStdOut.write(inputPos);\n for (int i = 0; i < t.length; i++) {\n BinaryStdOut.write(t[i]);\n BinaryStdOut.flush();\n } \n }", "public String compress() {\r\n \tfor (int i = 0; i < text.length(); i++)\r\n \t\tcompressedText += charToCode.get(text.charAt(i));\r\n return compressedText;\r\n }", "public void writeBlock(String s) {\n\t\tuncheckedWrite(s);\n\t\t_column += s.length();\n\t}", "String encode(Object obj);", "@Override\n public void write(String text) {\n }", "public EncodeAndDecodeStrings() {}", "private static Collection<Text> createText(ProtocolStructure protocolStructure) {\n Byte[] bytes = protocolStructure.getBytes();\n Collection<Text> result = new ArrayList<>();\n //noinspection NumericCastThatLosesPrecision\n int totalLines = (int) Math.ceil(bytes.length / 16.0);\n for (int i = 0; i < totalLines; i++) {\n result.add(createOffset(i));\n int toIndex = Math.min((i + 1) * 16, bytes.length);\n Byte[] line = Arrays.copyOfRange(bytes, i * 16, toIndex);\n result.addAll(createHex(line));\n result.addAll(createAscii(line));\n }\n return result;\n }", "public String encrypt(String unencryptedString) throws InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException {\n String encryptedString = null;\n try{\n cipher.init(Cipher.ENCRYPT_MODE, key);\n byte[] plainText = unencryptedString.getBytes(UNICODE_FORMAT);\n byte[] encryptedText = cipher.doFinal(plainText);\n BASE64Encoder base64encoder = new BASE64Encoder();\n // encryptedString = base64encoder.<span class=\"\\IL_AD\\\" id=\"\\IL_AD9\\\">encode</span>(encryptedText);\n encryptedString = base64encoder.encode(encryptedText);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n return encryptedString;\n }", "public static String encrypt(String text) {\r\n\t\tString modifiedText = \"\";\r\n\t\tchar character;\r\n\t\tint code = 0;\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tcharacter = text.charAt(i);\r\n\t\t\tcode = character + 7;\r\n\t\t\tcharacter = (char) code;\r\n\t\t\tmodifiedText += Character.toString(character);\r\n\t\t}\r\n\t\treturn modifiedText;\r\n\t}", "private String encStr(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tbyte[] newCBCIV;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (nNumBytes - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, nNumBytes);\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tString strEncrypt = EQBinConverter.bytesToHexStr(buf, 0, nNumBytes);\n\t\tnewCBCIV = new byte[EQBlowfishECB.BLOCKSIZE];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, newCBCIV, 0);\n\t\tString strCBCIV = EQBinConverter.bytesToHexStr(newCBCIV, 0, EQBlowfishECB.BLOCKSIZE);\n\t\t// System.out.println(\"encrypt = [\" + strEncrypt + \"]\");\n\t\t// System.out.println(\"strCBCIV = [\" + strCBCIV + \"]\");\n\t\treturn strCBCIV + strEncrypt;\n\t}", "private String encStr(String plainText, long newCBCIV) {\n int strlen = plainText.length();\n byte[] buf = new byte[((strlen << 1) & ~7) + 8];\n int pos = 0;\n for (int i = 0; i < strlen; i++) {\n char achar = plainText.charAt(i);\n buf[pos++] = (byte) ((achar >> 8) & 0x0ff);\n buf[pos++] = (byte) (achar & 0x0ff);\n }\n byte padval = (byte) (buf.length - (strlen << 1));\n while (pos < buf.length) {\n buf[pos++] = padval;\n }\n this.bfc.setCBCIV(newCBCIV);\n this.bfc.encrypt(buf, 0, buf, 0, buf.length);\n byte[] newIV = new byte[Blowfish.BLOCKSIZE];\n BinConverter.longToByteArray(newCBCIV, newIV, 0);\n return BinConverter.bytesToHexStr(newIV, 0, Blowfish.BLOCKSIZE) + BinConverter.bytesToHexStr(buf, 0, buf.length);\n }", "private String encodeMessage() {\n\t\tString encode = \"\";\n\t\tfor (int i = 0; i < message.length(); i++) {\n\t\t\tencode += map.get(message.charAt(i));\n\t\t}\n\t\tgenerateBack();\n\t\treturn encode;\n\t}", "@Override // com.google.protobuf.Utf8.Processor\n public void encodeUtf8Direct(CharSequence in, ByteBuffer out) {\n encodeUtf8Default(in, out);\n }", "CodeBlock createCodeBlock();", "private ByteBuffer encode(String str) {\n ByteBuffer bb = null;\n CharsetEncoder isoencoder = UTF8.newEncoder();\n try {\n bb = isoencoder.encode(CharBuffer.wrap(str));\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return bb;\n }", "public synchronized void encryptText() {\n setSalt(ContentCrypto.generateSalt());\n try {\n mText = ContentCrypto.encrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}", "public final void encodeUtf8(CharSequence in, ByteBuffer out) {\n if (out.hasArray()) {\n int offset = out.arrayOffset();\n out.position(Utf8.encode(in, out.array(), out.position() + offset, out.remaining()) - offset);\n } else if (out.isDirect()) {\n encodeUtf8Direct(in, out);\n } else {\n encodeUtf8Default(in, out);\n }\n }", "public static String returnEncoded(String text) {\n if (text == null) {\n return null;\n }\n return Base64.encodeToString(text.getBytes(), Base64.NO_WRAP);\n }", "protected void encode() {\t\n\t\tsuper.rawPkt = new byte[12 + this.pktData.length];\n\t\tbyte[] tmp = StaticProcs.uIntLongToByteWord(super.ssrc);\n\t\tSystem.arraycopy(tmp, 0, super.rawPkt, 4, 4);\n\t\tSystem.arraycopy(this.pktName, 0, super.rawPkt, 8, 4);\n\t\tSystem.arraycopy(this.pktData, 0, super.rawPkt, 12, this.pktData.length);\n\t\twriteHeaders();\n\t\t//System.out.println(\"ENCODE: \" + super.length + \" \" + rawPkt.length + \" \" + pktData.length);\n\t}", "public static byte[] encodeStarsMessage(String text) {\n\t\t// Encode string using Stars! encoding\n\t\tString hexChars = Util.encodeHexStarsString(text);\n\n\t\t// Require multiple of 2 bytes and append an 'F' to make it so\n\t\tif (hexChars.length() % 2 != 0) \n\t\t\thexChars = hexChars + \"F\";\n\n\t\tint starsEncByteLen = hexChars.length() / 2;\n\n\t\t// Header is the byte length as 10 bits\n\t\tint header = starsEncByteLen & 0x3ff;\n\n\t\t// Get ASCII encoding info\n\t\tbyte[] textBytes = text.getBytes();\n\t\tint asciiByteLen = textBytes.length; \n\n\t\t// If ASCII results in a shorter byte size than Stars! encoding, ASCII\n\t\t// will be used instead. Modify the header and hexChars accordingly\n\t\tif(asciiByteLen < starsEncByteLen) { // Compare nibble counts\n\t\t\t// Header should really be the ASCII length\n\t\t\theader = asciiByteLen & 0x3ff; // 10 bits\n\n\t\t\t// Now invert all bits which puts all 1's in the top 6 bits to tell\n\t\t\t// the decoder if ASCII was used\n\t\t\theader = ~(header) & 0xffff; // 16 bits\n\n\t\t\t// Use ASCII chars instead\n\t\t\thexChars = Util.byteArrayToHex(textBytes);\n\t\t}\n\n\t\t// Build header as hex nibbles, 2 bytes total\n\t\tString lowerByte = Util.byteToHex((byte) (header & 0xff));\n\t\tString upperByte = Util.byteToHex((byte) ((header & 0xff00) >> 8));\n\n\t\t// Prepend header to message, as 4 hex characters\n\t\thexChars = (lowerByte + upperByte) + hexChars;\n\n\t\t// Debugging\n\t\t// Messages require a multiple of 4 bytes (8 nibbles) because of the\n\t\t// encryption. Append dummy values to test\n//\t\tint padLen = hexChars.length() % 8;\n//\t\tfor(int i = 0; i < padLen; i++) \n//\t\t\t// Stars! normally just leaves junk memory as padding at the end of\n//\t\t\t// the array. \n//\t\t\t// A '6' adds 'n' (Stars!) or 'f' (ASCII). Useful for debugging\n//\t\t\thexChars = hexChars.concat(\"6\"); \n\n\t\t// Create byte array to hold header and message\n\t\tbyte[] res = Util.hexToByteArray(hexChars);\n\n\t\treturn res;\n\t}", "public String getEncoded()\n\t{\n\t\treturn this.encodedText;\n\t}", "public byte[] encode(byte[] data) throws EncodingException {\n\t\tif (data == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint length = data.length;\n\t\tint maxGrouping = length / 5;\n\t\tint fullGroupings = 5 * maxGrouping;\n\t\tint remainderBytes = length - fullGroupings;\n\t\t\n\t\tint c, c0, c1, c2, c3, c4, c5, c6, c7, cursor = 0;\n\t\tint maxPadding = REMAINDER_PADDING_COUNT[remainderBytes];\n\t\tbyte[] result = new byte[8*(maxGrouping + 1)];\n\t\t\n//\t\tdata = Arrays.copyOf(data, length + maxPadding);\n\t\tfor (c = 0; c < fullGroupings; c+= 5) {\n\t\t\t\n\t\t\tc0 = ((data[c] & 0xF8) >> 3);\n\t\t\tc1 = ((data[c] & 0x07) << 2) | ((data[c + 1] & 0xC0) >> 6);\n\t\t\tc2 = ((data[c + 1] & 0x3E) >> 1);\n\t\t\tc3 = ((data[c + 1] & 0x01) << 4) | ((data[c + 2] & 0xF0) >> 4);\n\t\t\tc4 = ((data[c + 2] & 0x0F) << 1) | ((data[c + 3] & 0x80) >> 7);\n\t\t\tc5 = ((data[c + 3] & 0x7C) >> 2);\n\t\t\tc6 = ((data[c + 3] & 0x03) << 3) | ((data[c + 4] & 0xE0) >> 5);\n\t\t\tc7 = (data[c + 4] & 0x1F);\n\t\t\t\n\t\t\t//write\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c0];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c1];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c2];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c3];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c4];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c5];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c6];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c7];\n\t\t}\n\t\t\n\t\t//Padding\n\t\tif (maxPadding > 0) {\n\t\t\tc0 = ((data[c] & 0xF8) >> 3);\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c0];\n\t\t\t\n\t\t\tif (remainderBytes == 1) {\n\t\t\t\tc1 = ((data[c] & 0x07) << 2);\n\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c1];\n\t\t\t} else {\n\t\t\t\tc1 = ((data[c] & 0x07) << 2) | ((data[c + 1] & 0xC0) >> 6);\n\t\t\t\tc2 = ((data[c + 1] & 0x3E) >> 1);\n\t\t\t\t\n\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c1];\n\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c2];\n\t\t\t\t\n\t\t\t\tif (remainderBytes == 2) {\n\t\t\t\t\tc3 = ((data[c + 1] & 0x01) << 4);\n\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c3];\n\t\t\t\t} else {\n\t\t\t\t\tc3 = ((data[c + 1] & 0x01) << 4) | ((data[c + 2] & 0xF0) >> 4);\n\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c3];\n\t\t\t\t\t\n\t\t\t\t\tif (remainderBytes == 3) {\n\t\t\t\t\t\tc4 = ((data[c + 2] & 0x0F) << 1);\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c4];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tc4 = ((data[c + 2] & 0x0F) << 1) | ((data[c + 3] & 0x80) >> 7);\n\t\t\t\t\t\tc5 = ((data[c + 3] & 0x7C) >> 2);\n\t\t\t\t\t\tc6 = ((data[c + 3] & 0x03) << 3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c4];\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c5];\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c6];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Finally...\n\t\t\tfor (c = 0; c < maxPadding; c++) {\n\t\t\t\tresult[cursor++] = PADDING;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private void itemEncode(Player player) {\n\t\tPlayerInventory inventory = player.getInventory();\n\t\tItemStack heldItem = inventory.getItemInMainHand();\n\t\tList<String> data = CryptoSecure.encodeItemStack(heldItem);\n\t\t\n\t\tItemStack holder = new ItemStack(Material.WRITTEN_BOOK);\n\t\tBookMeta meta = (BookMeta) holder.getItemMeta();\n\t\tmeta.setAuthor(\"WATCHBOX\");\n\t\tmeta.setTitle(\"(Placeholder)\");\n\t\tmeta.setPages(data);\n\t\tholder.setItemMeta(meta);\n\t\t\n\t\tinventory.addItem(holder);\n\t}", "private void encodeFromCharSequence(@NonNull Appendable dst, @NonNull CharSequence text, boolean preserveSlash) throws IOException {\n\n for (int i = 0, length = text.length(); i < length; i++) {\n char c = text.charAt(i);\n if (OK_CHARS.get(c) || (preserveSlash && c == '/')) {\n dst.append(c);\n } else if (c == ' ') {\n dst.append('+');\n } else {\n if (c < 0x80) {\n Hexadecimal.encode(dst.append('%'), (byte) c);\n } else if (c < 0x800) {\n Hexadecimal.encode(dst.append('%'), (byte) (0xC0 | (c >> 6)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | (c & 0x3F)));\n } else if (StringUtil.isSurrogate(c)) {\n if (Character.isHighSurrogate(c) && ++i < length) {\n char c2 = text.charAt(i);\n if (Character.isLowSurrogate(c2)) {\n int codePoint = Character.toCodePoint(c, c2);\n Hexadecimal.encode(dst.append('%'), (byte) (0xF0 | (codePoint >> 18)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | ((codePoint >> 12) & 0x3F)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | ((codePoint >> 6) & 0x3F)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | (codePoint & 0x3F)));\n } else {\n Hexadecimal.encode(dst.append('%'), (byte) '?');\n i--;\n }\n } else {\n Hexadecimal.encode(dst.append('%'), (byte) '?');\n }\n }\n }\n }\n }", "public interface Encoding {\n\t/**\n\t * Encoding a string.\n\t * \n\t * @param source\n\t * @return The encoded string\n\t * @throws Exception\n\t */\n\tpublic String encode(String source) throws Exception;\n\n\t/**\n\t * Decoding a string.\n\t * \n\t * @param source\n\t * @return The decoded string\n\t * @throws Exception\n\t */\n\tpublic String decode(String source) throws Exception;\n\n}", "public void addRaw(final String pContent) {\n\t\tout.write(pContent);\n\t\tout.flush();\n\t}", "private StringBuffer encodes( StringBuffer io2Append, String i2Encode, int iLength, char iType)\n \t{\n \t\tiLength = iLength < i2Encode.length() ? iLength : i2Encode.length();\n \t\tio2Append.ensureCapacity( iLength * 4 / 3 + 6);\n \t\tint i = 0;\n \t\tchar[] lTranslationTable = iType == 'u' ? uu_table : b64_table;\n \t\tchar lPadding;\n \t\tchar[] l2Encode = i2Encode.toCharArray();\n \t\tif (iType == 'u') {\n \t\t\tif (iLength >= lTranslationTable.length)\n \t\t\t\tthrow new ArgumentError(ruby, \"\" + iLength + \" is not a correct value for the number of bytes per line in a u directive. Correct values range from 0 to \" + lTranslationTable.length);\n \t\t\tio2Append.append(lTranslationTable[iLength]);\n \t\t\tlPadding = '`';\n \t\t}\n \t\telse {\n \t\t\tlPadding = '=';\n \t\t}\n \t\twhile (iLength >= 3) {\n \t\t\tchar lCurChar = l2Encode[i++];\n \t\t\tchar lNextChar = l2Encode[i++];\n \t\t\tchar lNextNextChar = l2Encode[i++];\n \t\t\tio2Append.append(lTranslationTable[077 & (lCurChar >>> 2)]);\n \t\t\tio2Append.append(lTranslationTable[077 & (((lCurChar << 4) & 060) | ((lNextChar >>> 4) & 017))]);\n \t\t\tio2Append.append(lTranslationTable[077 & (((lNextChar << 2) & 074) | ((lNextNextChar >>> 6) & 03))]);\n \t\t\tio2Append.append(lTranslationTable[077 & lNextNextChar]);\n \t\t\tiLength -= 3;\n \t\t}\n \t\tif (iLength == 2) {\n \t\t\tchar lCurChar = l2Encode[i++];\n \t\t\tchar lNextChar = l2Encode[i++];\n \t\t\tio2Append.append(lTranslationTable[077 & (lCurChar >>> 2)]);\n \t\t\tio2Append.append(lTranslationTable[077 & (((lCurChar << 4) & 060) | ((lNextChar >> 4) & 017))]);\n \t\t\tio2Append.append(lTranslationTable[077 & (((lNextChar << 2) & 074) | (('\\0' >> 6) & 03))]);\n \t\t\tio2Append.append(lPadding);\n \t\t}\n \t\telse if (iLength == 1) {\n \t\t\tchar lCurChar = l2Encode[i++];\n \t\t\tio2Append.append(lTranslationTable[077 & (lCurChar >>> 2)]);\n \t\t\tio2Append.append(lTranslationTable[077 & (((lCurChar << 4) & 060) | (('\\0' >>> 4) & 017))]);\n \t\t\tio2Append.append(lPadding);\n \t\t\tio2Append.append(lPadding);\n \t\t}\n \t\tio2Append.append('\\n');\n \t\treturn io2Append;\n \t}", "private String encode(String s) {\n\t\tString t = \"\";\n\n\t\tif (s == null) {\n\t\t\treturn t;\n\t\t}\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\n\t\t\tif (c == '<') {\n\t\t\t\tt += \"&lt;\";\n\t\t\t} else if (c == '>') {\n\t\t\t\tt += \"&gt;\";\n\t\t\t} else if (c == '&') {\n\t\t\t\tt += \"&amp;\";\n\t\t\t} else if (c == '\"') {\n\t\t\t\tt += \"&quot;\";\n\t\t\t} else if (c == '\\'') {\n\t\t\t\tt += \"&apos;\";\n\t\t\t} else {\n\t\t\t\tt += c;\n\t\t\t}\n\t\t}\n\n\t\treturn t;\n\t}", "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 }", "protected native String encodeURIComponent(String text) /*-{\r\n\t\treturn encodeURIComponent(text);\r\n\t}-*/;", "@Override\n public void encrypt() {\n algo.encrypt();\n String cypher = vigenereAlgo(true);\n this.setValue(cypher);\n }", "Builder addEncoding(String value);", "public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }", "public static String encode(byte[] binaryData) {\n if (CommonUtil.isNull(binaryData)) {\n return null;\n }\n\n int lengthDataBits = binaryData.length * EIGHTBIT;\n if (lengthDataBits == 0) {\n return \"\";\n }\n\n int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP;\n int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP;\n int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets;\n char[] encodedData = new char[numberQuartet * 4];\n\n byte k1 = 0;\n byte l1 = 0;\n byte b1 = 0;\n byte b2 = 0;\n byte b3 = 0;\n\n int encodedIndex = 0;\n int dataIndex = 0;\n byte val1 = 0;\n byte val2 = 0;\n byte val3 = 0;\n for (int i = 0; i < numberTriplets; i++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n\n l1 = (byte) (b2 & 0x0f);\n k1 = (byte) (b1 & 0x03);\n\n val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);\n val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);\n val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc);\n\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[val1];\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[val2 | (k1 << 4)];\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[(l1 << 2) | val3];\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[b3 & 0x3f];\n }\n\n // form integral number of 6-bit groups\n assembleInteger(binaryData, fewerThan24bits, encodedData, encodedIndex, dataIndex);\n\n return new String(encodedData);\n }" ]
[ "0.6409813", "0.62855005", "0.58853596", "0.5883844", "0.5860879", "0.5831962", "0.57939154", "0.57013625", "0.5697283", "0.56917363", "0.5687257", "0.56640923", "0.56007993", "0.5560545", "0.554539", "0.55300987", "0.55138767", "0.54520434", "0.543805", "0.54029846", "0.5390735", "0.53459215", "0.53308386", "0.5326158", "0.529409", "0.5261668", "0.5241253", "0.5235361", "0.5226992", "0.52178913", "0.51551056", "0.5153377", "0.513769", "0.5137583", "0.51075596", "0.51055354", "0.5095038", "0.5083859", "0.50756586", "0.5070446", "0.5056325", "0.50532913", "0.50519496", "0.5044083", "0.50402075", "0.50348324", "0.5034678", "0.50338596", "0.50264734", "0.5023405", "0.50227195", "0.5017689", "0.50175893", "0.5007343", "0.5000242", "0.49943274", "0.4989142", "0.49831972", "0.4976596", "0.49717987", "0.49643263", "0.496126", "0.49460435", "0.4943914", "0.4938801", "0.49295548", "0.4925238", "0.49126643", "0.49105352", "0.4892916", "0.48921072", "0.48896578", "0.48830506", "0.48765576", "0.48730728", "0.48704654", "0.48639578", "0.48627755", "0.4861692", "0.4852239", "0.48398814", "0.48382652", "0.48371682", "0.48332888", "0.48157865", "0.48122215", "0.48052135", "0.47967222", "0.479441", "0.47939688", "0.47787857", "0.47756982", "0.4775031", "0.47717834", "0.47717363", "0.4768107", "0.4766182", "0.47607633", "0.47564536", "0.47563326", "0.47520518" ]
0.0
-1
A method that decodes a block of text
public String decode(String input) { String decoded = ""; char[] message = input.toCharArray(); for (int j = 0; j < message.length; j++) { //takes input into a array of chars decodingQueue.enqueue(message[j]); } char lastvalue =0; boolean islastvaluenum= false; for (int i = 0; i < input.length(); i++) { char character = decodingQueue.dequeue(); if(character != ' ') { //if not a space String alphabet = "abcdefghijklmnopqrstuvwxyz"; if (islastvaluenum==false) { //if last value was not a num, then proceed normally with first set of numbers char decodedvalue = denumerate(character, 1); if (decodedvalue != 0) { islastvaluenum = true; decoded = decoded + decodedvalue; } else { islastvaluenum = false; int shiftvalue = -(5+(2*i)); boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue)% chararray.length]; charfound = true; } } } character = output; decoded = decoded + character; } } else { char decodedvalue = denumerate(character, 2); //if last value was a num, then proceed with second set of numbers if (decodedvalue != 0) { islastvaluenum = true; decoded = decoded+ decodedvalue; } else { islastvaluenum = false; int shiftvalue1 = -5; boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue1)% chararray.length]; charfound = true; } } } character = output; int shiftvalue2 = (2 * (lastvalue - '0'))-(i * 2); charfound = false; chararray = (alphabet.toUpperCase()).toCharArray(); output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue2)% chararray.length]; charfound = true; } } } character = output; decoded = decoded + character; } } lastvalue = character; } else{ decoded = decoded + ' '; } } return decoded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TextDecoder getTextDecoder();", "String decodeString();", "void setTextDecoder(TextDecoder decoder);", "private void decoding(String cipherText)\n\t{\n\t\ttextLength = cipherText.length();\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\t\t\tchar currentLetter[] = cipherText.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO ==0)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO != ZERO)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tdecodedText = sb.toString();\n\t\t\tcipherText = decodedText;\n\t\t\tloopIntDecode++;\n\t\t}while(loopIntDecode < shiftAmount);\n\t}", "public abstract void decode(SubtitleInputBuffer subtitleInputBuffer);", "private String decodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n String decoding = decodageMot(text);\n SubstCipher decodingText = new SubstCipher(this.shiftAlea);\n decodingText.ensureNegativeShift();\n decodingText.buildShiftedTextFor(decoding);\n return decodingText.getLastShiftedText();\n }", "private String decoder(String code, Tree iterator) {\n for (int i = 0; i < code.length(); i++) {\n String decodedChar = iterator.decode(code.substring(0, i + 1));\n\n if (decodedChar != null) {\n decode = decode + decodedChar;\n code = code.substring(i + 1);\n i = -1;\n }\n }\n\n return code;\n }", "Object decode(String encoded);", "public String getDecod(String text) {\n Base64.Decoder decoder = Base64.getDecoder();\n return new String(decoder.decode(text));\n }", "public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }", "public String getDecoded()\n\t{\n\t\treturn this.decodedText;\n\t}", "public String decompress() {\r\n \tString decompressed = \"\";\r\n \tString cursor = \"\";\r\n \tfor (int i = 0; i < compressedText.length(); i++) {\r\n \t\tcursor += compressedText.charAt(i);\r\n \t\tif (codeToChar.containsKey(cursor)) {\r\n \t\t\tdecompressed += codeToChar.get(cursor);\r\n \t\t\tcursor = \"\";\r\n \t\t}\r\n \t}\r\n return decompressed;\r\n }", "T decode1(DataBuffer buffer);", "public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "byte[] decodeBytes();", "public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }", "private static void decodeString(String in){\n\t\t//reverse anything done in encoded string\n\t\tString demess = decrypt(in);\n\t\tString decodeMessage = bigIntDecode(demess);\n\n\t\tSystem.out.println(\"Decoded message: \" + decodeMessage + \"***make function to actually decode!\");\n\t}", "private static String decode(String s) {\n\t\tint length = s.length();\n\t\tStringBuilder str = new StringBuilder(length);\n\t\tMatcher matcher = PATTERN.matcher(s);\n\t\tint offset = 0;\n\t\tbyte[] bb = null;\n\t\twhile (matcher.find(offset)) {\n\t\t\tint count = matcher.groupCount();\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tString match = matcher.group(0);\n\t\t\t\tint num = match.length() / 3;\n\t\t\t\tif (bb == null || bb.length < num) {\n\t\t\t\t\tbb = new byte[num];\n\t\t\t\t}\n\t\t\t\tfor (int j = 0; j < num; j++) {\n\t\t\t\t\tint head = j * 3 + 1;\n\t\t\t\t\tint tail = head + 2;\n\t\t\t\t\tbb[j] = (byte)Integer.parseInt(match.substring(head, tail), 16);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tString text = new String(bb, \"UTF-8\");\n\t\t\t\t\tstr.append(s.substring(offset, matcher.start()));\n\t\t\t\t\tstr.append(text);\n\t\t\t\t}\n\t\t\t\tcatch (UnsupportedEncodingException e) {\n\t\t\t\t\t// NOTE: This should *never* be thrown because all\n\t\t\t\t\t// JVMs are required to support UTF-8. I mean,\n\t\t\t\t\t// the strings in the .class file are all in\n\t\t\t\t\t// a modified UTF-8, for pete's sake! :)\n\t\t\t\t}\n\t\t\t}\n\t\t\toffset = matcher.end();\n\t\t}\n\t\tif (offset < length) {\n\t\t\tstr.append(s.substring(offset));\n\t\t}\n\t\treturn str.toString();\n\t}", "public void decode() throws Exception {\n decodeFat();\n decodeDat();\n }", "public abstract int decode(ByteBuffer buffer, int offset);", "@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}", "@Override\n public String decode(String code) throws IllegalStateException {\n if (code == null || code.equals(\"\")) {\n throw new IllegalStateException(\"the code cannot be null or empty.\");\n }\n Tree iterator = root;\n decode = \"\";\n\n for (int i = 0; i < code.length(); i++) {\n if (!encodingArray.contains(code.charAt(i))) {\n throw new IllegalStateException(\"The encoded string contains illegal symbol\");\n }\n }\n\n code = decoder(code, iterator);\n\n if (code.length() != 0) {\n throw new IllegalStateException(\"there is some problem with decoding.\");\n }\n\n return decode;\n }", "int decodeCharacter(ByteStream byteStream) throws CharacterDecodingException, IOException;", "private static CharSequence decodedString(String string) {\n\t\treturn null;\r\n\t}", "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}", "@Override\n protected String decodeFragment(String encodedFragment) {\n return encodedFragment;\n }", "public static void main(String[] args) {\n String textToDecode = \"j5jqktt5tsk559tsskjssjttsjksts5998tsskst8q59kttt59skqj5sktqj5559skst5t59sjk8sqtst5jqqjss99jqj5qj59jsjq5559ktsqsjqj55st59jsqjksjq55k559ktqjks59ktttj55tts595sjq5559k8tst5jqqjk5995tktts59jsjq55595sktsqstjsjq559559k8sjjq5559tkjq555tksts555559ktt55559t559jsst55qjsk59tssjk8ts55jqqj99t5jqk8sj5559jq59tstkjq5ss8sk55k55955ts59kt555s5tksjq5559tkts59ktts55jqqj95\";\n\n //enter secret code characters\n String secretCode = \"58sjtkq9\";\n\n char[] secretCode_Split = secretCode.toCharArray();\n\n\n char[][] secretTable =\n {{'b', '0', 's', '_', 'k', '{','$',' '},\n {'/', '4', 'h', '<', ']', '9','!',':'},\n {'-', 'u', ';', 'z', 'a', 'j','r','_'},\n {'l', '3', 'c', '8', '#', '\"','i','1'},\n {'w', '7', 'o', '2', 'y', 'p','(','}'},\n {',', 'd', 'n', '*', 't', '%','g','['},\n {'x', '?', '=', 'e', '+', '6',')','q'},\n {'.', 'm', '@', '>', '5', '&','f','\\n'}};\n\n\n String[] textToDecode_Split_1 = textToDecode.split(\"(?<=\\\\G.{2})\");\n\n int[] result_row;\n result_row = new int[(textToDecode.length()/2)];\n\n int[] result_column;\n result_column = new int[(textToDecode.length()/2)];\n\n for (int i = 0; i < (textToDecode.length()/2) ; i++) {\n char[] textToDecode_Split_2 = textToDecode_Split_1[i].toCharArray();\n for (int j = 0; j <= 1; j++) {\n char textToDecode_Split_3 = textToDecode_Split_2[j];\n for (int k = 0; k < secretCode.length() ; k++) {\n if (j == 0) {\n if (textToDecode_Split_3 == secretCode_Split[k]) {\n result_row[i] = k;\n }\n } else if (j == 1) {\n if (textToDecode_Split_3 == secretCode_Split[k]) {\n result_column[i] = k;\n }\n }\n }\n }\n }\n\n for (int i = 0; i < result_row.length ; i++) {\n System.out.print(secretTable[result_row[i]][result_column[i]]);\n\n }\n}", "protected void decodeChunk(byte[] block, int start, final int end)\r\n {\n long st = this.bitstream.readBits(64);\r\n final long mask = (1L << this.logRange) - 1;\r\n\r\n for (int i=start; i<end; i++)\r\n {\r\n final int idx = (int) (st & mask);\r\n final int symbol = this.f2s[idx];\r\n block[i] = (byte) symbol;\r\n\r\n // Compute next ANS state\r\n // D(x) = (s, q_s (x/M) + mod(x,M) - b_s) where s is such b_s <= x mod M < b_{s+1}\r\n st = (this.freqs[symbol] * (st >>> this.logRange)) + idx - this.cumFreqs[symbol];\r\n\r\n // Normalize\r\n while (st < ANS_TOP)\r\n st = (st << 32) | this.bitstream.readBits(32);\r\n }\r\n }", "public abstract Object decode(InputStream is) ;", "public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }", "public Decoded decode(String barcode){\n Decoded decoded = new Decoded();\n this.barcode = barcode;\n\n decoded.barcode = barcode;\n\n if(barcode == null || barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n\n // remove leading * and check\n if(barcode.startsWith(\"*\")){\n barcode = barcode.substring(1);\n if(barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n }\n\n // remove trailing * and check\n if(barcode.endsWith(\"*\")){\n barcode = barcode.substring(0, barcode.length() - 1);\n if(barcode.isEmpty()){\n decoded.error = Error.EMPTY_BARCODE;\n return decoded;\n }\n }\n\n // check for + character\n if(barcode.charAt(0) != '+'){\n decoded.error = Error.BARCODE_NOT_HIBC;\n return decoded;\n } else {\n barcode = barcode.substring(1);\n }\n\n // check minimum barcode length\n if(barcode.length() < 4){\n decoded.error = Error.INVALID_BARCODE;\n return decoded;\n }\n\n String potentialCheckAndLinkCharacters = barcode.substring(barcode.length() - 2);\n barcode = barcode.substring(0, barcode.length() - 2);\n\n String[] lines = barcode.split(\"[\\\\/]\");\n\n if(lines.length == 1){\n if(Character.isLetter(lines[0].charAt(0))){\n decoded = processLine1(decoded, Type.LINE_1, lines[0] + potentialCheckAndLinkCharacters);\n } else {\n decoded = processLine2(decoded, Type.LINE_2, lines[0] + potentialCheckAndLinkCharacters);\n }\n return decoded;\n\n }else if(lines.length == 2){\n decoded = processLine1(decoded, Type.CONCATENATED, lines[0]);\n decoded = assign(decoded, processLine2(new Decoded(), Type.CONCATENATED, lines[1] + potentialCheckAndLinkCharacters));\n } else {\n decoded.error = Error.INVALID_BARCODE;\n return decoded;\n }\n\n return decoded;\n\n }", "private CharSequence decode(ByteBuffer buf) {\n CharBuffer isodcb = null;\n CharsetDecoder isodecoder = UTF8.newDecoder();\n try {\n isodcb = isodecoder.decode(buf);\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return (CharSequence) isodcb;\n }", "public int decodeBytes(byte[] bytes) {\n if (bytes.length < 200)\n return 0;\n\n List<Code> createdCodes = null;\n // Size of symbol is 10 bytes, so we need to shift\n for (int i = 0; i < 10; i++) {\n byte[] tempBytes = new byte[bytes.length - i];\n System.arraycopy(bytes, i, tempBytes, 0, bytes.length - i);\n\n createdCodes = Code.createCodes(tempBytes);\n\n // Counter for incorrect symbols\n int bad = 0;\n\n // Check on errors\n for (Code sign : createdCodes)\n if (sign.equals(ERROR_CODE))\n bad++;\n\n if (!(tempBytes.length / 10 - bad < 10))\n break;\n }\n\n // Message ready for further decoding?\n int headPosition = findHeadPosition(createdCodes);\n // if we've found beginning then continue decoding\n // else remove 21 bytes\n if (headPosition < 0)\n return 21;\n\n // Do we need to put back into buffer and save?\n int endPosition = findEndingPosition(createdCodes);\n // if we've found end of sequence then continue decoding\n // else remove bytes\n if (endPosition < 0) {\n if (bytes.length > 2000)\n return 50;\n\n return 0;\n }\n\n // Is DSC with expanded sequence?\n int expandPosition = findExpandPosition(\n createdCodes, endPosition + endingPattern.size()\n );\n if (expandPosition < 0 && bytes.length < 2000) {\n return 0;\n }\n\n // To the end position adds two for decoding ECC symbol\n List<Code> message = processMessage(\n createdCodes, headPosition,\n expandPosition < 0 ? endPosition + 3 : expandPosition + 3,\n expandPosition > 0\n );\n\n String decodedSymbols = message.stream().map(\n (c) -> c.getSymbol() + \"\" + \" \"\n ).reduce(\n (s1, s2) -> s1 + s2\n ).orElse(\"\");\n\n logger.info(\"Decoded symbols: \" + decodedSymbols);\n\n codeDecoder.decodeCodes(message);\n\n return (endPosition * 10 + endingPattern.size() * 10);\n }", "public void deliverRawText(String text) {\n \n }", "public void decodeIndexEntry(IEntryResult entryResult){\n char[] word = entryResult.getWord();\n int size = word.length;\n int tagLength = REF.length;\n int nameLength = CharOperation.indexOf(SEPARATOR, word, tagLength);\n if (nameLength < 0) nameLength = size;\n this.decodedSegment = CharOperation.subarray(word, tagLength, nameLength); }", "public void decodeMessage() {\n StringBuilder decoded = new StringBuilder();\n\n for (int i = 0; i < message.length(); i += 3) {\n if (message.charAt(i) == message.charAt(i + 1)) {\n decoded.append(message.charAt(i));\n } else if (message.charAt(i) == message.charAt(i + 2)) {\n decoded.append(message.charAt(i));\n } else {\n decoded.append(message.charAt(i + 1));\n }\n }\n\n message = decoded;\n }", "public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public byte[] processBlock(byte[] in, int inOff, int len)\n throws InvalidCipherTextException;", "@Override\n public Frame decodeNextByte(byte nextByte) {\n if (nextByte == '\\u0000') { // Fixme changed to \\u0000 and not \\n\n String result = new String(bytes, 0, len, StandardCharsets.UTF_8);\n len = 0;\n return createFrame(result);\n }\n\n pushByte(nextByte);\n return null; //not a line yet\n }", "private static String decode(final String extractedStr, Integer[] uncode) {\n if (null == extractedStr || extractedStr.isEmpty())\n return \"\";\n String decodedStr = extractedStr;\n for (Integer codeInt : uncode) {\n switch (codeInt) {\n case 0:\n break;\n case 1:\n decodedStr = changeUnicode(decodedStr);// unicode\n break;\n case 2:\n decodedStr = changeUrlcode(decodedStr, \"utf-8\");// urlcode\n break;\n case 3:\n decodedStr = changeMac(decodedStr);// Mac\n break;\n case 4:\n decodedStr = chageIdfa(decodedStr);\n break;\n case 5:\n decodedStr = chageMacTypeTwo(decodedStr);\n break;\n case 6:\n decodedStr = changeUrlcode(decodedStr, \"gb2312\");// urlcode\n break;\n case 7:\n\n break;\n case 8:\n decodedStr = changeBase64(decodedStr.toString());// base64\n break;\n case 9:\n decodedStr = decodedStr.toLowerCase();\n break;\n case 10:\n decodedStr = decodedStr.toUpperCase();\n break;\n case 11:\n Pattern p = Pattern.compile(\"\\\"scenicId\\\":.*?,\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(decodedStr);\n while (m.find()) {\n decodedStr = m.group().substring(\"\\\"scenicId\\\":\".length(), m.group().length() - 1);\n }\n break;\n case 12:\n p = Pattern.compile(\"\\\"productId\\\":.*?,\", Pattern.CASE_INSENSITIVE);\n m = p.matcher(decodedStr);\n while (m.find()) {\n decodedStr = m.group().substring(\"\\\"productId\\\":\".length(), m.group().length() - 1);\n }\n break;\n\n }\n }\n return decodedStr;\n }", "void decode2(DataBuffer buffer, T object);", "public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tStringBuilder output = new StringBuilder();\n\n\t\tint i = 0;\n\t\twhile (i < encoded.length()) {\n\t\t\tStringBuilder characterBuilder = new StringBuilder();\n\n\t\t\twhile (!decodingTable.containsKey(characterBuilder.toString()))\n\t\t\t\tcharacterBuilder.append(encoded.charAt(i++));\n\n\t\t\toutput.append(decodingTable.get(characterBuilder.toString()));\n\t\t}\n\n\t\treturn output.toString();\n\t}", "public Object decode(Object pObject) throws DecoderException {\n if (pObject == null) {\n return null;\n } else if (pObject instanceof byte[]) {\n return decode((byte[])pObject);\n } else if (pObject instanceof String) {\n return decode((String)pObject);\n } else {\n throw new DecoderException(\"Objects of type \" +\n pObject.getClass().getName() + \" cannot be quoted-printable decoded\"); \n \n }\n }", "public static void decode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n int index = BinaryStdIn.readChar();\n char c = seq[index];\n BinaryStdOut.write(seq[index]);\n\n for (int i = index; i > 0; i--)\n seq[i] = seq[i - 1];\n seq[0] = c;\n }\n BinaryStdOut.close();\n }", "public static String decode(String inString) throws Exception{\r\n\t\tStringBuilder decodedString = new StringBuilder();\r\n\t\tString[] splitString = inString.split(\"\\\\s\");\r\n\t\tString type = splitString[3].substring(5, splitString[3].length());\r\n\t\tString Key = splitString[4].substring(4, splitString[4].length()-1);\r\n\t\tStringBuilder temp = new StringBuilder();\r\n\t\tfor(int j=0;j<5;j++){\r\n\t\t\tdecodedString.append(splitString[j]);\r\n\t\t\tdecodedString.append(\" \");\r\n\t\t}\r\n\t\tif(type.equals(\"Caesar\")){\r\n\t\t\tString encodedString = unHex(splitString[5]);\r\n\t\t\tinString = encodedString;\r\n\t\t\tchar[] alphabet ={'a','b','c','d','e','f','g','h','i','j','k','l','m',\r\n\t\t\t\t\t'n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö','A','B',\r\n\t\t\t\t\t'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W',\r\n\t\t\t\t\t'X','Y','Z','Å','Ä','Ö','0','1','2','3',\r\n\t\t\t\t\t'4','5','6','7','8','9','!','?',')','(','=','>','<','/','&','%','#','@','$','[',']'};\r\n\t\t\tint Keyint = (int) (Long.parseLong(Key,16)%alphabet.length);\r\n\t\t\tSystem.out.println(\"Here is \"+ Keyint);\r\n\t\t\tfor(int i = 0; i < inString.length(); i++){\r\n\t\t\t\tchar a = inString.charAt(i);\r\n\t\t\t\tint used = 0;\r\n\t\t\t\tfor(char b: alphabet){\r\n\t\t\t\t\tif(b==a){\r\n\t\t\t\t\t\tif(indexOf(alphabet,b)<Keyint){\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tdecodedString.append(\r\n\t\t\t\t\t\t\t\t\t\talphabet[(alphabet.length-\r\n\t\t\t\t\t\t\t\t\t\t\t\tKeyint+indexOf(alphabet,b))]);\r\n\t\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\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\ttry{\r\n\t\t\t\t\t\t\t\tdecodedString.append(alphabet[(indexOf(alphabet,b)\r\n\t\t\t\t\t\t\t\t\t\t-Keyint)]);\r\n\t\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\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\tif(used==0){\r\n\t\t\t\t\tdecodedString.append(a);\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if(type.equals(\"AES\")){\r\n\t\t\tString neuKey = unHex(Key);\r\n\t\t\tbyte[] keyContent = Base64.getDecoder().decode(neuKey);\r\n\t\t\tString encodedString = unHex(splitString[5]);\r\n\t\t\tbyte[] encoded = hexStringToByteArray(splitString[5]);\r\n\t\t\tSystem.out.println(\"This is: \"+ new String(encoded,\"UTF8\"));\r\n\t\t\tinString = encodedString;\r\n\t\t\tSecretKeySpec decodeKey = new SecretKeySpec(keyContent, \"AES\");\r\n\t\t\tCipher AEScipher = Cipher.getInstance(\"AES\");\r\n\t\t\tAEScipher.init(Cipher.DECRYPT_MODE, decodeKey);\r\n\t\t\tbyte[] decryptedData;\r\n\t\t\tdecryptedData = AEScipher.doFinal(encoded);\r\n\t\t decodedString.append(new String(decryptedData,\"UTF8\"));\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Not a valid encryption\");\r\n\t\t}\r\n\t\tdecodedString.append(splitString[splitString.length-2]);\r\n\t\tdecodedString.append(\" \");\r\n\t\tdecodedString.append(splitString[splitString.length-1]);\r\n\t\treturn decodedString.toString();\r\n\t\t\r\n\t}", "public byte[] decodeContent(String contentDataString){\t\t\n return Base64.decodeBase64(contentDataString);\n}", "public String decrypt(String text) {\n return content.decrypt(text);\n }", "@Override\n public int finalDecrypt(byte[] text) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n decrypt(text);\n int n = 0;\n for(int i = text.length-1; text[i] == 0x00; --i){\n n += 1;\n }\n return text.length - n - 1;\n }", "public byte[] decode(byte[] pArray) throws DecoderException {\n return decodeQuotedPrintable(pArray);\n }", "public void handleDecode(Result rawResult, Bitmap barcode) {\n\t\tif (barcode == null) {\n\n\t\t} else {\n\t\t\thandleDecode(rawResult.getText());\n\t\t}\n\n\t}", "private String decode(String filtered) {\n // buffer for the decoded number\n char decoded[] = new char[filtered.length()];\n // iterate through characters\n for (int i = 0; i < filtered.length(); i++) {\n // decode char-by-char\n decoded[i] = encoding.get(filtered.charAt(i));\n }\n return new String(decoded);\n }", "void decodeObject();", "private int decode(int index) {\n return (encoded[index] - 32) & 0x3F;\n }", "public String decode(String cipherText){\n String decodedMsg = cipherText;\n for(int i=0;i<n;i++)\n decodedMsg = reShuffle(decodedMsg);\n return decodedMsg;\n }", "public String preprocessingDecryptToDisplay(String in);", "private String readText(NdefRecord record) throws UnsupportedEncodingException {\n\n byte[] payload = record.getPayload();\n\n // Get the Text Encoding\n String textEncoding = ((payload[0] & 128) == 0) ? \"UTF-8\" : \"UTF-16\";\n\n // Get the Language Code\n int languageCodeLength = payload[0] & 0063;\n\n // String languageCode = new String(payload, 1, languageCodeLength, \"US-ASCII\");\n // e.g. \"en\"\n\n // Get the Text\n return new String(payload, languageCodeLength + 1, payload.length - languageCodeLength - 1, textEncoding);\n }", "void decryptCode() {\n StringBuilder temp = new StringBuilder(\"\");\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // append char to temp if char at i is not a multiple of z\n if (!(i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) || i == 0)\n temp.append(this.getText().charAt(i));\n }\n\n this.setText(temp);\n\n \n // Step 2:\n\n // split phrase up into words\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if y1x3x4 is at the end of the word, remove it from word\n \n if (words.get(i).substring(words.get(i).length() - 3, words.get(i).length())\n .equals(this.getSecretKey().substring(3, 6)))\n words.set(i, words.get(i).substring(0, words.get(i).length() - 3));\n\n // if x1x2 is at the end of the word\n else {\n // remove x1x2 from end\n words.set(i, words.get(i).substring(0, words.get(i).length() - 2));\n \n // move last char to beginning\n words.set(i, words.get(i).charAt(words.get(i).length() - 1) + words.get(i).substring(0, words.get(i).length() - 1));\n }\n }\n\n temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n }", "public String decode(Reader input) throws IOException\n\t{\n\t\treturn decode(input, 0);\n\t}", "public String decode(String message) {\n if (message == null || message.isEmpty()) {\n return \"\";\n }\n StringBuilder source = new StringBuilder(message);\n StringBuilder target = new StringBuilder();\n while (source.length() >= 8) {\n String substring = source.substring(0,8);\n source.delete(0, 8);\n target.append(decodeByte(substring));\n }\n int bitOverlap = target.length() % 8;\n if (bitOverlap > 0 && target.length() > 8) {\n target.delete(target.length() - bitOverlap, target.length());\n }\n return target.toString();\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "public static String decode(String decode, String decodingName) {\r\n\t\tString decoder = \"\";\r\n\t\tif (decodingName.equalsIgnoreCase(\"base64\")) {\r\n\t\t\tbyte[] decoded = Base64.decodeBase64(decode);\r\n\t\t\ttry {\r\n\t\t\t\tdecoder = new String(decoded, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"PBEWithMD5AndDES\")) {\r\n\t\t\t// Key generation for enc and desc\r\n\t\t\tKeySpec keySpec = new PBEKeySpec(secretKey.toCharArray(), salt, iterationCount);\r\n\t\t\tSecretKey key;\r\n\t\t\ttry {\r\n\t\t\t\tkey = SecretKeyFactory.getInstance(\"PBEWithMD5AndDES\").generateSecret(keySpec);\r\n\t\t\t\t// Prepare the parameter to the ciphers\r\n\t\t\t\tAlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);\r\n\t\t\t\t// Decryption process; same key will be used for decr\r\n\t\t\t\tdcipher = Cipher.getInstance(key.getAlgorithm());\r\n\t\t\t\tdcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);\r\n\t\t\t\tif (decode.indexOf(\"(\", 0) > -1) {\r\n\t\t\t\t\tdecode = decode.replace('(', '/');\r\n\t\t\t\t}\r\n\t\t\t\tbyte[] enc = Base64.decodeBase64(decode);\r\n\t\t\t\tbyte[] utf8 = dcipher.doFinal(enc);\r\n\t\t\t\tString charSet = \"UTF-8\";\r\n\t\t\t\tString plainStr = new String(utf8, charSet);\r\n\t\t\t\treturn plainStr;\r\n\t\t\t} catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException\r\n\t\t\t\t\t| InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException\r\n\t\t\t\t\t| IOException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"DES/ECB/PKCS5Padding\")) {\r\n\t\t\t// Get a cipher object.\r\n\t\t\tCipher cipher;\r\n\t\t\ttry {\r\n\t\t\t\tcipher = Cipher.getInstance(\"DES/ECB/PKCS5Padding\");\r\n\t\t\t\tcipher.init(Cipher.DECRYPT_MODE, generateKey());\r\n\t\t\t\t// decode the BASE64 coded message\r\n\t\t\t\tBASE64Decoder decoder1 = new BASE64Decoder();\r\n\t\t\t\tbyte[] raw = decoder1.decodeBuffer(decode);\r\n\t\t\t\t// decode the message\r\n\t\t\t\tbyte[] stringBytes = cipher.doFinal(raw);\r\n\t\t\t\t// converts the decoded message to a String\r\n\t\t\t\tdecoder = new String(stringBytes, \"UTF8\");\r\n\t\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IOException\r\n\t\t\t\t\t| IllegalBlockSizeException | BadPaddingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn decoder;\r\n\t}", "@Override\r\n public String decode(String message) throws IllegalStateException {\r\n StringBuilder sb = new StringBuilder();\r\n TrieNode currNode = root;\r\n //check validity of the encoded message\r\n for (char ch : message.toCharArray()) {\r\n if (!this.codeSymbolsSet.contains(ch)) {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n //regular decoding\r\n for (int i = 0; i < message.length(); i++) {\r\n char currChar = message.charAt(i);\r\n if (currNode.getChildrenMap().containsKey(currChar)) {\r\n currNode = currNode.getChildrenMap().get(currChar);\r\n if (currNode.isLeaf()) {\r\n sb.append(currNode.getSymbol());\r\n currNode = root;\r\n }\r\n }\r\n //wrong decoding\r\n else {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n if (!currNode.isLeaf() && currNode != root) {\r\n throw new IllegalStateException();\r\n }\r\n return sb.toString();\r\n }", "@Test\n void testFirstTwoBlocks() throws Exception {\n HMEFMessage msg;\n try (InputStream is = _samples.openResourceAsStream(\"quick-winmail.dat\")) {\n msg = new HMEFMessage(is);\n }\n\n MAPIAttribute attr = msg.getMessageMAPIAttribute(MAPIProperty.RTF_COMPRESSED);\n assertNotNull(attr);\n MAPIRtfAttribute rtfAttr = (MAPIRtfAttribute) attr;\n\n // Truncate to header + flag + data for flag + flag + data\n byte[] data = Arrays.copyOf(rtfAttr.getRawData(), 16 + 12 + 13);\n\n // Decompress it\n CompressedRTF comp = new CompressedRTF();\n byte[] decomp = comp.decompress(new ByteArrayInputStream(data));\n String decompStr = new String(decomp, StandardCharsets.US_ASCII);\n\n // Test\n assertEquals(block2, decompStr);\n }", "public String decode(String cipherText)\n\t{\n\t\tthis.decoding(cipherText);\n\t\treturn this.decodedText;\n\t}", "IMessage decode(byte[] data) throws InvalidMessageException;", "public void parsePseudocode() {\n\t\tputTokens();\n\t\tsetTokenLength();\n\t\ttokenize();\n\t\tdataToJS();\n\t}", "byte decodeByte();", "void parseQrCode(String qrCodeData);", "@Test\n\tvoid testDecodeString() {\n\t\tassertEquals(\"aaabcbc\", new DecodeString().decodeString(\"3[a]2[bc]\"));\n\t\tassertEquals(\"accaccacc\", new DecodeString().decodeString(\"3[a2[c]]\"));\n\t\tassertEquals(\"abcabccdcdcdef\", new DecodeString().decodeString(\"2[abc]3[cd]ef\"));\n\t\tassertEquals(\"absabcabccdcdcdef\", new DecodeString().decodeString(\"abs2[abc]3[cd]ef\"));\n\t\tassertEquals(\"f\", new DecodeString().decodeString(\"f\"));\n\t\tassertEquals(\"\", new DecodeString().decodeString(\"\"));\n\t\tassertEquals(\"abababababababababababab\", new DecodeString().decodeString(\"12[ab]\"));\n\t}", "public static byte[] decode(String text) {\n\t\tif (text == null || \"\".equals(text = text.trim())) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfinal int _char_size = 4; \n\t\t\n\t\tint size = text.length();\n\t\tif ((size % _char_size) != 0) {\n\t\t\tthrow new RuntimeException(\"invalid input text, \"\n\t\t\t\t\t+ \"length not enough.\");\n\t\t}\n\t\t\n\t\t//compute the buffer size, the tail equality sign count will be deducted\n\t\tchar cb1 = text.charAt(size - 1);\n\t\tchar cb2 = text.charAt(size - 2);\n\t\tfinal int dataBufferSize = (size / 4 * 3) - ((cb2 == '=') ? \n\t\t\t\t2 : ((cb1 == '=') ? 1 : 0));\n\t\tbyte[] dataBuffer = new byte[dataBufferSize];\n\t\tint bufferIndex = 0;\n\t\t\n\t\tint equCnt = 0;\n\t\t\n\t\t//compute each charcter's index\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < size; i += _char_size) {\n\t\t\ttmp = 0;\n\t\t\tint shiftFactor = 3;\n\t\t\tfor (int j = i; j < i + _char_size; ++j) {\n\t\t\t\tint index = 0;\n\t\t\t\tchar ch = text.charAt(j);\n\t\t\t\tif (ch >= 'A' && ch <= 'Z') {\n\t\t\t\t\tindex = ch - 'A' + _base_A_Z;\n\t\t\t\t} else if (ch >= 'a' && ch <= 'z') {\n\t\t\t\t\tindex = ch - 'a' + _base_a_z;\n\t\t\t\t} else if (ch >= '0' && ch <= '9') {\n\t\t\t\t\tindex = ch - '0' + _base_0_9;\n\t\t\t\t} else if (ch == '+') {\n\t\t\t\t\tindex = _base_add;\n\t\t\t\t} else if (ch == '/') {\n\t\t\t\t\tindex = _base_sub;\n\t\t\t\t} else if (ch == '=') {\n\t\t\t\t\tindex = _base_equ;\n\t\t\t\t\t++equCnt;\n\t\t\t\t\tif (equCnt > 2) \n\t\t\t\t\t\tthrow new RuntimeException(\"invalid format\");\n\t\t\t\t} else {\n\t\t\t\t\tthrow new RuntimeException(\"invalid input text, \"\n\t\t\t\t\t\t\t+ \"illegal character '\" + ch + \"'.\");\n\t\t\t\t}\n\t\t\t\ttmp ^= (index << (shiftFactor * 6));\n\t\t\t\t--shiftFactor;\n\t\t\t}\n\t\t\t\n\t\t\t//decode to binary\n\t\t\tdataBuffer[bufferIndex++] = (byte)((tmp >>> 16) & 0xff);\n\t\t\tif (bufferIndex == dataBufferSize) break;\n\t\t\tdataBuffer[bufferIndex++] = (byte)((tmp >>> 8 ) & 0xff);\n\t\t\tif (bufferIndex == dataBufferSize) break;\n\t\t\tdataBuffer[bufferIndex++] = (byte)((tmp ) & 0xff);\n\t\t}\n\t\t\n\t\treturn dataBuffer;\n\t}", "public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }", "public byte[] getTextBytes();", "public abstract byte[] parse(String input);", "public String decode(String message)\n\t{\n\t\treturn decode(message, 0);\n\t}", "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 getText (TextFragment textFragment,\r\n \t\tList<Integer> markerPositions)\r\n \t{\r\n \t\tif ( textFragment == null ) {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \r\n \t\tString res = textFragment.getCodedText();\r\n \t\tif ( markerPositions != null ) {\r\n \t\t\tmarkerPositions.clear();\r\n \t\t}\r\n \r\n \t\t// No need to parse the text if there are no codes\r\n \t\tif ( !textFragment.hasCode() ) {\r\n \t\t\treturn res;\r\n \t\t}\r\n \t\t\r\n \t\t// Collect marker positions & remove markers\r\n \t\tStringBuilder sb = new StringBuilder();\r\n \t\tint startPos = -1;\r\n \t\tfor (int i = 0; i < res.length(); i++) {\r\n \t\t\tswitch (res.charAt(i)) {\r\n \t\t\tcase TextFragment.MARKER_OPENING:\r\n \t\t\tcase TextFragment.MARKER_CLOSING:\r\n \t\t\tcase TextFragment.MARKER_ISOLATED:\r\n \t\t\t\tif (markerPositions != null) {\r\n \t\t\t\t\tmarkerPositions.add(i);\r\n \t\t\t\t}\r\n \t\t\t\tif (i > startPos && startPos >= 0) {\r\n \t\t\t\t\tsb.append(res.substring(startPos, i));\r\n \t\t\t\t}\r\n \t\t\t\ti += 1;\r\n \t\t\t\tstartPos = -1;\r\n //\t\t\t\tstartPos = i + 2;\r\n //\t\t\t\ti = startPos;\r\n \t\t\t\tbreak;\r\n \t\t\tdefault:\r\n \t\t\t\tif (startPos < 0)\r\n \t\t\t\t\tstartPos = i;\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (startPos < 0 && sb.length() == 0) // Whole string \r\n \t\t\tstartPos = 0; \t\t\r\n \t\telse\t\t\t\r\n \t\t\tif (startPos > -1 && startPos < res.length()) {\r\n \t\t\t\tsb.append(res.substring(startPos));\r\n \t\t\t}\r\n \r\n \t\treturn sb.toString();\r\n \t}", "public abstract void mo2157b(CharSequence charSequence);", "@Override\n\tpublic void interpretBytes() {\n\t\t\n\t}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "EzyDecodeHandler nextHandler();", "public String decode(String cipher)\n {\n \treturn null;\n }", "protected String decodeString(String s,\n int lineNr) {\n StringBuffer result = new StringBuffer(s.length());\n int index = 0;\n\n while (index < s.length()) {\n int index2 = (s + '&').indexOf('&', index);\n int index3 = (s + \"<![CDATA[\").indexOf(\"<![CDATA[\", index);\n\n if (index2 <= index3) {\n result.append(s.substring(index, index2));\n\n if (index2 == s.length()) {\n break;\n }\n\n index = s.indexOf(';', index2);\n\n if (index < 0) {\n result.append(s.substring(index2));\n break;\n }\n\n String key = s.substring(index2 + 1, index);\n\n if (key.charAt(0) == '#') {\n if (key.charAt(1) == 'x') {\n result.append((char) (\n Integer.parseInt(key.substring(2),\n 16)));\n }\n else {\n result.append((char) (\n Integer.parseInt(key.substring(1),\n 10)));\n }\n }\n else {\n result.append(this.conversionTable\n .getProperty(key, \"&\" + key + ';'));\n }\n }\n else {\n int index4 = (s + \"]]>\").indexOf(\"]]>\", index3 + 9);\n result.append(s.substring(index, index3));\n result.append(s.substring(index3 + 9, index4));\n index = index4 + 2;\n }\n\n index++;\n }\n\n return result.toString();\n }", "public static String staticDecode(String input) {\n \n CipherProcessor bcp = new BlowfishCipherProcessor();\n return bcp.decode(input);\n }", "public String decode(String str) throws DecoderException {\n/* 295 */ if (str == null) {\n/* 296 */ return null;\n/* */ }\n/* */ try {\n/* 299 */ return decode(str, getDefaultCharset());\n/* 300 */ } catch (UnsupportedEncodingException e) {\n/* 301 */ throw new DecoderException(e.getMessage(), e);\n/* */ } \n/* */ }", "public String decode(InputStream is)\n throws DataProcessingException, IOException {\n sendRecognition();\n streamAudioSource.setInputStream(is);\n sendData();\n String result = readResult();\n return result;\n }", "protected abstract void DecodeFromCBORObject(CBORObject messageObject) throws CoseException;", "public void parse() {\n MessageBlockLexer lexer = new MessageBlockBailLexer(name, postNumber, CharStreams.fromString(raw));\n\n // remove ConsoleErrorListener\n lexer.removeErrorListeners();\n\n // create a buffer of tokens pulled from the lexer\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n\n // create a parser that feeds off the tokens buffer\n MessageBlockParser parser = new MessageBlockParser(tokens);\n\n // remove ConsoleErrorListener\n parser.removeErrorListeners();\n\n // Create/add custom error listener\n MessageBlockErrorListener errorListener = new MessageBlockErrorListener(name, topic, postNumber);\n parser.addErrorListener(errorListener);\n\n // Begin parsing at the block rule\n ParseTree tree = parser.block();\n\n // Check for parsing errors\n errorListener.throwIfErrorsPresent();\n\n LOGGER.trace(tree.toStringTree(parser));\n\n // Walk the tree\n ParseTreeWalker walker = new ParseTreeWalker();\n walker.walk(new Listener(this), tree);\n }", "@Override\n public Message decode( byte[] msg, int offset, int maxIdx ) {\n if ( _binDecodeBuilder.getCurrentIndex() < _binDecodeBuilder.getMaxIdx() ) {\n\n ++_msgInPkt;\n \n _binDecodeBuilder.start( msg, offset, maxIdx );\n\n // have space so assume another message present\n \n _pMap.readMap( _binDecodeBuilder );\n \n _templateId = _templateIdReader.read( _binDecodeBuilder, _pMap ); \n\n if ( _templateId == BSE_FAST_RESET ) {\n resetActiveFields();\n }\n \n // @TODO add hard coded generated templates\n \n // Message m = null;\n // \n // // HAND TEMPLATES - ENSURE SWITCH STATEMENT HAS FILLERS\n //\n // if ( m != null ) {\n // _binDecodeBuilder.end(); // only one message per packet in BSE\n // \n // return m;\n // }\n \n return processsSoftTemplateDecode( _templateId );\n }\n \n return null;\n }", "void decodeObjectArray();", "public String decode(BufferedImage stegoImage){\n // Setup data to be used for decoding\n setupData(stegoImage);\n\n // Check parameter data will allow for successful decoding\n checkData();\n\n // Decode data from the image\n StringBuilder binary = decodeSecretData();\n\n // Convert the data back to text\n String text = getText(binary);\n\n // Return the retrieved text\n return text;\n }", "public interface Decoder {\r\n \t \r\n\t// Main method that every decoder needs to overwrite \r\n\tpublic List<Hypothesis> extract_phase(int N);\r\n\r\n\t// Once a tree segment is matched with a pattern , what do we do with it ? \r\n\tpublic boolean processMatch(ParseTreeNode ptn, Integer patId,\r\n\t\t\tArrayList<ParseTreeNode> frontiers,\r\n\t\t\tArrayList<GrammarRule> targetStrings);\r\n\t\r\n\tpublic void addPhraseEntriesToForest(ArrayList<PhraseRule> targetList, ParseTreeNode frontier, boolean isRoot);\r\n\t// Add grammar rules to forest \r\n\tpublic boolean addToTargetForest(GrammarRule targetInfo, ArrayList<ParseTreeNode> frontiers, boolean isSrcRoot);\r\n\t// Add glue rules\r\n\tpublic void addGlueRulesToTargetForest(ParseTreeNode ptn);\r\n\t// Handle OOV - copy, delete, transliterate etc - Perhaps put in a different class later TODO\r\n\tpublic void handleOOV(ParseTreeNode ptn);\r\n\tpublic void addLexicalBackoff(LexicalRule backoff, ParseTreeNode ptn);\r\n}", "private static native String decode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_code_nativeObj);", "private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }", "static public byte[] decode(String encoded) {\n if (encoded == null)\n return null;\n int lengthData = encoded.length();\n if (lengthData % 2 != 0)\n return null;\n \n char[] binaryData = encoded.toCharArray();\n int lengthDecode = lengthData / 2;\n byte[] decodedData = new byte[lengthDecode];\n byte temp1, temp2;\n for( int i = 0; i<lengthDecode; i++ ){\n temp1 = hexNumberTable[binaryData[i*2]];\n if (temp1 == -1)\n return null;\n temp2 = hexNumberTable[binaryData[i*2+1]];\n if (temp2 == -1)\n return null;\n decodedData[i] = (byte)((temp1 << 4) | temp2);\n }\n return decodedData;\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 }", "public String decode(String path, String name) {\n byte[] decode;\n try {\n // user space is necessary for decrypting\n BufferedImage image = user_space(getImage(image_path(\n path,\n name,\n \"png\")));\n decode = decode_text(get_byte_data(image));\n return (new String(decode));\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"There is no hidden message in this image!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return \"\";\n }\n }", "private static native String detectAndDecode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_code_nativeObj);", "public BencodeValue decode() throws IOException\t{\n if (this.getNextIndicator() == -1)\n return null;\n //depending on the possible value of indicator, we decode into an appropriate Object\n if (this.indicator >= '0' && this.indicator <= '9')\n return this.decodeBytes();\n else if (this.indicator == 'i')\n return this.decodeNumber();\n else if (this.indicator == 'l')\n return this.decodeList();\n else if (this.indicator == 'd')\n return this.decodeMap();\n else\n throw new BencodeFormatException\n (\"Unknown indicator '\" + this.indicator + \"'\");\n }", "public EncodeAndDecodeStrings() {}", "public static String returnDecoded(String encodedText) {\n if (encodedText == null) {\n return null;\n }\n byte[] decoded = Base64.decode(encodedText, Base64.NO_WRAP);\n return new String(decoded);\n }" ]
[ "0.6892116", "0.6099572", "0.60322183", "0.6026943", "0.60039824", "0.5913591", "0.5752586", "0.5705776", "0.567713", "0.56477565", "0.5644535", "0.56278354", "0.55812", "0.5576539", "0.55724025", "0.5566675", "0.5526283", "0.5513124", "0.5495356", "0.5475974", "0.5470672", "0.5401398", "0.54011655", "0.5394231", "0.53923345", "0.53618586", "0.53345954", "0.53146076", "0.53142124", "0.5286122", "0.5280939", "0.5262183", "0.52462864", "0.5235532", "0.52233505", "0.5221855", "0.52212286", "0.5213131", "0.5210032", "0.5206171", "0.5201336", "0.51790816", "0.51470584", "0.5146294", "0.51436204", "0.5142449", "0.5136831", "0.51257706", "0.51171654", "0.5092503", "0.50850093", "0.50734276", "0.50677717", "0.50602937", "0.5057725", "0.50564754", "0.5053981", "0.50386995", "0.50297475", "0.50287515", "0.49989054", "0.49725276", "0.4970351", "0.49647588", "0.49499148", "0.49459964", "0.49438742", "0.49423167", "0.49347433", "0.4924624", "0.49222264", "0.4914149", "0.49022186", "0.48994035", "0.48916438", "0.4881125", "0.48785833", "0.48783267", "0.4876165", "0.48723856", "0.48705366", "0.48597735", "0.48489398", "0.4844867", "0.48415998", "0.48281202", "0.48227048", "0.48145834", "0.4813556", "0.48130363", "0.48065838", "0.4802903", "0.48023012", "0.47997013", "0.4794389", "0.4790099", "0.47813785", "0.4778807", "0.47757468", "0.47704545", "0.47655264" ]
0.0
-1
/ The users will need to find out when the campsite is available. So the system should expose an API to provide information of the availability of the campsite. for a given date range with the default being 1 month.
@CrossOrigin(origins = "http://campsiteclient.herokuapp.com", maxAge = 3600) @GetMapping public JSONArray checkAvaibility(@RequestParam(value = "from") Optional<String> from, @RequestParam(value = "to") Optional<String> to) throws java.text.ParseException { String startDateStringFormat = from .orElse(dateUtils.formatDate(dateUtils.addDays(1, new Date()))); String endDateStringFormat = to .orElse(dateUtils.formatDate(dateUtils.addDays(31, new Date()))); Date startDate = bookingServiceImpl.formatDate(startDateStringFormat); Date endDate = dateUtils.formatDate(endDateStringFormat); List<BookingDate> bookedDates = bookingDateRepository.getBooking(startDate, endDate); List<String> list = new ArrayList<String>(); for (BookingDate bookingDate : bookedDates) { Date date = bookingDate.getBookingDate(); String dateToString = dateUtils.formatDate(date); list.add(dateToString); } JSONArray result = bookingServiceImpl .getAvailableDates(new HashSet<BookingDate>(bookedDates), startDate, endDate); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAvailability(String date) {\n\t\tavailableAt = date;\n\t}", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public List<String> getEligibleForAutoApproval(Date todayAtMidnight);", "public DateAvailableVO checkDateAvailable(String date) {\n\t\treturn null;\n\t}", "public List<Campsite> findCampsitesByReservationDate(long campground_id, LocalDate from_date,LocalDate to_date);", "@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }", "public void CheckAvail(LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n {\r\n System.out.println(\"more than 30\");\r\n return;\r\n }//Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n {\r\n System.out.println(\"Less than 0\");\r\n return;\r\n }\r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n {\r\n ispossible = false;\r\n }\r\n } \r\n \r\n if (ispossible)\r\n System.out.println(roomtypes.get(i).roomname);\r\n }\r\n }", "boolean hasAcquireDate();", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "private boolean CheckAvailableDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT * FROM Available WHERE available_hid = '\"+hid+\"' AND \"+\n\t\t\t\t\t\t\t\"startDate = '\"+tp.stringStart+\"' AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\t\n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void setValidUntil(Date validUntil);", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "Set<StewardSimpleDTO> getAllAvailable(Date from, Date to);", "boolean isSetFoundingDate();", "abstract public Date getServiceAppointment();", "public void setUntilDate(Date date);", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean isAvailable(String month, int day) {\n\t\treturn false;\n\t}", "public AgendaMB() {\n GregorianCalendar dtMax = new GregorianCalendar(); \n Date dt = new Date();\n dtMax.setTime(dt); \n GregorianCalendar dtMin = new GregorianCalendar(); \n dtMin.setTime(dt);\n dtMin.add(Calendar.DAY_OF_MONTH, 1);\n dtMax.add(Calendar.DAY_OF_MONTH, 40);\n dataMax = dtMax.getTime();\n dataMin = dtMin.getTime(); \n }", "public String getAvailability() {\n\t\treturn availableAt;\n\t}", "@Test\n public void testTransplantListEndpointQueryBloodtype() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(\"AB+\",null,null,null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "boolean hasEndDate();", "@Test\n void calculatePeriodLessThanOneMonth() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2015-03-07\");\n LocalDate testDateEnd = LocalDate.parse(\"2015-04-01\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"1 month\", periodMap.get(PERIOD_START));\n assertEquals(\"1 April 2015\", periodMap.get(PERIOD_END));\n }", "boolean hasStartDate();", "public Date getValidUntil();", "public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "@Test\n public void testTransplantListEndpointQueryAge() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,null,\"12\",null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }", "boolean isSetAppliesPeriod();", "boolean hasSettlementDate();", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public List<LocalDate> getAvailableDatesForService(final com.wellybean.gersgarage.model.Service service) {\n // Final list\n List<LocalDate> listAvailableDates = new ArrayList<>();\n\n // Variables for loop\n LocalDate tomorrow = LocalDate.now().plusDays(1);\n LocalDate threeMonthsFromTomorrow = tomorrow.plusMonths(3);\n\n // Loop to check for available dates in next three months\n for(LocalDate date = tomorrow; date.isBefore(threeMonthsFromTomorrow); date = date.plusDays(1)) {\n // Pulls bookings for specific date\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n /* If there are bookings for that date, check for time availability for service,\n if not booking then date available */\n if(optionalBookingList.isPresent()) {\n if(getAvailableTimesForServiceAndDate(service, date).size() > 0) {\n listAvailableDates.add(date);\n }\n } else {\n listAvailableDates.add(date);\n }\n }\n return listAvailableDates;\n }", "boolean isSetAppliesDateTime();", "private static boolean availabilityQuery(String roomid, String date1, String date2)\n {\n String query = \"SELECT status\"\n + \" FROM (\"\n + \" SELECT DISTINCT ro.RoomId, 'occupied' AS status\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\" \n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\"\n + \" UNION\"\n + \" SELECT DISTINCT RoomId, 'empty' AS status\"\n + \" FROM myRooms\"\n + \" WHERE RoomId NOT IN (\"\n + \" SELECT DISTINCT re.Room\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\"\n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\"\n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\" \n + \" )) AS tb\"\n + \" WHERE RoomId = '\" + roomid + \"'\";\n\n PreparedStatement stmt = null;\n ResultSet rset = null;\n\n try\n {\n stmt = conn.prepareStatement(query);\n rset = stmt.executeQuery();\n rset.next();\n if(rset.getString(\"status\").equals(\"empty\"))\n return true;\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try {\n stmt.close();\n }\n catch (Exception ex) {\n ex.printStackTrace( ); \n } \t\n }\n \n return false;\n\n }", "@Test\n public void testTransplantListEndpointQueryRegion() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,null,null,\"Auckland\",upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }", "public void setValidFrom(Date validFrom);", "private boolean dateAvailable(List<DateGroup> dateGroups) {\n final int NOT_AVAILABLE = 0;\n return dateGroups.size() > NOT_AVAILABLE;\n }", "boolean isSetDate();", "@Test\n public void testTransplantListEndpointQueryGender() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,\"M\",null,null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "public ArrayList<FamilyPlanningRecord> getMonthlyFamilyPlanningRecords(int month,int year,int ageRange,String gender,int page){\n\t\tArrayList<FamilyPlanningRecord> list=new ArrayList< FamilyPlanningRecord>();\n\t\tString firstDateOfTheMonth;\n\t\tString lastDateOfTheMonth;\n\t\tSimpleDateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd\",Locale.UK);\n\t\tCalendar calendar=Calendar.getInstance();\n\t\tif(month==0){ //this month\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 1);\n\t\t\tfirstDateOfTheMonth=dateFormat.format(calendar.getTime());\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH,calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t\tlastDateOfTheMonth=dateFormat.format(calendar.getTime());\n\t\t}else if(month==1){\t//this year/all year\n\t\t\tcalendar.set(Calendar.YEAR, year);\n\t\t\tcalendar.set(Calendar.MONTH,Calendar.JANUARY);\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH,1);\n\t\t\tfirstDateOfTheMonth=dateFormat.format(calendar.getTime());\n\t\t\tcalendar.set(Calendar.MONTH,Calendar.DECEMBER);\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH,31);\n\t\t\tlastDateOfTheMonth=dateFormat.format(calendar.getTime());\n\t\t}else{\t//selected month and year\n\t\t\tmonth=month-2;\n\t\t\tcalendar.set(year, month, 1);\n\t\t\tfirstDateOfTheMonth=dateFormat.format(calendar.getTime());\n\t\t\tcalendar.set(year,month,calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t\tlastDateOfTheMonth=dateFormat.format(calendar.getTime());\n\t\t}\n\n\t\t//define age range\n\n\t\tString strAgeFilter=\" 1 \";\n\t\tif(ageRange>0){//if it is not total\n\t\t\tageRange=ageRange-1;\n\t\t\tif(ageRange==0){\n\t\t\t\tstrAgeFilter=CommunityMembers.AGE+\"<10\";\t//under 1 year\n\t\t\t}else if(ageRange>=1 && ageRange<6){\t//compute range\n\t\t\t\tstrAgeFilter=\"(\"+CommunityMembers.AGE+\">=\"+ageLimit[ageRange]+\" AND \"+CommunityMembers.AGE+\"<\"+ageLimit[ageRange+1]+\")\";\n\t\t\t}else{\t\n\t\t\t\tstrAgeFilter=CommunityMembers.AGE+\">=35\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tString strGenderFilter=\" 1 \";\n\t\tif(gender != null){\n\t\t\tif(!gender.equals(\"all\")){\n\t\t\t\tstrGenderFilter=CommunityMembers.GENDER +\" = '\"+gender+\"'\";\n\t\t\t}\n\t\t}\n\n\t\tString limitClause=\"\";\n\t\tif(page>=0){\n\t\t\tpage=page*15;\n\t\t\tlimitClause=\" limit \" +page +\",15\";\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tdb=getReadableDatabase();\n\t\t\tString strQuery=\"select \"\n\t\t\t\t\t+SERVICE_REC_ID+\", \"\n\t\t\t\t\t+FamilyPlanningServices.SERVICE_ID +\", \"\n\t\t\t\t\t+FamilyPlanningServices.SERVICE_NAME+\", \"\n\t\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_ID+\", \"\n\t\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_NAME+\", \"\n\t\t\t\t\t+QUANTITY+\", \"\n\t\t\t\t\t+SERVICE_DATE +\",\"\n\t\t\t\t\t+CommunityMembers.BIRTHDATE +\", \"\n\t\t\t\t\t+CommunityMembers.COMMUNITY_ID+\", \"\n\t\t\t\t\t+SERVICE_TYPE\n\t\t\t\t\t//+\",\"\n\t\t\t\t\t//+CommunityMembers.GENDER\n\t\t\t\t\t+\" from \" +FamilyPlanningRecords.VIEW_NAME_FAMILY_PLANING_RECORDS_DETAIL\n\t\t\t\t\t+\" where \"\n\t\t\t\t\t+\"(\"+FamilyPlanningRecords.SERVICE_DATE +\">=\\\"\"+ firstDateOfTheMonth +\"\\\" AND \"\n\t\t\t\t\t+FamilyPlanningRecords.SERVICE_DATE +\"<=\\\"\"+ lastDateOfTheMonth + \"\\\" )\"\n\t\t\t\t\t+\" AND \"\n\t\t\t\t\t+strAgeFilter \n\t\t\t\t\t//+\" AND \"\n\t\t\t\t\t//+strGenderFilter there is not gender in family planing record\n\t\t\t\t\t+limitClause;\n\t\t\t\t\t\n\t\t\tcursor=db.rawQuery(strQuery, null);\n\t\t\tFamilyPlanningRecord record=fetch();\n\t\t\twhile(record!=null){\n\t\t\t\tlist.add(record);\n\t\t\t\trecord=fetch();\n\t\t\t}\n\t\t\tclose();\n\t\t\treturn list;\n\t\t}catch(Exception ex){\n\t\t\treturn list;\n\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t}", "@Override\n public long dateCompare(LocalDate localDate1, LocalDate localDate2) {\n return localDate1.until(localDate2, ChronoUnit.MONTHS);\n }", "public Date getValidFrom();", "@Test\r\n public void testReflexivityOverlappingTimePeriods(){\n DateTime startAvailability1 = new DateTime(2021, 7, 9, 10, 30);\r\n DateTime endAvailability1 = new DateTime(2021, 7, 9, 11, 30);\r\n DateTime startAvailability2 = new DateTime(2021, 7, 9, 11, 0);\r\n DateTime endAvailability2 = new DateTime(2021, 7, 9, 12, 0);\r\n Availability availability1 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability1, endAvailability1);\r\n Availability availability2 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability2, endAvailability2);\r\n assertTrue(availability1.overlapsWithTimePeriod(availability2));\r\n assertTrue(availability2.overlapsWithTimePeriod(availability1));\r\n }", "public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }", "public boolean getAvailability(){\n return availabile;\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testGetExpensesByTypeAndMonthInFuture() {\n\tString type = \"MONTHLY\";\n\tYearMonth yearMonth = YearMonth.of(2016, 12);\n\texpenseManager.getExpensesByTypeAndMonth(type, yearMonth);\n }", "private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }", "public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "int getExpMonth(String bookingRef);", "public boolean isSupportMonth() {\r\n return true;\r\n }", "Date getRequestedAt();", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "@Test\n public void testGetMaxEndDate() {\n ApplicationInfo.info(\n DatabaseHelperTest.class, ApplicationInfo.TEST, ApplicationInfo.UNIT_TEST, \"testBeginsWithEmpty\");\n // Date expResult = null;\n Date result = DatabaseHelper.getMaxEndDate();\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT+1\"));\n cal.setTime(result);\n assertEquals(3000, cal.get(Calendar.YEAR));\n assertEquals(Calendar.DECEMBER, cal.get(Calendar.MONTH));\n assertEquals(31, cal.get(Calendar.DATE));\n }", "boolean hasFromDay();", "@Override\n\tpublic int getRoomAvailable(String month, int day, String type, int lengthOfStay) {\n\t\treturn 0;\n\t}", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public interface AvailableIn extends Activated\n{\n boolean isAvailableIn(DateTime time);\n boolean isAvailableNow();\n\n}", "Set<VisitedResource> getVisitingStatistic(Date date);", "public RequestedDatesForAvailability getRequestedDatesForAvailability(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.requesteddatesforavailability.v1.RequestedDatesForAvailability res){\n\t\tRequestedDatesForAvailability requestedDatesForAvailability = new RequestedDatesForAvailability();\n\t\t\n\t\trequestedDatesForAvailability.setNoOfRooms( res.getNoOfRooms() );\n\t\trequestedDatesForAvailability.setBookingDate( res.getBookingDate() );\t\n\t\trequestedDatesForAvailability.setBookingDuration( res.getBookingDuration() );\n\t\trequestedDatesForAvailability.setRoomDescription( res.getRoomDescription() );\n\t\trequestedDatesForAvailability.setRoomStatus( res.getRoomStatus() );\n\t\trequestedDatesForAvailability.setMaterialNumber( res.getMaterialNumber() );\n\t\t\n\t\trequestedDatesForAvailability.setReqDates( res.getReqDates() );\n\t\t\n\t\treturn requestedDatesForAvailability;\n\t}", "boolean hasDate();", "@Test\n public void testTransplantListEndpoint() {\n String lowerBound = \"1970-01-01\";\n String upperBound = \"2018-09-27\";\n ResponseEntity response = dataController.getTransplantWaitingListRange(null,null,null,null,upperBound, lowerBound);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test\n\tpublic void testFindFreeFacility2WorkplacesFullyAvailible() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 2);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, validStartDate, validEndDate, true);\n\n\t\t// should find the one room with the two workplaces.\n\t\tassertNotNull(result);\n\t\tassertEquals(1, result.size());\n\t\tassertEquals(validStartDate, result.iterator().next().start);\n\t}", "public java.lang.String CC_GetCurrentJobsInRange(java.lang.String accessToken, java.lang.String CCCode, java.util.Calendar startDate, java.util.Calendar endDate) throws java.rmi.RemoteException;", "private boolean isAvailabilityExist(String day, String startTime, String endTime){\n String full = day + \" at \" + startTime + \" to \" + endTime;\n\n String[] start = startTime.split(\":\");\n String[] end = endTime.split(\":\");\n\n //Set the 2 hours\n int hourStart = Integer.parseInt(start[0]);\n int hourEnd = Integer.parseInt(end[0]);\n\n //Set the minutes\n int minuteStart = Integer.parseInt(start[1]);\n int minuteEnd = Integer.parseInt(end[1]);\n\n int dayID = getDay(day).getDayID();\n\n for(Availability av : availabilities){\n int dayIDAV = av.getDayID();\n if(dayID == dayIDAV){\n //Set the 2 hours\n int hourStartAV = av.getStartHour();\n int hourEndAV = av.getEndHour();\n\n //Set the minutes\n int minuteStartAV = av.getStartMinute();\n int minuteEndAV = av.getEndTimeMinute();\n\n if(hourStart<hourStartAV)\n return(false);\n\n if(hourEnd>hourEndAV)\n return(false);\n\n if(hourEnd == hourEndAV && minuteEnd > minuteEndAV)\n return(false);\n\n if(hourStart == hourStartAV && minuteStart<minuteStartAV)\n return(false);\n }\n }\n return(true);\n }", "@Test\n public void getLessonMonths() throws Exception {\n ActiveAndroid.initialize(this);\n List<String> mmyy = Arrays.asList(\"10/17\", \"11/17\", \"12/17\", \"01/18\");\n List<Lesson> lessons = createLessons();\n ArrayList<String> result = mHomePresenter.getLessonMonths(lessons);\n\n assertEquals(mmyy, result);\n }", "@Test\n void calculatePeriod12Months() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2016-08-12\");\n\n System.out.println(\"periodStartDate: \" + testDateStart);\n\n LocalDate testDateEnd = LocalDate.parse(\"2017-08-23\");\n\n System.out.println(\"periodEndDate: \" + testDateStart);\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertNull(periodMap.get(PERIOD_START));\n assertEquals(\"2017\", periodMap.get(PERIOD_END));\n\n }", "@Test\n\tpublic void testCorrectURL_forDateRange() {\n\t\tString startDate =\"2017-10-01\";\n\t\tString endDate=\"2017-10-02\";\n\t\tString result=urlHelper.getURLByDateRange(startDate, endDate);\n\t\tString expected = genFeedURL(startDate, endDate);\n\t\tassertEquals(result,expected);\n\t}", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.requesteddatesforavailability.v1.RequestedDatesForAvailability getRequestedDatesForAvailabilityReq(RequestedDatesForAvailability requestedDatesForAvailability){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.requesteddatesforavailability.v1.RequestedDatesForAvailability req = \n\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.requesteddatesforavailability.v1.RequestedDatesForAvailability();\n\t\t\n\t\treq.setNoOfRooms( requestedDatesForAvailability.getNoOfRooms() );\n\t\treq.setBookingDate( requestedDatesForAvailability.getBookingDate() );\t\n\t\treq.setBookingDuration( requestedDatesForAvailability.getBookingDuration() );\n\t\treq.setRoomDescription( requestedDatesForAvailability.getRoomDescription() );\n\t\treq.setRoomStatus( requestedDatesForAvailability.getRoomStatus() );\n\t\treq.setMaterialNumber( requestedDatesForAvailability.getMaterialNumber() );\n\t\tif( (requestedDatesForAvailability.getReqDates() != null) && (requestedDatesForAvailability.getReqDates().size() > 0) ){\n\t\t\tfor(int i=0; i < requestedDatesForAvailability.getReqDates().size(); i++){\n\t\t\t\treq.getReqDates().add( requestedDatesForAvailability.getReqDates().get(i) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn req;\n\t}", "@Override\n public boolean isDateAllowed(LocalDate date) {\n \n return startDates.contains(date) || endDates.contains(date);\n }", "public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}", "boolean isFilterByDate();", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "@Override\n public List<LocalTime> getAvailableTimesForServiceAndDate(final com.wellybean.gersgarage.model.Service service, LocalDate date) {\n\n LocalTime garageOpening = LocalTime.of(9,0);\n LocalTime garageClosing = LocalTime.of(17, 0);\n\n // List of all slots set as available\n List<LocalTime> listAvailableTimes = new ArrayList<>();\n for(LocalTime slot = garageOpening; slot.isBefore(garageClosing); slot = slot.plusHours(1)) {\n listAvailableTimes.add(slot);\n }\n\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n\n // This removes slots that are occupied by bookings on the same day\n if(optionalBookingList.isPresent()) {\n List<Booking> bookingsList = optionalBookingList.get();\n for(Booking booking : bookingsList) {\n int bookingDurationInHours = booking.getService().getDurationInMinutes() / 60;\n // Loops through all slots used by the booking and removes them from list of available slots\n for(LocalTime bookingTime = booking.getTime();\n bookingTime.isBefore(booking.getTime().plusHours(bookingDurationInHours));\n bookingTime = bookingTime.plusHours(1)) {\n\n listAvailableTimes.remove(bookingTime);\n }\n }\n }\n\n int serviceDurationInHours = service.getDurationInMinutes() / 60;\n\n // To avoid concurrent modification of list\n List<LocalTime> listAvailableTimesCopy = new ArrayList<>(listAvailableTimes);\n\n // This removes slots that are available but that are not enough to finish the service. Example: 09:00 is\n // available but 10:00 is not. For a service that takes two hours, the 09:00 slot should be removed.\n for(LocalTime slot : listAvailableTimesCopy) {\n boolean isSlotAvailable = true;\n // Loops through the next slots within the duration of the service\n for(LocalTime nextSlot = slot.plusHours(1); nextSlot.isBefore(slot.plusHours(serviceDurationInHours)); nextSlot = nextSlot.plusHours(1)) {\n if(!listAvailableTimes.contains(nextSlot)) {\n isSlotAvailable = false;\n break;\n }\n }\n if(!isSlotAvailable) {\n listAvailableTimes.remove(slot);\n }\n }\n\n return listAvailableTimes;\n }", "@Override\n\tpublic Date getStatusDate();", "public DateRange getDateRange();", "@Repository\npublic interface DeliveryMethodDao extends JpaRepository<DeliveryMethod, Integer> {\n\n DeliveryMethod findById(int id);\n\n List<DeliveryMethod> findAll();\n\n @Query(\"from DeliveryMethod dm where dm.endDate >= current_date()\")\n List<DeliveryMethod> findAllAvailable();\n\n}", "public void setDateBounds(PortfolioRecord portRecord, LocalDate fromDate, LocalDate toDate) {\n List<DataPoint> history = portRecord.getHistory();\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDate != null && toDate != null && !(fromDate.equals(fromDateBound) && toDate.equals(toDateBound))) {\n userSetDates = true;\n\n if (fromDate.compareTo(minDate) < 0) {\n fromDateBound = minDate;\n } else {\n fromDateBound = fromDate;\n }\n\n if (toDate.compareTo(maxDate) > 0) {\n toDateBound = maxDate;\n } else {\n toDateBound = toDate;\n }\n\n updatePerformanceGraph(true, portRecord);\n }\n }", "private void givenExchangeRatesExistsForEightMonths() {\n }", "com.google.type.Date getAcquireDate();", "void onClickDateRange();", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\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//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}", "private void setVisitInfoForMonthlyReport(final Monthly_report_revision monthlyReport, final int empCode,\n final Date startDate, final Date endDate) {\n final List<Object[]> listVisitInfo = this.dailyRepo\n .getAllVisitInfoFromDailyReportByStartDateAndEndDate(empCode, startDate, endDate).getResultList();\n int software = this.getValue(listVisitInfo, (short) 201);\n monthlyReport.setHoumon_kensuu_shokushu_sofuto_wea(software);\n int network = this.getValue(listVisitInfo, (short) 202);\n monthlyReport.setHoumon_kensuu_shokushu_netto_waku(network);\n int architecture = this.getValue(listVisitInfo, (short) 101);\n monthlyReport.setHoumon_kensuu_shokushu_kenchiku(architecture);\n int construction = this.getValue(listVisitInfo, (short) 102);\n monthlyReport.setHoumon_kensuu_shokushu_doboku(construction);\n int equipment = this.getValue(listVisitInfo, (short) 104);\n monthlyReport.setHoumon_kensuu_shokushu_setsubi(equipment);\n int electrical = this.getValue(listVisitInfo, (short) 103);\n monthlyReport.setHoumon_kensuu_shokushu_denki(electrical);\n int plant = this.getValue(listVisitInfo, (short) 501);\n monthlyReport.setHoumon_kensuu_shokushu_puranto(plant);\n int common = this.getValue(listVisitInfo, (short) 601);\n monthlyReport.setHoumon_kensuu_shokushu_ippan(common);\n int communicationWireless = this.getValue(listVisitInfo, (short) 301);\n monthlyReport.setHoumon_kensuu_shokushu_tsuushin_musen(communicationWireless);\n int communicationWired = this.getValue(listVisitInfo, (short) 302);\n monthlyReport.setHoumon_kensuu_shokushu_tsuushin_yuusen(communicationWired);\n int machineryAndHard = this.getValue(listVisitInfo, (short) 401);\n monthlyReport.setHoumon_kensuu_shokushu_kikai_hado(machineryAndHard);\n int bussiness = this.getValue(listVisitInfo, (short) 602);\n monthlyReport.setHoumon_kensuu_shokushu_jimu(bussiness);\n int callCenter = this.getValue(listVisitInfo, (short) 603);\n monthlyReport.setHoumon_kensuu_shokushu_koru_centa(callCenter);\n }", "public boolean hasPast();", "private ApiReturnModel getBookingsOnclinic(Clinic clinic,String date) {\n\t\tlogger.debug(\"In get bookings on clinic\");\r\n\t\tUtils utils=new Utils();\r\n\t\tApiReturnModel returnModel = null;\r\n\t\tList<BookingModel> bookings=null;\r\n\t\t\r\n\t\tif(date!=null){\r\n\t\t\tDate bookingByDate=utils.convertStringToDateOnly(date);\r\n\t\t\tbookings = contentDao.findBookingsOnClinic(clinic,utils.convertStringToDateOnly(bookingByDate));\r\n\t\t}else\r\n\t\t\tbookings = contentDao.findBookingsOnClinic(clinic);\r\n\t\t// User user=userDao.findByid(Integer.parseInt(userId));\r\n\t\treturnModel=commonReturnBookingModel(bookings);\r\n\t\treturn returnModel;\r\n\t}", "@Test\n public void testDateRangeNoDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertNull(\"should not contain a time \" + fields.get(\"generatedTimestamp\"), fields.get(\"generatedTimestamp\"));\n }", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "@Test()\n public void testGetExpensesByTypeAndMonthNull() {\n\tString type = \"MONTHLY\";\n\tYearMonth yearMonth = YearMonth.of(2014, 12);\n\tList<Expense> expensesForDisplay = expenseManager.getExpensesByTypeAndMonth(type, yearMonth);\n\tassertEquals(0, expensesForDisplay.size(), 0);\n }", "public static void testPeriod() {\n LocalDate date1 = LocalDate.now();\n System.out.println(\"Current date: \" + date1);\n\n //add 1 month to the current date\n LocalDate date2 = date1.plus(1, ChronoUnit.MONTHS);\n System.out.println(\"Next month: \" + date2);\n\n Period period = Period.between(date2, date1);\n System.out.println(\"Period: \" + period);\n }", "@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }", "public boolean containsDomainRange(Date from, Date to) { return true; }", "public void setValidFrom(Date validFrom)\n {\n this.validFrom = validFrom;\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testFindFreeFacilitiesWithIllegalStart() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), SEARCH_TEXT, NEEDED_WORKPLACES);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.findFreeFacilites(query, invalidStartDate, validEndDate, true);\n\t}", "List<MonthlyExpenses> lastMonthExpenses();", "public static void main(String[] args) {\n\t\tMonthDay month=MonthDay.now();\n\t\tLocalDate d=month.atYear(2015);\n\t\tSystem.out.println(d);\n\t\tMonthDay m=MonthDay.parse(\"--02-29\");\n\t\tboolean b=m.isValidYear(2019);\n\t\tSystem.out.println(b);\n\t\tlong n= month.get(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(\"month of the year is:\"+n);\n\t\tValueRange r1=month.range(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(r1);\n\t\tValueRange r2=month.range(ChronoField.DAY_OF_MONTH);\n\t\tSystem.out.println(r2);\n\n\t}", "private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }" ]
[ "0.61080706", "0.5880207", "0.58483016", "0.58474344", "0.5827578", "0.57382685", "0.57302874", "0.5686239", "0.55982167", "0.5590142", "0.55883425", "0.55576664", "0.5553434", "0.5543628", "0.55402356", "0.5530535", "0.5513532", "0.55035037", "0.54575104", "0.5432328", "0.5422389", "0.5406835", "0.5383264", "0.5360499", "0.5356308", "0.5351979", "0.53455716", "0.5309915", "0.52752393", "0.5273978", "0.5273545", "0.5262036", "0.5261395", "0.5257921", "0.52472764", "0.52364594", "0.5211645", "0.5203728", "0.51927114", "0.517031", "0.5143919", "0.51419896", "0.5105521", "0.5104487", "0.5094152", "0.50760573", "0.5074677", "0.50494814", "0.50478464", "0.5034866", "0.50329626", "0.50305885", "0.5029511", "0.50268954", "0.50244224", "0.5022316", "0.5020648", "0.5013144", "0.5005818", "0.50054044", "0.50031954", "0.4993682", "0.49861702", "0.49638763", "0.4963852", "0.49540725", "0.49515426", "0.49504328", "0.49430358", "0.49272534", "0.4922043", "0.49214596", "0.49202546", "0.49101925", "0.49000221", "0.4887556", "0.48810267", "0.4879458", "0.4878759", "0.48767436", "0.48724476", "0.48673457", "0.48511693", "0.48465243", "0.48454106", "0.48426312", "0.4837324", "0.48311484", "0.4827141", "0.4824193", "0.4818686", "0.48183566", "0.4814456", "0.48136672", "0.48029563", "0.4801151", "0.48007062", "0.4798367", "0.47976622", "0.47937465" ]
0.56913704
7
PRIVATE METHOD TO GET ALL RESERVED DATES FOR THIS CLASS ACCESS ONLY
private JSONArray findAll() throws ParseException, java.text.ParseException { return (JSONArray) new JSONParser() .parse(new Gson().toJson(bookingDateRepository.findCampsiteVacancy())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "Date getDataIns();", "public static List<Long> getData_entryDates() {\r\n\t\treturn data_entryDates;\r\n\t}", "public Date getFechaExclusion()\r\n/* 160: */ {\r\n/* 161:178 */ return this.fechaExclusion;\r\n/* 162: */ }", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "@Override\n @XmlElement(name = \"dateTime\", namespace = Namespaces.DQC)\n @SuppressWarnings(\"ReturnOfCollectionOrArrayField\")\n public Collection<Date> getDates() {\n if (Semaphores.query(Semaphores.NULL_COLLECTION)) {\n return isNullOrEmpty(dates) ? null : dates;\n }\n if (dates == null) {\n dates = new Dates();\n }\n return dates;\n }", "public String[] getAvailableSpelunkerDat()\n {\n return super.getAvailableDatList();\n }", "public ArrayList<String> getDates() {\r\n\t\treturn this.dates;\r\n\t}", "public void readDayData() {\n\t\tlogger.info(\"Reading data for date: \" + date);\n\t}", "public java.util.Date getDate(){\n return localDate;\n }", "public final Date getDat() {\n return this.dat;\n }", "private Date getDataInizio() {\n return (Date)this.getCampo(DialogoStatistiche.nomeDataIni).getValore();\n }", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "Date getDateDisabled();", "public Date getDateAccess() {\n return dateAccess;\n }", "private DateTimeAdjusters() {\n\n }", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "Dates() {\n clear();\n }", "public Data() {\n\t\tCalendar now = new GregorianCalendar();\n\t\tthis.anno = now.get(Calendar.YEAR);\n\t\tthis.giorno = now.get(Calendar.DAY_OF_MONTH);\n\t\tthis.mese = Data.MESI[now.get(Calendar.MONTH)];\n\t}", "public Date getGioBatDau();", "public Boolean getAllDay() {\n return allDay;\n }", "public List<LocalDateTime> getDateTimes() {\n return FoodListManager.convertListToLocalDateTimes(foodEntries);\n }", "public DateTime getDateTime()\n\t{\n\t\treturn null;\n\t}", "private void getActivatedWeekdays() {\n }", "abstract protected Map<DataDate, ArrayList<String>> ListDatesFilesFTP();", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "@Override\n public LocalDate getDate() {\n return null;\n }", "@Override\n\tpublic ArrayList<Dday> ddayMain(String memberNo) {\n\t\treturn dDao.ddayMain(sqlSession, memberNo);\n\t}", "public final List<DateWithTypeDateFormat> getDates() {\n return this.dates;\n }", "public ArrayList getDayArray() {\r\n return dayArray; \r\n }", "@Override\n\tpublic List getTime() {\n\t\treturn null;\n\t}", "public java.util.Enumeration getI13nDateSaving() throws java.rmi.RemoteException, javax.ejb.FinderException;", "public SortedSet<Date> getUnselectableDates()\n/* */ {\n/* 223 */ return new TreeSet(this.unselectableDates);\n/* */ }", "protected DateFieldMetadata() {\r\n\r\n\t}", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public Date getDate(){\n\t\treturn day.date;\n\t}", "@Override\n\tpublic List getCalendars() {\n\t return null;\n\t}", "@Override\n public List<String> getListOfDates() throws FlooringMasteryPersistenceException {\n \n List<String> listOfDates = new ArrayList<>();\n String dateToLoad = \"\"; \n String fileDirectory = System.getProperty(\"user.dir\"); // get the directory of where java was ran (this project's folder)\n \n File folder = new File(fileDirectory); // turn the directory string into a file\n File[] listOfFiles = folder.listFiles(); // get the list of files in the directory\n \n \n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n \n String nameOfFile = listOfFiles[i].getName(); // get the name of the file\n String numbersOnly = nameOfFile.replaceAll(\"[\\\\D]\", \"\"); // replace all non-number characters with whitespace\n\n if(numbersOnly.equals(\"\")){ // if there were no numbers in the file name (ex. pom.xml), do nothing\n \n }else{\n int dateOfFile = Integer.parseInt(numbersOnly); // get the numbers part of the file name\n int lengthOfdate = String.valueOf(dateOfFile).length(); // get the length of the int by converting it to a String and using .length\n if(lengthOfdate < numbersOnly.length()){ // if the leading 0 got chopped off when parsing\n dateToLoad = \"0\"+ dateOfFile; // add it back\n }else{\n dateToLoad = Integer.toString(dateOfFile); // otherwise if there were no leading 0s, set to the String version of dateOfFile, NOT dateToLoad, as that will have the previous date\n }\n listOfDates.add(dateToLoad);\n }\n \n }\n \n }\n \n return listOfDates;\n\n }", "protected byte[] getDailyTimerSetting() {return null;}", "public void getData() {\n\t\tcurrentDate = model.getCurrentDate();\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tevents = EventProcessor.filterEvents(model.getEvents(), firstDateOfMonth, firstDateOfMonth.plusMonths(1).minusDays(1));\n\t}", "public Date getFechaDesde()\r\n/* 164: */ {\r\n/* 165:283 */ return this.fechaDesde;\r\n/* 166: */ }", "abstract protected Map<DataDate, ArrayList<String>> ListDatesFilesHTTP();", "protected Map<String, T> getDatumCache() {\n\t\treturn datumCache;\n\t}", "@Override\n\tpublic Calendar getDate(){\n\t\treturn date;\n\t}", "private DateUtil() {\n\t}", "private DateUtil() {\n\t}", "public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}", "public Date getFechaNacimiento()\r\n/* 133: */ {\r\n/* 134:242 */ return this.fechaNacimiento;\r\n/* 135: */ }", "@Override\n public List<IDailyNote> getDailyNotes() {\n return dailyNotes;\n }", "abstract public Date getServiceAppointment();", "public java.util.Calendar getFechaSolicitud(){\n return localFechaSolicitud;\n }", "public abstract Timestamp getDate();", "io.dstore.values.StringValue getDay();", "public List<ByDay> getByDay() {\n\t\treturn byDay;\n\t}", "public Date getDataPreventivo() {\n return dataPreventivo;\n }", "private BusinessDateUtility() {\n\t}", "@Override\n public Date getDate() {\n return date;\n }", "int getDatenvolumen();", "public com.guidewire.datamodel.DatetimeorderingDocument.Datetimeordering[] getDatetimeorderingArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(DATETIMEORDERING$2, targetList);\r\n com.guidewire.datamodel.DatetimeorderingDocument.Datetimeordering[] result = new com.guidewire.datamodel.DatetimeorderingDocument.Datetimeordering[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public EventDates getEventDates() {\n return eventDates;\n }", "private void initDates() throws RIFCSException {\n NodeList nl = super.getElements(Constants.ELEMENT_DATE);\n\n for (int i = 0; i < nl.getLength(); i++) {\n dates.add(new DateWithTypeDateFormat(nl.item(i)));\n }\n }", "public Date GetDate();", "public abstract java.lang.String getFecha_inicio();", "public ReactorResult<java.util.Calendar> getAllDate_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), DATE, java.util.Calendar.class);\r\n\t}", "public java.lang.String getDefaultCalendarAccess() {\n return defaultCalendarAccess;\n }", "@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public interface DateInfo {\n\n String getDateFormat();\n\n Calendar getTodayCalendar();\n\n}", "private DateUtil(){\n\n }", "protected Date getTodaysDate() \t{ return this.todaysDate; }", "public int[] getDaysOfWeek() {\n return daysOfWeek;\n }", "public DTM[] getSubstanceExpirationDate() {\r\n \tDTM[] retVal = this.getTypedField(16, new DTM[0]);\r\n \treturn retVal;\r\n }", "@Override\n public DAttributeDatetime getAttFechaPago() { return moAttFechaPago; }", "public java.util.Calendar getFechaFacturado(){\n return localFechaFacturado;\n }", "public Date getDataInizio() {\n return (Date)this.getCampo(nomeDataIni).getValore();\n }", "@JsonProperty(\"etc\")\n @Valid\n public Date getEtc() {\n return etc;\n }", "java.util.Calendar getNextrun();", "@Override\n\tpublic void getDatas() {\n\t\tAutoUpdate autoUpdate=new AutoUpdate();\n\t\tautoUpdate.getVersionData(this, \"0\");\n\t}", "public Calendar getDate(){\n return date;\n }", "public DateInfo getDateInfo() {\n return dateInfo;\n }", "@Test\n public void testGetDailyListingFromFileSystemInvalidDate() {\n ListingFileHelper instance = new ListingFileHelper();\n\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n GregorianCalendar calendar = new GregorianCalendar(2009, 0, 1);\n List<Listing> result = instance.getDailyListingFromFileSystem(new Date(calendar.getTimeInMillis()));\n \n assertTrue(result.isEmpty());\n }", "private Date getTestListingDateTimeStamp() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1, 17, 0);\n return new Date(calendar.getTimeInMillis());\n }", "public int getDate(){\n return date;\n }", "@Override\n default String getTs() {\n return null;\n }", "public String getDsdate() {\n return dsdate;\n }", "public String[] getUserDate() {\n\t\treturn this.userDate;\n\t}", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "public ArrayList<DailyHours> getDayList()\r\n\t{\r\n\t\treturn new ArrayList<DailyHours>(dailyHourLog);\r\n\t}", "private RentSettings() throws DateFormatException {\r\n \tthis.rentDate = \"\";\r\n \tthis.dueDate = \"\";\r\n }", "@Override\n\tpublic void initDate() {\n\n\t}", "private AggregDayLogSerializer() {\n\t throw new UnsupportedOperationException(\n\t \"This class can't be instantiated\");\n\t }", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _dictData.getCreateDate();\n\t}", "private void getDateTime() {\n String todayDateTime = String.valueOf(Calendar.getInstance().getTime());\n\n // Calendar.getInstance().getTime() returns a long string of various data for today, split and access what we need\n String[] splitTime = todayDateTime.split(\" \");\n\n dayDate = splitTime[1] + \" \" + splitTime[2] + \" \" + splitTime[5]; // Month, Day, Year\n dayTime = splitTime[3];\n }", "@Override\r\n\tpublic Date getAttr_reg_dt() {\n\t\treturn super.getAttr_reg_dt();\r\n\t}", "public void removeAllDate() {\r\n\t\tBase.removeAll(this.model, this.getResource(), DATE);\r\n\t}", "ArrayList<Day> getDays() {\n return days;\n }", "private DefaultTimeZoneNames() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.<init>():void\");\n }", "public Dia[] getCalendari() {\n\t\treturn cal;\n\t}", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "public Date getDate() {\n return dateTime;\n }" ]
[ "0.67575514", "0.64265305", "0.63615745", "0.6222628", "0.60174596", "0.6014689", "0.5969568", "0.59333324", "0.5828819", "0.5808895", "0.57547957", "0.57544553", "0.5747441", "0.5739001", "0.5738507", "0.5723305", "0.5700499", "0.56748444", "0.56690097", "0.56604135", "0.56490606", "0.56315625", "0.5625859", "0.5621341", "0.56170726", "0.56129265", "0.5599405", "0.55975556", "0.55935943", "0.558736", "0.5581749", "0.5573382", "0.5549229", "0.5545957", "0.55430925", "0.5536694", "0.5533625", "0.55320674", "0.5524434", "0.5502638", "0.5493832", "0.5491741", "0.54904544", "0.5487343", "0.5485826", "0.5485826", "0.5473574", "0.5466323", "0.5458959", "0.54549193", "0.54541135", "0.5441584", "0.5440814", "0.54400796", "0.5432694", "0.5426462", "0.54187214", "0.5415479", "0.54073447", "0.5401809", "0.5399603", "0.53985167", "0.539497", "0.5393667", "0.5392176", "0.53885096", "0.5382772", "0.5380334", "0.537555", "0.5369512", "0.5368968", "0.5365963", "0.53658843", "0.5364131", "0.5362528", "0.53605837", "0.5357818", "0.53500384", "0.53437746", "0.5314127", "0.53089017", "0.5306698", "0.5302798", "0.52976316", "0.5297127", "0.52948534", "0.5293111", "0.5292359", "0.5285533", "0.5284294", "0.52831453", "0.52812517", "0.52778953", "0.52756786", "0.52755505", "0.5274976", "0.52729875", "0.527158", "0.5271257", "0.5270302", "0.52654874" ]
0.0
-1
END OF THE METHOD
public void seeReservation(RoomList roomList){ System.out.println("What is the name of the guest you wish to check a reservation for ?"); keyboard.nextLine(); String name = keyboard.nextLine(); Room room = null; for(Room r: roomList.getList()){ if(!r.isEmpty(r)) { room = r.findRoomByName(r, name); room.getGuestNames(room); } } }
{ "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\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\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\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void poetries() {\n\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\n\tpublic void ligar() {\n\t\t\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 anularFact() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "private void parseData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n protected void end() {\n \n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo4359a() {\n }", "public void Exterior() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "public void redibujarAlgoformers() {\n\t\t\n\t}", "private void verificaData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void baocun() {\n\t\t\n\t}", "@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void mo38117a() {\n }", "@Override\n public void update() {\n \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\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n protected void end() {\n\n }", "public void skystonePos4() {\n }", "private void remplirFabricantData() {\n\t}" ]
[ "0.6597582", "0.6506207", "0.64168066", "0.6341521", "0.63264173", "0.6264355", "0.6264355", "0.6224028", "0.61969095", "0.6137274", "0.61338806", "0.61065507", "0.6092583", "0.6077934", "0.607073", "0.60662365", "0.6053713", "0.6043748", "0.60300463", "0.60196507", "0.5986788", "0.5948367", "0.5927859", "0.592738", "0.5924534", "0.5915871", "0.5911166", "0.5904884", "0.5894554", "0.5884487", "0.5877488", "0.5874516", "0.587075", "0.587075", "0.5867211", "0.5860887", "0.5858469", "0.5852181", "0.58340776", "0.5830706", "0.5821648", "0.58157253", "0.5810495", "0.58050144", "0.57879966", "0.5786208", "0.5786208", "0.5784966", "0.5782459", "0.5782288", "0.57679427", "0.57521397", "0.5744826", "0.5729028", "0.57280356", "0.5724886", "0.57210636", "0.57210636", "0.57210636", "0.57202387", "0.57201964", "0.5717683", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.57156736", "0.5714085", "0.57068545", "0.57068545", "0.570583", "0.5704404", "0.57042223", "0.57012254", "0.5698257", "0.5697715", "0.56947833", "0.5679679", "0.5676226", "0.5669809", "0.5669809", "0.5669809", "0.5669809", "0.5669809", "0.5669809", "0.56695575", "0.5668763", "0.5668763", "0.5655122", "0.5655122", "0.5655122", "0.56526244", "0.56516993", "0.5650347" ]
0.0
-1
Fetch all the weeks
@RequestMapping(value = "/week/all", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Week>> getAllWeek() { ResponseEntity<List<Week>> returnEntity; try { List<Week> result = businessDelegate.getAllWeeks(); if (result == null) { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND); } else { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK); } } catch (RuntimeException e) { returnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT \\n\" + \n\t\t\t\t\"(CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, SUM(Amount) From transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"and type = ?\\n\" + \n\t\t\t\t\"group by Week\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2),resultSet.getInt(1)));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public Integer[][] getAll() {\r\n return weekData;\r\n }", "int getWeek();", "private void getActivatedWeekdays() {\n }", "public List<Integer> getByWeekNo() {\n\t\treturn byWeekNo;\n\t}", "private List<Object[]> executeWeekQuery(String week, String year) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Matin' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (6,7,8,9,10,11,12,13) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_2 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Soir' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (14,15,16,17,18,19,20,21) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_3 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Nuit' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (22,23,0,1,2,3,4,5) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY shift, segment, workplace;\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "@Override\n\tpublic List<WeeklyData> getWeeklyData(int user_id) {\n\t\treturn mobileDao.getWeeklyData(user_id);\n\t}", "public void AllWeekLessonReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass l = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if lesson exists, and isnt a parent appointment\r\n if (l != null && l.subject != subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + l.time + \"pm | \" + l.room + \" |\");\r\n System.out.println(l.toReport());\r\n }\r\n }\r\n }\r\n }\r\n }", "@GetMapping(\"/getWeeklyRecords\")\n public ResponseEntity< List<Record> > getWeeklyRecords(){\n return ResponseEntity.ok().body(this.recordService.getWeeklyRecords());\n }", "@Transactional(readOnly = true)\n\t@Query(value = \"SELECT s FROM StockPrice s where stockCd=:stockCd and curTime in (select lastDay from BFWeekDay bfw where date(lastDay) between :fromDate and :toDate) order by s.curTime\")\n\tpublic List<StockPrice> findWeekByStockCd(@Param(\"stockCd\") String stockCd, @Param(\"fromDate\") Date fromDate,\n\t\t\t@Param(\"toDate\") Date toDate);", "public List<DatabaseStore> getVarValuesForWeek(String variable,\n\t\t\tInteger month, Integer day, Integer year, Integer week_day) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tString day_str = QUES_KEY_VAR + \"='\" + variable + \"' AND ( (\"\n\t\t\t\t+ QUES_KEY_DAY + \"=\" + day + \" AND \" + QUES_KEY_MONTH + \"=\"\n\t\t\t\t+ month + \" AND \" + QUES_KEY_YEAR + \"=\" + year + \")\";\n\n\t\tSimpleDateFormat year_fmt = new SimpleDateFormat(\"yyyy\", Locale.US);\n\t\tSimpleDateFormat month_fmt = new SimpleDateFormat(\"MM\", Locale.US);\n\t\tSimpleDateFormat day_fmt = new SimpleDateFormat(\"dd\", Locale.US);\n\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tInteger diff = null;\n\t\t\tGregorianCalendar cal = new GregorianCalendar(year, month - 1, day);\n\t\t\tif (week_day < i) {\n\t\t\t\tdiff = i - week_day;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t} else if (week_day > i) {\n\t\t\t\tdiff = week_day - i;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, -1 * diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t}\n\t\t}\n\t\tday_str += \")\";\n\t\tString query = \"SELECT * FROM \" + TABLE_QUES + \" WHERE \" + day_str;\n\t\tCursor cursor = db.rawQuery(query, null);\n\t\tif (cursor.getCount() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn handleCursor(cursor);\n\t\t}\n\t}", "public List<String> getWeekSchedule() {\n\t\tList<String> schedule = new ArrayList<String>();\n\t\tfor (DelegatedWork dw: this.delegatedWork) {\n\t\t\tActivity currentActivity = dw.getActivity();\n\t\t\tint totalRegHours = 0;\n\t\t\tfor (RegisteredWork rw: this.registeredWork) {\n\t\t\t\tif (rw.getActivity().equals(currentActivity)) {\n\t\t\t\t\ttotalRegHours += rw.getHalfHoursWorked();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotalRegHours /= 2;\n\t\t\tschedule.add(currentActivity.getName() + \": \" + totalRegHours + \"/\" + dw.getHalfHoursWorked()/2);\n\t\t}\n\t\treturn schedule;\n\t}", "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "@Transactional(readOnly = true)\n\t@Query(value = \"SELECT s FROM StockPrice s where stockCd=:stockCd and curTime in (select lastDay from BFWeekDay bfw) order by s.curTime\")\n\tpublic List<StockPrice> findWeekByStockCd(@Param(\"stockCd\") String stockCd);", "public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}", "public static ObservableList<Appointment> getAppoinmentsForWeek(int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate beginWeek = LocalDate.now();\n LocalDate endWeek = LocalDate.now().plusWeeks(1);\n try (Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + beginWeek + \"' AND start <= '\" + endWeek + \"'\");\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n \n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "boolean getWeek1();", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "public Cursor getWeekStatistics(int[] attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" IN \" + Arrays.toString(attribute).replace('[','(').replace(']',')') + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "public void startWeek()\n\t{\n\t\tsynchronized (date_db_lock) {\t\t\t\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\tclearAllDatabases();\n\t\t\t}\n\t\t}\n\t}", "@Transactional(readOnly = true)\n\t@Query(value = \"select avg(price) as price, date_format(curTime,'%Y-%m-%d') as cur_date from StockPrice sp \"\n\t\t\t+ \"where curTime in (select lastDay from BFWeekDay bfw where date(lastDay) between :fromDate and :toDate) and \"\n\t\t\t+ \"stockCd in (select stockCd from Stock s where sectorCd=:sectorCd) group by curTime order by curTime\")\n\tpublic List<Object[]> findWeekBySectorCd(@Param(\"sectorCd\") String sectorCd, @Param(\"fromDate\") Date fromDate,\n\t\t\t@Param(\"toDate\") Date toDate);", "public void getUsersByWeek() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByWeeks();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "@RequestMapping(value = \"/week/batchid/{batchId}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByBatchId(@PathVariable(\"batchId\") int batchId) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getWeekByBatchId(batchId);\n\t\t\t\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "public Cursor getWeekStatistics(int attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" = \" + attribute + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "boolean getWeek7();", "private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Event> getCalendarEventsByWeek()\n {\n ArrayList<Event> weekListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)) &&\n (events.get(i).getCalendar().get(Calendar.WEEK_OF_MONTH) == currentCalendar.get(Calendar.WEEK_OF_MONTH)))\n {\n weekListOfEvents.add(events.get(i));\n }\n }\n return weekListOfEvents;\n }", "public String getWeek() {\r\n return week;\r\n }", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "public List<String> getTopSearchKeyWeekly(int number) {\n\t\tString hql = \"select e.keyWords from SearchLog e where e.date > :oneWeekBefore group by e.keyWords order by count(e.id) desc\";\n\n\t\tSession session = getSession();\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.add(Calendar.DATE, -7); // 得到一周前的时间\n\t\t\tDate date = calendar.getTime();\n\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t// System.out.println(df.format(date));\n\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setMaxResults(number);\n\t\t\tquery.setDate(\"oneWeekBefore\", date);\n\n\t\t\tlist = query.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "boolean getWeek6();", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }", "boolean hasWeek1();", "private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "boolean hasWeek7();", "public static TemporalQuery<Integer> dayOfWeek(){\n return (d) -> d.get(ChronoField.DAY_OF_WEEK);\n }", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "public Builder byWeekNo(Collection<Integer> weekNumbers) {\n\t\t\tbyWeekNo.addAll(weekNumbers);\n\t\t\treturn this;\n\t\t}", "@Transactional(readOnly = true)\n\t@Query(value = \"select avg(price) as price, date_format(curTime,'%Y-%m-%d') as cur_date from StockPrice sp \"\n\t\t\t+ \"where curTime in (select lastDay from BFWeekDay) and \"\n\t\t\t+ \"stockCd in (select stockCd from Stock where sectorCd=:sectorCd) group by curTime order by curTime\")\n\tpublic List<Object[]> findWeekBySectorCd(@Param(\"sectorCd\") String sectorCd);", "public Weeks(BigDecimal numUnits) { super(numUnits); }", "public static ArrayList<Integer> get4WeekPowerUsage() {\n try {\n Connection connection = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:10000/tiana18\", \"tiana18web\", \"TrafalgarLaw18\");\n ResultSet result = connection.createStatement().executeQuery(\"select * from public.fourweekevaluation;\");\n connection.close();\n ArrayList<Integer> list = new ArrayList<Integer>();\n while(result.next()) {\n int val = result.getInt(\"powerusage\");\n list.add(val);\n }\n return list;\n }\n catch(Exception e) {\n return null;\n }\n }", "public static void listWeekends() {\n Set<DayOfWeek> weekEnds = EnumSet.of(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);\n\n LocalDate currentDate = LocalDate.now();\n int year = currentDate.getYear();\n Month month = currentDate.getMonth();\n int currentDay = currentDate.getDayOfMonth();\n int daysOfMth = currentDate.lengthOfMonth();\n\n IntStream.rangeClosed(currentDay, daysOfMth)\n .mapToObj(day -> LocalDate.of(year, month, day))\n .filter(date -> weekEnds.contains(date.getDayOfWeek()))\n .forEach(JustBook::weekendListings);\n }", "boolean hasWeek6();", "@Override\n public List<Long> getWeekReadTimes(Long uid) {\n Assertions.notNull(uid, \"uid must not be null!\");\n return miniProgramCacheManager.getWeekReadTimeData(uid);\n }", "public Builder byWeekNo(Integer... weekNumbers) {\n\t\t\treturn byWeekNo(Arrays.asList(weekNumbers));\n\t\t}", "@RequestMapping(value = \"/week/weeknumber/{weeknumber}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByWeekNumber(@PathVariable(\"weeknumber\") int weeknumber) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getWeekByWeekNumber(weeknumber);\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "public List<WeeklyRecord> getWeeklyNetIncome(int year, Month month) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT data.Week, data.Income - data.Expense as NetIncome\\n\" + \n\t\t\t\t\"FROM (\\n\" + \n\t\t\t\t\" SELECT \\n\" + \n\t\t\t\t\" (CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, \\n\" + \n\t\t\t\t\" sum(IF(Type = 'Income', Amount,0)) as Income,\\n\" + \n\t\t\t\t\"\tsum(IF(Type = 'Expense', Amount,0)) as Expense\\n\" + \n\t\t\t\t\"FROM transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"group by Week\\n\" + \n\t\t\t\t\") data\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2), resultSet.getInt(1)));\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public Integer getGestationalweeks() {\n return gestationalweeks;\n }", "boolean getWeek3();", "List<WorkingSchedule> getAll();", "@RequestMapping(\"/playerweeksstats\")\n public PlayerWeeksStats playerWeeksStats(@RequestParam(value=\"weeks\", defaultValue=\"1-17\") String weeks,\n @RequestParam(value=\"playerId\", defaultValue=\"0\") String playerId) \n {\n String _weeks[] = weeks.split(\"-\");\n\n PlayerWeeksStats pws = new PlayerWeeksStats();\n Map<String, PlayerWeeksStats.WeekStats> ws_map = new HashMap <String, PlayerWeeksStats.WeekStats>();\n\n PlayerStatObject pso = null;\n for (int i = 0; i < _weeks.length; i++)\n {\n pso = PlayersStats.GetPlayerStatsForSeasonWeek(playerId, \"2017\", _weeks[i]);\n ws_map.put(_weeks[i], CreateWeekStatsFromPlayerStatObject(pso));\n }\n \n if (pso != null)\n {\n pws.setId(pso.getId());\n pws.setGsisPlayerId(pso.getGsIsPlayerId());\n pws.setEsbid(pso.getEsbid());\n pws.setName(pso.getName());\n pws.setWeekStats(ws_map);\n }\n \n return pws;\n }", "private RepeatWeekdays() {}", "@Override\r\n\tpublic List<ITransactionHistoryDto> viewWeekTransaction(String accountNumber) {\r\n\t\tlog.info(\"inside week transaction\");\r\n\t\tLocalDateTime fromDate = LocalDateTime.now().minusWeeks(1L);\r\n\t\tLocalDateTime toDate = LocalDateTime.now();\r\n\r\n\t\tAccount account = accountRepository.findByAccountNumber(accountNumber);\r\n\t\tif (account == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NUMBER_NOT_FOUND);\r\n\t\t}\r\n\t\tif (transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate).isEmpty()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.WEEK_HISTORY_NOT_FOUND);\r\n\t\t}\r\n\t\treturn transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate);\r\n\r\n\t}", "boolean getWeek5();", "public ArrayList<TreeSet<Task>> getWeeklySchedule(){\r\n return weeklySchedule;\r\n }", "public static List<Date> getAllDatesInWeek(Date dateInWeek) {\n\t\tList<Date> allWeek = new ArrayList<Date>(7);\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.MONDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.TUESDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.WEDNESDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.THURSDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.FRIDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.SATURDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.SUNDAY));\n\t\treturn allWeek;\n\t}", "private static Map<Integer,List<LocalDateTime>> workingHoursForFacilityPerWeek(Facility facility, LocalDateTime now) {\n Map<Integer,List<LocalDateTime>> workingHoursForWeek=new HashMap<>();\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Constants.WORKING_HOURS_FORMAT);\n LocalTime startTime = LocalTime.parse(facility.getWorkingHours().split(Constants.HOUR_SEPARATOR)[0], formatter);\n LocalTime endTime = LocalTime.parse(facility.getWorkingHours().split(Constants.HOUR_SEPARATOR)[1], formatter);\n int emptySpot= facility.getEmptySpot();\n IntStream.range(0,Constants.WEEK_COUNT).forEach(weekIndex -> {\n now.plusWeeks(1);\n workingHoursForWeek.put(weekIndex, TimeUtil.getWorkingHoursForWeek(startTime, endTime, now).subList(0,emptySpot));\n\n });\n return workingHoursForWeek;\n\n }", "public static ArrayList<Integer> get4WeekWaterUsage() {\n try {\n Connection connection = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:10000/tiana18\", \"tiana18web\", \"TrafalgarLaw18\");\n ResultSet result = connection.createStatement().executeQuery(\"select * from public.fourweekevaluation;\");\n connection.close();\n ArrayList<Integer> list = new ArrayList<Integer>();\n while(result.next()) {\n int val = result.getInt(\"waterusage\");\n list.add(val);\n }\n return list;\n }\n catch(Exception e) {\n return null;\n }\n }", "@Override\r\n public String toString() {\r\n return this.weekName;\r\n }", "public ArrayList<Event> remainingEventsForTheWeek() {\n\t\tArrayList<Event> result = new ArrayList();\n\n\t\tLocalDateTime now = this.now.get();\n\t\tLocalDate today = now.toLocalDate();\n\t\tLocalTime moment = now.toLocalTime();\n\t\tboolean after = false;\n\n\t\tdo {\n\t\t\tTreeSet<Event> todayEvents = this.events.get(today);\n\t\t\tif (todayEvents != null) {\n\t\t\t\t// Events are sorted\n\t\t\t\tfor (Event e: todayEvents) {\n\t\t\t\t\tif (after) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t} else if (e.startTime.compareTo(moment) >= 0) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t\tafter = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tafter = true;\n\t\ttoday = today.plusDays(1);\n\t\t// Week ends on Sunday.\n\t\t} while (today.getDayOfWeek() != DayOfWeek.MONDAY);\n\n\t\treturn result;\n\t}", "public int getWeeksElapsed() {\n return weeksElapsed;\n }", "boolean hasWeek5();", "public List<TimeSheet> showAllTimeSheet(){\n log.info(\"Inside TimeSheetService#ShowAllTimeSheet() Method\");\n List<TimeSheet> allTimeSheet = timeSheetRepository.findAll();\n return allTimeSheet;\n }", "private void flushWeek() {\n\t\tComponent[] days = this.weekPanel.getComponents();\n\t\tComponent[] blocks;\n\t\tint i;\n\t\tfor (Component day : days) {\n\t\t\tblocks = ((Container) day).getComponents();\n\t\t\ti = 1;\n\t\t\tfor (Component unit : blocks) {\n\t\t\t\t((JTimeBlock) unit).flush();\n\t\t\t\tif (((JTimeBlock) unit).getComponentCount() != 0) {\n\t\t\t\t\t((JTimeBlock) unit).removeAll();\n\t\t\t\t}\n\t\t\t\tif (i % BLOCKS_IN_HOUR == 0) {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 1, 1, Color.LIGHT_GRAY));\n\t\t\t\t} else {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 0, 1, Color.LIGHT_GRAY));\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t}\n\t\t}\n\t}", "boolean hasWeek3();", "public List<WeeklyRecord> getWeeklyIncome(int year, Month month) throws SQLException {\n\t\treturn getWeekly(year, month, \"Income\");\n\t}", "boolean getWeek4();", "boolean getWeek2();", "public ResultSet getAllQuestionnaireWines () throws Exception {\r\n String sql = \"SELECT * FROM questionnairewines;\";\r\n return stmt.executeQuery(sql);\r\n }", "public void setWeek(String week) {\r\n this.week = week;\r\n }", "int getCountMasteredWordWeek() {\n return 8;\n //return mModel.getCountWordWithStatus(Constants.StatusWord.MASTER);\n }", "public static List<String> getWeekOfDateByMilliseconds(String pattern, long milliseconds) {\n List<String> stringDates = new ArrayList<>();\n List<Date> dates = getWeekOfDateByMilliseconds(milliseconds);\n for (int i = 0; i < dates.size(); i++) {\n stringDates.add(getDateByMilliseconds(pattern, dates.get(i).getTime()));\n }\n\n return stringDates;\n }", "public double getWeeksPerYear()\r\n {\r\n return weeksPerYear;\r\n }", "boolean hasWeek4();", "public List<WeeklyRecord> getWeeklyExpense(int year, Month month) throws SQLException {\n\t\treturn getWeekly(year, month, \"Expense\");\n\t}", "DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();", "public PayPeriodCursor updateWeek(PayPeriod period) {\n\t\tString[] periodInfo = {period.getPayPeriod(), String.valueOf(period.getId())};\n\t\tCursor cursor = getWritableDatabase().rawQuery(UPDATE_WEEK, periodInfo);\n\t\treturn new PayPeriodCursor(cursor);\n\t}", "boolean hasWeekday();", "public int getCurrentWeek()\n {\n\n return sem.getCurrentWeek(startSemester,beginHoliday,endHoliday,endSemester);\n }", "public Integer getCarteWeek() {\n return carteWeek;\n }", "private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = accessToken;\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "public HashMap<Integer, int[][]> prepareFixture(){\n HashMap<Integer, int[][]> weeks = new HashMap<>();\n int teamCount = teams.size();\n boolean isOdd = teams.size() % 2 != 0;\n // Add first matches\n weeks.put(0, prepareFirstWeek(isOdd, teamCount));\n for(int i = 1; i < weekCount(teamCount)/2; i++) {\n weeks.put(i, prepareFixtureNextWeek(weeks.get(i-1)));\n }\n // Add Revenges\n int totalWeekCount = weekCount(teamCount);\n int startingSize = weeks.size();\n for(int i = startingSize; i < totalWeekCount; i++) {\n int[][] firstMatchOfCurrentWeek = weeks.get(i-startingSize);\n assert firstMatchOfCurrentWeek != null;\n int[][] currentWeek = new int[firstMatchOfCurrentWeek.length][firstMatchOfCurrentWeek[0].length];\n for(int j = 0; j < currentWeek.length; j++) {\n currentWeek[j][0] = firstMatchOfCurrentWeek[j][1];\n currentWeek[j][1] = firstMatchOfCurrentWeek[j][0];\n }\n weeks.put(i, currentWeek);\n }\n // Return fixture hashMap\n return weeks;\n }", "boolean hasWeek2();", "@Override\r\n\tpublic int selectMessageWeek() {\n\t\treturn messageMapper.selectMessageWeek();\r\n\t}", "@Override\n\tpublic WeeklyData getWeeklyDataToUpdate(int week_id) {\n\t\treturn mobileDao.getWeeklyDataToUpdate(week_id);\n\t}", "public java.util.List<wsihash> findAll();", "private int[] setDaysOfWeek() {\n int[] daysOfWeek = new int[7];\n\n for (int i = 0; i < 6; i++) {\n daysOfWeek[i] = calculateNumberOfDaysOfWeek(DayOfWeek.of(i + 1));\n }\n\n return daysOfWeek;\n }", "public List<Warehouse> findWarehouseAll() {\n\t\t return warehouseDAO.findWarehouseAll();\r\n\t}", "public static referential.store.v2.WeekPattern.Builder newBuilder() {\n return new referential.store.v2.WeekPattern.Builder();\n }", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "public Week getCopy() {\r\n Week w = new Week();\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n w.setOne(d, h, weekData[d][h]);\r\n w.setName(\"+Copy of \" + this.getName());\r\n }\r\n }\r\n return w;\r\n }", "public static final Function<Date,Date> addWeeks(final int amount) {\r\n return new Add(Calendar.WEEK_OF_YEAR, amount);\r\n }", "private void setProgramsForWeekTable()\r\n {\n long day = System.currentTimeMillis();\r\n long day2 = day + 1000 * 60 * 60 * 24; //seconds in day\r\n long day3 = day2 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day4 = day3 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day5 = day4 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day6 = day5 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day7 = day6 + 1000 * 60 * 60 * 24; //seconds in day\r\n\r\n String urlday = DownloadsManager.PROGRAMM_URL + day;\r\n String urlday2 = DownloadsManager.PROGRAMM_URL + day2;\r\n String urlday3 = DownloadsManager.PROGRAMM_URL + day3;\r\n String urlday4 = DownloadsManager.PROGRAMM_URL + day4;\r\n String urlday5 = DownloadsManager.PROGRAMM_URL + day5;\r\n String urlday6 = DownloadsManager.PROGRAMM_URL + day6;\r\n String urlday7 = DownloadsManager.PROGRAMM_URL + day7;\r\n\r\n String[] urls = {urlday, urlday2, urlday3, urlday4, urlday5, urlday6, urlday7};\r\n\r\n for (int i=0; i<urls.length; i++)\r\n {\r\n if(dataBase.getProgramsCount() == 0)\r\n setProgramsTable(urls[i]);\r\n else\r\n updateProgramsTable(urls[i]);\r\n }\r\n\r\n }", "private static List<FacilityFreeSchedule> generateFacilityFreeSchedules(Facility facility) {\n List<FacilityFreeSchedule> facilityFreeSchedules=new ArrayList<>();\n LocalDateTime now = LocalDateTime.now();\n Map<Integer,List<LocalDateTime>> workingHoursForMonth=workingHoursForFacilityPerWeek(facility, now);\n workingHoursForMonth.keySet().stream().forEach(weekIndex -> {\n List<LocalDateTime> workingHoursPerWeek = workingHoursForMonth.get(weekIndex);\n facilityFreeSchedules.addAll(workingHoursPerWeek.stream()\n .map(dateTime -> generateFacilityFreeSchedule(facility, dateTime, weekIndex))\n .collect(Collectors.toList()));\n });\n return facilityFreeSchedules;\n }", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "public boolean getRunOnWeekends();", "public DayOfWeek getWorkweekStarts() {\n\t\treturn workweekStarts;\n\t}" ]
[ "0.7889447", "0.68866795", "0.6707855", "0.66206247", "0.64925545", "0.6422638", "0.631613", "0.62936336", "0.6241932", "0.6212908", "0.61953735", "0.6136361", "0.6130621", "0.61272204", "0.60846615", "0.60487056", "0.60427207", "0.6029344", "0.6012885", "0.59992963", "0.59877485", "0.5985755", "0.59849477", "0.5971505", "0.59544456", "0.59473157", "0.59258735", "0.5919206", "0.5890404", "0.58865505", "0.5883639", "0.5882226", "0.58797234", "0.58663064", "0.58642936", "0.5860821", "0.5858636", "0.5822721", "0.5821157", "0.5796231", "0.5783728", "0.5780137", "0.57796097", "0.57758605", "0.57694286", "0.5747155", "0.57411534", "0.57382077", "0.571939", "0.5719357", "0.5711537", "0.57084185", "0.56929463", "0.5687861", "0.56645864", "0.56547695", "0.564571", "0.56174266", "0.5611207", "0.56073993", "0.5587832", "0.5586513", "0.55434614", "0.55424994", "0.5538121", "0.5534624", "0.55252075", "0.55215174", "0.5515761", "0.55135804", "0.5507866", "0.5502279", "0.54467905", "0.54250824", "0.54249036", "0.5410528", "0.5383101", "0.5373644", "0.5369881", "0.53670955", "0.53645974", "0.5360292", "0.53576225", "0.533285", "0.53177756", "0.5317192", "0.530936", "0.5294928", "0.5279667", "0.5275107", "0.5263336", "0.5257119", "0.5255134", "0.5217215", "0.5190692", "0.5188027", "0.5186347", "0.5176372", "0.5166741", "0.5164478" ]
0.73140496
1
Fetch all the weeks from a training batch
@RequestMapping(value = "/week/batchid/{batchId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Week>> getWeekByBatchId(@PathVariable("batchId") int batchId) { ResponseEntity<List<Week>> returnEntity; try { List<Week> result = businessDelegate.getWeekByBatchId(batchId); if (result == null) { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND); } else { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK); } } catch (RuntimeException e) { returnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "@RequestMapping(value = \"/week/all\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getAllWeek() {\n\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getAllWeeks();\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "public Integer[][] getAll() {\r\n return weekData;\r\n }", "List<Training> obtainAllTrainings();", "int getWeek();", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "public static void calcSpecificWeeks(JavaSparkContext context, SparkSession session, String input_batch, String input_assessment, String input_grade, String output) {\n\t\tStructField batch_id = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n StructField borderline_grade_threshold = DataTypes.createStructField(\"borderline_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField end_date = DataTypes.createStructField(\"end_date\", DataTypes.StringType, true);\n StructField good_grade_threshold = DataTypes.createStructField(\"good_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField location = DataTypes.createStructField(\"location\", DataTypes.StringType, true);\n StructField skill_type = DataTypes.createStructField(\"skill_type\", DataTypes.StringType, true);\n\t\tStructField start_date = DataTypes.createStructField(\"start_date\", DataTypes.StringType, true);\n StructField training_name = DataTypes.createStructField(\"training_name\", DataTypes.StringType, true);\n\t\tStructField training_type = DataTypes.createStructField(\"training_type\", DataTypes.StringType, true);\n StructField number_of_weeks = DataTypes.createStructField(\"number_of_weeks\", DataTypes.DoubleType, true);\n StructField co_trainer_id = DataTypes.createStructField(\"co_trainer_id\", DataTypes.DoubleType, true);\n StructField trainer_id = DataTypes.createStructField(\"trainer_id\", DataTypes.DoubleType, true);\n StructField resource_id = DataTypes.createStructField(\"resource_id\", DataTypes.StringType, true);\n StructField address_id = DataTypes.createStructField(\"address_id\", DataTypes.DoubleType, true);\n StructField graded_weeks = DataTypes.createStructField(\"graded_weeks\", DataTypes.DoubleType, true);\n List<StructField> fields = new ArrayList<StructField>();\n fields.add(batch_id);\n fields.add(borderline_grade_threshold);\n fields.add(end_date);\n fields.add(good_grade_threshold);\n fields.add(location);\n fields.add(skill_type);\n fields.add(start_date);\n fields.add(training_name);\n fields.add(training_type);\n fields.add(number_of_weeks);\n fields.add(co_trainer_id);\n fields.add(trainer_id);\n fields.add(resource_id);\n fields.add(address_id);\n fields.add(graded_weeks);\n StructType schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_batch = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_batch);\n\t\tdata_batch.createOrReplaceTempView(\"caliber_batch\");\n\t\t\n\t\tStructField assessment_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField raw_score = DataTypes.createStructField(\"raw_score\", DataTypes.DoubleType, true);\n\t\tStructField assessment_title = DataTypes.createStructField(\"assessment_title\", DataTypes.StringType, true);\n StructField assessment_type = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField week_number = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n StructField batch_id2 = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n\t\tStructField assessment_category = DataTypes.createStructField(\"assessment_category\", DataTypes.StringType, true);\n fields = new ArrayList<StructField>();\n fields.add(assessment_id);\n fields.add(raw_score);\n fields.add(assessment_title);\n fields.add(assessment_type);\n fields.add(week_number);\n fields.add(batch_id2);\n fields.add(assessment_category);\n schema = DataTypes.createStructType(fields);\n\t\tDataset<Row> data_assessment = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_assessment);\n\t\tdata_assessment.createOrReplaceTempView(\"caliber_assessment\");\n\t\t\n\t\tStructField grade_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField date_received = DataTypes.createStructField(\"raw_score\", DataTypes.StringType, true);\n\t\tStructField score = DataTypes.createStructField(\"assessment_title\", DataTypes.DoubleType, true);\n StructField assessment_id2 = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField trainee_id = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n fields = new ArrayList<StructField>();\n fields.add(grade_id);\n fields.add(date_received);\n fields.add(score);\n fields.add(assessment_id2);\n fields.add(trainee_id);\n schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_grade = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_grade);\n\t\tdata_grade.createOrReplaceTempView(\"caliber_grade\");\n\t\t\n //Executes SQL query to aggregate data\n\t\t\n\t\tDataset<Row> SpecificWeeksSubmittedTable = session.sqlContext().sql(\n\t\t \"SELECT temp.week_number_exam, temp2.week_number_verbal, caliber_batch.batch_id, caliber_batch.trainer_id FROM caliber_batch JOIN (SELECT caliber_assessment.week_number AS week_number_exam, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Exam' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp ON caliber_batch.batch_id = temp.batch_id FULL JOIN (SELECT caliber_assessment.week_number AS week_number_verbal, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Verbal' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp2 ON (caliber_batch.batch_id = temp2.batch_id and week_number_verbal = week_number_exam)\");\n\t\t\n\t\t//Write query results to S3\n\t\t\n\t\tSpecificWeeksSubmittedTable.coalesce(1).write().format(\"csv\").option(\"header\", \"true\").option(\"delimiter\", \"~\").mode(\"Overwrite\").save(output);\n\t}", "private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT \\n\" + \n\t\t\t\t\"(CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, SUM(Amount) From transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"and type = ?\\n\" + \n\t\t\t\t\"group by Week\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2),resultSet.getInt(1)));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public Cursor getWeekStatistics(int[] attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" IN \" + Arrays.toString(attribute).replace('[','(').replace(']',')') + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "public void AllWeekLessonReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass l = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if lesson exists, and isnt a parent appointment\r\n if (l != null && l.subject != subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + l.time + \"pm | \" + l.room + \" |\");\r\n System.out.println(l.toReport());\r\n }\r\n }\r\n }\r\n }\r\n }", "public Integer getGestationalweeks() {\n return gestationalweeks;\n }", "public void startWeek()\n\t{\n\t\tsynchronized (date_db_lock) {\t\t\t\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\tclearAllDatabases();\n\t\t\t}\n\t\t}\n\t}", "public Cursor getWeekStatistics(int attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" = \" + attribute + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "@Override\n\tpublic List<WeeklyData> getWeeklyData(int user_id) {\n\t\treturn mobileDao.getWeeklyData(user_id);\n\t}", "private void getActivatedWeekdays() {\n }", "public List<String> getTopSearchKeyWeekly(int number) {\n\t\tString hql = \"select e.keyWords from SearchLog e where e.date > :oneWeekBefore group by e.keyWords order by count(e.id) desc\";\n\n\t\tSession session = getSession();\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.add(Calendar.DATE, -7); // 得到一周前的时间\n\t\t\tDate date = calendar.getTime();\n\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t// System.out.println(df.format(date));\n\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setMaxResults(number);\n\t\t\tquery.setDate(\"oneWeekBefore\", date);\n\n\t\t\tlist = query.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "private List<Object[]> executeWeekQuery(String week, String year) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Matin' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (6,7,8,9,10,11,12,13) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_2 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Soir' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (14,15,16,17,18,19,20,21) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_3 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Nuit' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (22,23,0,1,2,3,4,5) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY shift, segment, workplace;\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "boolean getWeek6();", "public HashMap<Integer, int[][]> prepareFixture(){\n HashMap<Integer, int[][]> weeks = new HashMap<>();\n int teamCount = teams.size();\n boolean isOdd = teams.size() % 2 != 0;\n // Add first matches\n weeks.put(0, prepareFirstWeek(isOdd, teamCount));\n for(int i = 1; i < weekCount(teamCount)/2; i++) {\n weeks.put(i, prepareFixtureNextWeek(weeks.get(i-1)));\n }\n // Add Revenges\n int totalWeekCount = weekCount(teamCount);\n int startingSize = weeks.size();\n for(int i = startingSize; i < totalWeekCount; i++) {\n int[][] firstMatchOfCurrentWeek = weeks.get(i-startingSize);\n assert firstMatchOfCurrentWeek != null;\n int[][] currentWeek = new int[firstMatchOfCurrentWeek.length][firstMatchOfCurrentWeek[0].length];\n for(int j = 0; j < currentWeek.length; j++) {\n currentWeek[j][0] = firstMatchOfCurrentWeek[j][1];\n currentWeek[j][1] = firstMatchOfCurrentWeek[j][0];\n }\n weeks.put(i, currentWeek);\n }\n // Return fixture hashMap\n return weeks;\n }", "private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }", "public List<Integer> getByWeekNo() {\n\t\treturn byWeekNo;\n\t}", "int getCountMasteredWordWeek() {\n return 8;\n //return mModel.getCountWordWithStatus(Constants.StatusWord.MASTER);\n }", "@GetMapping(\"/getWeeklyRecords\")\n public ResponseEntity< List<Record> > getWeeklyRecords(){\n return ResponseEntity.ok().body(this.recordService.getWeeklyRecords());\n }", "public Weeks(BigDecimal numUnits) { super(numUnits); }", "boolean hasWeek6();", "List<TrainingsCategory> getAllTrainingstype() throws PersistenceException;", "boolean getWeek1();", "private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = accessToken;\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "public List<DatabaseStore> getVarValuesForWeek(String variable,\n\t\t\tInteger month, Integer day, Integer year, Integer week_day) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tString day_str = QUES_KEY_VAR + \"='\" + variable + \"' AND ( (\"\n\t\t\t\t+ QUES_KEY_DAY + \"=\" + day + \" AND \" + QUES_KEY_MONTH + \"=\"\n\t\t\t\t+ month + \" AND \" + QUES_KEY_YEAR + \"=\" + year + \")\";\n\n\t\tSimpleDateFormat year_fmt = new SimpleDateFormat(\"yyyy\", Locale.US);\n\t\tSimpleDateFormat month_fmt = new SimpleDateFormat(\"MM\", Locale.US);\n\t\tSimpleDateFormat day_fmt = new SimpleDateFormat(\"dd\", Locale.US);\n\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tInteger diff = null;\n\t\t\tGregorianCalendar cal = new GregorianCalendar(year, month - 1, day);\n\t\t\tif (week_day < i) {\n\t\t\t\tdiff = i - week_day;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t} else if (week_day > i) {\n\t\t\t\tdiff = week_day - i;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, -1 * diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t}\n\t\t}\n\t\tday_str += \")\";\n\t\tString query = \"SELECT * FROM \" + TABLE_QUES + \" WHERE \" + day_str;\n\t\tCursor cursor = db.rawQuery(query, null);\n\t\tif (cursor.getCount() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn handleCursor(cursor);\n\t\t}\n\t}", "public int getWeeksElapsed() {\n return weeksElapsed;\n }", "boolean hasWeek1();", "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "@RequestMapping(\"/playerweeksstats\")\n public PlayerWeeksStats playerWeeksStats(@RequestParam(value=\"weeks\", defaultValue=\"1-17\") String weeks,\n @RequestParam(value=\"playerId\", defaultValue=\"0\") String playerId) \n {\n String _weeks[] = weeks.split(\"-\");\n\n PlayerWeeksStats pws = new PlayerWeeksStats();\n Map<String, PlayerWeeksStats.WeekStats> ws_map = new HashMap <String, PlayerWeeksStats.WeekStats>();\n\n PlayerStatObject pso = null;\n for (int i = 0; i < _weeks.length; i++)\n {\n pso = PlayersStats.GetPlayerStatsForSeasonWeek(playerId, \"2017\", _weeks[i]);\n ws_map.put(_weeks[i], CreateWeekStatsFromPlayerStatObject(pso));\n }\n \n if (pso != null)\n {\n pws.setId(pso.getId());\n pws.setGsisPlayerId(pso.getGsIsPlayerId());\n pws.setEsbid(pso.getEsbid());\n pws.setName(pso.getName());\n pws.setWeekStats(ws_map);\n }\n \n return pws;\n }", "@Test\r\n\tpublic void testGetTechnologiesForTheWeek() throws Exception{\r\n\t\tlog.debug(\"Validate retrieval of batch's technologies learned in a week\");\r\n\t\t\r\n\t\tSet<String> expected = new HashSet<>();\r\n\t\texpected.add(\"AWS\");\r\n\t\texpected.add(\"Hibernate\");\r\n\t\t\r\n\t\tSet<String> actual = new ObjectMapper().readValue(\r\n\t\t\tgiven().\r\n\t\t\t\tspec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON).\r\n\t\t\twhen().\r\n\t\t\t\tget(baseUrl + batchAssessmentCategories, 2201, 5).\r\n\t\t\tthen().\r\n\t\t\t\tcontentType(ContentType.JSON).assertThat().statusCode(200).\r\n\t\t\tand().\r\n\t\t\t\textract().response().asString(), new TypeReference<Set<String>>() {});\r\n\t\t\r\n\t\tassertEquals(expected, actual);\r\n\t}", "public void setGestationalweeks(Integer gestationalweeks) {\n this.gestationalweeks = gestationalweeks;\n }", "public Builder byWeekNo(Collection<Integer> weekNumbers) {\n\t\t\tbyWeekNo.addAll(weekNumbers);\n\t\t\treturn this;\n\t\t}", "@Override\n\tpublic List<Training> getAllTraining() {\n\t\treturn trainingMapper.selectByExampleWithBLOBs(null);\n\t}", "boolean getWeek7();", "public void getUsersByWeek() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByWeeks();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "public Builder byWeekNo(Integer... weekNumbers) {\n\t\t\treturn byWeekNo(Arrays.asList(weekNumbers));\n\t\t}", "@RequestMapping(value = \"/week/weeknumber/{weeknumber}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByWeekNumber(@PathVariable(\"weeknumber\") int weeknumber) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getWeekByWeekNumber(weeknumber);\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "boolean hasWeek7();", "public double getWeeksPerYear()\r\n {\r\n return weeksPerYear;\r\n }", "public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();", "public List<WeeklyRecord> getWeeklyNetIncome(int year, Month month) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT data.Week, data.Income - data.Expense as NetIncome\\n\" + \n\t\t\t\t\"FROM (\\n\" + \n\t\t\t\t\" SELECT \\n\" + \n\t\t\t\t\" (CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, \\n\" + \n\t\t\t\t\" sum(IF(Type = 'Income', Amount,0)) as Income,\\n\" + \n\t\t\t\t\"\tsum(IF(Type = 'Expense', Amount,0)) as Expense\\n\" + \n\t\t\t\t\"FROM transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"group by Week\\n\" + \n\t\t\t\t\") data\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2), resultSet.getInt(1)));\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public String getWeek() {\r\n return week;\r\n }", "@Override\n public List<Long> getWeekReadTimes(Long uid) {\n Assertions.notNull(uid, \"uid must not be null!\");\n return miniProgramCacheManager.getWeekReadTimeData(uid);\n }", "@Test\r\n\tpublic void testGetBatchWeekAverageValue() throws Exception{\r\n\t\tlog.debug(\"Validate retrieval of batch's overall average in a week\");\r\n\t\t\r\n\t\tDouble expected = new Double(80.26d);\r\n\t\tDouble actual = \r\n\t\t\tgiven().\r\n\t\t\t\tspec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON).\r\n\t\t\twhen().\r\n\t\t\t\tget(baseUrl + batchAverage, 2150, 1).\r\n\t\t\tthen().\r\n\t\t\t\tassertThat().statusCode(200).\r\n\t\t\tand().\r\n\t\t\t\textract().as(Double.class);\r\n\t\t\r\n\t\tassertEquals(expected, actual, 0.01d);\r\n\t}", "@Transactional(readOnly = true)\n\t@Query(value = \"select avg(price) as price, date_format(curTime,'%Y-%m-%d') as cur_date from StockPrice sp \"\n\t\t\t+ \"where curTime in (select lastDay from BFWeekDay) and \"\n\t\t\t+ \"stockCd in (select stockCd from Stock where sectorCd=:sectorCd) group by curTime order by curTime\")\n\tpublic List<Object[]> findWeekBySectorCd(@Param(\"sectorCd\") String sectorCd);", "@Transactional(readOnly = true)\n\t@Query(value = \"select avg(price) as price, date_format(curTime,'%Y-%m-%d') as cur_date from StockPrice sp \"\n\t\t\t+ \"where curTime in (select lastDay from BFWeekDay bfw where date(lastDay) between :fromDate and :toDate) and \"\n\t\t\t+ \"stockCd in (select stockCd from Stock s where sectorCd=:sectorCd) group by curTime order by curTime\")\n\tpublic List<Object[]> findWeekBySectorCd(@Param(\"sectorCd\") String sectorCd, @Param(\"fromDate\") Date fromDate,\n\t\t\t@Param(\"toDate\") Date toDate);", "boolean getWeek5();", "public static ArrayList<Integer> get4WeekPowerUsage() {\n try {\n Connection connection = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:10000/tiana18\", \"tiana18web\", \"TrafalgarLaw18\");\n ResultSet result = connection.createStatement().executeQuery(\"select * from public.fourweekevaluation;\");\n connection.close();\n ArrayList<Integer> list = new ArrayList<Integer>();\n while(result.next()) {\n int val = result.getInt(\"powerusage\");\n list.add(val);\n }\n return list;\n }\n catch(Exception e) {\n return null;\n }\n }", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "@Transactional(readOnly = true)\n\t@Query(value = \"SELECT s FROM StockPrice s where stockCd=:stockCd and curTime in (select lastDay from BFWeekDay bfw) order by s.curTime\")\n\tpublic List<StockPrice> findWeekByStockCd(@Param(\"stockCd\") String stockCd);", "private RepeatWeekdays() {}", "public List<String> getWeekSchedule() {\n\t\tList<String> schedule = new ArrayList<String>();\n\t\tfor (DelegatedWork dw: this.delegatedWork) {\n\t\t\tActivity currentActivity = dw.getActivity();\n\t\t\tint totalRegHours = 0;\n\t\t\tfor (RegisteredWork rw: this.registeredWork) {\n\t\t\t\tif (rw.getActivity().equals(currentActivity)) {\n\t\t\t\t\ttotalRegHours += rw.getHalfHoursWorked();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotalRegHours /= 2;\n\t\t\tschedule.add(currentActivity.getName() + \": \" + totalRegHours + \"/\" + dw.getHalfHoursWorked()/2);\n\t\t}\n\t\treturn schedule;\n\t}", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "public int getCurrentWeek()\n {\n\n return sem.getCurrentWeek(startSemester,beginHoliday,endHoliday,endSemester);\n }", "public void setWeek(String week) {\r\n this.week = week;\r\n }", "public static ArrayList<Integer> get4WeekWaterUsage() {\n try {\n Connection connection = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:10000/tiana18\", \"tiana18web\", \"TrafalgarLaw18\");\n ResultSet result = connection.createStatement().executeQuery(\"select * from public.fourweekevaluation;\");\n connection.close();\n ArrayList<Integer> list = new ArrayList<Integer>();\n while(result.next()) {\n int val = result.getInt(\"waterusage\");\n list.add(val);\n }\n return list;\n }\n catch(Exception e) {\n return null;\n }\n }", "boolean hasWeek5();", "private void setProgramsForWeekTable()\r\n {\n long day = System.currentTimeMillis();\r\n long day2 = day + 1000 * 60 * 60 * 24; //seconds in day\r\n long day3 = day2 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day4 = day3 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day5 = day4 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day6 = day5 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day7 = day6 + 1000 * 60 * 60 * 24; //seconds in day\r\n\r\n String urlday = DownloadsManager.PROGRAMM_URL + day;\r\n String urlday2 = DownloadsManager.PROGRAMM_URL + day2;\r\n String urlday3 = DownloadsManager.PROGRAMM_URL + day3;\r\n String urlday4 = DownloadsManager.PROGRAMM_URL + day4;\r\n String urlday5 = DownloadsManager.PROGRAMM_URL + day5;\r\n String urlday6 = DownloadsManager.PROGRAMM_URL + day6;\r\n String urlday7 = DownloadsManager.PROGRAMM_URL + day7;\r\n\r\n String[] urls = {urlday, urlday2, urlday3, urlday4, urlday5, urlday6, urlday7};\r\n\r\n for (int i=0; i<urls.length; i++)\r\n {\r\n if(dataBase.getProgramsCount() == 0)\r\n setProgramsTable(urls[i]);\r\n else\r\n updateProgramsTable(urls[i]);\r\n }\r\n\r\n }", "public static ObservableList<Appointment> getAppoinmentsForWeek(int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate beginWeek = LocalDate.now();\n LocalDate endWeek = LocalDate.now().plusWeeks(1);\n try (Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + beginWeek + \"' AND start <= '\" + endWeek + \"'\");\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n \n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "boolean getWeek3();", "Map<Date, Integer> getFullImpressions(Step step) throws SQLException;", "private int calculatingWeeklySavings(String accountUid, String categoryUid, String lastTimeStamp,\n String currentTimeStamp) throws Exception {\n LOGGER.debug(\"Going into Client Service Layer to get list of transactions. CategoryUid: \"+categoryUid);\n List<FeedItemSummary> feedItems =clientService.getWeeksOutGoingTransactions(accountUid, categoryUid,lastTimeStamp,\n currentTimeStamp);\n //equals feed item but minimised to amounts as thats all i want\n\n //get round up amount\n int savingsAddition=0;\n\n for (FeedItemSummary item:feedItems) {\n savingsAddition+=100-(item.getAmount()%100);\n }\n LOGGER.info(\"Calculated amount to be transfered to savings\");\n return savingsAddition;\n }", "public void split_weeky_data(String path) {\n\n\t\t/**\n\t\t * Hashtable<UserID, Hashtable<Week Day, Observation Sequence>> obstable\n\t\t */\n\t\tHashtable<Integer, Hashtable<String, Obs>> obstable = new Hashtable<>();\n\n\t\tSimpleDateFormat parserSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setFirstDayOfWeek(Calendar.MONDAY);\n\n\t\tint cnt = 0;\n\t\tint week_no = get_week_no(path);\n\t\tString subpath = path.substring(0, path.lastIndexOf('.'));\n\t\tString week1_path = subpath + \"_WEEK_\" + week_no + \".CSV\";\n\t\tString week2_path = subpath + \"_WEEK_\" + (week_no + 1) + \".CSV\";\n\n\t\tFile w1file = new File(week1_path);\n\t\tFile w2file = new File(week2_path);\n\t\t// if file doesnt exists, then create it\n\t\ttry {\n\t\t\tif (!w1file.exists()) {\n\t\t\t\tw1file.createNewFile();\n\t\t\t}\n\n\t\t\tif (!w2file.exists()) {\n\t\t\t\tw2file.createNewFile();\n\t\t\t}\n\n\t\t\tFileWriter week1_fw = new FileWriter(w1file.getAbsoluteFile());\n\t\t\tBufferedWriter week1_bw = new BufferedWriter(week1_fw);\n\n\t\t\tFileWriter week2_fw = new FileWriter(w2file.getAbsoluteFile());\n\t\t\tBufferedWriter week2_bw = new BufferedWriter(week2_fw);\n\n\t\t\tBufferedReader reader;\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(path));\n\n\t\t\t\tString line;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tString lineSplit[] = line.split(CLM);\n\t\t\t\t\tcal.setTime(parserSDF.parse(lineSplit[1]));\n\t\t\t\t\tint recent = cal.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\t\tif (week_no == recent) {\n\t\t\t\t\t\tweek1_bw.append(line);\n\t\t\t\t\t\tweek1_bw.newLine();\n\t\t\t\t\t\t//\n\t\t\t\t\t} else {\n\t\t\t\t\t\tweek2_bw.append(line);\n\t\t\t\t\t\tweek2_bw.newLine();\n\t\t\t\t\t\t//\n\t\t\t\t\t}\n\n\t\t\t\t\t// if (Integer.parseInt(lineSplit[0]) != 1) {\n\t\t\t\t\t// break;\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t\tweek1_bw.close();\n\t\t\t\tweek2_bw.close();\n\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t} catch (IOException ex) {\n\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t} catch (ParseException ex) {\n\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private int getLatestRuns() {\n // return 90 for simplicity\n return 90;\n }", "@Transactional(readOnly = true)\n\t@Query(value = \"SELECT s FROM StockPrice s where stockCd=:stockCd and curTime in (select lastDay from BFWeekDay bfw where date(lastDay) between :fromDate and :toDate) order by s.curTime\")\n\tpublic List<StockPrice> findWeekByStockCd(@Param(\"stockCd\") String stockCd, @Param(\"fromDate\") Date fromDate,\n\t\t\t@Param(\"toDate\") Date toDate);", "public Week() {\r\n for (int i = 0; i < 5; i++) {\r\n for (int j = 0; j < 13; j++) {\r\n weekData[i][j] = 0;\r\n }\r\n }\r\n }", "public static void SWM_GAME_7DaysWeek(String[][] SWM_table, int SWM_row_num, int SWM_col_num, String[][] organizedTable, String[][] organizedTable2, double[][] sessionDate_asNum, String[][] sessionDate,\n\t\t int sessionDate_row_num, int sessionDate_col_num, Workbook workbook_w)\n{\n\t\n\t//Finished SWM\n}", "boolean hasWeek3();", "@FXML\n private void incrementWeek() {\n date = date.plusWeeks(1);\n updateDates();\n }", "@Override\r\n\tpublic List<ITransactionHistoryDto> viewWeekTransaction(String accountNumber) {\r\n\t\tlog.info(\"inside week transaction\");\r\n\t\tLocalDateTime fromDate = LocalDateTime.now().minusWeeks(1L);\r\n\t\tLocalDateTime toDate = LocalDateTime.now();\r\n\r\n\t\tAccount account = accountRepository.findByAccountNumber(accountNumber);\r\n\t\tif (account == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NUMBER_NOT_FOUND);\r\n\t\t}\r\n\t\tif (transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate).isEmpty()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.WEEK_HISTORY_NOT_FOUND);\r\n\t\t}\r\n\t\treturn transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate);\r\n\r\n\t}", "public List getTraining(Integer userId) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Training.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.addOrder(Order.asc(\"dateCompleted\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "List<EvaluationRecent> selectAll();", "boolean getWeek4();", "boolean getWeek2();", "void getForecastInitially(DarkSkyApi api, PlaceWeather weather){\n\n long newWeatherPlaceId = databaseInstance.weatherDao().insertPlaceWeather(weather);\n\n weather.getDaily().setParentPlaceId(newWeatherPlaceId);\n databaseInstance.weatherDao().insertDaily(weather.getDaily());\n\n List<DailyData> dailyData = weather.getDaily().getData();\n\n for(int i = 0; i < dailyData.size(); ++i){\n dailyData.get(i).setParentPlaceId(newWeatherPlaceId);\n dailyData.get(i).setId(\n databaseInstance.weatherDao().insertDailyData(dailyData.get(i))\n );\n }\n\n long currentDayId = dailyData.get(0).getId();\n\n weather.getHourly().setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourly(weather.getHourly());\n\n List<HourlyData> hourlyData = weather.getHourly().getData();\n\n for(int i = 0; i < hourlyData.size(); ++i){\n hourlyData.get(i).setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(i));\n }\n\n //now load hours of next 7 days initially\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n\n PlaceWeather dayWeather;\n for(int i = 1; i < dailyData.size(); ++i){\n try{\n dayWeather = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n dailyData.get(i).getTime()+1,\n avoid).execute().body();\n }catch (IOException e){\n break;\n }\n\n dayWeather.getHourly().setParentDayId(dailyData.get(i).getId());\n dayWeather.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(dayWeather.getHourly())\n );\n\n hourlyData = dayWeather.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(dailyData.get(i).getId());\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n\n }", "public WeekViewLoader<T> getWeekViewLoader() {\n return gestureHandler.getWeekViewLoader();\n }", "private void flushWeek() {\n\t\tComponent[] days = this.weekPanel.getComponents();\n\t\tComponent[] blocks;\n\t\tint i;\n\t\tfor (Component day : days) {\n\t\t\tblocks = ((Container) day).getComponents();\n\t\t\ti = 1;\n\t\t\tfor (Component unit : blocks) {\n\t\t\t\t((JTimeBlock) unit).flush();\n\t\t\t\tif (((JTimeBlock) unit).getComponentCount() != 0) {\n\t\t\t\t\t((JTimeBlock) unit).removeAll();\n\t\t\t\t}\n\t\t\t\tif (i % BLOCKS_IN_HOUR == 0) {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 1, 1, Color.LIGHT_GRAY));\n\t\t\t\t} else {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 0, 1, Color.LIGHT_GRAY));\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t}\n\t\t}\n\t}", "private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }", "public ArrayList<Event> getCalendarEventsByWeek()\n {\n ArrayList<Event> weekListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)) &&\n (events.get(i).getCalendar().get(Calendar.WEEK_OF_MONTH) == currentCalendar.get(Calendar.WEEK_OF_MONTH)))\n {\n weekListOfEvents.add(events.get(i));\n }\n }\n return weekListOfEvents;\n }", "public Short getEstWeeksPerYear() {\n return estWeeksPerYear;\n }", "boolean hasWeek4();", "public int getAgeInWeeks() {\n return ageInWeeks;\n }", "public void simulate(int numberOfWeeks) {\n setChanged();\n notifyObservers(true);\n\n int finalWeek = weeksElapsed + numberOfWeeks;\n\n for (int i = weeksElapsed + 1; i <= finalWeek; i++) {\n ecosystem.simulateOneWeek(i);\n weeksElapsed++;\n //constructPoolList();\n constructPoolHashMap();\n }\n\n setChanged();\n notifyObservers(false);\n }", "private DataSet toDataSet(final Collection<TrainingEntry<Login>> trainingDataSet) {\n final int numTimestampsDifferences = getNumberOfInputFeatures(trainingDataSet);\n final IterableRecordReader recordReader = new IterableRecordReader(trainingDataSet);\n return new RecordReaderDataSetIterator(recordReader, trainingDataSet.size(), numTimestampsDifferences, NUM_CATEGORIES).next();\n }", "@Test\r\n\tpublic void testGetBatchWeekAvgBarChart() {\r\n\t\tlog.debug(\"TESTING getBatchWeekAvgBarChart\");\r\n\t\tgiven().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t\t.when().get(baseUrl + \"all/reports/batch/2200/week/1/bar-batch-week-avg\")\r\n\t\t\t.then().assertThat().statusCode(200);\r\n\t\t//Bad Batch number in the uri (223300) should return empty JSON object\r\n\t\tString actual = given().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t\t.when().get(baseUrl + \"all/reports/batch/223300/week/1/bar-batch-week-avg\")\r\n\t\t\t.thenReturn().body().asString();\r\n\t\tString expected = \"{}\";\r\n\t\tassertEquals(expected, actual);\r\n\t}", "@Test\r\n\tpublic void findAllGames() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: findAllGames \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tList<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.findAllGames4tsw(tswacct, startResult, maxRows);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: findAllGames\r\n\t}", "private int[] setDaysOfWeek() {\n int[] daysOfWeek = new int[7];\n\n for (int i = 0; i < 6; i++) {\n daysOfWeek[i] = calculateNumberOfDaysOfWeek(DayOfWeek.of(i + 1));\n }\n\n return daysOfWeek;\n }", "public double getPer_week(){\n\t\tdouble amount=this.num_of_commits/52;\n\t\treturn amount;\t\t\n\t}", "public List<Train> getAllTrains(){ return trainDao.getAllTrains(); }" ]
[ "0.6875342", "0.6305759", "0.61536187", "0.5929149", "0.5917931", "0.58590025", "0.58479905", "0.58421665", "0.5808559", "0.578849", "0.57662016", "0.56868994", "0.56408197", "0.5634671", "0.5627586", "0.56097215", "0.55564165", "0.5551122", "0.55267066", "0.5521872", "0.5492258", "0.54694164", "0.54454225", "0.5436072", "0.542899", "0.5402484", "0.5399182", "0.5391938", "0.53731614", "0.5347057", "0.5325898", "0.5316283", "0.5311442", "0.5277801", "0.52742887", "0.5257204", "0.5242445", "0.5241475", "0.5232107", "0.52261674", "0.5216318", "0.52121115", "0.5191136", "0.51904225", "0.5151604", "0.51430464", "0.5142693", "0.5139767", "0.51359487", "0.5128451", "0.5120347", "0.5105774", "0.50991243", "0.50914204", "0.5090206", "0.508694", "0.5079233", "0.5069534", "0.5060116", "0.5059773", "0.505596", "0.50525767", "0.5044404", "0.5035957", "0.50354373", "0.50284255", "0.5025242", "0.5010923", "0.5009604", "0.50017715", "0.5000874", "0.49894443", "0.49830407", "0.49284983", "0.49102524", "0.48992065", "0.48966238", "0.48821074", "0.48796955", "0.48606423", "0.48526442", "0.4844366", "0.48436296", "0.48432228", "0.48402742", "0.48361486", "0.48230946", "0.4822563", "0.48220232", "0.4808142", "0.47974622", "0.47805753", "0.4773234", "0.47649753", "0.47633076", "0.4762816", "0.47592515", "0.47585803", "0.47551474", "0.47551006" ]
0.63786584
1
Fetch a specific week from all batches
@RequestMapping(value = "/week/weeknumber/{weeknumber}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Week>> getWeekByWeekNumber(@PathVariable("weeknumber") int weeknumber) { ResponseEntity<List<Week>> returnEntity; try { List<Week> result = businessDelegate.getWeekByWeekNumber(weeknumber); if (result == null) { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND); } else { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK); } } catch (RuntimeException e) { returnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/week/batchid/{batchId}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByBatchId(@PathVariable(\"batchId\") int batchId) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getWeekByBatchId(batchId);\n\t\t\t\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "int getWeek();", "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "private List<Object[]> executeWeekQuery(String week, String year) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Matin' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (6,7,8,9,10,11,12,13) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_2 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Soir' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (14,15,16,17,18,19,20,21) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_3 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Nuit' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (22,23,0,1,2,3,4,5) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY shift, segment, workplace;\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "public void setWeek(String week) {\r\n this.week = week;\r\n }", "@RequestMapping(value = \"/week/all\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getAllWeek() {\n\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getAllWeeks();\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT \\n\" + \n\t\t\t\t\"(CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, SUM(Amount) From transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"and type = ?\\n\" + \n\t\t\t\t\"group by Week\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2),resultSet.getInt(1)));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "boolean getWeek6();", "boolean getWeek1();", "boolean getWeek7();", "private void getActivatedWeekdays() {\n }", "boolean getWeek5();", "public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}", "boolean hasWeek6();", "public Cursor getWeekStatistics(int attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" = \" + attribute + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "public Cursor getWeekStatistics(int[] attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" IN \" + Arrays.toString(attribute).replace('[','(').replace(']',')') + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "public void getUsersByWeek() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByWeeks();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "public Builder byWeekNo(Integer... weekNumbers) {\n\t\t\treturn byWeekNo(Arrays.asList(weekNumbers));\n\t\t}", "public List<DatabaseStore> getVarValuesForWeek(String variable,\n\t\t\tInteger month, Integer day, Integer year, Integer week_day) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tString day_str = QUES_KEY_VAR + \"='\" + variable + \"' AND ( (\"\n\t\t\t\t+ QUES_KEY_DAY + \"=\" + day + \" AND \" + QUES_KEY_MONTH + \"=\"\n\t\t\t\t+ month + \" AND \" + QUES_KEY_YEAR + \"=\" + year + \")\";\n\n\t\tSimpleDateFormat year_fmt = new SimpleDateFormat(\"yyyy\", Locale.US);\n\t\tSimpleDateFormat month_fmt = new SimpleDateFormat(\"MM\", Locale.US);\n\t\tSimpleDateFormat day_fmt = new SimpleDateFormat(\"dd\", Locale.US);\n\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tInteger diff = null;\n\t\t\tGregorianCalendar cal = new GregorianCalendar(year, month - 1, day);\n\t\t\tif (week_day < i) {\n\t\t\t\tdiff = i - week_day;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t} else if (week_day > i) {\n\t\t\t\tdiff = week_day - i;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, -1 * diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t}\n\t\t}\n\t\tday_str += \")\";\n\t\tString query = \"SELECT * FROM \" + TABLE_QUES + \" WHERE \" + day_str;\n\t\tCursor cursor = db.rawQuery(query, null);\n\t\tif (cursor.getCount() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn handleCursor(cursor);\n\t\t}\n\t}", "boolean hasWeek1();", "public Builder byWeekNo(Collection<Integer> weekNumbers) {\n\t\t\tbyWeekNo.addAll(weekNumbers);\n\t\t\treturn this;\n\t\t}", "public void startWeek()\n\t{\n\t\tsynchronized (date_db_lock) {\t\t\t\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\tclearAllDatabases();\n\t\t\t}\n\t\t}\n\t}", "boolean hasWeek7();", "public static TemporalQuery<Integer> dayOfWeek(){\n return (d) -> d.get(ChronoField.DAY_OF_WEEK);\n }", "boolean getWeek3();", "@Transactional(readOnly = true)\n\t@Query(value = \"SELECT s FROM StockPrice s where stockCd=:stockCd and curTime in (select lastDay from BFWeekDay bfw) order by s.curTime\")\n\tpublic List<StockPrice> findWeekByStockCd(@Param(\"stockCd\") String stockCd);", "private RepeatWeekdays() {}", "boolean hasWeek5();", "DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();", "public String getWeek() {\r\n return week;\r\n }", "public Weeks(BigDecimal numUnits) { super(numUnits); }", "private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }", "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "public void AllWeekLessonReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass l = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if lesson exists, and isnt a parent appointment\r\n if (l != null && l.subject != subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + l.time + \"pm | \" + l.room + \" |\");\r\n System.out.println(l.toReport());\r\n }\r\n }\r\n }\r\n }\r\n }", "@Override\n\tpublic List<WeeklyData> getWeeklyData(int user_id) {\n\t\treturn mobileDao.getWeeklyData(user_id);\n\t}", "@Override\n\tpublic WeeklyData getWeeklyDataToUpdate(int week_id) {\n\t\treturn mobileDao.getWeeklyDataToUpdate(week_id);\n\t}", "public static ObservableList<Appointment> getAppoinmentsForWeek(int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate beginWeek = LocalDate.now();\n LocalDate endWeek = LocalDate.now().plusWeeks(1);\n try (Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + beginWeek + \"' AND start <= '\" + endWeek + \"'\");\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n \n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "private void setProgramsForWeekTable()\r\n {\n long day = System.currentTimeMillis();\r\n long day2 = day + 1000 * 60 * 60 * 24; //seconds in day\r\n long day3 = day2 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day4 = day3 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day5 = day4 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day6 = day5 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day7 = day6 + 1000 * 60 * 60 * 24; //seconds in day\r\n\r\n String urlday = DownloadsManager.PROGRAMM_URL + day;\r\n String urlday2 = DownloadsManager.PROGRAMM_URL + day2;\r\n String urlday3 = DownloadsManager.PROGRAMM_URL + day3;\r\n String urlday4 = DownloadsManager.PROGRAMM_URL + day4;\r\n String urlday5 = DownloadsManager.PROGRAMM_URL + day5;\r\n String urlday6 = DownloadsManager.PROGRAMM_URL + day6;\r\n String urlday7 = DownloadsManager.PROGRAMM_URL + day7;\r\n\r\n String[] urls = {urlday, urlday2, urlday3, urlday4, urlday5, urlday6, urlday7};\r\n\r\n for (int i=0; i<urls.length; i++)\r\n {\r\n if(dataBase.getProgramsCount() == 0)\r\n setProgramsTable(urls[i]);\r\n else\r\n updateProgramsTable(urls[i]);\r\n }\r\n\r\n }", "private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = accessToken;\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }", "@Transactional(readOnly = true)\n\t@Query(value = \"SELECT s FROM StockPrice s where stockCd=:stockCd and curTime in (select lastDay from BFWeekDay bfw where date(lastDay) between :fromDate and :toDate) order by s.curTime\")\n\tpublic List<StockPrice> findWeekByStockCd(@Param(\"stockCd\") String stockCd, @Param(\"fromDate\") Date fromDate,\n\t\t\t@Param(\"toDate\") Date toDate);", "public Integer[][] getAll() {\r\n return weekData;\r\n }", "public Builder workweekStarts(DayOfWeek day) {\n\t\t\tworkweekStarts = day;\n\t\t\treturn this;\n\t\t}", "public static void calcSpecificWeeks(JavaSparkContext context, SparkSession session, String input_batch, String input_assessment, String input_grade, String output) {\n\t\tStructField batch_id = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n StructField borderline_grade_threshold = DataTypes.createStructField(\"borderline_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField end_date = DataTypes.createStructField(\"end_date\", DataTypes.StringType, true);\n StructField good_grade_threshold = DataTypes.createStructField(\"good_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField location = DataTypes.createStructField(\"location\", DataTypes.StringType, true);\n StructField skill_type = DataTypes.createStructField(\"skill_type\", DataTypes.StringType, true);\n\t\tStructField start_date = DataTypes.createStructField(\"start_date\", DataTypes.StringType, true);\n StructField training_name = DataTypes.createStructField(\"training_name\", DataTypes.StringType, true);\n\t\tStructField training_type = DataTypes.createStructField(\"training_type\", DataTypes.StringType, true);\n StructField number_of_weeks = DataTypes.createStructField(\"number_of_weeks\", DataTypes.DoubleType, true);\n StructField co_trainer_id = DataTypes.createStructField(\"co_trainer_id\", DataTypes.DoubleType, true);\n StructField trainer_id = DataTypes.createStructField(\"trainer_id\", DataTypes.DoubleType, true);\n StructField resource_id = DataTypes.createStructField(\"resource_id\", DataTypes.StringType, true);\n StructField address_id = DataTypes.createStructField(\"address_id\", DataTypes.DoubleType, true);\n StructField graded_weeks = DataTypes.createStructField(\"graded_weeks\", DataTypes.DoubleType, true);\n List<StructField> fields = new ArrayList<StructField>();\n fields.add(batch_id);\n fields.add(borderline_grade_threshold);\n fields.add(end_date);\n fields.add(good_grade_threshold);\n fields.add(location);\n fields.add(skill_type);\n fields.add(start_date);\n fields.add(training_name);\n fields.add(training_type);\n fields.add(number_of_weeks);\n fields.add(co_trainer_id);\n fields.add(trainer_id);\n fields.add(resource_id);\n fields.add(address_id);\n fields.add(graded_weeks);\n StructType schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_batch = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_batch);\n\t\tdata_batch.createOrReplaceTempView(\"caliber_batch\");\n\t\t\n\t\tStructField assessment_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField raw_score = DataTypes.createStructField(\"raw_score\", DataTypes.DoubleType, true);\n\t\tStructField assessment_title = DataTypes.createStructField(\"assessment_title\", DataTypes.StringType, true);\n StructField assessment_type = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField week_number = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n StructField batch_id2 = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n\t\tStructField assessment_category = DataTypes.createStructField(\"assessment_category\", DataTypes.StringType, true);\n fields = new ArrayList<StructField>();\n fields.add(assessment_id);\n fields.add(raw_score);\n fields.add(assessment_title);\n fields.add(assessment_type);\n fields.add(week_number);\n fields.add(batch_id2);\n fields.add(assessment_category);\n schema = DataTypes.createStructType(fields);\n\t\tDataset<Row> data_assessment = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_assessment);\n\t\tdata_assessment.createOrReplaceTempView(\"caliber_assessment\");\n\t\t\n\t\tStructField grade_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField date_received = DataTypes.createStructField(\"raw_score\", DataTypes.StringType, true);\n\t\tStructField score = DataTypes.createStructField(\"assessment_title\", DataTypes.DoubleType, true);\n StructField assessment_id2 = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField trainee_id = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n fields = new ArrayList<StructField>();\n fields.add(grade_id);\n fields.add(date_received);\n fields.add(score);\n fields.add(assessment_id2);\n fields.add(trainee_id);\n schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_grade = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_grade);\n\t\tdata_grade.createOrReplaceTempView(\"caliber_grade\");\n\t\t\n //Executes SQL query to aggregate data\n\t\t\n\t\tDataset<Row> SpecificWeeksSubmittedTable = session.sqlContext().sql(\n\t\t \"SELECT temp.week_number_exam, temp2.week_number_verbal, caliber_batch.batch_id, caliber_batch.trainer_id FROM caliber_batch JOIN (SELECT caliber_assessment.week_number AS week_number_exam, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Exam' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp ON caliber_batch.batch_id = temp.batch_id FULL JOIN (SELECT caliber_assessment.week_number AS week_number_verbal, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Verbal' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp2 ON (caliber_batch.batch_id = temp2.batch_id and week_number_verbal = week_number_exam)\");\n\t\t\n\t\t//Write query results to S3\n\t\t\n\t\tSpecificWeeksSubmittedTable.coalesce(1).write().format(\"csv\").option(\"header\", \"true\").option(\"delimiter\", \"~\").mode(\"Overwrite\").save(output);\n\t}", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "@Test\r\n\tpublic void testGetBatchWeekAverageValue() throws Exception{\r\n\t\tlog.debug(\"Validate retrieval of batch's overall average in a week\");\r\n\t\t\r\n\t\tDouble expected = new Double(80.26d);\r\n\t\tDouble actual = \r\n\t\t\tgiven().\r\n\t\t\t\tspec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON).\r\n\t\t\twhen().\r\n\t\t\t\tget(baseUrl + batchAverage, 2150, 1).\r\n\t\t\tthen().\r\n\t\t\t\tassertThat().statusCode(200).\r\n\t\t\tand().\r\n\t\t\t\textract().as(Double.class);\r\n\t\t\r\n\t\tassertEquals(expected, actual, 0.01d);\r\n\t}", "private int weekOk(int userGroupID, String week) {\n\t\ttry {\n\t\t\tStatement stmt1 = conn.createStatement();\n\t\t\tResultSet rs = stmt1.executeQuery(\"select * from reports where user_group_id = \"+userGroupID+\" and week = \"+week);\n\t\t\tif (rs.first()) {\n\t\t\t\treturn rs.getInt(\"id\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn -1;\n\n\t}", "public PayPeriodCursor updateWeek(PayPeriod period) {\n\t\tString[] periodInfo = {period.getPayPeriod(), String.valueOf(period.getId())};\n\t\tCursor cursor = getWritableDatabase().rawQuery(UPDATE_WEEK, periodInfo);\n\t\treturn new PayPeriodCursor(cursor);\n\t}", "public List<String> getTopSearchKeyWeekly(int number) {\n\t\tString hql = \"select e.keyWords from SearchLog e where e.date > :oneWeekBefore group by e.keyWords order by count(e.id) desc\";\n\n\t\tSession session = getSession();\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.add(Calendar.DATE, -7); // 得到一周前的时间\n\t\t\tDate date = calendar.getTime();\n\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t// System.out.println(df.format(date));\n\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setMaxResults(number);\n\t\t\tquery.setDate(\"oneWeekBefore\", date);\n\n\t\t\tlist = query.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "boolean hasWeek3();", "@Transactional(readOnly = true)\n\t@Query(value = \"select avg(price) as price, date_format(curTime,'%Y-%m-%d') as cur_date from StockPrice sp \"\n\t\t\t+ \"where curTime in (select lastDay from BFWeekDay bfw where date(lastDay) between :fromDate and :toDate) and \"\n\t\t\t+ \"stockCd in (select stockCd from Stock s where sectorCd=:sectorCd) group by curTime order by curTime\")\n\tpublic List<Object[]> findWeekBySectorCd(@Param(\"sectorCd\") String sectorCd, @Param(\"fromDate\") Date fromDate,\n\t\t\t@Param(\"toDate\") Date toDate);", "@Test\r\n\tpublic void testGetBatchWeekSortedBarChart() {\r\n\t\tlog.debug(\"TESTING getBatchWeekSortedBarChart\");\r\n\t\tlog.debug(\"TESTING getBatchWeekAvgBarChart\");\r\n\t\tgiven().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t\t.when().get(baseUrl + \"all/reports/batch/2200/week/1/bar-batch-weekly-sorted\")\r\n\t\t\t.then().assertThat().statusCode(200);\r\n\t\t//Bad Batch number in the uri (223300) should return empty JSON object\r\n\t\tString actual = given().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t\t.when().get(baseUrl + \"all/reports/batch/223300/week/1/bar-batch-weekly-sorted\")\r\n\t\t\t.thenReturn().body().asString();\r\n\t\tString expected = \"{}\";\r\n\t\tassertEquals(expected, actual);\r\n\t}", "@Transactional(readOnly = true)\n\t@Query(value = \"select avg(price) as price, date_format(curTime,'%Y-%m-%d') as cur_date from StockPrice sp \"\n\t\t\t+ \"where curTime in (select lastDay from BFWeekDay) and \"\n\t\t\t+ \"stockCd in (select stockCd from Stock where sectorCd=:sectorCd) group by curTime order by curTime\")\n\tpublic List<Object[]> findWeekBySectorCd(@Param(\"sectorCd\") String sectorCd);", "@GetMapping(\"/getWeeklyRecords\")\n public ResponseEntity< List<Record> > getWeeklyRecords(){\n return ResponseEntity.ok().body(this.recordService.getWeeklyRecords());\n }", "boolean getWeek2();", "@Override\n public List<Long> getWeekReadTimes(Long uid) {\n Assertions.notNull(uid, \"uid must not be null!\");\n return miniProgramCacheManager.getWeekReadTimeData(uid);\n }", "public static void SWM_GAME_7DaysWeek(String[][] SWM_table, int SWM_row_num, int SWM_col_num, String[][] organizedTable, String[][] organizedTable2, double[][] sessionDate_asNum, String[][] sessionDate,\n\t\t int sessionDate_row_num, int sessionDate_col_num, Workbook workbook_w)\n{\n\t\n\t//Finished SWM\n}", "@Override\r\n\tpublic List<ITransactionHistoryDto> viewWeekTransaction(String accountNumber) {\r\n\t\tlog.info(\"inside week transaction\");\r\n\t\tLocalDateTime fromDate = LocalDateTime.now().minusWeeks(1L);\r\n\t\tLocalDateTime toDate = LocalDateTime.now();\r\n\r\n\t\tAccount account = accountRepository.findByAccountNumber(accountNumber);\r\n\t\tif (account == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NUMBER_NOT_FOUND);\r\n\t\t}\r\n\t\tif (transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate).isEmpty()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.WEEK_HISTORY_NOT_FOUND);\r\n\t\t}\r\n\t\treturn transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate);\r\n\r\n\t}", "boolean getWeek4();", "public void simulate(int numberOfWeeks) {\n setChanged();\n notifyObservers(true);\n\n int finalWeek = weeksElapsed + numberOfWeeks;\n\n for (int i = weeksElapsed + 1; i <= finalWeek; i++) {\n ecosystem.simulateOneWeek(i);\n weeksElapsed++;\n //constructPoolList();\n constructPoolHashMap();\n }\n\n setChanged();\n notifyObservers(false);\n }", "private void flushWeek() {\n\t\tComponent[] days = this.weekPanel.getComponents();\n\t\tComponent[] blocks;\n\t\tint i;\n\t\tfor (Component day : days) {\n\t\t\tblocks = ((Container) day).getComponents();\n\t\t\ti = 1;\n\t\t\tfor (Component unit : blocks) {\n\t\t\t\t((JTimeBlock) unit).flush();\n\t\t\t\tif (((JTimeBlock) unit).getComponentCount() != 0) {\n\t\t\t\t\t((JTimeBlock) unit).removeAll();\n\t\t\t\t}\n\t\t\t\tif (i % BLOCKS_IN_HOUR == 0) {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 1, 1, Color.LIGHT_GRAY));\n\t\t\t\t} else {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 0, 1, Color.LIGHT_GRAY));\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t}\n\t\t}\n\t}", "com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();", "public void drawEventsForWeek(){\n WeekController.getController().drawEvents(PersonInfo.getPersonInfo().getEventsForWeek(weekNumber));\n }", "private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public List<Integer> getByWeekNo() {\n\t\treturn byWeekNo;\n\t}", "@Test\r\n\tpublic void testGetBatchWeekAvgBarChart() {\r\n\t\tlog.debug(\"TESTING getBatchWeekAvgBarChart\");\r\n\t\tgiven().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t\t.when().get(baseUrl + \"all/reports/batch/2200/week/1/bar-batch-week-avg\")\r\n\t\t\t.then().assertThat().statusCode(200);\r\n\t\t//Bad Batch number in the uri (223300) should return empty JSON object\r\n\t\tString actual = given().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t\t.when().get(baseUrl + \"all/reports/batch/223300/week/1/bar-batch-week-avg\")\r\n\t\t\t.thenReturn().body().asString();\r\n\t\tString expected = \"{}\";\r\n\t\tassertEquals(expected, actual);\r\n\t}", "@FXML\n private void incrementWeek() {\n date = date.plusWeeks(1);\n updateDates();\n }", "public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "@Test\r\n\tpublic void testGetTechnologiesForTheWeek() throws Exception{\r\n\t\tlog.debug(\"Validate retrieval of batch's technologies learned in a week\");\r\n\t\t\r\n\t\tSet<String> expected = new HashSet<>();\r\n\t\texpected.add(\"AWS\");\r\n\t\texpected.add(\"Hibernate\");\r\n\t\t\r\n\t\tSet<String> actual = new ObjectMapper().readValue(\r\n\t\t\tgiven().\r\n\t\t\t\tspec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON).\r\n\t\t\twhen().\r\n\t\t\t\tget(baseUrl + batchAssessmentCategories, 2201, 5).\r\n\t\t\tthen().\r\n\t\t\t\tcontentType(ContentType.JSON).assertThat().statusCode(200).\r\n\t\t\tand().\r\n\t\t\t\textract().response().asString(), new TypeReference<Set<String>>() {});\r\n\t\t\r\n\t\tassertEquals(expected, actual);\r\n\t}", "public double getPer_week(){\n\t\tdouble amount=this.num_of_commits/52;\n\t\treturn amount;\t\t\n\t}", "public WkBscCore selectByPrimaryKey(String bscid, Integer week, Integer year) {\r\n WkBscCore key = new WkBscCore();\r\n key.setBscid(bscid);\r\n key.setWeek(week);\r\n key.setYear(year);\r\n WkBscCore record = (WkBscCore) getSqlMapClientTemplate().queryForObject(\"WK_BSC_CORE.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }", "void onWeekNumberClick ( @NonNull MaterialCalendarView widget, @NonNull CalendarDay date );", "public boolean getRunOnWeekends();", "int getCountMasteredWordWeek() {\n return 8;\n //return mModel.getCountWordWithStatus(Constants.StatusWord.MASTER);\n }", "public Week getWeek(int weekNumber) {\n return weekList.get(weekNumber);\n }", "boolean hasWeekday();", "public InlineResponse20038 getMealPlanWeek (String username, String startDate, String hash) throws ApiException {\n Object localVarPostBody = null;\n // verify the required parameter 'username' is set\n if (username == null) {\n throw new ApiException(400, \"Missing the required parameter 'username' when calling getMealPlanWeek\");\n }\n // verify the required parameter 'startDate' is set\n if (startDate == null) {\n throw new ApiException(400, \"Missing the required parameter 'startDate' when calling getMealPlanWeek\");\n }\n // verify the required parameter 'hash' is set\n if (hash == null) {\n throw new ApiException(400, \"Missing the required parameter 'hash' when calling getMealPlanWeek\");\n }\n\n // create path and map variables\n String localVarPath = \"/mealplanner/{username}/week/{start-date}\".replaceAll(\"\\\\{format\\\\}\",\"json\").replaceAll(\"\\\\{\" + \"username\" + \"\\\\}\", apiInvoker.escapeString(username.toString())).replaceAll(\"\\\\{\" + \"start-date\" + \"\\\\}\", apiInvoker.escapeString(startDate.toString()));\n\n // query params\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n // header params\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n // form params\n Map<String, String> localVarFormParams = new HashMap<String, String>();\n\n localVarQueryParams.addAll(ApiInvoker.parameterToPairs(\"\", \"hash\", hash));\n\n\n String[] localVarContentTypes = {\n \n };\n String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : \"application/json\";\n\n if (localVarContentType.startsWith(\"multipart/form-data\")) {\n // file uploading\n MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();\n \n\n localVarPostBody = localVarBuilder.build();\n } else {\n // normal form params\n }\n\n try {\n String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, \"GET\", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);\n if(localVarResponse != null){\n return (InlineResponse20038) ApiInvoker.deserialize(localVarResponse, \"\", InlineResponse20038.class);\n }\n else {\n return null;\n }\n } catch (ApiException ex) {\n throw ex;\n }\n }", "public void displayNextWeek() {\n setDisplayedDateTime(currentDateTime.plusWeeks(1));\n }", "public Builder setWeek6(boolean value) {\n bitField0_ |= 0x00000020;\n week6_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic int selectMessageWeek() {\n\t\treturn messageMapper.selectMessageWeek();\r\n\t}", "@Test\r\n\tpublic void testGetBatchWeekTraineeBarChart() throws Exception {\r\n\t\tlog.debug(\"GetBatchWeekTraineeBarChart Test\");\r\n\t\t\r\n\t\tgiven().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t.when().get(baseUrl + \"all/reports/batch/{batchId}/overall/trainee/{traineeId}/bar-batch-overall-trainee\", \r\n\t\t\t\ttraineeValue[0], traineeValue[1])\r\n\t\t.then().assertThat().statusCode(200);\r\n\t}", "public static final Function<Date,Date> setWeek(final int value) {\r\n return new Set(Calendar.WEEK_OF_YEAR, value);\r\n }", "private int calculatingWeeklySavings(String accountUid, String categoryUid, String lastTimeStamp,\n String currentTimeStamp) throws Exception {\n LOGGER.debug(\"Going into Client Service Layer to get list of transactions. CategoryUid: \"+categoryUid);\n List<FeedItemSummary> feedItems =clientService.getWeeksOutGoingTransactions(accountUid, categoryUid,lastTimeStamp,\n currentTimeStamp);\n //equals feed item but minimised to amounts as thats all i want\n\n //get round up amount\n int savingsAddition=0;\n\n for (FeedItemSummary item:feedItems) {\n savingsAddition+=100-(item.getAmount()%100);\n }\n LOGGER.info(\"Calculated amount to be transfered to savings\");\n return savingsAddition;\n }", "boolean hasWeek4();", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "private Week(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "boolean hasWeek2();", "public Builder setWeek7(boolean value) {\n bitField0_ |= 0x00000040;\n week7_ = value;\n onChanged();\n return this;\n }", "public EventsCalendarWeek getEventCalendarWeekByNumber(Integer weekNumber) {\n if (weekNumber < 0 || weekNumber > 52)\n throw new IllegalArgumentException(\"weekNumber have to be in range [0-52], current \" + weekNumber);\n else return listOfWeeks.get(weekNumber);\n }", "public Builder clearWeek6() {\n bitField0_ = (bitField0_ & ~0x00000020);\n week6_ = false;\n onChanged();\n return this;\n }", "@Test\n public void computeFactor_WinterTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-17 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-27 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-10-01 00:00:00\", \"2012-11-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "private int getWeekday() {\n Calendar cal = Calendar.getInstance();\n int i = cal.get(Calendar.DAY_OF_WEEK);\n int weekday = i == 1 ? 6 : (i - 2) % 7;\n myApplication.setWeekday(weekday);\n return weekday;\n }", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "@JsonIgnore\r\n public int getPointsByWeekAt(int pWeek){\r\n int lPoints = 0;\r\n for (CFantasyTeamByWeek lFantasyTeamByWeek : mFantasyTeamsByWeek){\r\n if (lFantasyTeamByWeek.getWeek() == pWeek){\r\n lPoints = lFantasyTeamByWeek.getPoints();\r\n }\r\n }\r\n return lPoints;\r\n }", "public boolean getWeek6() {\n return week6_;\n }", "public int getNumDayWorkWeek(){\r\n return numDayWorkWeek;\r\n }", "public Builder clearWeek7() {\n bitField0_ = (bitField0_ & ~0x00000040);\n week7_ = false;\n onChanged();\n return this;\n }" ]
[ "0.6570202", "0.62574756", "0.6193082", "0.6186924", "0.6140729", "0.6011578", "0.5975218", "0.59691775", "0.5888566", "0.5878465", "0.576653", "0.5708141", "0.5690527", "0.5652854", "0.56462413", "0.5619135", "0.5613593", "0.5599714", "0.5580794", "0.55500174", "0.5543486", "0.55415326", "0.5540106", "0.54698646", "0.54648906", "0.54635304", "0.54573977", "0.545137", "0.5443889", "0.542864", "0.5419514", "0.5412795", "0.5378634", "0.5368087", "0.53677404", "0.5365497", "0.53607607", "0.53594327", "0.5359291", "0.53572917", "0.535728", "0.5348646", "0.53218526", "0.5311521", "0.53035444", "0.52996665", "0.52968943", "0.5262827", "0.5245154", "0.5243975", "0.52304363", "0.52253616", "0.52066004", "0.5191479", "0.5185914", "0.51835275", "0.51746315", "0.5168163", "0.5158851", "0.51530385", "0.5146687", "0.5138968", "0.513634", "0.5130271", "0.51216906", "0.51123756", "0.5101098", "0.5084401", "0.5075778", "0.50342107", "0.5033538", "0.50206524", "0.5015461", "0.5012606", "0.50120497", "0.5008424", "0.5000639", "0.49830136", "0.49821752", "0.498192", "0.4978955", "0.49728003", "0.49681923", "0.49607134", "0.49590743", "0.49559605", "0.49533445", "0.49494573", "0.49334082", "0.4927041", "0.49262482", "0.4919472", "0.48978665", "0.48818845", "0.4875815", "0.4870053", "0.48663017", "0.48645663", "0.48645037", "0.48639143" ]
0.562066
15